Merge commit '25c66fa640
' into kb_migration
This commit is contained in:
commit
1f64358afb
107 changed files with 2159 additions and 1540 deletions
|
@ -44,7 +44,11 @@
|
|||
%tbody
|
||||
%td.column-cell
|
||||
%p= t 'about.hosted_on', domain: site_hostname
|
||||
%p= link_to t('application_mailer.notification_preferences'), settings_preferences_notifications_url
|
||||
%p
|
||||
= link_to t('application_mailer.notification_preferences'), settings_preferences_notifications_url
|
||||
- if defined?(@type)
|
||||
·
|
||||
= link_to t('application_mailer.unsubscribe'), unsubscribe_url(token: @user.to_sgid(for: 'unsubscribe').to_s, type: @type)
|
||||
%td.column-cell.text-right
|
||||
= link_to root_url do
|
||||
= image_tag full_pack_url('media/images/mailer/logo.png'), alt: 'Mastodon', height: 24
|
||||
|
|
9
app/views/mail_subscriptions/create.html.haml
Normal file
9
app/views/mail_subscriptions/create.html.haml
Normal file
|
@ -0,0 +1,9 @@
|
|||
- content_for :page_title do
|
||||
= t('mail_subscriptions.unsubscribe.title')
|
||||
|
||||
.simple_form
|
||||
%h1.title= t('mail_subscriptions.unsubscribe.complete')
|
||||
%p.lead
|
||||
= t('mail_subscriptions.unsubscribe.success_html', domain: content_tag(:strong, site_hostname), type: content_tag(:strong, I18n.t(@type, scope: 'mail_subscriptions.unsubscribe.emails')), email: content_tag(:strong, @user.email))
|
||||
%p.lead
|
||||
= t('mail_subscriptions.unsubscribe.resubscribe_html', settings_path: settings_preferences_notifications_path)
|
12
app/views/mail_subscriptions/show.html.haml
Normal file
12
app/views/mail_subscriptions/show.html.haml
Normal file
|
@ -0,0 +1,12 @@
|
|||
- content_for :page_title do
|
||||
= t('mail_subscriptions.unsubscribe.title')
|
||||
|
||||
.simple_form
|
||||
%h1.title= t('mail_subscriptions.unsubscribe.title')
|
||||
%p.lead
|
||||
= t('mail_subscriptions.unsubscribe.confirmation_html', domain: content_tag(:strong, site_hostname), type: content_tag(:strong, I18n.t(@type, scope: 'mail_subscriptions.unsubscribe.emails')), email: content_tag(:strong, @user.email), settings_path: settings_preferences_notifications_path)
|
||||
|
||||
= form_tag unsubscribe_path, method: :post do
|
||||
= hidden_field_tag :token, params[:token]
|
||||
= hidden_field_tag :type, params[:type]
|
||||
= button_tag t('mail_subscriptions.unsubscribe.action'), type: :submit
|
|
@ -42,4 +42,4 @@
|
|||
= link_to a.remote_url, a.remote_url
|
||||
|
||||
%p.status-footer
|
||||
= link_to l(status.created_at), web_url("@#{status.account.pretty_acct}/#{status.id}")
|
||||
= link_to l(status.created_at.in_time_zone(time_zone)), web_url("@#{status.account.pretty_acct}/#{status.id}")
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
%h1= t 'notification_mailer.favourite.title'
|
||||
%p.lead= t('notification_mailer.favourite.body', name: @account.pretty_acct)
|
||||
|
||||
= render 'status', status: @status
|
||||
= render 'status', status: @status, time_zone: @me.user_time_zone
|
||||
|
||||
%table.email-table{ cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
%h1= t 'notification_mailer.mention.title'
|
||||
%p.lead= t('notification_mailer.mention.body', name: @status.account.pretty_acct)
|
||||
|
||||
= render 'status', status: @status
|
||||
= render 'status', status: @status, time_zone: @me.user_time_zone
|
||||
|
||||
%table.email-table{ cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
%h1= t 'notification_mailer.reblog.title'
|
||||
%p.lead= t('notification_mailer.reblog.body', name: @account.pretty_acct)
|
||||
|
||||
= render 'status', status: @status
|
||||
= render 'status', status: @status, time_zone: @me.user_time_zone
|
||||
|
||||
%table.email-table{ cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
|
|
|
@ -9,8 +9,11 @@
|
|||
.fields-group.fields-row__column.fields-row__column-6
|
||||
= f.input :locale, collection: I18n.available_locales, wrapper: :with_label, include_blank: false, label_method: lambda { |locale| native_locale_name(locale) }, selected: I18n.locale, hint: false
|
||||
.fields-group.fields-row__column.fields-row__column-6
|
||||
= f.simple_fields_for :settings, current_user.settings do |ff|
|
||||
= ff.input :theme, collection: Themes.instance.names, label_method: lambda { |theme| I18n.t("themes.#{theme}", default: theme) }, wrapper: :with_label, include_blank: false, hint: false
|
||||
= f.input :time_zone, wrapper: :with_label, collection: ActiveSupport::TimeZone.all.map { |tz| ["(GMT#{tz.formatted_offset}) #{tz.name}", tz.tzinfo.name] }, hint: false
|
||||
|
||||
.fields-group
|
||||
= f.simple_fields_for :settings, current_user.settings do |ff|
|
||||
= ff.input :theme, collection: Themes.instance.names, label_method: lambda { |theme| I18n.t("themes.#{theme}", default: theme) }, wrapper: :with_label, label: I18n.t('simple_form.labels.defaults.setting_theme'), include_blank: false, hint: false
|
||||
|
||||
- unless I18n.locale == :en
|
||||
.flash-message.translation-prompt
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
%tbody
|
||||
%tr
|
||||
%td.column-cell.text-center
|
||||
%p= t 'user_mailer.appeal_approved.explanation', appeal_date: l(@appeal.created_at), strike_date: l(@appeal.strike.created_at)
|
||||
%p= t 'user_mailer.appeal_approved.explanation', appeal_date: l(@appeal.created_at.in_time_zone(@resource.time_zone)), strike_date: l(@appeal.strike.created_at.in_time_zone(@resource.time_zone))
|
||||
|
||||
%table.email-table{ cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
|
||||
===
|
||||
|
||||
<%= t 'user_mailer.appeal_approved.explanation', appeal_date: l(@appeal.created_at), strike_date: l(@appeal.strike.created_at) %>
|
||||
<%= t 'user_mailer.appeal_approved.explanation', appeal_date: l(@appeal.created_at.in_time_zone(@resource.time_zone)), strike_date: l(@appeal.strike.created_at.in_time_zone(@resource.time_zone)) %>
|
||||
|
||||
=> <%= root_url %>
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
%tbody
|
||||
%tr
|
||||
%td.column-cell.text-center
|
||||
%p= t 'user_mailer.appeal_rejected.explanation', appeal_date: l(@appeal.created_at), strike_date: l(@appeal.strike.created_at)
|
||||
%p= t 'user_mailer.appeal_rejected.explanation', appeal_date: l(@appeal.created_at.in_time_zone(@resource.time_zone)), strike_date: l(@appeal.strike.created_at.in_time_zone(@resource.time_zone))
|
||||
|
||||
%table.email-table{ cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
|
||||
===
|
||||
|
||||
<%= t 'user_mailer.appeal_rejected.explanation', appeal_date: l(@appeal.created_at), strike_date: l(@appeal.strike.created_at) %>
|
||||
<%= t 'user_mailer.appeal_rejected.explanation', appeal_date: l(@appeal.created_at.in_time_zone(@resource.time_zone)), strike_date: l(@appeal.strike.created_at.in_time_zone(@resource.time_zone)) %>
|
||||
|
||||
=> <%= root_url %>
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
%strong= "#{t('sessions.browser')}:"
|
||||
%span{ title: @user_agent }= t 'sessions.description', browser: t("sessions.browsers.#{@detection.id}", default: @detection.id.to_s), platform: t("sessions.platforms.#{@detection.platform.id}", default: @detection.platform.id.to_s)
|
||||
%br/
|
||||
= l(@timestamp)
|
||||
= l(@timestamp.in_time_zone(@resource.time_zone))
|
||||
|
||||
%table.email-table{ cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
<%= t('sessions.ip') %>: <%= @remote_ip %>
|
||||
<%= t('sessions.browser') %>: <%= t('sessions.description', browser: t("sessions.browsers.#{@detection.id}", default: "#{@detection.id}"), platform: t("sessions.platforms.#{@detection.platform.id}", default: "#{@detection.platform.id}")) %>
|
||||
<%= l(@timestamp) %>
|
||||
<%= l(@timestamp.in_time_zone(@resource.time_zone)) %>
|
||||
|
||||
<%= t 'user_mailer.suspicious_sign_in.further_actions_html', action: t('user_mailer.suspicious_sign_in.change_password') %>
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
|
||||
- unless @statuses.empty?
|
||||
- @statuses.each_with_index do |status, i|
|
||||
= render 'notification_mailer/status', status: status, i: i + 1, highlighted: true
|
||||
= render 'notification_mailer/status', status: status, i: i + 1, highlighted: true, time_zone: @resource.time_zone
|
||||
|
||||
%table.email-table{ cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue