diff options
Diffstat (limited to 'views/default/graphstats')
-rw-r--r-- | views/default/graphstats/timestats_filter_menu.php | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/views/default/graphstats/timestats_filter_menu.php b/views/default/graphstats/timestats_filter_menu.php new file mode 100644 index 000000000..9f4ab55d1 --- /dev/null +++ b/views/default/graphstats/timestats_filter_menu.php @@ -0,0 +1,31 @@ +<?php +/** + * All groups listing page navigation + * + */ + +$tabs = array( + 'absolute' => array( + 'text' => elgg_echo('absolute'), + 'href' => 'graphs/timestats?filter=absolute', + 'priority' => 200, + ), + 'relative' => array( + 'text' => elgg_echo('relative'), + 'href' => 'graphs/timestats?filter=relative', + 'priority' => 300, + ), +); + +// sets default selected item +if (strpos(full_url(), 'filter') === false) { + $tabs['absolute']['selected'] = true; +} + +foreach ($tabs as $name => $tab) { + $tab['name'] = $name; + + elgg_register_menu_item('filter', $tab); +} + +echo elgg_view_menu('filter', array('sort_by' => 'priority', 'class' => 'elgg-menu-hz')); |