]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4913 Fix regression: show edit button only when there is selected filter
authorStas Vilchik <vilchiks@gmail.com>
Thu, 6 Mar 2014 16:39:45 +0000 (17:39 +0100)
committerStas Vilchik <vilchiks@gmail.com>
Thu, 6 Mar 2014 16:39:45 +0000 (17:39 +0100)
sonar-server/src/main/webapp/WEB-INF/app/views/measures/_search_header.html.erb

index af15fe6d395704b0fd4cb90b5bd4fac8cc346bff..c1b7930537a14fd8968f29f0c44bcf1132198dce 100644 (file)
@@ -37,7 +37,7 @@
           <button id="save-as" onclick="openModalWindow('<%= url_for params.merge({:action => 'save_as_form', :id => @filter.id}) -%>');"><%= message('save_as') -%></button>
         <% end %>
 
-        <% if @filter.owner?(current_user) %>
+        <% if @filter.id && @filter.owner?(current_user) %>
           <button id="edit-filter" onclick="openModalWindow('<%= url_for :action => 'edit_form', :id => @filter.id -%>');"><%= message('edit') -%></button>
         <% end %>
       <% end %>