diff --git a/action/cache.php b/action/cache.php --- a/action/cache.php +++ b/action/cache.php @@ -1,41 +1,42 @@ hlp =& plugin_load('helper','davcal'); } function register(Doku_Event_Handler $controller) { $controller->register_hook('PARSER_CACHE_USE', 'BEFORE', $this, 'handle_parser_cache_use'); } function handle_parser_cache_use(&$event, $param) { global $ID; $cache = &$event->data; if(!isset($cache->page)) return; $davcalMeta = p_get_metadata($ID, 'plugin_davcal'); if(!$davcalMeta) return; - if(isset($davcalMeta['table']) && $davcalMeta['table'] === true) + if((isset($davcalMeta['table']) && $davcalMeta['table'] === true) || + (isset($davcalMeta['events']) && $davcalMeta['events'] === true)) { $event->preventDefault(); $event->stopPropagation(); $event->result = false; } } } \ No newline at end of file diff --git a/all.css b/all.css --- a/all.css +++ b/all.css @@ -1,184 +1,207 @@ @import "fullcalendar-3.2.0/fullcalendar.less"; @import "datetimepicker-2.4.5/jquery.datetimepicker.less"; /* modal windows */ #dw_davcal__edit, #dw_davcal__settings, #dw_davcal__confirm { position: absolute; background-color: #fff; color: #000; z-index: 20; overflow: hidden; } #dw_davcal__edit .ui-dialog-content, #dw_davcal__confirm .ui-dialog-content, #dw_davcal__settings .ui-dialog-content, { padding-left: 0; padding-right: 0; } .dw_davcal__date { width: 90px; } .dw_davcal__time { width: 50px; } .dw_davcal__text { width: 220px; } #dw_davcal__editevent_attachments td { border: 0; } #dokuwiki__pagetools { z-index: 10; } .davcalevents { margin:50px auto 0 auto; width:100%; align-items:space-around; max-width:1200px; display:block; } .davcalevents .tile { width:280px; height:200px; margin:10px; display:inline-block; background-size:cover; position:relative; - cursor:pointer; transition: all 0.4s ease-out; box-shadow: 0px 35px 77px -17px rgba(0,0,0,0.44); overflow:hidden; color:white; font-family:'Roboto'; } .davcalevents .tile img { height:100%; width:100%; position:absolute; top:0; left:0; z-index:0; transition: all 0.4s ease-out; } .davcalevents .tile .text { /* z-index:99; */ position:absolute; padding:30px; height:calc(100% - 60px); } .davcalevents .tile h1 { font-weight:300; margin:0; text-shadow: 2px 2px 10px rgba(0,0,0,0.3); } .davcalevents .tile h2 { font-weight:100; margin:5px 0 0 0; font-style:italic; /* transform: translateX(200px); */ } .davcalevents .tile p { font-weight:300; margin:20px 0 0 0; line-height: 25px; /* opacity:0; */ transform: translateX(-200px); transition-delay: 0.2s; } .davcalevents .animate-text { opacity:0; transition: all 0.6s ease-in-out; } .davcalevents .tile:hover { /* background-color:#99aeff; */ box-shadow: 0px 35px 77px -17px rgba(0,0,0,0.64); transform:scale(1.05); } .davcalevents .tile:hover img { opacity: 0.2; } .davcalevents .tile:hover .animate-text { transform:translateX(0); opacity:1; } + +.davcalevents .more +{ + position:absolute; + bottom:20px; + right:20px; + margin: 0 auto; + color:currentColor; +} + .davcalevents .dots { position:absolute; bottom:20px; - right:30px; + right:0px; margin: 0 auto; width:30px; height:30px; color:currentColor; display:flex; flex-direction:column; align-items:center; justify-content:space-around; } +.davcalevents .more span +{ + transition: transform 0.4s ease-out, opacity 0.5s ease; + transform: translateY(30px); + opacity: 0; +} + +.davcalevents .more a, +.davcalevents .more a:hover, +.davcalevents .more a:visited +{ + color: #ffffff; +} + .davcalevents .dots span { width: 5px; height:5px; background-color: currentColor; border-radius: 50%; display:block; opacity:0; transition: transform 0.4s ease-out, opacity 0.5s ease; transform: translateY(30px); } .davcalevents .tile:hover span { opacity:1; transform:translateY(0px); } .davcalevents .dots span:nth-child(1) { transition-delay: 0.05s; } .davcalevents .dots span:nth-child(2) { transition-delay: 0.1s; } .davcalevents .dots span:nth-child(3) { transition-delay: 0.15s; } @media (max-width: 1000px) { .davcalevents { flex-direction: column; width:400px; } } \ No newline at end of file diff --git a/lang/de-informal/lang.php b/lang/de-informal/lang.php --- a/lang/de-informal/lang.php +++ b/lang/de-informal/lang.php @@ -1,65 +1,68 @@ */ $lang['created_by_davcal'] = 'Erstellt von DAVCal für DokuWiki'; $lang['unknown_error'] = 'Unbekannter Fehler'; $lang['event_added'] = 'Eintrag hinzugefügt'; $lang['event_edited'] = 'Eintrag bearbeitet'; $lang['event_deleted'] = 'Eintrag entfernt'; $lang['no_permission'] = 'Du hast nicht die erforderlichen Rechte, um den Eintrag zu bearbeiten'; $lang['settings'] = 'Einstellungen/Sync'; $lang['settings_saved'] = 'Einstellungen erfolgreich gespeichert'; $lang['error_saving'] = 'Fehler beim Speichern der Einstellungen.'; $lang['local_time'] = 'Lokale Zeit (Browser-basierend)'; $lang['from'] = 'Von'; $lang['to'] = 'Bis'; $lang['at'] = 'Am'; $lang['description'] = 'Beschreibung'; $lang['title'] = 'Titel'; $lang['error_timezone_not_in_list'] = 'Die angegebene Zeitzone wird von PHP nicht unterstützt'; $lang['error_option_error'] = 'In den Optionen wurden ein Fehler festgestellt!'; $lang['this_calendar_uses_timezone'] = 'Dieser Kalender wird in der Zeitzone %s angezeigt.'; $lang['costs'] = 'Kosten'; +$lang['more_info'] = 'mehr...'; +$lang['edit'] = 'Bearbeiten'; +$lang['add_new'] = 'Neu'; $lang['js']['create_new_event'] = 'Neuen Eintrag anlegen'; $lang['js']['cancel'] = 'Abbrechen'; $lang['js']['create'] = 'Anlegen'; $lang['js']['save'] = 'Speichern'; $lang['js']['settings'] = 'Einstellungen'; $lang['js']['edit'] = 'Bearbeiten'; $lang['js']['delete'] = 'Löschen'; $lang['js']['edit_event'] = 'Eintrag bearbeiten'; $lang['js']['allday'] = 'Ganzer Tag'; $lang['js']['title'] = 'Titel'; $lang['js']['location'] = 'Ort'; $lang['js']['from'] = 'Von'; $lang['js']['to'] = 'Bis'; $lang['js']['yes'] = 'Ja'; $lang['js']['confirmation'] = 'Bestätigung'; $lang['js']['ok'] = 'OK'; $lang['js']['info'] = 'Info'; $lang['js']['really_delete_this_event'] = 'Diesen Eintrag wirklich löschen?'; $lang['js']['timezone'] = 'Zeitzone'; $lang['js']['weeknumbers'] = 'Wochennummern'; $lang['js']['use_lang_tz'] = 'Zeitzone der Spracheinstellung verwenden'; $lang['js']['only_workweek'] = 'Zeige nur die Arbeitswoche'; $lang['js']['sync_url'] = 'CalDAV URL'; $lang['js']['error_retrieving_data'] = 'Beim Abfragen der Daten vom Kalenderserver ist ein Fehler aufgetreten.'; $lang['js']['start_date_invalid'] = 'Beginnzeit/-datum ist ungültig'; $lang['js']['end_date_invalid'] = 'Endzeit/-datum ist ungültig'; $lang['js']['end_date_before_start_date'] = 'Endzeit/-datum liegt vor Startzeit/-datum'; $lang['js']['end_date_is_same_as_start_date'] = 'Endzeit/-datum ist gleich wie Startzeit/-datum'; $lang['js']['description'] = 'Beschreibung'; $lang['js']['private_url'] = 'Private URL'; $lang['js']['recurring_cant_edit'] = 'Das Bearbeiten wiederkehrender Einträge wird derzeit nicht unterstützt'; $lang['js']['no_permission'] = 'Du hast nicht die erforderlichen Rechte, diesen Kalender zu bearbeiten'; $lang['js']['calendar'] = 'Kalender'; $lang['js']['start_monday'] = 'Die Woche beginnt am Montag'; $lang['js']['nothing_to_show'] = 'Nichts anzuzeigen'; $lang['js']['add_attachment'] = 'Link hinzufügen'; $lang['js']['attachments'] = 'Angehängte Links'; $lang['js']['language_specific'] = 'Sprachabhängig'; $lang['js']['sync_ical'] = 'iCal Sync URL'; $lang['js']['timeformat'] = 'Zeitformat'; diff --git a/lang/de/lang.php b/lang/de/lang.php --- a/lang/de/lang.php +++ b/lang/de/lang.php @@ -1,65 +1,68 @@ */ $lang['created_by_davcal'] = 'Erstellt von DAVCal für DokuWiki'; $lang['unknown_error'] = 'Unbekannter Fehler'; $lang['event_added'] = 'Eintrag hinzugefügt'; $lang['event_edited'] = 'Eintrag bearbeitet'; $lang['event_deleted'] = 'Eintrag entfernt'; $lang['no_permission'] = 'Sie haben nicht die erforderlichen Rechte, um den Eintrag zu bearbeiten'; $lang['settings'] = 'Einstellungen/Sync'; $lang['settings_saved'] = 'Einstellungen erfolgreich gespeichert'; $lang['error_saving'] = 'Fehler beim Speichern der Einstellungen.'; $lang['local_time'] = 'Lokale Zeit (Browser-basierend)'; $lang['from'] = 'Von'; $lang['to'] = 'Bis'; $lang['at'] = 'Am'; $lang['description'] = 'Beschreibung'; $lang['title'] = 'Titel'; $lang['error_timezone_not_in_list'] = 'Die angegebene Zeitzone wird von PHP nicht unterstützt'; $lang['error_option_error'] = 'In den Optionen wurden ein Fehler festgestellt!'; $lang['this_calendar_uses_timezone'] = 'Dieser Kalender wird in der Zeitzone %s angezeigt.'; $lang['costs'] = 'Kosten'; +$lang['more_info'] = 'mehr...'; +$lang['edit'] = 'Bearbeiten'; +$lang['add_new'] = 'Neu'; $lang['js']['create_new_event'] = 'Neuen Eintrag anlegen'; $lang['js']['cancel'] = 'Abbrechen'; $lang['js']['create'] = 'Anlegen'; $lang['js']['save'] = 'Speichern'; $lang['js']['settings'] = 'Einstellungen'; $lang['js']['edit'] = 'Bearbeiten'; $lang['js']['delete'] = 'Löschen'; $lang['js']['edit_event'] = 'Eintrag bearbeiten'; $lang['js']['allday'] = 'Ganzer Tag'; $lang['js']['title'] = 'Titel'; $lang['js']['location'] = 'Ort'; $lang['js']['from'] = 'Von'; $lang['js']['to'] = 'Bis'; $lang['js']['yes'] = 'Ja'; $lang['js']['confirmation'] = 'Bestätigung'; $lang['js']['ok'] = 'OK'; $lang['js']['info'] = 'Info'; $lang['js']['really_delete_this_event'] = 'Diesen Eintrag wirklich löschen?'; $lang['js']['timezone'] = 'Zeitzone'; $lang['js']['weeknumbers'] = 'Wochennummern'; $lang['js']['use_lang_tz'] = 'Zeitzone der Spracheinstellung verwenden'; $lang['js']['only_workweek'] = 'Zeige nur die Arbeitswoche'; $lang['js']['sync_url'] = 'CalDAV URL'; $lang['js']['error_retrieving_data'] = 'Beim Abfragen der Daten vom Kalenderserver ist ein Fehler aufgetreten.'; $lang['js']['start_date_invalid'] = 'Beginnzeit/-datum ist ungültig'; $lang['js']['end_date_invalid'] = 'Endzeit/-datum ist ungültig'; $lang['js']['end_date_before_start_date'] = 'Endzeit/-datum liegt vor Startzeit/-datum'; $lang['js']['end_date_is_same_as_start_date'] = 'Endzeit/-datum ist gleich wie Startzeit/-datum'; $lang['js']['description'] = 'Beschreibung'; $lang['js']['private_url'] = 'Private URL'; $lang['js']['recurring_cant_edit'] = 'Das Bearbeiten wiederkehrender Einträge wird derzeit nicht unterstützt'; $lang['js']['no_permission'] = 'Sie haben nicht die erforderlichen Rechte, diesen Kalender zu bearbeiten'; $lang['js']['calendar'] = 'Kalender'; $lang['js']['start_monday'] = 'Die Woche beginnt am Montag'; $lang['js']['nothing_to_show'] = 'Nichts anzuzeigen'; $lang['js']['add_attachment'] = 'Link hinzufügen'; $lang['js']['attachments'] = 'Angehängte Links'; $lang['js']['language_specific'] = 'Sprachabhängig'; $lang['js']['sync_ical'] = 'iCal Sync URL'; $lang['js']['timeformat'] = 'Zeitformat'; diff --git a/lang/en/lang.php b/lang/en/lang.php --- a/lang/en/lang.php +++ b/lang/en/lang.php @@ -1,65 +1,68 @@ */ $lang['created_by_davcal'] = 'Created by DAVCal for DokuWiki'; $lang['unknown_error'] = 'Unknown Error'; $lang['event_added'] = 'Event added'; $lang['event_edited'] = 'Event edited'; $lang['event_deleted'] = 'Event deleted'; $lang['no_permission'] = 'You don\'t have permission to modify this calendar'; $lang['settings'] = 'Settings/Sync'; $lang['settings_saved'] = 'Settings saved successfully'; $lang['error_saving'] = 'Error saving settings.'; $lang['local_time'] = 'Local time (Browser based)'; $lang['from'] = 'From'; $lang['to'] = 'To'; $lang['at'] = 'At'; $lang['description'] = 'Description'; $lang['title'] = 'Title'; $lang['error_timezone_not_in_list'] = 'The desired timezone is not supported by PHP!'; $lang['error_option_error'] = 'You have an error in the option list'; $lang['this_calendar_uses_timezone'] = 'This calendar is shown in the timezone %s.'; $lang['costs'] = 'Costs'; +$lang['more_info'] = 'more...'; +$lang['edit'] = 'Edit'; +$lang['add_new'] = 'New Event'; $lang['js']['create_new_event'] = 'Create new Event'; $lang['js']['cancel'] = 'Cancel'; $lang['js']['create'] = 'Create'; $lang['js']['save'] = 'Save'; $lang['js']['settings'] = 'Settings'; $lang['js']['edit'] = 'Edit'; $lang['js']['delete'] = 'Delete'; $lang['js']['edit_event'] = 'Edit Event'; $lang['js']['allday'] = 'All Day Event'; $lang['js']['title'] = 'Title'; $lang['js']['location'] = 'Location'; $lang['js']['from'] = 'From'; $lang['js']['to'] = 'To'; $lang['js']['yes'] = 'Yes'; $lang['js']['confirmation'] = 'Confirmation'; $lang['js']['ok'] = 'OK'; $lang['js']['info'] = 'Info'; $lang['js']['really_delete_this_event'] = 'Really delete this event?'; $lang['js']['timezone'] = 'Timezone'; $lang['js']['weeknumbers'] = 'Week Numbers'; $lang['js']['use_lang_tz'] = 'Use Timezone from language setting'; $lang['js']['only_workweek'] = 'Show only Work Week'; $lang['js']['sync_url'] = 'CalDAV URL'; $lang['js']['error_retrieving_data'] = 'There was an error retrieving data from the calendar server.'; $lang['js']['start_date_invalid'] = 'Start date/time is invalid.'; $lang['js']['end_date_invalid'] = 'End date/time is invalid.'; $lang['js']['end_date_before_start_date'] = 'End date/time is before start date/time.'; $lang['js']['end_date_is_same_as_start_date'] = 'End date/time is equal to start date/time.'; $lang['js']['description'] = 'Description'; $lang['js']['private_url'] = 'Private URL'; $lang['js']['recurring_cant_edit'] = 'Editing recurring events is currently not supported'; $lang['js']['no_permission'] = 'You don\'t have permission to modify this calendar'; $lang['js']['calendar'] = 'Calendar'; $lang['js']['start_monday'] = 'Week starts on Monday'; $lang['js']['nothing_to_show'] = 'Nothing to show'; $lang['js']['add_attachment'] = 'Add link'; $lang['js']['attachments'] = 'Attached links'; $lang['js']['language_specific'] = 'Language specific'; $lang['js']['sync_ical'] = 'iCal Sync URL'; $lang['js']['timeformat'] = 'Time Format'; diff --git a/syntax/events.php b/syntax/events.php --- a/syntax/events.php +++ b/syntax/events.php @@ -1,344 +1,309 @@ */ // must be run within Dokuwiki if(!defined('DOKU_INC')) die(); if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); require_once(DOKU_PLUGIN.'syntax.php'); class syntax_plugin_davcal_events extends DokuWiki_Syntax_Plugin { protected $hlp = null; // Load the helper plugin public function syntax_plugin_davcal_events() { $this->hlp =& plugin_load('helper', 'davcal'); } /** * What kind of syntax are we? */ function getType(){ return 'substition'; } /** * What about paragraphs? */ function getPType(){ return 'normal'; } /** * Where to sort in? */ function getSort(){ return 165; } /** * Connect pattern to lexer */ function connectTo($mode) { $this->Lexer->addSpecialPattern('\{\{davcalevents>[^}]*\}\}',$mode,'plugin_davcal_events'); } /** * Handle the match */ function handle($match, $state, $pos, Doku_Handler $handler){ global $ID; $data = array('id' => array(), 'startdate' => 'today', 'numdays' => 30, 'startisend' => false, 'dateformat' => 'Y-m-d H:i', 'alldayformat' => 'Y-m-d', 'onlystart' => false, 'sort' => 'desc', 'timezone' => 'local', 'timeformat' => null, ); $lastid = $ID; $options = trim(substr($match,15,-2)); $options = explode(',', $options); foreach($options as $option) { list($key, $val) = explode('=', $option); $key = strtolower(trim($key)); $val = trim($val); switch($key) { case 'id': $lastid = $val; if(!in_array($val, $data['id'])) $data['id'][$val] = null; break; case 'color': $data['id'][$lastid] = $val; break; case 'onlystart': if(($val === 'on') || ($val === 'true')) $data['onlystart'] = true; break; case 'startisend': if(($val === 'on') || ($val === 'true')) $data['startisend'] = true; break; case 'timezone': $tzlist = \DateTimeZone::listIdentifiers(DateTimeZone::ALL); if(in_array($val, $tzlist) || $val === 'no') $data['timezone'] = $val; else msg($this->getLang('error_timezone_not_in_list'), -1); break; default: $data[$key] = $val; } } // Handle the default case when the user didn't enter a different ID if(empty($data['id'])) { $data['id'] = array($ID => '#3a87ad'); } // Fix up the colors, if no color information is given foreach($data['id'] as $id => $color) { if(is_null($color)) { // If this is the current calendar or a WebDAV calendar, use the // default color if(($id === $ID) || (strpos($id, 'webdav://') === 0)) { $data['id'][$id] = '#3a87ad'; } // Otherwise, retrieve the color information from the calendar settings else { $calid = $this->hlp->getCalendarIdForPage($ID); $settings = $this->hlp->getCalendarSettings($calid); $color = $settings['calendarcolor']; $data['id'][$id] = $color; } } } return $data; } private static function sort_events_asc($a, $b) { $from1 = new \DateTime($a['start']); $from2 = new \DateTime($b['start']); return $from2 < $from1; } private static function sort_events_desc($a, $b) { $from1 = new \DateTime($a['start']); $from2 = new \DateTime($b['start']); return $from1 < $from2; } /** * Create output */ function render($format, Doku_Renderer $R, $data) { if($format == 'metadata') { $R->meta['plugin_davcal']['events'] = true; return true; } if(($format != 'xhtml') && ($format != 'odt')) return false; global $ID; $events = array(); $from = $data['startdate']; $toStr = null; // Handle the various options to 'startDate' if($from === 'today') { $from = new \DateTime(); } elseif(strpos($from, 'today-') === 0) { $days = intval(str_replace('today-', '', $from)); $from = new \DateTime(); $from->sub(new \DateInterval('P'.$days.'D')); } elseif(strpos($from, 'today+') === 0) { $days = intval(str_replace('today+', '', $from)); $from = new \DateTime(); $from->add(new \DateInterval('P'.$days.'D')); } else { $from = new \DateTime($from); } // Handle the option 'startisend' if($data['startisend'] === true) { if($data['numdays'] > 0) { $to = clone $from; $to->sub(new \DateInterval('P'.$data['numdays'].'D')); $fromStr = $to->format('Y-m-d'); } else { $fromStr = null; } $toStr = $from->format('Y-m-d'); } else { if($data['numdays'] > 0) { $to = clone $from; $to->add(new \DateInterval('P'.$data['numdays'].'D')); $toStr = $to->format('Y-m-d'); } else { $toStr = null; } $fromStr = $from->format('Y-m-d'); } // Support for timezone $timezone = $data['timezone']; // Filter events by user permissions $userEvents = $this->hlp->filterCalendarPagesByUserPermission($data['id']); + $perms = array(); // Fetch the events foreach($userEvents as $calPage => $color) { $events = array_merge($events, $this->hlp->getEventsWithinDateRange($calPage, $user, $fromStr, $toStr, $timezone, null, array('URL', 'X-COST'))); - + $perms[$calPage] = $this->hlp->checkCalendarPermission($calPage); + } // Sort the events if($data['sort'] === 'desc') usort($events, array("syntax_plugin_davcal_events", "sort_events_desc")); else usort($events, array("syntax_plugin_davcal_events", "sort_events_asc")); - $R->doc .= '
'; + $R->doc .= '
'; + + foreach($perms as $page => $perm) + { + if($perm > AUTH_READ) + { + $R->doc .= ''.$this->getLang('add_new').'
'; + break; + } + } foreach($events as $event) { $from = new \DateTime($event['start']); $color = $data['id'][$event['page']]; $R->doc .= '
'; $R->doc .= '
'; if($timezone !== 'local') { $from->setTimezone(new \DateTimeZone($timezone)); $to->setTimezone(new \DateTimeZone($timezone)); } if($event['allDay'] === true) $R->doc .= '

'.$from->format($data['alldayformat']).'

'; else $R->doc .= '

'.$from->format($data['dateformat']).'

'; if(!is_null($data['timeformat']) && $event['allDay'] != true) { $R->doc .= '

'.$from->format($data['timeformat']).'

'; } - $R->doc .= $event['title'].'
'; - $R->doc .= ''.$this->getLang('costs').': '.$event['X-COST'].''; + $R->doc .= hsc($event['title']).'
'; + if(isset($event['X-COST']) && $event['X-COST'] !== '') + { + $R->doc .= ''.$this->getLang('costs').': '.hsc($event['X-COST']).''; + } + $R->doc .= '
'; $R->doc .= '
'; $R->doc .= ''; $R->doc .= ''; $R->doc .= ''; $R->doc .= '
'; - $R->doc .= '
'; + if(isset($event['URL']) && $event['URL'] !== '') + { + $R->doc .= '
'; + $R->doc .= ''.$this->getLang('more_info').''; + $R->doc .= '
'; + } + if(isset($perms[$event['page']]) && ($perms[$event['page']] > AUTH_READ)) + { + $R->doc .= '
'; + $R->doc .= ''.$this->getLang('edit').''; + $R->doc .= '
'; + } $R->doc .= '
'; } $R->doc .= '
'; - - /* - // Create tabular output - $R->table_open(); - $R->tablethead_open(); - $R->tableheader_open(); - $R->doc .= $data['onlystart'] ? $this->getLang('at') : $this->getLang('from'); - $R->tableheader_close(); - if(!$data['onlystart']) - { - $R->tableheader_open(); - $R->doc .= $this->getLang('to'); - $R->tableheader_close(); - } - $R->tableheader_open(); - $R->doc .= $this->getLang('title'); - $R->tableheader_close(); - $R->tableheader_open(); - $R->doc .= $this->getLang('description'); - $R->tableheader_close(); - $R->tablethead_close(); - foreach($events as $event) - { - $R->tablerow_open(); - $R->tablecell_open(); - $from = new \DateTime($event['start']); - if($timezone !== 'local') - { - $from->setTimezone(new \DateTimeZone($timezone)); - $to->setTimezone(new \DateTimeZone($timezone)); - } - if($event['allDay'] === true) - $R->doc .= $from->format($data['alldayformat']); - else - $R->doc .= $from->format($data['dateformat']); - $R->tablecell_close(); - if(!$data['onlystart']) - { - $to = new \DateTime($event['end']); - // Fixup all day events, which have one day in excess - if($event['allDay'] === true) - { - $to->sub(new \DateInterval('P1D')); - } - $R->tablecell_open(); - if($event['allDay'] === true) - $R->doc .= $to->format($data['alldayformat']); - else - $R->doc .= $to->format($data['dateformat']); - $R->tablecell_close(); - } - $R->tablecell_open(); - $R->doc .= $event['title']; - $R->tablecell_close(); - $R->tablecell_open(); - $R->doc .= $event['description']; - $R->tablecell_close(); - $R->tablerow_close(); - } - $R->table_close(); - */ } } // vim:ts=4:sw=4:et:enc=utf-8: