aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server
diff options
context:
space:
mode:
authorFabrice Bellingard <bellingard@gmail.com>2011-04-28 10:00:21 +0200
committerFabrice Bellingard <bellingard@gmail.com>2011-04-28 15:15:49 +0200
commit3afdc2f602cee595a7b3cccf47975cb23aaeb6d1 (patch)
treedc85b221fa59f8af874b9b43589648dd363ecd3d /sonar-server
parentc3fabd05ae340704746d2b3be87b584bdd0da475 (diff)
downloadsonarqube-3afdc2f602cee595a7b3cccf47975cb23aaeb6d1.tar.gz
sonarqube-3afdc2f602cee595a7b3cccf47975cb23aaeb6d1.zip
SONAR-1973, SONAR-2327 Fix issues based on Freddy's feedback
Diffstat (limited to 'sonar-server')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb6
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/markdown/_help.html.erb16
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/resource/_violation.html.erb12
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_comment_form.html.erb17
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_review.html.erb2
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_violation_comment_form.html.erb17
6 files changed, 31 insertions, 39 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb
index af3bb857f53..ccc33e692ff 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb
@@ -315,13 +315,13 @@ module ApplicationHelper
period_index=nil if period_index && period_index<=0
if resource.display_dashboard?
if options[:dashboard]
- link_to(name || resource.name, {:overwrite_params => {:controller => 'dashboard', :action => 'index', :id => (resource.copy_resource_id||resource.id), :period => period_index}}, :title => options[:title])
+ link_to(name || resource.name, {:overwrite_params => {:controller => 'dashboard', :action => 'index', :id => (resource.copy_resource_id||resource.id), :period => period_index, :tab => options[:tab]}}, :title => options[:title])
else
# stay on the same page (for example components)
- link_to(name || resource.name, {:overwrite_params => {:id => (resource.copy_resource_id||resource.id), :period => period_index}}, :title => options[:title])
+ link_to(name || resource.name, {:overwrite_params => {:id => (resource.copy_resource_id||resource.id), :period => period_index, :tab => options[:tab]}}, :title => options[:title])
end
else
- link_to(name || resource.name, {:controller => 'resource', :action => 'index', :id => resource.id, :period => period_index}, :popup => ['resource', 'height=800,width=900,scrollbars=1,resizable=1'], :title => options[:title])
+ link_to(name || resource.name, {:controller => 'resource', :action => 'index', :id => resource.id, :period => period_index, :tab => options[:tab]}, :popup => ['resource', 'height=800,width=900,scrollbars=1,resizable=1'], :title => options[:title])
end
end
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/markdown/_help.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/markdown/_help.html.erb
new file mode 100644
index 00000000000..d116702f885
--- /dev/null
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/markdown/_help.html.erb
@@ -0,0 +1,16 @@
+<h3>Help Tips</h3>
+<table>
+ <tr>
+ <td>*bold*</td>
+ <td class="sep"></td>
+ <td><b>bold</b></td>
+ </tr>
+ <tr>
+ <td>``code``</td>
+ <td class="sep"></td>
+ <td><code>code</code></td>
+ </tr>
+ <tr>
+ <td colspan="3">* Bulleted point</td>
+ </tr>
+</table> \ No newline at end of file
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 70e0c63094b..aa187b7b5be 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,19 @@
<% if current_user %>
<span class="actions" id="vActions<%= violation.id -%>">
<%= image_tag("sep12.png") -%>
- <% if violation.review %>
+ <%
+ if violation.review
+ unless violation.false_positive?
+ %>
&nbsp;
<%= 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 %>
+ <%
+ end
+ else
+ %>
&nbsp;
<%= link_to_remote "Review",
:url => { :controller => "reviews", :action => "violation_comment_form", :id => violation.id },
@@ -50,7 +56,7 @@
<% end %>
&nbsp;
- <%= link_to_remote (violation.false_positive? ? "Unflag false-positive" : "Flag as false-positive"),
+ <%= link_to_remote (violation.false_positive? ? "Unflag as 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,
:complete => "$('vActions" + violation.id.to_s + "').hide();$('reviewForm" + violation.id.to_s + "').show();$('commentText" + violation.id.to_s + "').focus();" -%>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_comment_form.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_comment_form.html.erb
index 6cb2a2bd58e..58beeb5ac65 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_comment_form.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_comment_form.html.erb
@@ -17,22 +17,7 @@
</td>
<td class="sep"></td>
<td style="vertical-align:top;width: 90px">
- <h3>Help Tips</h3>
- <table>
- <tr>
- <td>*bold*</td>
- <td class="sep"></td>
- <td><b>bold</b></td>
- </tr>
- <tr>
- <td>''code''</td>
- <td class="sep"></td>
- <td><code>code</code></td>
- </tr>
- <tr>
- <td colspan="3">* Bulleted point</td>
- </tr>
- </table>
+ <%= render :partial => 'markdown/help' -%>
</td>
</tr>
</table>
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 aa13895b6ed..2cb37687ff4 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
@@ -71,7 +71,7 @@
<td class="val" colspan="3">
<%= qualifier_icon(@review.resource) -%>
<% if !review.on_project? %> <%= @review.project.long_name -%> <%= image_tag 'sep12.png' -%> <% end %>
- <%= link_to_resource(review.resource, review.resource.long_name) %>
+ <%= link_to_resource(review.resource, review.resource.long_name, { :tab => :violations } ) %>
</td>
</tr>
</table>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_violation_comment_form.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_violation_comment_form.html.erb
index daa7600ffcf..a080d8b0e5e 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_violation_comment_form.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_violation_comment_form.html.erb
@@ -22,22 +22,7 @@
</td>
<td class="sep"></td>
<td style="vertical-align:top;width: 90px">
- <h3>Help Tips</h3>
- <table>
- <tr>
- <td>*bold*</td>
- <td class="sep"></td>
- <td><b>bold</b></td>
- </tr>
- <tr>
- <td>''code''</td>
- <td class="sep"></td>
- <td><code>code</code></td>
- </tr>
- <tr>
- <td colspan="3">* Bulleted point</td>
- </tr>
- </table>
+ <%= render :partial => 'markdown/help' -%>
</td>
</tr>
</table>