[% WRAPPER _conf_objects_frame.tt %]

<table border="0" class='data conftoolobj'>
  <tr>
    <th class='data' colspan=2><a href="conf.cgi?sub=objects&amp;data.id=[% object.get_id() %]">Services for host [% object.get_name() %]</a></th>
  </tr>
  [% IF services.host.size > 0 %]
  <tr>
    <td class='dataVar' width="30%">Directly Assigned to Host</td>
    <td class='dataVar' width="70%">
      <ul>
      [% FOREACH svc_name = services.host.keys.sort %]
        [% svc = services.host.$svc_name %]
        <li><a href="conf.cgi?sub=objects&amp;data.id=[% svc.get_id() %]">[% svc.get_name() %]</a></li>
      [% END %]
      </ul>
    </td>
  </tr>
  [% END %]

  [% IF services.group.size > 0 && services.host.size > 0%]
  <tr>
    <td class='dataVar' colspan=2><hr></td>
  </tr>
  [% END %]

  [% IF services.group.size > 0 %]
  <tr>
    <td class='dataVar' width="30%">From Hostgroups</td>
    <td class='dataVar' width="70%">
      <ul>
      [% FOREACH svc_name = services.group.keys.sort %]
        [% ref = services.group.$svc_name %]
        [% svc = ref.svc %]
        <li><a href="conf.cgi?sub=objects&amp;data.id=[% svc.get_id() %]">[% svc.get_name() %]</a>
          (
          [% FOREACH group = ref.groups %]
          <a href="conf.cgi?sub=objects&amp;type=hostgroup&amp;data.name=[% group %]">[% group %]</a>
          [% IF ! loop.last %], [% END %]
          [% END %]
          )
        </li>
      [% END %]
      </ul>
    </td>
  </tr>
  [% END %]
</table>

[% END %]
