From 5343ee2cfb11672180a6daea8df1b28362481716 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Mon, 15 Dec 2014 09:19:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BD=93=E8=AF=84=E5=88=86=E4=B8=BA0=E5=88=86?= =?UTF-8?q?=E6=97=B6=E6=98=BE=E7=A4=BA=E4=B8=BA=E6=9C=AA=E8=AF=84=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/homework_attach/_homework.html.erb | 2 +- app/views/homework_attach/_review.html.erb | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/app/views/homework_attach/_homework.html.erb b/app/views/homework_attach/_homework.html.erb index 802a021a4..c2b87832c 100644 --- a/app/views/homework_attach/_homework.html.erb +++ b/app/views/homework_attach/_homework.html.erb @@ -32,7 +32,7 @@ <% unless is_student_batch_homework %> <%= l(:label_teacher_score)%>: - <%= homework.t_score.nil? ? l(:label_without_score) : format("%.2f",homework.t_score)%> + <%= (homework.t_score.nil? || (homework.t_score && homework.t_score.to_i == 0)) ? l(:label_without_score) : format("%.2f",homework.t_score)%>    <% end %> diff --git a/app/views/homework_attach/_review.html.erb b/app/views/homework_attach/_review.html.erb index 6663bc6fe..b4508d225 100644 --- a/app/views/homework_attach/_review.html.erb +++ b/app/views/homework_attach/_review.html.erb @@ -26,12 +26,14 @@ <%= format_time(review.created_at) %> - - <%= l(:label_work_rating) %>: - -
- <%= render :partial => 'homework_attach/show_static_star', :locals => {:start_score => review.stars } %> -
+ <% if review.stars && review.stars.to_i > 0%> + + <%= l(:label_work_rating) %>: + +
+ <%= render :partial => 'homework_attach/show_static_star', :locals => {:start_score => review.stars } %> +
+ <% end %>

<%= textilizable jour.nil? ? "" : jour.notes%>