<?php /* Smarty version 2.6.18, created on 2007-06-06 00:23:26
         compiled from coursesSearchResult.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'counter', 'coursesSearchResult.tpl', 12, false),)), $this); ?>
<a href="index.php?site=course&amp;action=search_f">[Nové hľadanie]</a><br />
<br />
<?php if ($this->_tpl_vars['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>
  <?php echo smarty_function_counter(array('start' => 0,'skip' => 1,'print' => false), $this);?>

  <?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><?php echo smarty_function_counter(array(), $this);?>
.</td>
    <td><b><?php echo $this->_tpl_vars['course']['name']; ?>
</b></td>
    <td align="center"><?php echo $this->_tpl_vars['course']['code']; ?>
</td>
    <td>
      <?php if ($this->_tpl_vars['course']['teacher']): ?>
        <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>
      <?php endif; ?>
    </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="7">&nbsp;</td>
  </tr>
</table>
<?php else: ?>
  <div class="note">Žiaden predmet nevyhovuje filtru.</div>
<?php endif; ?>
