From 812aaa3d110a83a571b2ecc9cc5b1448a3c616fe Mon Sep 17 00:00:00 2001 From: Kevin Jardine Date: Wed, 5 Oct 2011 13:46:26 +0200 Subject: changed filter menu to more correctly describe the tabs --- views/default/event_calendar/css.php | 7 ++++++ views/default/event_calendar/filter_menu.php | 37 ++++++++++++++++++++++------ 2 files changed, 37 insertions(+), 7 deletions(-) (limited to 'views') diff --git a/views/default/event_calendar/css.php b/views/default/event_calendar/css.php index 2059a3ea9..469f72de8 100644 --- a/views/default/event_calendar/css.php +++ b/views/default/event_calendar/css.php @@ -157,4 +157,11 @@ table.event_calendar_paged_table th { .event-calendar-personal-calendar-toggle { float: right; +} + +li.event-calendar-filter-menu-show-only { + border:0; + padding-top:.4em; + background:#fff; + margin:0 -.3em 0 1.5em; } \ No newline at end of file diff --git a/views/default/event_calendar/filter_menu.php b/views/default/event_calendar/filter_menu.php index 2d4805bd4..369d09e5f 100644 --- a/views/default/event_calendar/filter_menu.php +++ b/views/default/event_calendar/filter_menu.php @@ -10,42 +10,65 @@ if ($group_guid) { $tabs = array( 'all' => array( - 'text' => elgg_echo('all'), + 'text' => elgg_echo('event_calendar:show_all'), 'href' => "$url_start/all", 'selected' => ($filter_context == 'all'), 'priority' => 200, ), 'mine' => array( - 'text' => elgg_echo('mine'), + 'text' => elgg_echo('event_calendar:show_mine'), 'href' => "$url_start/mine", 'selected' => ($filter_context == 'mine'), 'priority' => 300, ), 'friend' => array( - 'text' => elgg_echo('friends'), + 'text' => elgg_echo('event_calendar:show_friends'), 'href' => "$url_start/friends", 'selected' => ($filter_context == 'friends'), 'priority' => 400, ), ); +$tab_rendered = array(); + $event_calendar_spots_display = elgg_get_plugin_setting('spots_display', 'event_calendar'); if ($event_calendar_spots_display == "yes") { $tabs['open'] = array( - 'text' => elgg_echo('event_calendar:open'), + 'text' => elgg_echo('event_calendar:show_open'), 'href' => "$url_start/open", 'selected' => ($filter_context == 'open'), 'priority' => 100, ); +} else { + $tab_rendered['open'] = ''; } foreach ($tabs as $name => $tab) { - $tab['name'] = $name; + if ($tab['selected']) { + $state_selected = ' class="elgg-state-selected"'; + } else { + $state_selected = ''; + } + $tab_rendered[$name] = ''.$tab['text'].''; - elgg_register_menu_item('filter', $tab); + //elgg_register_menu_item('filter', $tab); } -echo elgg_view_menu('filter', array('sort_by' => 'priority', 'class' => 'elgg-menu-hz')); +//echo elgg_view_menu('filter', array('sort_by' => 'priority', 'class' => 'elgg-menu-hz')); + +$text_bit = '
  • '.elgg_echo('event_calendar:show_only').'
  • '; + +$menu = <<<__MENU + +__MENU; + +echo $menu; $event_calendar_region_display = elgg_get_plugin_setting('region_display', 'event_calendar'); if ($event_calendar_region_display == 'yes') { -- cgit v1.2.3