<?php /* Smarty version 2.6.18, created on 2007-06-06 00:15:05
         compiled from studentList.tpl */ ?>
<?php if ($this->_tpl_vars['studentCount'] > 0): ?>
<?php if ($this->_tpl_vars['actionInfo'] != ""): ?>
  <div class="note">
    <?php echo $this->_tpl_vars['actionInfo']; ?>

  </div>
<?php endif; ?>
<?php if ($this->_tpl_vars['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">
      <?php if ($this->_tpl_vars['startIndex'] > 0): ?>&nbsp;<a href="index.php?site=student&amp;action=list&amp;step=<?php echo $this->_tpl_vars['startIndex']-$this->_tpl_vars['step']; ?>
&amp;order=<?php echo $this->_tpl_vars['order']; ?>
">späť</a><?php endif; ?>
    </td>
    <td align="center" style="border-left-width: 0px; border-right-width: 0px; padding-bottom: 0.5em; padding-top: 0.5em">
    <?php unset($this->_sections['listStart']);
$this->_sections['listStart']['name'] = 'listStart';
$this->_sections['listStart']['loop'] = is_array($_loop=$this->_tpl_vars['loopCount']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['listStart']['start'] = (int)0;
$this->_sections['listStart']['step'] = ((int)1) == 0 ? 1 : (int)1;
$this->_sections['listStart']['show'] = true;
$this->_sections['listStart']['max'] = $this->_sections['listStart']['loop'];
if ($this->_sections['listStart']['start'] < 0)
    $this->_sections['listStart']['start'] = max($this->_sections['listStart']['step'] > 0 ? 0 : -1, $this->_sections['listStart']['loop'] + $this->_sections['listStart']['start']);
else
    $this->_sections['listStart']['start'] = min($this->_sections['listStart']['start'], $this->_sections['listStart']['step'] > 0 ? $this->_sections['listStart']['loop'] : $this->_sections['listStart']['loop']-1);
if ($this->_sections['listStart']['show']) {
    $this->_sections['listStart']['total'] = min(ceil(($this->_sections['listStart']['step'] > 0 ? $this->_sections['listStart']['loop'] - $this->_sections['listStart']['start'] : $this->_sections['listStart']['start']+1)/abs($this->_sections['listStart']['step'])), $this->_sections['listStart']['max']);
    if ($this->_sections['listStart']['total'] == 0)
        $this->_sections['listStart']['show'] = false;
} else
    $this->_sections['listStart']['total'] = 0;
if ($this->_sections['listStart']['show']):

            for ($this->_sections['listStart']['index'] = $this->_sections['listStart']['start'], $this->_sections['listStart']['iteration'] = 1;
                 $this->_sections['listStart']['iteration'] <= $this->_sections['listStart']['total'];
                 $this->_sections['listStart']['index'] += $this->_sections['listStart']['step'], $this->_sections['listStart']['iteration']++):
$this->_sections['listStart']['rownum'] = $this->_sections['listStart']['iteration'];
$this->_sections['listStart']['index_prev'] = $this->_sections['listStart']['index'] - $this->_sections['listStart']['step'];
$this->_sections['listStart']['index_next'] = $this->_sections['listStart']['index'] + $this->_sections['listStart']['step'];
$this->_sections['listStart']['first']      = ($this->_sections['listStart']['iteration'] == 1);
$this->_sections['listStart']['last']       = ($this->_sections['listStart']['iteration'] == $this->_sections['listStart']['total']);
?>
      <a href="index.php?site=student&amp;action=list&amp;step=<?php echo $this->_sections['listStart']['index']*$this->_tpl_vars['step']; ?>
&amp;order=<?php echo $this->_tpl_vars['order']; ?>
">[<?php echo $this->_sections['listStart']['index']+1; ?>
]</a>&nbsp;
    <?php endfor; endif; ?>
    </td>
    <td width="10%" align="right" style="border-left-width: 0px">
      <?php if ($this->_tpl_vars['startIndex'] < ( $this->_tpl_vars['loopCount']-1 ) * $this->_tpl_vars['step']): ?><a href="index.php?site=student&amp;action=list&amp;step=<?php echo $this->_tpl_vars['startIndex']+$this->_tpl_vars['step']; ?>
&amp;order=<?php echo $this->_tpl_vars['order']; ?>
">ďalej</a>&nbsp;<?php endif; ?>
    </td>
  </tr>
</table>
<?php endif; ?>
<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<?php if ($this->_tpl_vars['order'] == 'name'): ?>D<?php endif; ?>">Meno</a>
    </td>
    <td style="width: 30%">
      <a href="index.php?site=student&amp;action=list&amp;order=spec<?php if ($this->_tpl_vars['order'] == 'spec'): ?>D<?php endif; ?>">Odbor</a>
    </td>
    <td>
      <a href="index.php?site=student&amp;action=list&amp;order=year<?php if ($this->_tpl_vars['order'] == 'year'): ?>D<?php endif; ?>">Rok štúdia</a>
    </td>
    <td colspan="3">Akcia</td>
  </tr>
  <?php $_from = $this->_tpl_vars['users']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['row'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['row']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['user']):
        $this->_foreach['row']['iteration']++;
?>
  <tr id="item<?php echo ($this->_foreach['row']['iteration']-1); ?>
" class="<?php if (($this->_foreach['row']['iteration']-1)%2 == 0): ?>row1<?php else: ?>row2<?php endif; ?>" 
      onmouseover="document.getElementById('item<?php echo ($this->_foreach['row']['iteration']-1); ?>
').style.background='#feda87'"
      onmouseout="document.getElementById('item<?php echo ($this->_foreach['row']['iteration']-1); ?>
').style.background='<?php if (($this->_foreach['row']['iteration']-1)%2 == 0): ?>#f8f8f8<?php else: ?>#e8e8e8<?php endif; ?>'">  
    <td class="namePrefix"><?php echo $this->_tpl_vars['user']['namePrefix']; ?>
&nbsp;</td>
    <td class="name"><b><?php echo $this->_tpl_vars['user']['surname']; ?>
</b> <?php echo $this->_tpl_vars['user']['name']; ?>
 <?php echo $this->_tpl_vars['user']['nameSuffix']; ?>
</td>
    <td>
      <?php if ($this->_tpl_vars['user']['specialization']): ?>
        <a href="index.php?site=spec&amp;action=info&amp;id=<?php echo $this->_tpl_vars['user']['specialization']['id']; ?>
"><?php echo $this->_tpl_vars['user']['specialization']['name']; ?>
</a>
      <?php endif; ?>
    </td>
    <td align="center"><?php echo $this->_tpl_vars['user']['year']; ?>
.</td>
    <td class="action"><a href="index.php?site=student&amp;action=info&amp;id=<?php echo $this->_tpl_vars['user']['id']; ?>
">[detaily]</a></td>
    <td class="action"><a href="index.php?site=student&amp;action=edit&amp;id=<?php echo $this->_tpl_vars['user']['id']; ?>
">[editovať]</a></td>
    <td class="action"><a href="index.php?site=student&amp;action=delete&amp;id=<?php echo $this->_tpl_vars['user']['id']; ?>
">[zmazať]</a></td>
  </tr>
  <?php endforeach; endif; unset($_from); ?>
</table>
<table class="list" border="0" width="100%">
  <tr class="head">
<?php if ($this->_tpl_vars['loopCount'] > 1): ?>
    <td width="10%" align="left" style="border-right-width: 0px; padding-bottom: 0.5em; padding-top: 0.5em">
      <?php if ($this->_tpl_vars['startIndex'] > 0): ?>&nbsp;<a href="index.php?site=student&amp;action=list&amp;step=<?php echo $this->_tpl_vars['startIndex']-$this->_tpl_vars['step']; ?>
&amp;order=<?php echo $this->_tpl_vars['order']; ?>
">späť</a><?php endif; ?>
    </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">
      <?php if ($this->_tpl_vars['startIndex'] < ( $this->_tpl_vars['loopCount']-1 ) * $this->_tpl_vars['step']): ?><a href="index.php?site=student&amp;action=list&amp;step=<?php echo $this->_tpl_vars['startIndex']+$this->_tpl_vars['step']; ?>
&amp;order=<?php echo $this->_tpl_vars['order']; ?>
">ďalej&nbsp;</a><?php endif; ?>
    </td>
<?php else: ?>
    <td colspan="7">&nbsp;</td>
<?php endif; ?>
  </tr>
</table>
<br />
<?php 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>
<?php endif; ?>
