From bd83991ac7d4f720f81e140ed9a85902d58a5496 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 10 Oct 2013 10:53:49 +0300 Subject: Use link_to_project helper --- app/helpers/projects_helper.rb | 4 ++-- app/views/admin/users/show.html.haml | 6 +----- app/views/users/_projects.html.haml | 7 +------ 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index cd3a262cddd..17596b69c7d 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -5,10 +5,10 @@ module ProjectsHelper def link_to_project project link_to project do - title = content_tag(:strong, project.name) + title = content_tag(:span, project.name, class: 'projet-name') if project.namespace - namespace = content_tag(:span, "#{project.namespace.human_name} / ", class: 'tiny') + namespace = content_tag(:span, "#{project.namespace.human_name} / ", class: 'namespace-name') title = namespace + title end diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml index 05a524278a2..df9fc687478 100644 --- a/app/views/admin/users/show.html.haml +++ b/app/views/admin/users/show.html.haml @@ -117,11 +117,7 @@ - tm = project.team.find_tm(@user.id) %li.users_project = link_to admin_project_path(project), class: dom_class(project) do - - if project.namespace - = project.namespace.human_name - \/ - %strong.well-title - = truncate(project.name, length: 45) + = project.name_with_namespace - if tm .pull-right diff --git a/app/views/users/_projects.html.haml b/app/views/users/_projects.html.haml index f1b2c8dd7f7..a61c6ba5b86 100644 --- a/app/views/users/_projects.html.haml +++ b/app/views/users/_projects.html.haml @@ -3,9 +3,4 @@ %ul.well-list - @projects.each do |project| %li - = link_to project_path(project), class: dom_class(project) do - - if project.namespace - = project.namespace.human_name - \/ - %strong.well-title - = truncate(project.name, length: 45) + = link_to_project project -- cgit v1.2.1