From 695e7886256830e95c9545e9f599e1d198a733b4 Mon Sep 17 00:00:00 2001 From: simonbrandhof Date: Fri, 24 Dec 2010 15:37:41 +0000 Subject: [PATCH] improve labels of diff views --- .../core/violationsviewer/client/I18nConstants.java | 2 +- .../main/webapp/WEB-INF/app/helpers/application_helper.rb | 6 +++++- .../main/webapp/WEB-INF/app/helpers/drilldown_helper.rb | 2 +- .../webapp/WEB-INF/app/views/dashboard/_header.html.erb | 2 +- .../webapp/WEB-INF/app/views/drilldown/_rule_priority.erb | 4 ++-- .../WEB-INF/app/views/drilldown/violations.html.erb | 8 ++++---- sonar-server/src/main/webapp/stylesheets/style.css | 5 +---- 7 files changed, 15 insertions(+), 14 deletions(-) diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/client/I18nConstants.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/client/I18nConstants.java index 4d2fa97d408..588852943e6 100644 --- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/client/I18nConstants.java +++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/client/I18nConstants.java @@ -31,7 +31,7 @@ public interface I18nConstants extends com.google.gwt.i18n.client.Constants { @DefaultStringValue("No filters") String noFilters(); - @DefaultStringValue("Added...") + @DefaultStringValue("Time changes...") String addedPeriod(); @DefaultStringValue("Expand:") diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb index a62478a85fc..c5f61b8c6c4 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb @@ -475,6 +475,7 @@ module ApplicationHelper # === Optional parameters # * color: true|false. Default is true. # * index: integer between 1 and 5. By default the index is defined by the dashboard variation select-box + # * style: light|normal. Default is normal (parenthesis + bold) # # === Examples # format_variation('ncloc') @@ -505,7 +506,10 @@ module ApplicationHelper end end end - html="(#{formatted_val})" + if options[:style]!='light' + formatted_val="(#{formatted_val})" + end + html="#{formatted_val}" end end html diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/drilldown_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/drilldown_helper.rb index 8cdfaf522e2..fcab616168a 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/drilldown_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/drilldown_helper.rb @@ -26,7 +26,7 @@ module DrilldownHelper if mode if mode=='days' - label = "Added over %s previous days" % mode_param + label = "Added over %s days" % mode_param elsif mode=='version' label = "Added since version %s" % mode_param elsif mode=='previous_analysis' diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_header.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_header.html.erb index ce47937e37c..8174a2a8e6d 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_header.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_header.html.erb @@ -21,7 +21,7 @@ -
- + <%= period_select_options(@snapshot, 1) -%> <%= period_select_options(@snapshot, 2) -%> <%= period_select_options(@snapshot, 3) -%> @@ -103,10 +103,10 @@ <%= link_to(rule.name, {:overwrite_params => {:rule => rule.key, :sid => nil, :priority => Sonar::RulePriority.to_s(@priority_id)}}, :title => "#{rule.plugin_name}: #{rule.plugin_rule_key}") %> - <%= @period_index ? format_variation(rule_measure, :index => @period_index) : rule_measure.formatted_value -%> + <%= @period_index ? format_variation(rule_measure, :index => @period_index, :style => 'light') : rule_measure.formatted_value -%> - <%= barchart(:width => 70, :percent => (100 * value / max).to_i, :color => '#777') if max>0 %> + <%= barchart(:width => 70, :percent => (100 * value / max).to_i, :color => (@period_index ? '#cc0000' : '#777')) if max>0 %> @@ -159,7 +159,7 @@ <% end %> - <%= @period_index ? format_variation(measure, :index => @period_index) : measure.formatted_value -%> + <%= @period_index ? format_variation(measure, :index => @period_index, :style => 'light') : measure.formatted_value -%> diff --git a/sonar-server/src/main/webapp/stylesheets/style.css b/sonar-server/src/main/webapp/stylesheets/style.css index 2be561e7ec2..765e060731b 100644 --- a/sonar-server/src/main/webapp/stylesheets/style.css +++ b/sonar-server/src/main/webapp/stylesheets/style.css @@ -888,15 +888,12 @@ ul.operations li a { /* ------------------- VARIATIONS ------------------- */ .var { - font-weight: bold; color: #444 !important; } .varb {/* better */ - font-weight: bold; - color: #078C00 !important; + color: #078C00 !important; } .varw {/* worst */ - font-weight: bold; color: #cc0000 !important; } -- 2.39.5