From: Jan Schneider Date: Thu, 3 Jun 2010 10:43:30 +0000 (+0200) Subject: Pass the complete event to the view, to allow more flexible template contents. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=afd4129e79c056a2b2e41f947d31ba12f8c928f7;p=horde.git Pass the complete event to the view, to allow more flexible template contents. --- diff --git a/kronolith/lib/Kronolith.php b/kronolith/lib/Kronolith.php index bd8260cb2..f9c2391be 100644 --- a/kronolith/lib/Kronolith.php +++ b/kronolith/lib/Kronolith.php @@ -2128,6 +2128,7 @@ class Kronolith $share = $GLOBALS['kronolith_shares']->getShare($event->calendar); $view = new Horde_View(array('templatePath' => KRONOLITH_TEMPLATES . '/itip')); new Horde_View_Helper_Text($view); + $view->event = $event; foreach ($event->attendees as $email => $status) { /* Don't bother sending an invitation/update if the recipient does @@ -2171,16 +2172,6 @@ class Kronolith break; } - $view->title = $event->getTitle(); - $view->start = $event->start; - $view->end = $event->end; - if (strlen($event->location)) { - $view->location = $event->location; - } - if (strlen($event->description)) { - $view->description = $event->description; - } - if ($event->attendees) { $attendees = array(); foreach ($event->attendees as $mail => $attendee) { diff --git a/kronolith/templates/itip/notification.html.php b/kronolith/templates/itip/notification.html.php index 0d5b21658..49f6ac8bd 100644 --- a/kronolith/templates/itip/notification.html.php +++ b/kronolith/templates/itip/notification.html.php @@ -2,27 +2,30 @@ - + - + - + + event->location)): ?> - + - description)): ?> + + event->description)): ?> - + + attendees): ?> +
h($this->title) ?>h($this->event->getTitle()) ?>
h($this->start->strftime('%x %X')) ?>h($this->event->start->strftime('%x %X')) ?>
h($this->end->strftime('%x %X')) ?>h($this->event->end->strftime('%x %X')) ?>
h($this->location) ?>h($this->event->location) ?>
description, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO, 'callback' => null, 'class' => null, 'charset' => Horde_Nls::getCharset())) ?>event->description, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO, 'callback' => null, 'class' => null, 'charset' => Horde_Nls::getCharset())) ?>
@@ -35,6 +38,7 @@
diff --git a/kronolith/templates/itip/notification.plain.php b/kronolith/templates/itip/notification.plain.php index 505e2a729..65f8bc502 100644 --- a/kronolith/templates/itip/notification.plain.php +++ b/kronolith/templates/itip/notification.plain.php @@ -1,16 +1,20 @@ -subject ?> (start->strftime('%x'), $this->start->strftime('%X')) ?>) +subject ?> (event->start->strftime('%x'), $this->event->start->strftime('%X')) ?>) - location ?> +event->location)): ?> + event->location ?> + +attendees): ?> attendees) ?> -description)): ?> + +event->description)): ?> -description ?> +event->description ?>