socialforge/app/views/users/_user_jour_reply.html.erb

40 lines
2.6 KiB
Plaintext

<% parent_jour = JournalsForMessage.where("id = #{reply.m_reply_id}").first %>
<% if parent_jour%>
<div class="mes_box02" id = '<%= reply.id %>'>
<%= link_to image_tag(url_to_avatar(reply.user),:width => '32',:height => '32'), user_path(reply.user),:class => "users_pic_sub fl mr5" %>
<div class=" mes_box02_info fl">
<%= link_to "#{reply.user.nickname}&nbsp;".html_safe, user_path(reply.user),:class => 'course_name fl c_blue02 ', :target => "_blank"%>
<span class="fl c_grey">&nbsp;回复&nbsp;</span>
<%= link_to "#{parent_jour.user.nickname}&nbsp;:&nbsp;".html_safe, user_path(parent_jour.user),:class => 'course_name fl c_blue02 mr5 ', :target => "_blank"%>
<div class="cl">
<%= reply.notes.html_safe %>
</div>
</div>
<span class="c_grey fr">
<%= time_tag(reply.created_on).html_safe%>
</span>
<div class="fr cr">
<%= link_to l(:button_reply),'javascript:void(0);',:nhname=>"sub_reply_btn", :class => "ml5 c_purple" %>
<% if User.current.admin? || reply.user == User.current%>
<%= link_to(l(:label_newfeedback_delete), {:controller => 'words', :action => 'destroy', :object_id => reply, :user_id => reply.user},
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "c_purple ml5", :title => l(:button_delete)) %>
<% end %>
</div>
<div class="cl"></div>
<div nhname='sub_div_form' class="mt10 ml40" style="display:none;">
<form action="<%= url_for(:controller => 'words', :action => 'create_reply') %>" data-remote="true" method="post">
<input id="reference_id" name="reference_id" type="hidden" value="<%= (reply.m_parent_id.nil? || reply.m_parent_id==0 ) ? reply.id : reply.m_parent_id %>">
<input id="reference_user_id" name="reference_user_id" type="hidden" value="<%= reply.user.id %>">
<input id="reference_message_id" name="reference_message_id" type="hidden" value="<%= reply.id %>">
<input id="show_name" name="show_name" type="hidden" value="true">
<textarea name='user_notes' style="display:none;"></textarea>
<p nhname='sub_contentmsg'></p>
<div nhname='sub_toolbar_container' style="float:left;padding-top:3px;"></div>
<a nhname="sub_cancel_btn" href="javascript:void(0);" class="grey_n_btn fr" style="margin-top:3px;">取消</a>
<a nhname="sub_submit_btn" href="javascript:void(0);" class="blue_n_btn fr mr5" style="margin-top:3px;">发布</a>
</form>
<div class="cl"></div>
</div>
<div class="cl"></div>
</div><!--mes_box02 end-->
<% end%>