Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
efe2f5f8
Commit
efe2f5f8
authored
Jan 22, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'features/profile_page'
parents
e0fb0703
0ed7f32d
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
80 additions
and
5 deletions
+80
-5
CHANGELOG
CHANGELOG
+4
-0
app/assets/stylesheets/gitlab_bootstrap/common.scss
app/assets/stylesheets/gitlab_bootstrap/common.scss
+1
-0
app/assets/stylesheets/sections/header.scss
app/assets/stylesheets/sections/header.scss
+1
-1
app/controllers/users_controller.rb
app/controllers/users_controller.rb
+7
-0
app/helpers/events_helper.rb
app/helpers/events_helper.rb
+3
-4
app/models/team.rb
app/models/team.rb
+4
-0
app/views/users/_projects.html.haml
app/views/users/_projects.html.haml
+20
-0
app/views/users/show.html.haml
app/views/users/show.html.haml
+37
-0
config/routes.rb
config/routes.rb
+3
-0
No files found.
CHANGELOG
View file @
efe2f5f8
v 4.2.0
- User show page. Via /u/username
- Show help contents on pages for better navigation
v 4.1.0
- Optional Sign-Up
- Discussions
...
...
app/assets/stylesheets/gitlab_bootstrap/common.scss
View file @
efe2f5f8
...
...
@@ -95,6 +95,7 @@ img.avatar { float: left; margin-right: 12px; width: 40px; border: 1px solid #dd
img
.avatar.s16
{
width
:
16px
;
height
:
16px
;
margin-right
:
6px
;
}
img
.avatar.s24
{
width
:
24px
;
height
:
24px
;
margin-right
:
8px
;
}
img
.avatar.s32
{
width
:
32px
;
height
:
32px
;
margin-right
:
10px
;
}
img
.avatar.s90
{
width
:
90px
;
height
:
90px
;
margin-right
:
15px
;
}
img
.lil_av
{
padding-left
:
4px
;
padding-right
:
3px
;
}
img
.small
{
width
:
80px
;
}
...
...
app/assets/stylesheets/sections/header.scss
View file @
efe2f5f8
...
...
@@ -13,7 +13,7 @@ header {
color
:
$style_color
;
text-shadow
:
0
1px
0
#fff
;
font-size
:
18px
;
padding
:
1
1
px
;
padding
:
1
2
px
;
}
/** NAV block with links and profile **/
...
...
app/controllers/users_controller.rb
0 → 100644
View file @
efe2f5f8
class
UsersController
<
ApplicationController
def
show
@user
=
User
.
find_by_username!
(
params
[
:username
])
@projects
=
@user
.
authorized_projects
.
where
(
'projects.id in (?)'
,
current_user
.
authorized_projects
.
map
(
&
:id
))
@events
=
@user
.
recent_events
.
where
(
project_id:
@projects
.
map
(
&
:id
)).
limit
(
20
)
end
end
app/helpers/events_helper.rb
View file @
efe2f5f8
module
EventsHelper
def
link_to_author
(
event
)
project
=
event
.
project
tm
=
project
.
team_member_by_id
(
event
.
author_id
)
if
project
author
=
event
.
author
if
tm
link_to
event
.
author_name
,
project_team_member_path
(
project
,
tm
)
if
author
link_to
author
.
name
,
user_path
(
author
.
username
)
else
event
.
author_name
end
...
...
app/models/team.rb
View file @
efe2f5f8
...
...
@@ -21,6 +21,10 @@ class Team
end
end
def
get_tm
user_id
project
.
users_projects
.
find_by_user_id
(
user_id
)
end
def
add_user
(
user
,
access
)
add_users_ids
([
user
.
id
],
access
)
end
...
...
app/views/users/_projects.html.haml
0 → 100644
View file @
efe2f5f8
.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
app/views/users/show.html.haml
0 → 100644
View file @
efe2f5f8
.row
.span8
%h3
.page_title
=
image_tag
gravatar_icon
(
@user
.
email
,
90
),
class:
"avatar s90"
=
@user
.
name
%br
%small
@
#{
@user
.
username
}
%br
%small
member since
#{
@user
.
created_at
.
stamp
(
"Nov 12, 2031"
)
}
.clearfix
%hr
%h5
Recent events
=
render
@events
.span4
.ui-box
%h5
.title
Profile
%ul
.well-list
%li
%strong
Email
%span
.right
=
mail_to
@user
.
email
-
unless
@user
.
skype
.
blank?
%li
%strong
Skype
%span
.right
=
@user
.
skype
-
unless
@user
.
linkedin
.
blank?
%li
%strong
LinkedIn
%span
.right
=
@user
.
linkedin
-
unless
@user
.
twitter
.
blank?
%li
%strong
Twitter
%span
.right
=
@user
.
twitter
-
unless
@user
.
bio
.
blank?
%li
%strong
Bio
%span
.right
=
@user
.
bio
=
render
'projects'
config/routes.rb
View file @
efe2f5f8
...
...
@@ -97,6 +97,9 @@ Gitlab::Application.routes.draw do
end
resources
:keys
match
"/u/:username"
=>
"users#show"
,
as: :user
,
constraints:
{
username:
/.*/
}
#
# Dashboard Area
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment