Use link_to_project helper

This commit is contained in:
Dmitriy Zaporozhets 2013-10-10 10:53:49 +03:00
parent 573c89e624
commit bd83991ac7
3 changed files with 4 additions and 13 deletions

View file

@ -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

View file

@ -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

View file

@ -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