<?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('uzivatele-ve-skupine-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('pridat-uzivatele-do-skupiny-f')?> <strong><?=$this->basic->group_name?></strong></h2>
                        
                        <div class="button_line">
                            <a href="<?=$this->baseUrl()?>/admin/groups"><?=$this->t('zpet-AF')?></a>
                            <a href="#members"><?=$this->t('uzivatele-ve-skupine-AF')?></a>
                        </div>
                        
                        <div class="search_bar">
                        	<form action="<?=$this->baseUrl()?>/admin/groups/add-members/id/<?=$this->basic->id_group?>" method="post">
	                            <?=$this->t('hledat-uzivatele-f')?>:
	                            <input class="search_bar_input" type="text" name="search" />
	                            <button type="submit"><?=$this->t('hledat-f')?></button>
                            </form>
                        </div>
                        
                        <form action="<?=$this->baseUrl()?>/admin/groups/multi-add-members" method="post">
                        
                        <div class="button_line">
                            <?=$this->t('oznacit-f')?>: <span onclick="checkAll()"><?=$this->t('vse-f')?></span> <span onclick="uncheckAll()"><?=$this->t('nic-f')?></span> <span onclick="switchAll()"><?=$this->t('prohodit-f')?></span>
                        </div>
                        <?php if (isset($this->data) && $this->data->count()) : ?>
                        	<table class="short">
	                        	<?php foreach ($this->data as $i) : ?>
	                            <tr class="<?=$this->evod('odd', 'even');?>">
	                            	<td class="td_checkbox"><input class="selector" onclick="trHighlight(this);" type="checkbox" name="event[]" value="<?=$i->id_user?>" /></td>
	                                <td><?=$this->escape($i->login)?></td>
	                                <td><?=$this->escape($i->user_surname . ' ' . $i->user_firstname)?></td>
	                            </tr>
	                            <?php endforeach; ?>
	                        </table>
                        <?php endif; ?>
                        
                        <input type="hidden" name="id" value="<?=$this->basic->id_group?>" />
                        <button type="submit"><?=$this->t('pridat-vybrane-AF')?></button>
                        </form>
                    </div>
    			
    			</div>
			</div>