2014-12-04 18:01:53 +08:00
|
|
|
|
<!-- 评论列表,包括老师评论和学生匿评 -->
|
2014-12-05 10:03:49 +08:00
|
|
|
|
<% unless review_list.nil?%>
|
2014-12-04 18:01:53 +08:00
|
|
|
|
<% review_list.each do |review|%>
|
|
|
|
|
<% user = review.rater %>
|
2014-12-05 10:03:49 +08:00
|
|
|
|
<% jour = get_homework_review @homework,show_jour,user %>
|
2014-12-04 18:01:53 +08:00
|
|
|
|
<div class="ping_C">
|
|
|
|
|
<div class="ping_dispic">
|
|
|
|
|
<% if show_name %>
|
|
|
|
|
<%= link_to image_tag(url_to_avatar(user)) , user_path(user), :target =>"_blank" %>
|
|
|
|
|
<% else %>
|
|
|
|
|
<a><%= image_tag(url_to_avatar(nil))%></a>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="ping_discon">
|
|
|
|
|
<div class="ping_distop">
|
|
|
|
|
<span>
|
|
|
|
|
<% if show_name %>
|
2015-04-27 20:25:28 +08:00
|
|
|
|
<%= link_to user, user_path(user),:style => " font-weight:bold; color:#15bccf; margin-right:5px; background:none;max-width: 40px;overflow: hidden;", :target => "_blank", title: user%>
|
2014-12-04 18:01:53 +08:00
|
|
|
|
<% else%>
|
|
|
|
|
<span style=" font-weight:bold; color:#15bccf; margin-right:5px; background:none;">
|
|
|
|
|
<%= l(:label_anonymous) %>
|
|
|
|
|
</span>
|
|
|
|
|
<% end %>
|
|
|
|
|
</span>
|
2015-05-07 16:12:56 +08:00
|
|
|
|
<span style="color:#a6a6a6; margin-right:20px; margin-left:10px;">
|
2014-12-04 18:01:53 +08:00
|
|
|
|
<%= format_time(review.created_at) %>
|
|
|
|
|
</span>
|
|
|
|
|
<span style="font-weight:bold; color:#a6a6a6; float: right;">
|
2015-05-06 16:55:59 +08:00
|
|
|
|
<% if review.stars%>
|
2014-12-15 09:19:20 +08:00
|
|
|
|
<span style="float:left">
|
|
|
|
|
<%= l(:label_work_rating) %>:
|
|
|
|
|
</span>
|
|
|
|
|
<div class="ping_star">
|
|
|
|
|
<%= render :partial => 'homework_attach/show_static_star', :locals => {:start_score => review.stars } %>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
2014-12-04 18:01:53 +08:00
|
|
|
|
</span>
|
|
|
|
|
<div class="cl"></div>
|
2015-04-27 17:50:03 +08:00
|
|
|
|
<% notes = textilizable(jour.nil? ? "" : jour.notes)%>
|
|
|
|
|
<%= notes.empty? ? "<p></p>".html_safe : notes%>
|
2014-12-04 18:01:53 +08:00
|
|
|
|
</div>
|
2015-04-28 12:21:35 +08:00
|
|
|
|
<div class="cl"></div>
|
2014-12-04 18:01:53 +08:00
|
|
|
|
<% unless jour.nil? %>
|
2015-04-28 12:21:35 +08:00
|
|
|
|
<% unless jour.attachments.empty?%>
|
|
|
|
|
<%= render :partial => 'attachments/homework_jour_link',
|
2015-04-28 14:37:25 +08:00
|
|
|
|
:locals => {:attachments => jour.attachments} %>
|
2015-04-28 12:21:35 +08:00
|
|
|
|
<% end %>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
|
2014-12-04 18:01:53 +08:00
|
|
|
|
<% ids = 'project_respond_form_'+ jour.id.to_s%>
|
|
|
|
|
<div class="ping_disfoot">
|
|
|
|
|
<span>
|
2015-03-10 09:45:36 +08:00
|
|
|
|
<%= link_to l(:label_newfeedback_respond),'',
|
2014-12-04 18:01:53 +08:00
|
|
|
|
{:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea'), ''); $('##{ids} textarea') ;return false;"}
|
|
|
|
|
%>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div id='<%= ids %>' class="respond-form">
|
|
|
|
|
<%= render :partial => 'words/new_respond', :locals => {:journal => jour, :m_reply_id => jour,:show_name=> show_name} %>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="clear: both;"></div>
|
|
|
|
|
<div>
|
|
|
|
|
<%= render :partial => "words/journal_reply", :locals => {:journal => jour,:show_name=> show_name} %>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|