aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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.rb27
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_layout.html.erb6
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/project/exclusions.html.erb (renamed from sonar-server/src/main/webapp/WEB-INF/app/views/project/settings/_exclusions.html.erb)1
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/project/links.html.erb (renamed from sonar-server/src/main/webapp/WEB-INF/app/views/project/settings/_links.html.erb)1
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/project/settings.html.erb4
6 files changed, 34 insertions, 7 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 a61de34dc63..c0754fd8e2f 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
@@ -278,6 +278,8 @@ manual_measures.page=Manual Measures
my_profile.page=My Profile
project_roles.page=Project Roles
project_settings.page=Settings
+project_links.page=Links
+project_exclusions.page=Exclusions
quality_profiles.page=Quality Profiles
reviews.page=Reviews
settings.page=General Settings
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 1ad83db4518..fe22aa979cd 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
@@ -37,6 +37,16 @@ class ProjectController < ApplicationController
redirect_to_default
end
+ def links
+ @project=Project.by_key(params[:id])
+ return access_denied unless is_admin?(@project)
+
+ @snapshot=@project.last_snapshot
+ if !@project.project?
+ redirect_to :action => 'index', :id => params[:id]
+ end
+ end
+
def set_links
project = Project.by_key(params[:project_id])
return access_denied unless is_admin?(project)
@@ -60,9 +70,10 @@ class ProjectController < ApplicationController
project.save!
flash[:notice] = 'Links updated.'
- redirect_to :action => 'settings', :id => project.id
+ redirect_to :action => 'links', :id => project.id
end
+
def settings
@project=Project.by_key(params[:id])
return access_denied unless is_admin?(@project)
@@ -102,6 +113,16 @@ class ProjectController < ApplicationController
end
+ def exclusions
+ @project=Project.by_key(params[:id])
+ return access_denied unless is_admin?(@project)
+
+ @snapshot=@project.last_snapshot
+ if !@project.project? && !@project.module?
+ redirect_to :action => 'index', :id => params[:id]
+ end
+ end
+
def set_exclusions
@project = Project.find(params[:id])
return access_denied unless is_admin?(@project)
@@ -114,7 +135,7 @@ class ProjectController < ApplicationController
Property.set('sonar.exclusions', patterns.collect{|x| x.strip}.join(','), @project.id)
end
flash[:notice]='Filters added'
- redirect_to :action => 'settings', :id => @project.id
+ redirect_to :action => 'exclusions', :id => @project.id
end
def delete_exclusions
@@ -123,7 +144,7 @@ class ProjectController < ApplicationController
Property.clear('sonar.exclusions', @project.id)
flash[:notice]='Filters deleted'
- redirect_to :action => 'settings', :id => @project.id
+ redirect_to :action => 'exclusions', :id => @project.id
end
protected
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 871641fa03a..587c367f4ca 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
@@ -54,6 +54,12 @@
<% if (@project.project? || @project.module?) %>
<li class="<%= 'selected' if request.request_uri.include?('/project/settings') -%>"><a href="<%= ApplicationController.root_context -%>/project/settings/<%= @project.id -%>"><%= message('project_settings.page') -%></a></li>
<% end %>
+ <% if (@project.project? || @project.module?) %>
+ <li class="<%= 'selected' if request.request_uri.include?('/project/exclusions') -%>"><a href="<%= ApplicationController.root_context -%>/project/exclusions/<%= @project.id -%>"><%= message('project_exclusions.page') -%></a></li>
+ <% end %>
+ <% if (@project.project?) %>
+ <li class="<%= 'selected' if request.request_uri.include?('/project/links') -%>"><a href="<%= ApplicationController.root_context -%>/project/links/<%= @project.id -%>"><%= message('project_links.page') -%></a></li>
+ <% 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>
<% end %>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/project/settings/_exclusions.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/project/exclusions.html.erb
index b2208db0f2b..19161bb8b50 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/project/settings/_exclusions.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/project/exclusions.html.erb
@@ -1,4 +1,5 @@
<h1>Exclude sources from code analysis</h1>
+<br/>
<div class="yui-g widget" id="widget_exclusions">
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/project/settings/_links.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/project/links.html.erb
index 8f79d83807e..727687e91d9 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/project/settings/_links.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/project/links.html.erb
@@ -1,4 +1,5 @@
<h1>Project links</h1>
+<br/>
<div class="yui-g widget" id="widget_links">
<% form_for( 'set_links', :url => { :action => 'set_links', :project_id => @project.id } ) do |form|
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/project/settings.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/project/settings.html.erb
index 16f30eb7022..c361a478aeb 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/project/settings.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/project/settings.html.erb
@@ -1,12 +1,8 @@
<div name="settings">
<%= render :partial => 'project/settings/plugins' %>
-<br/>
-<%= render :partial => 'project/settings/exclusions' %>
<% if @project.project? %>
<br/>
-<%= render :partial => 'project/settings/links' %>
-<br/>
<%= render :partial => 'project/settings/delete_project' %>
<% end %>