<? if (!$this->error) { ?>
    <? if (count($this->paginator)) { ?>
    <table class='grid' cellspacing='1' cellpadding='0' border='0' id='tablePagination'>
      <thead>
      <tr>
        <th>Logradouro</th>
        <th>CEP</th>
        <th>Bairro</th>
        <th>Município</th>
        <th>UF</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_logradouro']?></td>
          <td nowrap='nowrap'><?=$item['nr_cep']?></td>
          <td nowrap='nowrap'><?=$item['ds_nome_bairro']?></td>
          <td nowrap='nowrap'><?=$item['ds_nome_municipio']?></td>
          <td nowrap='nowrap'><?=$item['ds_sigla']?></td>

          <td align='center' width='1%' nowrap='nowrap'>
            <a class="icon_edit" href="/sistema/cep/form/id/<?= $item['id'] ?>/dadoscep/<?= http_build_query($item->toArray()) ?>">
              <img src="/resources/imagens/mini/edit.png" alt="view.png" title="Editar" border="0">
            </a>

              <?php
              if (!empty($item['id'])) {
                echo $this->iconActive("sistema", "cep", $item);
                echo $this->iconDelete("sistema", "cep", $item);
              }
              ?>
          </td>
        </tr>
          <?
          $i++;
      }
      ?>
      </tbody>
    </table>

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