Add resources to the event view as well
authorMichael J. Rubinsky <mrubinsk@horde.org>
Mon, 28 Sep 2009 16:23:30 +0000 (12:23 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Tue, 29 Sep 2009 20:53:58 +0000 (16:53 -0400)
kronolith/lib/View/Event.php
kronolith/templates/view/view.inc

index cebe7df..b53911f 100644 (file)
@@ -79,7 +79,7 @@ class Kronolith_View_Event {
         $owner = Kronolith::getUserName($creatorId);
         $status = Kronolith::statusToString($this->event->getStatus());
         $attendees = $this->event->getAttendees();
-
+        $resources = $this->event->getResources();
         if ($datetime = Horde_Util::getFormData('datetime')) {
             $datetime = new Horde_Date($datetime);
             $month = $datetime->month;
index 5f3c104..02457a3 100644 (file)
@@ -165,5 +165,21 @@ if ($this->event->isInitialized() && $this->event->alarm > 0):
   <td><?php echo Kronolith::responseToString($status['response']) ?></td>
  </tr>
  <?php endforeach; ?>
+ <!-- Resources -->
+ <tr>
+  <td colspan="3" class="control"><strong><?php echo _("Resources") ?></strong></td>
+ </tr>
+ <tr class="item leftAlign">
+  <th width="50%"><?php echo _("Resource") ?></th>
+  <th width="25%"><?php echo _("Attendance") ?></th>
+  <th width="25%"><?php echo _("Response") ?></th>
+ </tr>
+<?php foreach ($resources as $id => $resource):?>
+<tr>
+ <td class="nowrap"><?php echo htmlspecialchars($resource['name'])?></td>
+ <td><?php echo Kronolith::partToString($resource['attendance']) ?></td>
+ <td><?php echo Kronolith::responseToString($resource['response']) ?></td>
+</tr>
+<?php endforeach;?>
 </table>
 <?php endif; ?>