mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-23 23:35:00 +08:00
Add draft created activity [SCI-8093]
This commit is contained in:
parent
078f4583ec
commit
e4e8997cc1
3 changed files with 5 additions and 2 deletions
|
@ -389,6 +389,7 @@ class ProtocolsController < ApplicationController
|
||||||
flash[:error] = draft.errors.full_messages.join(', ')
|
flash[:error] = draft.errors.full_messages.join(', ')
|
||||||
redirect_to protocols_path
|
redirect_to protocols_path
|
||||||
else
|
else
|
||||||
|
log_activity(:protocol_template_draft_created, nil, protocol: @protocol.id)
|
||||||
redirect_to protocol_path(draft)
|
redirect_to protocol_path(draft)
|
||||||
end
|
end
|
||||||
rescue StandardError => e
|
rescue StandardError => e
|
||||||
|
|
|
@ -436,7 +436,8 @@ class Extends
|
||||||
protocol_template_access_granted: 233,
|
protocol_template_access_granted: 233,
|
||||||
protocol_template_access_changed: 234,
|
protocol_template_access_changed: 234,
|
||||||
protocol_template_access_revoked: 235,
|
protocol_template_access_revoked: 235,
|
||||||
task_protocol_save_to_template: 236
|
task_protocol_save_to_template: 236,
|
||||||
|
protocol_template_draft_created: 237
|
||||||
}
|
}
|
||||||
|
|
||||||
ACTIVITY_GROUPS = {
|
ACTIVITY_GROUPS = {
|
||||||
|
@ -453,7 +454,7 @@ class Extends
|
||||||
78, 96, 107, 113, 114, *133..136, 180, 181, 182],
|
78, 96, 107, 113, 114, *133..136, 180, 181, 182],
|
||||||
protocol_repository: [80, 103, 89, 87, 79, 90, 91, 88, 85, 86, 84, 81, 82,
|
protocol_repository: [80, 103, 89, 87, 79, 90, 91, 88, 85, 86, 84, 81, 82,
|
||||||
83, 101, 112, 123, 125, 117, 119, 129, 131, 170, 173, 179, 187, 186,
|
83, 101, 112, 123, 125, 117, 119, 129, 131, 170, 173, 179, 187, 186,
|
||||||
190, 191, *204..215, 220, 221, 223, 227, 228, 229, *230..235],
|
190, 191, *204..215, 220, 221, 223, 227, 228, 229, *230..235, 237],
|
||||||
team: [92, 94, 93, 97, 104],
|
team: [92, 94, 93, 97, 104],
|
||||||
label_repository: [*216..219]
|
label_repository: [*216..219]
|
||||||
}
|
}
|
||||||
|
|
|
@ -257,6 +257,7 @@ en:
|
||||||
protocol_template_published_html: "%{user} published protocol template %{protocol} version %{version_number}"
|
protocol_template_published_html: "%{user} published protocol template %{protocol} version %{version_number}"
|
||||||
protocol_template_revision_notes_updated_html: "%{user} edited revision notes of %{protocol}"
|
protocol_template_revision_notes_updated_html: "%{user} edited revision notes of %{protocol}"
|
||||||
protocol_template_draft_deleted_html: "%{user} deleted draft of %{protocol}"
|
protocol_template_draft_deleted_html: "%{user} deleted draft of %{protocol}"
|
||||||
|
protocol_template_draft_created_html: "%{user} created draft of %{protocol}"
|
||||||
protocol_template_access_granted_html: "%{user} granted access to %{user_target} with user role %{role} to protocol template %{protocol}"
|
protocol_template_access_granted_html: "%{user} granted access to %{user_target} with user role %{role} to protocol template %{protocol}"
|
||||||
protocol_template_access_changed_html: "%{user} changed %{user_target}’s role on protocol template %{protocol} to %{role}"
|
protocol_template_access_changed_html: "%{user} changed %{user_target}’s role on protocol template %{protocol} to %{role}"
|
||||||
protocol_template_access_revoked_html: "%{user} removed %{user_target} with user role %{role} from protocol template %{protocol}"
|
protocol_template_access_revoked_html: "%{user} removed %{user_target} with user role %{role} from protocol template %{protocol}"
|
||||||
|
|
Loading…
Reference in a new issue