2016-10-27 14:57:12 +08:00
|
|
|
<ul>
|
|
|
|
<% comments.each do |comment| %>
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(function(){
|
|
|
|
showNormalImage('reply_content_<%= comment.id %>');
|
|
|
|
autoUrl('reply_content_<%= comment.id %>');
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
<li class="reply-container ml15" nhname="reply_rec">
|
|
|
|
<div class="homepagePostReplyPortrait">
|
|
|
|
<%= link_to image_tag(url_to_avatar(comment.creator_user), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_user.id) %>
|
|
|
|
</div>
|
|
|
|
<div class="reply-content ml15" onmouseover="$('#delete_reply_<%=activity.id %>_<%=comment.id %>').show();" onmouseout="$('#delete_reply_<%=activity.id %>_<%=comment.id %>').hide();">
|
2016-11-25 09:59:03 +08:00
|
|
|
<%= render :partial => 'projects/project_issue_contents', :locals => {:comment => comment, :user_activity_id => user_activity_id}%>
|
2016-10-27 14:57:12 +08:00
|
|
|
|
|
|
|
<% if !comment.content_detail.blank? || comment.class == Journal %>
|
|
|
|
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
|
|
|
<% if comment.class == Journal %>
|
|
|
|
<% if comment.details.any? %>
|
|
|
|
<% details_to_strings(comment.details).each do |string| %>
|
|
|
|
<p><%= string %></p>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<P><%= comment.notes.html_safe %></P>
|
|
|
|
<% else %>
|
|
|
|
<%= comment.content_detail.html_safe %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<div class="orig_reply mb10 mt-10">
|
|
|
|
<div class="reply">
|
|
|
|
<span class="reply-right">
|
2016-11-29 15:29:30 +08:00
|
|
|
<span class="reply_praise_count_<%= comment.id %>">
|
2016-10-27 14:57:12 +08:00
|
|
|
<%= render :partial => "praise_tread/praise", :locals => {:activity => comment, :user_activity_id => comment.id, :type => "reply"} %>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<span style="position: relative" class="fr mr20">
|
|
|
|
<%= link_to(
|
|
|
|
l(:button_reply),
|
|
|
|
{:controller => 'users', :action => 'reply_to', :reply_id => comment.id, :type => 'Issue', :user_activity_id => user_activity_id, :activity_id => activity.id, :is_project => true},
|
|
|
|
:remote => true,
|
|
|
|
:method => 'get',
|
|
|
|
:title => l(:button_reply)) %>
|
|
|
|
<span id="reply_iconup_<%= comment.id %>" class="reply_iconup02" style="display: none"> ︿</span>
|
|
|
|
</span>
|
|
|
|
<%= link_to(
|
|
|
|
l(:button_delete),
|
|
|
|
{:controller => 'issues',:action => 'delete_journal', :id => activity.id,:journal_id=>comment.id, :user_activity_id => user_activity_id, :is_project => true},
|
|
|
|
:method => 'get',
|
|
|
|
:confirm => l(:text_are_you_sure),
|
|
|
|
:remote=>true,
|
|
|
|
:id => "delete_reply_#{activity.id}_#{comment.id}",
|
|
|
|
:class => 'fr mr20 undis',
|
|
|
|
:title => l(:button_delete)
|
|
|
|
) if comment.user_id == User.current.id %>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
<div class="cl"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<p id="reply_message_<%= comment.id%>"></p>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<div class="cl"></div>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<div class="reply-container ml15 borderBottomNone minHeight48">
|
|
|
|
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id %>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %></div>
|
|
|
|
<div class="reply-content mb10">
|
|
|
|
<% if User.current.logged? %>
|
|
|
|
<div nhname='new_message_<%= user_activity_id %>' style="display:none;">
|
|
|
|
<%= form_for('new_form',:url => add_journal_issue_path(activity.id, :user_activity_id => user_activity_id, :is_project => true),:method => "post", :remote => true) do |f| %>
|
|
|
|
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
|
|
|
|
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
|
|
|
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="notes"></textarea>
|
|
|
|
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
|
|
|
<div class="cl"></div>
|
|
|
|
<p nhname='contentmsg_<%= user_activity_id%>'></p>
|
|
|
|
<% end%>
|
|
|
|
</div>
|
|
|
|
<% else %>
|
|
|
|
<%= render :partial => "projects/show_unlogged" %>
|
|
|
|
<% end %>
|
|
|
|
<div class="cl"></div>
|
|
|
|
</div>
|
|
|
|
<div class="cl"></div>
|
|
|
|
</div>
|