diff options
author | Carlo Landmeter <clandmeter@gmail.com> | 2011-05-12 19:04:35 +0200 |
---|---|---|
committer | Carlo Landmeter <clandmeter@gmail.com> | 2011-05-12 19:04:35 +0200 |
commit | 0a179d93eb8e5afc357f1c6305533e826ea9b16c (patch) | |
tree | 0524d723de8ddbda6d24eba0ef3887f7e2c15f0e | |
parent | 56406e41211e7099bf7542c1504db941ca39f694 (diff) | |
download | apk_browser-0a179d93eb8e5afc357f1c6305533e826ea9b16c.tar.bz2 apk_browser-0a179d93eb8e5afc357f1c6305533e826ea9b16c.tar.xz |
wrap the filters in package browser inside a fieldset
-rw-r--r-- | apk_browser.module | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/apk_browser.module b/apk_browser.module index 6527fc0..b27d4e9 100644 --- a/apk_browser.module +++ b/apk_browser.module @@ -730,3 +730,27 @@ function apk_browser_assign_maintainer() { variable_set('apk_browser_assign_maintainer', time()); watchdog('apk', 'Updated @qty package maintainers', array('@qty' => count(array_filter($updated))), WATCHDOG_INFO, NULL); } + +//wrap the package browser filters inside a collapsed fieldset +function apk_browser_preprocess_views_view(&$vars) { + if ($vars['exposed']) { + $options['element'] = array( + '#title' => t('Filter packages'), + '#value' => $vars['exposed'], + '#children' => FALSE, + '#attached' => array( + 'js' => array( + 'misc/form.js', + 'misc/collapse.js', + ), + ), + '#attributes' => array( + 'class' => array( + 'collapsible', + 'collapsed' + ), + ), + ); + $vars['exposed'] = theme('fieldset', $options); + } +}
\ No newline at end of file |