当评分为0分时显示为未评分

This commit is contained in:
sw 2014-12-15 09:19:20 +08:00
parent 9ffe32e121
commit 5343ee2cfb
2 changed files with 9 additions and 7 deletions

View File

@ -32,7 +32,7 @@
<% unless is_student_batch_homework %> <% unless is_student_batch_homework %>
<%= l(:label_teacher_score)%>: <%= l(:label_teacher_score)%>:
<span class="c_red"> <span class="c_red">
<%= 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)%>
</span> </span>
&nbsp;&nbsp; &nbsp;&nbsp;
<% end %> <% end %>

View File

@ -26,12 +26,14 @@
<%= format_time(review.created_at) %> <%= format_time(review.created_at) %>
</span> </span>
<span style="font-weight:bold; color:#a6a6a6; float: right;"> <span style="font-weight:bold; color:#a6a6a6; float: right;">
<span style="float:left"> <% if review.stars && review.stars.to_i > 0%>
<%= l(:label_work_rating) %> <span style="float:left">
</span> <%= l(:label_work_rating) %>
<div class="ping_star"> </span>
<%= render :partial => 'homework_attach/show_static_star', :locals => {:start_score => review.stars } %> <div class="ping_star">
</div> <%= render :partial => 'homework_attach/show_static_star', :locals => {:start_score => review.stars } %>
</div>
<% end %>
</span> </span>
<div class="cl"></div> <div class="cl"></div>
<p><%= textilizable jour.nil? ? "" : jour.notes%></p> <p><%= textilizable jour.nil? ? "" : jour.notes%></p>