Skip to content

Commit

Permalink
Hide text in left menu when drawer is half-closed; improve rendering …
Browse files Browse the repository at this point in the history
…of configuration dashboard (CMF-55) (#4)
  • Loading branch information
arlen authored Jan 11, 2022
1 parent d815b37 commit 3dfee4a
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 26 deletions.
40 changes: 23 additions & 17 deletions app/templates/Dashboards/configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,29 +32,35 @@
<?php if(!empty($vv_platform_menu_items)): ?>
<?php foreach($vv_platform_menu_items as $label => $cfg): ?>
<li>
<em class="material-icons" aria-hidden="true"><?= $cfg['icon']; ?></em>
<?= $this->Html->link(
$label,
['plugin' => null,
'controller' => $cfg['controller'],
'action' => $cfg['action']]
); ?>
<?php
$linkContent = '<em class="material-icons" aria-hidden="true">' . $cfg['icon'] . '</em>'
. '<span class="menu-title">' . $label . '</span>';
print $this->Html->link(
$label,
['plugin' => null,
'controller' => $cfg['controller'],
'action' => $cfg['action']],
['escape' => false]
);
?>
</li>
<?php endforeach; // $vv_configuration_menu_items ?>
<?php endif; // $vv_platform_menu_items ?>

<?php foreach($vv_configuration_menu_items as $label => $cfg): ?>
<li>
<em class="material-icons" aria-hidden="true"><?= $cfg['icon']; ?></em>
<?= $this->Html->link(
$label,
['plugin' => null,
'controller' => $cfg['controller'],
'action' => $cfg['action'],
'?' => [
'co_id' => $vv_cur_co->id
]]
); ?>
<?php
$linkContent = '<em class="material-icons" aria-hidden="true">' . $cfg['icon'] . '</em>'
. '<span class="menu-title">' . $label . '</span>';
print $this->Html->link(
$linkContent,
['plugin' => null,
'controller' => $cfg['controller'],
'action' => $cfg['action'],
'?' => ['co_id' => $vv_cur_co->id]],
['escape' => false]
);
?>
</li>
<?php endforeach; // $vv_configuration_menu_items ?>
</ul>
Expand Down
5 changes: 2 additions & 3 deletions app/templates/element/menuMain.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,8 @@

foreach($menuItems as $m) {
if(!isset($m['permission']) || $vv_menu_permissions[ $m['permission'] ]) {
$linkContent = '<em class="material-icons" aria-hidden="true">' . $m['icon'] . '</em><span class="menuTitle">'
. $m['label']
. '</span><span class="mdl-ripple"></span>';
$linkContent = '<em class="material-icons" aria-hidden="true">' . $m['icon'] . '</em>'
. '<span class="menu-title">' . $m['label'] . '</span>';

print '<li class="configMenu">'
. $this->Html->link(
Expand Down
8 changes: 4 additions & 4 deletions app/webroot/css/co-base.css
Original file line number Diff line number Diff line change
Expand Up @@ -746,18 +746,18 @@ instead, reveal in user menu */
margin-bottom: 2em;
font-style: italic;
}
/* MATCHGRID CONFIGURATION */
#matchgrid-config-menu {
/* CO CONFIGURATION DASHBOARD */
#configuration-menu {
list-style: none;
padding: 0;
}
#matchgrid-config-menu a {
#configuration-menu a {
display: inline-block;
padding: 0.5em;
text-indent: -0.9em;
padding-left: 2em;
}
#matchgrid-config-menu a .material-icons {
#configuration-menu a .material-icons {
color: var(--cmg-color-gray-001);
margin-right: 0.5em;
}
Expand Down
4 changes: 2 additions & 2 deletions app/webroot/css/co-responsive.css
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@
margin-top: -3.5em;
position: relative;
}
/* MATCHGRID MANAGEMENT */
#matchgrid-config-menu {
/* CO CONFIGURATION DASHBOARD */
#configuration-menu {
column-count: 3;
column-gap: 1em;
margin-bottom: 4em;
Expand Down

0 comments on commit 3dfee4a

Please sign in to comment.