Commit 6bf656970d9e4ccb1a46c78917844de6d72aad89

Authored by Dmitriy Zaporozhets
1 parent cc539151

Use fieldset. Improved profile

app/assets/stylesheets/common.scss
... ... @@ -20,18 +20,6 @@ body {
20 20 float:right;
21 21 }
22 22  
23   -.profile_avatar_holder {
24   - float:left;
25   - width:60px;
26   - height:60px;
27   - margin-right:20px;
28   - img {
29   - width:60px;
30   - height:60px;
31   - background:#eee;
32   - }
33   -}
34   -
35 23  
36 24 .visible_link,
37 25 .author_link {
... ...
app/assets/stylesheets/sections/header.scss
... ... @@ -156,12 +156,7 @@ header {
156 156 display: block; } }
157 157  
158 158 .account-links {
159   - background: #79C3E0;
160   - display: none;
161 159 border-radius: 5px;
162   - width: 100px;
163   - margin-top: 0;
164   - float: right;
165 160 box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
166 161 position: relative;
167 162 &:before {
... ... @@ -171,33 +166,33 @@ header {
171 166 position: absolute;
172 167 border: 5px solid transparent;
173 168 border-color: rgba(255, 255, 255, 0);
174   - border-bottom-color: #333;
  169 + border-bottom-color: #555;
175 170 text-indent: -9999px;
176 171 top: -10px;
177 172 line-height: 0;
178 173 right: 10px;
179 174 z-index: 10; }
180   - background: #333;
  175 + background: #555;
181 176 display: none;
182 177 z-index: 100000;
183 178 @include border-radius(4px);
184 179 width: 100px;
185 180 position: absolute;
186   - right: 10px;
187   - top: 42px;
  181 + right: 5px;
  182 + top: 38px;
188 183 margin-top: 0;
189 184 float: right;
190 185 box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
191 186 a {
192   - color: #EEE;
193   - padding: 6px 10px;
  187 + color: #fff;
  188 + padding: 7px 10px;
194 189 display: block;
195 190 text-shadow: none;
196   - border-bottom: 1px solid #555;
  191 + border-bottom: 1px solid #666;
197 192 font-size: 12px;
198 193 &:hover {
199   - color:#eee;
200   - background: #444;
  194 + color:#fff;
  195 + background: #333;
201 196 }
202 197 }
203 198 }
... ...
app/assets/stylesheets/sections/nav.scss
... ... @@ -6,7 +6,7 @@ ul.main_menu {
6 6 border-radius: 4px;
7 7 margin: auto;
8 8 margin:30px 0;
9   - border:1px solid #AAA;
  9 + border:1px solid #BBB;
10 10 height:37px;
11 11 @include bg-gray-gradient;
12 12 position:relative;
... ...
app/assets/stylesheets/sections/profile.scss
... ... @@ -6,3 +6,17 @@
6 6 }
7 7 }
8 8 }
  9 +
  10 +.profile_avatar_holder {
  11 + float:left;
  12 + width:60px;
  13 + height:60px;
  14 + margin-right:20px;
  15 + img {
  16 + width:60px;
  17 + height:60px;
  18 + background:#fff;
  19 + padding: 1px;
  20 + border: 1px solid #ddd;
  21 + }
  22 +}
... ...
app/views/keys/index.html.haml
... ... @@ -18,5 +18,5 @@
18 18 - if @keys.blank?
19 19 %tr
20 20 %td{colspan: 3}
21   - %h3.nothing_here_message There are no SSH keys with access to your account.
  21 + %p.nothing_here_message There are no SSH keys with access to your account.
22 22  
... ...
app/views/profile/account.html.haml
1 1 - if Gitlab.config.omniauth_enabled?
2 2 %fieldset
3   - %legend
4   - %h3.page_title Social Accounts
  3 + %legend Social Accounts
5 4 .oauth_select_holder
6 5 %p.hint Tip: Click on icon to activate sigin with one of the following services
7 6 - User.omniauth_providers.each do |provider|
... ... @@ -11,10 +10,9 @@
11 10  
12 11 %fieldset
13 12 %legend
14   - %h3.page_title
15   - Private token
16   - %span.cred.right
17   - keep it secret!
  13 + Private token
  14 + %span.cred.right
  15 + keep it secret!
18 16 .padded
19 17 = form_for @user, url: profile_reset_private_token_path, method: :put do |f|
20 18 .data
... ... @@ -31,8 +29,7 @@
31 29 = f.submit 'Generate', class: "btn success btn-build-token"
32 30  
33 31 %fieldset
34   - %legend
35   - %h3.page_title Password
  32 + %legend Password
36 33 = form_for @user, url: profile_password_path, method: :put do |f|
37 34 .padded
38 35 %p.slead After successful password update you will be redirected to login page where you should login with new password
... ...
app/views/profile/design.html.haml
1 1 = form_for @user, url: profile_update_path, remote: true, method: :put do |f|
2   - %div
3   - %h3.page_title Application theme
4   - %br
  2 + %fieldset
  3 + %legend Application theme
5 4 .themes_opts
6 5 = label_tag do
7 6 .prev
... ... @@ -23,19 +22,19 @@
23 22 %br
24 23 .clearfix
25 24  
26   - %h3.page_title Code review
27   - %br
28   - .themes_opts
29   - = label_tag do
30   - .prev
31   - = image_tag "white.png"
32   - = f.radio_button :dark_scheme, false
33   - White code preview
34   - = label_tag do
35   - .prev
36   - = image_tag "dark.png"
37   - = f.radio_button :dark_scheme, true
38   - Dark code preview
  25 + %fieldset
  26 + %legend Code review
  27 + .themes_opts
  28 + = label_tag do
  29 + .prev
  30 + = image_tag "white.png"
  31 + = f.radio_button :dark_scheme, false
  32 + White code preview
  33 + = label_tag do
  34 + .prev
  35 + = image_tag "dark.png"
  36 + = f.radio_button :dark_scheme, true
  37 + Dark code preview
39 38  
40 39 :javascript
41 40 $(function(){
... ...
app/views/profile/show.html.haml
1 1 .profile_avatar_holder
2   - = image_tag gravatar_icon(@user.email, 90), class: "styled_image"
  2 + = image_tag gravatar_icon(@user.email, 90)
3 3 %h3.page_title
4 4 = @user.name
5 5 %br
... ... @@ -19,21 +19,23 @@
19 19 .control-group
20 20 = f.label :name, class: "control-label"
21 21 .controls
22   - = f.text_field :name, class: "input-xlarge"
  22 + = f.text_field :name, class: "input-xlarge", required: true
23 23 %span.help-block Enter your name, so people you know can recognize you.
24 24 .control-group
25 25 = f.label :email, class: "control-label"
26 26 .controls
27   - = f.text_field :email, class: "input-xlarge"
  27 + = f.text_field :email, class: "input-xlarge", required: true
28 28 %span.help-block We also use email for avatar detection.
29 29  
30 30 .span5.right
31   - %div.tips
32   - %h6 Tips:
  31 + %fieldset.tips
  32 + %legend Tips:
33 33 %ul
  34 + %li
  35 + %p You can change your password on Account page
34 36 -unless Gitlab.config.disable_gravatar?
35 37 %li
36   - %p.hint You can change your avatar at #{link_to "gravatar.com", "http://gravatar.com"}
  38 + %p You can change your avatar at #{link_to "gravatar.com", "http://gravatar.com"}
37 39  
38 40 - if Gitlab.config.omniauth_enabled? && @user.provider?
39 41 %li
... ... @@ -41,7 +43,6 @@
41 43 You can login through #{@user.provider.titleize}!
42 44 = link_to "click here to change", profile_account_path
43 45  
44   - %hr
45 46 .row
46 47 .span7
47 48 .control-group
... ... @@ -59,23 +60,22 @@
59 60 = f.text_area :bio, rows: 6, class: "input-xlarge", maxlength: 250
60 61 %span.help-block Tell us about yourself in fewer than 250 characters.
61 62 .span5.right
62   - .ui-box.white
63   - .ui-box-body
64   - %h4
65   - Personal projects:
66   - %small.right
67   - %span= current_user.my_own_projects.count
68   - of
69   - %span= current_user.projects_limit
  63 + %fieldset
  64 + %legend
  65 + Personal projects:
  66 + %small.right
  67 + %span= current_user.my_own_projects.count
  68 + of
  69 + %span= current_user.projects_limit
  70 + .padded
70 71 .progress
71 72 .bar{style: "width: #{current_user.projects_limit_percent}%;"}
72 73  
73   - .ui-box.white
74   - .ui-box-body
75   - %h4
76   - SSH public keys:
77   - %strong.right= link_to current_user.keys.count, keys_path
78   -
  74 + %fieldset
  75 + %legend
  76 + SSH public keys:
  77 + %strong.right= link_to current_user.keys.count, keys_path
  78 + .padded
79 79 = link_to "Add Public Key", new_key_path, class: "btn small"
80 80  
81 81 .form-actions
... ...