templates/patrimonio/patrimonio.html.twig line 1

  1. {% extends 'base_publico.html.twig' %}
  2. {% block title %}Gerenciar Bens Móveis e Imóveis
  3. {% endblock %}
  4. {% block body %}
  5.     <section class="content-header">
  6.         <div class="container-fluid text-center  ">
  7.             <h1>ACESSO A INFORMAÇÃO</h1>
  8.             <p>Em Atendimento a Lei Nº 12.527, de 18 de Novembro de 2011</p>
  9.             <h2>BENS MÓVEIS E IMÓVEIS</h2>
  10.         </div>
  11.         <!-- /.container-fluid -->
  12.     </section>
  13.     <!-- Main content -->
  14.     <section class="content">
  15.         <form name="pesquisar" method="GET" action={{path('app_patrimonio_publico')}}>
  16.             <div class="card">
  17.                 <div class="card-header">
  18.                     <div class="content-fluid ">
  19.                         <div class="float-left d-none d-sm-block">
  20.                             <div class="row">
  21.                                 <div clas="col ">
  22.                                     <label>Tipo</label>
  23.                                     <select name="tipo" class="form-control">
  24.                                         <option {% if filtro['tipo'] =='secretaria'  %} SELECTED {% endif %} value='secretaria'>Secretaria</option>
  25.                                         <option {% if filtro['tipo'] =='situacao'  %} SELECTED {% endif %} value='situacao'>Situação</option>
  26.                                         <option {% if filtro['tipo'] =='numero'  %} SELECTED {% endif %} value='numero'>Número</option>
  27.                                     </select>
  28.                                 </div>
  29.                                 <div clas="col">
  30.                                     <label>Descrição</label>
  31.                                     <input type="text" name="descricao" value='{{filtro['descricao']}}' class="form-control pesquisa">
  32.                                 </div>  
  33.                                 <div clas="col">
  34.                                     <span class="btn-pesquisa">
  35.                                         <button class="btn btn-primary" >Pesquisar</button>
  36.                                         <button title="Limpar Pesquisa" class="btn btn-primary" onClick="teste()"><i class="fas fa-eraser"></i></button>
  37.                                         <button title="Visualizar Impressão" class="btn btn-default group-btn" onClick="immpressao('{{path('app_patrimonio_publico',{'tipo':filtro['tipo'],'descricao':filtro['descricao'],'impressao':'1'} ) }}')" ><i class="fa fa-print" aria-hidden="true"></i> </button>
  38.                                         <button title="Exporta CSV" class="btn btn-default group-btn" onClick="immpressao('{{path('app_patrimonio_publico',{'tipo':filtro['tipo'],'descricao':filtro['descricao'],'impressao':'1','excel':'1'} ) }}')" ><i class="fa fa-file-excel" aria-hidden="true"></i></i> </button>                                    
  39.                                     </span>
  40.                                 </div>
  41.                             </div>
  42.                         </div>
  43.                     </div>
  44.                 </div>
  45.                 <div class="card-body">
  46.                     <table class="table table-bordered table-striped table-hover table-sm">
  47.                         <thead>
  48.                             <tr>
  49.                                 <th>AQUISIÇÃO</th>
  50.                                 <th>ORIGEM</th>
  51.                                 <th>SECRETARIA</th>
  52.                                 <th>DESCRIÇÃO</th>
  53.                                 <th>REGISTRO</th>
  54.                                 <th>PATRIMÔNIO</th>
  55.                                 <th>SITUAÇÃO</th>
  56.                                 <th>VALOR</th>
  57.                                 <th>NÚMERO</th>
  58.                             </tr>
  59.                         </thead>
  60.                         <tbody>
  61.                             {% for item in lista %}
  62.                                 <tr>
  63.                                     <td>{{ item.dataAquisicao ?item.dataAquisicao|date('d/m/y') : null }}</td>
  64.                                     <td>{{ item.origem }}</td>
  65.                                     <td>{{ item.secretaria }}</td>
  66.                                     <td>{{ item.descricao }}</td>
  67.                                     <td>{{ item.registro }}</td>
  68.                                     <td>{{ item.patrimonio }}</td>
  69.                                     <td>{{ item.situacao }}</td>
  70.                                     <td>{{ item.valor }}</td>
  71.                                     <td>{{ item.numero }}</td>
  72.                                 </tr>
  73.                             {% else %}
  74.                                 <tr aria-hidden="true">
  75.                                     <td colspan="13">NENHUM REGISTRO ENCONTRADO</td>
  76.                                 </tr>
  77.                             {% endfor %}
  78.                         </tbody>
  79.                     </table>
  80.                 </div>
  81.                 <!-- /.card-body -->
  82.                 <div class="card-footer ">
  83.                     <div class="d-flex justify-content-between">                        
  84.                         <div >
  85.                             
  86.                             {% if ( (filtro['total_registros'] > 10) and (filtro['page'] != 'all')) %}
  87.                                 Mostrando {{ ((filtro['pagina'] -1) * filtro['page']) + 1  }} à {{ filtro['page'] *filtro['pagina']  }} de {{ filtro['total_registros'] }} registros
  88.                             {% else %}
  89.                                 Mostrando 1 à  {{ filtro['total_registros'] }} registro(s)
  90.                             {% endif %} 
  91.                         </div>
  92.                         <div class="d-flex flex-row"> 
  93.                      <div>
  94.                         
  95.                         <select name="page" class="form-control col" onchange="this.form.submit()" >
  96.                             <option {% if filtro['page'] == '10' %} SELECTED {% endif %}  value="10">10</option>
  97.                             <option {% if filtro['page'] == '50' %} SELECTED {% endif %} value="50">50</option>
  98.                             <option {% if filtro['page'] == '100' %} SELECTED {% endif %} value="100">100</option>
  99.                             <option {% if filtro['page'] == '1000' %} SELECTED {% endif %} value="1000">1000</option>
  100.                             <option {% if filtro['page'] == 'all' %} SELECTED {% endif %} value="all">Todos</option>
  101.                         </select>                        
  102.                         </div>                            
  103.                             <nav aria-label="Page navigation example">
  104.                                 <ul class="pagination ">
  105.                                     <li class="page-item">
  106.                                         <a class="page-link" href="{{ path('app_patrimonio_publico',{'tipo':filtro['tipo'],'descricao':filtro['descricao'],'pagina':filtro['primeira'] }) }}">Primeira</a>
  107.                                     </li>
  108.                                     <li class="page-item">
  109.                                         <a class="page-link" href="{{ path('app_patrimonio_publico',{'tipo':filtro['tipo'],'descricao':filtro['descricao'],'pagina':filtro['anterior'] }) }}">Anterior</a>
  110.                                     </li>
  111.                                     <li class="page-item">
  112.                                         <a class="page-link" href="{{ path('app_patrimonio_publico',{'tipo':filtro['tipo'],'descricao':filtro['descricao'],'pagina':filtro['pagina'] }) }}">{{ filtro['pagina'] }}</a>
  113.                                     </li>
  114.                                     <li class="page-item">
  115.                                         <a class="page-link" href="{{ path('app_patrimonio_publico',{'tipo':filtro['tipo'],'descricao':filtro['descricao'],'pagina':filtro['proxima'] }) }}">Avançar</a>
  116.                                     </li>
  117.                                     <li class="page-item">
  118.                                         <a class="page-link" href="{{ path('app_patrimonio_publico',{'tipo':filtro['tipo'],'descricao':filtro['descricao'],'pagina':filtro['ultima'] }) }}">Última</a>
  119.                                     </li>
  120.                                 </ul>
  121.                             </nav>
  122.                         </div>
  123.                     </div>
  124.                 </div>
  125.         </form>
  126.     </div>
  127. </div>
  128. </section>
  129. {% endblock %}