From 58a3c214c929122780655fb1de14309d63eb756d Mon Sep 17 00:00:00 2001 From: Arlen Johnson Date: Thu, 7 Mar 2024 14:06:46 -0500 Subject: [PATCH] Add top-level subnavigation to Enrollment Flow and Enrollment Flow Steps (CFM-31) --- app/templates/EnrollmentFlowSteps/columns.inc | 5 +++ app/templates/EnrollmentFlows/fields-nav.inc | 5 +++ app/templates/element/subnavigation.php | 42 +++++++++++++++++-- 3 files changed, 49 insertions(+), 3 deletions(-) diff --git a/app/templates/EnrollmentFlowSteps/columns.inc b/app/templates/EnrollmentFlowSteps/columns.inc index 5d4acadc1..3f2035cdb 100644 --- a/app/templates/EnrollmentFlowSteps/columns.inc +++ b/app/templates/EnrollmentFlowSteps/columns.inc @@ -56,4 +56,9 @@ $rowActions = [ 'label' => __d('operation', 'configure.plugin'), 'icon' => 'electrical_services' ] +]; + +$subnav = [ + 'name' => 'enrollment_flow', + 'active' => 'steps' ]; \ No newline at end of file diff --git a/app/templates/EnrollmentFlows/fields-nav.inc b/app/templates/EnrollmentFlows/fields-nav.inc index 0784d543c..614ac726f 100644 --- a/app/templates/EnrollmentFlows/fields-nav.inc +++ b/app/templates/EnrollmentFlows/fields-nav.inc @@ -47,3 +47,8 @@ $topLinks[] = [ ], 'class' => '' ]; + +$subnav = [ + 'name' => 'enrollment_flow', + 'active' => 'properties' +]; \ No newline at end of file diff --git a/app/templates/element/subnavigation.php b/app/templates/element/subnavigation.php index 5aa1f15b1..a02cb6eea 100644 --- a/app/templates/element/subnavigation.php +++ b/app/templates/element/subnavigation.php @@ -69,6 +69,8 @@ $linkFilter = ['person_id' => $curId]; } elseif ($name == 'group') { $linkFilter = ['group_id' => $curId]; + } elseif ($name == 'enrollment_flow') { + $linkFilter = ['enrollment_flow_id' => $curId]; } } elseif(!empty($vv_bc_title_links)) { // All else fails? Use the breadcrumb which has figured this out. @@ -100,6 +102,8 @@ $supertitle = $vv_obj->$vv_display_field; } elseif(!empty($vv_bc_parent_obj)) { $supertitle = $vv_bc_parent_obj->$vv_bc_parent_displayfield; +} elseif(!empty($vv_primary_link_obj)) { + $supertitle = $vv_primary_link_obj->name; } elseif(!empty($vv_bc_title_links)) { // All else fails? Use the breadcrumb which has figured this out. // XXX We might just be able to do this and skip all the above after breadcrumbs have been refactored @@ -282,8 +286,8 @@ */ ?> - - + + + + + +