aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorKevin Jardine <kevinjardine@yahoo.com>2012-04-04 18:55:08 +0200
committerKevin Jardine <kevinjardine@yahoo.com>2012-04-04 18:55:08 +0200
commit10219dcdb85679e2d835d5f164ae025b1dedc291 (patch)
tree7717cba17b664e3647305590ed8881afdf54d346 /views
parent3e190494ee28af8d27d1b37993d10c110ee7d335 (diff)
downloadelgg-10219dcdb85679e2d835d5f164ae025b1dedc291.tar.gz
elgg-10219dcdb85679e2d835d5f164ae025b1dedc291.tar.bz2
filter menu now changes for logged out users
Diffstat (limited to 'views')
-rw-r--r--views/default/event_calendar/filter_menu.php18
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']}