Advertisement
Guest User

Untitled

a guest
May 20th, 2018
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 2.98 KB | None | 0 0
  1.  
  2. @extends('adminlte::page')
  3. @section('content_header')
  4. <h1>Clientes Ancine</h1>
  5. @stop
  6.  
  7. @section('content')
  8.  
  9. @include('messages.msgs')
  10.  
  11. <a href="{{ url('/clienteancine/create') }}" class="btn btn-lg btn-success"><i class="fa fa-plus-circle" aria-hidden="true"></i> Novo cadastro</a>
  12. @if($clienteancines->all())
  13. <br /><br />
  14. <div class='box'>
  15.     <div class='box-body' style="overflow: auto;">
  16.         <table id="mytable" class="display" cellspacing="0" width="100%">
  17.             <thead>
  18.                 <tr>
  19.                     <th>Id</th>
  20.                     <th>Tipo</th>
  21.                     <th>Cliente Ancine</th>
  22.                     <th>Título da obra</th>
  23.                     <th style="width:125px">Visualizar</th>
  24.                     <th style="width:125px">Editar</th>
  25.                     <th style="width:125px">Apagar</th>
  26.                 </tr>
  27.             </thead>
  28.             <tbody>
  29.                 @foreach($clienteancines as $clienteancine)
  30.                 <tr>
  31.                     <td>{{ $clienteancine->id }}</td>
  32.                     <td class="text-uppercase">{{ ($clienteancine->tipo === 'cpf')?'Pessoa Física':'Pessoa Jurídica' }}</td>
  33.                     <td>{{ $clienteancine }}</td>
  34.                     <td>{{ $clienteancine->titulo_da_obra }}</td>
  35.                     <td><a href="{{ url('/clienteancine/'.$clienteancine->id.'/show') }}" class="btn btn-lg btn-block btn-success">Visualizar</a></td>
  36.                     <td><a href="{{ url('/clienteancine/'.$clienteancine->id.'/edit') }}" class="btn btn-lg btn-block btn-primary">Editar</a></td>
  37.                     <td><a href="{{ url('/clienteancine/'.$clienteancine->id.'/destroy') }}" class="btn btn-lg btn-block btn-danger delete-item">Apagar</a></td>
  38.                 </tr>
  39.                 @endforeach
  40.             </tbody>
  41.         </table>
  42.     </div>
  43. </div>
  44. @else
  45. <br /><br />
  46. <p>Não há clientes-Ancine cadastrados</p>
  47. @endif
  48. @stop
  49.  
  50. @section('js')
  51. <script>
  52.     $(document).ready(function () {
  53.         $('#mytable').DataTable({
  54.             "order": [0, "desc"],
  55.             "language": {
  56.                 "lengthMenu": "Mostrar _MENU_ registros por página",
  57.                 "zeroRecords": "Nada encontrado - desculpe",
  58.                 "info": "Mostrando página _PAGE_ de _PAGES_",
  59.                 "infoEmpty": "Nenhum registro encontrado",
  60.                 "infoFiltered": "(filtrado de _MAX_ registros)",
  61.                 "loadingRecords": "Carregando...",
  62.                 "processing": "Processando...",
  63.                 "search": "Procurar:",
  64.                 "paginate": {
  65.                     "first": "Primeiro",
  66.                     "last": "Último",
  67.                     "next": "Próximo",
  68.                     "previous": "Anterior"
  69.                 }
  70.             }
  71.         });
  72.     });
  73.  
  74.     // Confirmador de tela ao apagar item
  75.     $(function () {
  76.         $(".delete-item").on("click", function(){
  77.             return confirm("Tem certeza?");
  78.         });
  79.     });
  80.  
  81. </script>
  82. @stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement