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

  </div>
<?php endif; ?>
<div class="note">
  Zoznam predmetov môžete utriediť podľa <b>Názvu</b>, <b>Kódu</b> alebo <b>Učiteľa</b>.
</div>
<table class="default spacy" width="100%">
  <tr class="head">
    <td>
      <a href="index.php?site=course&amp;action=list&amp;order=name<?php if ($this->_tpl_vars['order'] == 'name'): ?>D<?php endif; ?>">Názov</a>
    </td>
    <td>
      <a href="index.php?site=course&amp;action=list&amp;order=code<?php if ($this->_tpl_vars['order'] == 'code'): ?>D<?php endif; ?>">Kód predmetu</a>
    </td>
    <td>
      <a href="index.php?site=course&amp;action=list&amp;order=teacher<?php if ($this->_tpl_vars['order'] == 'teacher'): ?>D<?php endif; ?>">Učiteľ</a>
    </td>
    <td colspan="3">Akcia</td>
  </tr>
  <?php $_from = $this->_tpl_vars['courses']; 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['course']):
        $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><b><?php echo $this->_tpl_vars['course']['name']; ?>
</b></td>
    <td align="center"><?php echo $this->_tpl_vars['course']['code']; ?>
</td>
    <td>
      <a href="index.php?site=teacher&amp;action=info&amp;id=<?php echo $this->_tpl_vars['course']['teacher']['id']; ?>
"><?php echo $this->_tpl_vars['course']['teacher']['namePrefix']; ?>
 
        <?php echo $this->_tpl_vars['course']['teacher']['surname']; ?>
 <?php echo $this->_tpl_vars['course']['teacher']['name']; ?>
 <?php echo $this->_tpl_vars['course']['teacher']['nameSuffix']; ?>
</a>
    </td>
    <td class="action">
      <a href="index.php?site=course&amp;action=info&amp;id=<?php echo $this->_tpl_vars['course']['id']; ?>
">[detaily]</a>
    </td>
    <td class="action">
      <a href="index.php?site=course&amp;action=edit&amp;id=<?php echo $this->_tpl_vars['course']['id']; ?>
">[editovať]</a>
    </td>
    <td class="action">
      <a href="index.php?site=course&amp;action=delete&amp;id=<?php echo $this->_tpl_vars['course']['id']; ?>
">[zmazať]</a>
    </td>
  </tr>
  <?php endforeach; endif; unset($_from); ?>
  <tr class="head">
    <td colspan="6">&nbsp;</td>
  </tr>
</table>
<?php else: ?>
  <div class="note">
    V databáze zatiaľ nie sú vytvorené žiadne predmety.<br/>
    <br/>
    Nové predmety môžete pridať <a href="index.php?site=course&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; ?>
