From deaecf57c960beb5f06ce8502d0ea1a66474a7f9 Mon Sep 17 00:00:00 2001 From: aignatov-bio Date: Mon, 16 Nov 2020 12:21:03 +0100 Subject: [PATCH 1/2] Add activity for project moving --- config/initializers/extends.rb | 7 ++++--- config/locales/global_activities/en.yml | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/config/initializers/extends.rb b/config/initializers/extends.rb index 5959a0edf..7c1b54cf3 100644 --- a/config/initializers/extends.rb +++ b/config/initializers/extends.rb @@ -145,7 +145,7 @@ class Extends ACTIVITY_MESSAGE_ITEMS_TYPES = ACTIVITY_SUBJECT_TYPES + %w( - User Tag RepositoryColumn RepositoryRow Step Asset TinyMceAsset Repository MyModuleStatus RepositorySnapshot + User Tag RepositoryColumn RepositoryRow Step Asset TinyMceAsset Repository MyModuleStatus RepositorySnapshot ProjectFolder ).freeze @@ -292,11 +292,12 @@ class Extends restore_inventory: 145, export_inventory_items_assigned_to_task: 146, export_inventory_snapshot_items_assigned_to_task: 147, - change_status_on_task_flow: 148 # 149, 150, 151 in AdddOn! + change_status_on_task_flow: 148, # 149, 150, 151 in AdddOn! + move_project: 158 } ACTIVITY_GROUPS = { - projects: [*0..7, 32, 33, 34, 95, 108, 65, 109], + projects: [*0..7, 32, 33, 34, 95, 108, 65, 109, 158], task_results: [23, 26, 25, 42, 24, 40, 41, 99, 110, 122, 116, 128], task: [8, 58, 9, 59, *10..14, 35, 36, 37, 53, 54, *60..63, 138, 139, 140, 64, 66, 106, 126, 120, 132, *146..148], diff --git a/config/locales/global_activities/en.yml b/config/locales/global_activities/en.yml index 4003537e1..fc2a525ed 100644 --- a/config/locales/global_activities/en.yml +++ b/config/locales/global_activities/en.yml @@ -176,6 +176,7 @@ en: export_inventory_items_assigned_to_task_html: "%{user} exported inventory item(s) assigned to task %{my_module} from inventory %{repository}: Live version." export_inventory_snapshot_items_assigned_to_task_html: "%{user} exported inventory item(s) assigned to task %{my_module} from inventory %{repository_snapshot}: Snapshot of %{created_at}." change_status_on_task_flow_html: "%{user} changed status from %{my_module_status_old} to %{my_module_status_new} for task %{my_module}." + move_project_html: "%{user} moved %{project} project to %{project_folder_dest} folder from %{project_folder_src} folder" activity_name: create_project: "Project created" @@ -317,6 +318,7 @@ en: export_inventory_items_assigned_to_task: "Task-assigned inventory items exported (live version)" export_inventory_snapshot_items_assigned_to_task: "Task-assigned inventory items exported (snapshot)" change_status_on_task_flow: "Task status changed" + move_project: "Project moved" activity_group: projects: "Projects" From 56a58e08eb4c427f25ad6a60cb0db28522b07313 Mon Sep 17 00:00:00 2001 From: aignatov-bio Date: Mon, 23 Nov 2020 14:22:10 +0100 Subject: [PATCH 2/2] Fix markup --- config/initializers/extends.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/initializers/extends.rb b/config/initializers/extends.rb index 7c1b54cf3..27c412bde 100644 --- a/config/initializers/extends.rb +++ b/config/initializers/extends.rb @@ -145,10 +145,10 @@ class Extends ACTIVITY_MESSAGE_ITEMS_TYPES = ACTIVITY_SUBJECT_TYPES + %w( - User Tag RepositoryColumn RepositoryRow Step Asset TinyMceAsset Repository MyModuleStatus RepositorySnapshot ProjectFolder + User Tag RepositoryColumn RepositoryRow Step Asset TinyMceAsset + Repository MyModuleStatus RepositorySnapshot ProjectFolder ).freeze - ACTIVITY_TYPES = { create_project: 0, rename_project: 1,