diff options
author | Kevin Jardine <kevinjardine@yahoo.com> | 2012-04-04 18:55:08 +0200 |
---|---|---|
committer | Kevin Jardine <kevinjardine@yahoo.com> | 2012-04-04 18:55:08 +0200 |
commit | 10219dcdb85679e2d835d5f164ae025b1dedc291 (patch) | |
tree | 7717cba17b664e3647305590ed8881afdf54d346 /views/default | |
parent | 3e190494ee28af8d27d1b37993d10c110ee7d335 (diff) | |
download | elgg-10219dcdb85679e2d835d5f164ae025b1dedc291.tar.gz elgg-10219dcdb85679e2d835d5f164ae025b1dedc291.tar.bz2 |
filter menu now changes for logged out users
Diffstat (limited to 'views/default')
-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']} |