From 77387778d8afc87339dc8419a9b39f8f66d9668c Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 29 Jun 2016 14:08:30 +0800 Subject: [PATCH] some css --- app/helpers/quality_analysis_helper.rb | 2 +- app/views/quality_analysis/_show.html.erb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/helpers/quality_analysis_helper.rb b/app/helpers/quality_analysis_helper.rb index d2948e02b..2a7d350e7 100644 --- a/app/helpers/quality_analysis_helper.rb +++ b/app/helpers/quality_analysis_helper.rb @@ -3,7 +3,7 @@ module QualityAnalysisHelper def sqale_rating_status val arr = [] - if val > 0 && val < 5 + if val < 5 arr << "很好" arr << "b_green2" elsif val. > 5 && val < 10 diff --git a/app/views/quality_analysis/_show.html.erb b/app/views/quality_analysis/_show.html.erb index 0a522df52..b1588edeb 100644 --- a/app/views/quality_analysis/_show.html.erb +++ b/app/views/quality_analysis/_show.html.erb @@ -13,8 +13,8 @@

质量等级

-

<%= @complexity["msr"][9].nil? ? 0 : @complexity["msr"][9]["frmt_val"] %> - borderRadius"><%= @complexity["msr"][9].nil? ? 0 : sqale_rating_status(@complexity["msr"][9]["val"].to_i)[0] %>

+

<%= @complexity["msr"][9].nil? ? "A" : @complexity["msr"][9]["frmt_val"] %> + borderRadius"><%= @complexity["msr"][9].blank? ? "henhao" : sqale_rating_status(@complexity["msr"][9]["val"].to_i)[0] %>

@@ -41,7 +41,7 @@ <% end %>
质量等级<%=@complexity["msr"][9].nil? ? 0 : score_sqale_rating(@complexity["msr"][9]["val"].to_i) %>/5分 - 可定性评价为:质量<%=@complexity["msr"][9].nil? ? 0 : sqale_rating_status(@complexity["msr"][9]["val"])[0] %>
+ 可定性评价为:质量<%=@complexity["msr"][9].nil? ? "henhao" : sqale_rating_status(@complexity["msr"][9]["val"])[0] %>
技术债务<%=@complexity["msr"][8].nil? ? 0 : @complexity["msr"][8]["frmt_val"] %> 查看详情