From: David Gageot Date: Mon, 21 May 2012 14:11:02 +0000 (+0200) Subject: Display widget title for filter widgets added to project dashboard X-Git-Tag: 3.1~151 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=415609413d37ad67cf5f774a1cfd95a8fe8100e6;p=sonarqube.git Display widget title for filter widgets added to project dashboard --- 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 %>