Skip to content

Commit

Permalink
Integrate the "All Groups" menu link into a menu panel. (CFM-174)
Browse files Browse the repository at this point in the history
  • Loading branch information
arlen committed Jun 23, 2022
1 parent f921022 commit 67b64fc
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 4 deletions.
12 changes: 12 additions & 0 deletions app/resources/locales/en_US/menu.po
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,18 @@ msgstr "Review and manage people in your collaboration (CO Person Records)"
msgid "co.structure"
msgstr "Structure"

msgid "co.structure.panel.title"
msgstr "Structure"

msgid "co.structure.panel.desc"
msgstr "COmanage registry provides structures for modeling and managing your organization, including COUs, Groups, and Departments."

msgid "co.structure.groups"
msgstr "Groups"

msgid "co.structure.groups.all"
msgstr "All Groups"

msgid "co.switch"
msgstr "Switch CO"

5 changes: 2 additions & 3 deletions app/templates/element/menuMain.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,10 @@
],
[
'permission' => 'groups',
'controller' => 'groups',
'action' => 'index',
'icon' => 'group',
'dropdown' => 'true',
'label' => __d('menu', 'co.structure')
'label' => __d('menu', 'co.structure'),
'panel' => 'structure'
],
[
'permission' => 'configuration',
Expand Down
28 changes: 28 additions & 0 deletions app/templates/element/menuPanel.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,34 @@
</ul>
</div>
<?php endif; ?>
<?php if($panel == 'structure'): ?>
<h2><?= __d('menu','co.structure.panel.title') ?></h2>
<p><?= __d('menu','co.structure.panel.desc') ?></p>
<div class="menu-panel-content">
<ul class="menu-panel-lists">
<li>
<h3><?= __d('menu','co.structure.groups') ?></h3>
<ul>
<?php
$menuUrl = $this->Url->build(
['plugin' => null,
'controller' => 'groups',
'action' => 'index',
'?' => [
'co_id' => $vv_cur_co->id
]]
);
?>
<li>
<a href="<?= $menuUrl ?>">
<?= __d('menu','co.structure.groups.all') ?>
</a>
</li>
</ul>
</li>
</ul>
</div>
<?php endif; ?>
<button type="button" class="menu-panel-close btn"><span class="material-icons-outlined">close</span></button>
</div>

19 changes: 18 additions & 1 deletion app/webroot/css/co-base.css
Original file line number Diff line number Diff line change
Expand Up @@ -521,12 +521,29 @@ body.logged-in #top-menu {
background-color: transparent;
border: 1px solid var(--cmg-color-lightgray-006);
}
#main-menu .menu-panel-links a.menu-panel-primary-link:hover h3 {
#main-menu .menu-panel-links a.menu-panel-primary-link:hover h3 {
text-decoration: underline;
}
#main-menu .menu-panel-primary-link-text {
flex: 1;
}
#main-menu ul.menu-panel-lists ul {
padding: 0;
margin-left: 1em;
}
#main-menu ul.menu-panel-lists ul li {
list-style: disc;
margin: 0.5em 0 0 0.5em;
}
#main-menu ul.menu-panel-lists ul li a {
display: inline;
padding: 0;
color: var(--cmg-color-blue-003);
}
#main-menu ul.menu-panel-lists ul li a:hover {
text-decoration: underline;
background-color: transparent;
}
/* CONTENT */
#breadcrumbs {
font-size: 0.9em;
Expand Down

0 comments on commit 67b64fc

Please sign in to comment.