Add operations_path helper
This commit is contained in:
parent
7cb0dd9859
commit
19dc87a2eb
2 changed files with 6 additions and 2 deletions
|
@ -391,6 +391,10 @@ module ProjectsHelper
|
|||
end
|
||||
end
|
||||
|
||||
def sidebar_operations_link_path(project = @project)
|
||||
metrics_project_environments_path(project) if can?(current_user, :read_environment, project)
|
||||
end
|
||||
|
||||
def project_last_activity(project)
|
||||
if project.last_activity_at
|
||||
time_ago_with_tooltip(project.last_activity_at, placement: 'bottom', html_class: 'last_activity_time_ago')
|
||||
|
|
|
@ -196,7 +196,7 @@
|
|||
|
||||
- if project_nav_tab? :operations
|
||||
= nav_link(controller: sidebar_operations_paths) do
|
||||
= link_to metrics_project_environments_path(@project), class: 'shortcuts-operations' do
|
||||
= link_to sidebar_operations_link_path, class: 'shortcuts-operations' do
|
||||
.nav-icon-container
|
||||
= sprite_icon('cloud-gear')
|
||||
%span.nav-item-name
|
||||
|
@ -204,7 +204,7 @@
|
|||
|
||||
%ul.sidebar-sub-level-items
|
||||
= nav_link(controller: sidebar_operations_paths, html_options: { class: "fly-out-top-item" } ) do
|
||||
= link_to metrics_project_environments_path(@project) do
|
||||
= link_to sidebar_operations_link_path do
|
||||
%strong.fly-out-top-item-name
|
||||
= _('Operations')
|
||||
%li.divider.fly-out-top-item
|
||||
|
|
Loading…
Reference in a new issue