pintu2/resources/views/user/user_roles_index.blade.php

119 lines
4.4 KiB
PHP
Raw Normal View History

2024-02-27 22:53:57 +07:00
<!-- Extend Layout -->
@extends('layout.app')
<!-- Add Custom CSS -->
@push('css')
<link rel="stylesheet" href="{{asset('/')}}plugins/datatables-bs4/css/dataTables.bootstrap4.min.css">
<link rel="stylesheet" href="{{asset('/')}}plugins/datatables-responsive/css/responsive.bootstrap4.min.css">
<link rel="stylesheet" href="{{asset('/')}}plugins/datatables-buttons/css/buttons.bootstrap4.min.css">
@endpush
<!-- Add Content Here -->
@section('content')
<!-- Include Sidebar -->
@include('layout.navbars.sidebar', ['title' => 'Layanan Akademik'])
<div class="content-wrapper">
<!-- Main content -->
<section class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1>Blank Page</h1>
</div>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item"><a href="#">Home</a></li>
<li class="breadcrumb-item active">Blank Page</li>
</ol>
</div>
</div>
</div><!-- /.container-fluid -->
</section>
<section class="content">
<div class="card">
<div class="card-header">
<h3 class="card-title">Title</h3>
<div class="card-tools">
<button type="button" class="btn btn-tool" data-card-widget="collapse" title="Collapse">
<i class="fas fa-minus"></i>
</button>
<button type="button" class="btn btn-tool" data-card-widget="remove" title="Remove">
<i class="fas fa-times"></i>
</button>
</div>
</div>
<div class="card-body">
<table id="example1" class="table table-bordered table-striped">
<thead>
<tr>
<th>ID</th>
<th>Nama Role User</th>
<th>Action</th>
</tr>
</thead>
<tbody>
@foreach ($data as $datas)
<tr>
<td>{{ $datas->id }}</td>
<td>{{ $datas->nama }}</td>
<td class="text-center"><button class="btn btn-sm btn-success">Edit</button> | <button class="btn btn-sm btn-danger">Hapus</button></td>
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
<th>ID</th>
<th>Nama Role User</th>
<th>Action</th>
</tr>
</tfoot>
</table>
</div>
<!-- /.card-body -->
<div class="card-footer">
.
</div>
<!-- /.card-footer-->
</div>
<!-- /.card -->
</section>
<!-- /.content -->
</div>
@endsection
<!-- Add Custom JS -->
@push('js')
<!-- DataTables & Plugins -->
<script src="{{asset('/')}}plugins/datatables/jquery.dataTables.min.js"></script>
<script src="{{asset('/')}}plugins/datatables-bs4/js/dataTables.bootstrap4.min.js"></script>
<script src="{{asset('/')}}plugins/datatables-responsive/js/dataTables.responsive.min.js"></script>
<script src="{{asset('/')}}plugins/datatables-responsive/js/responsive.bootstrap4.min.js"></script>
<script src="{{asset('/')}}plugins/datatables-buttons/js/dataTables.buttons.min.js"></script>
<script src="{{asset('/')}}plugins/datatables-buttons/js/buttons.bootstrap4.min.js"></script>
<script src="{{asset('/')}}plugins/jszip/jszip.min.js"></script>
<script src="{{asset('/')}}plugins/pdfmake/pdfmake.min.js"></script>
<script src="{{asset('/')}}plugins/pdfmake/vfs_fonts.js"></script>
<script src="{{asset('/')}}plugins/datatables-buttons/js/buttons.html5.min.js"></script>
<script src="{{asset('/')}}plugins/datatables-buttons/js/buttons.print.min.js"></script>
<script src="{{asset('/')}}plugins/datatables-buttons/js/buttons.colVis.min.js"></script>
<!-- Page specific script -->
<script>
$(function () {
$("#example1").DataTable({
"responsive": true, "lengthChange": false, "autoWidth": false,
"buttons": [{
// New button configuration
text: 'Tambah Data', // Replace with your desired button text
action: function ( e, dt, node, config ) {
// Perform your custom action here, e.g., open a new tab with the external link
window.location.href = "#tambahUser";
}
}
//,"csv", "excel", "pdf", "print", "colvis"
]
}).buttons().container().appendTo('#example1_wrapper .col-md-6:eq(0)');
});
</script>
@endpush