From 80ee866700abed563cc5a1e86fdf9b0e53f4327a Mon Sep 17 00:00:00 2001 From: Arlen Johnson Date: Tue, 27 Oct 2026 16:41:57 -0500 Subject: [PATCH 1/2] Improve Flange UI, and fix incorrect tab links (CFM-523) --- .../templates/ApiSources/fields.inc | 8 +- .../Model/Table/IdentifierMappersTable.php | 13 ++ .../Model/Table/LoginIdentifierTypesTable.php | 13 ++ .../Model/Table/PersonRoleMappersTable.php | 13 ++ .../Model/Table/PersonRoleMappingsTable.php | 15 ++- .../templates/IdentifierMappers/fields.inc | 24 ++-- .../LoginIdentifierTypes/columns.inc | 10 +- .../templates/LoginIdentifierTypes/fields.inc | 2 + .../templates/PersonRoleMappers/fields.inc | 23 ++-- .../templates/PersonRoleMappings/columns.inc | 10 +- .../templates/PersonRoleMappings/fields.inc | 2 + .../templates/SshKeyAuthenticators/fields.inc | 16 +-- app/src/Model/Table/FlangesTable.php | 15 +++ app/src/View/Helper/TabHelper.php | 113 ++++++++++++++++-- app/templates/Flanges/columns.inc | 14 ++- app/templates/Flanges/fields.inc | 2 + app/templates/Pipelines/fields.inc | 14 +-- app/templates/Standard/index.php | 3 +- app/templates/Standard/subnavigation.inc | 29 ++++- .../element/subnavigation/supertitle.php | 8 +- .../element/subnavigation/tabList.php | 2 +- app/webroot/css/co-base.css | 27 ++--- 22 files changed, 271 insertions(+), 105 deletions(-) diff --git a/app/availableplugins/ApiConnector/templates/ApiSources/fields.inc b/app/availableplugins/ApiConnector/templates/ApiSources/fields.inc index e3178098d..b7da8af0b 100644 --- a/app/availableplugins/ApiConnector/templates/ApiSources/fields.inc +++ b/app/availableplugins/ApiConnector/templates/ApiSources/fields.inc @@ -25,6 +25,7 @@ * @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) */ +// There are currently no directly configurable fields for this model. $alerts = [ [ 'type' => 'information', @@ -32,13 +33,6 @@ $alerts = [ ] ]; -// XXX Revisit this - what's the "Push Mode" text attempting to convey here (with no other information)? -$fields = [ - 'SUBTITLE' => [ - 'subtitle' => __d('api_connector', 'field.ApiSources.push_mode') - ] -]; - $subnav = [ 'tabs' => ['ExternalIdentitySources', 'ApiConnector.ApiSources', 'ExternalIdentitySources@action.search'], 'action' => [ diff --git a/app/availableplugins/PipelineToolkit/src/Model/Table/IdentifierMappersTable.php b/app/availableplugins/PipelineToolkit/src/Model/Table/IdentifierMappersTable.php index bcf15f191..42c34e508 100644 --- a/app/availableplugins/PipelineToolkit/src/Model/Table/IdentifierMappersTable.php +++ b/app/availableplugins/PipelineToolkit/src/Model/Table/IdentifierMappersTable.php @@ -41,6 +41,19 @@ class IdentifierMappersTable extends Table { use \App\Lib\Traits\TableMetaTrait; use \App\Lib\Traits\ValidationTrait; + /** + * Provide the default layout + * + * @since COmanage Registry v5.4.0 + * @return string Type of redirect + */ + public function getLayout(string $action = ''): string { + return match($action) { + 'index','add','edit','view','deleted' => 'iframe', + default => 'default' + }; + } + /** * Perform Cake Model initialization. * diff --git a/app/availableplugins/PipelineToolkit/src/Model/Table/LoginIdentifierTypesTable.php b/app/availableplugins/PipelineToolkit/src/Model/Table/LoginIdentifierTypesTable.php index 3e72832c7..5d592e1a6 100644 --- a/app/availableplugins/PipelineToolkit/src/Model/Table/LoginIdentifierTypesTable.php +++ b/app/availableplugins/PipelineToolkit/src/Model/Table/LoginIdentifierTypesTable.php @@ -43,6 +43,19 @@ class LoginIdentifierTypesTable extends Table { use \App\Lib\Traits\TableMetaTrait; use \App\Lib\Traits\ValidationTrait; + /** + * Provide the default layout + * + * @since COmanage Registry v5.4.0 + * @return string Type of redirect + */ + public function getLayout(string $action = ''): string { + return match($action) { + 'index','add','edit','view','deleted' => 'iframe', + default => 'default' + }; + } + /** * Perform Cake Model initialization. * diff --git a/app/availableplugins/PipelineToolkit/src/Model/Table/PersonRoleMappersTable.php b/app/availableplugins/PipelineToolkit/src/Model/Table/PersonRoleMappersTable.php index 437bbefb2..9387ccff4 100644 --- a/app/availableplugins/PipelineToolkit/src/Model/Table/PersonRoleMappersTable.php +++ b/app/availableplugins/PipelineToolkit/src/Model/Table/PersonRoleMappersTable.php @@ -41,6 +41,19 @@ class PersonRoleMappersTable extends Table { use \App\Lib\Traits\TableMetaTrait; use \App\Lib\Traits\ValidationTrait; + /** + * Provide the default layout + * + * @since COmanage Registry v5.4.0 + * @return string Type of redirect + */ + public function getLayout(string $action = ''): string { + return match($action) { + 'index','add','edit','view','deleted' => 'iframe', + default => 'default' + }; + } + /** * Perform Cake Model initialization. * diff --git a/app/availableplugins/PipelineToolkit/src/Model/Table/PersonRoleMappingsTable.php b/app/availableplugins/PipelineToolkit/src/Model/Table/PersonRoleMappingsTable.php index cd4fd5415..8d0977295 100644 --- a/app/availableplugins/PipelineToolkit/src/Model/Table/PersonRoleMappingsTable.php +++ b/app/availableplugins/PipelineToolkit/src/Model/Table/PersonRoleMappingsTable.php @@ -42,7 +42,20 @@ class PersonRoleMappingsTable extends Table { use \App\Lib\Traits\PrimaryLinkTrait; use \App\Lib\Traits\TableMetaTrait; use \App\Lib\Traits\ValidationTrait; - + + /** + * Provide the default layout + * + * @since COmanage Registry v5.4.0 + * @return string Type of redirect + */ + public function getLayout(string $action = ''): string { + return match($action) { + 'index','add','edit','view','deleted' => 'iframe', + default => 'default' + }; + } + /** * Perform Cake Model initialization. * diff --git a/app/availableplugins/PipelineToolkit/templates/IdentifierMappers/fields.inc b/app/availableplugins/PipelineToolkit/templates/IdentifierMappers/fields.inc index 403f3f929..b6d9d1700 100644 --- a/app/availableplugins/PipelineToolkit/templates/IdentifierMappers/fields.inc +++ b/app/availableplugins/PipelineToolkit/templates/IdentifierMappers/fields.inc @@ -25,20 +25,14 @@ * @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) */ -// There are currently no directly configurable fields for this model.) -$suppress_submit = true; - -// Top Links -$topLinks[] = [ - 'icon' => 'transform', - 'order' => 'Default', - 'label' => __d('pipeline_toolkit', 'controller.LoginIdentifierTypes', [99]), - 'link' => [ - 'plugin' => 'PipelineToolkit', - 'controller' => 'LoginIdentifierTypes', - 'action' => 'index', - 'identifier_mapper_id' => $vv_obj->id - ], - 'class' => '' +// There are currently no directly configurable fields for this model. +$alerts = [ + [ + 'type' => 'information', + 'message' => __d('information', 'plugin.config.none') + ] ]; + +$subnav = 'flanges'; + ?> diff --git a/app/availableplugins/PipelineToolkit/templates/LoginIdentifierTypes/columns.inc b/app/availableplugins/PipelineToolkit/templates/LoginIdentifierTypes/columns.inc index f287f169c..aee3bf653 100644 --- a/app/availableplugins/PipelineToolkit/templates/LoginIdentifierTypes/columns.inc +++ b/app/availableplugins/PipelineToolkit/templates/LoginIdentifierTypes/columns.inc @@ -39,10 +39,6 @@ $indexColumns = [ ] ]; -/* -// When the $bulkActions variable exists in a columns.inc config, the "Bulk edit" switch will appear in the index. -$bulkActions = [ - // TODO: develop bulk actions. For now, use a placeholder. - 'delete' => true -]; -*/ +$inIframe = true; + +$subnav = 'flanges'; diff --git a/app/availableplugins/PipelineToolkit/templates/LoginIdentifierTypes/fields.inc b/app/availableplugins/PipelineToolkit/templates/LoginIdentifierTypes/fields.inc index 69c161ed5..8cf27d5c0 100644 --- a/app/availableplugins/PipelineToolkit/templates/LoginIdentifierTypes/fields.inc +++ b/app/availableplugins/PipelineToolkit/templates/LoginIdentifierTypes/fields.inc @@ -29,3 +29,5 @@ $fields = [ 'type_id', 'login' ]; + +$subnav = 'flanges'; diff --git a/app/availableplugins/PipelineToolkit/templates/PersonRoleMappers/fields.inc b/app/availableplugins/PipelineToolkit/templates/PersonRoleMappers/fields.inc index 5579fb55a..8257e7411 100644 --- a/app/availableplugins/PipelineToolkit/templates/PersonRoleMappers/fields.inc +++ b/app/availableplugins/PipelineToolkit/templates/PersonRoleMappers/fields.inc @@ -25,21 +25,14 @@ * @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) */ -// There are currently no directly configurable fields for this model.) -$suppress_submit = true; - -// Top Links -$topLinks[] = [ - 'icon' => 'transform', - 'order' => 'Default', - 'label' => __d('pipeline_toolkit', 'controller.PersonRoleMappings', [99]), - 'link' => [ - 'plugin' => 'PipelineToolkit', - 'controller' => 'PersonRoleMappings', - 'action' => 'index', - 'person_role_mapper_id' => $vv_obj->id - ], - 'class' => '' +// There are currently no directly configurable fields for this model. +$alerts = [ + [ + 'type' => 'information', + 'message' => __d('information', 'plugin.config.none') + ] ]; +$subnav = 'flanges'; + ?> diff --git a/app/availableplugins/PipelineToolkit/templates/PersonRoleMappings/columns.inc b/app/availableplugins/PipelineToolkit/templates/PersonRoleMappings/columns.inc index 8b442abea..65c1d7197 100644 --- a/app/availableplugins/PipelineToolkit/templates/PersonRoleMappings/columns.inc +++ b/app/availableplugins/PipelineToolkit/templates/PersonRoleMappings/columns.inc @@ -45,10 +45,6 @@ $indexColumns = [ ] ]; -/* -// When the $bulkActions variable exists in a columns.inc config, the "Bulk edit" switch will appear in the index. -$bulkActions = [ - // TODO: develop bulk actions. For now, use a placeholder. - 'delete' => true -]; -*/ +$inIframe = true; + +$subnav = 'flanges'; diff --git a/app/availableplugins/PipelineToolkit/templates/PersonRoleMappings/fields.inc b/app/availableplugins/PipelineToolkit/templates/PersonRoleMappings/fields.inc index 5ad27c9d3..395117e59 100644 --- a/app/availableplugins/PipelineToolkit/templates/PersonRoleMappings/fields.inc +++ b/app/availableplugins/PipelineToolkit/templates/PersonRoleMappings/fields.inc @@ -38,6 +38,8 @@ $fields = [ 'ordr' ]; +$subnav = 'flanges'; + ?>