templates/departamento_pessoal/departamento_pessoal.html.twig line 1

  1. {% extends 'base_publico.html.twig' %}
  2. {% block title %}DEPARTAMENTO PESSOAL
  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>DEPARTAMENTO PESSOAL</h2>
  10.         </div>
  11.         <!-- /.container-fluid -->
  12.     </section>
  13.     <!-- Main content -->
  14.     <section class="content">
  15.         <form name="pesquisar" method="GET" action={{path('app_departamento_pessoal_relatorio')}}>
  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'] =='nome'  %} SELECTED {% endif %} value='nome'>Nome</option>
  25.                                         <option {% if filtro['tipo'] =='matricula'  %} SELECTED {% endif %} value='matricula'>Matrícula</option>
  26.                                         <option {% if filtro['tipo'] =='cargo'  %} SELECTED {% endif %} value='cargo'>Cargo</option>
  27.                                         <option {% if filtro['tipo'] =='vinculo'  %} SELECTED {% endif %} value='vinculo'>Vínculo</option>
  28.                                         <option {% if filtro['tipo'] =='ativo'  %} SELECTED {% endif %} value='ativo'>Status</option>
  29.                                     </select>
  30.                                 </div>
  31.                                 <div clas="col">
  32.                                     <label>Descrição</label>
  33.                                     <input type="text" name="descricao" value='{{filtro['descricao']}}' class="form-control pesquisa">
  34.                                 </div>  
  35.                                 <div clas="col">
  36.                                     <span class="btn-pesquisa">
  37.                                         <button class="btn btn-primary" >Pesquisar</button>
  38.                                         <button title="Limpar Pesquisa" class="btn btn-primary" onClick="teste()"><i class="fas fa-eraser"></i></button>
  39.                                         <button title="Visualizar Impressão" class="btn btn-default group-btn" onClick="immpressao('{{path('app_departamento_pessoal_relatorio',{'tipo':filtro['tipo'],'descricao':filtro['descricao'],'impressao':'1'} ) }}')" ><i class="fa fa-print" aria-hidden="true"></i> </button>
  40.                                         <button title="Exporta CSV" class="btn btn-default group-btn" onClick="immpressao('{{path('app_departamento_pessoal_relatorio',{'tipo':filtro['tipo'],'descricao':filtro['descricao'],'impressao':'1','excel':'1'} ) }}')" ><i class="fa fa-file-excel" aria-hidden="true"></i></i> </button>                                    
  41.                                     </span>
  42.                                 </div>
  43.                             </div>
  44.                         </div>                                
  45.                     </div>
  46.                 </div>
  47.                 <div class="card-body">
  48.                     <table class="table table-bordered table-striped table-hover table-sm">
  49.                         <thead>
  50.                             <tr>
  51.                                 <th>NOME</th>
  52.                                 <th>MATRICULA</th>
  53.                                 <th>CARGO</th>
  54.                                 <th>VÍNCULO</th>
  55.                                 <th>C. HORÁRIA</th>
  56.                                 <th>Lotação</th>
  57.                                 <th>STATUS</th>
  58.                                 <th>&nbsp</th>
  59.                             </tr>
  60.                         </thead>
  61.                         <tbody>
  62.                             {% for item in lista %}
  63.                                 <tr>
  64.                                     <td>{{ item.nome }}</td>
  65.                                     <td>{{ item.matricula }}</td>
  66.                                     <td>{{ item.cargo }}</td>
  67.                                     <td>{{ item.vinculo }}</td>
  68.                                     <td>{{ item.cargaHoraria }}</td>
  69.                                     <td>{{ item.lotacao }}</td>
  70.                                     <td>{{ item.viewAtivo }}</td>
  71.                                     <td><a href="{{ path('app_departamento_pessoal_movimentacao', {'codigo': item.codigo}) }}">MOVIMENTAÇÕES</a></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_departamento_pessoal_relatorio',{'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_departamento_pessoal_relatorio',{'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_departamento_pessoal_relatorio',{'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_departamento_pessoal_relatorio',{'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_departamento_pessoal_relatorio',{'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 %}