项目讨论区回复功能
This commit is contained in:
parent
00a8dc94c3
commit
0994ae9f07
|
@ -1,3 +1,6 @@
|
||||||
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id}) %>");
|
<%if @project%>
|
||||||
|
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/project_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id}) %>");
|
||||||
|
<%elsif @course%>
|
||||||
|
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id}) %>");
|
||||||
|
<%end%>
|
||||||
init_KindEditor_data(<%= @user_activity_id%>);
|
init_KindEditor_data(<%= @user_activity_id%>);
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="resources mt10">
|
<div class="resources mt10" id="user_activity_<%= user_activity_id%>">
|
||||||
<div class="homepagePostBrief">
|
<div class="homepagePostBrief">
|
||||||
<div class="homepagePostPortrait">
|
<div class="homepagePostPortrait">
|
||||||
<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %>
|
<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %>
|
||||||
|
@ -26,14 +26,14 @@
|
||||||
<div class="homepagePostDate">
|
<div class="homepagePostDate">
|
||||||
时间:<%= format_date(activity.created_on) %>
|
时间:<%= format_date(activity.created_on) %>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostIntro break_word upload_img" id="activity_description_<%= user_activity.id%>">帖子描述:
|
<div class="homepagePostIntro break_word upload_img" id="activity_description_<%= user_activity_id%>">帖子描述:
|
||||||
<% if activity.parent_id.nil? %>
|
<% if activity.parent_id.nil? %>
|
||||||
<%= activity.content.to_s.html_safe%>
|
<%= activity.content.to_s.html_safe%>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= activity.parent.content.to_s.html_safe%>
|
<%= activity.parent.content.to_s.html_safe%>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostSetting" id="act-<%= user_activity.id %>" style="visibility: hidden">
|
<div class="homepagePostSetting" id="act-<%= user_activity_id %>" style="visibility: hidden">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="homepagePostSettingIcon">
|
<li class="homepagePostSettingIcon">
|
||||||
<ul class="homepagePostSettiongText">
|
<ul class="homepagePostSettiongText">
|
||||||
|
@ -60,26 +60,29 @@
|
||||||
)</div>
|
)</div>
|
||||||
<div class="homepagePostReplyBannerTime"><%#=format_date(activity.updated_on)%></div>
|
<div class="homepagePostReplyBannerTime"><%#=format_date(activity.updated_on)%></div>
|
||||||
<%if count>2 %>
|
<%if count>2 %>
|
||||||
<div class="homepagePostReplyBannerMore"><a id="reply_btn_<%=user_activity.id%>" onclick="expand_reply('#reply_div_<%= user_activity.id %> li','#reply_btn_<%=user_activity.id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >点击展开更多回复(<%= count.to_s%>)</a></div>
|
<div class="homepagePostReplyBannerMore"><a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >点击展开更多回复(<%= count.to_s%>)</a></div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<!--<div class="homepagePostReplyBannerMore"><a href="javascript:void(0);" nhname='reply_ex_btn' class="replyGrey">点击展开更多回复</a>
|
|
||||||
</div>-->
|
|
||||||
</div>
|
|
||||||
<!--<div class="homepagePostReplyInputContainer">
|
|
||||||
<textarea class="homepagePostReplyInput" placeholder="请输入回复"></textarea>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="homepagePostReplyInputContainer">
|
<div class="homepagePostReplyInputContainer">
|
||||||
<div class="homepagePostReplyEmotion"><a href="javascript:void(0);" class="replyGrey">表情</a></div>
|
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
||||||
<div class="homepagePostReplyCancel"><a href="javascript:void(0);" class="postReplyCancel">取消</a>
|
<%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => 'true'},:method => "post", :remote => true) do |f|%>
|
||||||
</div>
|
<input type="hidden" name="quote[quote]" value="">
|
||||||
<div class="homepagePostReplySubmit"><a href="javascript:void(0);" class="postReplySubmit">发送</a>
|
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
|
||||||
|
<textarea placeholder="有问题或有建议,请直接给我留言吧!" nhname='new_message_textarea_<%= user_activity_id%>' name="reply[content]"></textarea>
|
||||||
|
<p nhname='contentmsg_<%= user_activity_id%>'></p>
|
||||||
|
<div nhname='toolbar_container_<%= user_activity_id%>' style="float:left;padding-top:3px;"></div>
|
||||||
|
<a id="new_message_cancel_btn_<%= user_activity_id%>" href="javascript:void(0)" class="grey_n_btn fr " style="margin-top:3px;">取消</a>
|
||||||
|
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr mr5 " style="margin-top:3px;">发送</a>
|
||||||
|
<% end%>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>-->
|
</div>
|
||||||
|
|
||||||
<% activity= activity.parent_id.nil? ? activity : activity.parent %>
|
<% activity= activity.parent_id.nil? ? activity : activity.parent %>
|
||||||
<% replies_all_i = 0 %>
|
<% replies_all_i = 0 %>
|
||||||
<% unless activity.children.empty? %>
|
<% unless activity.children.empty? %>
|
||||||
<div class="homepagePostReplyContainer" id="reply_div_<%= user_activity.id %>">
|
<div class="homepagePostReplyContainer" id="reply_div_<%= user_activity_id %>">
|
||||||
<ul>
|
<ul>
|
||||||
<% activity.children.reorder("created_on desc").each do |reply| %>
|
<% activity.children.reorder("created_on desc").each do |reply| %>
|
||||||
<% replies_all_i=replies_all_i+1 %>
|
<% replies_all_i=replies_all_i+1 %>
|
||||||
|
|
Loading…
Reference in New Issue