]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-8382 move About link to the top nav
authorStas Vilchik <vilchiks@gmail.com>
Wed, 16 Nov 2016 14:29:49 +0000 (15:29 +0100)
committerStas Vilchik <vilchiks@gmail.com>
Wed, 16 Nov 2016 14:29:56 +0000 (15:29 +0100)
server/sonar-web/src/main/js/main/nav/global/global-nav-menu.js
server/sonar-web/src/main/js/main/nav/templates/nav-shortcuts-help.hbs
server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_layout.html.erb

index 7d25c1b1a25dc2c1b40a6e7c4f3dcc35971379a8..a002d6422fae5706d7a384676aa0d2c734ef3ca3 100644 (file)
@@ -29,6 +29,15 @@ export default React.createClass({
     return { globalDashboards: [], globalPages: [] };
   },
 
+  renderAbout () {
+    const url = window.baseUrl + '/about';
+    return (
+        <li className={this.activeLink('/about')}>
+          <a href={url}>About</a>
+        </li>
+    );
+  },
+
   renderProjects () {
     const controller = window.SS.user ? '/projects/favorite' : '/projects';
     const url = window.baseUrl + controller;
@@ -118,12 +127,14 @@ export default React.createClass({
   render () {
     return (
         <ul className="nav navbar-nav">
+          {!window.SS.user && this.renderAbout()}
           {this.renderProjects()}
           {this.renderIssuesLink()}
           {this.renderRulesLink()}
           {this.renderProfilesLink()}
           {this.renderQualityGatesLink()}
           {this.renderAdministrationLink()}
+          {!!window.SS.user && this.renderAbout()}
           {this.renderMore()}
         </ul>
     );
index bb29bf9597b58b68974c2d6742b098f94e6876cf..22356c886e4e74778e9e0e0ab939225bb66ba77c 100644 (file)
@@ -8,7 +8,6 @@
     <a href="http://www.sonarqube.org/documentation" target="sonar_doc">Documentation</a> -
     <a href="http://www.sonarqube.org/support" target="support">Get Support</a> -
     <a href="http://redirect.sonarsource.com/doc/plugin-library.html" target="plugins">Plugins</a> -
-    <a href="{{ link '/about'}}">About</a> -
     <a href="{{link '/web_api'}}">Web API</a>
   </div>
 
index 15022ecb49ece07bab55ba0ec8974bd80c2da3fd..1a2672d9fecda0b266f05d9df6d6baf6f8da51a2 100644 (file)
@@ -56,7 +56,6 @@
       <a href="http://www.sonarqube.org/documentation" target="sonar_doc">Documentation</a> -
       <a href="http://www.sonarqube.org/support" target="support">Get Support</a> -
       <a href="http://redirect.sonarsource.com/doc/plugin-library.html" target="plugins">Plugins</a> -
-      <a href="<%= ApplicationController.root_context -%>/about">About</a> -
       <a href="<%= ApplicationController.root_context -%>/web_api">Web API</a>
     </div>
     <!--[if lte IE 8 ]><p class="spacer-top alert alert-danger">IE 8 is not supported. Some widgets may not be properly displayed. Please switch to a <a target="_blank" href="http://redirect.sonarsource.com/doc/requirements.html">supported version or another supported browser</a>.</p><!--<![endif]-->