<?php
/**
 * @author Lukas Havlicek
 * @version 1.0
 */

$this->headTitle($this->projectName);
$this->placeholder('title')->set($this->t('skupiny-f'));
?>

<h1 class="page_title"><?=$this->t('skupiny-f')?></h1>
        <h1 class="group_title"><?=$this->t('prehled-f')?></h1>
            <div class="main_inner2">
    			<div class="main_inner">
    			
    				 <div class="left_column">
    	                <div class="left_column_item">
    	                    <?=$this->action('left-menu', 'layout', 'admin', array('leftmenu' => $this->leftmenu)); ?>
    	                </div>
    	            </div>
    	            
    				<div class="main_text_right">
                        <h2 class="section_heading"><?=$this->t('skupiny-f')?></h2>
                        
                        <div class="button_line">
                            <a href="<?=$this->baseUrl()?>/admin/groups/add"><?=$this->t('pridat-skupinu-AF')?></a>
                        </div>
                        
                        <?php if ($this->msg) : ?>
                        	<div class="ok_box">
								<?=$this->t('zmeny-byly-ulozeny-AF')?>!                        	
                        	</div>
                        <?php endif; ?>
                        
                        <table>
                        	<?php foreach ($this->data as $i) : ?>
                            <tr class="<?=$this->evod('odd', 'even');?>">
                                <td><a href="<?=$this->baseUrl()?>/admin/groups/edit/id/<?=$i->id_group?>"><?=$this->escape($i->group_name)?></a></td>
                                <td class="<?=($i->group_active) ? 'active' : 'inactive';?>">
                                	<?php if ($i->group_active) : ?>
                                		<a href="<?=$this->baseUrl()?>/admin/groups/deactivate/id/<?=$i->id_group?>"><?=$this->t('aktivni-AF')?></a>
                                	<?php else : ?>
                                		<a href="<?=$this->baseUrl()?>/admin/groups/activate/id/<?=$i->id_group?>"><?=$this->t('neaktivni-AF')?></a>
                                	<?php endif; ?>    
                                </td>
                                <td class="actions">
                                    <a class="action_read" href="<?=$this->baseUrl()?>/admin/groups/edit/id/<?=$i->id_group?>"><?=$this->t('editovat-AF')?></a> 
                                </td>
                            </tr>
                            <?php endforeach; ?>
                        </table>
                        
                        <div class="paging">
                        	<?= $this->paginationControl($this->data, 'Sliding', 'groups/paging.phtml'); ?>
                        </div>
                        
                    </div>
    			
    			</div>
			</div>