Group head titles
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
parent
e51411ecc7
commit
c727fdd054
|
@ -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
|
||||||
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
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
!!! 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"
|
||||||
|
|
Loading…
Reference in New Issue