From b8c3767f8c790febb35141919936d616d3ebe2d4 Mon Sep 17 00:00:00 2001 From: Kevin Jardine Date: Thu, 24 May 2012 20:00:18 +0200 Subject: changed time handling and added more suppport for event polls --- views/default/event_calendar/css.php | 7 +++++- views/default/event_calendar/datetime_edit.php | 12 +++++----- .../default/event_calendar/full_calendar_view.php | 2 +- .../event_calendar/personal_manage_section.php | 20 ++++++++++++++++ views/default/event_calendar/reminder_section.php | 28 ++++++++++++++++++++++ views/default/event_calendar/schedule_section.php | 22 +++++++++++++++++ views/default/event_calendar/share_section.php | 26 ++++++++++++++++++++ 7 files changed, 109 insertions(+), 8 deletions(-) create mode 100644 views/default/event_calendar/personal_manage_section.php create mode 100644 views/default/event_calendar/reminder_section.php create mode 100644 views/default/event_calendar/schedule_section.php create mode 100644 views/default/event_calendar/share_section.php (limited to 'views/default/event_calendar') diff --git a/views/default/event_calendar/css.php b/views/default/event_calendar/css.php index 4d68f500f..9461a7fe9 100644 --- a/views/default/event_calendar/css.php +++ b/views/default/event_calendar/css.php @@ -269,4 +269,9 @@ li.event-calendar-filter-menu-show-only { .event-calendar-description { display: none; -} \ No newline at end of file +} + +.event-calendar-edit-bottom { + clear: both; + margin-bottom: 5px; +} diff --git a/views/default/event_calendar/datetime_edit.php b/views/default/event_calendar/datetime_edit.php index aa3a8f2de..ceceeb20e 100644 --- a/views/default/event_calendar/datetime_edit.php +++ b/views/default/event_calendar/datetime_edit.php @@ -9,16 +9,16 @@ if ($event_calendar_times != 'no') { $body .= '

'; } $body .= elgg_view("event_calendar/input/date_local",array( - 'timestamp'=>TRUE, + //'timestamp'=>TRUE, 'autocomplete'=>'off', 'class'=>'event-calendar-compressed-date', 'name' => 'start_date', 'value'=>$vars['start_date'])); $body .= elgg_view("input/timepicker",array('name' => 'start_time','value'=>$vars['start_time'])); if ($event_calendar_hide_end != 'yes') { - $body .= '

'; + $body .= '

'; $body .= elgg_view("event_calendar/input/date_local",array( - 'timestamp'=>TRUE, + //'timestamp'=>TRUE, 'autocomplete'=>'off', 'class'=>'event-calendar-compressed-date', 'name' => 'end_date', @@ -26,7 +26,7 @@ if ($event_calendar_times != 'no') { )); $body .= elgg_view("input/timepicker",array('name' => 'end_time','value'=>$vars['end_time'])); } - $body .= '

'; + $body .= '

'; } else { $body .= '

'.$prefix['start_date'].elgg_echo('event_calendar:start_date_description').'

'; if ($event_calendar_hide_end != 'yes') { - $body .= '

'; - $body .= '

'.$prefix['end_date'].elgg_echo('event_calendar:end_date_description').'

'; + //$body .= '

'.$prefix['end_date'].elgg_echo('event_calendar:end_date_description').'

'; } } diff --git a/views/default/event_calendar/full_calendar_view.php b/views/default/event_calendar/full_calendar_view.php index 6c21c42c8..5fffff624 100644 --- a/views/default/event_calendar/full_calendar_view.php +++ b/views/default/event_calendar/full_calendar_view.php @@ -14,7 +14,7 @@ handleEventClick = function(event) { handleEventDrop = function(event,dayDelta,minuteDelta,allDay,revertFunc) { - if (!confirm("Are you sure about this change?")) { + if (!confirm("")) { revertFunc(); } else { elgg.action('event_calendar/modify_full_calendar', diff --git a/views/default/event_calendar/personal_manage_section.php b/views/default/event_calendar/personal_manage_section.php new file mode 100644 index 000000000..9e03db0ab --- /dev/null +++ b/views/default/event_calendar/personal_manage_section.php @@ -0,0 +1,20 @@ + 'open', + elgg_echo('event_calendar:personal_manage:by_event:closed') => 'closed', + elgg_echo('event_calendar:personal_manage:by_event:private') => 'private', + ); + $body .= '
'; + $body .= '

'.elgg_echo('event_calendar:personal_manage:label').'

'; + $body .= elgg_view("input/radio",array('name' => 'personal_manage','value'=>$fd['personal_manage'],'options'=>$personal_manage_options)); + //$body .= '

'.$prefix['personal_manage'].elgg_echo('event_calendar:personal_manage:description').'

'; + $body .= '
'; + $body .= '
'; +} + +echo $body; diff --git a/views/default/event_calendar/reminder_section.php b/views/default/event_calendar/reminder_section.php new file mode 100644 index 000000000..fffa6d065 --- /dev/null +++ b/views/default/event_calendar/reminder_section.php @@ -0,0 +1,28 @@ +'; + if ($fd['send_reminder']) { + $body .= elgg_view('input/checkbox',array('name'=>'send_reminder','checked' => 'checked','value'=>1)); + } else { + $body .= elgg_view('input/checkbox',array('name'=>'send_reminder','value'=>1)); + } + $body .= elgg_echo('elgg_calendar:send_reminder_label'). ' '; + $numbers = array(); + for ($i=1;$i<60;$i++) { + $numbers[$i] = $i; + } + $intervals = array( + 1 => elgg_echo('event_calendar:interval:minute'), + 60 => elgg_echo('event_calendar:interval:hour'), + 60*24 => elgg_echo('event_calendar:interval:day'), + ); + + $body .= elgg_view('input/dropdown',array('name'=>'reminder_number','options_values'=>$numbers,'value'=>$fd['reminder_number'])); + $body .= elgg_view('input/dropdown',array('name'=>'reminder_interval','options_values'=>$intervals,'value'=>$fd['reminder_interval'])); + $body .= elgg_echo('elgg_calendar:send_reminder_before'); + $body .= ''; +} +echo $body; diff --git a/views/default/event_calendar/schedule_section.php b/views/default/event_calendar/schedule_section.php new file mode 100644 index 000000000..3a74dc789 --- /dev/null +++ b/views/default/event_calendar/schedule_section.php @@ -0,0 +1,22 @@ +'; +$body .= elgg_view('event_calendar/datetime_edit', + array( + 'start_date' => $fd['start_date'], + 'end_date' => $fd['end_date'], + 'start_time' => $fd['start_time'], + 'end_time' => $fd['end_time'], + 'prefix' => $vars['prefix'], +)); +if ($event_calendar_repeated_events == 'yes') { + $body .= elgg_view('event_calendar/repeat_form_element',$vars); +} + +$body .= elgg_view('event_calendar/reminder_section',$vars); +$body .= ''; + +echo $body; diff --git a/views/default/event_calendar/share_section.php b/views/default/event_calendar/share_section.php new file mode 100644 index 000000000..134f07656 --- /dev/null +++ b/views/default/event_calendar/share_section.php @@ -0,0 +1,26 @@ +'; +$body .= '

'.elgg_echo('event_calendar:permissions:header').'

'; +if($event_calendar_hide_access == 'yes') { + $event_calendar_default_access = elgg_get_plugin_setting('default_access', 'event_calendar'); + if($event_calendar_default_access) { + $body .= elgg_view("input/hidden",array('name' => 'access_id','value'=>$event_calendar_default_access)); + } else { + $body .= elgg_view("input/hidden",array('name' => 'access_id','value'=>ACCESS_DEFAULT)); + } +} else { + $body .= '

'; + $body .= elgg_view("input/access",array('name' => 'access_id','value'=>$fd['access_id'])); + $body .= '

'; +} +if (elgg_plugin_exists('entity_admins')) { + $body .= elgg_echo('event_calendar:share_ownership:label'); + $body .= '
'; + $body .= elgg_echo('event_calendar:share_ownership:description'); + $body .= elgg_view('input/entity_admins_dropdown',array('entity'=>$vars['event'])); +} +$body .= ''; + +echo $body; -- cgit v1.2.3