sigd/resources/views/modules/setting/file-peraturan/index.blade.php

73 lines
2.3 KiB
PHP

@extends('layouts.master')
@section('title', 'List Pengumuman / File Peraturan-Peraturan')
@section('content')
<div class="card shadow-sm">
<div class="card-header d-flex justify-content-between align-items-center">
<h5 class="mb-0 font-weight-bold">List Pengumuman / File Peraturan-Peraturan</h5>
<a href="{{ route('peraturan.create') }}" class="btn btn-primary float-right">Upload</a>
</div>
<div class="card-body">
@if (session('success'))
<div class="alert alert-success">
{{ session('success') }}
</div>
@endif
<div class="table-responsive">
<table class="table align-items-center mb-0 display" id="data-table" style="width:100%">
<thead>
<tr>
<th scope="col">Judul</th>
<th scope="col" width="5%">File</th>
<th scope="col">Keterangan</th>
<th scope="col" width="15%">Aksi</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
@endsection
@section('js')
<script>
$(document).ready(function() {
var table = $('#data-table').DataTable({
pageLength: 10,
responsive: true,
serverSide: true,
scrollX: true,
searchDelay: 1000,
ajax: {
url: '{{ route('peraturan.index') }}',
},
columns: [{
data: 'name',
name: 'name'
},
{
data: 'file_upload',
name: 'file_upload',
},
{
data: 'description',
name: 'description'
},
{
data: 'action',
name: 'action',
orderable: false,
searchable: false
},
],
});
});
</script>
@endsection