debian-mirror-gitlab/app/views/profiles/emails/index.html.haml

64 lines
3.3 KiB
Text
Raw Normal View History

2019-09-04 21:01:54 +05:30
- page_title _('Emails')
2017-09-10 17:25:29 +05:30
- @content_class = "limit-container-width" unless fluid_layout
2014-09-02 18:07:02 +05:30
2016-06-02 11:05:42 +05:30
.row.prepend-top-default
2017-09-10 17:25:29 +05:30
.col-lg-4.profile-settings-sidebar
2020-06-23 00:09:42 +05:30
%h4.gl-mt-0
2016-06-02 11:05:42 +05:30
= page_title
%p
2019-09-04 21:01:54 +05:30
= _('Control emails linked to your account')
2017-09-10 17:25:29 +05:30
.col-lg-8
2020-06-23 00:09:42 +05:30
%h4.gl-mt-0
2019-09-04 21:01:54 +05:30
= _('Add email address')
2016-06-02 11:05:42 +05:30
= form_for 'email', url: profile_emails_path do |f|
.form-group
2019-09-04 21:01:54 +05:30
= f.label :email, _('Email'), class: 'label-bold'
2019-12-21 20:55:43 +05:30
= f.text_field :email, class: 'form-control', data: { qa_selector: 'email_address_field' }
2016-06-02 11:05:42 +05:30
.prepend-top-default
2019-12-21 20:55:43 +05:30
= f.submit _('Add email address'), class: 'btn btn-success', data: { qa_selector: 'add_email_address_button' }
2016-06-02 11:05:42 +05:30
%hr
2020-06-23 00:09:42 +05:30
%h4.gl-mt-0
2020-04-22 19:07:51 +05:30
= _('Linked emails (%{email_count})') % { email_count: @emails.load.size + 1 }
2016-06-02 11:05:42 +05:30
.account-well.append-bottom-default
%ul
%li
2019-09-04 21:01:54 +05:30
= _('Your Primary Email will be used for avatar detection.')
2018-12-05 23:21:45 +05:30
%li
2019-09-04 21:01:54 +05:30
= _('Your Commit Email will be used for web based operations, such as edits and merges.')
2016-06-02 11:05:42 +05:30
%li
2019-09-04 21:01:54 +05:30
- address = profile_notifications_path
- notification_message = _('Your Default Notification Email will be used for account notifications if a %{openingTag}group-specific email address%{closingTag} is not set.') % { openingTag: "<a href='#{address}'>".html_safe, closingTag: '</a>'.html_safe}
= notification_message.html_safe
2016-06-02 11:05:42 +05:30
%li
2019-09-04 21:01:54 +05:30
= _('Your Public Email will be displayed on your public profile.')
2016-06-02 11:05:42 +05:30
%li
2019-09-04 21:01:54 +05:30
= _('All email addresses will be used to identify your commits.')
2018-11-08 19:23:39 +05:30
%ul.content-list
2014-09-02 18:07:02 +05:30
%li
2018-03-17 18:26:18 +05:30
= render partial: 'shared/email_with_badge', locals: { email: @primary_email, verified: current_user.confirmed? }
2018-11-08 19:23:39 +05:30
%span.float-right
2019-09-04 21:01:54 +05:30
%span.badge.badge-success= s_('Profiles|Primary email')
2018-12-05 23:21:45 +05:30
- if @primary_email === current_user.commit_email
2019-09-04 21:01:54 +05:30
%span.badge.badge-info= s_('Profiles|Commit email')
2018-03-17 18:26:18 +05:30
- if @primary_email === current_user.public_email
2019-09-04 21:01:54 +05:30
%span.badge.badge-info= s_('Profiles|Public email')
2018-03-17 18:26:18 +05:30
- if @primary_email === current_user.notification_email
2019-09-04 21:01:54 +05:30
%span.badge.badge-info= s_('Profiles|Default notification email')
2016-06-02 11:05:42 +05:30
- @emails.each do |email|
2019-12-21 20:55:43 +05:30
%li{ data: { qa_selector: 'email_row_content' } }
2018-03-17 18:26:18 +05:30
= render partial: 'shared/email_with_badge', locals: { email: email.email, verified: email.confirmed? }
2018-11-08 19:23:39 +05:30
%span.float-right
2018-12-05 23:21:45 +05:30
- if email.email === current_user.commit_email
2019-09-04 21:01:54 +05:30
%span.badge.badge-info= s_('Profiles|Commit email')
2016-06-02 11:05:42 +05:30
- if email.email === current_user.public_email
2019-09-04 21:01:54 +05:30
%span.badge.badge-info= s_('Profiles|Public email')
2016-06-02 11:05:42 +05:30
- if email.email === current_user.notification_email
2019-09-04 21:01:54 +05:30
%span.badge.badge-info= s_('Profiles|Notification email')
2018-03-17 18:26:18 +05:30
- unless email.confirmed?
2019-09-04 21:01:54 +05:30
- confirm_title = "#{email.confirmation_sent_at ? _('Resend confirmation email') : _('Send confirmation email')}"
2018-03-17 18:26:18 +05:30
= link_to confirm_title, resend_confirmation_instructions_profile_email_path(email), method: :put, class: 'btn btn-sm btn-warning prepend-left-10'
2019-12-21 20:55:43 +05:30
= link_to profile_email_path(email), data: { confirm: _('Are you sure?'), qa_selector: 'delete_email_link'}, method: :delete, class: 'btn btn-sm btn-danger prepend-left-10' do
2019-09-04 21:01:54 +05:30
%span.sr-only= _('Remove')
2018-03-17 18:26:18 +05:30
= icon('trash')