Commit c727fdd054cd2f73a4311265d9f5e9f1a7d434eb
1 parent
e51411ec
Exists in
master
and in
4 other branches
Group head titles
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
3 changed files
with
21 additions
and
2 deletions
Show diff stats
app/helpers/groups_helper.rb
... | ... | @@ -2,4 +2,23 @@ module GroupsHelper |
2 | 2 | def remove_user_from_group_message(group, user) |
3 | 3 | "You are going to remove #{user.name} from #{group.name} Group. Are you sure?" |
4 | 4 | end |
5 | + | |
6 | + def group_head_title | |
7 | + title = @group.name | |
8 | + | |
9 | + title = if current_action?(:issues) | |
10 | + "Issues - " + title | |
11 | + elsif current_action?(:merge_requests) | |
12 | + "Merge requests - " + title | |
13 | + elsif current_action?(:members) | |
14 | + "Members - " + title | |
15 | + elsif current_action?(:edit) | |
16 | + "Settings - " + title | |
17 | + else | |
18 | + title | |
19 | + end | |
20 | + | |
21 | + title | |
22 | + | |
23 | + end | |
5 | 24 | end | ... | ... |
app/helpers/projects_helper.rb
... | ... | @@ -158,7 +158,7 @@ module ProjectsHelper |
158 | 158 | elsif current_controller?(:blob) |
159 | 159 | "#{@project.path}\/#{@blob.path} at #{@ref} - " + title |
160 | 160 | elsif current_controller?(:commits) |
161 | - "Commits - " + title | |
161 | + "Commits at #{@ref} - " + title | |
162 | 162 | elsif current_controller?(:merge_requests) |
163 | 163 | if current_action?(:show) |
164 | 164 | "Merge request ##{@merge_request.iid} - " + title | ... | ... |
app/views/layouts/group.html.haml
1 | 1 | !!! 5 |
2 | 2 | %html{ lang: "en"} |
3 | - = render "layouts/head", title: "#{@group.name}" | |
3 | + = render "layouts/head", title: group_head_title | |
4 | 4 | %body{class: "#{app_theme} application", :'data-page' => body_data_page} |
5 | 5 | = render "layouts/head_panel", title: "group: #{@group.name}" |
6 | 6 | = render "layouts/flash" | ... | ... |