index.blade.php 2.06 KB
@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