<br />
<?=$this->CabecalhoValidacoesDensidade('pesquisavalores')?>
<br />
<br />

<?=$this->title("Pesquisar valores");?>
<!-- Filtro de Pesquisa -->
<form  id='frmSearch' method="post">
	<?=$this->form->id_validacao;?>
	<?=$this->form->id;?>
	<div class="geral">
		<div class="row">
			<?=$this->form->id_grupo_variedade;?>
			<?=$this->form->id_grupo_portaenxerto;?>
			<?=$this->form->id_grupo_densidade;?>
			<?=$this->form->fl_ativo;?>
		</div>
			
		<div class="row" style="padding-left: 5px;padding-top: 10px;padding-bottom: 15px;">
			<button type="button" name='pesquisar'  id='pesquisar' value='pesquisar'>Pesquisar</button>
			<button type="button" name='adicionar' id='adicionar' onClick="location.href='/produto/validacoesdensidade/adicionavalores/id_validacao/<?=$this->form->id_validacao->getValue();?>'">Adicionar</button>
		</div>
	</div>
</form>

<!-- Listagem dos dados -->
<?=$this->title('Listagem'); ?>

<? if(count($this->paginator)): ?>
    <table class='grid' cellspacing='1' cellpadding='0' border='0' id='tablePagination'>
        <thead>
            <tr>
                <th>Grupo de Variedades</th>
                <th>Grupo de Portaenxerto</th>
                <th>Grupo de Densidade</th>
                <th>Idade</th>
                <th>Valor Mínimo</th>
                <th>Valor Máximo</th>
                <th>Ações</th>
            </tr>
        </thead>
        <tbody>
            <?
            $i = 0;
            foreach ($this->paginator as $item):
                if ($i % 2 == 0) {
                    $class = '';
                } else {
                    $class = "highlight";
                }

                ?>
                <tr class="<?=$class?>">
                    <td nowrap='nowrap'><?=($item['ds_nome_grupo_variedade'] ? $item['ds_nome_grupo_variedade'] : '&nbsp;'); ?></td>
                    <td nowrap='nowrap'><?=($item['ds_nome_grupo_portaenxerto'] ? $item['ds_nome_grupo_portaenxerto'] : '&nbsp;'); ?></td>
                    <td nowrap='nowrap'><?=($item['ds_nome_grupo_densidade'] ? $item['ds_nome_grupo_densidade'] : '&nbsp;'); ?></td>
                    <td nowrap='nowrap'><?=($item['nu_idade'] ? $item['nu_idade'] : '&nbsp;'); ?></td>
                    <td nowrap='nowrap'><?=($item['vl_minimo'] ? $item['vl_minimo'] : '&nbsp;'); ?></td>
                    <td nowrap='nowrap'><?=($item['vl_maximo'] ? $item['vl_maximo'] : '&nbsp;'); ?></td>
                    <td align='center' width='1%' nowrap='nowrap'>
                        <a href="/produto/validacoesdensidade/adicionavalores/id/<?= $item['id']?>/id_validacao/<?= $item['id_validacao']?>" class="icon_index"><img src="/resources/imagens/mini/edit.png" alt="menus.png" title="Relacionar Porta Enxerto" border="0"></a>
                        <a href="/produto/validacoesdensidade/ativavalores/id/<?= $item['id']?>/id_validacao/<?= $item['id_validacao']?>" class="ativacao" ><img src="/resources/imagens/mini/<?=$item['fl_ativo']  ? 'active.png' : 'inactive.png' ;?>" alt="acivate.png" title="Ativar/Desativar" border="0"></a>
                        <a href="/produto/validacoesdensidade/deletavalores/id/<?= $item['id']?>/id_validacao/<?= $item['id_validacao']?>" class="exclusao"><img src="/resources/imagens/mini/delete.png" alt="menus.png" title="Relacionar Porta Enxerto" border="0"></a>
                    </td>
                </tr>
                <?
                $i++;
            endforeach;
            ?>
        </tbody>
    </table>
<? endif; ?>
