]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-2706 Fix issue with button message
authorFabrice Bellingard <bellingard@gmail.com>
Wed, 23 May 2012 07:28:37 +0000 (09:28 +0200)
committerFabrice Bellingard <bellingard@gmail.com>
Wed, 23 May 2012 07:55:20 +0000 (09:55 +0200)
sonar-server/src/main/webapp/WEB-INF/app/controllers/project_reviews_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/views/project_reviews/_review.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/project_reviews/screens/_comment.html.erb

index 9d6a7f44b52cd0f0cb2ede4eddb45ee1ccfde297..f92c072c0dd9af3f24a3ceeeddd778860a97f0c1 100644 (file)
@@ -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
index c4d73c97430d1f9fcbe6e3a50fecd35248d7afbd..3b1ba353dce8c458bb165c2dc41fb01d9763e091 100644 (file)
@@ -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();" -%>
index ef91c0ce0ae012aa2e6adf4378c669f85d431dbf..f363b4f11ca949b3e7011e3ba851e3d6c092d850 100644 (file)
@@ -4,7 +4,7 @@
 
   <textarea id="actionText" rows="4" name="text" style="width: 100%"></textarea>
   <%= submit_to_remote "submit_btn",
-                       @screen.getCommandKey(),
+                       message("reviews.command.#{@screen.getCommandKey()}.submit"),
                        :url => {:action => 'execute'},
                        :html => {:id => "submit_btn"},
                        :before => "$('loading').show();",