<table border="0" cellspacing="2" cellpadding="2" align="center">

<!-- header -->
<tr>
 <td colspan="2">

    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td align="left" class="header" nowrap="nowrap"><b><?php echo $meeting['title'] ?></b>&nbsp;</td>
        <td align="right" class="header">
            <span class="smallheader">
            <?php if ($meeting['status'] == 'cancelled'): ?>
              <?php echo Horde::link($delurl, _("Delete Meeting"), 'menuitem') ?>
              <?php echo _("Delete") ?></a>
            <?php else: ?>
              <?php echo Horde::link($cancelurl, _("Cancel Meeting"), 'menuitem') ?>
              <?php echo _("Cancel") ?></a>
            <?php endif; ?>
              |
              <?php echo Horde::link($meetingurl, _("Edit Meeting"), 'menuitem') ?>
              <?php echo _("Edit") ?></a>
            </span>
        </td>
      </tr>
 </table>

 </td>
</tr>

<!-- start time -->
<tr>
 <td align="right" class="light" width="200px">
    <b><?php echo _("Start Time") ?>:</b>
 </td>
 <td align="left" class="text">
    <?php echo strftime($prefs->getValue('date_format'), $meeting['start']) ?>
 </td>
</tr>

<!-- end time -->
<tr>
 <td align="right" class="light">
    <b><?php echo _("End Time") ?>:</b>
 </td>
 <td align="left" class="text">
    <?php echo strftime($prefs->getValue('date_format'), $meeting['end']) ?>
 </td>
</tr>

<tr>
 <td align="right" class="light">
    <b><?php echo _("Location") ?>:</b>
 </td>
 <td align="left" class="text" >
  <?php echo $meeting['location'] ?>
 </td>
</tr>

<tr>
 <td align="right" class="light">
    <b><?php echo _("Status") ?>:</b>
 </td>
 <td align="left" class="text" >
  <?php echo Moment::statusToString($meeting['status']) ?>
 </td>
</tr>

<?php if (!empty($meeting['description'])): ?>
<tr class="smallheader">
 <td align="left" class="smallheader" colspan="2">
    <b><?php echo _("Description") ?>:</b>
</td>
</tr>
<tr>
 <td class="text" align="left" colspan="2">
  <?php echo nl2br($meeting['description']) ?>
 </td>
</tr>
<?php endif; ?>

<tr>
  <td align="left" colspan="2">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td align="right" colspan="2" class="header">
          <span class="light">
            <?php if ($meeting['status'] == 'cancelled'): ?>
              <?php echo Horde::link($delurl, _("Delete Meeting"), 'menuitem') ?>
              <?php echo _("Delete") ?></a>
            <?php else: ?>
              <?php echo Horde::link($cancelurl, _("Cancel Meeting"), 'menuitem') ?>
              <?php echo _("Cancel") ?></a>
            <?php endif; ?>
              |
              <?php echo Horde::link($meetingurl, _("Edit Meeting"), 'menuitem') ?>
              <?php echo _("Edit") ?></a>
          </span>
        </td>
      </tr>
    </table>
  </td>
</tr>

<tr>
  <td colspan="2" class="light">
    <b><?php echo _("Attendees") ?>:<br/></b>
    <table width="100%" border="0" cellpadding="0" cellspacing="1">
    <tr class="item">
        <th class="item" align="left" nowrap="nowrap">
            <?php echo _("Email Address") ?>
        </th>
        <th class="item" align="left" nowrap="nowrap">
            <?php echo _("Attendance") ?>
        </th>
        <th class="item" align="left" nowrap="nowrap">
            <?php echo _("Response") ?>
        </th>
    </tr>
<?php foreach ($meeting['attendees'] as $key => $attendee): ?>
    <tr>
        <td class="item" align="left" nowrap="nowrap">
            <?php echo $attendee['email'] ?>
        </td>
        <td class="item" align="left" nowrap="nowrap">
            <?php  if ($attendee['attendance'] == 'required') :?>
                <?php echo _("Required") ?>
            <?php else: ?>    
                <?php echo _("Optional") ?>
            <?php endif; ?>
        </td>
        <td class="item" align="left" nowrap="nowrap">
            <?php switch ($attendee['responce']): 
                  case 'none': ?>
                <?php echo _("None"); break; ?>
            <?php case 'accepted': ?>
                <?php echo _("Accepted"); break; ?>
            <?php case 'declined': ?>
                    <?php echo _("Declined"); break; ?>
            <?php case 'tentative': ?>
                    <?php echo _("Tentative"); break; ?>
            <?php endswitch; ?>
        </td>

    </tr>
<?php endforeach; ?> 
    </table>
  </td>
</tr>
</table>
