diff options
author | Fabrice Bellingard <bellingard@gmail.com> | 2012-03-12 19:04:20 +0100 |
---|---|---|
committer | Fabrice Bellingard <bellingard@gmail.com> | 2012-03-12 19:07:27 +0100 |
commit | 1d631531e60d1897f1c0dc7f20e39ec9bf59c60f (patch) | |
tree | b8f7d515e7c8c1d0d5e9edf5ba1f9760df5934f4 /sonar-server/src/main/webapp/WEB-INF | |
parent | fe6fcd42f0807c28b33d9fc04d520ae7b059b798 (diff) | |
download | sonarqube-1d631531e60d1897f1c0dc7f20e39ec9bf59c60f.tar.gz sonarqube-1d631531e60d1897f1c0dc7f20e39ec9bf59c60f.zip |
SONAR-3278 Display the review permalink in the breadcrumb
Diffstat (limited to 'sonar-server/src/main/webapp/WEB-INF')
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_breadcrumb.html.erb | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_breadcrumb.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_breadcrumb.html.erb index aa46ec093c2..6ae2a5d1902 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_breadcrumb.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_breadcrumb.html.erb @@ -1,6 +1,14 @@ <ol id="crumbs"> <li><a href="<%= ApplicationController.root_context -%>/"><%= message('layout.home') -%></a></li> <% +resource_link = {} +only_resource = true +if @review + resource_link = {:controller => 'dashboard', :action => 'index'} + only_resource = false +end + +# ======== Path for resources ======== @resource = @project if @project && !@resource if @resource && @resource.last_snapshot resources=[] @@ -13,11 +21,30 @@ if @resource && @resource.last_snapshot resources.reverse.each do |resource| %> <li> - <%= qualifier_icon(resource) -%> <a href="<%= url_for :overwrite_params => { :id => resource.key } -%>"><%= h resource.name -%></a> - <%= link_to( image_tag('permalink.gif'), {:overwrite_params => { :id => resource.key }}, :title => message('layout.permalink')) if resource==@resource %> + <%= qualifier_icon(resource) -%> + + <%= link_to( h(resource.name), + {:overwrite_params => { :id => resource.key }.merge(resource_link)} + ) -%> + + <%= link_to( image_tag('permalink.gif'), + {:overwrite_params => { :id => resource.key }.merge(resource_link)}, + :title => message('layout.permalink') + ) if resource==@resource && only_resource -%> </li> <% end end + +# ======== Path for review ======== +if @review +%> + <li> + ยป <%= link_to message('review') + @review.id.to_s -%> + + <%= link_to image_tag('permalink.gif'), :title => message('layout.permalink') -%> + </li> +<% +end %> </ol>
\ No newline at end of file |