diff options
author | Fabrice Bellingard <bellingard@gmail.com> | 2011-04-26 15:37:57 +0200 |
---|---|---|
committer | Fabrice Bellingard <bellingard@gmail.com> | 2011-04-26 18:46:47 +0200 |
commit | 4cb4cd79d731e41177505d6f339ecbbf7dea3332 (patch) | |
tree | 6ce5194940d224a97a74feaf8a221641f6a60496 /sonar-server | |
parent | b17802d66f0d7d75ca7a8581f146e5147e1e56e9 (diff) | |
download | sonarqube-4cb4cd79d731e41177505d6f339ecbbf7dea3332.tar.gz sonarqube-4cb4cd79d731e41177505d6f339ecbbf7dea3332.zip |
SONAR-1973 Rework action link positions
Diffstat (limited to 'sonar-server')
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/views/resource/_violation.html.erb | 14 | ||||
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_review.html.erb | 2 |
2 files changed, 12 insertions, 4 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_violation.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_violation.html.erb index a6adaa5e811..6dd08dd9fb6 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_violation.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_violation.html.erb @@ -35,13 +35,21 @@ <% if current_user %> <span class="actions" id="vActions<%= violation.id -%>"> <%= image_tag("sep12.png") -%> - + <% if violation.review %> + <%= link_to_remote (violation.review && violation.review.assignee_id ? "Reassign" : "Assign"), :url => { :controller => "reviews", :action => "violation_assign_form", :violation_id => violation.id}, :update => "vActions" + violation.id.to_s, :complete => "$('vActions" + violation.id.to_s + "').show();$('assignee_id').focus();" -%> + <% else %> + + <%= link_to_remote "Review", + :url => { :controller => "reviews", :action => "violation_comment_form", :id => violation.id }, + :update => "reviewForm" + violation.id.to_s, + :complete => "$('vActions#{violation.id}').hide();$('reviewForm" + violation.id.to_s + "').show();$('commentText" + violation.id.to_s + "').focus()" -%> + <% end %> + - <%= link_to_remote (violation.false_positive? ? "Unflag false-positive" : "Flag as false-positive"), :url => { :controller => "reviews", :action => "violation_false_positive_form", :id => violation.id, :false_positive => !violation.false_positive? }, :update => "reviewForm" + violation.id.to_s, @@ -97,7 +105,7 @@ -<% if current_user %> +<% if current_user && violation.review %> <div style="padding: 5px" id="commentAction<%= violation.id -%>"> <%= link_to_remote "Add comment", :url => { :controller => "reviews", :action => "violation_comment_form", :id => violation.id }, diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_review.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_review.html.erb index 80a5c613d14..f9b6a8cd35a 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_review.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_review.html.erb @@ -30,7 +30,7 @@ Created by: </td> <td class="val"> - <%= h(review.user.name) -%> at <%= l(review.created_at) -%> + <%= h(review.user.name) -%> on <%= l(review.created_at, :format => :long) -%> </td> </tr> <% if review.rule %> |