aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server/src/main
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 /sonar-server/src/main
parentebb9325079c73ecdd22386bc198e05c27e77eb4f (diff)
downloadsonarqube-d82c3640f1757967fd97800ccca366399d1737fd.tar.gz
sonarqube-d82c3640f1757967fd97800ccca366399d1737fd.zip
Enable history deletion on views
Diffstat (limited to 'sonar-server/src/main')
-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
2 files changed, 2 insertions, 2 deletions
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 %>