2014-11-03 14:47:28 +08:00
|
|
|
|
<% jours.nil? || jours.count == 0 || jours.each do |jour| %>
|
2014-11-02 16:15:14 +08:00
|
|
|
|
<div class="ping_C">
|
2014-11-03 14:47:28 +08:00
|
|
|
|
<div class="ping_dispic">
|
|
|
|
|
<% if show_name %>
|
|
|
|
|
<%= link_to image_tag(url_to_avatar(jour.user)) , user_path(jour.user), :target =>"_blank" %>
|
|
|
|
|
<% else %>
|
|
|
|
|
<a><%= image_tag(url_to_avatar(nil))%></a>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
2014-11-02 16:15:14 +08:00
|
|
|
|
<div class="ping_discon">
|
|
|
|
|
<div class="ping_distop">
|
2014-11-04 14:49:36 +08:00
|
|
|
|
<span>
|
|
|
|
|
<% if show_name %>
|
2014-12-02 16:55:16 +08:00
|
|
|
|
<%= link_to jour.user, user_path(jour.user),:style => " font-weight:bold; color:#15bccf; margin-right:5px; background:none;", :target => "_blank"%>
|
2014-11-04 14:49:36 +08:00
|
|
|
|
<% else%>
|
2014-12-02 16:55:16 +08:00
|
|
|
|
<span style=" font-weight:bold; color:#15bccf; margin-right:5px; background:none;"><%= l(:label_anonymous) %></span>
|
2014-11-04 14:49:36 +08:00
|
|
|
|
<% end %>
|
|
|
|
|
</span>
|
2014-12-02 16:55:16 +08:00
|
|
|
|
<span style="color:#a6a6a6; margin-right:30px; margin-left:10px;"><%= format_time(jour.created_on) %></span>
|
|
|
|
|
<span style="font-weight:bold; color:#a6a6a6; float: right;">
|
2014-11-03 14:47:28 +08:00
|
|
|
|
<% if show_score %>
|
2014-11-05 10:05:43 +08:00
|
|
|
|
<span style="float:left">
|
|
|
|
|
<%= l(:label_work_rating) %>:
|
|
|
|
|
</span>
|
2014-12-02 16:55:16 +08:00
|
|
|
|
<div class="ping_star">
|
|
|
|
|
<% star = get_homework_score(jour.user,@homework)%>
|
|
|
|
|
<%= render :partial => 'homework_attach/show_static_star', :locals => {:start_score => star } %>
|
|
|
|
|
</div>
|
|
|
|
|
|
2014-11-03 14:47:28 +08:00
|
|
|
|
<% end %>
|
2014-11-02 17:26:28 +08:00
|
|
|
|
</span>
|
2014-11-02 16:15:14 +08:00
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<p><%= textilizable jour.notes%></p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="ping_disfoot">
|
|
|
|
|
<% ids = 'project_respond_form_'+ jour.id.to_s%>
|
|
|
|
|
<span>
|
2014-11-04 14:49:36 +08:00
|
|
|
|
<% if (jour.user==User.current|| User.current.admin?) && show_name %>
|
2014-11-03 17:31:04 +08:00
|
|
|
|
<%= link_to(l(:label_bid_respond_delete), {:controller => 'homework_attach', :action => 'destroy_jour', :object_id => jour, :user_id => jour.user,:jour_id =>@homework.id },
|
2014-11-02 16:15:14 +08:00
|
|
|
|
:remote => true, :confirm => l(:text_are_you_sure), :title => l(:button_delete)) %>
|
|
|
|
|
<% end %>
|
2014-11-03 17:31:04 +08:00
|
|
|
|
<%= link_to l(:label_projects_feedback_respond),'',
|
2014-11-04 14:49:36 +08:00
|
|
|
|
{:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea'), ''); $('##{ids} textarea') ;return false;"} ##{l(:label_reply_plural)} #{jour.user.name}:
|
2014-11-03 17:31:04 +08:00
|
|
|
|
%>
|
|
|
|
|
|
2014-11-02 16:15:14 +08:00
|
|
|
|
</span>
|
|
|
|
|
</div>
|
2014-11-03 17:31:04 +08:00
|
|
|
|
<div id='<%= ids %>' class="respond-form">
|
2014-11-04 14:49:36 +08:00
|
|
|
|
<%= render :partial => 'words/new_respond', :locals => {:journal => jour, :m_reply_id => jour,:show_name=> show_name} %>
|
2014-11-03 17:31:04 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div style="clear: both;"></div>
|
|
|
|
|
<div>
|
2014-11-26 16:29:17 +08:00
|
|
|
|
<%= render :partial => "words/journal_reply", :locals => {:journal => jour,:show_name=> show_name} %>
|
2014-11-03 17:31:04 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
2014-11-02 16:15:14 +08:00
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
2014-11-03 15:28:54 +08:00
|
|
|
|
<% end %>
|
|
|
|
|
<% if is_jour%>
|
2014-11-03 17:31:04 +08:00
|
|
|
|
<div class="dis">
|
|
|
|
|
<ul class="wlist"><%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => true, :flag => true%></ul>
|
|
|
|
|
</div>
|
2014-11-03 14:47:28 +08:00
|
|
|
|
<% end %>
|