Group head titles

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
Dmitriy Zaporozhets 2013-11-13 10:35:10 +02:00
parent e51411ecc7
commit c727fdd054
No known key found for this signature in database
GPG Key ID: 2CEAFD2671262EC2
3 changed files with 21 additions and 2 deletions

View File

@ -2,4 +2,23 @@ module GroupsHelper
def remove_user_from_group_message(group, user)
"You are going to remove #{user.name} from #{group.name} Group. Are you sure?"
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

View File

@ -158,7 +158,7 @@ module ProjectsHelper
elsif current_controller?(:blob)
"#{@project.path}\/#{@blob.path} at #{@ref} - " + title
elsif current_controller?(:commits)
"Commits - " + title
"Commits at #{@ref} - " + title
elsif current_controller?(:merge_requests)
if current_action?(:show)
"Merge request ##{@merge_request.iid} - " + title

View File

@ -1,6 +1,6 @@
!!! 5
%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}
= render "layouts/head_panel", title: "group: #{@group.name}"
= render "layouts/flash"