{if $actionInfo != ""}
  <div class="note">
    {$actionInfo}
  </div>
{/if}
<table>
<tr>
<td>
<h2>{$user.namePrefix} {$user.surname} {$user.name} {$user.nameSuffix}</h2>
<table border="0">
<tr>
  <td width="110"><b>ISIC:</b></td><td>{$user.ISIC}</td>
</tr>
<tr>
  <td><b>Login:</b></td><td>{$user.login}</td>
</tr>
<tr>
  <td><b>Odbor:</b></td>
  <td>
    {if $specialization}
    <a href="index.php?site=spec&amp;action=info&amp;id={$specialization.id}">{$specialization.name}</a>
    {else}
    Študent nie je pridelený pod žiaden štúdijný odbor.
    {/if}
  </td>
</tr>
<tr>
  <td><b>Rok štúdia:</b></td><td>{$user.year}.</td>
</tr>
</table>
<br />
<a href="index.php?site=student&amp;action=edit&amp;id={$user.id}">[editovať]</a> |
<a href="index.php?site=student&amp;action=change_p&amp;id={$user.id}">[zmeniť heslo]</a> |
<a href="index.php?site=student&amp;action=delete&amp;id={$user.id}">[vymazať]</a><br />
<br /><br />
<b>Zoznam zapísaných predmetov:</b><br />
{if $userCourseCount > 0}
<form action="index.php?site=student&amp;action=remove_course&amp;id={$user.id}" method="post">
  <br />
  <table class="default spacy">
  <tr class="head">
    <td colspan="2" align="left">Názov</td>
  </tr>
  {foreach from=$courses item=course}
    {if $course.signed}
    <tr>
      <td style="width: 400px"><a href="index.php?site=course&amp;action=info&amp;id={$course.id}">{$course.name}</a></td>
      <td align="center"><input type="checkbox" name="{$course.id}" /></td>
    </tr>
    {/if}
  {/foreach}
    <tr class="head">
      <td colspan="2" align="right"><input type="submit" name="remove" value="Odobrať" /></td>
    </tr>
  </table>
</form>
{else}
<br/>
Študent nemá priradený žiaden predmet.<br />
{/if}
{if $userCourseCount < $courseCount}
<br /><br />
<b>Pridať nový predmet:</b>
<br />
<form action="index.php?site=student&amp;action=add_course&amp;id={$user.id}" method="post">
  <table>
  	<tr>
  	  <td><select name="newCourse">
  	     {foreach from=$courses item=course}
  	       {if $course.signed == false}
      	   <option value="{$course.id}">{$course.name}</option>
      	   {/if}
      	 {/foreach}
          </select>
      </td>
      <td><input type="submit" name="add" value="Pridať" /></td>
  	</tr>
  </table>
</form>
{/if}
</td>
</tr>
</table>
