index.blade.php
2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
@extends('layouts.backend.index')
@if (isset($menu))
@push('title', 'Sub Menu dari '. $menu->nama)
@push('header', 'Sub Menu dari '. $menu->nama)
@push('tombol')
<a href="{{ URL::asset($url_admin.'/menu/'.$menu->parent_id) }}" class="btn btn-sm btn-danger">
<i class="fa fa-arrow-circle-left"></i> Kembali
</a>
<a href="#tambah" id="editable_table_new" parent-id="{{ $menu->id }}" class="btn btn-sm btn-primary tambah">
Tambah <i class="fa fa-plus-circle"></i>
</a>
@endpush
@else
@push('title', $halaman->nama)
@push('header', $halaman->nama)
@push('tombol')
<a href="#tambah" parent-id="NULL" class="btn btn-sm btn-primary tambah">
Tambah <i class="fa fa-plus-circle"></i>
</a>
@endpush
@endif
@section('content')
<div class="panel-container show">
<div class="panel-content">
<table id="datatable" class="table table-bordered table-hover table-striped w-100">
<thead class="bg-primary-600">
<tr>
<th>Nama</th>
<th>Kode</th>
<th>Link</th>
<th class="text-center wid-10" tabindex="0" rowspan="1" colspan="1">Status</th>
@if (!isset($menu))
<th class="text-center wid-10" tabindex="0" rowspan="1" colspan="1">Submenu</th>
@endif
<th class="text-center wid-10" tabindex="0" rowspan="1" colspan="1">Aksi</th>
</tr>
</thead>
</table>
</div>
</div>
@endsection
@section('datatables_index')
dt_ajax = "{{ url($url_admin.'/'.$halaman->kode.'/data/'.($menu->id ?? NULL)) }}";
dt_btn_cols = [0, 1, 2, 3, 4];
@if (isset($menu))
dt_cols = [
{ data: 'nama' },
{ data: 'kode', searchable: false, orderable:false },
{ data: 'link', searchable: false, orderable:false },
{ data: 'status', searchable: false, orderable:false, },
{ data: 'action', orderable: false, searchable: false },
];
@else
dt_cols = [
{ data: 'nama' },
{ data: 'kode', searchable: false, orderable:false },
{ data: 'link', searchable: false, orderable:false },
{ data: 'status', searchable: false, orderable:false, },
{ data: 'submenu', searchable: false, orderable:false, },
{ data: 'action', orderable: false, searchable: false },
];
@endif
@endsection