From 34243cd91dec6eafd475ce4ed6606b08d01d6a5f Mon Sep 17 00:00:00 2001 From: Marios Ioannidis Date: Tue, 4 Jun 2024 16:50:34 +0100 Subject: [PATCH 1/4] 718; Updating Service contacts local task weight from 10 to 80 --- .../localgov_workflows_notifications.links.task.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/localgov_workflows_notifications/localgov_workflows_notifications.links.task.yml b/modules/localgov_workflows_notifications/localgov_workflows_notifications.links.task.yml index 053eb59..2fdbbf5 100644 --- a/modules/localgov_workflows_notifications/localgov_workflows_notifications.links.task.yml +++ b/modules/localgov_workflows_notifications/localgov_workflows_notifications.links.task.yml @@ -15,4 +15,4 @@ entity.localgov_service_contact.collection: title: 'Service contacts' route_name: entity.localgov_service_contact.collection base_route: system.admin_content - weight: 10 + weight: 80 From fb61c123e64713ad41fe15bc68ec476cd5e5d891 Mon Sep 17 00:00:00 2001 From: Marios Ioannidis Date: Tue, 4 Jun 2024 16:52:14 +0100 Subject: [PATCH 2/4] 718; Update Scheduled transitions weight to 70 --- localgov_workflows.module | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/localgov_workflows.module b/localgov_workflows.module index e1d0fcc..a190f67 100644 --- a/localgov_workflows.module +++ b/localgov_workflows.module @@ -152,6 +152,10 @@ function localgov_workflows_menu_local_tasks_alter(&$data, $route_name, Refinabl $arguments['@title'] = 'Scheduling'; $data['tabs'][0]['scheduled_transitions.tasks:node.scheduled_transitions']['#link']['title'] = t($title->getUntranslatedString(), $arguments); // phpcs:ignore. } + // Alter "Scheduled transitions" weight. + if (isset($data['tabs'][0]['entity.scheduled_transition.collection'])) { + $data['tabs'][0]['entity.scheduled_transition.collection']['#weight'] = 70; + } // Rename 'Moderated content' tab to 'Unpublished'. if (isset($data['tabs'][1]['content_moderation.workflows:content_moderation.moderated_content'])) { From 0eaee78db6379aecfc202c13be1a53861bebcf97 Mon Sep 17 00:00:00 2001 From: Marios Ioannidis Date: Tue, 4 Jun 2024 17:08:54 +0100 Subject: [PATCH 3/4] 718; Use one code block --- localgov_workflows.module | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/localgov_workflows.module b/localgov_workflows.module index a190f67..d57d442 100644 --- a/localgov_workflows.module +++ b/localgov_workflows.module @@ -142,9 +142,10 @@ function localgov_workflows_menu_local_tasks_alter(&$data, $route_name, Refinabl } } - // Rename 'Scheduled transitions' tab to 'Scheduling'. + // Rename 'Scheduled transitions' tab to 'Scheduling' and increase its weight. if (isset($data['tabs'][0]['entity.scheduled_transition.collection'])) { $data['tabs'][0]['entity.scheduled_transition.collection']['#link']['title'] = t('Scheduling'); + $data['tabs'][0]['entity.scheduled_transition.collection']['#weight'] = 70; } if (isset($data['tabs'][0]['scheduled_transitions.tasks:node.scheduled_transitions']['#link']['title'])) { $title = $data['tabs'][0]['scheduled_transitions.tasks:node.scheduled_transitions']['#link']['title']; @@ -152,10 +153,6 @@ function localgov_workflows_menu_local_tasks_alter(&$data, $route_name, Refinabl $arguments['@title'] = 'Scheduling'; $data['tabs'][0]['scheduled_transitions.tasks:node.scheduled_transitions']['#link']['title'] = t($title->getUntranslatedString(), $arguments); // phpcs:ignore. } - // Alter "Scheduled transitions" weight. - if (isset($data['tabs'][0]['entity.scheduled_transition.collection'])) { - $data['tabs'][0]['entity.scheduled_transition.collection']['#weight'] = 70; - } // Rename 'Moderated content' tab to 'Unpublished'. if (isset($data['tabs'][1]['content_moderation.workflows:content_moderation.moderated_content'])) { From f9084a8c02ee2e6cf8f1b9c4fda7d5ed561e400f Mon Sep 17 00:00:00 2001 From: Marios Ioannidis Date: Tue, 4 Jun 2024 17:31:44 +0100 Subject: [PATCH 4/4] 718; CS --- localgov_workflows.module | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/localgov_workflows.module b/localgov_workflows.module index d57d442..9b6561d 100644 --- a/localgov_workflows.module +++ b/localgov_workflows.module @@ -145,7 +145,7 @@ function localgov_workflows_menu_local_tasks_alter(&$data, $route_name, Refinabl // Rename 'Scheduled transitions' tab to 'Scheduling' and increase its weight. if (isset($data['tabs'][0]['entity.scheduled_transition.collection'])) { $data['tabs'][0]['entity.scheduled_transition.collection']['#link']['title'] = t('Scheduling'); - $data['tabs'][0]['entity.scheduled_transition.collection']['#weight'] = 70; + $data['tabs'][0]['entity.scheduled_transition.collection']['#weight'] = 70; } if (isset($data['tabs'][0]['scheduled_transitions.tasks:node.scheduled_transitions']['#link']['title'])) { $title = $data['tabs'][0]['scheduled_transitions.tasks:node.scheduled_transitions']['#link']['title'];