<a href="index.php?site=course&amp;action=search_f">[Nové hľadanie]</a><br />
<br />
{if $courseCount > 0}
<table class="default spacy" width="100%">
  <tr class="head">
    <td>#</td>
    <td width="30%">Názov</td>
    <td width="10%">Kód</td>
    <td width="25%">Učiteľ</td>
    <td colspan="3">Akcia</td>
  </tr>
  {counter start=0 skip=1 print=false}
  {foreach from=$courses item=course name=row}
  <tr id="item{$smarty.foreach.row.index}" class="{if $smarty.foreach.row.index%2 == 0}row1{else}row2{/if}" 
      onmouseover="document.getElementById('item{$smarty.foreach.row.index}').style.background='#feda87'"
      onmouseout="document.getElementById('item{$smarty.foreach.row.index}').style.background='{if $smarty.foreach.row.index%2 == 0}#f8f8f8{else}#e8e8e8{/if}'">  
    <td>{counter}.</td>
    <td><b>{$course.name}</b></td>
    <td align="center">{$course.code}</td>
    <td>
      {if $course.teacher}
        <a href="index.php?site=teacher&amp;action=info&amp;id={$course.teacher.id}">
          {$course.teacher.namePrefix} {$course.teacher.surname} {$course.teacher.name} {$course.teacher.nameSuffix}
        </a>
      {/if}
    </td>
    <td class="action"><a href="index.php?site=course&amp;action=info&amp;id={$course.id}">[detaily]</a></td>
    <td class="action"><a href="index.php?site=course&amp;action=edit&amp;id={$course.id}">[editovať]</a></td>
    <td class="action"><a href="index.php?site=course&amp;action=delete&amp;id={$course.id}">[zmazať]</a></td>
  </tr>
  {/foreach}
  <tr class="head">
    <td colspan="7">&nbsp;</td>
  </tr>
</table>
{else}
  <div class="note">Žiaden predmet nevyhovuje filtru.</div>
{/if}
