mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-10 15:14:33 +08:00
Update step SA notifications [SCI-12131]
This commit is contained in:
parent
d5b1fc0737
commit
48236d41d6
2 changed files with 12 additions and 5 deletions
|
@ -48,7 +48,7 @@ module StepsActions
|
||||||
smart_annotation_notification(
|
smart_annotation_notification(
|
||||||
old_text: old_text,
|
old_text: old_text,
|
||||||
new_text: checklist_item.text,
|
new_text: checklist_item.text,
|
||||||
subject: step.protocol,
|
subject: step,
|
||||||
title: t('notifications.checklist_title',
|
title: t('notifications.checklist_title',
|
||||||
user: current_user.full_name,
|
user: current_user.full_name,
|
||||||
step: step.name),
|
step: step.name),
|
||||||
|
@ -60,7 +60,7 @@ module StepsActions
|
||||||
smart_annotation_notification(
|
smart_annotation_notification(
|
||||||
old_text: old_text,
|
old_text: old_text,
|
||||||
new_text: step_text.text,
|
new_text: step_text.text,
|
||||||
subject: step.protocol,
|
subject: step,
|
||||||
title: t('notifications.step_text_title',
|
title: t('notifications.step_text_title',
|
||||||
user: current_user.full_name,
|
user: current_user.full_name,
|
||||||
step: step.name),
|
step: step.name),
|
||||||
|
@ -72,7 +72,7 @@ module StepsActions
|
||||||
smart_annotation_notification(
|
smart_annotation_notification(
|
||||||
old_text: old_text,
|
old_text: old_text,
|
||||||
new_text: checklist.name,
|
new_text: checklist.name,
|
||||||
subject: step.protocol,
|
subject: step,
|
||||||
title: t('notifications.checklist_title',
|
title: t('notifications.checklist_title',
|
||||||
user: current_user.full_name,
|
user: current_user.full_name,
|
||||||
step: step.name),
|
step: step.name),
|
||||||
|
@ -84,7 +84,7 @@ module StepsActions
|
||||||
smart_annotation_notification(
|
smart_annotation_notification(
|
||||||
old_text: old_text,
|
old_text: old_text,
|
||||||
new_text: step.description,
|
new_text: step.description,
|
||||||
subject: step.protocol,
|
subject: step,
|
||||||
title: t('notifications.step_description_title',
|
title: t('notifications.step_description_title',
|
||||||
user: current_user.full_name,
|
user: current_user.full_name,
|
||||||
step: step.name),
|
step: step.name),
|
||||||
|
@ -96,7 +96,7 @@ module StepsActions
|
||||||
smart_annotation_notification(
|
smart_annotation_notification(
|
||||||
old_text: old_content,
|
old_text: old_content,
|
||||||
new_text: table.contents,
|
new_text: table.contents,
|
||||||
subject: step.protocol,
|
subject: step,
|
||||||
title: t(table.metadata['plateTemplate'] ? 'notifications.step_well_plate_title' : 'notifications.step_table_title',
|
title: t(table.metadata['plateTemplate'] ? 'notifications.step_well_plate_title' : 'notifications.step_table_title',
|
||||||
user: current_user.full_name,
|
user: current_user.full_name,
|
||||||
step: step.name),
|
step: step.name),
|
||||||
|
|
|
@ -28,6 +28,13 @@ module BreadcrumbsHelper
|
||||||
parent = subject.my_module
|
parent = subject.my_module
|
||||||
url = protocols_my_module_path(subject.my_module)
|
url = protocols_my_module_path(subject.my_module)
|
||||||
end
|
end
|
||||||
|
when Step
|
||||||
|
parent = subject.protocol
|
||||||
|
if parent.in_repository?
|
||||||
|
url = protocol_path(parent, step_id: subject.id)
|
||||||
|
else
|
||||||
|
url = protocols_my_module_path(parent.my_module, step_id: subject.id)
|
||||||
|
end
|
||||||
when Result
|
when Result
|
||||||
parent = subject.my_module
|
parent = subject.my_module
|
||||||
view_mode = subject.archived? ? 'archived' : 'active'
|
view_mode = subject.archived? ? 'archived' : 'active'
|
||||||
|
|
Loading…
Add table
Reference in a new issue