From 06ef479a1eebcc96eabf6cd469de090ce2b210e0 Mon Sep 17 00:00:00 2001 From: wandji20 Date: Mon, 1 Apr 2024 22:04:02 +0100 Subject: [PATCH] Add archived tag to protocol liked tasks modal items [SCI-10560] --- app/controllers/protocols_controller.rb | 8 ++++---- app/models/project.rb | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/controllers/protocols_controller.rb b/app/controllers/protocols_controller.rb index 1f9955ec3..b86cd8ce0 100644 --- a/app/controllers/protocols_controller.rb +++ b/app/controllers/protocols_controller.rb @@ -129,13 +129,13 @@ class ProtocolsController < ApplicationController project_folder = record.my_module.experiment.project.project_folder { - my_module_name: record.my_module.name, - experiment_name: record.my_module.experiment.name, - project_name: record.my_module.experiment.project.name, + my_module_name: record.my_module.name_with_label, + experiment_name: record.my_module.experiment.name_with_label, + project_name: record.my_module.experiment.project.name_with_label, my_module_url: protocols_my_module_path(record.my_module), experiment_url: my_modules_path(experiment_id: record.my_module.experiment.id), project_url: experiments_path(project_id: record.my_module.experiment.project.id), - project_folder_name: project_folder.present? ? project_folder.name : nil, + project_folder_name: project_folder.present? ? project_folder.name_with_label : nil, project_folder_url: project_folder.present? ? project_folder_projects_url(project_folder) : nil } }, diff --git a/app/models/project.rb b/app/models/project.rb index 63144808d..8540caae5 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -322,6 +322,10 @@ class Project < ApplicationRecord report.destroy if report.present? end + def archived_branch? + archived? + end + private def project_folder_team