mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-27 02:04:33 +08:00
Incomplete/missing text in notification emails [SCI-9843]
This commit is contained in:
parent
94e8a8d89f
commit
69ca8c5022
2 changed files with 9 additions and 3 deletions
|
@ -4,7 +4,7 @@ class RepositoryItemDateNotification < BaseNotification
|
||||||
def message
|
def message
|
||||||
unit = human_readable_unit(column.metadata['reminder_unit'], column.metadata['reminder_value'])
|
unit = human_readable_unit(column.metadata['reminder_unit'], column.metadata['reminder_value'])
|
||||||
I18n.t(
|
I18n.t(
|
||||||
'notifications.notification.item_date_reminder_html',
|
'notifications.content.item_date_reminder.message_html',
|
||||||
repository_row_name: subject.name,
|
repository_row_name: subject.name,
|
||||||
value: column.metadata['reminder_value'],
|
value: column.metadata['reminder_value'],
|
||||||
units: unit
|
units: unit
|
||||||
|
@ -15,7 +15,9 @@ class RepositoryItemDateNotification < BaseNotification
|
||||||
:item_date_reminder
|
:item_date_reminder
|
||||||
end
|
end
|
||||||
|
|
||||||
def title; end
|
def title
|
||||||
|
I18n.t('notifications.content.item_date_reminder.title_html')
|
||||||
|
end
|
||||||
|
|
||||||
def subject
|
def subject
|
||||||
RepositoryRow.find(params[:repository_row_id])
|
RepositoryRow.find(params[:repository_row_id])
|
||||||
|
@ -36,6 +38,8 @@ class RepositoryItemDateNotification < BaseNotification
|
||||||
private
|
private
|
||||||
|
|
||||||
def human_readable_unit(seconds, value)
|
def human_readable_unit(seconds, value)
|
||||||
|
return unless seconds
|
||||||
|
|
||||||
units_hash = {
|
units_hash = {
|
||||||
'2419200' => 'month',
|
'2419200' => 'month',
|
||||||
'604800' => 'week',
|
'604800' => 'week',
|
||||||
|
|
|
@ -12,7 +12,9 @@ class TaskDueDateNotification < BaseNotification
|
||||||
:my_module_due_date_reminder
|
:my_module_due_date_reminder
|
||||||
end
|
end
|
||||||
|
|
||||||
def title; end
|
def title
|
||||||
|
I18n.t('notifications.content.my_module_due_date_reminder.title_html')
|
||||||
|
end
|
||||||
|
|
||||||
def subject
|
def subject
|
||||||
MyModule.find(params[:my_module_id])
|
MyModule.find(params[:my_module_id])
|
||||||
|
|
Loading…
Reference in a new issue