Commit c727fdd0 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Group head titles

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent e51411ec
...@@ -2,4 +2,23 @@ module GroupsHelper ...@@ -2,4 +2,23 @@ module GroupsHelper
def remove_user_from_group_message(group, user) def remove_user_from_group_message(group, user)
"You are going to remove #{user.name} from #{group.name} Group. Are you sure?" "You are going to remove #{user.name} from #{group.name} Group. Are you sure?"
end end
def group_head_title
title = @group.name
title = if current_action?(:issues)
"Issues - " + title
elsif current_action?(:merge_requests)
"Merge requests - " + title
elsif current_action?(:members)
"Members - " + title
elsif current_action?(:edit)
"Settings - " + title
else
title
end
title
end
end end
...@@ -158,7 +158,7 @@ module ProjectsHelper ...@@ -158,7 +158,7 @@ module ProjectsHelper
elsif current_controller?(:blob) elsif current_controller?(:blob)
"#{@project.path}\/#{@blob.path} at #{@ref} - " + title "#{@project.path}\/#{@blob.path} at #{@ref} - " + title
elsif current_controller?(:commits) elsif current_controller?(:commits)
"Commits - " + title "Commits at #{@ref} - " + title
elsif current_controller?(:merge_requests) elsif current_controller?(:merge_requests)
if current_action?(:show) if current_action?(:show)
"Merge request ##{@merge_request.iid} - " + title "Merge request ##{@merge_request.iid} - " + title
......
!!! 5 !!! 5
%html{ lang: "en"} %html{ lang: "en"}
= render "layouts/head", title: "#{@group.name}" = render "layouts/head", title: group_head_title
%body{class: "#{app_theme} application", :'data-page' => body_data_page} %body{class: "#{app_theme} application", :'data-page' => body_data_page}
= render "layouts/head_panel", title: "group: #{@group.name}" = render "layouts/head_panel", title: "group: #{@group.name}"
= render "layouts/flash" = render "layouts/flash"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment