diff options
Diffstat (limited to 'views')
-rw-r--r-- | views/default/event_calendar/filter_menu.php | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/views/default/event_calendar/filter_menu.php b/views/default/event_calendar/filter_menu.php index 369d09e5f..926a29d0d 100644 --- a/views/default/event_calendar/filter_menu.php +++ b/views/default/event_calendar/filter_menu.php @@ -15,19 +15,25 @@ $tabs = array( 'selected' => ($filter_context == 'all'), 'priority' => 200, ), - 'mine' => array( +); + +if (elgg_is_logged_in()) { + $tabs ['mine'] = array( 'text' => elgg_echo('event_calendar:show_mine'), 'href' => "$url_start/mine", 'selected' => ($filter_context == 'mine'), 'priority' => 300, - ), - 'friend' => array( + ); + $tabs['friend'] = array( 'text' => elgg_echo('event_calendar:show_friends'), 'href' => "$url_start/friends", 'selected' => ($filter_context == 'friends'), 'priority' => 400, - ), -); + ); + $text_bit = '<li class="event-calendar-filter-menu-show-only">'.elgg_echo('event_calendar:show_only').'</li>'; +} else { + $text_bit = ''; +} $tab_rendered = array(); @@ -56,8 +62,6 @@ foreach ($tabs as $name => $tab) { //echo elgg_view_menu('filter', array('sort_by' => 'priority', 'class' => 'elgg-menu-hz')); -$text_bit = '<li class="event-calendar-filter-menu-show-only">'.elgg_echo('event_calendar:show_only').'</li>'; - $menu = <<<__MENU <ul class="elgg-menu elgg-menu-filter elgg-menu-hz elgg-menu-filter-default"> {$tab_rendered['open']} |