Commit d7eb3145539222df4653fbe300d179a81b303517
1 parent
743073ce
Exists in
master
and in
4 other branches
Project titles with namespaces
Showing
2 changed files
with
10 additions
and
2 deletions
Show diff stats
app/helpers/projects_helper.rb
@@ -23,4 +23,12 @@ module ProjectsHelper | @@ -23,4 +23,12 @@ module ProjectsHelper | ||
23 | def tm_path team_member | 23 | def tm_path team_member |
24 | project_team_member_path(@project, team_member) | 24 | project_team_member_path(@project, team_member) |
25 | end | 25 | end |
26 | + | ||
27 | + def project_title project | ||
28 | + if project.group | ||
29 | + project.name_with_namespace | ||
30 | + else | ||
31 | + project.name | ||
32 | + end | ||
33 | + end | ||
26 | end | 34 | end |
app/views/layouts/project_resource.html.haml
1 | !!! 5 | 1 | !!! 5 |
2 | %html{ lang: "en"} | 2 | %html{ lang: "en"} |
3 | - = render "layouts/head", title: @project.name | 3 | + = render "layouts/head", title: @project.name_with_namespace |
4 | %body{class: "#{app_theme} project"} | 4 | %body{class: "#{app_theme} project"} |
5 | = render "layouts/flash" | 5 | = render "layouts/flash" |
6 | - = render "layouts/head_panel", title: @project.name | 6 | + = render "layouts/head_panel", title: project_title(@project) |
7 | - if can?(current_user, :download_code, @project) | 7 | - if can?(current_user, :download_code, @project) |
8 | = render 'shared/no_ssh' | 8 | = render 'shared/no_ssh' |
9 | .container | 9 | .container |