BigW Consortium Gitlab

index.html.haml 1.86 KB
Newer Older
1
- page_title "Emails"
2
- @content_class = "limit-container-width" unless fluid_layout
Connor Shea committed
3
= render 'profiles/head'
4

Phil Hughes committed
5
.row.prepend-top-default
6
  .col-lg-4.profile-settings-sidebar
Phil Hughes committed
7 8 9 10
    %h4.prepend-top-0
      = page_title
    %p
      Control emails linked to your account
11
  .col-lg-8
Phil Hughes committed
12 13
    %h4.prepend-top-0
      Add email address
Phil Hughes committed
14 15 16 17 18 19 20
    = form_for 'email', url: profile_emails_path do |f|
      .form-group
        = f.label :email, class: 'label-light'
        = f.text_field :email, class: 'form-control'
      .prepend-top-default
        = f.submit 'Add email address', class: 'btn btn-create'
    %hr
Phil Hughes committed
21
    %h4.prepend-top-0
Phil Hughes committed
22 23 24 25 26 27 28 29 30 31 32 33
      Linked emails (#{@emails.count + 1})
    .account-well.append-bottom-default
      %ul
        %li
          Your Primary Email will be used for avatar detection and web based operations, such as edits and merges.
        %li
          Your Notification Email will be used for account notifications.
        %li
          Your Public Email will be displayed on your public profile.
        %li
          All email addresses will be used to identify your commits.
    %ul.well-list
34
      %li
Phil Hughes committed
35 36
        = @primary
        %span.pull-right
37
          %span.label.label-success Primary email
Phil Hughes committed
38
          - if @primary === current_user.public_email
39
            %span.label.label-info Public email
Phil Hughes committed
40
          - if @primary === current_user.notification_email
41
            %span.label.label-info Notification email
Phil Hughes committed
42 43 44 45 46
      - @emails.each do |email|
        %li
          = email.email
          %span.pull-right
            - if email.email === current_user.public_email
47
              %span.label.label-info Public email
Phil Hughes committed
48
            - if email.email === current_user.notification_email
49
              %span.label.label-info Notification email
50
            = link_to 'Remove', profile_email_path(email), data: { confirm: 'Are you sure?'}, method: :delete, class: 'btn btn-sm btn-warning prepend-left-10'