From a8a489d5da78514bb3c6bcb7ea170786a8da27cf Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Vilain Date: Wed, 17 Jul 2013 09:54:36 +0200 Subject: [PATCH] SONAR-4453 Adjusted labels and presentation for bulk permission changes --- .../resources/org/sonar/l10n/core.properties | 4 ++- .../app/controllers/roles_controller.rb | 1 - .../views/roles/_apply_template_form.html.erb | 26 ++++++++++++++----- .../WEB-INF/app/views/roles/projects.html.erb | 2 +- 4 files changed, 23 insertions(+), 10 deletions(-) diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties b/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties index 54e5ec46026..7887d6ab388 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties @@ -2257,8 +2257,10 @@ projects_role.user=Users projects_role.user.desc=Ability to browse the measures and to create/edit issues on the project. projects_role.codeviewer=Code Viewers projects_role.codeviewer.desc=Ability to view the source code of the project. -projects_role.apply_template=Apply permission template +projects_role.bulk_change=Bulk Change projects_role.apply_template.form.title=Apply permission template +projects_role.no_projects=There are currently no results to apply the permission template to. + #------------------------------------------------------------------------------ diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/roles_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/roles_controller.rb index b0eb5c091d4..5fb870f2d37 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/roles_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/roles_controller.rb @@ -77,7 +77,6 @@ class RolesController < ApplicationController # GET /roles/apply_template_form?projects=&qualifier= def apply_template_form - bad_request('There are currently no results to apply the permission template to') if params[:projects].blank? @permission_templates = Internal.permission_templates.selectAllPermissionTemplates().collect {|pt| [pt.name, pt.key]} render :partial => 'apply_template_form', :locals => {:components => params[:projects], :qualifier => params[:qualifier] || 'TRK'} end diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/roles/_apply_template_form.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/roles/_apply_template_form.html.erb index 4f76e4f9519..659ff4d47ef 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/roles/_apply_template_form.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/roles/_apply_template_form.html.erb @@ -1,19 +1,31 @@
- + <% unless components.nil? %> + + <% end %>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/roles/projects.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/roles/projects.html.erb index 8fc851b830b..5eab3af0fb9 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/roles/projects.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/roles/projects.html.erb @@ -31,7 +31,7 @@
  • - <%= link_to message('projects_role.apply_template'), {:action => :apply_template_form, :projects => @projects.collect {|proj| proj.id}, :qualifier => @qualifier}, + <%= link_to message('projects_role.bulk_change'), {:action => :apply_template_form, :projects => @projects.collect {|proj| proj.id}, :qualifier => @qualifier}, :id => 'apply-template-modal', :class => 'open-modal link-action' %>
-- 2.39.5