aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--languages/en.php6
-rw-r--r--views/default/event_calendar/css.php7
-rw-r--r--views/default/event_calendar/filter_menu.php37
3 files changed, 43 insertions, 7 deletions
diff --git a/languages/en.php b/languages/en.php
index 88d66a1da..8c32bd842 100644
--- a/languages/en.php
+++ b/languages/en.php
@@ -214,6 +214,12 @@ You can manage calendar requests for this event here:
'event_calendar:owner:permissions_error' => "You do not have permission to view that page.",
+ 'event_calendar:show_all' => "Show all",
+ 'event_calendar:show_open' => "Show open",
+ 'event_calendar:show_mine' => "My calendar",
+ 'event_calendar:show_friends' => "My friends' calendars",
+ 'event_calendar:show_only' => "Show only those on:",
+
/**
* Event calendar river
**/
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] = '<li'.$state_selected.'><a href="'.elgg_normalize_url($tab['href']).'">'.$tab['text'].'</a></li>';
- 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 = '<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']}
+ {$tab_rendered['all']}
+ $text_bit
+ {$tab_rendered['mine']}
+ {$tab_rendered['friend']}
+</ul>
+__MENU;
+
+echo $menu;
$event_calendar_region_display = elgg_get_plugin_setting('region_display', 'event_calendar');
if ($event_calendar_region_display == 'yes') {