show.html.haml 3.09 KB
Newer Older
1
.profile_avatar_holder
2
  = image_tag gravatar_icon(@user.email, 90)
randx's avatar
randx committed
3
%h3.page_title
4 5 6 7 8
  = @user.name
  %br
  %small
    = @user.email

9
  .pull-right
10 11 12 13
    = link_to destroy_user_session_path, class: "logout", method: :delete do
      %small
        %i.icon-signout
        Logout
14
%hr
15

16
= form_for @user, url: profile_path, method: :put, html: { class: "edit_user form-horizontal" }  do |f|
17
  -if @user.errors.any?
18
    %div.alert.alert-error
19 20 21
      %ul
        - @user.errors.full_messages.each do |msg|
          %li= msg
22
  .row
randx's avatar
randx committed
23 24
    .span7
      .control-group
25
        = f.label :name, class: "control-label"
randx's avatar
randx committed
26
        .controls
27
          = f.text_field :name, class: "input-xlarge", required: true
28
          %span.help-block Enter your name, so people you know can recognize you.
randx's avatar
randx committed
29
      .control-group
30
        = f.label :email, class: "control-label"
randx's avatar
randx committed
31
        .controls
32
          = f.text_field :email, class: "input-xlarge", required: true
33
          %span.help-block We also use email for avatar detection.
34 35 36 37 38 39 40 41 42 43 44 45 46 47
      .control-group
        = f.label :skype, class: "control-label"
        .controls= f.text_field :skype, class: "input-xlarge"
      .control-group
        = f.label :linkedin, class: "control-label"
        .controls= f.text_field :linkedin, class: "input-xlarge"
      .control-group
        = f.label :twitter, class: "control-label"
        .controls= f.text_field :twitter, class: "input-xlarge"
      .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.
48

49
    .span5.pull-right
50 51
      %fieldset.tips
        %legend Tips:
52
        %ul
53
          %li
54
            %p You can change your password on the Account page
55
          - if Gitlab.config.gravatar.enabled
56
            %li
57
              %p You can change your avatar at #{link_to "gravatar.com", "http://gravatar.com"}
58

59
          - if Gitlab.config.omniauth.enabled && @user.provider?
60
            %li
61
              %p
62
                You can login through #{@user.provider.titleize}!
63
                = link_to "click here to change", account_profile_path
64 65 66 67
          - if current_user.can_create_group?
            %li
              %p
                Need a group for several dependent projects?
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
68
                = link_to new_group_path, class: "btn btn-tiny" do
69
                  Create a group
70 71 72
      - unless current_user.projects_limit_left > 100
        %fieldset
          %legend
73
            Personal projects:
74
            %small.pull-right
75
              %span= current_user.personal_projects.count
76 77 78 79 80
              of
              %span= current_user.projects_limit
          .padded
            .progress
              .bar{style: "width: #{current_user.projects_limit_percent}%;"}
81

82 83 84
      %fieldset
        %legend
          SSH public keys:
85
          %span.pull-right
86
            = link_to pluralize(current_user.keys.count, 'key'), profile_keys_path
87
        .padded
88
          = link_to "Add Public Key", new_profile_key_path, class: "btn btn-small"
89

randx's avatar
randx committed
90
  .form-actions
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
91
    = f.submit 'Save', class: "btn btn-save"