Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @extends('adminlte::page')
- @section('content_header')
- <h1>Clientes Ancine</h1>
- @stop
- @section('content')
- @include('messages.msgs')
- <a href="{{ url('/clienteancine/create') }}" class="btn btn-lg btn-success"><i class="fa fa-plus-circle" aria-hidden="true"></i> Novo cadastro</a>
- @if($clienteancines->all())
- <br /><br />
- <div class='box'>
- <div class='box-body' style="overflow: auto;">
- <table id="mytable" class="display" cellspacing="0" width="100%">
- <thead>
- <tr>
- <th>Id</th>
- <th>Tipo</th>
- <th>Cliente Ancine</th>
- <th>Título da obra</th>
- <th style="width:125px">Visualizar</th>
- <th style="width:125px">Editar</th>
- <th style="width:125px">Apagar</th>
- </tr>
- </thead>
- <tbody>
- @foreach($clienteancines as $clienteancine)
- <tr>
- <td>{{ $clienteancine->id }}</td>
- <td class="text-uppercase">{{ ($clienteancine->tipo === 'cpf')?'Pessoa Física':'Pessoa Jurídica' }}</td>
- <td>{{ $clienteancine }}</td>
- <td>{{ $clienteancine->titulo_da_obra }}</td>
- <td><a href="{{ url('/clienteancine/'.$clienteancine->id.'/show') }}" class="btn btn-lg btn-block btn-success">Visualizar</a></td>
- <td><a href="{{ url('/clienteancine/'.$clienteancine->id.'/edit') }}" class="btn btn-lg btn-block btn-primary">Editar</a></td>
- <td><a href="{{ url('/clienteancine/'.$clienteancine->id.'/destroy') }}" class="btn btn-lg btn-block btn-danger delete-item">Apagar</a></td>
- </tr>
- @endforeach
- </tbody>
- </table>
- </div>
- </div>
- @else
- <br /><br />
- <p>Não há clientes-Ancine cadastrados</p>
- @endif
- @stop
- @section('js')
- <script>
- $(document).ready(function () {
- $('#mytable').DataTable({
- "order": [0, "desc"],
- "language": {
- "lengthMenu": "Mostrar _MENU_ registros por página",
- "zeroRecords": "Nada encontrado - desculpe",
- "info": "Mostrando página _PAGE_ de _PAGES_",
- "infoEmpty": "Nenhum registro encontrado",
- "infoFiltered": "(filtrado de _MAX_ registros)",
- "loadingRecords": "Carregando...",
- "processing": "Processando...",
- "search": "Procurar:",
- "paginate": {
- "first": "Primeiro",
- "last": "Último",
- "next": "Próximo",
- "previous": "Anterior"
- }
- }
- });
- });
- // Confirmador de tela ao apagar item
- $(function () {
- $(".delete-item").on("click", function(){
- return confirm("Tem certeza?");
- });
- });
- </script>
- @stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement