Web FT UNTAN (Laravel 8) versi lama + dump database ftuntan_web_profil
Kode dari ftuntan_main dengan dependensi diperbarui untuk PHP 8.3 (perbaikan insiden 27 Okt 2026). Dump database di database/sql/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,253 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Link Prodi')
|
||||
|
||||
@section('container')
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<div class="content-header">
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-6">
|
||||
<h1 class="m-0">Link Prodi</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
|
||||
<!-- Alert Status -->
|
||||
@if (session('status'))
|
||||
<div class="alert alert-success">
|
||||
{{ session('status') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (session('alert'))
|
||||
<div class="alert alert-danger">
|
||||
{{ session('alert') }}
|
||||
</div>
|
||||
@endif
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Data Link Prodi</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-12 text-left">
|
||||
<a type="button" href="#formModalAdd" data-toggle="modal"
|
||||
class="btn btn-success mb-3"><i class="fa fa-plus-circle"></i>
|
||||
Tambah Data Link Prodi
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_link_prodi" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nomor</th>
|
||||
<th>Nama Prodi</th>
|
||||
<th>Link Web Prodi</th>
|
||||
<th>Jadwal Rilis</th>
|
||||
<th>Status</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($linkProdis as $linkProdi)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $linkProdi->nama_prodi }}</td>
|
||||
<td><a href="{{ $linkProdi->url }}">{{ $linkProdi->url }}</a>
|
||||
</td>
|
||||
<td>{{ $linkProdi->release_date }}</td>
|
||||
<td>
|
||||
@if ($linkProdi->deleted_at != '')
|
||||
Terhapus
|
||||
@elseif ($linkProdi->release_date > date('Y-m-d'))
|
||||
Belum Rilis
|
||||
@else
|
||||
Rilis
|
||||
@endif
|
||||
</td>
|
||||
@if ($linkProdi->deleted_at == '')
|
||||
<td>
|
||||
<button href="#formModalEdit" role="button" data-toggle="modal"
|
||||
data-id="{{ $linkProdi->id }}"
|
||||
data-nama_prodi="{{ $linkProdi->nama_prodi }}"
|
||||
data-url="{{ $linkProdi->url }}"
|
||||
data-release_date="{{ $linkProdi->release_date }}"
|
||||
class="btn btn-warning open-formModalEdit"><i
|
||||
class="fa fa-edit"></i> Edit</button>
|
||||
<form action="{{ route('link_prodi.destroy', $linkProdi) }}"
|
||||
method="post">
|
||||
@method('delete')
|
||||
@csrf
|
||||
<button type="submit" class="btn btn-danger"
|
||||
onclick="return confirm('Apakah anda yakin ingin menghapus data?')"><i
|
||||
class="fa fa-trash"></i> Delete</button>
|
||||
</form>
|
||||
</td>
|
||||
@else
|
||||
<td>
|
||||
<form
|
||||
action="{{ url('/admin/link_prodi/' . $linkProdi->id . '/restore') }}"
|
||||
method="post">
|
||||
@csrf
|
||||
<button type="submit" class="btn btn-primary"
|
||||
onclick="return confirm('Apakah anda yakin ingin mengembalikan data?')"><i
|
||||
class="fas fa-trash-restore"></i> Restore
|
||||
</button>
|
||||
</form>
|
||||
<form
|
||||
action="{{ url('/admin/link_prodi/' . $linkProdi->id . '/delete') }}"
|
||||
method="post">
|
||||
@csrf
|
||||
<button type="submit" class="btn btn-danger"
|
||||
onclick="return confirm('Apakah anda yakin ingin menghapus permanen data?')"><i
|
||||
class="fa fa-trash"></i> Delete Permanent
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<!-- Modal Add -->
|
||||
<div class="modal fade" id="formModalAdd" tabindex="-1" aria-labelledby="formModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="formModalLabel">Tambah Data Link Prodi</h5>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal" aria-label="Close">X</button>
|
||||
</div>
|
||||
<form id="formAdd" action="{{ url('/admin/link_prodi') }}" method="post">
|
||||
@csrf
|
||||
<div class="modal-body">
|
||||
<div class="form-group mt-2">
|
||||
<label for="nama_prodi">Nama Prodi</label>
|
||||
<input type="text" class="form-control mt-0" name="nama_prodi" required maxlength="255"
|
||||
placeholder=". . .">
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="url">Link Web Prodi</label>
|
||||
<input type="text" class="form-control mt-0" name="url" required maxlength="255"
|
||||
placeholder=". . .">
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="release_date">Jadwal Rilis</label>
|
||||
<input type="date" class="form-control mt-0" name="release_date" required>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal"
|
||||
aria-label="Close">Batal</button>
|
||||
<button type="submit" class="btn btn-primary">Tambah Data</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@foreach ($linkProdis as $linkProdi)
|
||||
<!-- Modal Edit -->
|
||||
<div class="modal fade" id="formModalEdit" tabindex="-1" aria-labelledby="formModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="formModalLabel">Ubah Data Link Prodi</h5>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal" aria-label="Close">X</button>
|
||||
</div>
|
||||
<form id="formEdit" action="{{ route('link_prodi.update', $linkProdi->id) }}" method="POST">
|
||||
@method('patch')
|
||||
@csrf
|
||||
<div class="modal-body">
|
||||
<input type="hidden" name="id" id="id">
|
||||
<div class="form-group mt-2">
|
||||
<label for="nama_prodi">Nama Prodi</label>
|
||||
<input type="text" class="form-control mt-0" name="nama_prodi" id="nama_prodi" required
|
||||
maxlength="255" placeholder=". . .">
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="url">Link Web Prodi</label>
|
||||
<input type="text" class="form-control mt-0" name="url" id="url" required maxlength="255"
|
||||
placeholder=". . .">
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="release_date">Jadwal Rilis</label>
|
||||
<input type="date" class="form-control mt-0" name="release_date" id="release_date" required>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal"
|
||||
aria-label="Close">Batal</button>
|
||||
<button type="submit" class="btn btn-primary">Ubah Data</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
<script type="text/javascript">
|
||||
var $formAdd = $("#formAdd");
|
||||
$formAdd.submit(function() {
|
||||
$formAdd.submit(function() {
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var $formEdit = $("#formEdit");
|
||||
$formEdit.submit(function() {
|
||||
$formEdit.submit(function() {
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<!--Data Table -->
|
||||
<script>
|
||||
$(function() {
|
||||
$("#tabel_link_prodi").DataTable({
|
||||
"paging": true,
|
||||
"lengthChange": false,
|
||||
"searching": true,
|
||||
"ordering": true,
|
||||
"info": true,
|
||||
"autoWidth": false,
|
||||
"responsive": false,
|
||||
"buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"]
|
||||
}).buttons().container().appendTo('#tabel_link_prodi_wrapper .col-md-6:eq(0)');
|
||||
});
|
||||
|
||||
$(document).on("click", ".open-formModalEdit", function() {
|
||||
var id = $(this).data('id');
|
||||
var nama_prodi = $(this).data('nama_prodi');
|
||||
var url = $(this).data('url');
|
||||
var release_date = $(this).data('release_date');
|
||||
|
||||
$(".modal-body #id").val(id);
|
||||
$(".modal-body #nama_prodi").val(nama_prodi);
|
||||
$(".modal-body #url").val(url);
|
||||
$(".modal-body #release_date").val(release_date);
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user