aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2011-09-15 16:28:03 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2011-09-15 16:28:03 +0200
commitd82c3640f1757967fd97800ccca366399d1737fd (patch)
treef124e3ad7ce020254dc572e692df2610ccf4ae2e
parentebb9325079c73ecdd22386bc198e05c27e77eb4f (diff)
downloadsonarqube-d82c3640f1757967fd97800ccca366399d1737fd.tar.gz
sonarqube-d82c3640f1757967fd97800ccca366399d1737fd.zip
Enable history deletion on views
-rw-r--r--plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/core.properties2
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/controllers/project_controller.rb2
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_layout.html.erb2
3 files changed, 3 insertions, 3 deletions
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 148bcf9b14c..39bb4e1b10a 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
@@ -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}"?
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_controller.rb
index 4ecfd32f937..3e4c077a09c 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_controller.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_controller.rb
@@ -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
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_layout.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_layout.html.erb
index 45f98b50d26..f9361455a25 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_layout.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_layout.html.erb
@@ -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 %>