Commit 70690e1971f6d009da9a37782764ae7446f69636
1 parent
e0fb0703
Exists in
master
and in
4 other branches
base implementation
Showing
6 changed files
with
59 additions
and
5 deletions
Show diff stats
app/assets/stylesheets/gitlab_bootstrap/common.scss
... | ... | @@ -95,6 +95,7 @@ img.avatar { float: left; margin-right: 12px; width: 40px; border: 1px solid #dd |
95 | 95 | img.avatar.s16 { width: 16px; height: 16px; margin-right: 6px; } |
96 | 96 | img.avatar.s24 { width: 24px; height: 24px; margin-right: 8px; } |
97 | 97 | img.avatar.s32 { width: 32px; height: 32px; margin-right: 10px; } |
98 | +img.avatar.s90 { width: 90px; height: 90px; margin-right: 15px; } | |
98 | 99 | img.lil_av { padding-left: 4px; padding-right: 3px; } |
99 | 100 | img.small { width: 80px; } |
100 | 101 | ... | ... |
app/assets/stylesheets/sections/header.scss
... | ... | @@ -0,0 +1,7 @@ |
1 | +class UsersController < ApplicationController | |
2 | + def show | |
3 | + @user = User.find_by_username(params[:username]) | |
4 | + @projects = @user.authorized_projects.where('projects.id in (?)', current_user.authorized_projects.map(&:id)) | |
5 | + @events = @user.recent_events.where(project_id: @projects.map(&:id)).limit(20) | |
6 | + end | |
7 | +end | ... | ... |
app/helpers/events_helper.rb
1 | 1 | module EventsHelper |
2 | 2 | def link_to_author(event) |
3 | - project = event.project | |
4 | - tm = project.team_member_by_id(event.author_id) if project | |
3 | + author = event.author | |
5 | 4 | |
6 | - if tm | |
7 | - link_to event.author_name, project_team_member_path(project, tm) | |
5 | + if author | |
6 | + link_to author.name, user_path(author.username) | |
8 | 7 | else |
9 | 8 | event.author_name |
10 | 9 | end | ... | ... |
... | ... | @@ -0,0 +1,44 @@ |
1 | +.row | |
2 | + .span8 | |
3 | + %h3.page_title | |
4 | + = image_tag gravatar_icon(@user.email, 90), class: "avatar s90" | |
5 | + = @user.name | |
6 | + %span.light (@#{@user.username}) | |
7 | + .clearfix | |
8 | + %hr | |
9 | + %h5 Recent events | |
10 | + = render @events | |
11 | + .span4 | |
12 | + .ui-box | |
13 | + %h5.title Profile | |
14 | + %ul.well-list | |
15 | + %li | |
16 | + %strong Email | |
17 | + %span.right= mail_to @user.email | |
18 | + - unless @user.skype.blank? | |
19 | + %li | |
20 | + %strong Skype | |
21 | + %span.right= @user.skype | |
22 | + - unless @user.linkedin.blank? | |
23 | + %li | |
24 | + %strong LinkedIn | |
25 | + %span.right= @user.linkedin | |
26 | + - unless @user.twitter.blank? | |
27 | + %li | |
28 | + %strong Twitter | |
29 | + %span.right= @user.twitter | |
30 | + - unless @user.bio.blank? | |
31 | + %li | |
32 | + %strong Bio | |
33 | + %span.right= @user.bio | |
34 | + .ui-box | |
35 | + %h5.title Projects | |
36 | + %ul.well-list | |
37 | + - @projects.each do |project| | |
38 | + %li | |
39 | + = link_to project_path(project), class: dom_class(project) do | |
40 | + - if project.namespace | |
41 | + = project.namespace.human_name | |
42 | + \/ | |
43 | + %strong.well-title | |
44 | + = truncate(project.name, length: 45) | ... | ... |