diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2012-10-15 18:18:25 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2012-10-15 18:19:02 +0200 |
commit | 5c83bdfe69e111899b00583f2904703a9d55c93c (patch) | |
tree | 1867a8e86455ca77258bda7f0f1f8b923b046465 | |
parent | 021db4f2a3a7fab4f850f0fc715f21503e0fc3ab (diff) | |
download | sonarqube-5c83bdfe69e111899b00583f2904703a9d55c93c.tar.gz sonarqube-5c83bdfe69e111899b00583f2904703a9d55c93c.zip |
Add permalink to breadcrumb
5 files changed, 28 insertions, 14 deletions
diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties b/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties index 7233025edf1..5ac04a936d1 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties @@ -90,6 +90,7 @@ packages=Packages parameters=Parameters password=Password path=Path +permalink=Permanent Link permalinks=Permalinks plugin=Plugin project=Project @@ -340,7 +341,7 @@ update_center.page=Update Center lcom4_viewer.page=LCOM4 resource_deletion.page={0} Deletion update_key.page=Update Key -project_quality_profile.page=Quality Profile +project_quality_profiles.page=Quality Profiles bulk_deletion.page=Bulk Deletion 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 7d9ab50920a..cac01887b8f 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,13 @@ -<% if @resource || @project %> +<% if @resource || @project + displayed_resource = @resource || @project +%> <div id="crumbs"> - <ul> + <% if !@review %> + <ul id="crumbs-ops"> + <li><a href="<%= url_for(:overwrite_params => {:id => displayed_resource.key})-%>"><img src="<%= ApplicationController.root_context -%>/images/permalink.png" width="16" height="16" title="<%= message('permalink') -%>"/></a></li> + </ul> + <% end %> + <ul id="bc"> <% resource_link = {} if @review @@ -8,7 +15,7 @@ end # ======== Path for resources ======== - displayed_resource = @resource || @project + if displayed_resource && displayed_resource.last_snapshot resources=[] s=displayed_resource.last_snapshot @@ -18,9 +25,9 @@ end %> <li class="first"><%= message("qualifiers.#{resources[0].qualifier}") -%></li> - <% + <% resources.each_with_index do |resource, index| - %> + %> <li> <%= qualifier_icon(resource) -%> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/project/profile.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/project/profile.html.erb index 69b8763ef86..ee18bc9e7df 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/project/profile.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/project/profile.html.erb @@ -1,4 +1,4 @@ -<h1 class="marginbottom10"><%= message('project_quality_profile.page') -%></h1> +<h1 class="marginbottom10"><%= message('project_quality_profiles.page') -%></h1> <table class="data"> <thead> diff --git a/sonar-server/src/main/webapp/images/permalink.png b/sonar-server/src/main/webapp/images/permalink.png Binary files differindex a096e484f28..54e626d71cd 100644 --- a/sonar-server/src/main/webapp/images/permalink.png +++ b/sonar-server/src/main/webapp/images/permalink.png diff --git a/sonar-server/src/main/webapp/stylesheets/layout.css b/sonar-server/src/main/webapp/stylesheets/layout.css index 473c09bfbce..4ba2bcf8bde 100644 --- a/sonar-server/src/main/webapp/stylesheets/layout.css +++ b/sonar-server/src/main/webapp/stylesheets/layout.css @@ -111,10 +111,13 @@ body, a { font-size: 93%; margin: 0 10px; border-bottom: 1px solid #CCC; - border-right: 2px solid #CCC; + border-right: 1px solid #CCC; +} +#crumbs img { + vertical-align: text-bottom; } -#crumbs > ul > li { +#bc li { float: left; margin: 0; background: #EFEFEF url("../images/bc-gray.png") no-repeat left; @@ -122,23 +125,26 @@ body, a { padding: 0 10px 0 20px; } -#crumbs > ul > li.first { +#bc li.first { background: #EFEFEF; border-left: 2px solid #CCC; padding: 0 10px 0 5px; } -#crumbs > ul > li img { - vertical-align: text-bottom; +#bc li img { margin-right: -5px; } -#crumbs > ul > li a { +#bc li a { text-decoration: none; } -#crumbs > ul > li a:hover, #crumbs > ul > li a:focus { +#bc li a:hover, #bc li a:focus { text-decoration: underline; } +#crumbs-ops { + float: right; + padding: 0 5px 0 0; +} #nonav { text-align: left; |