]> source.dussan.org Git - sonarqube.git/commitdiff
Remove hack that displays a link to edit filters
authorDavid Gageot <david@gageot.net>
Mon, 28 May 2012 12:49:41 +0000 (14:49 +0200)
committerDavid Gageot <david@gageot.net>
Mon, 28 May 2012 12:49:41 +0000 (14:49 +0200)
sonar-server/src/main/webapp/WEB-INF/app/helpers/widget_properties_helper.rb
sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_widget_properties.html.erb

index 56aa47c93cce2060181b8efb132c0f236b38eea4..7eaec5b20020400dafbe197ba1c0a0ee6a0bc8d5 100644 (file)
@@ -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
index fca835f2d4eab351549fe4348df878fb6735402e..4dacfecb94d69ab0bf73e44f8e84f035434d5b36 100644 (file)
@@ -18,9 +18,6 @@
         <td class="form-key-cell"><%= property_def.key() -%><%= "*" unless property_def.optional() -%></td>
         <td class="form-val-cell" id="row_<%= property_def.key() -%>">
           <%= 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 %>
           <div class="form-val-note">
             <%= message("widget." + widget.key + ".param." + property_def.key(), :default => property_def.description()) -%>
           </div>