mirror of
				https://github.com/scinote-eln/scinote-web.git
				synced 2025-11-01 00:56:05 +08:00 
			
		
		
		
	Merge pull request #2237 from aignatov-bio/ai-sci-4114-fix-task-and-protocol-description-activities
Add task description and task protocol description activities [SCI-4114]
This commit is contained in:
		
						commit
						a87cc3ae98
					
				
					 3 changed files with 7 additions and 2 deletions
				
			
		|  | @ -238,6 +238,7 @@ class MyModulesController < ApplicationController | ||||||
|     respond_to do |format| |     respond_to do |format| | ||||||
|       format.json do |       format.json do | ||||||
|         if @my_module.update(description: params.require(:my_module)[:description]) |         if @my_module.update(description: params.require(:my_module)[:description]) | ||||||
|  |           log_activity(:change_module_description) | ||||||
|           TinyMceAsset.update_images(@my_module, params[:tiny_mce_images], current_user) |           TinyMceAsset.update_images(@my_module, params[:tiny_mce_images], current_user) | ||||||
|           render json: { |           render json: { | ||||||
|             html: custom_auto_link( |             html: custom_auto_link( | ||||||
|  | @ -260,6 +261,7 @@ class MyModulesController < ApplicationController | ||||||
|     respond_to do |format| |     respond_to do |format| | ||||||
|       format.json do |       format.json do | ||||||
|         if protocol.update(description: params.require(:protocol)[:description]) |         if protocol.update(description: params.require(:protocol)[:description]) | ||||||
|  |           log_activity(:protocol_description_in_task_edited) | ||||||
|           TinyMceAsset.update_images(protocol, params[:tiny_mce_images], current_user) |           TinyMceAsset.update_images(protocol, params[:tiny_mce_images], current_user) | ||||||
|           render json: { |           render json: { | ||||||
|             html: custom_auto_link( |             html: custom_auto_link( | ||||||
|  |  | ||||||
|  | @ -246,14 +246,15 @@ class Extends | ||||||
|     update_share_inventory: 133, |     update_share_inventory: 133, | ||||||
|     share_inventory_with_all: 134, |     share_inventory_with_all: 134, | ||||||
|     unshare_inventory_with_all: 135, |     unshare_inventory_with_all: 135, | ||||||
|     update_share_with_all_permission_level: 136 |     update_share_with_all_permission_level: 136, | ||||||
|  |     protocol_description_in_task_edited: 137 | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   ACTIVITY_GROUPS = { |   ACTIVITY_GROUPS = { | ||||||
|     projects: [*0..7, 32, 33, 34, 95, 108, 65, 109], |     projects: [*0..7, 32, 33, 34, 95, 108, 65, 109], | ||||||
|     task_results: [23, 26, 25, 42, 24, 40, 41, 99, 110, 122, 116, 128], |     task_results: [23, 26, 25, 42, 24, 40, 41, 99, 110, 122, 116, 128], | ||||||
|     task: [8, 58, 9, 59, 10, 11, 12, 13, 14, 35, 36, 37, 53, 54, *60..64, *66..69, 106, 126, 120, 132], |     task: [8, 58, 9, 59, 10, 11, 12, 13, 14, 35, 36, 37, 53, 54, *60..64, *66..69, 106, 126, 120, 132], | ||||||
|     task_protocol: [15, 22, 16, 18, 19, 20, 21, 17, 38, 39, 100, 111, 45, 46, 47, 121, 124, 115, 118, 127, 130], |     task_protocol: [15, 22, 16, 18, 19, 20, 21, 17, 38, 39, 100, 111, 45, 46, 47, 121, 124, 115, 118, 127, 130, 137], | ||||||
|     task_inventory: [55, 56], |     task_inventory: [55, 56], | ||||||
|     experiment: [*27..31, 57], |     experiment: [*27..31, 57], | ||||||
|     reports: [48, 50, 49], |     reports: [48, 50, 49], | ||||||
|  |  | ||||||
|  | @ -164,6 +164,7 @@ en: | ||||||
|       delete_chemical_structure_on_task_protocol_html: "%{user} deleted chemical structure %{asset_name} on task's protocol %{my_module}." |       delete_chemical_structure_on_task_protocol_html: "%{user} deleted chemical structure %{asset_name} on task's protocol %{my_module}." | ||||||
|       delete_chemical_structure_on_protocol_html: "%{user} deleted chemical structure %{asset_name} on protocol %{protocol}." |       delete_chemical_structure_on_protocol_html: "%{user} deleted chemical structure %{asset_name} on protocol %{protocol}." | ||||||
|       delete_chemical_structure_on_task_html: "%{user} deleted chemical structure %{asset_name} on task %{my_module}." |       delete_chemical_structure_on_task_html: "%{user} deleted chemical structure %{asset_name} on task %{my_module}." | ||||||
|  |       protocol_description_in_task_edited_html: "%{user} edited protocol description on task %{my_module}." | ||||||
| 
 | 
 | ||||||
|     activity_name: |     activity_name: | ||||||
|       create_project: "Project created" |       create_project: "Project created" | ||||||
|  | @ -293,6 +294,7 @@ en: | ||||||
|       delete_chemical_structure_on_task_protocol: "Chemical structure on task protocol deleted" |       delete_chemical_structure_on_task_protocol: "Chemical structure on task protocol deleted" | ||||||
|       delete_chemical_structure_on_protocol: "Chemical structure on protocol deleted" |       delete_chemical_structure_on_protocol: "Chemical structure on protocol deleted" | ||||||
|       delete_chemical_structure_on_task: "Chemical structure on task deleted" |       delete_chemical_structure_on_task: "Chemical structure on task deleted" | ||||||
|  |       protocol_description_in_task_edited: "Protocol description in task edited" | ||||||
| 
 | 
 | ||||||
|     activity_group: |     activity_group: | ||||||
|       projects: "Projects" |       projects: "Projects" | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue