issue详情页里的点赞刷新

This commit is contained in:
cxt 2016-08-29 16:25:30 +08:00
parent 4ff45c15a3
commit eb255d84b1
3 changed files with 8 additions and 7 deletions

View File

@ -0,0 +1,5 @@
<% count = @issue.journals.count %>
回复<sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=@issue.id %>">
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>@issue, :user_activity_id=>@issue.id,:type=>"activity"}%>
</span>

View File

@ -17,5 +17,5 @@ issue_desc_editor = KindEditor.create('#issue_description',
"uploadJson":"/kindeditor/upload",
"fileManagerJson":"/kindeditor/filemanager"});
// $("#issue_test_<%#= @issue.id %>").html("<%#= escape_javascript(render :partial => 'issues/edit', :locals => {:issue => Issue.find( @issue_id)}) %>");
$(".homepagePostReplyBannerCount").html('回复(<%= @issue.journals.count %>');
$(".homepagePostReplyBannerCount").html('<%= escape_javascript(render :partial => 'issues/issue_reply_banner') %>');
sd_create_editor_from_data(<%= @issue.id%>, null, "100%","<%= @issue.class.name %>");

View File

@ -36,12 +36,8 @@
<div class="homepagePostReply">
<div class="topBorder" style="display: <%= @issue.journals.count>0 ? 'none': '' %>"></div>
<div class="homepagePostReplyBanner" >
<% count = @issue.journals.count %>
<div class="homepagePostReplyBannerCount" >回复
<sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=@issue.id %>">
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>@issue, :user_activity_id=>@issue.id,:type=>"activity"}%>
</span>
<div class="homepagePostReplyBannerCount">
<%=render :partial => 'issue_reply_banner' %>
</div>
<div class="homepagePostReplyBannerTime"></div>
</div>