Project titles with namespaces

This commit is contained in:
Dmitriy Zaporozhets 2012-12-12 12:02:29 +02:00
parent 743073ce5f
commit d7eb314553
2 changed files with 10 additions and 2 deletions

View file

@ -23,4 +23,12 @@ module ProjectsHelper
def tm_path team_member def tm_path team_member
project_team_member_path(@project, team_member) project_team_member_path(@project, team_member)
end end
def project_title project
if project.group
project.name_with_namespace
else
project.name
end
end
end end

View file

@ -1,9 +1,9 @@
!!! 5 !!! 5
%html{ lang: "en"} %html{ lang: "en"}
= render "layouts/head", title: @project.name = render "layouts/head", title: @project.name_with_namespace
%body{class: "#{app_theme} project"} %body{class: "#{app_theme} project"}
= render "layouts/flash" = render "layouts/flash"
= render "layouts/head_panel", title: @project.name = render "layouts/head_panel", title: project_title(@project)
- if can?(current_user, :download_code, @project) - if can?(current_user, :download_code, @project)
= render 'shared/no_ssh' = render 'shared/no_ssh'
.container .container