| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- @extends('layouts.admin')
- @section('title')
- Breaking news
- @stop
- @section('content')
- <div class="row">
- <div class="col-xs-12">
- <div class="box">
- <div class="box-body">
- <div class="box-body table-responsive no-padding">
- <table class="table table-striped table-hover" id="dtTable">
- <thead>
- <tr>
- <th>Titolo</th>
- <th>Data</th>
- <th>Online</th>
- <th width="50"></th>
- <th width="50"></th>
- </tr>
- </thead>
- @foreach($breaking_news as $_breakingnews)
- <tr>
- <td><a href="{{ route('breaking_news.edit', array($_breakingnews->id)) }}" >{{$_breakingnews->title}}</a></td>
- <td data-sort="{{$_breakingnews->date}}">{{date("d/m/Y H:i:s", strtotime($_breakingnews->date))}}</td>
- <td>{{$_breakingnews->online ? 'Si' : 'No'}}</td>
- <td class="hidden-xs">
- <a href="{{ route('breaking_news.edit', array($_breakingnews->id)) }}" type="button" class="btn btn-w-m btn-primary">Modifica</a>
- </td>
- <td>
- <form class="form-inline" method="POST" action="{{ route('breaking_news.destroy', $_breakingnews->id) }}">
- @csrf
- @method('DELETE')
- <button type="submit" class="btn btn-w-m btn-danger" onclick="return confirm('Sei sicuro?')">Elimina</button>
- </form>
- </td>
- </tr>
- @endforeach
- </table>
- </div>
- </div>
- </div>
- <div class="col-xs-2">
- <a href="{{ route('breaking_news.create') }}" class="btn btn-success">Aggiungi</a>
- </div>
-
- </div>
- @stop
- @section('extra_css')
- <link rel="stylesheet" href="/plugins/datatables/dataTables.bootstrap.css">
- <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/buttons/1.5.2/css/buttons.dataTables.min.css">
- @stop
- @section('extra_js')
- <script src="/plugins/datatables/jquery.dataTables.min.js"></script>
- <script src="/plugins/datatables/dataTables.bootstrap.min.js"></script>
- <script src="https://cdn.datatables.net/buttons/1.5.2/js/dataTables.buttons.min.js"></script>
- <script src="https://cdn.datatables.net/buttons/1.5.2/js/buttons.flash.min.js"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/pdfmake.min.js"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/vfs_fonts.js"></script>
- <script src="https://cdn.datatables.net/buttons/1.5.2/js/buttons.html5.min.js"></script>
- <script src="https://cdn.datatables.net/buttons/1.5.2/js/buttons.print.min.js"></script>
- <script type="text/javascript">
-
- $( document ).ready(function() {
- $("#dtTable").DataTable(
- {
- _breakingnewsLength: 50,
- dom: 'Bfrtip',
- buttons: [
- /*'copy', 'csv', 'excel', 'pdf', 'print',
- {
- extend: 'pdfHtml5',
- orientation: 'landscape',
- breakingnewsize: 'LEGAL'
- }*/
- ]
- },
-
- );
- });
- </script>
- @stop
|