{if $studentCount > 0}
{if $actionInfo != ""}
  <div class="note">
    {$actionInfo}
  </div>
{/if}
{if $loopCount > 1}
<div class="note">
  Zoznam študentov môžete utriediť podľa <b>Mena</b>, <b>Odboru</b> alebo <b>Čísla ISIC</b>.
</div>
<table class="list" border="0" width="100%">
  <tr class="head">
    <td width="10%" align="left" style="border-right-width: 0px">
      {if $startIndex > 0}&nbsp;<a href="index.php?site=student&amp;action=list&amp;step={$startIndex-$step}&amp;order={$order}">späť</a>{/if}
    </td>
    <td align="center" style="border-left-width: 0px; border-right-width: 0px; padding-bottom: 0.5em; padding-top: 0.5em">
    {section name=listStart loop=$loopCount start=0 step=1}
      <a href="index.php?site=student&amp;action=list&amp;step={$smarty.section.listStart.index*$step}&amp;order={$order}">[{$smarty.section.listStart.index+1}]</a>&nbsp;
    {/section}
    </td>
    <td width="10%" align="right" style="border-left-width: 0px">
      {if $startIndex < ($loopCount-1)*$step}<a href="index.php?site=student&amp;action=list&amp;step={$startIndex+$step}&amp;order={$order}">ďalej</a>&nbsp;{/if}
    </td>
  </tr>
</table>
{/if}
<table class="default spacy" width="100%">
  <tr class="head">
    <td colspan="2" style="width: 40%">
      <a href="index.php?site=student&amp;action=list&amp;order=name{if $order == "name"}D{/if}">Meno</a>
    </td>
    <td style="width: 30%">
      <a href="index.php?site=student&amp;action=list&amp;order=spec{if $order == "spec"}D{/if}">Odbor</a>
    </td>
    <td>
      <a href="index.php?site=student&amp;action=list&amp;order=year{if $order == "year"}D{/if}">Rok štúdia</a>
    </td>
    <td colspan="3">Akcia</td>
  </tr>
  {foreach from=$users item=user 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 class="namePrefix">{$user.namePrefix}&nbsp;</td>
    <td class="name"><b>{$user.surname}</b> {$user.name} {$user.nameSuffix}</td>
    <td>
      {if $user.specialization}
        <a href="index.php?site=spec&amp;action=info&amp;id={$user.specialization.id}">{$user.specialization.name}</a>
      {/if}
    </td>
    <td align="center">{$user.year}.</td>
    <td class="action"><a href="index.php?site=student&amp;action=info&amp;id={$user.id}">[detaily]</a></td>
    <td class="action"><a href="index.php?site=student&amp;action=edit&amp;id={$user.id}">[editovať]</a></td>
    <td class="action"><a href="index.php?site=student&amp;action=delete&amp;id={$user.id}">[zmazať]</a></td>
  </tr>
  {/foreach}
</table>
<table class="list" border="0" width="100%">
  <tr class="head">
{if $loopCount > 1}
    <td width="10%" align="left" style="border-right-width: 0px; padding-bottom: 0.5em; padding-top: 0.5em">
      {if $startIndex > 0}&nbsp;<a href="index.php?site=student&amp;action=list&amp;step={$startIndex-$step}&amp;order={$order}">späť</a>{/if}
    </td>
    <td style="border-right-width: 0px; border-left-width: 0px"></td>
    <td width="10%" align="right" style="border-left-width: 0px; padding-bottom: 0.5em; padding-top: 0.5em">
      {if $startIndex < ($loopCount-1)*$step}<a href="index.php?site=student&amp;action=list&amp;step={$startIndex+$step}&amp;order={$order}">ďalej&nbsp;</a>{/if}
    </td>
{else}
    <td colspan="7">&nbsp;</td>
{/if}
  </tr>
</table>
<br />
{else}
  <div class="note">
    V databáze nie sú žiadny študenti.<br/>
    <br/>
    Študentov môžete pridať <a href="index.php?site=student&amp;action=add">manuálne</a>, alebo ich získať 
    <a href="index.php?site=import&amp;action=import_q">importovaním</a>.
  </div>
{/if}
