templates/conselho_municipal/conselhos.html.twig line 1

  1. {% extends 'base_publico.html.twig' %}
  2. {% block title %}CONSELHO MUNICIPAL
  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>CONSELHO MUNICIPAL</h2>
  10.         </div>
  11.         <!-- /.container-fluid -->
  12.     </section>
  13.     <!-- Main content -->
  14.     <section class="content">
  15.         <form name="pesquisar" method="GET" action={{path('app_conselho_municipal_publico')}}>
  16.             <input type="hidden" name="ano" value="{{ filtro['ano'] }}" /> 
  17.             <div class="card">
  18.                 <div class="card-header">
  19.                     <div class="content-fluid ">
  20.                         <div class="float-left d-none d-sm-block">
  21.                             <div class="row">
  22.                                 <div clas="col ">
  23.                                     <label>Tipo</label>
  24.                                     <select name="tipo" class="form-control">
  25.                                         <option {% if filtro['tipo'] =='secretaria'  %} SELECTED {% endif %} value='secretaria'>Secretaria</option>
  26.                                         <option {% if filtro['tipo'] =='descricao'  %} SELECTED {% endif %} value='descricao'>Descrição</option>
  27.                                         <option {% if filtro['tipo'] =='legislacao'  %} SELECTED {% endif %} value='legislacao'>Legislação</option>
  28.                                         <option {% if filtro['tipo'] =='status'  %} SELECTED {% endif %} value='status'>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_conselho_municipal_publico',{'ano':filtro['ano'],'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_conselho_municipal_publico',{'ano':filtro['ano'],'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 class="float-right d-none d-sm-block">
  46.                             <b><a class="" href="{{ path('app_conselho_municipal_publico_ano')}}"><p><i class="fas fa-angle-left mr-2"></i>Voltar</p></a></b>
  47.                         </div>                                
  48.                     </div>
  49.                 </div>
  50.                 <div class="card-body">
  51.                     <table class="table table-bordered table-striped table-hover table-sm">
  52.                         <thead>
  53.                             <tr>
  54.                                 <th>SECRETARIA</th>
  55.                                 <th>DESCRIÇÃO</th>
  56.                                 <th>LEGISLAÇÃO</th>
  57.                                 <th>STATUS</th>
  58.                                 <th>&nbsp;</th>
  59.                             </tr>
  60.                         </thead>
  61.                         <tbody>
  62.                             {% for item in lista %}
  63.                                 <tr onclick="visualizaTr({{loop.index}})" class="link">
  64.                                     <td>{{ item.secretaria }}</td>
  65.                                     <td>{{ item.descricao }}</td>
  66.                                     <td>{{ item.legislacao }}</td>
  67.                                     <td>{{ item.status }}</td>
  68.                                     <td><i class="fa fa-eye" aria-hidden="true"></i></td>
  69.                                 </tr>
  70.                                 <tr id="{{loop.index}}" style="display:none">
  71.                                     <td colspan="5">
  72.                                         <table class="table">
  73.                                             <tr >
  74.                                                 <th colspan="5">Arquivos</th>
  75.                                             </tr>                                              
  76.                                             {% for arquivo in item.conselhoMunicipalDocumentos %}
  77.                                                 <tr>
  78.                                                     <td colspan="6"><a target="_blank" href="{{ asset('arquivos/conselho/'~ arquivo.documento) }}"><img width="40px" src="{{asset('img/documento.png') }}"</a>&nbsp;{{ arquivo.descricao }} </td>
  79.                                                 </tr>
  80.                                             {% else %}
  81.                                                 <tr colspan="6">
  82.                                                     <td >NENHUM ARQUIVO ENCONTRADO</td>
  83.                                                 </tr>                                                 
  84.                                             {% endfor %} 
  85.                                             <tr >
  86.                                                 <th>Nome</th>
  87.                                                 <th>E-mail</th>
  88.                                                 <th>Telefone</th>                                    
  89.                                                 <th>Representante</th>                                    
  90.                                                 <th colspan="2">Vigência</th>
  91.                                             </tr>                                              
  92.                                             {% for conselho in item.conselhoMunicipalContatos %}
  93.                                                 <tr >
  94.                                                     <td>{{ conselho.contato }}</td>
  95.                                                     <td>{{ conselho.email }}</td>
  96.                                                     <td>{{ conselho.telefone }}</td>                                    
  97.                                                     <td>{{ conselho.representante }}</td>                                    
  98.                                                     <td>{{ conselho.dataInicial ? item.dataInicial|date("d/m/Y") : null }}</td>
  99.                                                     <td>{{ conselho.dataFinal ? item.dataFinal|date("d/m/Y") : null }}</td>
  100.                                                 </tr>                                           
  101.                                             {% endfor %}   
  102.                                         </table>
  103.                                     </td>                               
  104.                                 </tr>
  105.                             {% else %}
  106.                                 <tr aria-hidden="true">
  107.                                     <td colspan="13">NENHUM REGISTRO ENCONTRADO</td>
  108.                                 </tr>
  109.                             {% endfor %}
  110.                         </tbody>
  111.                     </table>
  112.                 </div>
  113.                 <!-- /.card-body -->
  114.                 <div class="card-footer ">
  115.                     <div class="d-flex justify-content-between">                        
  116.                         <div >
  117.                             {% if ( (filtro['total_registros'] > 10) and (filtro['page'] != 'all')) %}
  118.                                 Mostrando {{ ((filtro['pagina'] -1) * filtro['page']) + 1  }} à {{ filtro['page'] *filtro['pagina']  }} de {{ filtro['total_registros'] }} registros
  119.                             {% else %}
  120.                                 Mostrando 1 à  {{ filtro['total_registros'] }} registro(s)
  121.                             {% endif %} 
  122.                         </div>
  123.                         <div class="d-flex flex-row"> 
  124.                             <div>
  125.                                 <select name="page" class="form-control col" onchange="this.form.submit()" >
  126.                                     <option {% if filtro['page'] == '10' %} SELECTED {% endif %}  value="10">10</option>
  127.                                     <option {% if filtro['page'] == '50' %} SELECTED {% endif %} value="50">50</option>
  128.                                     <option {% if filtro['page'] == '100' %} SELECTED {% endif %} value="100">100</option>
  129.                                     <option {% if filtro['page'] == '1000' %} SELECTED {% endif %} value="1000">1000</option>
  130.                                     <option {% if filtro['page'] == 'all' %} SELECTED {% endif %} value="all">Todos</option>
  131.                                 </select>                        
  132.                             </div>                            
  133.                             <nav aria-label="Page navigation example">
  134.                                 <ul class="pagination ">
  135.                                     <li class="page-item">
  136.                                         <a class="page-link" href="{{ path('app_conselho_municipal_publico',{'ano':filtro['ano'],'tipo':filtro['tipo'],'descricao':filtro['descricao'],'pagina':filtro['primeira'] }) }}">Primeira</a>
  137.                                     </li>
  138.                                     <li class="page-item">
  139.                                         <a class="page-link" href="{{ path('app_conselho_municipal_publico',{'ano':filtro['ano'],'tipo':filtro['tipo'],'descricao':filtro['descricao'],'pagina':filtro['anterior'] }) }}">Anterior</a>
  140.                                     </li>
  141.                                     <li class="page-item">
  142.                                         <a class="page-link" href="{{ path('app_conselho_municipal_publico',{'ano':filtro['ano'],'tipo':filtro['tipo'],'descricao':filtro['descricao'],'pagina':filtro['pagina'] }) }}">{{ filtro['pagina'] }}</a>
  143.                                     </li>
  144.                                     <li class="page-item">
  145.                                         <a class="page-link" href="{{ path('app_conselho_municipal_publico',{'ano':filtro['ano'],'tipo':filtro['tipo'],'descricao':filtro['descricao'],'pagina':filtro['proxima'] }) }}">Avançar</a>
  146.                                     </li>
  147.                                     <li class="page-item">
  148.                                         <a class="page-link" href="{{ path('app_conselho_municipal_publico',{'ano':filtro['ano'],'tipo':filtro['tipo'],'descricao':filtro['descricao'],'pagina':filtro['ultima'] }) }}">Última</a>
  149.                                     </li>
  150.                                 </ul>
  151.                             </nav>
  152.                         </div>
  153.                     </div>
  154.                 </div>
  155.         </form>
  156.     </div>
  157. </div>
  158. </section>
  159. {% endblock %}