$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
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) {
<table style="border-collapse:collapse;border:1px solid #000" border="1">
<thead><tr>
- <th colspan="2" style="font-weight:bold;font-size:120%;background-color:#ddd"><?= $this->h($this->title) ?></th>
+ <th colspan="2" style="font-weight:bold;font-size:120%;background-color:#ddd"><?= $this->h($this->event->getTitle()) ?></th>
</tr></thead>
<tbody>
<tr>
<td style="font-weight:bold;vertical-align:top"><?= _("Start:") ?></td>
- <td><?= $this->h($this->start->strftime('%x %X')) ?></td>
+ <td><?= $this->h($this->event->start->strftime('%x %X')) ?></td>
</tr>
<tr>
<td style="font-weight:bold;vertical-align:top"><?= _("End:") ?></td>
- <td><?= $this->h($this->end->strftime('%x %X')) ?></td>
+ <td><?= $this->h($this->event->end->strftime('%x %X')) ?></td>
</tr>
+ <? if (strlen($this->event->location)): ?>
<tr>
<td style="font-weight:bold;vertical-align:top"><?= _("Location:") ?></td>
- <td><?= $this->h($this->location) ?></td>
+ <td><?= $this->h($this->event->location) ?></td>
</tr>
- <? if (isset($this->description)): ?>
+ <? endif; ?>
+ <? if (strlen($this->event->description)): ?>
<tr>
<td style="font-weight:bold;vertical-align:top"><?= _("Description:") ?></td>
- <td><?= Horde_Text_Filter::filter($this->description, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO, 'callback' => null, 'class' => null, 'charset' => Horde_Nls::getCharset())) ?></td>
+ <td><?= Horde_Text_Filter::filter($this->event->description, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO, 'callback' => null, 'class' => null, 'charset' => Horde_Nls::getCharset())) ?></td>
</tr>
<? endif; ?>
+ <? if ($this->attendees): ?>
<tr>
<td style="font-weight:bold;vertical-align:top"><?= _("Attendees:") ?></td>
<td>
<? endforeach; ?>
</td>
</tr>
+ <? endif; ?>
</tbody>
</table>
-<?= $this->subject ?> (<? printf(_("on %s at %s"), $this->start->strftime('%x'), $this->start->strftime('%X')) ?>)
+<?= $this->subject ?> (<? printf(_("on %s at %s"), $this->event->start->strftime('%x'), $this->event->start->strftime('%X')) ?>)
-<?= _("Location:") ?> <?= $this->location ?>
+<? if (strlen($this->event->location)): ?>
+<?= _("Location:") ?> <?= $this->event->location ?>
+<? endif; ?>
+<? if ($this->attendees): ?>
<?= _("Attendees:") ?> <?= implode(', ', $this->attendees) ?>
-<? if (isset($this->description)): ?>
+<? endif; ?>
+<? if (strlen($this->event->description)): ?>
<?= _("The following is a more detailed description of the event:") ?>
-<?= $this->description ?>
+<?= $this->event->description ?>
<? endif; ?>