socialforge/app/views/issues/_issue_replies.html.erb

87 lines
4.5 KiB
Plaintext
Raw Normal View History

2016-03-11 14:39:17 +08:00
<ul>
2016-07-21 10:30:48 +08:00
<% issue.journals.reorder("created_on desc").each do |comment| %>
2016-03-11 14:39:17 +08:00
<script type="text/javascript">
$(function(){
2016-07-21 10:30:48 +08:00
showNormalImage('reply_content_<%= comment.id %>');
autoUrl('reply_content_<%= comment.id %>');
2016-03-11 14:39:17 +08:00
});
</script>
2016-07-21 10:30:48 +08:00
<li class="homepagePostReplyContainer" nhname="reply_rec">
2016-03-11 14:39:17 +08:00
<div class="homepagePostReplyPortrait" >
2016-07-21 10:30:48 +08:00
<%= link_to image_tag(url_to_avatar(comment.user), :width => "33", :height => "33"), user_path(comment.user_id), :alt => "用户头像" %>
2016-03-11 14:39:17 +08:00
</div>
<div class="homepagePostReplyDes">
2016-07-21 10:30:48 +08:00
<%= render :partial => 'users/news_contents', :locals => {:comment => comment}%>
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
<% if comment.details.any? %>
<% details_to_strings(comment.details).each do |string| %>
2016-03-11 14:39:17 +08:00
<p><%= string %></p>
<% end %>
<% end %>
2016-07-21 10:30:48 +08:00
<P><%= comment.notes.html_safe %></P>
2016-03-11 14:39:17 +08:00
</div>
2016-07-21 10:30:48 +08:00
<div class="orig_reply mb10 mt-10">
<div class="reply">
<span class="reply-right">
<span id="reply_praise_count_<%= comment.id %>">
<%= 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 => 'issues', :action => 'reply', :user_id => comment.user_id, :id => issue.id, :journal_id => comment.id},
: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 => issue.id,:journal_id=>comment.id},
:method => :get,
:class => 'fr mr20',
:data => {:confirm => l(:text_are_you_sure)},
:title => l(:button_delete)
) if comment.user_id == User.current.id %>
</span>
<div class="cl"></div>
2016-03-11 14:39:17 +08:00
</div>
</div>
2016-07-21 10:30:48 +08:00
<p id="reply_message_<%= comment.id%>"></p>
2016-03-11 14:39:17 +08:00
</div>
<div class="cl"></div>
</li>
<% end %>
</ul>
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= @issue.id%>">
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(@issue.author_id), :alt => "用户头像" %>
</div>
<div class="homepagePostReplyInputContainer mb10">
2016-06-17 14:31:14 +08:00
<% if User.current.logged? %>
<div nhname='new_message_<%= @issue.id %>' style="display:none;">
<%= form_for('new_form',:url => add_journal_issue_path(@issue.id),:method => "post", :remote => true) do |f| %>
<input type="hidden" name="issue_id" value="<%=@issue.id%>"/>
<div nhname='toolbar_container_<%= @issue.id %>' ></div>
<div class="cl"></div>
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= @issue.id %>' name="notes"></textarea>
<div class="cl"></div>
<div class="mt5 fl">
<%= render :partial => 'attachments/issue_reply', :locals => {:container => @issue} %>
</div>
2016-07-28 15:11:04 +08:00
<span nhname='contentmsg_<%= @issue.id %>' class="fl mt5"></span>
2016-06-17 14:31:14 +08:00
<a id="new_message_submit_btn_<%= @issue.id %>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr mt5" style="display:none;">发送</a>
<div class="cl"></div>
<% end %>
</div>
<% else %>
<%= render :partial => "users/show_unlogged" %>
<% end %>
2016-03-11 14:39:17 +08:00
<div class="cl"></div>
</div>
<div class="cl"></div>
2015-12-17 18:12:38 +08:00
</div>