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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
482a1708
Commit
482a1708
authored
Nov 03, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'improve-profile-page'
parents
cc40c7af
ef6f6f80
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
109 additions
and
50 deletions
+109
-50
CHANGELOG
CHANGELOG
+1
-0
app/assets/javascripts/calendar.js.coffee
app/assets/javascripts/calendar.js.coffee
+1
-1
app/assets/stylesheets/framework/blocks.scss
app/assets/stylesheets/framework/blocks.scss
+1
-1
app/assets/stylesheets/framework/common.scss
app/assets/stylesheets/framework/common.scss
+10
-0
app/assets/stylesheets/pages/profile.scss
app/assets/stylesheets/pages/profile.scss
+26
-0
app/views/users/_projects.html.haml
app/views/users/_projects.html.haml
+0
-13
app/views/users/show.html.haml
app/views/users/show.html.haml
+59
-30
features/profile/profile.feature
features/profile/profile.feature
+1
-0
features/steps/profile/profile.rb
features/steps/profile/profile.rb
+10
-5
No files found.
CHANGELOG
View file @
482a1708
...
@@ -25,6 +25,7 @@ v 8.2.0 (unreleased)
...
@@ -25,6 +25,7 @@ v 8.2.0 (unreleased)
v 8.1.3
v 8.1.3
- Spread out runner contacted_at updates
- Spread out runner contacted_at updates
- New design for user profile page
v 8.1.1
v 8.1.1
- Fix cloning Wiki repositories via HTTP (Stan Hu)
- Fix cloning Wiki repositories via HTTP (Stan Hu)
...
...
app/assets/javascripts/calendar.js.coffee
View file @
482a1708
...
@@ -25,7 +25,7 @@ class @Calendar
...
@@ -25,7 +25,7 @@ class @Calendar
30
30
]
]
legendCellPadding
:
3
legendCellPadding
:
3
cellSize
:
$
(
'.user-calendar'
).
width
()
/
80
cellSize
:
$
(
'.user-calendar'
).
width
()
/
76
onClick
:
(
date
,
count
)
->
onClick
:
(
date
,
count
)
->
formated_date
=
date
.
getFullYear
()
+
"-"
+
(
date
.
getMonth
()
+
1
)
+
"-"
+
date
.
getDate
()
formated_date
=
date
.
getFullYear
()
+
"-"
+
(
date
.
getMonth
()
+
1
)
+
"-"
+
date
.
getDate
()
$
.
ajax
$
.
ajax
...
...
app/assets/stylesheets/framework/blocks.scss
View file @
482a1708
...
@@ -100,7 +100,7 @@
...
@@ -100,7 +100,7 @@
}
}
.cover-desc
{
.cover-desc
{
padding
:
0
$gl-padding
;
padding
:
0
$gl-padding
3px
;
color
:
$gl-text-color
;
color
:
$gl-text-color
;
}
}
...
...
app/assets/stylesheets/framework/common.scss
View file @
482a1708
...
@@ -387,6 +387,16 @@ table {
...
@@ -387,6 +387,16 @@ table {
}
}
}
}
.center-middle-menu
{
@include
nav-menu
;
text-align
:
center
;
margin
:
-
$gl-padding
;
height
:
auto
;
margin-top
:
0
;
margin-bottom
:
0
;
border-bottom
:
1px
solid
$border-color
;
}
.dropzone
.dz-preview
.dz-progress
{
.dropzone
.dz-preview
.dz-progress
{
border-color
:
$border-color
!
important
;
border-color
:
$border-color
!
important
;
}
}
...
...
app/assets/stylesheets/pages/profile.scss
View file @
482a1708
...
@@ -53,3 +53,29 @@
...
@@ -53,3 +53,29 @@
float
:
right
;
float
:
right
;
font-size
:
12px
;
font-size
:
12px
;
}
}
.profile-link-holder
{
display
:
inline
;
&
:after
{
content
:
"\00B7"
;
padding
:
0px
6px
;
font-weight
:
bold
;
}
&
:last-child
{
&
:after
{
content
:
""
;
padding
:
0
;
}
}
a
{
color
:
$blue-dark
;
text-decoration
:
none
;
}
}
.cal-heatmap-container
{
margin
:
0
auto
;
}
app/views/users/_projects.html.haml
deleted
100644 → 0
View file @
cc40c7af
-
if
local_assigns
.
has_key?
(
:contributed_projects
)
&&
contributed_projects
.
present?
.panel.panel-default.contributed-projects
.panel-heading
Projects contributed to
=
render
'shared/projects/list'
,
projects:
contributed_projects
.
sort_by
(
&
:star_count
).
reverse
,
projects_limit:
5
,
stars:
true
,
avatar:
false
-
if
local_assigns
.
has_key?
(
:projects
)
&&
projects
.
present?
.panel.panel-default
.panel-heading
Personal projects
=
render
'shared/projects/list'
,
projects:
projects
.
sort_by
(
&
:star_count
).
reverse
,
projects_limit:
10
,
stars:
true
,
avatar:
false
app/views/users/show.html.haml
View file @
482a1708
...
@@ -24,22 +24,27 @@
...
@@ -24,22 +24,27 @@
.cover-desc
.cover-desc
-
unless
@user
.
public_email
.
blank?
-
unless
@user
.
public_email
.
blank?
=
link_to
@user
.
public_email
,
"mailto:
#{
@user
.
public_email
}
"
.profile-link-holder
=
link_to
@user
.
public_email
,
"mailto:
#{
@user
.
public_email
}
"
-
unless
@user
.
skype
.
blank?
-
unless
@user
.
skype
.
blank?
·
.profile-link-holder
=
link_to
"Skype"
,
"skype:
#{
@user
.
skype
}
"
=
link_to
"skype:
#{
@user
.
skype
}
"
,
title:
"Skype"
do
=
icon
(
'skype'
)
-
unless
@user
.
linkedin
.
blank?
-
unless
@user
.
linkedin
.
blank?
·
.profile-link-holder
=
link_to
"LinkedIn"
,
"http://www.linkedin.com/in/
#{
@user
.
linkedin
}
"
=
link_to
"http://www.linkedin.com/in/
#{
@user
.
linkedin
}
"
,
title:
"LinkedIn"
do
=
icon
(
'linkedin-square'
)
-
unless
@user
.
twitter
.
blank?
-
unless
@user
.
twitter
.
blank?
·
.profile-link-holder
=
link_to
"Twitter"
,
"http://www.twitter.com/
#{
@user
.
twitter
}
"
=
link_to
"http://www.twitter.com/
#{
@user
.
twitter
}
"
,
title:
"Twitter"
do
=
icon
(
'twitter-square'
)
-
unless
@user
.
website_url
.
blank?
-
unless
@user
.
website_url
.
blank?
·
.profile-link-holder
=
link_to
@user
.
short_website_url
,
@user
.
full_website_url
=
link_to
@user
.
short_website_url
,
@user
.
full_website_url
-
unless
@user
.
location
.
blank?
-
unless
@user
.
location
.
blank?
·
.profile-link-holder
=
@user
.
location
=
icon
(
'map-marker'
)
=
@user
.
location
.cover-controls
.cover-controls
...
@@ -47,7 +52,7 @@
...
@@ -47,7 +52,7 @@
=
link_to
profile_path
,
class:
'btn btn-gray'
do
=
link_to
profile_path
,
class:
'btn btn-gray'
do
=
icon
(
'pencil'
)
=
icon
(
'pencil'
)
-
elsif
current_user
-
elsif
current_user
.report-abuse
%span
.report-abuse
-
if
@user
.
abuse_report
-
if
@user
.
abuse_report
%button
.btn.btn-danger
{
title:
'Already reported for abuse'
,
%button
.btn.btn-danger
{
title:
'Already reported for abuse'
,
data:
{
toggle:
'tooltip'
,
placement:
'left'
,
container:
'body'
}}
data:
{
toggle:
'tooltip'
,
placement:
'left'
,
container:
'body'
}}
...
@@ -56,6 +61,10 @@
...
@@ -56,6 +61,10 @@
=
link_to
new_abuse_report_path
(
user_id:
@user
.
id
),
class:
'btn btn-gray'
,
=
link_to
new_abuse_report_path
(
user_id:
@user
.
id
),
class:
'btn btn-gray'
,
title:
'Report abuse'
,
data:
{
toggle:
'tooltip'
,
placement:
'left'
,
container:
'body'
}
do
title:
'Report abuse'
,
data:
{
toggle:
'tooltip'
,
placement:
'left'
,
container:
'body'
}
do
=
icon
(
'exclamation-circle'
)
=
icon
(
'exclamation-circle'
)
-
if
current_user
=
link_to
user_path
(
@user
,
:atom
,
{
private_token:
current_user
.
private_token
}),
class:
'btn btn-gray'
do
=
icon
(
'rss'
)
.gray-content-block.second-block
.gray-content-block.second-block
.user-calendar
.user-calendar
...
@@ -64,27 +73,47 @@
...
@@ -64,27 +73,47 @@
.user-calendar-activities
.user-calendar-activities
.row.prepend-top-20
%ul
.nav.center-middle-menu
%
section
.col-md-7
%
li
.active
-
if
@groups
.
any?
=
link_to
"#activity"
,
'data-toggle'
=>
'tab'
do
.prepend-top-20
Activity
%h4
Groups
-
if
@groups
.
any?
=
render
'groups'
,
groups:
@groups
%li
%hr
=
link_to
"#groups"
,
'data-toggle'
=>
'tab'
do
Groups
%h4
-
if
@contributed_projects
.
present?
User Activity
%li
=
link_to
"#contributed"
,
'data-toggle'
=>
'tab'
do
-
if
current_user
Contributed projects
%span
.rss-icon.pull-right
-
if
@projects
.
present?
=
link_to
user_path
(
@user
,
:atom
,
{
private_token:
current_user
.
private_token
})
do
%li
%strong
=
link_to
"#personal"
,
'data-toggle'
=>
'tab'
do
%i
.fa.fa-rs
s
Personal project
s
.tab-content
.tab-pane.active
#activity
.content_list
.content_list
=
spinner
=
spinner
%aside
.col-md-5
=
render
'projects'
,
projects:
@projects
,
contributed_projects:
@contributed_projects
-
if
@groups
.
any?
.tab-pane
#groups
%ul
.content-list
-
@groups
.
each
do
|
group
|
=
render
'shared/groups/group'
,
group:
group
-
if
@contributed_projects
.
present?
.tab-pane
#contributed
.contributed-projects
=
render
'shared/projects/list'
,
projects:
@contributed_projects
.
sort_by
(
&
:star_count
).
reverse
,
projects_limit:
5
,
stars:
true
,
avatar:
false
-
if
@projects
.
present?
.tab-pane
#personal
.personal-projects
=
render
'shared/projects/list'
,
projects:
@projects
.
sort_by
(
&
:star_count
).
reverse
,
projects_limit:
10
,
stars:
true
,
avatar:
false
:coffeescript
:coffeescript
$(".user-calendar").load("
#{
user_calendar_path
}
")
$(".user-calendar").load("
#{
user_calendar_path
}
")
features/profile/profile.feature
View file @
482a1708
...
@@ -7,6 +7,7 @@ Feature: Profile
...
@@ -7,6 +7,7 @@ Feature: Profile
Given
I visit profile page
Given
I visit profile page
Then
I should see my profile info
Then
I should see my profile info
@javascript
Scenario
:
I
can see groups I belong to
Scenario
:
I
can see groups I belong to
Given
I have group with projects
Given
I have group with projects
When
I visit profile page
When
I visit profile page
...
...
features/steps/profile/profile.rb
View file @
482a1708
...
@@ -59,7 +59,7 @@ class Spinach::Features::Profile < Spinach::FeatureSteps
...
@@ -59,7 +59,7 @@ class Spinach::Features::Profile < Spinach::FeatureSteps
step
'I should not see the "Remove avatar" button'
do
step
'I should not see the "Remove avatar" button'
do
expect
(
page
).
not_to
have_link
(
"Remove avatar"
)
expect
(
page
).
not_to
have_link
(
"Remove avatar"
)
end
end
step
'I should see the gravatar host link'
do
step
'I should see the gravatar host link'
do
expect
(
page
).
to
have_link
(
"gravatar.com"
)
expect
(
page
).
to
have_link
(
"gravatar.com"
)
end
end
...
@@ -159,10 +159,9 @@ class Spinach::Features::Profile < Spinach::FeatureSteps
...
@@ -159,10 +159,9 @@ class Spinach::Features::Profile < Spinach::FeatureSteps
end
end
step
'I should see my user page'
do
step
'I should see my user page'
do
expect
(
page
).
to
have_content
"User Activity"
page
.
within
".cover-block"
do
page
.
within
'.navbar-gitlab'
do
expect
(
page
).
to
have_content
current_user
.
name
expect
(
page
).
to
have_content
current_user
.
name
expect
(
page
).
to
have_content
current_user
.
username
end
end
end
end
...
@@ -176,7 +175,13 @@ class Spinach::Features::Profile < Spinach::FeatureSteps
...
@@ -176,7 +175,13 @@ class Spinach::Features::Profile < Spinach::FeatureSteps
end
end
step
'I should see groups I belong to'
do
step
'I should see groups I belong to'
do
expect
(
page
).
to
have_css
(
'.profile-groups-avatars'
,
visible:
true
)
page
.
within
".content"
do
click_link
"Groups"
end
page
.
within
"#groups"
do
expect
(
page
).
to
have_content
@group
.
name
end
end
end
step
'I click on new application button'
do
step
'I click on new application button'
do
...
...
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