From dc12062ab2615a19de17980c290965027b10e9de Mon Sep 17 00:00:00 2001 From: simonbrandhof Date: Mon, 3 Jan 2011 17:45:21 +0000 Subject: [PATCH] do not display the period select-box on treemaps --- .../WEB-INF/app/helpers/application_helper.rb | 7 ++++--- .../WEB-INF/app/views/filters/_treemap.html.erb | 8 ++++---- .../WEB-INF/app/views/filters/treemap.html.erb | 13 ------------- 3 files changed, 8 insertions(+), 20 deletions(-) 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 8bcaabd132b..a3a982e0163 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 @@ -79,17 +79,18 @@ module ApplicationHelper return nil if snapshot.nil? || snapshot.project_snapshot.nil? mode=snapshot.project_snapshot.send "period#{period_index}_mode" mode_param=snapshot.project_snapshot.send "period#{period_index}_param" + date=snapshot.project_snapshot.send "period#{period_index}_date" label=nil if mode if mode=='days' label = "over %s days" % mode_param elsif mode=='version' - label = "since version %s" % mode_param + label = "since version %s (%s)" % [mode_param, l(date)] elsif mode=='previous_analysis' - label = "since previous analysis (%s)" % localize(Date.parse(mode_param)) + label = "since previous analysis (%s)" % l(date) elsif mode=='date' - label = "since #{localize(Date.parse(mode_param))}" + label = "since #{localize(date)}" end end label diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/filters/_treemap.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/filters/_treemap.html.erb index 6feef866da6..f927de3ecb4 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/filters/_treemap.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/filters/_treemap.html.erb @@ -14,13 +14,13 @@ Treemap does not support yet the selection of a period. <% end %> \ No newline at end of file diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/filters/treemap.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/filters/treemap.html.erb index 5c881d2f96e..dbe6685989b 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/filters/treemap.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/filters/treemap.html.erb @@ -14,19 +14,6 @@ <%= select_tag 'color_metric', options_grouped_by_domain(Sonar::TreemapBuilder.color_metrics, @color_metric.key), :id => 'color_metric', :class => 'small', :onchange => "load_treemap(this.form.size_metric.value,this.form.color_metric.value, false);return false;" %> - <% if params[:show_periods]=='true' %> - - - Period: -
- - - <% end %> -- 2.39.5