Preparing SuiteDesk to display always the dashboard with a pair number of items

This commit is contained in:
Manuel Cillero 2017-09-20 00:26:05 +02:00
parent 0b3650e660
commit 308998cde9
4 changed files with 17 additions and 5 deletions

View file

@ -989,6 +989,10 @@ function storm_dashboard($type = 'page') {
$link_blocks = storm_dashboard_get_links(TRUE, $type); $link_blocks = storm_dashboard_get_links(TRUE, $type);
if (!empty($link_blocks)) { if (!empty($link_blocks)) {
/* ALWAYS DISPLAY A PAIR NUMBER OF ITEMS
if (count($link_blocks) % 20) {
array_pop($link_blocks);
} */
// DIVIDE LINKS INTO TWO BLOCKS // DIVIDE LINKS INTO TWO BLOCKS
$count = ceil(count($link_blocks) / 2); $count = ceil(count($link_blocks) / 2);
$link_blocks = array_chunk($link_blocks, $count); $link_blocks = array_chunk($link_blocks, $count);
@ -1132,20 +1136,25 @@ function storm_storm_dashboard_links($type) {
'title' => t('Attributes'), 'title' => t('Attributes'),
'icon' => 'stormattributes-item', 'icon' => 'stormattributes-item',
'path' => 'attributes', 'path' => 'attributes',
'params' => array(),
'access_arguments' => 'Storm: access administration pages', 'access_arguments' => 'Storm: access administration pages',
'map' => array(),
'weight' => 180, 'weight' => 180,
); );
$links[] = array( $links[] = array(
'theme' => 'storm_dashboard_link',
'title' => t('Configuration'), 'title' => t('Configuration'),
'icon' => 'stormconfiguration-item', 'icon' => 'stormconfiguration-item',
'path' => 'admin/settings/suitedesk', 'path' => 'admin/settings/suitedesk',
'params' => array(),
'access_arguments' => 'Storm: access administration pages', 'access_arguments' => 'Storm: access administration pages',
'map' => array(),
'weight' => 190, 'weight' => 190,
); );
/* $links[] = array(
'theme' => 'storm_dashboard_link',
'title' => t('Search in SuiteDesk'),
'icon' => 'stormsearch-item',
'path' => 'search',
'access_arguments' => 'access content',
'weight' => 200,
); LAST ITEM TO REMOVE IF THERE IS AN ODD NUMBER OF ITEMS */
} }
return $links; return $links;
} }

View file

@ -472,6 +472,9 @@ dt.stormcomponent span.stormlinks-count + a > img {
#stormconfiguration-item { #stormconfiguration-item {
background: transparent url(../images/storm/configuration.png) no-repeat top left; background: transparent url(../images/storm/configuration.png) no-repeat top left;
} }
#stormsearch-item {
background: transparent url(../images/storm/search.png) no-repeat top left;
}
/* /*
* "SuiteDesk" list & filter. * "SuiteDesk" list & filter.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -1,6 +1,6 @@
name = SuiteDesk Theme name = SuiteDesk Theme
description = SuiteDesk Theme Zen. description = SuiteDesk Theme Zen.
version = 0.2.57 version = 0.2.58
screenshot = screenshot.png screenshot = screenshot.png