From 415609413d37ad67cf5f774a1cfd95a8fe8100e6 Mon Sep 17 00:00:00 2001 From: David Gageot Date: Mon, 21 May 2012 16:11:02 +0200 Subject: [PATCH] Display widget title for filter widgets added to project dashboard --- .../views/dashboard/_widget_title.html.erb | 26 ++++++++----------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_widget_title.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_widget_title.html.erb index e4c262908e1..ce1adbd2c33 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_widget_title.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_widget_title.html.erb @@ -1,17 +1,13 @@ -<% if @dashboard.global %> - - <% if widget.properties_as_hash['filter'] %> - <% filter = ::Filter.find_by_id(widget.properties_as_hash['filter']) %> -
- <% if filter %> - <%= filter.name -%> - <% if filter.period_index %> - (<%= period_names[filter.period_index-1] -%>) - <% end %> +<% if widget.properties_as_hash['filter'] %> + <% filter = ::Filter.find_by_id(widget.properties_as_hash['filter']) %> +
+ <% if filter %> + <%= filter.name -%> + <% if filter.period_index %> + (<%= period_names[filter.period_index-1] -%>) <% end %> -
- <% elsif @resource && !widget.java_definition.global %> -
<%= @resource.name -%>
- <% end %> - + <% end %> +
+<% elsif @dashboard.global and @resource and !widget.java_definition.global %> +
<%= @resource.name -%>
<% end %> -- 2.39.5