From 0df594bd5e1752552c50be0901ec570bbcc80131 Mon Sep 17 00:00:00 2001 From: David Gageot Date: Mon, 28 May 2012 14:49:41 +0200 Subject: [PATCH] Remove hack that displays a link to edit filters --- .../webapp/WEB-INF/app/helpers/widget_properties_helper.rb | 7 +++++-- .../app/views/dashboard/_widget_properties.html.erb | 3 --- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/widget_properties_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/widget_properties_helper.rb index 56aa47c93cc..7eaec5b2002 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/widget_properties_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/widget_properties_helper.rb @@ -40,9 +40,12 @@ module WidgetPropertiesHelper user_filters = options_key(value, ::Filter.find(:all, :conditions => ['user_id=?', current_user.id]).sort_by(&:id)) shared_filters = options_key(value, ::Filter.find(:all, :conditions => ['(user_id<>? or user_id is null) and shared=?', current_user.id, true]).sort_by(&:id)) - select_tag definition.key(), option_group('My Filters', user_filters) + option_group('Shared Filters', shared_filters) + filters_combo = select_tag definition.key(), option_group('My Filters', user_filters) + option_group('Shared Filters', shared_filters) + filter_link = link_to message('widget.filter.edit'), {:controller => :filters, :action => :manage}, :class => 'link-action' - else + filters_combo + filter_link + + else hidden_field_tag definition.key() end end 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 fca835f2d4e..4dacfecb94d 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 @@ -18,9 +18,6 @@ <%= 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()) -%>
-- 2.39.5