]> source.dussan.org Git - sonarqube.git/commitdiff
fix SONAR-6041 make project name clickable
authorStas Vilchik <vilchiks@gmail.com>
Mon, 19 Jan 2015 10:16:47 +0000 (11:16 +0100)
committerStas Vilchik <vilchiks@gmail.com>
Mon, 19 Jan 2015 10:16:47 +0000 (11:16 +0100)
server/sonar-web/src/main/hbs/nav/nav-navbar.hbs
server/sonar-web/src/main/js/nav/navbar.js
server/sonar-web/src/main/less/navbar.less
server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_navbar_conf_project.html.erb

index 4cd6ab2bf265e21c3663d501e8cc830c00ab5f80..192aa0101950f9263b798426d8ed46138ba7dc77 100644 (file)
@@ -10,7 +10,7 @@
              title="{{#if projectFavorite}}{{t 'click_to_remove_from_favorites'}}{{else}}{{t 'click_to_add_to_favorites'}}{{/if}}">
           </a>
         {{/if}}
-        {{projectName}}
+        <a href="{{dashboardUrl projectKey}}">{{projectName}}</a>
       </div>
     {{/eq}}
     {{#eq space 'settings'}}
index 7ab37245391c47b9a8204a4a071d302981e3bb13..026c0b33172578387e7a128df77a6d772993fa65 100644 (file)
@@ -23,6 +23,7 @@ define([
     initialize: function () {
       $(window).on('scroll.nav-layout', this.onScroll);
       this.projectName = window.navbarProject;
+      this.projectKey = window.navbarProjectKey;
       this.isProjectFavorite = window.navbarProjectFavorite;
     },
 
@@ -86,6 +87,7 @@ define([
         space: window.navbarSpace,
 
         projectName: this.projectName,
+        projectKey: this.projectKey,
         projectFavorite: this.isProjectFavorite,
         navbarCanFavoriteProject: window.navbarCanFavoriteProject
       });
index 17c3b7eba0da9f5ce46102a377e485447c291062..29c37d625a1dc8d7b72605867cd86a76deaf4b10 100644 (file)
   max-width: 240px;
   overflow: hidden;
   text-overflow: ellipsis;
-  white-space: nowrap;;
+  white-space: nowrap;
+
+  a, a:hover, a:focus {
+    color: @lightColor;
+  }
 }
 
 .navbar-logo {
index b7a4d7ec13ea272ca978484bc7716d253dae5257..a2841ae3a2ca43ea2ea35cb2dfe7c9711b544b16 100644 (file)
@@ -11,6 +11,7 @@
   var navbarSpace = 'project',
       navbarProject = '<%= @project.root_project().name -%>',
       navbarProjectId = '<%= @project.root_project().id -%>',
+      navbarProjectKey = '<%= @project.root_project().key -%>',
       navbarCanFavoriteProject = <%= logged_in? && displayed_resource && !display_only_root ? 'true' : 'false' -%>,
       navbarProjectFavorite = <%= logged_in? && current_user.favourite?(resource_id) ? 'true' : 'false' -%>,
       navbarItems = [