diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-20 16:18:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-20 16:18:24 +0300 |
commit | 0653e08efd039a5905f3fa4f6e9cef9f5d2f799c (patch) | |
tree | 4dcc884cf6d81db44adae4aa99f8ec1233a41f55 /app/helpers/profiles_helper.rb | |
parent | 744144d28e3e7fddc117924fef88de5d9674fe4c (diff) |
Add latest changes from gitlab-org/gitlab@14-3-stable-eev14.3.0-rc42
Diffstat (limited to 'app/helpers/profiles_helper.rb')
-rw-r--r-- | app/helpers/profiles_helper.rb | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/app/helpers/profiles_helper.rb b/app/helpers/profiles_helper.rb index f6ed567c9ea..09fc1ab9d50 100644 --- a/app/helpers/profiles_helper.rb +++ b/app/helpers/profiles_helper.rb @@ -6,15 +6,12 @@ module ProfilesHelper verified_emails = user.verified_emails - [private_email] [ + [s_('Use primary email (%{email})') % { email: user.email }, ''], [s_("Profiles|Use a private email - %{email}").html_safe % { email: private_email }, Gitlab::PrivateCommitEmail::TOKEN], *verified_emails ] end - def selected_commit_email(user) - user.read_attribute(:commit_email) || user.commit_email - end - def attribute_provider_label(attribute) user_synced_attributes_metadata = current_user.user_synced_attributes_metadata if user_synced_attributes_metadata&.synced?(attribute) @@ -38,6 +35,21 @@ module ProfilesHelper status&.availability == availability_values[:busy] end + def middle_dot_divider_classes(stacking, breakpoint) + ['gl-mb-3'].tap do |classes| + if stacking + classes.concat(%w(middle-dot-divider-sm gl-display-block gl-sm-display-inline-block)) + else + classes << 'gl-display-inline-block' + classes << if breakpoint.nil? + 'middle-dot-divider' + else + "middle-dot-divider-#{breakpoint}" + end + end + end + end + # Overridden in EE::ProfilesHelper#ssh_key_expiration_tooltip def ssh_key_expiration_tooltip(key) return key.errors.full_messages.join(', ') if key.errors.full_messages.any? |