File tree Expand file tree Collapse file tree 9 files changed +80
-5
lines changed Expand file tree Collapse file tree 9 files changed +80
-5
lines changed Original file line number Diff line number Diff line change
1
+ v 4.2.0
2
+ - User show page. Via /u/username
3
+ - Show help contents on pages for better navigation
4
+
1
5
v 4.1.0
2
6
- Optional Sign-Up
3
7
- Discussions
Original file line number Diff line number Diff line change @@ -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
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ header {
13
13
color : $style_color ;
14
14
text-shadow : 0 1px 0 #fff ;
15
15
font-size : 18px ;
16
- padding : 11 px ;
16
+ padding : 12 px ;
17
17
}
18
18
19
19
/* * NAV block with links and profile **/
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change @@ -21,6 +21,10 @@ def << args
21
21
end
22
22
end
23
23
24
+ def get_tm user_id
25
+ project . users_projects . find_by_user_id ( user_id )
26
+ end
27
+
24
28
def add_user ( user , access )
25
29
add_users_ids ( [ user . id ] , access )
26
30
end
Original file line number Diff line number Diff line change
1
+ .ui-box
2
+ %h5 .title Projects
3
+ %ul .well-list
4
+ - @projects.each do |project|
5
+ %li
6
+ = link_to project_path(project), class: dom_class(project) do
7
+ - if project.namespace
8
+ = project.namespace.human_name
9
+ \/
10
+ %strong .well-title
11
+ = truncate(project.name, length: 45)
12
+ %span .right.light
13
+ - if project.owner == @user
14
+ %i .icon-wrench
15
+ - tm = project.team.get_tm(@user.id)
16
+ - if tm
17
+ = tm.project_access_human
18
+ %p .light
19
+ %i .icon-wrench
20
+ – user is a project owner
Original file line number Diff line number Diff line change
1
+ .row
2
+ .span8
3
+ %h3 .page_title
4
+ = image_tag gravatar_icon(@user.email, 90), class: " avatar s90"
5
+ = @user.name
6
+ %br
7
+ %small @#{@user.username}
8
+ %br
9
+ %small member since #{@user.created_at.stamp("Nov 12, 2031")}
10
+ .clearfix
11
+ %hr
12
+ %h5 Recent events
13
+ = render @events
14
+ .span4
15
+ .ui-box
16
+ %h5 .title Profile
17
+ %ul .well-list
18
+ %li
19
+ %strong Email
20
+ %span .right = mail_to @user.email
21
+ - unless @user.skype.blank?
22
+ %li
23
+ %strong Skype
24
+ %span .right = @user.skype
25
+ - unless @user.linkedin.blank?
26
+ %li
27
+ %strong LinkedIn
28
+ %span .right = @user.linkedin
29
+ - unless @user.twitter.blank?
30
+ %li
31
+ %strong Twitter
32
+ %span .right = @user.twitter
33
+ - unless @user.bio.blank?
34
+ %li
35
+ %strong Bio
36
+ %span .right = @user.bio
37
+ = render 'projects'
Original file line number Diff line number Diff line change 97
97
end
98
98
99
99
resources :keys
100
+ match "/u/:username" => "users#show" , as : :user , constraints : { username : /.*/ }
101
+
102
+
100
103
101
104
#
102
105
# Dashboard Area
You can’t perform that action at this time.
0 commit comments