<?
if (!$this->error) {
  if(count($this->paginator)) {
    $classAcoes = $this->ocultarAcoes ? 'hide' : 'show';
    ?>
		<table class='grid' cellspacing='1' cellpadding='0' border='0' id='tablePagination'>
			<thead>
				<tr>
					<th nowrap="nowrap">Tipo</th>
					<th nowrap="nowrap">Número</th>
					<th nowrap="nowrap">Ramal</th>
					<th nowrap="nowrap" class="<?=$classAcoes?>">Ações</th>
				</tr>
			</thead>
			<tbody>
				<?
				$i = 0;
				foreach ($this->paginator as $item):
					if ($i % 2 == 0) {
						$class = '';
					} else {
						$class = "highlight";
					}

          $rotaForm = "/sistema/usuariotelefone/form/id_usuario/{$item['id_usuario']}/id/{$item['id']}";

          if ($this->origemCadastroVistoriador) {
            $rotaForm .= "/origemCadastroVistoriador/1";
          }

					?>
					<tr class="<?=$class?>">
						<td nowrap='nowrap'>
                <input type="hidden" name="tipo_telefone_<?=$i?>" value="<?=$item['tp_telefone']?>" />
                <?=($item['tp_telefone'] ? $item['tp_telefone'] : '&nbsp;'); ?>
            </td>
						<td nowrap='nowrap'>
              <input type="hidden" name="numero_telefone_<?=$i?>" value="<?=$item['ds_numero']?>" />
                <?=($item['ds_numero'] ? $item['ds_numero'] : '&nbsp;'); ?>
            </td>
						<td nowrap='nowrap'>
              <input type="hidden" name="ramal_telefone_<?=$i?>" value="<?=$item['ds_ramal']?>" />
                <?=$item['ds_ramal']?>
            </td>
						<td align='center' width='1%' nowrap='nowrap' class="<?=$classAcoes?>">
							<a class="showFormTelefones" href="<?=$rotaForm?>">
								<img src="/resources/imagens/mini/edit.png" border="0" alt="edit.png" title="Editar Registro" />
							</a>
							<?=$this->iconDelete('sistema', 'usuariotelefone', $item)?>
						</td>
					</tr>
					<?
					$i++;
				endforeach;
				?>
			</tbody>
		</table>
	<?
  }
} else { ?>
	<?= $this->showListError($this->error);
}
?>