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
87ffd676
Commit
87ffd676
authored
Oct 09, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve Profile settings UI
parent
3fb1042d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
61 deletions
+23
-61
app/assets/stylesheets/gitlab_bootstrap/avatar.scss
app/assets/stylesheets/gitlab_bootstrap/avatar.scss
+1
-0
app/views/profiles/show.html.haml
app/views/profiles/show.html.haml
+21
-58
features/steps/profile/profile.rb
features/steps/profile/profile.rb
+1
-3
No files found.
app/assets/stylesheets/gitlab_bootstrap/avatar.scss
View file @
87ffd676
...
@@ -19,4 +19,5 @@
...
@@ -19,4 +19,5 @@
&
.s32
{
width
:
32px
;
height
:
32px
;
margin-right
:
10px
;
}
&
.s32
{
width
:
32px
;
height
:
32px
;
margin-right
:
10px
;
}
&
.s60
{
width
:
60px
;
height
:
60px
;
margin-right
:
12px
;
}
&
.s60
{
width
:
60px
;
height
:
60px
;
margin-right
:
12px
;
}
&
.s90
{
width
:
90px
;
height
:
90px
;
margin-right
:
15px
;
}
&
.s90
{
width
:
90px
;
height
:
90px
;
margin-right
:
15px
;
}
&
.s160
{
width
:
160px
;
height
:
160px
;
margin-right
:
20px
;
}
}
}
app/views/profiles/show.html.haml
View file @
87ffd676
=
image_tag
avatar_icon
(
@user
.
email
,
60
),
alt:
''
,
class:
'avatar s60'
%h3
.page-title
%h3
.page-title
=
@user
.
name
Profile settings
%br
%p
.light
%small
This information appears on your profile.
=
@user
.
email
-
if
current_user
.
ldap_user?
Some options are unavailable for LDAP accounts
.pull-right
=
link_to
destroy_user_session_path
,
class:
"logout"
,
method: :delete
do
%small
%i
.icon-signout
Logout
%hr
%hr
=
form_for
@user
,
url:
profile_path
,
method: :put
,
html:
{
multipart:
true
,
class:
"edit_user form-horizontal"
}
do
|
f
|
=
form_for
@user
,
url:
profile_path
,
method: :put
,
html:
{
multipart:
true
,
class:
"edit_user form-horizontal"
}
do
|
f
|
-
if
@user
.
errors
.
any?
-
if
@user
.
errors
.
any?
%div
.alert.alert-error
%div
.alert.alert-error
...
@@ -40,9 +36,22 @@
...
@@ -40,9 +36,22 @@
=
f
.
label
:twitter
,
class:
"control-label"
=
f
.
label
:twitter
,
class:
"control-label"
.controls
=
f
.
text_field
:twitter
,
class:
"input-xlarge"
.controls
=
f
.
text_field
:twitter
,
class:
"input-xlarge"
.control-group
.control-group
=
f
.
label
:
avatar
,
class:
"control-label"
=
f
.
label
:
bio
,
class:
"control-label"
.controls
.controls
=
f
.
text_area
:bio
,
rows:
6
,
class:
"input-xlarge"
,
maxlength:
250
%span
.help-block
Tell us about yourself in fewer than 250 characters.
.span5.pull-right
.light-well
=
image_tag
avatar_icon
(
@user
.
email
,
160
),
alt:
''
,
class:
'avatar s160'
.clearfix
.profile-avatar-form-option
.profile-avatar-form-option
%p
.light
You can upload an avatar here
%br
or change it at
#{
link_to
"gravatar.com"
,
"http://gravatar.com"
}
%hr
%a
.choose-btn.btn.btn-small.js-choose-user-avatar-button
%a
.choose-btn.btn.btn-small.js-choose-user-avatar-button
%i
.icon-paper-clip
%i
.icon-paper-clip
%span
Choose File ...
%span
Choose File ...
...
@@ -50,52 +59,6 @@
...
@@ -50,52 +59,6 @@
%span
.file_name.js-avatar-filename
File name...
%span
.file_name.js-avatar-filename
File name...
=
f
.
file_field
:avatar
,
class:
"js-user-avatar-input hide"
=
f
.
file_field
:avatar
,
class:
"js-user-avatar-input hide"
%span
.help-block
The maximum file size allowed is 200KB.
%span
.help-block
The maximum file size allowed is 200KB.
.control-group
=
f
.
label
:bio
,
class:
"control-label"
.controls
=
f
.
text_area
:bio
,
rows:
6
,
class:
"input-xlarge"
,
maxlength:
250
%span
.help-block
Tell us about yourself in fewer than 250 characters.
.span5.pull-right
%fieldset
.tips
%legend
Tips:
%ul
%li
%p
You can change your password on the Account page
-
if
Gitlab
.
config
.
gravatar
.
enabled
%li
%p
You can upload an avatar here or change it at
#{
link_to
"gravatar.com"
,
"http://gravatar.com"
}
-
if
Gitlab
.
config
.
omniauth
.
enabled
&&
@user
.
provider?
%li
%p
You can login through
#{
@user
.
provider
.
titleize
}
!
=
link_to
"click here to change"
,
account_profile_path
-
if
current_user
.
can_create_group?
%li
%p
Need a group for several dependent projects?
=
link_to
new_group_path
,
class:
"btn btn-tiny"
do
Create a group
-
unless
current_user
.
projects_limit_left
>
100
%fieldset
%legend
Personal projects:
%small
.pull-right
%span
=
current_user
.
personal_projects
.
count
of
%span
=
current_user
.
projects_limit
.padded
.progress
.bar
{
style:
"width: #{current_user.projects_limit_percent}%;"
}
%fieldset
%legend
SSH public keys:
%span
.pull-right
=
link_to
pluralize
(
current_user
.
keys
.
count
,
'key'
),
profile_keys_path
.padded
=
link_to
"Add Public Key"
,
new_profile_key_path
,
class:
"btn btn-small"
.form-actions
.form-actions
=
f
.
submit
'Save changes'
,
class:
"btn btn-save"
=
f
.
submit
'Save changes'
,
class:
"btn btn-save"
features/steps/profile/profile.rb
View file @
87ffd676
...
@@ -3,9 +3,7 @@ class Profile < Spinach::FeatureSteps
...
@@ -3,9 +3,7 @@ class Profile < Spinach::FeatureSteps
include
SharedPaths
include
SharedPaths
step
'I should see my profile info'
do
step
'I should see my profile info'
do
page
.
should
have_content
"Profile"
page
.
should
have_content
"Profile settings"
page
.
should
have_content
@user
.
name
page
.
should
have_content
@user
.
email
end
end
step
'I change my contact info'
do
step
'I change my contact info'
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