Skip to content

Commit

Permalink
Add timestamp to Petition enrollment steps (CFM-422) (#286)
Browse files Browse the repository at this point in the history
* Add status and timestamp to Petition enrollment steps. Move Enrollment Flows to a more prominent position in the People menu panel.  (CFM-422)

* Simplify timestamp on the Petition's Enrollment Step row (CFM-422)
  • Loading branch information
arlen authored Feb 10, 2025
1 parent 1137002 commit 1fa47b4
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 28 deletions.
3 changes: 3 additions & 0 deletions app/resources/locales/en_US/menu.po
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ msgstr "Pending Enrollments"
msgid "co.people.enrollments.pending.desc"
msgstr "See and manage pending enrollments"

msgid "co.people.enrollment.flows.desc"
msgstr "Bring new People into your population interactively"

msgid "co.people.external.source.records"
msgstr "External Source Records"

Expand Down
31 changes: 19 additions & 12 deletions app/templates/Petitions/fields.inc
Original file line number Diff line number Diff line change
Expand Up @@ -260,18 +260,25 @@ if (!empty($vv_obj?->petitioner_person?->id)) {
</div>
</div>
<div class="field-info">
<div class="petition-step-info"><?= !empty($result) ? $result[0]->comment : '' ?></div>
<button class="cm-toggle nospin petition-step-toggle collapsed"
type="button"
data-bs-toggle="collapse"
aria-label="<?= __d('information','petition.step.toggle.details') ?>"
aria-expanded="false"
aria-controls="collapse-box-<?= $step->id ?>"
data-bs-target="#collapse-box-<?= $step->id ?>">
<em class="material-symbols-outlined petition-step-collapse-icon" aria-hidden="true">
arrow_drop_down
</em>
</button>
<div class="petition-step-info">
<?= !empty($result) ? $result[0]->comment : '' ?>
</div>
<div class="petition-step-meta">
<span class="petition-step-modified">
<?= $step->modified ?>
</span>
<button class="cm-toggle nospin petition-step-toggle collapsed"
type="button"
data-bs-toggle="collapse"
aria-label="<?= __d('information','petition.step.toggle.details') ?>"
aria-expanded="false"
aria-controls="collapse-box-<?= $step->id ?>"
data-bs-target="#collapse-box-<?= $step->id ?>">
<em class="material-symbols-outlined petition-step-collapse-icon" aria-hidden="true">
arrow_drop_down
</em>
</button>
</div>
</div>
</div>
<div id="collapse-box-<?= $step->id ?>" class="petition-attrs collapse">
Expand Down
35 changes: 19 additions & 16 deletions app/templates/element/menuPanel.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,25 @@
</div>
</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-primary-link">
<div class="material-symbols-outlined" aria-hidden="true">subscriptions</div>
<div class="menu-panel-primary-link-text">
<h3><?= __d('controller', 'EnrollmentFlows', [99]) ?></h3>
<div class="menu-panel-link-desc"><?= __d('menu','co.people.enrollment.flows.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 @@ -84,22 +103,6 @@
<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-symbols" 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-symbols-outlined" 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-symbols" aria-hidden="true">access_alarm</em> Expiration Policies</a></li>
<li><a href="#"><em class="material-symbols" aria-hidden="true">developer_board</em> Extended Attributes</a></li>
Expand Down
3 changes: 3 additions & 0 deletions app/webroot/css/co-base.css
Original file line number Diff line number Diff line change
Expand Up @@ -2137,6 +2137,9 @@ ul.form-list li.petition-enrollee-items .petition-inline-value,
ul.form-list li.petition-enrollee-items .petition-inline-value a {
font-family: var(--cmg-font-semibold);
}
.petition-step-modified {
margin-right: 1em;
}
.petition-attrs {
padding: 0;
}
Expand Down

0 comments on commit 1fa47b4

Please sign in to comment.