]> source.dussan.org Git - sonarqube.git/commitdiff
Add permalink to breadcrumb
authorSimon Brandhof <simon.brandhof@gmail.com>
Mon, 15 Oct 2012 16:18:25 +0000 (18:18 +0200)
committerSimon Brandhof <simon.brandhof@gmail.com>
Mon, 15 Oct 2012 16:19:02 +0000 (18:19 +0200)
plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties
sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_breadcrumb.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/project/profile.html.erb
sonar-server/src/main/webapp/images/permalink.png
sonar-server/src/main/webapp/stylesheets/layout.css

index 7233025edf1f1a69869e475e2cbe9a5fcbf910f4..5ac04a936d186ead7d84512338e312a49f3b539e 100644 (file)
@@ -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
 
 
index 7d9ab50920a00269f880195a0ad0f6ae6bef1d1a..cac01887b8fa9f9e4bad175e28ba08214929b52f 100644 (file)
@@ -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) -%>
             &nbsp;
index 69b8763ef860cc44a48e2f8b87a359ceccc619ff..ee18bc9e7df2606de4294a7720e053deb7db4992 100644 (file)
@@ -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>
index a096e484f28f998d49eceadaa0fbbaa6e95d18a8..54e626d71cdc6aaf6ad355d06b7a3dbb47e36e02 100644 (file)
Binary files a/sonar-server/src/main/webapp/images/permalink.png and b/sonar-server/src/main/webapp/images/permalink.png differ
index 473c09bfbce79975fc3de67e52b6370b41c0a034..4ba2bcf8bde7da10dbf40d3bd9b69cd7f6850706 100644 (file)
@@ -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;