From: David Gageot Date: Thu, 17 May 2012 16:50:35 +0000 (+0200) Subject: SONAR-3471 Add a link to "My Filters" when editing a Filter widget X-Git-Tag: 3.1~178 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=450545d90c190a256d381227e6e8b3e715f28449;p=sonarqube.git SONAR-3471 Add a link to "My Filters" when editing a Filter widget --- diff --git a/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/core.properties b/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/core.properties index 8ba9903db9f..6a2c59d61b2 100644 --- a/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/core.properties +++ b/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/core.properties @@ -772,6 +772,7 @@ widget.image.description=Shows an image with a link widget.filter.name=Filter widget.filter.description=Shows a pre-configured filter +widget.filter.edit=Edit my filters widget.resource_id=Project diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_widget_properties.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_widget_properties.html.erb index 41288c9f52b..fca835f2d4e 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_widget_properties.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_widget_properties.html.erb @@ -15,9 +15,12 @@ <% widget.java_definition.getWidgetProperties().sort { |w1, w2| natural_comparison(w1.key, w2.key) }.each do |property_def| %> - <%= property_def.key() -%><%= "*" unless property_def.optional()==true -%> + <%= property_def.key() -%><%= "*" unless property_def.optional() -%> <%= property_value_field(property_def, widget.property_text_value(property_def.key())) -%> + <% if property_def.key() == 'filter' %> + <%= link_to message('widget.filter.edit'), {:controller => :filters, :action => :manage}, :class => 'link-action' %> + <% end %>
<%= message("widget." + widget.key + ".param." + property_def.key(), :default => property_def.description()) -%>