index.html.haml 1.8 KB
Newer Older
1
- page_title "Emails"
Connor Shea's avatar
Connor Shea committed
2
= render 'profiles/head'
3

Phil Hughes's avatar
Phil Hughes committed
4 5 6 7 8 9 10
.row.prepend-top-default
  .col-lg-3.profile-settings-sidebar
    %h4.prepend-top-0
      = page_title
    %p
      Control emails linked to your account
  .col-lg-9
Phil Hughes's avatar
Phil Hughes committed
11 12
    %h4.prepend-top-0
      Add email address
Phil Hughes's avatar
Phil Hughes committed
13 14 15 16 17 18 19
    = 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's avatar
Phil Hughes committed
20
    %h4.prepend-top-0
Phil Hughes's avatar
Phil Hughes committed
21 22 23 24 25 26 27 28 29 30 31 32
      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
33
      %li
Phil Hughes's avatar
Phil Hughes committed
34 35
        = @primary
        %span.pull-right
36
          %span.label.label-success Primary email
Phil Hughes's avatar
Phil Hughes committed
37
          - if @primary === current_user.public_email
38
            %span.label.label-info Public email
Phil Hughes's avatar
Phil Hughes committed
39
          - if @primary === current_user.notification_email
40
            %span.label.label-info Notification email
Phil Hughes's avatar
Phil Hughes committed
41 42 43 44 45
      - @emails.each do |email|
        %li
          = email.email
          %span.pull-right
            - if email.email === current_user.public_email
46
              %span.label.label-info Public email
Phil Hughes's avatar
Phil Hughes committed
47
            - if email.email === current_user.notification_email
48
              %span.label.label-info Notification email
49
            = link_to 'Remove', profile_email_path(email), data: { confirm: 'Are you sure?'}, method: :delete, class: 'btn btn-sm btn-warning prepend-left-10'