diff --git a/app/plugins/CoreEnroller/src/Model/Table/AttributeCollectorsTable.php b/app/plugins/CoreEnroller/src/Model/Table/AttributeCollectorsTable.php index 2c7701b4c..23bd6e444 100644 --- a/app/plugins/CoreEnroller/src/Model/Table/AttributeCollectorsTable.php +++ b/app/plugins/CoreEnroller/src/Model/Table/AttributeCollectorsTable.php @@ -80,15 +80,32 @@ public function initialize(array $config): void { $this->setTabsConfig( [ // Ordered list of Tabs - 'tabs' => ['EnrollmentFlowSteps', 'CoreEnroller.AttributeCollectors', 'CoreEnroller.EnrollmentAttributes'], + 'tabs' => ['EnrollmentFlows', 'EnrollmentFlowSteps', 'Petitions'], // What actions will inlcude the subnavigation header 'action' => [ // If a model renders in a subnavigation mode in edit/view mode, it cannot // render in index mode for the same use case/context // XXX edit should go first. - 'EnrollmentFlowSteps' => ['edit', 'view'], - 'CoreEnroller.AttributeCollectors' => ['edit'], - 'CoreEnroller.EnrollmentAttributes' => ['index'], + 'EnrollmentFlows' => ['edit', 'view'], + 'EnrollmentFlowSteps' => ['index'], + 'Petitions' => ['index'], + ], + // What model will have a counter-badge after the tab title + 'counter' => ['EnrollmentFlowSteps', 'Petitions'], + 'nested' => [ + // Ordered list of Tabs + 'tabs' => ['EnrollmentFlowSteps', 'CoreEnroller.AttributeCollectors', 'CoreEnroller.EnrollmentAttributes'], + // What actions will include the subnavigation header + 'action' => [ + // If a model renders in a subnavigation mode in edit/view mode, it cannot + // render in index mode for the same use case/context + // XXX edit should go first. + 'EnrollmentFlowSteps' => ['edit', 'view'], + 'CoreEnroller.AttributeCollectors' => ['edit'], + 'CoreEnroller.EnrollmentAttributes' => ['index'] + ], + // What model will have a counter-badge after the tab title + 'counter' => ['CoreEnroller.EnrollmentAttributes'], ] ] ); diff --git a/app/src/Lib/Traits/TabTrait.php b/app/src/Lib/Traits/TabTrait.php index 66f029f25..311bf3cef 100644 --- a/app/src/Lib/Traits/TabTrait.php +++ b/app/src/Lib/Traits/TabTrait.php @@ -1,6 +1,10 @@ >>>>>>> 9a427e22 (feature-cfm31-subnavigation (#217)):app/templates/element/subnavigation/inlineList.php * * Portions licensed to the University Corporation for Advanced Internet * Development, Inc. ("UCAID") under one or more contributor license agreements. @@ -25,8 +29,10 @@ * @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) */ + declare(strict_types = 1); +<<<<<<<< HEAD:app/src/Lib/Traits/TabTrait.php namespace App\Lib\Traits; trait TabTrait @@ -68,4 +74,31 @@ public function setTabsConfig(array $tabsConfig): void $this->tabsConfig = $tabsConfig; } -} \ No newline at end of file +} +======== +$curAction = $this->request->getParam('action'); +$curController = $this->request->getParam('controller'); +$isNested = true; + +extract($vv_sub_nav_attributes, EXTR_PREFIX_ALL, 'vv_subnavigation'); + +$curId = $this->request->getQuery($vv_primary_link) + ?? $vv_obj->id + ?? end($vv_bc_title_links[0]['target']); +?> + + +