]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-3972 Move the "Manage dashboards" link back to the right side
authorFabrice Bellingard <fabrice.bellingard@sonarsource.com>
Tue, 4 Dec 2012 10:57:03 +0000 (11:57 +0100)
committerFabrice Bellingard <fabrice.bellingard@sonarsource.com>
Tue, 4 Dec 2012 14:35:02 +0000 (15:35 +0100)
sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_header.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_layout.html.erb

index c23bf7917d45b237f2ebd20542c77c974b9b118b..b520274453c1d9d3a1883dad05cfa621cf0d9589 100644 (file)
@@ -1,12 +1,15 @@
 <% if logged_in? || @snapshot %>
 <div class="line-block">
-  <% if logged_in? && @dashboard.editable_by?(current_user) %>
+  <% if logged_in? %>
     <ul class="operations">
       <% if back %>
-        <li class="last"><%= link_to message('dashboard.back_to_dashboard'), dashboard_action(:index) -%></li>
+        <li><%= link_to message('dashboard.back_to_dashboard'), dashboard_action(:index) -%></li>
       <% else %>
-        <li class="last"><%= link_to message('dashboard.configure_widgets'), dashboard_action(:configure) -%></li>
+        <% if @dashboard.editable_by?(current_user) %>
+          <li><%= link_to message('dashboard.configure_widgets'), dashboard_action(:configure) -%></li>
+        <% end %>
       <% end %>
+      <li class="last"><%= link_to message('dashboard.manage_dashboards'), {:controller => :dashboards, :action => :index, :resource => (@resource.id if @resource) } -%></li>
     </ul>
   <% end %>
 
index d0026cd504b11ca068d44f0dd084d2cca562a0ac..ced69136e0882decef0ca15bae6c639224658d0b 100644 (file)
@@ -52,8 +52,6 @@
                 <a href="<%= ApplicationController.root_context -%>/dashboard/?did=<%= active_dashboard.dashboard_id -%>"><%= active_dashboard.dashboard.name(true) -%></a>
               </li>
             <% end %>
-            <li class="<%= 'active' if request.request_uri.include?('/dashboards/index') -%>">
-              <a href="<%= ApplicationController.root_context -%>/dashboards/index"><%= message('dashboard.manage_dashboards') -%></a></li>
 
             <% controller.java_facade.getPages(Navigation::SECTION_HOME, nil, nil, nil, nil).each do |page|
               page_url = (page.isController() ? page.getId() : "/plugins/home/#{page.getId()}")
                 <a href="<%= ApplicationController.root_context -%>/dashboard/index/<%= @project.id -%>?did=<%= active_dashboard.dashboard_id -%><%= "&"+period_param if period_param -%>"><%= active_dashboard.dashboard.name(true) -%></a>
               </li>
             <% end %>
-            <li class="<%= 'active' if request.request_uri.include?('/dashboards/index') -%>">
-              <a href="<%= ApplicationController.root_context -%>/dashboards/index?resource=<%= @project.id -%>"><%= message('dashboard.manage_dashboards') -%></a></li>            
-            
             <li class="spacer"></li>
             <li class="sidebar-title"><%= message('sidebar.tools') -%></li>
-            
             <li class="<%= 'active' if request.request_uri.include?('/components/index') -%>">
               <a href="<%= ApplicationController.root_context -%>/components/index/<%= @project.id -%>"><%= message('components.page') -%></a></li>
             <li class="<%= 'active' if request.request_uri.include?('/drilldown/violations') -%>">