2014-10-23 11:30:34 +08:00
|
|
|
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
|
|
|
|
<% if @jour.size >0 %>
|
|
|
|
<ul class="message-for-user">
|
|
|
|
<% for journal in @jour%>
|
|
|
|
<li id='word_li_<%=journal.id.to_s%>' class="outer-message-for-user">
|
|
|
|
<span class="portrait"><%= image_tag(url_to_avatar(journal.user), :class => "avatar") %></span>
|
|
|
|
<span class="body">
|
|
|
|
<span class="user"><%= link_to journal.user, user_path(journal.user)%></span>
|
|
|
|
<%= textilizable journal.notes%>
|
|
|
|
<span class="font_lighter"> <%= l :label_update_time %>: <%= format_time journal.created_on %></span>
|
|
|
|
<% id = 'project_respond_form_'+journal.id.to_s%>
|
|
|
|
<span>
|
|
|
|
<% if reply_allow %>
|
|
|
|
<%= link_to l(:label_projects_feedback_respond),'#',
|
|
|
|
{:focus => 'project_respond',
|
|
|
|
:onclick => "toggleAndSettingWordsVal($('##{id}'),
|
|
|
|
$('##{id} textarea'),
|
|
|
|
'#{l(:label_reply_plural)} #{journal.user.name}: ');
|
|
|
|
return false;"} %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% if User.current.logged? %>
|
|
|
|
<% if journal.user_id==User.current.id|| User.current.admin? %>
|
|
|
|
<%= link_to(l(:button_delete),{:controller => 'words', :action => 'destroyJournal', :object_id => journal.id, :project_id=>@project.id, :page=>@page},
|
|
|
|
:remote => true, :title => l(:button_delete), :confirm => l(:text_are_you_sure), :method => 'delete', :class => "delete") %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
<div style="clear: both;"></div>
|
|
|
|
<% if reply_allow %>
|
|
|
|
<div id='<%= id %>' class="respond-form">
|
|
|
|
<%= render :partial => 'words/new_respond', :locals => {:journal => journal, :m_reply_id => journal} %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<div style="clear: both;"></div>
|
|
|
|
<div>
|
|
|
|
<%= render :partial => "words/journal_reply", :locals => {:journal => journal } %>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<div class="pagination" style="float:left;">
|
|
|
|
<ul>
|
|
|
|
<%= pagination_links_full(@feedback_pages,@feedback_count, :per_page_links => false){|text, parameters, options|
|
|
|
|
link_to text, project_feedback_path(@project,parameters.merge(:q => params[:q])) }%>
|
|
|
|
</ul>
|
2014-08-21 08:58:48 +08:00
|
|
|
</div>
|