From 0b25adcd921149b50845647980284e8ab66d8fed Mon Sep 17 00:00:00 2001
From: Kevin Jardine
'; + $body .= elgg_view("event_calendar/input/date_local",array( + 'timestamp'=>TRUE, + 'autocomplete'=>'off', + 'class'=>'event-calendar-compressed-date', + 'name' => 'end_date', + 'value'=>$vars['end_date'], + )); + $body .= elgg_view("input/timepicker",array('name' => 'end_time','value'=>$vars['end_time'])); + } + $body .= '
'; +} else { + + $body .= ''; + $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').'
'; + } +} + +echo $body; \ No newline at end of file diff --git a/views/default/event_calendar/full_calendar_view.php b/views/default/event_calendar/full_calendar_view.php index 58aefe741..2c97eb159 100644 --- a/views/default/event_calendar/full_calendar_view.php +++ b/views/default/event_calendar/full_calendar_view.php @@ -1,31 +1,6 @@ $e->guid, - //'title' => ''.$e->title.'', - 'title' => $e->title, - 'url' => $e->getURL(), - 'start_date' => $e->start_date, - 'end_date' => $e->real_end_time, - ); - if ($times_supported) { - $event_item['allDay'] = FALSE; - } else { - $event_item['allDay'] = TRUE; - } - - $event_array[] = $event_item; -} - -$json_events_string = json_encode($event_array); - // TODO: is there an easy way to avoid embedding JS? ?> diff --git a/views/default/event_calendar/repeat_form_element.php b/views/default/event_calendar/repeat_form_element.php new file mode 100644 index 000000000..45fdabfa1 --- /dev/null +++ b/views/default/event_calendar/repeat_form_element.php @@ -0,0 +1,43 @@ +'repeats','value'=>'yes','checked'=>'checked')); +} else { + echo elgg_view('input/checkbox',array('name'=>'repeats','value'=>'yes')); +} +echo elgg_echo('event_calendar:repeat_interval_label').' '; +echo elgg_view('input/dropdown',array('name'=>'repeat_interval','value'=>$fd['repeat_interval'],'options_values'=>array('1'=>'1','2'=>'2','3'=>'3','4'=>'4','5'=>'5','6'=>'6','7'=>'7','8'=>'8'))); +echo ' '.elgg_echo('event_calendar:repeat_weeks'); +echo ' '.elgg_echo('event_calendar:on_these_days'); +?> + + + + + + + + diff --git a/views/default/event_calendar/show_events.php b/views/default/event_calendar/show_events.php index 63d722247..3a484e756 100644 --- a/views/default/event_calendar/show_events.php +++ b/views/default/event_calendar/show_events.php @@ -10,16 +10,21 @@ * */ +elgg_load_library('elgg:event_calendar'); + $listing_format = $vars['listing_format']; if ($vars['events']) { if ($listing_format == 'agenda') { + $vars['events'] = event_calendar_flatten_event_structure($vars['events']); $event_list = elgg_view('event_calendar/agenda_view',$vars); } else if ($listing_format == 'paged') { + $vars['events'] = event_calendar_flatten_event_structure($vars['events']); $event_list = elgg_view('event_calendar/paged_view',$vars); } else if ($listing_format == 'full') { $event_list = elgg_view('event_calendar/full_calendar_view',$vars); } else { + $vars['events'] = event_calendar_flatten_event_structure($vars['events']); $options = array( 'list_class' => 'elgg-list-entity', 'full_view' => FALSE, @@ -32,7 +37,12 @@ if ($vars['events']) { $event_list = elgg_view_entity_list($vars['events'], $options); } } else { - $event_list = ''.elgg_echo('event_calendar:no_events_found').'
'; + if ($listing_format == 'full') { + // show the empty calendar + $event_list = elgg_view('event_calendar/full_calendar_view',$vars); + } else { + $event_list = ''.elgg_echo('event_calendar:no_events_found').'
'; + } } if ($listing_format == 'paged' || $listing_format == 'full') { echo $event_list; -- cgit v1.2.3 From 10219dcdb85679e2d835d5f164ae025b1dedc291 Mon Sep 17 00:00:00 2001 From: Kevin Jardine'.$prefix['calendar'].elgg_echo('event_calendar:calendar_description').'
'; -if(elgg_plugin_exists('sched_conf')) { +if($event_calendar_bbb_server_url) { $body .= ''; - $body .= elgg_view('input/checkbox',array('name'=>'web_conference','value'=>$web_conference,'options_values'=>array('1'))); + if ($fd['web_conference']) { + $body .= elgg_view('input/checkbox',array('name'=>'web_conference','value'=>1,'checked'=>'checked')); + } else { + $body .= elgg_view('input/checkbox',array('name'=>'web_conference','value'=>1)); + } $body .= elgg_echo('event_calendar:web_conference_label'); $body .= '
'; } diff --git a/views/default/object/event_calendar.php b/views/default/object/event_calendar.php index 717e2803e..b72c869ea 100644 --- a/views/default/object/event_calendar.php +++ b/views/default/object/event_calendar.php @@ -16,6 +16,10 @@ $full = elgg_extract('full_view', $vars, FALSE); if ($full) { $body = elgg_view('event_calendar/strapline',$vars); + if ($event->web_conference) { + $body .= ''.$prefix['event_tags'].elgg_echo('event_calendar:event_tags_description').'
'; -$body .= ''; -$body .= elgg_view('event_calendar/container',array('container_guid'=>$vars['group_guid'])); -$body .= '
'; -$body .= ''.$prefix['calendar'].elgg_echo('event_calendar:calendar_description').'
'; +if ($event || !$vars['group_guid']) { + $body .= ''; + $body .= elgg_view('event_calendar/container',array('container_guid'=>$vars['group_guid'])); + $body .= '
'; + $body .= ''.$prefix['calendar'].elgg_echo('event_calendar:calendar_description').'
'; +} else { + $body .= elgg_view('input/hidden',array('name'=>'group_guid', 'value'=>$vars['group_guid'])); +} if($event_calendar_bbb_server_url) { $body .= '';
--
cgit v1.2.3
From f8b9db301d19813725b9f43020a52587b03baadc Mon Sep 17 00:00:00 2001
From: Kevin Jardine ".elgg_view("input/submit",array("value"=>elgg_echo('event_calendar:add_to_group:add_group_button')))." ".elgg_view("input/submit",array("value"=>elgg_echo('event_calendar:add_to_group:remove_group_button')))."".elgg_echo('event_calendar:add_to_group:add_group_title')."
";
- $add_pulldown = elgg_view("input/dropdown",array("internalname" => "group_id","options_values" => $add_options));
+ $add_pulldown = elgg_view("input/dropdown",array("name" => "group_id","options_values" => $add_options));
$submit_button = "".elgg_echo('event_calendar:add_to_group:remove_group_title')."
";
- $remove_pulldown = elgg_view("input/dropdown",array("internalname" => "group_id","options_values" => $remove_options));
+ $remove_pulldown = elgg_view("input/dropdown",array("name" => "group_id","options_values" => $remove_options));
$submit_button = "
'.$prefix['title'].elgg_echo('event_calendar:title_description').'
'; - -$body .= ''; -$body .= ''.$prefix['venue'].elgg_echo('event_calendar:venue_description').'
'; - -if ($event_calendar_times != 'no') { - $body .= '
';
- $body .= elgg_view("input/timepicker",array('internalname' => 'start_time','value'=>$start_time));
- $body .= '
'.$prefix['start_time'].elgg_echo('event_calendar:start_time_description').'
'; -} - -$body .= ''; -$body .= ''.$prefix['start_date'].elgg_echo('event_calendar:start_date_description').'
'; - -if ($event_calendar_hide_end != 'yes') { - if ($event_calendar_times != 'no') { - $body .= '
';
- $body .= elgg_view("input/timepicker",array('internalname' => 'end_time','value'=>$end_time));
- $body .= '
'.$prefix['end_time'].elgg_echo('event_calendar:end_time_description').'
'; - } - - $body .= ''; - $body .= ''.$prefix['end_date'].elgg_echo('event_calendar:end_date_description').'
'; -} - -if ($event_calendar_spots_display == 'yes') { - $body .= ''; - $body .= ''.$prefix['spots'].elgg_echo('event_calendar:spots_description').'
'; -} - -if ($event_calendar_add_users == 'yes') { - $body .= ''.elgg_echo('event_calendar:add_user_description').'
'; -} - -$body .= ''; -$body .= ''.$prefix['brief_description'].elgg_echo('event_calendar:brief_description_description').'
'; - -if ($event_calendar_region_display == 'yes') { - $region_list = trim(elgg_get_plugin_setting('region_list', 'event_calendar')); - $region_list_handles = elgg_get_plugin_setting('region_list_handles', 'event_calendar'); - // make sure that we are using Unix line endings - $region_list = str_replace("\r\n","\n",$region_list); - $region_list = str_replace("\r","\n",$region_list); - if ($region_list) { - $options = array(); - $options[] = '-'; - foreach(explode("\n",$region_list) as $region_item) { - $region_item = trim($region_item); - if ($region_list_handles == 'yes') { - $options[$region_item] = elgg_echo('event_calendar:region:'.$region_item); - } else { - $options[$region_item] = $region_item; - } - } - $body .= ''; - $body .= ''.$prefix['region'].elgg_echo('event_calendar:region_description').'
'; - } -} - -if ($event_calendar_type_display == 'yes') { - $type_list = trim(elgg_get_plugin_setting('type_list', 'event_calendar')); - $type_list_handles = elgg_get_plugin_setting('type_list_handles', 'event_calendar'); - // make sure that we are using Unix line endings - $type_list = str_replace("\r\n","\n",$type_list); - $type_list = str_replace("\r","\n",$type_list); - if ($type_list) { - $options = array(); - $options[] = '-'; - foreach(explode("\n",$type_list) as $type_item) { - $type_item = trim($type_item); - if ($type_list_handles == 'yes') { - $options[$type_item] = elgg_echo('event_calendar:type:'.$type_item); - } else { - $options[$type_item] = $type_item; - } - } - $body .= ''; - $body .= ''.$prefix['event_type'].elgg_echo('event_calendar:type_description').'
'; - } -} - -$body .= ''; -$body .= ''.$prefix['fees'].elgg_echo('event_calendar:fees_description').'
'; - -$body .= ''; -$body .= ''.$prefix['contact'].elgg_echo('event_calendar:contact_description').'
'; - -$body .= ''; -$body .= ''.$prefix['organiser'].elgg_echo('event_calendar:organiser_description').'
'; - -$body .= ''; -$body .= ''.$prefix['event_tags'].elgg_echo('event_calendar:event_tags_description').'
'; - -$body .= ''; -$body .= ''.$prefix['long_description'].elgg_echo('event_calendar:long_description_description').'
'; - -if($event_calendar_hide_access == 'yes') { - $event_calendar_default_access = get_plugin_setting('default_access', 'event_calendar'); - if($event_calendar_default_access) { - $body .= elgg_view("input/hidden",array('internalname' => 'access','value'=>$event_calendar_default_access)); - } else { - $body .= elgg_view("input/hidden",array('internalname' => 'access','value'=>ACCESS_PRIVATE)); - } -} else { - $body .= ''; -} - -print $body; -?> \ No newline at end of file diff --git a/views/default/event_calendar/input/date_local.php b/views/default/event_calendar/input/date_local.php index f4cb48d11..a0ce7f4d3 100644 --- a/views/default/event_calendar/input/date_local.php +++ b/views/default/event_calendar/input/date_local.php @@ -44,7 +44,6 @@ if ($timestamp) { $vars['class'] = "{$vars['class']} elgg-input-timestamp"; $vars['id'] = $vars['name']; unset($vars['name']); - unset($vars['internalname']); } // convert timestamps to text for display diff --git a/views/default/event_calendar/input/longtext.php b/views/default/event_calendar/input/longtext.php deleted file mode 100644 index 86b0f3fc4..000000000 --- a/views/default/event_calendar/input/longtext.php +++ /dev/null @@ -1,25 +0,0 @@ - - - \ No newline at end of file diff --git a/views/default/input/datepicker_popup.php b/views/default/input/datepicker_popup.php deleted file mode 100644 index 0daeb7307..000000000 --- a/views/default/input/datepicker_popup.php +++ /dev/null @@ -1,31 +0,0 @@ - - * @copyright Radagast Solutions 2008 - * @link http://radagast.biz/ - * - */ - -if ($vars['dateformat']) { - $date_format = $vars['dateformat']; -} else { - $date_format = "yy/mm/dd"; -} -?> - - - \ No newline at end of file diff --git a/views/default/plugins/event_calendar/settings.php b/views/default/plugins/event_calendar/settings.php index 2a2e043de..e91db9969 100644 --- a/views/default/plugins/event_calendar/settings.php +++ b/views/default/plugins/event_calendar/settings.php @@ -358,7 +358,7 @@ if (!$event_calendar_region_list) { $body .= elgg_echo('event_calendar:settings:region_list:title'); $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 .= '
';
@@ -238,7 +179,8 @@ if ($event_calendar_spots_display == 'yes') {
$body .= '
'.$prefix['spots'].elgg_echo('event_calendar:spots_description').'
'; } -$body .= ''.elgg_echo('event_calendar:add_user_description').'
'; }*/ -if ($event_calendar_personal_manage == 'by_event') { +$body .= elgg_view('event_calendar/personal_manage_section',$vars); + +/*if ($event_calendar_personal_manage == 'by_event') { $body .= ''.$prefix['personal_manage'].elgg_echo('event_calendar:personal_manage:description').'
'; $body .= '
';
- $body .= elgg_view("input/adduser",array('name' => 'adduser','internalid' => 'do_adduser','width'=> 200, 'minChars'=>2));
- $body .= '
'.elgg_echo('event_calendar:add_user_description').'
'; -}*/ - $body .= elgg_view('event_calendar/personal_manage_section',$vars); -/*if ($event_calendar_personal_manage == 'by_event') { - $body .= ''.$prefix['personal_manage'].elgg_echo('event_calendar:personal_manage:description').'
'; - $body .= '