bigdir/app/views/homework_attach/_journal_reply_items.html.erb

34 lines
1.7 KiB
Plaintext

<% reply_allow = JournalsForMessage.create_by_user? User.current %>
<% ids_r = 'reply_respond_form_'+ reply.id.to_s %>
<li id='word_li_<%=reply.id.to_s%>' onmouseover="$('#<%= ids_r %>').show()" onmouseout="$('#<%= ids_r %>').hide()">
<span class="portrait">
<%= image_tag url_to_avatar(reply.user), :class => "avatar-3" %>
</span>
<div class="message-body">
<% id = 'project_respond_form_'+ reply.id.to_s %>
<p>
<span><%= link_to reply.user.name, user_path(reply.user) %>:&nbsp;</span>
<span class="message-notes"> <%= reply.notes %></span>
</p>
<p>
<span class="time"><%= format_time reply.created_on %></span>
<span style="display: none; margin-left: 4px;" id='<%=ids_r%>' >
<% if reply_allow %>
<%= link_to l(:label_projects_feedback_respond),'',
{:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{id}'), $('##{id} textarea'), '#{l(:label_reply_plural)} #{m_reply_id.user.name}: '); return false;"}
%>
<% end %>
<% if @user == User.current || User.current.admin? || reply.user.id == User.current.id %>
<%= link_to(l(:label_newfeedback_delete), {:controller => 'homework_attach', :action => 'destroy_jour', :object_id => reply, :user_id => reply.user},
:remote => true, :confirm => l(:text_are_you_sure), :title => l(:button_delete)) %>
<% end %>
</span>
</p>
</div>
<div id='<%=id %>' class="respond-form">
<% if reply_allow %>
<%= render :partial => "add_jour_reply", :locals => {:journal => journal, :m_reply_id => m_reply_id} %>
<% end %>
</div>
<div style="clear: both;"></div>
</li>