<% 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 %>
<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') -%>">