<div align="center">
  <table border="0" class='comment' style="min-width: 700px;">
    <tr class='comment'>
      [% IF names %]
      <th class='comment'>Host Name</th>
      [% IF type == 'service' %]
      <th class='comment'>Service</th>
      [% END %]
      [% END %]
      <th class='comment'>Entry Time</th>
      <th class='comment'>Author</th>
      <th class='comment'>Comment</th>
      <th class='comment'>Comment ID</th>
      <th class='comment'>Persistent</th>
      <th class='comment'>Type</th>
      <th class='comment'>Expires</th>
      <th class='comment'>Actions</th>
    </tr>
    [%  FOREACH com = comments %]
    [% SET class = 'commentOdd'  IF loop.even %]
    [% SET class = 'commentEven' IF loop.odd %]
    <tr class='[% class %] clickable' id="[% IF type == 'host' %]hst[% ELSE %]svc[% END %]_[% com.id %]">
      [% IF names %]
      <td class='[% class %]'><a href='extinfo.cgi?type=1&amp;host=[% com.host_name | uri %]'>[% com.host_name %]</a></td>
      [% IF type == 'service' %]
      <td class='[% class %]'><a href='extinfo.cgi?type=2&amp;host=[% com.host_name | uri %]&amp;service=[% com.service_description | uri %]'>[% com.service_description %]</a></td>
      [% END %]
      [% END %]
      <td class='[% class %]'>[% date_format(c, com.entry_time) %]</td>
      <td class='[% class %]'>[% com.author %]</td>
      <td class='[% class %]'>[% IF escape_html_tags %][% escape_html(com.comment) %][% ELSE %][% com.comment %][% END %]</td>
      <td class='[% class %]'>[% com.id %]</td>
      <td class='[% class %]'>[% IF com.persistent %]Yes[% ELSE %]No[% END %]</td>
      <td class='[% class %]'>[% IF com.entry_type == 1 %]User[% ELSIF com.entry_type == 2 %]Scheduled Downtime[% ELSIF com.entry_type == 3 %]Flap Detection[% ELSIF com.entry_type == 4 %]Acknowledgement[% ELSE %]?[% END %]</td>
      <td class='[% class %]'>[% IF com.expires %][% date_format(c, com.expire_time) %][% ELSE %]N/A[% END %]</td>
      [% IF type == 'host' %]
        [% UNLESS c.config.command_disabled.exists('2') %]
        <td class='[% class %]'><a href='cmd.cgi?cmd_typ=2&amp;com_id=[% com.id %]&amp;backend=[% com.peer_key %]'><img src='[% url_prefix %]thruk/themes/[% theme %]/images/delete.gif' border="0" alt='Delete This Comment' title='Delete This Comment' width="20" height="20"></a></td>
        [% END %]
      [% END %]
      [% IF type == 'service' %]
        [% UNLESS c.config.command_disabled.exists('4') %]
        <td class='[% class %]'><a href='cmd.cgi?cmd_typ=4&amp;com_id=[% com.id %]&amp;backend=[% com.peer_key %]'><img src='[% url_prefix %]thruk/themes/[% theme %]/images/delete.gif' border="0" alt='Delete This Comment' title='Delete This Comment' width="20" height="20"></a></td>
        [% END %]
      [% END %]
    </tr>
    [% END %]
    [% IF comments.size == 0 %]
    <tr class='commentOdd'>
      <td class='commentOdd' colspan="10">There are no [% type %] comments</td>
    </tr>
    [% END %]
  </table>
</div>
