From 96d97c4857cd2497108c8e5740ac8134cd439546 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Tue, 22 Jan 2013 19:45:13 +0200 Subject: Fix routing. Finalize user show page --- app/views/users/_projects.html.haml | 20 ++++++++++++++++++++ app/views/users/show.html.haml | 17 +++++------------ 2 files changed, 25 insertions(+), 12 deletions(-) create mode 100644 app/views/users/_projects.html.haml (limited to 'app/views/users') diff --git a/app/views/users/_projects.html.haml b/app/views/users/_projects.html.haml new file mode 100644 index 00000000000..f46a0ed1161 --- /dev/null +++ b/app/views/users/_projects.html.haml @@ -0,0 +1,20 @@ +.ui-box + %h5.title Projects + %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) + %span.right.light + - if project.owner == @user + %i.icon-wrench + - tm = project.team.get_tm(@user.id) + - if tm + = tm.project_access_human +%p.light + %i.icon-wrench + – user is a project owner diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index 613ff358a87..2a77c6bfa3d 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -3,7 +3,10 @@ %h3.page_title = image_tag gravatar_icon(@user.email, 90), class: "avatar s90" = @user.name - %span.light (@#{@user.username}) + %br + %small @#{@user.username} + %br + %small member since #{@user.created_at.stamp("Nov 12, 2031")} .clearfix %hr %h5 Recent events @@ -31,14 +34,4 @@ %li %strong Bio %span.right= @user.bio - .ui-box - %h5.title Projects - %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) + = render 'projects' -- cgit v1.2.1