<? if (!$this->error): ?>
	<? if(count($this->paginator)): ?>
		<table class='grid' cellspacing='1' cellpadding='0' border='0' id='tablePagination' width="100%">
			<thead>
				<tr>
					<th>Coberturas</th>
					<th align="center">Principal</th>
					<th align="center">Taxa Relacionada</th>
					<th align="center">Somente Renovação</th>
					<th align="center">Vistoria Prévia</th>
					<th align="center">Vistoria Final</th>
					<th align="center">Vistoria Preliminar</th>
					<th align="center">Exibir na regulação de perdas</th>
					<th align="center">Validar Capacidade</th>
					<th align="center">Cobertura Dependente</th>
					<th align="center">Exibir Franquia</th>
					<th align="center">LMI</th>
					<th align="center">Cod. Cobertura Seguradora</th>
					<th width="1%" align="center">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_cobertura'] ? $item['ds_nome_cobertura'] : '&nbsp;'); ?></td>
						<td align="center" nowrap='nowrap'><img src="/resources/imagens/mini/<?=($item['fl_cobertura_principal'] ? '1' : '0'); ?>.png" /></td>
						<td align="center" nowrap='nowrap'><img src="/resources/imagens/mini/<?=($item['fl_taxa_relacionada'] ? '1' : '0'); ?>.png" /></td>
						<td align="center" nowrap='nowrap'><img src="/resources/imagens/mini/<?=($item['fl_somente_renovacoes'] ? '1' : '0'); ?>.png" /></td>
						<td align="center" nowrap='nowrap'><img src="/resources/imagens/mini/<?=($item['fl_vistoria_previa'] ? '1' : '0'); ?>.png" /></td>
						<td align="center" nowrap='nowrap'><img src="/resources/imagens/mini/<?=($item['fl_vistoria_final'] ? '1' : '0'); ?>.png" /></td>
						<td align="center" nowrap='nowrap'><img src="/resources/imagens/mini/<?=($item['fl_vistoria_preliminar'] ? '1' : '0'); ?>.png" /></td>
						<td align="center" nowrap='nowrap'><img src="/resources/imagens/mini/<?=($item['fl_exibir_regulacao_perdas'] ? '1' : '0'); ?>.png" /></td>
						<td align="center" nowrap='nowrap'><img src="/resources/imagens/mini/<?=($item['fl_validar_capacidade'] ? '1' : '0'); ?>.png" /></td>
						<td align="center" nowrap='nowrap'><img src="/resources/imagens/mini/<?=($item['fl_cobertura_dependente'] ? '1' : '0'); ?>.png" /> <?=$item['ds_nome_cobertura_dependente']?></td>
						<td align="center" nowrap='nowrap'><img src="/resources/imagens/mini/<?=($item['fl_exibir_franquia'] ? '1' : '0'); ?>.png" /> <?=$item['ds_nome_cobertura_dependente']?></td>
						<td align="center" nowrap='nowrap'><?=($item['vl_lmi'] ? $item['vl_lmi'] : '&nbsp;'); ?></td>
						<td align="center" nowrap='nowrap'><?=is_null($item['cd_cobertura_seguradora']) ? $item['cd_cob_seguradora'] : $item['cd_cobertura_seguradora']?></td>

						<td align="center" nowrap='nowrap'>
							<a href="/produto/produtocobertura/form/id/<?=$item['id_produto']?>,<?=$item['id_cobertura']?>"><img src="/resources/imagens/mini/edit.png" border="0" alt="edit.png" title="Editar Registro" /></a>

							<? if ($item['fl_ativo']): ?>
									<img title="Ativo" src="/resources/imagens/mini/active.png" border="0">
							<? else: ?>
									<img title="Inativo" src="/resources/imagens/mini/inactive.png" border="0">
							<? endif; ?>

							<a class="delete_produto_cobertura" href="/produto/produtocobertura/delete/id_cobertura/<?=$item['id_cobertura']?>/id_produto/<?=$item['id_produto']?>"><img src="/resources/imagens/mini/delete.png" border="0" alt="delete.png" title="Excluir Registro" /></a>

						</td>
					</tr>
					<?
					$i++;
				endforeach;
				?>
			</tbody>
		</table>

		<?=$this->paginationControl($this->paginator, 'Sliding'); ?>
	<? endif; ?>
<? else: ?>
	<?= $this->showListError($this->error); ?>
<? endif; ?>
