From 579f1d4d3115248210f70c4335f9833c4d235dcb Mon Sep 17 00:00:00 2001 From: yanxd Date: Fri, 13 Jun 2014 17:32:05 +0800 Subject: [PATCH] start align-center --- app/views/contests/show_attendingcontest.html.erb | 3 ++- app/views/softapplications/show.html.erb | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/views/contests/show_attendingcontest.html.erb b/app/views/contests/show_attendingcontest.html.erb index 8a567bd53..d919baffe 100644 --- a/app/views/contests/show_attendingcontest.html.erb +++ b/app/views/contests/show_attendingcontest.html.erb @@ -298,8 +298,9 @@
+ <% score = c_softapplication.softapplication.average(:quality).try(:avg).try(:round, 2).to_f %> <%= l(:label_final_scores) %> - :<%= c_softapplication.softapplication.average(:quality).try(:avg).try(:round, 2).to_i.to_s %> + :<%= format("%.2f" , score) %> 分 diff --git a/app/views/softapplications/show.html.erb b/app/views/softapplications/show.html.erb index e41ecb842..b5e3e951c 100644 --- a/app/views/softapplications/show.html.erb +++ b/app/views/softapplications/show.html.erb @@ -79,9 +79,10 @@ <% end %>
-
-
<%=l(:label_final_scores)%>
-
<%= @softapplication.average(:quality).try(:avg).try(:round, 2).to_i.to_s %>分
+
+
<%=l(:label_final_scores)%>
+ <% score = @softapplication.average(:quality).try(:avg).try(:round, 2).to_f %> +
<%= format("%.2f" , score) %>分
<%= rating_for @softapplication, :static => true, dimension: :quality, class: 'rateable div_inline' %>