Skip to content

Commit

Permalink
Add main-menu navigation for Petitions and Enrollments (CFM-31)
Browse files Browse the repository at this point in the history
  • Loading branch information
arlen authored and Ioannis committed Dec 15, 2024
1 parent 2aa6c9a commit ffa94f8
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 18 deletions.
2 changes: 1 addition & 1 deletion app/resources/locales/en_US/menu.po
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ msgid "co.people.enrollments.pending"
msgstr "Pending Enrollments"

msgid "co.people.enrollments.pending.desc"
msgstr "See and manage in-progress enrollments (CO Petitions)"
msgstr "See and manage pending enrollments"

msgid "co.people.external.source.records"
msgstr "External Source Records"
Expand Down
2 changes: 1 addition & 1 deletion app/src/Controller/DashboardsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ public function configuration() {
'action' => 'index'
],
__d('controller', 'Petitions', [99]) => [
'icon' => 'receipt_long',
'icon' => 'pending_actions',
'controller' => 'petitions',
'action' => 'index'
]
Expand Down
44 changes: 30 additions & 14 deletions app/templates/element/menuPanel.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,11 @@
</div>
</a>
</li>
<?php
/* XXX Enable highlighted menu items as needed:
<li>
<?php
$menuUrl = $this->Url->build(
['plugin' => null,
'controller' => 'people',
'controller' => 'petitions',
'action' => 'index',
'?' => [
'co_id' => $vv_cur_co->id
Expand All @@ -66,12 +64,11 @@
<a href="<?= $menuUrl ?>" class="menu-panel-primary-link">
<div class="material-icons-outlined" aria-hidden="true">pending_actions</div>
<div class="menu-panel-primary-link-text">
<h3><?= __d('menu','co.people.enrollments.pending') ?></h3>
<h3><?= __d('controller', 'Petitions', [99]) ?></h3>
<div class="menu-panel-link-desc"><?= __d('menu','co.people.enrollments.pending.desc') ?></div>
</div>
</a>
</li>
*/ ?>
</ul>

<?php /* XXX These sidepanel links are disabled until needed, but we will leave them in the code to
Expand All @@ -86,8 +83,24 @@
<div class="menu-panel-sidepanel-content">
<ul class="menu-panel-links menu-panel-links-inner">
<?php /* Placeholders below. Replace with real links and text replacement:
<li><a href="#"><em class="material-icons" aria-hidden="true">lock</em> Authenticators</a></li>
<li><a href="#"><em class="material-icons" aria-hidden="true">forward</em> Enrollment Flows</a></li>
<li><a href="#"><em class="material-icons" aria-hidden="true">lock</em> Authenticators</a></li> */ ?>
<li>
<?php
$menuUrl = $this->Url->build(
['plugin' => null,
'controller' => 'enrollment_flows',
'action' => 'index',
'?' => [
'co_id' => $vv_cur_co->id
]]
);
?>
<a href="<?= $menuUrl ?>" class="menu-panel-secondary-link">
<div class="material-icons" aria-hidden="true">subscriptions</div>
<div class="menu-panel-secondary-link-title"><?= __d('controller', 'EnrollmentFlows', [99]) ?></div>
</a>
</li>
<?php /*
<li><a href="#"><em class="material-icons" aria-hidden="true">access_alarm</em> Expiration Policies</a></li>
<li><a href="#"><em class="material-icons" aria-hidden="true">developer_board</em> Extended Attributes</a></li>
*/ ?>
Expand All @@ -102,7 +115,10 @@
]]
);
?>
<a href="<?= $menuUrl ?>"><em class="material-icons" aria-hidden="true">badge</em> <?= __d('controller', 'IdentifierAssignments', [99]) ?></a>
<a href="<?= $menuUrl ?>" class="menu-panel-secondary-link">
<div class="material-icons" aria-hidden="true">badge</div>
<div class="menu-panel-secondary-link-title"><?= __d('controller', 'IdentifierAssignments', [99]) ?></div>
</a>
</li>
<?php /*
<li><a href="#"><em class="material-icons" aria-hidden="true">check_circle</em> Identifier Validators</a></li>
Expand Down Expand Up @@ -259,9 +275,9 @@
]]
);
?>
<a href="<?= $menuUrl ?>" class="nospin">
<em class="material-icons" aria-hidden="true">assignment</em>
<?= __d('controller','ExtIdentitySourceRecords', [99]) ?>
<a href="<?= $menuUrl ?>" class="menu-panel-secondary-link">
<div class="material-icons" aria-hidden="true">assignment</div>
<div class="menu-panel-secondary-link-title"><?= __d('controller','ExtIdentitySourceRecords', [99]) ?></div>
</a>
</li>
<li>
Expand All @@ -275,9 +291,9 @@
]]
);
?>
<a href="<?= $menuUrl ?>" class="nospin">
<em class="material-icons" aria-hidden="true">computer</em>
<?= __d('controller','Servers', [2]) ?>
<a href="<?= $menuUrl ?>" class="menu-panel-secondary-link">
<div class="material-icons" aria-hidden="true">computer</div>
<div class="menu-panel-secondary-link-title"><?= __d('controller','Servers', [2]) ?></div>
</a>
</li>
</ul>
Expand Down
5 changes: 3 additions & 2 deletions app/webroot/css/co-base.css
Original file line number Diff line number Diff line change
Expand Up @@ -633,8 +633,9 @@ ul.form-list li.alert-banner .co-alert {
#main-menu .menu-panel-sidepanel h3 {
margin-bottom: 0.5em;
}
#main-menu .menu-panel-sidepanel ul li a {
display: inline;
#main-menu a.menu-panel-secondary-link {
display: flex !important;
align-items: center;
padding: 0;
}
#main-menu .menu-panel-common-items {
Expand Down

0 comments on commit ffa94f8

Please sign in to comment.