diff options
Diffstat (limited to 'views/default/event_calendar/calendar.php')
-rw-r--r-- | views/default/event_calendar/calendar.php | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/views/default/event_calendar/calendar.php b/views/default/event_calendar/calendar.php index ebf4aa589..ea12ff603 100644 --- a/views/default/event_calendar/calendar.php +++ b/views/default/event_calendar/calendar.php @@ -4,7 +4,15 @@ if ($vars['mode']) { } else { $mode = 'month'; } -$link_bit = $vars['url'].'mod/event_calendar/show_events.php?start_date='.$vars['original_start_date'].'&group_guid='.$vars['group_guid'].'&filter='.$vars['filter'].'&mode='; + +# event_calendar/list/<start_date>/<display_mode>/<filter_context>/<region> +if ($vars['group_guid']) { + $link_bit = $vars['url']."event_calendar/group/{$vars['group_guid']}/{$vars['original_start_date']}/%s"; +} else { + $link_bit = $vars['url']."event_calendar/list/{$vars['original_start_date']}/%s/{$vars['filter']}"; +} + +#$link_bit = "event_calendar/show_events.php?start_date='.$vars['original_start_date'].'&group_guid='.$vars['group_guid'].'&filter='.$vars['filter'].'&mode='; $range_bit = ''; $first_date = $vars['first_date']; @@ -27,7 +35,7 @@ if ($first_date || $last_date) { $body .= elgg_view("input/datepicker_inline", array( - 'internalname' => 'my_datepicker', + 'name' => 'my_datepicker', 'mode' => $vars['mode']?$vars['mode']:'month', 'start_date' => $vars['start_date'], 'end_date' => $vars['end_date'], @@ -35,6 +43,7 @@ $body .= elgg_view("input/datepicker_inline", 'range_bit' => $range_bit, ) ); + $body .= '<div id="calendarmenucontainer">'; $body .= '<ul id="calendarmenu">'; if ($mode == 'day') { @@ -42,19 +51,19 @@ if ($mode == 'day') { } else { $link_class = ''; } -$body .= '<li'.$link_class.'><a href="'.$link_bit.'day">'.elgg_echo('event_calendar:day_label').'</a></li>'; +$body .= '<li'.$link_class.'><a href="'.sprintf($link_bit,'day').'">'.elgg_echo('event_calendar:day_label').'</a></li>'; if ($mode == 'week') { $link_class = ' class="sys_selected"'; } else { $link_class = ''; } -$body .= '<li'.$link_class.'><a href="'.$link_bit.'week">'.elgg_echo('event_calendar:week_label').'</a></li>'; +$body .= '<li'.$link_class.'><a href="'.sprintf($link_bit,'week').'">'.elgg_echo('event_calendar:week_label').'</a></li>'; if ($mode == 'month') { $link_class = ' class="sys_selected sys_calmenu_last"'; } else { $link_class = ' class="sys_calmenu_last"'; } -$body .= '<li'.$link_class.'><a href="'.$link_bit.'month">'.elgg_echo('event_calendar:month_label').'</a></li>'; +$body .= '<li'.$link_class.'><a href="'.sprintf($link_bit,'month').'">'.elgg_echo('event_calendar:month_label').'</a></li>'; $body .= '</ul>'; $body .= '</div>'; echo $body; |