Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/users_helper.rb')
-rw-r--r--app/helpers/users_helper.rb13
1 files changed, 9 insertions, 4 deletions
diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb
index cae2addea9c..271fa47dd97 100644
--- a/app/helpers/users_helper.rb
+++ b/app/helpers/users_helper.rb
@@ -18,10 +18,11 @@ module UsersHelper
return _('We also use email for avatar detection if no avatar is uploaded.') unless user.unconfirmed_email.present?
confirmation_link = link_to _('Resend confirmation e-mail'), user_confirmation_path(user: { email: user.unconfirmed_email }), method: :post
-
- h(_('Please click the link in the confirmation email before continuing. It was sent to ')) +
- content_tag(:strong) { user.unconfirmed_email } + h('.') +
- content_tag(:p) { confirmation_link }
+ h(_('Please click the link in the confirmation email before continuing. It was sent to %{html_tag_strong_start}%{email}%{html_tag_strong_end}.')) % {
+ html_tag_strong_start: '<strong>'.html_safe,
+ html_tag_strong_end: '</strong>'.html_safe,
+ email: user.unconfirmed_email
+ } + content_tag(:p) { confirmation_link }
end
def profile_tabs
@@ -93,6 +94,7 @@ module UsersHelper
[].tap do |badges|
badges << blocked_user_badge(user) if user.blocked?
badges << { text: s_('AdminUsers|Admin'), variant: 'success' } if user.admin?
+ badges << { text: s_('AdminUsers|Bot'), variant: 'muted' } if user.bot?
badges << { text: s_('AdminUsers|External'), variant: 'secondary' } if user.external?
badges << { text: s_("AdminUsers|It's you!"), variant: 'muted' } if current_user == user
badges << { text: s_("AdminUsers|Locked"), variant: 'warning' } if user.access_locked?
@@ -197,6 +199,9 @@ module UsersHelper
banned_badge = { text: s_('AdminUsers|Banned'), variant: 'danger' }
return banned_badge if user.banned?
+ ldap_blocked_badge = { text: s_('AdminUsers|LDAP Blocked'), variant: 'danger' }
+ return ldap_blocked_badge if user.ldap_blocked?
+
{ text: s_('AdminUsers|Blocked'), variant: 'danger' }
end