diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-05 15:09:59 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-05 15:09:59 +0300 |
commit | b90cf01a88df981f452a7f6b6d74e8fd0ccbf90b (patch) | |
tree | 669bd8c7dab7f6aad2b9eef6d03cdb7bb4e687db /app/views/notify | |
parent | f9053931de583bbc3c6a8033f70929a91ce02e93 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views/notify')
-rw-r--r-- | app/views/notify/access_token_expired_email.html.haml | 12 | ||||
-rw-r--r-- | app/views/notify/access_token_expired_email.text.erb | 10 |
2 files changed, 19 insertions, 3 deletions
diff --git a/app/views/notify/access_token_expired_email.html.haml b/app/views/notify/access_token_expired_email.html.haml index 1e7c07c2282..9c3ef4cfdff 100644 --- a/app/views/notify/access_token_expired_email.html.haml +++ b/app/views/notify/access_token_expired_email.html.haml @@ -1,7 +1,15 @@ %p = _('Hi %{username}!') % { username: sanitize_name(@user.name) } %p - = _('One or more of your personal access tokens has expired.') + - if @token_names.empty? + = _('One or more of your personal access tokens has expired.') + - else + = _('The following personal access tokens have expired:') + + %p + %ul + - @token_names.each do |token| + %li= token %p - - pat_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: @target_url } + - pat_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: @target_url } = html_escape(_('You can create a new one or check them in your %{pat_link_start}personal access tokens%{pat_link_end} settings.')) % { pat_link_start: pat_link_start, pat_link_end: '</a>'.html_safe } diff --git a/app/views/notify/access_token_expired_email.text.erb b/app/views/notify/access_token_expired_email.text.erb index 4dc67e85dc2..6f6a9d38192 100644 --- a/app/views/notify/access_token_expired_email.text.erb +++ b/app/views/notify/access_token_expired_email.text.erb @@ -1,5 +1,13 @@ <%= _('Hi %{username}!') % { username: sanitize_name(@user.name) } %> -<%= _('One or more of your personal access tokens has expired.') %> +<%- if @token_names.empty? -%> +<%= _('One or more of your personal access tokens have expired.') %> +<%- else -%> +<%= _('The following personal access tokens have expired:') %> + +<%- @token_names.each do |token| -%> + - <%= token %> +<%- end -%> +<%- end -%> <%= _('You can create a new one or check them in your personal access tokens settings %{pat_link}.') % { pat_link: @target_url } %> |