From 58a1897e9b2507f00efbe3aca41bcf7e59ef644f Mon Sep 17 00:00:00 2001 From: Fabrice Bellingard Date: Wed, 23 May 2012 09:28:37 +0200 Subject: [PATCH] SONAR-2706 Fix issue with button message --- .../WEB-INF/app/controllers/project_reviews_controller.rb | 1 - .../webapp/WEB-INF/app/views/project_reviews/_review.html.erb | 2 +- .../WEB-INF/app/views/project_reviews/screens/_comment.html.erb | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_reviews_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_reviews_controller.rb index 9d6a7f44b52..f92c072c0dd 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_reviews_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_reviews_controller.rb @@ -69,7 +69,6 @@ class ProjectReviewsController < ApplicationController def show @review = Review.find(params[:id], :include => ['project']) @resource = @review.project - @review_commands = Review.available_commands_for(Api::ReviewContext.new(:review => @review, :user => current_user)) if has_role?(:user, @resource) render :partial => 'project_reviews/view' else diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/project_reviews/_review.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/project_reviews/_review.html.erb index c4d73c97430..3b1ba353dce 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/project_reviews/_review.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/project_reviews/_review.html.erb @@ -52,7 +52,7 @@ screens = review.violation.available_java_screens(current_user) screens.each do |screen| %> - <%= button_to_remote screen.getCommandKey(), + <%= button_to_remote message("reviews.command.#{screen.getCommandKey()}.button"), :url => {:controller => "project_reviews", :action => "screen", :id => review.id, :command => screen.getCommandKey()}, :update => "actionForm", :complete => "$('actionButtons').remove();$('actionForm').show();$('selectSeverity').focus();" -%> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/project_reviews/screens/_comment.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/project_reviews/screens/_comment.html.erb index ef91c0ce0ae..f363b4f11ca 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/project_reviews/screens/_comment.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/project_reviews/screens/_comment.html.erb @@ -4,7 +4,7 @@ <%= submit_to_remote "submit_btn", - @screen.getCommandKey(), + message("reviews.command.#{@screen.getCommandKey()}.submit"), :url => {:action => 'execute'}, :html => {:id => "submit_btn"}, :before => "$('loading').show();", -- 2.39.5