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

64 lines
3.8 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
2020-07-28 23:09:34 +05:30
.row.gl-mt-3
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'
2021-03-11 19:13:27 +05:30
= f.text_field :email, class: 'form-control gl-form-input', data: { qa_selector: 'email_address_field' }
2020-07-28 23:09:34 +05:30
.gl-mt-3
2021-04-29 21:17:54 +05:30
= f.submit _('Add email address'), class: 'gl-button btn btn-confirm', 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 }
2020-07-28 23:09:34 +05:30
.account-well.gl-mb-3
2016-06-02 11:05:42 +05:30
%ul
%li
2021-09-04 01:27:46 +05:30
- profile_message = _('Your primary email is used for avatar detection. You can change it in your %{openingTag}profile settings%{closingTag}.') % { openingTag: "<a href='#{profile_path}'>".html_safe, closingTag: '</a>'.html_safe}
= profile_message.html_safe
2018-12-05 23:21:45 +05:30
%li
2021-09-04 01:27:46 +05:30
= _('Your commit email is used for web based operations, such as edits and merges.')
2016-06-02 11:05:42 +05:30
%li
2021-09-04 01:27:46 +05:30
- notification_message = _('Your default notification email is used for account notifications if a %{openingTag}group-specific email address%{closingTag} is not set.') % { openingTag: "<a href='#{profile_notifications_path}'>".html_safe, closingTag: '</a>'.html_safe}
2019-09-04 21:01:54 +05:30
= notification_message.html_safe
2016-06-02 11:05:42 +05:30
%li
2021-09-04 01:27:46 +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
2021-03-11 19:13:27 +05:30
%span.badge.badge-muted.badge-pill.gl-badge.badge-success= s_('Profiles|Primary email')
2021-11-11 11:23:49 +05:30
- if @primary_email === current_user.commit_email_or_default
2021-03-11 19:13:27 +05:30
%span.badge.badge-muted.badge-pill.gl-badge.badge-info= s_('Profiles|Commit email')
2018-03-17 18:26:18 +05:30
- if @primary_email === current_user.public_email
2021-03-11 19:13:27 +05:30
%span.badge.badge-muted.badge-pill.gl-badge.badge-info= s_('Profiles|Public email')
2021-11-11 11:23:49 +05:30
- if @primary_email === current_user.notification_email_or_default
2021-03-11 19:13:27 +05:30
%span.badge.badge-muted.badge-pill.gl-badge.badge-info= s_('Profiles|Default notification email')
2021-12-11 22:18:48 +05:30
- @emails.reject(&:user_primary_email?).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
2021-11-11 11:23:49 +05:30
- if email.email === current_user.commit_email_or_default
2021-03-11 19:13:27 +05:30
%span.badge.badge-muted.badge-pill.gl-badge.badge-info= s_('Profiles|Commit email')
2016-06-02 11:05:42 +05:30
- if email.email === current_user.public_email
2021-03-11 19:13:27 +05:30
%span.badge.badge-muted.badge-pill.gl-badge.badge-info= s_('Profiles|Public email')
2021-11-11 11:23:49 +05:30
- if email.email === current_user.notification_email_or_default
2021-03-11 19:13:27 +05:30
%span.badge.badge-muted.badge-pill.gl-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')}"
2021-01-03 14:25:43 +05:30
= link_to confirm_title, resend_confirmation_instructions_profile_email_path(email), method: :put, class: 'gl-button btn btn-sm btn-warning gl-ml-3'
2018-03-17 18:26:18 +05:30
2021-01-03 14:25:43 +05:30
= link_to profile_email_path(email), data: { confirm: _('Are you sure?'), qa_selector: 'delete_email_link'}, method: :delete, class: 'gl-button btn btn-sm btn-danger gl-ml-3' do
2019-09-04 21:01:54 +05:30
%span.sr-only= _('Remove')
2020-10-24 23:57:45 +05:30
= sprite_icon('remove')