]> source.dussan.org Git - sonarqube.git/commitdiff
Enable history deletion on views
authorSimon Brandhof <simon.brandhof@gmail.com>
Thu, 15 Sep 2011 14:28:03 +0000 (16:28 +0200)
committerSimon Brandhof <simon.brandhof@gmail.com>
Thu, 15 Sep 2011 14:28:03 +0000 (16:28 +0200)
plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/core.properties
sonar-server/src/main/webapp/WEB-INF/app/controllers/project_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_layout.html.erb

index 148bcf9b14c765d178e93097d18b2087ee7b976f..39bb4e1b10a03be470717b08e411adcb3f00e54e 100644 (file)
@@ -612,7 +612,7 @@ project_history.col.action=Action
 project_history.delete=Delete
 project_history.last_snapshot=Last snapshot
 project_history.delete_snapshot=Delete snapshot
-project_history.snapshot_deleted=The snapshot will be deleted.
+project_history.snapshot_deleted=The snapshot is deleted.
 project_history.are_you_sure_delete_snapshot_x=Are you sure you want to delete the snapshot created on "{0}"?
 
 
index 4ecfd32f937d47e4b8b8d6cc78164e1149d6726c..3e4c077a09c6f9e6b11a88410eb3632dc82eb327 100644 (file)
@@ -51,7 +51,7 @@ class ProjectController < ApplicationController
     @project=Project.by_key(params[:id])
     return access_denied unless is_admin?(@project)
 
-    if !@project.project?
+    if !(@project.project? || @project.view? || @project.subview?)
       redirect_to :action => 'index', :id => params[:id]
     end
     
index 45f98b50d2655336bec92b0b09c57fff632bab6a..f9361455a2523ab7c093361a9e2c89617e5938ac 100644 (file)
@@ -62,9 +62,9 @@
             <% end %>
             <% if (@project.project? || @project.view? || @project.subview?) %>
               <li class="<%= 'selected' if request.request_uri.include?('/project_roles') -%>"><a href="<%= ApplicationController.root_context -%>/project_roles/index?resource=<%= @project.id -%>"><%= message('project_roles.page') -%></a></li>
+              <li class="<%= 'selected' if request.request_uri.include?('/project/history') -%>"><a href="<%= ApplicationController.root_context -%>/project/history/<%= @project.id -%>"><%= message('project_history.page') -%></a></li>
             <% end %>
             <% if (@project.project?) %>
-              <li class="<%= 'selected' if request.request_uri.include?('/project/history') -%>"><a href="<%= ApplicationController.root_context -%>/project/history/<%= @project.id -%>"><%= message('project_history.page') -%></a></li>
               <li class="<%= 'selected' if request.request_uri.include?('/project/deletion') -%>"><a href="<%= ApplicationController.root_context -%>/project/deletion/<%= @project.id -%>"><%= message('project_deletion.page') -%></a></li>
             <% end %>
           <% end %>