New option menu for advanced search

This commit is contained in:
Manuel Cillero 2017-09-20 19:40:49 +02:00
parent da05c9b673
commit 5e5f48a090
3 changed files with 15 additions and 16 deletions

View file

@ -989,10 +989,16 @@ function storm_dashboard($type = 'page') {
$link_blocks = storm_dashboard_get_links(TRUE, $type);
if (!empty($link_blocks)) {
/* ALWAYS DISPLAY A PAIR NUMBER OF ITEMS
if (count($link_blocks) % 20) {
array_pop($link_blocks);
} */
// ALWAYS DISPLAY A PAIR NUMBER OF ITEMS
if (count($link_blocks) % 2) {
$link_blocks[] = array(
'theme' => 'storm_dashboard_link',
'title' => t('Advanced search'),
'icon' => 'stormsearch-item',
'path' => 'search',
'access_arguments' => 'access content',
);
}
// DIVIDE LINKS INTO TWO BLOCKS
$count = ceil(count($link_blocks) / 2);
$link_blocks = array_chunk($link_blocks, $count);
@ -1147,14 +1153,6 @@ function storm_storm_dashboard_links($type) {
'access_arguments' => 'Storm: access administration pages',
'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;
}

View file

@ -93,7 +93,7 @@ function stormidea_list_filter(&$form_state, $filterdesc = 'Filter') {
$form['filter']['group2']['title'] = array(
'#type' => 'textfield',
'#title' => t('Idea'),
'#title' => t('Reminder'),
'#default_value' => $title,
);