diff options
Diffstat (limited to 'app/views/notify')
-rw-r--r-- | app/views/notify/resource_access_tokens_about_to_expire_email.html.haml | 13 | ||||
-rw-r--r-- | app/views/notify/resource_access_tokens_about_to_expire_email.text.erb | 11 |
2 files changed, 24 insertions, 0 deletions
diff --git a/app/views/notify/resource_access_tokens_about_to_expire_email.html.haml b/app/views/notify/resource_access_tokens_about_to_expire_email.html.haml new file mode 100644 index 00000000000..e4e34f6c8ee --- /dev/null +++ b/app/views/notify/resource_access_tokens_about_to_expire_email.html.haml @@ -0,0 +1,13 @@ +%p + = _('Hi %{username}!') % { username: sanitize_name(@user.name) } +%p + = _('One or more of your resource access tokens will expire in %{days_to_expire} or less:') % { days_to_expire: pluralize(@days_to_expire, _('day')) } +%p + #{@resource.class.name.titleize}: #{@resource.full_path} +%p + %ul + - @token_names.each do |token| + %li= token +%p + - 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 %{link_start}access tokens%{link_end} settings.')) % { link_start: link_start, link_end: '</a>'.html_safe } diff --git a/app/views/notify/resource_access_tokens_about_to_expire_email.text.erb b/app/views/notify/resource_access_tokens_about_to_expire_email.text.erb new file mode 100644 index 00000000000..bea74f09129 --- /dev/null +++ b/app/views/notify/resource_access_tokens_about_to_expire_email.text.erb @@ -0,0 +1,11 @@ +<%= _('Hi %{username}!') % { username: sanitize_name(@user.name) } %> + +<%= _('One or more of your resource access tokens will expire in %{days_to_expire} or less:') % { days_to_expire: pluralize(@days_to_expire, _('day')) } %> + +<%= "#{@resource.class.name.titleize}: #{@resource.full_path}" %> + +<% @token_names.each do |token| %> + - <%= token %> +<% end %> + +<%= _('You can create a new one or check them in your access token settings: %{target_url}') % { target_url: @target_url } %> |