Commit 8fe63dab52f6e72aaab1141f2af5d72b012064b7
1 parent
4252ea90
Exists in
master
and in
4 other branches
Use current_controller? in layouts/_head partial
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
app/views/layouts/_head.html.haml
... | ... | @@ -10,8 +10,8 @@ |
10 | 10 | - if controller_name == 'projects' && action_name == 'index' |
11 | 11 | = auto_discovery_link_tag :atom, projects_url(:atom, private_token: current_user.private_token), title: "Dashboard feed" |
12 | 12 | - if @project && !@project.new_record? |
13 | - - if current_page?(project_tree_path(@project, @ref)) || current_page?(project_commits_path(@project, @ref)) | |
13 | + - if current_controller?(:tree, :commit, :commits) | |
14 | 14 | = auto_discovery_link_tag(:atom, project_commits_url(@project, @ref, format: :atom, private_token: current_user.private_token), title: "Recent commits to #{@project.name}:#{@ref}") |
15 | - - if request.path == project_issues_path(@project) | |
15 | + - if current_controller?(:issues) | |
16 | 16 | = auto_discovery_link_tag(:atom, project_issues_url(@project, :atom, private_token: current_user.private_token), title: "#{@project.name} issues") |
17 | 17 | = csrf_meta_tags | ... | ... |