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,338 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Akreditasi')
|
||||
|
||||
@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">Akreditasi</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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 Akreditasi</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 Akreditasi
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_akreditasi" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nomor</th>
|
||||
<th>Program Studi</th>
|
||||
<th>Strata</th>
|
||||
<th>Peringkat</th>
|
||||
<th>Tanggal Kadaluarsa</th>
|
||||
<th>Nomor SK</th>
|
||||
<th>PDF</th>
|
||||
<th>Tanggal Rilis</th>
|
||||
<th>Status</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($akreditasis as $akreditasi)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $akreditasi->program_studi }}</td>
|
||||
<td>{{ $akreditasi->strata }}</td>
|
||||
<td>{{ $akreditasi->peringkat }}</td>
|
||||
<td>{{ $akreditasi->tanggal_kadaluarsa }}</td>
|
||||
<td>{{ $akreditasi->nomor_sk }}</td>
|
||||
<td>
|
||||
<a href="{{ url($akreditasi->nama_file) }}"
|
||||
target="_blank">{{ $akreditasi->nama_file }}</a>
|
||||
</td>
|
||||
<td>{{ $akreditasi->release_date }}</td>
|
||||
<td>
|
||||
@if ($akreditasi->deleted_at != '')
|
||||
Terhapus
|
||||
@else
|
||||
Rilis
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($akreditasi->deleted_at != '')
|
||||
<form
|
||||
action="{{ url('/admin/akreditasi/' . $akreditasi->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/akreditasi/' . $akreditasi->id . '/delete_permanen') }}"
|
||||
method="post">
|
||||
@csrf
|
||||
<input type="hidden" name="thumbnail"
|
||||
value="{{ $hasilKarya->thumbnail }}">
|
||||
<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>
|
||||
@else
|
||||
<button href="#formModalEdit" role="button" data-toggle="modal"
|
||||
data-id="{{ $akreditasi->id }}"
|
||||
data-program_studi="{{ $akreditasi->program_studi }}"
|
||||
data-strata="{{ $akreditasi->strata }}"
|
||||
data-peringkat="{{ $akreditasi->peringkat }}"
|
||||
data-tanggal_kadaluarsa="{{ $akreditasi->tanggal_kadaluarsa }}"
|
||||
data-nomor_sk="{{ $akreditasi->nomor_sk }}"
|
||||
data-release_date="{{ $akreditasi->release_date }}"
|
||||
class="btn btn-warning open-formModalEdit"><i
|
||||
class="fa fa-edit"></i> Edit</button>
|
||||
<form action="{{ route('akreditasi.destroy', $akreditasi) }}"
|
||||
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>
|
||||
@endif
|
||||
</td>
|
||||
</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 Akreditasi</h5>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal" aria-label="Close">X</button>
|
||||
</div>
|
||||
|
||||
<form id="formAdd" action="{{ url('/admin/akreditasi') }}" method="post" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="modal-body">
|
||||
<div class="form-group mt-2">
|
||||
<label for="program_studi">Program Studi</label>
|
||||
<input type="text" class="form-control mt-0" name="program_studi" required maxlength="255"
|
||||
placeholder=". . .">
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="strata">Strata</label>
|
||||
<input type="text" class="form-control mt-0" name="strata" required maxlength="10"
|
||||
placeholder=". . .">
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="peringkat">Peringkat</label>
|
||||
<input type="text" class="form-control mt-0" name="peringkat" required maxlength="20"
|
||||
placeholder=". . .">
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="tanggal_kadaluarsa">Tanggal Kadaluarsa</label>
|
||||
<input type="text" class="form-control mt-0" name="tanggal_kadaluarsa" required maxlength="255"
|
||||
placeholder=". . .">
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="nomor_sk">Nomor SK</label>
|
||||
<input type="text" class="form-control mt-0" name="nomor_sk" required maxlength="255"
|
||||
placeholder=". . .">
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="nama_file">PDF</label>
|
||||
<input type="file" id="input_pdf_add" class="form-control" name="nama_file" required
|
||||
accept="application/pdf">
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="release_date">Tanggal Rilis</label>
|
||||
<input type="date" class="form-control" 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 id="submitAdd" class="btn btn-primary from-prevent-multiple-submitsAdd" type="submit">Tambah Data</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@foreach ($akreditasis as $akreditasi)
|
||||
<!-- 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 Akreditasi</h5>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal" aria-label="Close">X</button>
|
||||
</div>
|
||||
<form id="formEdit" action="{{ route('akreditasi.update', $akreditasi->id) }}" method="POST" enctype="multipart/form-data">
|
||||
@method('patch')
|
||||
@csrf
|
||||
<div class="modal-body">
|
||||
<input type="hidden" name="id" id="id">
|
||||
<div class="form-group mt-2">
|
||||
<label for="program_studi">Program Studi</label>
|
||||
<input type="text" class="form-control mt-0" name="program_studi" id="program_studi"
|
||||
required maxlength="255" placeholder=". . .">
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="strata">Strata</label>
|
||||
<input type="text" class="form-control mt-0" name="strata" id="strata" required
|
||||
maxlength="10" placeholder=". . .">
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="peringkat">Peringkat</label>
|
||||
<input type="text" class="form-control mt-0" name="peringkat" id="peringkat" required
|
||||
maxlength="20" placeholder=". . .">
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="tanggal_kadaluarsa">Tanggal Kadaluarsa</label>
|
||||
<input type="text" class="form-control mt-0" name="tanggal_kadaluarsa"
|
||||
id="tanggal_kadaluarsa" required maxlength="255" placeholder=". . .">
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="nomor_sk">Nomor SK</label>
|
||||
<input type="text" class="form-control mt-0" name="nomor_sk" id="nomor_sk" required
|
||||
maxlength="255" placeholder=". . .">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="nama_file">PDF</label>
|
||||
<input type="file" id="input_pdf_edit" class="form-control mt-0" name="nama_file"
|
||||
accept="application/pdf">
|
||||
<input type="hidden" name="old_file" id="old_file" value="{{ $akreditasi->nama_file }}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="release_date">Tanggal 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 id="submitEdit" class="btn btn-primary from-prevent-multiple-submitsEdit" type="submit">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_akreditasi").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_akreditasi_wrapper .col-md-6:eq(0)');
|
||||
});
|
||||
</script>
|
||||
|
||||
<!--Modal Edit -->
|
||||
<script type="text/javascript">
|
||||
$(document).on("click", ".open-formModalEdit", function() {
|
||||
var id = $(this).data('id');
|
||||
var program_studi = $(this).data('program_studi');
|
||||
var strata = $(this).data('strata');
|
||||
var peringkat = $(this).data('peringkat');
|
||||
var tanggal_kadaluarsa = $(this).data('tanggal_kadaluarsa');
|
||||
var nomor_sk = $(this).data('nomor_sk');
|
||||
var release_date = $(this).data('release_date');
|
||||
var old_file = $(this).data('old_file');
|
||||
|
||||
$(".modal-body #id").val(id);
|
||||
$(".modal-body #program_studi").val(program_studi);
|
||||
$(".modal-body #strata").val(strata);
|
||||
$(".modal-body #peringkat").val(peringkat);
|
||||
$(".modal-body #tanggal_kadaluarsa").val(tanggal_kadaluarsa);
|
||||
$(".modal-body #nomor_sk").val(nomor_sk);
|
||||
$(".modal-body #release_date").val(release_date);
|
||||
$(".modal-body #input_pdf_edit").val("");
|
||||
$(".modal-body #old_file").val(old_file);
|
||||
});
|
||||
|
||||
//Form add image validation
|
||||
var uploadField = document.getElementById("input_pdf_add");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
};
|
||||
};
|
||||
|
||||
//Form edit image validation
|
||||
var uploadField = document.getElementById("input_pdf_edit");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
};
|
||||
};
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,338 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Aplikasi Terintegrasi')
|
||||
|
||||
@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">Aplikasi Terintegrasi</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 Aplikasi Terintegrasi</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 Aplikasi Terintegrasi
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_aplikasi_integrasi" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nomor</th>
|
||||
<th>Nama</th>
|
||||
<th>Thumbnail</th>
|
||||
<th>Teks</th>
|
||||
<th>Link</th>
|
||||
<th>Jadwal Rilis</th>
|
||||
<th>Status</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($aplikasiIntegrasis as $aplikasiIntegrasi)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $aplikasiIntegrasi->nama }}</td>
|
||||
<td><img src="{{ url($aplikasiIntegrasi->thumbnail) }}"
|
||||
style="width:100px"></td>
|
||||
<td>{{ $aplikasiIntegrasi->teks }}</td>
|
||||
<td>{{ $aplikasiIntegrasi->url }}</td>
|
||||
<td>{{ $aplikasiIntegrasi->release_date }}</td>
|
||||
@if ($aplikasiIntegrasi->deleted_at == '')
|
||||
@if ($aplikasiIntegrasi->release_date <= date('Y-m-d'))
|
||||
<td>Rilis</td>
|
||||
@else
|
||||
<td>Belum Rilis</td>
|
||||
@endif
|
||||
@else ($aplikasiIntegrasi->deleted_at != "")
|
||||
<td>Terhapus</td>
|
||||
@endif
|
||||
@if ($aplikasiIntegrasi->deleted_at == '')
|
||||
<td>
|
||||
<button href="#formModalEdit" role="button" data-toggle="modal"
|
||||
data-id="{{ $aplikasiIntegrasi->id }}"
|
||||
data-nama="{{ $aplikasiIntegrasi->nama }}"
|
||||
data-thumbnail="{{ url($aplikasiIntegrasi->thumbnail) }}"
|
||||
data-teks="{{ $aplikasiIntegrasi->teks }}"
|
||||
data-url="{{ $aplikasiIntegrasi->url }}"
|
||||
data-release_date="{{ $aplikasiIntegrasi->release_date }}"
|
||||
class="btn btn-warning open-formModalEdit"><i
|
||||
class="fa fa-edit"></i> Edit</button>
|
||||
<form
|
||||
action="{{ route('aplikasi_integrasi.destroy', $aplikasiIntegrasi) }}"
|
||||
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/aplikasi_integrasi/' . $aplikasiIntegrasi->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/aplikasi_integrasi/' . $aplikasiIntegrasi->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 Aplikasi Terintegrasi</h5>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal" aria-label="Close">X</button>
|
||||
</div>
|
||||
<form id="formAdd" action="{{ url('/admin/aplikasi_integrasi') }}" method="post" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="modal-body">
|
||||
<div class="form-group mt-2">
|
||||
<label for="nama">Nama Aplikasi</label>
|
||||
<input type="text" class="form-control mt-0" name="nama" required maxlength="255"
|
||||
placeholder=". . .">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="nama_foto">Thumbnail (Maksimal 2MB)</label>
|
||||
<div class="form-group">
|
||||
<img id="img_preview_add" style="max-width: 200px;" class="mt-2" />
|
||||
</div>
|
||||
<input type="file" accept="image/*" class="form-control mt-0" name="thumbnail"
|
||||
id="input_foto_add" required>
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="url">Teks</label>
|
||||
<input type="text" class="form-control mt-0" name="teks" required maxlength="255"
|
||||
placeholder=". . .">
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="url">Link Aplikasi</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 ($aplikasiIntegrasis as $aplikasiIntegrasi)
|
||||
<!-- 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 Aplikasi Terintegrasi</h5>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal" aria-label="Close">X</button>
|
||||
</div>
|
||||
<form id="formEdit" action="{{ route('aplikasi_integrasi.update', $aplikasiIntegrasi->id) }}" method="POST"
|
||||
enctype="multipart/form-data">
|
||||
@method('patch')
|
||||
@csrf
|
||||
<div class="modal-body">
|
||||
<input type="hidden" name="id" id="id">
|
||||
<div class="form-group mt-2">
|
||||
<label for="nama">Nama</label>
|
||||
<input type="text" class="form-control mt-0" name="nama" id="nama" required maxlength="255"
|
||||
placeholder=". . .">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="nama_foto">Thumbnail (Maksimal 2MB)</label>
|
||||
<div class="form-group">
|
||||
<img src="" alt="Image Missing" id="old_thumbnail" style="max-width: 200px;"
|
||||
class="mt-2" />
|
||||
</div>
|
||||
<input type="file" accept="image/*" class="form-control mt-0" name="thumbnail"
|
||||
id="input_foto_edit">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="teks">Teks (Foto Maksimal 2MB)</label>
|
||||
<input type="text" class="form-control mt-0" placeholder=". . ." name="teks" id="teks"
|
||||
required maxlength="255">
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="url">Link Aplikasi</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_aplikasi_integrasi").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_aplikasi_integrasi_wrapper .col-md-6:eq(0)');
|
||||
});
|
||||
|
||||
$(document).on("click", ".open-formModalEdit", function() {
|
||||
var id = $(this).data('id');
|
||||
var nama = $(this).data('nama');
|
||||
var url = $(this).data('url');
|
||||
var thumbnail = $(this).data('thumbnail');
|
||||
var teks = $(this).data('teks');
|
||||
var release_date = $(this).data('release_date');
|
||||
|
||||
$(".modal-body #id").val(id);
|
||||
$(".modal-body #old_thumbnail").attr("src", thumbnail);
|
||||
$(".modal-body #teks").val(teks);
|
||||
$(".modal-body #nama").val(nama);
|
||||
$(".modal-body #url").val(url);
|
||||
$(".modal-body #release_date").val(release_date);
|
||||
$(".modal-body #input_foto_edit").val("");
|
||||
});
|
||||
|
||||
//Form add image validation
|
||||
var uploadField = document.getElementById("input_foto_add");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
} else {
|
||||
//Ubah Img Preview
|
||||
var reader = new FileReader();
|
||||
reader.onload = function() {
|
||||
var output = document.getElementById('img_preview_add');
|
||||
output.src = reader.result;
|
||||
}
|
||||
reader.readAsDataURL(event.target.files[0]);
|
||||
};
|
||||
};
|
||||
|
||||
//Form edit image validation
|
||||
var uploadField = document.getElementById("input_foto_edit");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
} else {
|
||||
//Ubah Img Preview
|
||||
var reader = new FileReader();
|
||||
reader.onload = function() {
|
||||
var output = document.getElementById('old_thumbnail');
|
||||
output.src = reader.result;
|
||||
}
|
||||
reader.readAsDataURL(event.target.files[0]);
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
$('.from-prevent-multiple-submits').on('submit', function(){
|
||||
$('.from-prevent-multiple-submits').attr('disabled','true');
|
||||
})
|
||||
})();
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,294 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Banner')
|
||||
|
||||
@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">Banner</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 Banner</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 Banner
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_banner" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nomor</th>
|
||||
<th>Foto</th>
|
||||
<th>Jadwal Rilis</th>
|
||||
<th>Status</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($banners as $banner)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td><img src="{{ url($banner->nama_foto) }}"
|
||||
style="width:300px;height:auto;object-fit:cover"></td>
|
||||
<td>{{ $banner->release_date }}</td>
|
||||
@if ($banner->deleted_at == '')
|
||||
@if ($banner->release_date <= date('Y-m-d'))
|
||||
<td>Rilis</td>
|
||||
@else
|
||||
<td>Belum Rilis</td>
|
||||
@endif
|
||||
@else ($banner->deleted_at != "")
|
||||
<td>Terhapus</td>
|
||||
@endif
|
||||
@if ($banner->deleted_at == '')
|
||||
<td>
|
||||
<button href="#formModalEdit" role="button" data-toggle="modal"
|
||||
data-id="{{ $banner->id }}"
|
||||
data-teks="{{ $banner->teks }}"
|
||||
data-nama_foto="{{ url($banner->nama_foto) }}"
|
||||
data-sumber="{{ $banner->sumber }}"
|
||||
data-release_date="{{ $banner->release_date }}"
|
||||
class="btn btn-warning open-formModalEdit"><i
|
||||
class="fa fa-edit"></i> Edit</button>
|
||||
<form action="{{ route('banner.destroy', $banner) }}"
|
||||
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/banner/' . $banner->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/banner/' . $banner->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 Banner</h5>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal" aria-label="Close">X</button>
|
||||
</div>
|
||||
<form id="formAdd" action="{{ url('/admin/banner') }}" method="post" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label for="nama_foto">Foto (Maksimal 2MB)</label>
|
||||
<div class="form-group">
|
||||
<img id="img_preview_add" style="max-width: 200px;" class="mt-2" />
|
||||
</div>
|
||||
<input type="file" accept="image/*" class="form-control mt-0" name="nama_foto"
|
||||
id="input_foto_add" required>
|
||||
</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 ($banners as $banner)
|
||||
<!-- 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 Banner</h5>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal" aria-label="Close">X</button>
|
||||
</div>
|
||||
<form id="formEdit" action="{{ route('banner.update', $banner->id) }}" method="POST" enctype="multipart/form-data">
|
||||
@method('patch')
|
||||
@csrf
|
||||
<div class="modal-body">
|
||||
<input type="hidden" name="id" id="id">
|
||||
<div class="form-group">
|
||||
<label for="nama_foto">Foto (Maksimal 2MB)</label>
|
||||
<div class="form-group">
|
||||
<img src="" alt="Image Missing" id="old_nama_foto" style="max-width: 200px;"
|
||||
class="mt-2" />
|
||||
</div>
|
||||
<input type="file" accept="image/*" class="form-control mt-0" name="nama_foto"
|
||||
id="input_foto_edit">
|
||||
</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_banner").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_banner_wrapper .col-md-6:eq(0)');
|
||||
});
|
||||
|
||||
$(document).on("click", ".open-formModalEdit", function() {
|
||||
var id = $(this).data('id');
|
||||
var teks = $(this).data('teks');
|
||||
var sumber = $(this).data('sumber');
|
||||
var nama_foto = $(this).data('nama_foto');
|
||||
var release_date = $(this).data('release_date');
|
||||
|
||||
$(".modal-body #id").val(id);
|
||||
$(".modal-body #teks").val(teks);
|
||||
$(".modal-body #sumber").val(sumber);
|
||||
$(".modal-body #release_date").val(release_date);
|
||||
$(".modal-body #input_foto_edit").val("");
|
||||
$(".modal-body #old_nama_foto").attr('src', nama_foto);
|
||||
});
|
||||
|
||||
//Form add image validation
|
||||
var uploadField = document.getElementById("input_foto_add");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
} else {
|
||||
//Ubah Img Preview
|
||||
var reader = new FileReader();
|
||||
reader.onload = function() {
|
||||
var output = document.getElementById('img_preview_add');
|
||||
output.src = reader.result;
|
||||
}
|
||||
reader.readAsDataURL(event.target.files[0]);
|
||||
};
|
||||
};
|
||||
|
||||
//Form edit image validation
|
||||
var uploadField = document.getElementById("input_foto_edit");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
} else {
|
||||
//Ubah Img Preview
|
||||
var reader = new FileReader();
|
||||
reader.onload = function() {
|
||||
var output = document.getElementById('old_nama_foto');
|
||||
output.src = reader.result;
|
||||
}
|
||||
reader.readAsDataURL(event.target.files[0]);
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
$('.from-prevent-multiple-submits').on('submit', function(){
|
||||
$('.from-prevent-multiple-submits').attr('disabled','true');
|
||||
})
|
||||
})();
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,220 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Berita')
|
||||
|
||||
@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">Berita</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
|
||||
<!-- 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">Tambah Data Berita</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<!-- form start -->
|
||||
<form class="from-prevent-multiple-submits" action="{{ route('berita.store') }}" method="POST" id="ckeditorForm"
|
||||
enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label for="judul">Judul</label>
|
||||
<input type="text" class="form-control" id="judul" name="judul"
|
||||
placeholder="Masukkan Judul" value="" required maxlength="255">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="nama_foto">Thumbnail (Maksimal 2MB)</label>
|
||||
<div class="form-group">
|
||||
<img id="img_preview_add" style="max-width: 200px;"
|
||||
class="mt-2" />
|
||||
</div>
|
||||
<input type="file" accept="image/*" class="form-control mt-0"
|
||||
name="thumbnail" id="input_foto_add" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="teks">Teks (Foto Maksimal 2MB)</label>
|
||||
<textarea id="teks" placeholder="Masukkan Teks Berita" name="teks"
|
||||
class="ck_editor_txt" id="ck_editor_txt"></textarea>
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="release_date">Tanggal Rilis</label>
|
||||
<input type="date" class="form-control mt-0" name="release_date" required>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
|
||||
<div class="card-footer">
|
||||
<button id="submit" type="submit" class="btn btn-primary from-prevent-multiple-submits">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
//Define an adapter to upload the files
|
||||
class MyUploadAdapter {
|
||||
constructor(loader) {
|
||||
// The file loader instance to use during the upload. It sounds scary but do not
|
||||
// worry — the loader will be passed into the adapter later on in this guide.
|
||||
this.loader = loader;
|
||||
|
||||
// URL where to send files.
|
||||
this.url = '{{ route('ckeditor.upload') }}';
|
||||
|
||||
//
|
||||
}
|
||||
// Starts the upload process.
|
||||
upload() {
|
||||
return this.loader.file.then(
|
||||
(file) =>
|
||||
new Promise((resolve, reject) => {
|
||||
this._initRequest();
|
||||
this._initListeners(resolve, reject, file);
|
||||
this._sendRequest(file);
|
||||
})
|
||||
);
|
||||
}
|
||||
// Aborts the upload process.
|
||||
abort() {
|
||||
if (this.xhr) {
|
||||
this.xhr.abort();
|
||||
}
|
||||
}
|
||||
// Initializes the XMLHttpRequest object using the URL passed to the constructor.
|
||||
_initRequest() {
|
||||
const xhr = (this.xhr = new XMLHttpRequest());
|
||||
// Note that your request may look different. It is up to you and your editor
|
||||
// integration to choose the right communication channel. This example uses
|
||||
// a POST request with JSON as a data structure but your configuration
|
||||
// could be different.
|
||||
// xhr.open('POST', this.url, true);
|
||||
xhr.open("POST", this.url, true);
|
||||
xhr.setRequestHeader("x-csrf-token", "{{ csrf_token() }}");
|
||||
xhr.responseType = "json";
|
||||
}
|
||||
// Initializes XMLHttpRequest listeners.
|
||||
_initListeners(resolve, reject, file) {
|
||||
const xhr = this.xhr;
|
||||
const loader = this.loader;
|
||||
const genericErrorText = `Couldn't upload file: ${file.name}.`;
|
||||
xhr.addEventListener("error", () => reject(genericErrorText));
|
||||
xhr.addEventListener("abort", () => reject());
|
||||
xhr.addEventListener("load", () => {
|
||||
const response = xhr.response;
|
||||
// This example assumes the XHR server's "response" object will come with
|
||||
// an "error" which has its own "message" that can be passed to reject()
|
||||
// in the upload promise.
|
||||
//
|
||||
// Your integration may handle upload errors in a different way so make sure
|
||||
// it is done properly. The reject() function must be called when the upload fails.
|
||||
if (!response || response.error) {
|
||||
return reject(response && response.error ? response.error.message : genericErrorText);
|
||||
}
|
||||
// If the upload is successful, resolve the upload promise with an object containing
|
||||
// at least the "default" URL, pointing to the image on the server.
|
||||
// This URL will be used to display the image in the content. Learn more in the
|
||||
// UploadAdapter#upload documentation.
|
||||
resolve({
|
||||
default: response.url,
|
||||
});
|
||||
});
|
||||
// Upload progress when it is supported. The file loader has the #uploadTotal and #uploaded
|
||||
// properties which are used e.g. to display the upload progress bar in the editor
|
||||
// user interface.
|
||||
if (xhr.upload) {
|
||||
xhr.upload.addEventListener("progress", (evt) => {
|
||||
if (evt.lengthComputable) {
|
||||
loader.uploadTotal = evt.total;
|
||||
loader.uploaded = evt.loaded;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// Prepares the data and sends the request.
|
||||
_sendRequest(file) {
|
||||
// Prepare the form data.
|
||||
const data = new FormData();
|
||||
data.append("upload", file);
|
||||
// Important note: This is the right place to implement security mechanisms
|
||||
// like authentication and CSRF protection. For instance, you can use
|
||||
// XMLHttpRequest.setRequestHeader() to set the request headers containing
|
||||
// the CSRF token generated earlier by your application.
|
||||
// Send the request.
|
||||
this.xhr.send(data);
|
||||
}
|
||||
// ...
|
||||
}
|
||||
|
||||
function SimpleUploadAdapterPlugin(editor) {
|
||||
editor.plugins.get("FileRepository").createUploadAdapter = (loader) => {
|
||||
// Configure the URL to the upload script in your back-end here!
|
||||
return new MyUploadAdapter(loader);
|
||||
};
|
||||
}
|
||||
|
||||
var allEditors = document.querySelector('.ck_editor_txt');
|
||||
|
||||
//Initialize the ckeditor
|
||||
ClassicEditor.create(document.querySelector("#teks"), {
|
||||
extraPlugins: [SimpleUploadAdapterPlugin],
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
$("#ckeditorForm").submit(function(e) {
|
||||
var content = $('.ck_editor_txt').val();
|
||||
html = $(content).text();
|
||||
if ($.trim(html) == '') {
|
||||
alert("Teks Tidak Boleh Kosong!");
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
//Form add image validation
|
||||
var uploadField = document.getElementById("input_foto_add");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
} else {
|
||||
//Ubah Img Preview
|
||||
var reader = new FileReader();
|
||||
reader.onload = function() {
|
||||
var output = document.getElementById('img_preview_add');
|
||||
output.src = reader.result;
|
||||
}
|
||||
reader.readAsDataURL(event.target.files[0]);
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
$('.from-prevent-multiple-submits').on('submit', function(){
|
||||
$('.from-prevent-multiple-submits').attr('disabled','true');
|
||||
})
|
||||
})();
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,217 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Berita')
|
||||
|
||||
@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">Berita</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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">Edit Data Berita</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<!-- form start -->
|
||||
<form class="from-prevent-multiple-submits"
|
||||
action="{{ route('berita.update', $berita) }}" method="POST"
|
||||
enctype="multipart/form-data">
|
||||
@method('patch')
|
||||
@csrf
|
||||
<div class="card-body">
|
||||
<input type="hidden" value="{{ $berita->id }}" name="id">
|
||||
<div class="form-group">
|
||||
<label for="judul">Judul</label>
|
||||
<input type="text" class="form-control" id="judul" name="judul"
|
||||
maxlength="255" placeholder="Masukkan Judul"
|
||||
value="{{ $berita->judul }}" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="nama_foto">Thumbnail (Maksimal 2MB)</label>
|
||||
<div class="form-group">
|
||||
<img src="{{ url($berita->thumbnail) }}" alt="Image Missing"
|
||||
id="old_nama_foto" style="max-width: 200px;"
|
||||
class="mt-2" />
|
||||
</div>
|
||||
<input type="file" accept="image/*" class="form-control mt-0"
|
||||
name="thumbnail" id="input_foto_edit">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="teks">Teks (Foto Maksimal 2MB)</label>
|
||||
<textarea id="teks" placeholder="Masukkan Deskripsi Video"
|
||||
name="teks">{{ $berita->teks }}</textarea>
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="release_date">Tanggal Rilis</label>
|
||||
<input type="date" class="form-control mt-0" name="release_date"
|
||||
value="{{ $berita->release_date }}" required>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
|
||||
<div class="card-footer">
|
||||
<button id="submit" type="submit"
|
||||
class="btn btn-primary from-prevent-multiple-submits">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
//Define an adapter to upload the files
|
||||
class MyUploadAdapter {
|
||||
constructor(loader) {
|
||||
// The file loader instance to use during the upload. It sounds scary but do not
|
||||
// worry — the loader will be passed into the adapter later on in this guide.
|
||||
this.loader = loader;
|
||||
|
||||
// URL where to send files.
|
||||
this.url = '{{ route('ckeditor.upload') }}';
|
||||
|
||||
//
|
||||
}
|
||||
// Starts the upload process.
|
||||
upload() {
|
||||
return this.loader.file.then(
|
||||
(file) =>
|
||||
new Promise((resolve, reject) => {
|
||||
this._initRequest();
|
||||
this._initListeners(resolve, reject, file);
|
||||
this._sendRequest(file);
|
||||
})
|
||||
);
|
||||
}
|
||||
// Aborts the upload process.
|
||||
abort() {
|
||||
if (this.xhr) {
|
||||
this.xhr.abort();
|
||||
}
|
||||
}
|
||||
// Initializes the XMLHttpRequest object using the URL passed to the constructor.
|
||||
_initRequest() {
|
||||
const xhr = (this.xhr = new XMLHttpRequest());
|
||||
// Note that your request may look different. It is up to you and your editor
|
||||
// integration to choose the right communication channel. This example uses
|
||||
// a POST request with JSON as a data structure but your configuration
|
||||
// could be different.
|
||||
// xhr.open('POST', this.url, true);
|
||||
xhr.open("POST", this.url, true);
|
||||
xhr.setRequestHeader("x-csrf-token", "{{ csrf_token() }}");
|
||||
xhr.responseType = "json";
|
||||
}
|
||||
// Initializes XMLHttpRequest listeners.
|
||||
_initListeners(resolve, reject, file) {
|
||||
const xhr = this.xhr;
|
||||
const loader = this.loader;
|
||||
const genericErrorText = `Couldn't upload file: ${file.name}.`;
|
||||
xhr.addEventListener("error", () => reject(genericErrorText));
|
||||
xhr.addEventListener("abort", () => reject());
|
||||
xhr.addEventListener("load", () => {
|
||||
const response = xhr.response;
|
||||
// This example assumes the XHR server's "response" object will come with
|
||||
// an "error" which has its own "message" that can be passed to reject()
|
||||
// in the upload promise.
|
||||
//
|
||||
// Your integration may handle upload errors in a different way so make sure
|
||||
// it is done properly. The reject() function must be called when the upload fails.
|
||||
if (!response || response.error) {
|
||||
return reject(response && response.error ? response.error.message : genericErrorText);
|
||||
}
|
||||
// If the upload is successful, resolve the upload promise with an object containing
|
||||
// at least the "default" URL, pointing to the image on the server.
|
||||
// This URL will be used to display the image in the content. Learn more in the
|
||||
// UploadAdapter#upload documentation.
|
||||
resolve({
|
||||
default: response.url,
|
||||
});
|
||||
});
|
||||
// Upload progress when it is supported. The file loader has the #uploadTotal and #uploaded
|
||||
// properties which are used e.g. to display the upload progress bar in the editor
|
||||
// user interface.
|
||||
if (xhr.upload) {
|
||||
xhr.upload.addEventListener("progress", (evt) => {
|
||||
if (evt.lengthComputable) {
|
||||
loader.uploadTotal = evt.total;
|
||||
loader.uploaded = evt.loaded;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// Prepares the data and sends the request.
|
||||
_sendRequest(file) {
|
||||
// Prepare the form data.
|
||||
const data = new FormData();
|
||||
data.append("upload", file);
|
||||
// Important note: This is the right place to implement security mechanisms
|
||||
// like authentication and CSRF protection. For instance, you can use
|
||||
// XMLHttpRequest.setRequestHeader() to set the request headers containing
|
||||
// the CSRF token generated earlier by your application.
|
||||
// Send the request.
|
||||
this.xhr.send(data);
|
||||
}
|
||||
// ...
|
||||
}
|
||||
|
||||
function SimpleUploadAdapterPlugin(editor) {
|
||||
editor.plugins.get("FileRepository").createUploadAdapter = (loader) => {
|
||||
// Configure the URL to the upload script in your back-end here!
|
||||
return new MyUploadAdapter(loader);
|
||||
};
|
||||
}
|
||||
|
||||
//Initialize the ckeditor
|
||||
ClassicEditor.create(document.querySelector("#teks"), {
|
||||
extraPlugins: [SimpleUploadAdapterPlugin],
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
//Form edit image validation
|
||||
var uploadField = document.getElementById("input_foto_edit");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
} else {
|
||||
//Ubah Img Preview
|
||||
var reader = new FileReader();
|
||||
reader.onload = function() {
|
||||
var output = document.getElementById('old_nama_foto');
|
||||
output.src = reader.result;
|
||||
}
|
||||
reader.readAsDataURL(event.target.files[0]);
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
$('.from-prevent-multiple-submits').on('submit', function() {
|
||||
$('.from-prevent-multiple-submits').attr('disabled', 'true');
|
||||
})
|
||||
})();
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,152 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Berita')
|
||||
|
||||
@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">Berita</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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 Berita</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-12 text-left">
|
||||
<a href="{{ url('/admin/berita/create') }}" type="button"
|
||||
class="btn btn-success mb-3">
|
||||
<i class="fa fa-plus-circle mr-2"></i>Tambah Data
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table id="tabel_berita" class="table table-bordered table-striped mt-2">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th>Judul</th>
|
||||
<th>Thumbnail</th>
|
||||
<th>Teks</th>
|
||||
<th>Jadwal Rilis</th>
|
||||
<th>Status</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@foreach ($beritas as $berita)
|
||||
<tr id="{{ $berita->id }}">
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $berita->judul }}</td>
|
||||
<td><img src="{{ url($berita->thumbnail) }}" style="width:100px"></td>
|
||||
<td>
|
||||
@if (strlen(strip_tags($berita->teks)) > 100)
|
||||
{{ str_replace(' ', '', substr(strip_tags($berita->teks), 0, 100) . '...') }}
|
||||
@else
|
||||
{{ str_replace(' ', '', substr(strip_tags($berita->teks), 0, 100)) }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $berita->release_date }}</td>
|
||||
@if ($berita->deleted_at == '')
|
||||
@if ($berita->release_date <= date('Y-m-d'))
|
||||
<td>Rilis</td>
|
||||
@else
|
||||
<td>Belum Rilis</td>
|
||||
@endif
|
||||
@else
|
||||
($berita->deleted_at != "")
|
||||
<td>Terhapus</td>
|
||||
@endif
|
||||
@if ($berita->deleted_at == '')
|
||||
<td>
|
||||
<a href="{{ url('admin/berita/' . $berita->id . '/edit') }}"
|
||||
class="btn btn-warning open-formModalEdit"><i
|
||||
class="fa fa-edit"></i> Edit</a>
|
||||
<form action="{{ route('berita.destroy', $berita) }}"
|
||||
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/berita/' . $berita->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/berita/' . $berita->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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<!--Data Table -->
|
||||
<script>
|
||||
$(function() {
|
||||
$("#tabel_berita").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_berita_wrapper .col-md-6:eq(0)');
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,254 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Blog')
|
||||
|
||||
@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">Blog</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 Blog</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 Blog
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_blog" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nomor</th>
|
||||
<th>Nama Dosen</th>
|
||||
<th>Link Blog</th>
|
||||
<th>Jadwal Rilis</th>
|
||||
<th>Status</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($blogs as $blog)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $blog->nama }}</td>
|
||||
<td><a href="{{ $blog->url }}" download
|
||||
target="_blank">{{ $blog->url }}</a></td>
|
||||
<td>{{ $blog->release_date }}</td>
|
||||
@if ($blog->deleted_at == '')
|
||||
@if ($blog->release_date <= date('Y-m-d'))
|
||||
<td>Rilis</td>
|
||||
@else
|
||||
<td>Belum Rilis</td>
|
||||
@endif
|
||||
@else ($blog->deleted_at != "")
|
||||
<td>Terhapus</td>
|
||||
@endif
|
||||
@if ($blog->deleted_at == '')
|
||||
<td>
|
||||
<button href="#formModalEdit" role="button" data-toggle="modal"
|
||||
data-id="{{ $blog->id }}"
|
||||
data-nama="{{ $blog->nama }}"
|
||||
data-url="{{ $blog->url }}"
|
||||
data-release_date="{{ $blog->release_date }}"
|
||||
class="btn btn-warning open-formModalEdit"><i
|
||||
class="fa fa-edit"></i> Edit</button>
|
||||
<form action="{{ route('blog.destroy', $blog) }}"
|
||||
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/blog/' . $blog->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/blog/' . $blog->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 Blog</h5>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal" aria-label="Close">X</button>
|
||||
</div>
|
||||
<form id="formAdd" action="{{ url('/admin/blog') }}" method="post" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="modal-body">
|
||||
<div class="form-group mt-2">
|
||||
<label for="nama">Nama Dosen</label>
|
||||
<input type="text" class="form-control mt-0" name="nama" required maxlength="255"
|
||||
placeholder=". . .">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="url">Link Blog</label>
|
||||
<input type="text" class="form-control mt-0" name="url" required 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 ($blogs as $blog)
|
||||
<!-- 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 Blog</h5>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal" aria-label="Close">X</button>
|
||||
</div>
|
||||
<form id="formEdit" action="{{ route('blog.update', $blog->id) }}" method="POST" enctype="multipart/form-data">
|
||||
@method('patch')
|
||||
@csrf
|
||||
<div class="modal-body">
|
||||
<input type="hidden" name="id" id="id">
|
||||
<div class="form-group mt-2">
|
||||
<label for="nama">Nama Dosen</label>
|
||||
<input type="text" class="form-control mt-0" name="nama" id="nama" required maxlength="255"
|
||||
placeholder=". . .">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="url">Link Blog</label>
|
||||
<input type="text" class="form-control mt-0" name="url" id="url" required
|
||||
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_blog").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_blog_wrapper .col-md-6:eq(0)');
|
||||
});
|
||||
|
||||
$(document).on("click", ".open-formModalEdit", function() {
|
||||
var id = $(this).data('id');
|
||||
var nama = $(this).data('nama');
|
||||
var url = $(this).data('url');
|
||||
var release_date = $(this).data('release_date');
|
||||
|
||||
$(".modal-body #id").val(id);
|
||||
$(".modal-body #nama").val(nama);
|
||||
$(".modal-body #release_date").val(release_date);
|
||||
$(".modal-body #url").val(url);
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,247 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Dashboard')
|
||||
|
||||
@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">Dashboard</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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="col-12">
|
||||
<div class="card p-3">
|
||||
<div class="row">
|
||||
<div class="col-12 text-left">
|
||||
<button type="button" class="btn btn-warning mb-3 open-formModalEditData"
|
||||
data-toggle="modal" data-target="#modal-edit-data" data-id="{{ $session_user->id }}"
|
||||
data-name="{{ $session_user->name }}" data-email="{{ $session_user->email }}"
|
||||
data-posisi_jabatan="{{ $session_user->posisi_jabatan }}"
|
||||
data-telepon="{{ $session_user->telepon }}">
|
||||
<i class="fa fa-list mr-2"></i>Ubah Data
|
||||
</button>
|
||||
<button type="button" class="btn btn-warning mb-3 ml-2 open-formModalEditPassword"
|
||||
data-toggle="modal" data-target="#modal-edit-password"
|
||||
data-id="{{ $session_user->id }}" data-name="{{ $session_user->name }}"
|
||||
data-email="{{ $session_user->email }}"
|
||||
data-posisi_jabatan="{{ $session_user->posisi_jabatan }}"
|
||||
data-telepon="{{ $session_user->telepon }}">
|
||||
<i class="fa fa-key mr-2"></i>Ubah Password
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-3 col-6">
|
||||
<!-- small box -->
|
||||
<div class="small-box bg-info">
|
||||
<div class="inner">
|
||||
<h3>Nama</h3>
|
||||
<p>{{ $session_user->name }}</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="far fa-user"></i>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- ./col -->
|
||||
<div class="col-lg-3 col-6">
|
||||
<!-- small box -->
|
||||
<div class="small-box bg-success">
|
||||
<div class="inner">
|
||||
<h3>Email</h3>
|
||||
<p>{{ $session_user->email }}</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="far fa-envelope"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ./col -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
|
||||
<!-- Modal Edit Data -->
|
||||
<div class="modal fade" id="modal-edit-data">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Ubah Data User</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<form action="{{ url('admin/dashboard') }}/{{ $session_user->id }}" method="post"
|
||||
enctype="multipart/form-data">
|
||||
@method('patch')
|
||||
@csrf
|
||||
<div class="modal-body">
|
||||
|
||||
<input type="hidden" name="id" id="id">
|
||||
|
||||
<div class="form-group mt-2">
|
||||
<label for="name">Nama</label>
|
||||
<input type="text" class="form-control mt-0" id="name" name="name" maxlength="50" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group mt-2">
|
||||
<label for="email">Email</label>
|
||||
<input type="email" class="form-control mt-0" id="email" name="email" maxlength="50" required>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer justify-content-between">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Batal</button>
|
||||
<button type="submit" class="btn btn-primary">Ubah Data</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
|
||||
<!-- Modal Edit Password -->
|
||||
<div class="modal fade" id="modal-edit-password">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Ubah Password Pengguna</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<form action="{{ url('admin/dashboard') }}/{{ $session_user->id }}" method="post"
|
||||
enctype="multipart/form-data">
|
||||
@method('patch')
|
||||
@csrf
|
||||
<div class="modal-body">
|
||||
|
||||
<input type="hidden" name="id" id="id">
|
||||
|
||||
<input type="hidden" name="name" id="name">
|
||||
|
||||
<input type="hidden" name="email" id="email">
|
||||
|
||||
<div class="form-group mt-2">
|
||||
<label for="name">Password Baru</label>
|
||||
<input type="password" class="form-control mt-0" placeholder="Masukkan Password Baru"
|
||||
name="password" id="password_edit" maxlength="255" required onchange="check_pass1()">
|
||||
<input type="checkbox" onclick="myFunction1()">Tampilkan Password
|
||||
</div>
|
||||
|
||||
<div class="form-group mt-2">
|
||||
<label for="email">Konfirmasi Password Baru</label>
|
||||
<input type="password" class="form-control mt-0" placeholder="Konfirmasi Password Baru"
|
||||
name="password_confirm" id="password_confirm_edit" maxlength="255" required
|
||||
onchange="check_pass1()">
|
||||
<input type="checkbox" onclick="myFunction2()">Tampilkan Password
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer justify-content-between">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Batal</button>
|
||||
<button type="submit" class="btn btn-primary" id="submit_edit">Ubah Password</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
<script type="text/javascript">
|
||||
$(document).on("click", ".open-formModalEditData", function() {
|
||||
var id = $(this).data('id');
|
||||
var name = $(this).data('name');
|
||||
var email = $(this).data('email');
|
||||
var telepon = $(this).data('telepon');
|
||||
|
||||
$(".modal-body #id").val(id);
|
||||
$(".modal-body #name").val(name);
|
||||
$(".modal-body #email").val(email);
|
||||
$(".modal-body #telepon").val(telepon);
|
||||
});
|
||||
|
||||
$(document).on("click", ".open-formModalEditPassword", function() {
|
||||
var id = $(this).data('id');
|
||||
var name = $(this).data('name');
|
||||
var email = $(this).data('email');
|
||||
var telepon = $(this).data('telepon');
|
||||
|
||||
$(".modal-body #id").val(id);
|
||||
$(".modal-body #name").val(name);
|
||||
$(".modal-body #email").val(email);
|
||||
$(".modal-body #telepon").val(telepon);
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
function myFunction1() {
|
||||
var x = document.getElementById("password_edit");
|
||||
if (x.type === "password") {
|
||||
x.type = "text";
|
||||
} else {
|
||||
x.type = "password";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
function myFunction2() {
|
||||
var x = document.getElementById("password_confirm_edit");
|
||||
if (x.type === "password") {
|
||||
x.type = "text";
|
||||
} else {
|
||||
x.type = "password";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
function check_pass1() {
|
||||
if (document.getElementById('password_edit').value ===
|
||||
document.getElementById('password_confirm_edit').value) {
|
||||
document.getElementById('submit_edit').disabled = false;
|
||||
} else {
|
||||
document.getElementById('submit_edit').disabled = true;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,276 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Dokumen Akademik')
|
||||
|
||||
@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">Dokumen Akademik</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 Dokumen Akademik</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 Dokumen Akademik
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_dokumen_akademik" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nomor</th>
|
||||
<th>Judul</th>
|
||||
<th>File</th>
|
||||
<th>Jadwal Rilis</th>
|
||||
<th>Status</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($dokumenAkademiks as $dokumenAkademik)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $dokumenAkademik->judul }}</td>
|
||||
<td><a href="{{ url($dokumenAkademik->nama_file) }}" download
|
||||
target="_blank">{{ $dokumenAkademik->nama_file }}</a></td>
|
||||
<td>{{ $dokumenAkademik->release_date }}</td>
|
||||
@if ($dokumenAkademik->deleted_at == '')
|
||||
@if ($dokumenAkademik->release_date <= date('Y-m-d'))
|
||||
<td>Rilis</td>
|
||||
@else
|
||||
<td>Belum Rilis</td>
|
||||
@endif
|
||||
@else ($dokumenAkademik->deleted_at != "")
|
||||
<td>Terhapus</td>
|
||||
@endif
|
||||
@if ($dokumenAkademik->deleted_at == '')
|
||||
<td>
|
||||
<button href="#formModalEdit" role="button" data-toggle="modal"
|
||||
data-id="{{ $dokumenAkademik->id }}"
|
||||
data-judul="{{ $dokumenAkademik->judul }}"
|
||||
data-nama_file="{{ $dokumenAkademik->nama_file }}"
|
||||
data-release_date="{{ $dokumenAkademik->release_date }}"
|
||||
class="btn btn-warning open-formModalEdit"><i
|
||||
class="fa fa-edit"></i> Edit</button>
|
||||
<form
|
||||
action="{{ route('dokumen_akademik.destroy', $dokumenAkademik) }}"
|
||||
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/dokumen_akademik/' . $dokumenAkademik->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/dokumen_akademik/' . $dokumenAkademik->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 Dokumen Akademik</h5>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal" aria-label="Close">X</button>
|
||||
</div>
|
||||
<form id="formAdd" action="{{ url('/admin/dokumen_akademik') }}" method="post" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="modal-body">
|
||||
<div class="form-group mt-2">
|
||||
<label for="judul">Judul</label>
|
||||
<input type="text" class="form-control mt-0" name="judul" required maxlength="255"
|
||||
placeholder=". . .">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="nama_file">File Dokumen Akademik</label>
|
||||
<input type="file" id="input_file_add" class="form-control mt-0" name="nama_file"
|
||||
required>
|
||||
</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 ($dokumenAkademiks as $dokumenAkademik)
|
||||
<!-- 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 Dokumen Akademik</h5>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal" aria-label="Close">X</button>
|
||||
</div>
|
||||
<form id="formEdit" action="{{ route('dokumen_akademik.update', $dokumenAkademik->id) }}" method="POST"
|
||||
enctype="multipart/form-data">
|
||||
@method('patch')
|
||||
@csrf
|
||||
<div class="modal-body">
|
||||
<input type="hidden" name="id" id="id">
|
||||
<div class="form-group mt-2">
|
||||
<label for="judul">Nama</label>
|
||||
<input type="text" class="form-control mt-0" name="judul" id="judul" required
|
||||
maxlength="255" placeholder=". . .">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="nama_file">File Dokumen Akademik</label>
|
||||
<input type="file" id="input_file_edit" class="form-control mt-0" name="nama_file"
|
||||
id="nama_file">
|
||||
</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_dokumen_akademik").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_dokumen_akademik_wrapper .col-md-6:eq(0)');
|
||||
});
|
||||
|
||||
$(document).on("click", ".open-formModalEdit", function() {
|
||||
var id = $(this).data('id');
|
||||
var judul = $(this).data('judul');
|
||||
var nama_file = $(this).data('nama_file');
|
||||
var release_date = $(this).data('release_date');
|
||||
|
||||
$(".modal-body #id").val(id);
|
||||
$(".modal-body #judul").val(judul);
|
||||
$(".modal-body #release_date").val(release_date);
|
||||
$(".modal-body #nama_file").val(nama_file);
|
||||
$(".modal-body #input_file_edit").val("");
|
||||
});
|
||||
|
||||
//Form add image validation
|
||||
var uploadField = document.getElementById("input_file_add");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
};
|
||||
};
|
||||
|
||||
//Form edit image validation
|
||||
var uploadField = document.getElementById("input_file_edit");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
};
|
||||
};
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,224 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Dosen')
|
||||
|
||||
@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">Dosen</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
@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 Dosen</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 Dosen
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_dosen" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nomor</th>
|
||||
<th>Nama</th>
|
||||
<th>NIP</th>
|
||||
<th>Pangkat/Golongan</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($dosens as $dosen)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $dosen->nama }}</td>
|
||||
<td>{{ $dosen->nip }}</td>
|
||||
<td>{{ $dosen->pangkat_golongan }}</td>
|
||||
<td>
|
||||
<button href="#formModalEdit" role="button" data-toggle="modal"
|
||||
data-id="{{ $dosen->id }}" data-nama="{{ $dosen->nama }}"
|
||||
data-nip="{{ $dosen->nip }}"
|
||||
data-pangkat_golongan="{{ $dosen->pangkat_golongan }}"
|
||||
class="btn btn-warning open-formModalEdit"><i
|
||||
class="fa fa-edit"></i> Edit</button>
|
||||
<form action="{{ route('dosen.destroy', $dosen) }}"
|
||||
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>
|
||||
</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 Dosen</h5>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal" aria-label="Close">X</button>
|
||||
</div>
|
||||
<form id="formAdd" action="{{ url('/admin/dosen') }}" method="post">
|
||||
@csrf
|
||||
<div class="modal-body">
|
||||
<div class="form-group mt-2">
|
||||
<label for="nama">Nama</label>
|
||||
<input type="text" class="form-control mt-0" name="nama" required maxlength="255"
|
||||
placeholder=". . .">
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="nip">NIP</label>
|
||||
<input type="text" class="form-control mt-0" name="nip" required maxlength="25"
|
||||
placeholder=". . .">
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="pangkat_golongan">Pangkat/Golongan</label>
|
||||
<input type="text" class="form-control mt-0" name="pangkat_golongan"
|
||||
required maxlength="100" placeholder=". . .">
|
||||
</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 ($dosens as $dosen)
|
||||
<!-- 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 Dosen</h5>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal" aria-label="Close">X</button>
|
||||
</div>
|
||||
<form id="formEdit" action="{{ route('dosen.update', $dosen->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">Nama</label>
|
||||
<input type="text" class="form-control mt-0" name="nama" id="nama" required maxlength="255"
|
||||
placeholder=". . .">
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="nip">NIP</label>
|
||||
<input type="text" class="form-control mt-0" name="nip" id="nip" required maxlength="25"
|
||||
placeholder=". . .">
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="pangkat_golongan">Pangkat Golongan</label>
|
||||
<input type="text" class="form-control mt-0" name="pangkat_golongan" id="pangkat_golongan"
|
||||
required maxlength="100" placeholder=". . .">
|
||||
</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_dosen").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_dosen_wrapper .col-md-6:eq(0)');
|
||||
});
|
||||
</script>
|
||||
|
||||
<!--Modal Edit -->
|
||||
<script type="text/javascript">
|
||||
$(document).on("click", ".open-formModalEdit", function() {
|
||||
var id = $(this).data('id');
|
||||
var nama = $(this).data('nama');
|
||||
var nip = $(this).data('nip');
|
||||
var pangkat_golongan = $(this).data('pangkat_golongan');
|
||||
|
||||
$(".modal-body #id").val(id);
|
||||
$(".modal-body #nama").val(nama);
|
||||
$(".modal-body #nip").val(nip);
|
||||
$(".modal-body #pangkat_golongan").val(pangkat_golongan);
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,70 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'FAQ (Frequently Asked Questions)')
|
||||
|
||||
@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">FAQ (Frequently Asked Questions)</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
|
||||
<!-- 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">Tambah Data FAQ (Frequently Asked Questions)</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<!-- form start -->
|
||||
<form class="from-prevent-multiple-submits" action="{{ route('faq.store') }}" method="POST" id="ckeditorForm"
|
||||
enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label for="question">Question</label>
|
||||
<textarea class="form-control mt-0 text-faq"
|
||||
style="width : 65vw;height:150px" name="question" required
|
||||
placeholder=". . ."></textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="answer">Answer</label>
|
||||
<textarea class="form-control mt-0" style="width : 65vw;height:150px"
|
||||
name="answer" required placeholder=". . ."></textarea>
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="status">Status</label>
|
||||
<select class="form-control mt-0" name="status" id="status" required>
|
||||
<option value="Rilis">Rilis</option>
|
||||
<option value="Tidak Rilis">Tidak Rilis</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
|
||||
<div class="card-footer">
|
||||
<button id="submit" type="submit" class="btn btn-primary from-prevent-multiple-submits">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
@@ -0,0 +1,74 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'FAQ (Frequently Asked Questions)')
|
||||
|
||||
@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">FAQ (Frequently Asked Questions)</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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">Edit Data FAQ (Frequently Asked Questions)</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<!-- form start -->
|
||||
<form class="from-prevent-multiple-submits" action="{{ route('faq.update', $faq) }}" method="POST"
|
||||
enctype="multipart/form-data">
|
||||
@method('patch')
|
||||
@csrf
|
||||
<div class="card-body">
|
||||
<input type="hidden" value="{{ $faq->id }}" name="id">
|
||||
<div class="form-group">
|
||||
<label for="question">Question</label>
|
||||
<textarea class="form-control mt-0 text-faq"
|
||||
style="width : 65vw;height:150px" name="question" required
|
||||
placeholder=". . .">{{ $faq->question }}</textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="answer">Answer</label>
|
||||
<textarea class="form-control mt-0" style="width : 65vw;height:150px"
|
||||
name="answer" required
|
||||
placeholder=". . .">{{ $faq->answer }}</textarea>
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="status">Status</label>
|
||||
<select class="form-control mt-0" name="status" id="status" required
|
||||
value="{{ $faq->status }}">
|
||||
<option value="Rilis">Rilis</option>
|
||||
<option value="Tidak Rilis">Tidak Rilis</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
|
||||
<div class="card-footer">
|
||||
<button id="submit" type="submit" class="btn btn-primary from-prevent-multiple-submits">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -0,0 +1,149 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'FAQ (Frequently Asked Questions)')
|
||||
|
||||
@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">FAQ (Frequently Asked Questions)</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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 FAQ (Frequently Asked Questions)</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-12 text-left">
|
||||
<a href="{{ url('/admin/faq/create') }}" type="button"
|
||||
class="btn btn-success mb-3">
|
||||
<i class="fa fa-plus-circle mr-2"></i>Tambah Data
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table id="tabel_faq" class="table table-bordered table-striped mt-2">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th>Question</th>
|
||||
<th>Answer</th>
|
||||
<th>Status</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@foreach ($faqs as $faq)
|
||||
<tr id="{{ $faq->id }}">
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
@if (strlen($faq->question) > 100)
|
||||
<td>
|
||||
{!! substr(strip_tags($faq->question), 0, 100) . '...' !!}
|
||||
</td>
|
||||
@else
|
||||
<td>
|
||||
{!! substr(strip_tags($faq->question), 0, 100) !!}
|
||||
</td>
|
||||
@endif
|
||||
@if (strlen($faq->answer) > 100)
|
||||
<td>
|
||||
{!! substr(strip_tags($faq->answer), 0, 100) . '...' !!}
|
||||
</td>
|
||||
@else
|
||||
<td>
|
||||
{!! substr(strip_tags($faq->answer), 0, 100) !!}
|
||||
</td>
|
||||
@endif
|
||||
<td>{{ $faq->status }}</td>
|
||||
@if ($faq->deleted_at == '')
|
||||
<td>
|
||||
<a href="{{ url('admin/faq/' . $faq->id . '/edit') }}"
|
||||
class="btn btn-warning open-formModalEdit"><i
|
||||
class="fa fa-edit"></i> Edit</a>
|
||||
<form action="{{ route('faq.destroy', $faq) }}"
|
||||
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/faq/' . $faq->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/faq/' . $faq->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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<!--Data Table -->
|
||||
<script>
|
||||
$(function() {
|
||||
$("#tabel_faq").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_faq_wrapper .col-md-6:eq(0)');
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,297 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Galeri')
|
||||
|
||||
@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">Galeri</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 Galeri</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 Galeri
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_galeri" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nomor</th>
|
||||
<th>Foto</th>
|
||||
<th>Jadwal Rilis</th>
|
||||
<th>Status</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($galeris as $galeri)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td><img src="{{ url($galeri->nama_foto) }}"
|
||||
style="width:300px;height:auto;object-fit:cover"></td>
|
||||
<td>{{ $galeri->release_date }}</td>
|
||||
@if ($galeri->deleted_at == '')
|
||||
@if ($galeri->release_date <= date('Y-m-d'))
|
||||
<td>Rilis</td>
|
||||
@else
|
||||
<td>Belum Rilis</td>
|
||||
@endif
|
||||
@else ($galeri->deleted_at != "")
|
||||
<td>Terhapus</td>
|
||||
@endif
|
||||
@if ($galeri->deleted_at == '')
|
||||
<td>
|
||||
<button href="#formModalEdit" role="button" data-toggle="modal"
|
||||
data-id="{{ $galeri->id }}"
|
||||
data-teks="{{ $galeri->teks }}"
|
||||
data-nama_foto="{{ url($galeri->nama_foto) }}"
|
||||
data-sumber="{{ $galeri->sumber }}"
|
||||
data-release_date="{{ $galeri->release_date }}"
|
||||
class="btn btn-warning open-formModalEdit"><i
|
||||
class="fa fa-edit"></i> Edit</button>
|
||||
<form action="{{ route('galeri.destroy', $galeri) }}"
|
||||
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/galeri/' . $galeri->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/galeri/' . $galeri->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 Galeri</h5>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal" aria-label="Close">X</button>
|
||||
</div>
|
||||
<form id="formAdd" action="{{ url('/admin/galeri') }}" method="post" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label for="nama_foto">Foto (Maksimal 2MB)</label>
|
||||
<div class="form-group">
|
||||
<img id="img_preview_add" style="max-width: 200px;" class="mt-2" />
|
||||
</div>
|
||||
<input type="file" accept="image/*" class="form-control mt-0" name="nama_foto"
|
||||
id="input_foto_add" required>
|
||||
</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 ($galeris as $galeri)
|
||||
<!-- 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 Galeri</h5>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal" aria-label="Close">X</button>
|
||||
</div>
|
||||
<form id="formEdit" action="{{ route('galeri.update', $galeri->id) }}" method="POST" enctype="multipart/form-data">
|
||||
@method('patch')
|
||||
@csrf
|
||||
<div class="modal-body">
|
||||
<input type="hidden" name="id" id="id">
|
||||
<div class="form-group">
|
||||
<label for="nama_foto">Foto (Maksimal 2MB)</label>
|
||||
<div class="form-group">
|
||||
<img src="" alt="Image Missing" id="old_nama_foto" style="max-width: 200px;"
|
||||
class="mt-2" />
|
||||
</div>
|
||||
<input type="file" accept="image/*" class="form-control mt-0" name="nama_foto"
|
||||
id="input_foto_edit">
|
||||
</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_galeri").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_galeri_wrapper .col-md-6:eq(0)');
|
||||
});
|
||||
|
||||
$(document).on("click", ".open-formModalEdit", function() {
|
||||
var id = $(this).data('id');
|
||||
var teks = $(this).data('teks');
|
||||
var sumber = $(this).data('sumber');
|
||||
var nama_foto = $(this).data('nama_foto');
|
||||
var release_date = $(this).data('release_date');
|
||||
|
||||
$(".modal-body #id").val(id);
|
||||
$(".modal-body #teks").val(teks);
|
||||
$(".modal-body #sumber").val(sumber);
|
||||
$(".modal-body #release_date").val(release_date);
|
||||
$(".modal-body #input_foto_edit").val("");
|
||||
$(".modal-body #old_nama_foto").attr('src', nama_foto);
|
||||
});
|
||||
|
||||
//Form add image validation
|
||||
var uploadField = document.getElementById("input_foto_add");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
} else {
|
||||
//Ubah Img Preview
|
||||
var reader = new FileReader();
|
||||
reader.onload = function() {
|
||||
var output = document.getElementById('img_preview_add');
|
||||
output.src = reader.result;
|
||||
}
|
||||
reader.readAsDataURL(event.target.files[0]);
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
//Form edit image validation
|
||||
var uploadField = document.getElementById("input_foto_edit");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
} else {
|
||||
//Ubah Img Preview
|
||||
var reader = new FileReader();
|
||||
reader.onload = function() {
|
||||
var output = document.getElementById('old_nama_foto');
|
||||
output.src = reader.result;
|
||||
}
|
||||
reader.readAsDataURL(event.target.files[0]);
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
$('.from-prevent-multiple-submits').on('submit', function(){
|
||||
$('.from-prevent-multiple-submits').attr('disabled','true');
|
||||
})
|
||||
})();
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,233 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Hasil Karya')
|
||||
|
||||
@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">Hasil Karya</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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">Tambah Data Hasil Karya</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<!-- form start -->
|
||||
<form class="from-prevent-multiple-submits" action="{{ route('hasil_karya.store') }}" method="POST" id="ckeditorForm"
|
||||
enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label for="judul">Judul</label>
|
||||
<input type="text" class="form-control" id="judul" name="judul"
|
||||
placeholder="Masukkan Judul" value="" required maxlength="255">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="nama_foto">Thumbnail (Maksimal 2MB)</label>
|
||||
<div class="form-group">
|
||||
<img id="img_preview_add" style="max-width: 200px;"
|
||||
class="mt-2" />
|
||||
</div>
|
||||
<input type="file" accept="image/*" class="form-control mt-0"
|
||||
name="thumbnail" id="input_foto_add" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="teks">Teks (Foto Maksimal 2MB)</label>
|
||||
<textarea id="teks" placeholder="Masukkan Teks" name="teks"
|
||||
class="ck_editor_txt" id="ck_editor_txt"></textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="release_date">Tanggal Rilis</label>
|
||||
<input type="date" class="form-control" name="release_date" required>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
|
||||
<div class="card-footer">
|
||||
<button id="submit" type="submit" class="btn btn-primary from-prevent-multiple-submits">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
//Define an adapter to upload the files
|
||||
class MyUploadAdapter {
|
||||
constructor(loader) {
|
||||
// The file loader instance to use during the upload. It sounds scary but do not
|
||||
// worry — the loader will be passed into the adapter later on in this guide.
|
||||
this.loader = loader;
|
||||
|
||||
// URL where to send files.
|
||||
this.url = '{{ route('ckeditor.upload') }}';
|
||||
|
||||
//
|
||||
}
|
||||
// Starts the upload process.
|
||||
upload() {
|
||||
return this.loader.file.then(
|
||||
(file) =>
|
||||
new Promise((resolve, reject) => {
|
||||
this._initRequest();
|
||||
this._initListeners(resolve, reject, file);
|
||||
this._sendRequest(file);
|
||||
})
|
||||
);
|
||||
}
|
||||
// Aborts the upload process.
|
||||
abort() {
|
||||
if (this.xhr) {
|
||||
this.xhr.abort();
|
||||
}
|
||||
}
|
||||
// Initializes the XMLHttpRequest object using the URL passed to the constructor.
|
||||
_initRequest() {
|
||||
const xhr = (this.xhr = new XMLHttpRequest());
|
||||
// Note that your request may look different. It is up to you and your editor
|
||||
// integration to choose the right communication channel. This example uses
|
||||
// a POST request with JSON as a data structure but your configuration
|
||||
// could be different.
|
||||
// xhr.open('POST', this.url, true);
|
||||
xhr.open("POST", this.url, true);
|
||||
xhr.setRequestHeader("x-csrf-token", "{{ csrf_token() }}");
|
||||
xhr.responseType = "json";
|
||||
}
|
||||
// Initializes XMLHttpRequest listeners.
|
||||
_initListeners(resolve, reject, file) {
|
||||
const xhr = this.xhr;
|
||||
const loader = this.loader;
|
||||
const genericErrorText = `Couldn't upload file: ${file.name}.`;
|
||||
xhr.addEventListener("error", () => reject(genericErrorText));
|
||||
xhr.addEventListener("abort", () => reject());
|
||||
xhr.addEventListener("load", () => {
|
||||
const response = xhr.response;
|
||||
// This example assumes the XHR server's "response" object will come with
|
||||
// an "error" which has its own "message" that can be passed to reject()
|
||||
// in the upload promise.
|
||||
//
|
||||
// Your integration may handle upload errors in a different way so make sure
|
||||
// it is done properly. The reject() function must be called when the upload fails.
|
||||
if (!response || response.error) {
|
||||
return reject(response && response.error ? response.error.message : genericErrorText);
|
||||
}
|
||||
// If the upload is successful, resolve the upload promise with an object containing
|
||||
// at least the "default" URL, pointing to the image on the server.
|
||||
// This URL will be used to display the image in the content. Learn more in the
|
||||
// UploadAdapter#upload documentation.
|
||||
resolve({
|
||||
default: response.url,
|
||||
});
|
||||
});
|
||||
// Upload progress when it is supported. The file loader has the #uploadTotal and #uploaded
|
||||
// properties which are used e.g. to display the upload progress bar in the editor
|
||||
// user interface.
|
||||
if (xhr.upload) {
|
||||
xhr.upload.addEventListener("progress", (evt) => {
|
||||
if (evt.lengthComputable) {
|
||||
loader.uploadTotal = evt.total;
|
||||
loader.uploaded = evt.loaded;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// Prepares the data and sends the request.
|
||||
_sendRequest(file) {
|
||||
// Prepare the form data.
|
||||
const data = new FormData();
|
||||
data.append("upload", file);
|
||||
// Important note: This is the right place to implement security mechanisms
|
||||
// like authentication and CSRF protection. For instance, you can use
|
||||
// XMLHttpRequest.setRequestHeader() to set the request headers containing
|
||||
// the CSRF token generated earlier by your application.
|
||||
// Send the request.
|
||||
this.xhr.send(data);
|
||||
}
|
||||
// ...
|
||||
}
|
||||
|
||||
function SimpleUploadAdapterPlugin(editor) {
|
||||
editor.plugins.get("FileRepository").createUploadAdapter = (loader) => {
|
||||
// Configure the URL to the upload script in your back-end here!
|
||||
return new MyUploadAdapter(loader);
|
||||
};
|
||||
}
|
||||
|
||||
var allEditors = document.querySelector('.ck_editor_txt');
|
||||
|
||||
//Initialize the ckeditor
|
||||
ClassicEditor.create(document.querySelector("#teks"), {
|
||||
extraPlugins: [SimpleUploadAdapterPlugin],
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
$("#ckeditorForm").submit(function(e) {
|
||||
var content = $('.ck_editor_txt').val();
|
||||
html = $(content).text();
|
||||
if ($.trim(html) == '') {
|
||||
alert("Teks Tidak Boleh Kosong!");
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
//Form add image validation
|
||||
var uploadField = document.getElementById("input_foto_add");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
} else {
|
||||
//Ubah Img Preview
|
||||
var reader = new FileReader();
|
||||
reader.onload = function() {
|
||||
var output = document.getElementById('img_preview_add');
|
||||
output.src = reader.result;
|
||||
}
|
||||
reader.readAsDataURL(event.target.files[0]);
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
$('.from-prevent-multiple-submits').on('submit', function(){
|
||||
$('.from-prevent-multiple-submits').attr('disabled','true');
|
||||
})
|
||||
})();
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,233 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Hasil Karya')
|
||||
|
||||
@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">Hasil Karya</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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">Edit Data Hasil Karya</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<!-- form start -->
|
||||
<form class="from-prevent-multiple-submits"
|
||||
action="{{ route('hasil_karya.update', $hasilKarya) }}" method="POST"
|
||||
enctype="multipart/form-data">
|
||||
@method('patch')
|
||||
@csrf
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label for="judul">Judul</label>
|
||||
<input type="text" class="form-control" id="judul" name="judul"
|
||||
maxlength="255" placeholder="Masukkan Judul"
|
||||
value="{{ $hasilKarya->judul }}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="form-group">
|
||||
<label for="nama_foto">Foto (Maksimal 2MB)</label>
|
||||
<div class="form-group">
|
||||
<img src="{{ url($hasilKarya->thumbnail) }}"
|
||||
alt="Image Missing" id="old_nama_foto"
|
||||
style="max-width: 200px;" class="mt-2" />
|
||||
</div>
|
||||
<input type="file" accept="image/*" class="form-control mt-0"
|
||||
name="thumbnail" id="input_foto_edit">
|
||||
</div>
|
||||
<input type="hidden" name="old_thumbnail"
|
||||
value="{{ $hasilKarya->thumbnail }}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="teks">Teks (Foto Maksimal 2MB)</label>
|
||||
<textarea id="teks" placeholder="Masukkan Deskripsi Video"
|
||||
name="teks">{{ $hasilKarya->teks }}</textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="release_date">Tanggal Rilis</label>
|
||||
<input type="date" class="form-control" name="release_date"
|
||||
value="{{ $hasilKarya->release_date }}" required>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
|
||||
<div class="card-footer">
|
||||
<button id="submit" type="submit"
|
||||
class="btn btn-primary from-prevent-multiple-submits">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
//Define an adapter to upload the files
|
||||
class MyUploadAdapter {
|
||||
constructor(loader) {
|
||||
// The file loader instance to use during the upload. It sounds scary but do not
|
||||
// worry — the loader will be passed into the adapter later on in this guide.
|
||||
this.loader = loader;
|
||||
|
||||
// URL where to send files.
|
||||
this.url = '{{ route('ckeditor.upload') }}';
|
||||
|
||||
//
|
||||
}
|
||||
// Starts the upload process.
|
||||
upload() {
|
||||
return this.loader.file.then(
|
||||
(file) =>
|
||||
new Promise((resolve, reject) => {
|
||||
this._initRequest();
|
||||
this._initListeners(resolve, reject, file);
|
||||
this._sendRequest(file);
|
||||
})
|
||||
);
|
||||
}
|
||||
// Aborts the upload process.
|
||||
abort() {
|
||||
if (this.xhr) {
|
||||
this.xhr.abort();
|
||||
}
|
||||
}
|
||||
// Initializes the XMLHttpRequest object using the URL passed to the constructor.
|
||||
_initRequest() {
|
||||
const xhr = (this.xhr = new XMLHttpRequest());
|
||||
// Note that your request may look different. It is up to you and your editor
|
||||
// integration to choose the right communication channel. This example uses
|
||||
// a POST request with JSON as a data structure but your configuration
|
||||
// could be different.
|
||||
// xhr.open('POST', this.url, true);
|
||||
xhr.open("POST", this.url, true);
|
||||
xhr.setRequestHeader("x-csrf-token", "{{ csrf_token() }}");
|
||||
xhr.responseType = "json";
|
||||
}
|
||||
// Initializes XMLHttpRequest listeners.
|
||||
_initListeners(resolve, reject, file) {
|
||||
const xhr = this.xhr;
|
||||
const loader = this.loader;
|
||||
const genericErrorText = `Couldn't upload file: ${file.name}.`;
|
||||
xhr.addEventListener("error", () => reject(genericErrorText));
|
||||
xhr.addEventListener("abort", () => reject());
|
||||
xhr.addEventListener("load", () => {
|
||||
const response = xhr.response;
|
||||
// This example assumes the XHR server's "response" object will come with
|
||||
// an "error" which has its own "message" that can be passed to reject()
|
||||
// in the upload promise.
|
||||
//
|
||||
// Your integration may handle upload errors in a different way so make sure
|
||||
// it is done properly. The reject() function must be called when the upload fails.
|
||||
if (!response || response.error) {
|
||||
return reject(response && response.error ? response.error.message : genericErrorText);
|
||||
}
|
||||
// If the upload is successful, resolve the upload promise with an object containing
|
||||
// at least the "default" URL, pointing to the image on the server.
|
||||
// This URL will be used to display the image in the content. Learn more in the
|
||||
// UploadAdapter#upload documentation.
|
||||
resolve({
|
||||
default: response.url,
|
||||
});
|
||||
});
|
||||
// Upload progress when it is supported. The file loader has the #uploadTotal and #uploaded
|
||||
// properties which are used e.g. to display the upload progress bar in the editor
|
||||
// user interface.
|
||||
if (xhr.upload) {
|
||||
xhr.upload.addEventListener("progress", (evt) => {
|
||||
if (evt.lengthComputable) {
|
||||
loader.uploadTotal = evt.total;
|
||||
loader.uploaded = evt.loaded;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// Prepares the data and sends the request.
|
||||
_sendRequest(file) {
|
||||
// Prepare the form data.
|
||||
const data = new FormData();
|
||||
data.append("upload", file);
|
||||
// Important note: This is the right place to implement security mechanisms
|
||||
// like authentication and CSRF protection. For instance, you can use
|
||||
// XMLHttpRequest.setRequestHeader() to set the request headers containing
|
||||
// the CSRF token generated earlier by your application.
|
||||
// Send the request.
|
||||
this.xhr.send(data);
|
||||
}
|
||||
// ...
|
||||
}
|
||||
|
||||
function SimpleUploadAdapterPlugin(editor) {
|
||||
editor.plugins.get("FileRepository").createUploadAdapter = (loader) => {
|
||||
// Configure the URL to the upload script in your back-end here!
|
||||
return new MyUploadAdapter(loader);
|
||||
};
|
||||
}
|
||||
|
||||
//Initialize the ckeditor
|
||||
ClassicEditor.create(document.querySelector("#teks"), {
|
||||
extraPlugins: [SimpleUploadAdapterPlugin],
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
//Form edit image validation
|
||||
var uploadField = document.getElementById("input_foto_edit");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
} else {
|
||||
//Ubah Img Preview
|
||||
var reader = new FileReader();
|
||||
reader.onload = function() {
|
||||
var output = document.getElementById('old_nama_foto');
|
||||
output.src = reader.result;
|
||||
}
|
||||
reader.readAsDataURL(event.target.files[0]);
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
$('.from-prevent-multiple-submits').on('submit', function() {
|
||||
$('.from-prevent-multiple-submits').attr('disabled', 'true');
|
||||
})
|
||||
})();
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,158 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Hasil Karya')
|
||||
|
||||
@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">Hasil Karya</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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 Hasil Karya</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-12 text-left">
|
||||
<a type="button" href="{{ url('/admin/hasil_karya/create') }}"
|
||||
class="btn btn-success mb-3"><i class="fa fa-plus-circle"></i>
|
||||
Tambah Data Hasil Karya
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_hasil_karya" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nomor</th>
|
||||
<th>Judul</th>
|
||||
<th>Thumbnail</th>
|
||||
<th>Teks</th>
|
||||
<th>Jadwal Rilis</th>
|
||||
<th>Status</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($hasilKaryas as $hasilKarya)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $hasilKarya->judul }}</td>
|
||||
<td>
|
||||
<img src="{{ url($hasilKarya->thumbnail) }}" alt="Image Missing"
|
||||
style="width: 100px;">
|
||||
</td>
|
||||
<td>
|
||||
@if (strlen(strip_tags($hasilKarya->teks)) > 100)
|
||||
{{ str_replace(' ', '', substr(strip_tags($hasilKarya->teks), 0, 100) . '...') }}
|
||||
@else
|
||||
{{ str_replace(' ', '', substr(strip_tags($hasilKarya->teks), 0, 100)) }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $hasilKarya->release_date }}</td>
|
||||
<td>
|
||||
@if ($hasilKarya->deleted_at != '')
|
||||
Terhapus
|
||||
@elseif ($hasilKarya->release_date > date('Y-m-d'))
|
||||
Belum Rilis
|
||||
@else
|
||||
Rilis
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($hasilKarya->deleted_at != '')
|
||||
<form
|
||||
action="{{ url('/admin/hasil_karya/' . $hasilKarya->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/hasil_karya/' . $hasilKarya->id . '/delete_permanen') }}"
|
||||
method="post">
|
||||
@csrf
|
||||
<input type="hidden" name="thumbnail"
|
||||
value="{{ $hasilKarya->thumbnail }}">
|
||||
<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>
|
||||
@else
|
||||
<a href="{{ route('hasil_karya.edit', $hasilKarya) }}"
|
||||
class="btn btn-warning open-formModalEdit">
|
||||
<i class="fa fa-edit"></i> Edit
|
||||
</a>
|
||||
<form
|
||||
action="{{ route('hasil_karya.destroy', $hasilKarya) }}"
|
||||
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>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<!--Data Table -->
|
||||
<script>
|
||||
$(function() {
|
||||
$("#tabel_hasil_karya").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_hasil_karya_wrapper .col-md-6:eq(0)');
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,282 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Himpunan Mahasiswa')
|
||||
|
||||
@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">Himpunan Mahasiswa</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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">Tambah Data Himpunan Mahasiswa</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<!-- form start -->
|
||||
<form class="from-prevent-multiple-submits"
|
||||
action="{{ route('himpunan_mahasiswa.store') }}" method="POST"
|
||||
id="ckeditorForm" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label for="nama">Nama Himpunan</label>
|
||||
<input type="text" class="form-control" id="nama" name="nama"
|
||||
maxlength="255" placeholder="Masukkan Nama Himpunan" value=""
|
||||
required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="nama_foto">Thumbnail (Maksimal 2MB)</label>
|
||||
<div class="form-group">
|
||||
<img id="img_preview_add" style="max-width: 200px;"
|
||||
class="mt-2" />
|
||||
</div>
|
||||
<input type="file" accept="image/*" class="form-control mt-0"
|
||||
name="thumbnail" id="input_foto_add" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="teks">Teks (Foto Maksimal 2MB)</label>
|
||||
<textarea id="teks" placeholder="Masukkan Teks" name="teks"
|
||||
class="ck_editor_txt" id="ck_editor_txt"></textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="facebook">Nama Pengguna Facebook</label>
|
||||
<input type="text" class="form-control" id="facebook" name="facebook"
|
||||
placeholder="Masukkan Nama Pengguna Facebook" value="">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="url_facebook">Link Facebook</label>
|
||||
<input type="text" class="form-control" id="url_facebook"
|
||||
name="url_facebook" placeholder="Masukkan Link Facebook" value="">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="instagram">Nama Pengguna Instagram</label>
|
||||
<input type="text" class="form-control" id="instagram"
|
||||
name="instagram" placeholder="Masukkan Nama Pengguna Instagram"
|
||||
value="">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="url_instagram">Link Instagram</label>
|
||||
<input type="text" class="form-control" id="url_instagram"
|
||||
name="url_instagram" placeholder="Masukkan Link Instagram" value="">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="youtube">Nama Pengguna Youtube</label>
|
||||
<input type="text" class="form-control" id="youtube" name="youtube"
|
||||
placeholder="Masukkan Nama Pengguna Youtube" value="">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="url_youtube">Link Youtube</label>
|
||||
<input type="text" class="form-control" id="url_youtube"
|
||||
name="url_youtube" placeholder="Masukkan Link Youtube" value="">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="twitter">Nama Pengguna Twitter</label>
|
||||
<input type="text" class="form-control" id="twitter" name="twitter"
|
||||
placeholder="Masukkan Nama Pengguna Twitter" value="">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="url_twitter">Link Twitter</label>
|
||||
<input type="text" class="form-control" id="url_twitter"
|
||||
name="url_twitter" placeholder="Masukkan Link Twitter" value="">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="release_date">Tanggal Rilis</label>
|
||||
<input type="date" class="form-control" name="release_date" value=""
|
||||
required>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
|
||||
<div class="card-footer">
|
||||
<button id="submit" type="submit"
|
||||
class="btn btn-primary from-prevent-multiple-submits">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
//Define an adapter to upload the files
|
||||
class MyUploadAdapter {
|
||||
constructor(loader) {
|
||||
// The file loader instance to use during the upload. It sounds scary but do not
|
||||
// worry — the loader will be passed into the adapter later on in this guide.
|
||||
this.loader = loader;
|
||||
|
||||
// URL where to send files.
|
||||
this.url = '{{ route('ckeditor.upload') }}';
|
||||
|
||||
//
|
||||
}
|
||||
// Starts the upload process.
|
||||
upload() {
|
||||
return this.loader.file.then(
|
||||
(file) =>
|
||||
new Promise((resolve, reject) => {
|
||||
this._initRequest();
|
||||
this._initListeners(resolve, reject, file);
|
||||
this._sendRequest(file);
|
||||
})
|
||||
);
|
||||
}
|
||||
// Aborts the upload process.
|
||||
abort() {
|
||||
if (this.xhr) {
|
||||
this.xhr.abort();
|
||||
}
|
||||
}
|
||||
// Initializes the XMLHttpRequest object using the URL passed to the constructor.
|
||||
_initRequest() {
|
||||
const xhr = (this.xhr = new XMLHttpRequest());
|
||||
// Note that your request may look different. It is up to you and your editor
|
||||
// integration to choose the right communication channel. This example uses
|
||||
// a POST request with JSON as a data structure but your configuration
|
||||
// could be different.
|
||||
// xhr.open('POST', this.url, true);
|
||||
xhr.open("POST", this.url, true);
|
||||
xhr.setRequestHeader("x-csrf-token", "{{ csrf_token() }}");
|
||||
xhr.responseType = "json";
|
||||
}
|
||||
// Initializes XMLHttpRequest listeners.
|
||||
_initListeners(resolve, reject, file) {
|
||||
const xhr = this.xhr;
|
||||
const loader = this.loader;
|
||||
const genericErrorText = `Couldn't upload file: ${file.name}.`;
|
||||
xhr.addEventListener("error", () => reject(genericErrorText));
|
||||
xhr.addEventListener("abort", () => reject());
|
||||
xhr.addEventListener("load", () => {
|
||||
const response = xhr.response;
|
||||
// This example assumes the XHR server's "response" object will come with
|
||||
// an "error" which has its own "message" that can be passed to reject()
|
||||
// in the upload promise.
|
||||
//
|
||||
// Your integration may handle upload errors in a different way so make sure
|
||||
// it is done properly. The reject() function must be called when the upload fails.
|
||||
if (!response || response.error) {
|
||||
return reject(response && response.error ? response.error.message : genericErrorText);
|
||||
}
|
||||
// If the upload is successful, resolve the upload promise with an object containing
|
||||
// at least the "default" URL, pointing to the image on the server.
|
||||
// This URL will be used to display the image in the content. Learn more in the
|
||||
// UploadAdapter#upload documentation.
|
||||
resolve({
|
||||
default: response.url,
|
||||
});
|
||||
});
|
||||
// Upload progress when it is supported. The file loader has the #uploadTotal and #uploaded
|
||||
// properties which are used e.g. to display the upload progress bar in the editor
|
||||
// user interface.
|
||||
if (xhr.upload) {
|
||||
xhr.upload.addEventListener("progress", (evt) => {
|
||||
if (evt.lengthComputable) {
|
||||
loader.uploadTotal = evt.total;
|
||||
loader.uploaded = evt.loaded;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// Prepares the data and sends the request.
|
||||
_sendRequest(file) {
|
||||
// Prepare the form data.
|
||||
const data = new FormData();
|
||||
data.append("upload", file);
|
||||
// Important note: This is the right place to implement security mechanisms
|
||||
// like authentication and CSRF protection. For instance, you can use
|
||||
// XMLHttpRequest.setRequestHeader() to set the request headers containing
|
||||
// the CSRF token generated earlier by your application.
|
||||
// Send the request.
|
||||
this.xhr.send(data);
|
||||
}
|
||||
// ...
|
||||
}
|
||||
|
||||
function SimpleUploadAdapterPlugin(editor) {
|
||||
editor.plugins.get("FileRepository").createUploadAdapter = (loader) => {
|
||||
// Configure the URL to the upload script in your back-end here!
|
||||
return new MyUploadAdapter(loader);
|
||||
};
|
||||
}
|
||||
|
||||
var allEditors = document.querySelector('.ck_editor_txt');
|
||||
|
||||
//Initialize the ckeditor
|
||||
ClassicEditor.create(document.querySelector("#teks"), {
|
||||
extraPlugins: [SimpleUploadAdapterPlugin],
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
$("#ckeditorForm").submit(function(e) {
|
||||
var content = $('.ck_editor_txt').val();
|
||||
html = $(content).text();
|
||||
if ($.trim(html) == '') {
|
||||
alert("Teks Tidak Boleh Kosong!");
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
//Form add image validation
|
||||
var uploadField = document.getElementById("input_foto_add");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
} else {
|
||||
//Ubah Img Preview
|
||||
var reader = new FileReader();
|
||||
reader.onload = function() {
|
||||
var output = document.getElementById('img_preview_add');
|
||||
output.src = reader.result;
|
||||
}
|
||||
reader.readAsDataURL(event.target.files[0]);
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
$('.from-prevent-multiple-submits').on('submit', function() {
|
||||
$('.from-prevent-multiple-submits').attr('disabled', 'true');
|
||||
})
|
||||
})();
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,283 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Himpunan Mahasiswa')
|
||||
|
||||
@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">Himpunan Mahasiswa</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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">Edit Data Himpunan Mahasiswa</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<!-- form start -->
|
||||
<form class="from-prevent-multiple-submits"
|
||||
action="{{ route('himpunan_mahasiswa.update', $himpunanMahasiswa) }}"
|
||||
method="POST" enctype="multipart/form-data">
|
||||
@method('patch')
|
||||
@csrf
|
||||
<div class="card-body">
|
||||
<input type="hidden" value="{{ $himpunanMahasiswa->id }}" name="id">
|
||||
<div class="form-group">
|
||||
<label for="nama">Nama Himpunan</label>
|
||||
<input type="text" class="form-control" id="nama" name="nama"
|
||||
placeholder="Masukkan Nama Himpunan" maxlength="255"
|
||||
value="{{ $himpunanMahasiswa->nama }}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="nama_foto">Thumbnail (Maksimal 2MB)</label>
|
||||
<div class="form-group">
|
||||
<img src="{{ url($himpunanMahasiswa->thumbnail) }}"
|
||||
alt="Image Missing" id="old_nama_foto" style="max-width: 200px;"
|
||||
class="mt-2" />
|
||||
</div>
|
||||
<input type="file" accept="image/*" class="form-control mt-0"
|
||||
name="thumbnail" id="input_foto_edit">
|
||||
<input type="hidden" name="old_thumbnail"
|
||||
value="{{ $himpunanMahasiswa->thumbnail }}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="teks">Teks (Foto Maksimal 2MB)</label>
|
||||
<textarea id="teks" placeholder="Masukkan Deskripsi Video"
|
||||
name="teks">{{ $himpunanMahasiswa->teks }}</textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="facebook">Nama Pengguna Facebook</label>
|
||||
<input type="text" class="form-control" id="facebook" name="facebook"
|
||||
placeholder="Masukkan Nama Pengguna Facebook"
|
||||
value="{{ $himpunanMahasiswa->facebook }}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="url_facebook">Link Facebook</label>
|
||||
<input type="text" class="form-control" id="url_facebook"
|
||||
name="url_facebook" placeholder="Masukkan Link Facebook"
|
||||
value="{{ $himpunanMahasiswa->url_facebook }}">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="instagram">Nama Pengguna Instagram</label>
|
||||
<input type="text" class="form-control" id="instagram"
|
||||
name="instagram" placeholder="Masukkan Nama Pengguna Instagram"
|
||||
value="{{ $himpunanMahasiswa->instagram }}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="url_instagram">Link Instagram</label>
|
||||
<input type="text" class="form-control" id="url_instagram"
|
||||
name="url_instagram" placeholder="Masukkan Link Instagram"
|
||||
value="{{ $himpunanMahasiswa->url_instagram }}">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="youtube">Nama Pengguna Youtube</label>
|
||||
<input type="text" class="form-control" id="youtube" name="youtube"
|
||||
placeholder="Masukkan Nama Pengguna Youtube"
|
||||
value="{{ $himpunanMahasiswa->youtube }}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="url_youtube">Link Youtube</label>
|
||||
<input type="text" class="form-control" id="url_youtube"
|
||||
name="url_youtube" placeholder="Masukkan Link Youtube"
|
||||
value="{{ $himpunanMahasiswa->url_youtube }}">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="twitter">Nama Pengguna Twitter</label>
|
||||
<input type="text" class="form-control" id="twitter" name="twitter"
|
||||
placeholder="Masukkan Nama Pengguna Twitter"
|
||||
value="{{ $himpunanMahasiswa->twitter }}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="url_twitter">Link Twitter</label>
|
||||
<input type="text" class="form-control" id="url_twitter"
|
||||
name="url_twitter" placeholder="Masukkan Link Twitter"
|
||||
value="{{ $himpunanMahasiswa->url_twitter }}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="release_date">Tanggal Rilis</label>
|
||||
<input type="date" class="form-control" name="release_date"
|
||||
value="{{ $himpunanMahasiswa->release_date }}" required>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
|
||||
<div class="card-footer">
|
||||
<button id="submit" type="submit"
|
||||
class="btn btn-primary from-prevent-multiple-submits">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
//Define an adapter to upload the files
|
||||
class MyUploadAdapter {
|
||||
constructor(loader) {
|
||||
// The file loader instance to use during the upload. It sounds scary but do not
|
||||
// worry — the loader will be passed into the adapter later on in this guide.
|
||||
this.loader = loader;
|
||||
|
||||
// URL where to send files.
|
||||
this.url = '{{ route('ckeditor.upload') }}';
|
||||
|
||||
//
|
||||
}
|
||||
// Starts the upload process.
|
||||
upload() {
|
||||
return this.loader.file.then(
|
||||
(file) =>
|
||||
new Promise((resolve, reject) => {
|
||||
this._initRequest();
|
||||
this._initListeners(resolve, reject, file);
|
||||
this._sendRequest(file);
|
||||
})
|
||||
);
|
||||
}
|
||||
// Aborts the upload process.
|
||||
abort() {
|
||||
if (this.xhr) {
|
||||
this.xhr.abort();
|
||||
}
|
||||
}
|
||||
// Initializes the XMLHttpRequest object using the URL passed to the constructor.
|
||||
_initRequest() {
|
||||
const xhr = (this.xhr = new XMLHttpRequest());
|
||||
// Note that your request may look different. It is up to you and your editor
|
||||
// integration to choose the right communication channel. This example uses
|
||||
// a POST request with JSON as a data structure but your configuration
|
||||
// could be different.
|
||||
// xhr.open('POST', this.url, true);
|
||||
xhr.open("POST", this.url, true);
|
||||
xhr.setRequestHeader("x-csrf-token", "{{ csrf_token() }}");
|
||||
xhr.responseType = "json";
|
||||
}
|
||||
// Initializes XMLHttpRequest listeners.
|
||||
_initListeners(resolve, reject, file) {
|
||||
const xhr = this.xhr;
|
||||
const loader = this.loader;
|
||||
const genericErrorText = `Couldn't upload file: ${file.name}.`;
|
||||
xhr.addEventListener("error", () => reject(genericErrorText));
|
||||
xhr.addEventListener("abort", () => reject());
|
||||
xhr.addEventListener("load", () => {
|
||||
const response = xhr.response;
|
||||
// This example assumes the XHR server's "response" object will come with
|
||||
// an "error" which has its own "message" that can be passed to reject()
|
||||
// in the upload promise.
|
||||
//
|
||||
// Your integration may handle upload errors in a different way so make sure
|
||||
// it is done properly. The reject() function must be called when the upload fails.
|
||||
if (!response || response.error) {
|
||||
return reject(response && response.error ? response.error.message : genericErrorText);
|
||||
}
|
||||
// If the upload is successful, resolve the upload promise with an object containing
|
||||
// at least the "default" URL, pointing to the image on the server.
|
||||
// This URL will be used to display the image in the content. Learn more in the
|
||||
// UploadAdapter#upload documentation.
|
||||
resolve({
|
||||
default: response.url,
|
||||
});
|
||||
});
|
||||
// Upload progress when it is supported. The file loader has the #uploadTotal and #uploaded
|
||||
// properties which are used e.g. to display the upload progress bar in the editor
|
||||
// user interface.
|
||||
if (xhr.upload) {
|
||||
xhr.upload.addEventListener("progress", (evt) => {
|
||||
if (evt.lengthComputable) {
|
||||
loader.uploadTotal = evt.total;
|
||||
loader.uploaded = evt.loaded;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// Prepares the data and sends the request.
|
||||
_sendRequest(file) {
|
||||
// Prepare the form data.
|
||||
const data = new FormData();
|
||||
data.append("upload", file);
|
||||
// Important note: This is the right place to implement security mechanisms
|
||||
// like authentication and CSRF protection. For instance, you can use
|
||||
// XMLHttpRequest.setRequestHeader() to set the request headers containing
|
||||
// the CSRF token generated earlier by your application.
|
||||
// Send the request.
|
||||
this.xhr.send(data);
|
||||
}
|
||||
// ...
|
||||
}
|
||||
|
||||
function SimpleUploadAdapterPlugin(editor) {
|
||||
editor.plugins.get("FileRepository").createUploadAdapter = (loader) => {
|
||||
// Configure the URL to the upload script in your back-end here!
|
||||
return new MyUploadAdapter(loader);
|
||||
};
|
||||
}
|
||||
|
||||
//Initialize the ckeditor
|
||||
ClassicEditor.create(document.querySelector("#teks"), {
|
||||
extraPlugins: [SimpleUploadAdapterPlugin],
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
//Form edit image validation
|
||||
var uploadField = document.getElementById("input_foto_edit");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
} else {
|
||||
//Ubah Img Preview
|
||||
var reader = new FileReader();
|
||||
reader.onload = function() {
|
||||
var output = document.getElementById('old_nama_foto');
|
||||
output.src = reader.result;
|
||||
}
|
||||
reader.readAsDataURL(event.target.files[0]);
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
$('.from-prevent-multiple-submits').on('submit', function() {
|
||||
$('.from-prevent-multiple-submits').attr('disabled', 'true');
|
||||
})
|
||||
})();
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,174 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Himpunan Mahasiswa')
|
||||
|
||||
@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">Himpunan Mahasiswa</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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 Himpunan Mahasiswa</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-12 text-left">
|
||||
<a type="button" href="{{ url('/admin/himpunan_mahasiswa/create') }}"
|
||||
class="btn btn-success mb-3"><i class="fa fa-plus-circle"></i>
|
||||
Tambah Data Himpunan Mahasiswa
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_himpunan_mahasiswa" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nomor</th>
|
||||
<th>Judul</th>
|
||||
<th>Thumbnail</th>
|
||||
<th>Teks</th>
|
||||
<th>Nama Pengguna Facebook</th>
|
||||
<th>Link Facebook</th>
|
||||
<th>Nama Pengguna Instagram</th>
|
||||
<th>Link Instagram</th>
|
||||
<th>Nama Pengguna Youtube</th>
|
||||
<th>Link Youtube</th>
|
||||
<th>Nama Pengguna Twitter</th>
|
||||
<th>Link Twitter</th>
|
||||
<th>Jadwal Rilis</th>
|
||||
<th>Status</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($himpunanMahasiswas as $himpunanMahasiswa)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $himpunanMahasiswa->nama }}</td>
|
||||
<td>
|
||||
<img src="{{ url($himpunanMahasiswa->thumbnail) }}"
|
||||
alt="Image Missing" style="width: 100px;">
|
||||
</td>
|
||||
<td>
|
||||
@if (strlen(strip_tags($himpunanMahasiswa->teks)) > 100)
|
||||
{{ str_replace(' ', '', substr(strip_tags($himpunanMahasiswa->teks), 0, 100) . '...') }}
|
||||
@else
|
||||
{{ str_replace(' ', '', substr(strip_tags($himpunanMahasiswa->teks), 0, 100)) }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $himpunanMahasiswa->facebook }}</td>
|
||||
<td>{{ $himpunanMahasiswa->url_facebook }}</td>
|
||||
<td>{{ $himpunanMahasiswa->instagram }}</td>
|
||||
<td>{{ $himpunanMahasiswa->url_instagram }}</td>
|
||||
<td>{{ $himpunanMahasiswa->youtube }}</td>
|
||||
<td>{{ $himpunanMahasiswa->url_youtube }}</td>
|
||||
<td>{{ $himpunanMahasiswa->twitter }}</td>
|
||||
<td>{{ $himpunanMahasiswa->url_twitter }}</td>
|
||||
<td>{{ $himpunanMahasiswa->release_date }}</td>
|
||||
<td>
|
||||
@if ($himpunanMahasiswa->deleted_at != '')
|
||||
Terhapus
|
||||
@elseif ($himpunanMahasiswa->release_date > date('Y-m-d'))
|
||||
Belum Rilis
|
||||
@else
|
||||
Rilis
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($himpunanMahasiswa->deleted_at != '')
|
||||
<form
|
||||
action="{{ url('/admin/himpunan_mahasiswa/' . $himpunanMahasiswa->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/himpunan_mahasiswa/' . $himpunanMahasiswa->id . '/delete_permanen') }}"
|
||||
method="post">
|
||||
@csrf
|
||||
<input type="hidden" name="thumbnail"
|
||||
value="{{ $himpunanMahasiswa->thumbnail }}">
|
||||
<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>
|
||||
@else
|
||||
<a href="{{ route('himpunan_mahasiswa.edit', $himpunanMahasiswa) }}"
|
||||
class="btn btn-warning open-formModalEdit">
|
||||
<i class="fa fa-edit"></i> Edit
|
||||
</a>
|
||||
<form
|
||||
action="{{ route('himpunan_mahasiswa.destroy', $himpunanMahasiswa) }}"
|
||||
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>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<!--Data Table -->
|
||||
<script>
|
||||
$(function() {
|
||||
$("#tabel_himpunan_mahasiswa").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_himpunan_mahasiswa_wrapper .col-md-6:eq(0)');
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,221 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Informasi Beasiswa')
|
||||
|
||||
@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">Informasi Beasiswa</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
|
||||
<!-- 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">Tambah Data Informasi Beasiswa</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<!-- form start -->
|
||||
<form class="from-prevent-multiple-submits" action="{{ route('informasi_beasiswa.store') }}" method="POST" id="ckeditorForm"
|
||||
enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label for="judul">Judul</label>
|
||||
<input type="text" class="form-control" id="judul" name="judul"
|
||||
placeholder="Masukkan Judul" value="" required maxlength="255">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="nama_foto">Thumbnail (Maksimal 2MB)</label>
|
||||
<div class="form-group">
|
||||
<img id="img_preview_add" style="max-width: 200px;"
|
||||
class="mt-2" />
|
||||
</div>
|
||||
<input type="file" accept="image/*" class="form-control mt-0"
|
||||
name="thumbnail" id="input_foto_add" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="teks">Teks (Foto Maksimal 2MB)</label>
|
||||
<textarea id="teks" placeholder="Masukkan Teks Informasi Beasiswa"
|
||||
name="teks" class="ck_editor_txt" id="ck_editor_txt"></textarea>
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="release_date">Tanggal Rilis</label>
|
||||
<input type="date" class="form-control mt-0" name="release_date" required>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
|
||||
<div class="card-footer">
|
||||
<button id="submit" type="submit" class="btn btn-primary from-prevent-multiple-submits">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
//Define an adapter to upload the files
|
||||
class MyUploadAdapter {
|
||||
constructor(loader) {
|
||||
// The file loader instance to use during the upload. It sounds scary but do not
|
||||
// worry — the loader will be passed into the adapter later on in this guide.
|
||||
this.loader = loader;
|
||||
|
||||
// URL where to send files.
|
||||
this.url = '{{ route('ckeditor.upload') }}';
|
||||
|
||||
//
|
||||
}
|
||||
// Starts the upload process.
|
||||
upload() {
|
||||
return this.loader.file.then(
|
||||
(file) =>
|
||||
new Promise((resolve, reject) => {
|
||||
this._initRequest();
|
||||
this._initListeners(resolve, reject, file);
|
||||
this._sendRequest(file);
|
||||
})
|
||||
);
|
||||
}
|
||||
// Aborts the upload process.
|
||||
abort() {
|
||||
if (this.xhr) {
|
||||
this.xhr.abort();
|
||||
}
|
||||
}
|
||||
// Initializes the XMLHttpRequest object using the URL passed to the constructor.
|
||||
_initRequest() {
|
||||
const xhr = (this.xhr = new XMLHttpRequest());
|
||||
// Note that your request may look different. It is up to you and your editor
|
||||
// integration to choose the right communication channel. This example uses
|
||||
// a POST request with JSON as a data structure but your configuration
|
||||
// could be different.
|
||||
// xhr.open('POST', this.url, true);
|
||||
xhr.open("POST", this.url, true);
|
||||
xhr.setRequestHeader("x-csrf-token", "{{ csrf_token() }}");
|
||||
xhr.responseType = "json";
|
||||
}
|
||||
// Initializes XMLHttpRequest listeners.
|
||||
_initListeners(resolve, reject, file) {
|
||||
const xhr = this.xhr;
|
||||
const loader = this.loader;
|
||||
const genericErrorText = `Couldn't upload file: ${file.name}.`;
|
||||
xhr.addEventListener("error", () => reject(genericErrorText));
|
||||
xhr.addEventListener("abort", () => reject());
|
||||
xhr.addEventListener("load", () => {
|
||||
const response = xhr.response;
|
||||
// This example assumes the XHR server's "response" object will come with
|
||||
// an "error" which has its own "message" that can be passed to reject()
|
||||
// in the upload promise.
|
||||
//
|
||||
// Your integration may handle upload errors in a different way so make sure
|
||||
// it is done properly. The reject() function must be called when the upload fails.
|
||||
if (!response || response.error) {
|
||||
return reject(response && response.error ? response.error.message : genericErrorText);
|
||||
}
|
||||
// If the upload is successful, resolve the upload promise with an object containing
|
||||
// at least the "default" URL, pointing to the image on the server.
|
||||
// This URL will be used to display the image in the content. Learn more in the
|
||||
// UploadAdapter#upload documentation.
|
||||
resolve({
|
||||
default: response.url,
|
||||
});
|
||||
});
|
||||
// Upload progress when it is supported. The file loader has the #uploadTotal and #uploaded
|
||||
// properties which are used e.g. to display the upload progress bar in the editor
|
||||
// user interface.
|
||||
if (xhr.upload) {
|
||||
xhr.upload.addEventListener("progress", (evt) => {
|
||||
if (evt.lengthComputable) {
|
||||
loader.uploadTotal = evt.total;
|
||||
loader.uploaded = evt.loaded;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// Prepares the data and sends the request.
|
||||
_sendRequest(file) {
|
||||
// Prepare the form data.
|
||||
const data = new FormData();
|
||||
data.append("upload", file);
|
||||
// Important note: This is the right place to implement security mechanisms
|
||||
// like authentication and CSRF protection. For instance, you can use
|
||||
// XMLHttpRequest.setRequestHeader() to set the request headers containing
|
||||
// the CSRF token generated earlier by your application.
|
||||
// Send the request.
|
||||
this.xhr.send(data);
|
||||
}
|
||||
// ...
|
||||
}
|
||||
|
||||
function SimpleUploadAdapterPlugin(editor) {
|
||||
editor.plugins.get("FileRepository").createUploadAdapter = (loader) => {
|
||||
// Configure the URL to the upload script in your back-end here!
|
||||
return new MyUploadAdapter(loader);
|
||||
};
|
||||
}
|
||||
|
||||
var allEditors = document.querySelector('.ck_editor_txt');
|
||||
|
||||
//Initialize the ckeditor
|
||||
ClassicEditor.create(document.querySelector("#teks"), {
|
||||
extraPlugins: [SimpleUploadAdapterPlugin],
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
$("#ckeditorForm").submit(function(e) {
|
||||
var content = $('.ck_editor_txt').val();
|
||||
html = $(content).text();
|
||||
if ($.trim(html) == '') {
|
||||
alert("Teks Tidak Boleh Kosong!");
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
//Form add image validation
|
||||
var uploadField = document.getElementById("input_foto_add");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
} else {
|
||||
//Ubah Img Preview
|
||||
var reader = new FileReader();
|
||||
reader.onload = function() {
|
||||
var output = document.getElementById('img_preview_add');
|
||||
output.src = reader.result;
|
||||
}
|
||||
reader.readAsDataURL(event.target.files[0]);
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
$('.from-prevent-multiple-submits').on('submit', function(){
|
||||
$('.from-prevent-multiple-submits').attr('disabled','true');
|
||||
})
|
||||
})();
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,226 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Informasi Beasiswa')
|
||||
|
||||
@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">Informasi Beasiswa</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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">Edit Data Informasi Beasiswa</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<!-- form start -->
|
||||
<form class="from-prevent-multiple-submits"
|
||||
action="{{ route('informasi_beasiswa.update', $informasiBeasiswa) }}"
|
||||
method="POST" enctype="multipart/form-data">
|
||||
@method('patch')
|
||||
@csrf
|
||||
<div class="card-body">
|
||||
<input type="hidden" value="{{ $informasiBeasiswa->id }}" name="id">
|
||||
<div class="form-group">
|
||||
<label for="judul">Judul</label>
|
||||
<input type="text" class="form-control" id="judul" name="judul"
|
||||
maxlength="255" placeholder="Masukkan Judul"
|
||||
value="{{ $informasiBeasiswa->judul }}" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="nama_foto">Thumbnail (Maksimal 2MB)</label>
|
||||
<div class="form-group">
|
||||
<img src="{{ url($informasiBeasiswa->thumbnail) }}"
|
||||
alt="Image Missing" id="old_nama_foto" style="max-width: 200px;"
|
||||
class="mt-2" />
|
||||
</div>
|
||||
<input type="file" accept="image/*" class="form-control mt-0"
|
||||
name="thumbnail" id="input_foto_edit">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="teks">Teks (Foto Maksimal 2MB)</label>
|
||||
<textarea id="teks" placeholder="Masukkan Deskripsi Video"
|
||||
name="teks">{{ $informasiBeasiswa->teks }}</textarea>
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="release_date">Tanggal Rilis</label>
|
||||
<input type="date" class="form-control mt-0" name="release_date"
|
||||
value="{{ $informasiBeasiswa->release_date }}" required>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
|
||||
<div class="card-footer">
|
||||
<button id="submit" type="submit"
|
||||
class="btn btn-primary from-prevent-multiple-submits">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
//Define an adapter to upload the files
|
||||
class MyUploadAdapter {
|
||||
constructor(loader) {
|
||||
// The file loader instance to use during the upload. It sounds scary but do not
|
||||
// worry — the loader will be passed into the adapter later on in this guide.
|
||||
this.loader = loader;
|
||||
|
||||
// URL where to send files.
|
||||
this.url = '{{ route('ckeditor.upload') }}';
|
||||
|
||||
//
|
||||
}
|
||||
// Starts the upload process.
|
||||
upload() {
|
||||
return this.loader.file.then(
|
||||
(file) =>
|
||||
new Promise((resolve, reject) => {
|
||||
this._initRequest();
|
||||
this._initListeners(resolve, reject, file);
|
||||
this._sendRequest(file);
|
||||
})
|
||||
);
|
||||
}
|
||||
// Aborts the upload process.
|
||||
abort() {
|
||||
if (this.xhr) {
|
||||
this.xhr.abort();
|
||||
}
|
||||
}
|
||||
// Initializes the XMLHttpRequest object using the URL passed to the constructor.
|
||||
_initRequest() {
|
||||
const xhr = (this.xhr = new XMLHttpRequest());
|
||||
// Note that your request may look different. It is up to you and your editor
|
||||
// integration to choose the right communication channel. This example uses
|
||||
// a POST request with JSON as a data structure but your configuration
|
||||
// could be different.
|
||||
// xhr.open('POST', this.url, true);
|
||||
xhr.open("POST", this.url, true);
|
||||
xhr.setRequestHeader("x-csrf-token", "{{ csrf_token() }}");
|
||||
xhr.responseType = "json";
|
||||
}
|
||||
// Initializes XMLHttpRequest listeners.
|
||||
_initListeners(resolve, reject, file) {
|
||||
const xhr = this.xhr;
|
||||
const loader = this.loader;
|
||||
const genericErrorText = `Couldn't upload file: ${file.name}.`;
|
||||
xhr.addEventListener("error", () => reject(genericErrorText));
|
||||
xhr.addEventListener("abort", () => reject());
|
||||
xhr.addEventListener("load", () => {
|
||||
const response = xhr.response;
|
||||
// This example assumes the XHR server's "response" object will come with
|
||||
// an "error" which has its own "message" that can be passed to reject()
|
||||
// in the upload promise.
|
||||
//
|
||||
// Your integration may handle upload errors in a different way so make sure
|
||||
// it is done properly. The reject() function must be called when the upload fails.
|
||||
if (!response || response.error) {
|
||||
return reject(response && response.error ? response.error.message : genericErrorText);
|
||||
}
|
||||
// If the upload is successful, resolve the upload promise with an object containing
|
||||
// at least the "default" URL, pointing to the image on the server.
|
||||
// This URL will be used to display the image in the content. Learn more in the
|
||||
// UploadAdapter#upload documentation.
|
||||
resolve({
|
||||
default: response.url,
|
||||
});
|
||||
});
|
||||
// Upload progress when it is supported. The file loader has the #uploadTotal and #uploaded
|
||||
// properties which are used e.g. to display the upload progress bar in the editor
|
||||
// user interface.
|
||||
if (xhr.upload) {
|
||||
xhr.upload.addEventListener("progress", (evt) => {
|
||||
if (evt.lengthComputable) {
|
||||
loader.uploadTotal = evt.total;
|
||||
loader.uploaded = evt.loaded;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// Prepares the data and sends the request.
|
||||
_sendRequest(file) {
|
||||
// Prepare the form data.
|
||||
const data = new FormData();
|
||||
data.append("upload", file);
|
||||
// Important note: This is the right place to implement security mechanisms
|
||||
// like authentication and CSRF protection. For instance, you can use
|
||||
// XMLHttpRequest.setRequestHeader() to set the request headers containing
|
||||
// the CSRF token generated earlier by your application.
|
||||
// Send the request.
|
||||
this.xhr.send(data);
|
||||
}
|
||||
// ...
|
||||
}
|
||||
|
||||
function SimpleUploadAdapterPlugin(editor) {
|
||||
editor.plugins.get("FileRepository").createUploadAdapter = (loader) => {
|
||||
// Configure the URL to the upload script in your back-end here!
|
||||
return new MyUploadAdapter(loader);
|
||||
};
|
||||
}
|
||||
|
||||
//Initialize the ckeditor
|
||||
ClassicEditor.create(document.querySelector("#teks"), {
|
||||
extraPlugins: [SimpleUploadAdapterPlugin],
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
$("#ckeditorForm").submit(function(e) {
|
||||
var content = $('.ck_editor_txt').val();
|
||||
html = $(content).text();
|
||||
if ($.trim(html) == '') {
|
||||
alert("Teks Tidak Boleh Kosong!");
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
//Form edit image validation
|
||||
var uploadField = document.getElementById("input_foto_edit");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
} else {
|
||||
//Ubah Img Preview
|
||||
var reader = new FileReader();
|
||||
reader.onload = function() {
|
||||
var output = document.getElementById('old_nama_foto');
|
||||
output.src = reader.result;
|
||||
}
|
||||
reader.readAsDataURL(event.target.files[0]);
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
$('.from-prevent-multiple-submits').on('submit', function() {
|
||||
$('.from-prevent-multiple-submits').attr('disabled', 'true');
|
||||
})
|
||||
})();
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,155 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Informasi Beasiswa')
|
||||
|
||||
@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">Informasi Beasiswa</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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 Informasi Beasiswa</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-12 text-left">
|
||||
<a href="{{ url('/admin/informasi_beasiswa/create') }}" type="button"
|
||||
class="btn btn-success mb-3">
|
||||
<i class="fa fa-plus-circle mr-2"></i>Tambah Data
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table id="tabel_informasi_beasiswa" class="table table-bordered table-striped mt-2">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th>Judul</th>
|
||||
<th>Thumbnail</th>
|
||||
<th>Teks</th>
|
||||
<th>Jadwal Rilis</th>
|
||||
<th>Status</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@foreach ($informasiBeasiswas as $informasiBeasiswa)
|
||||
<tr id="{{ $informasiBeasiswa->id }}">
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $informasiBeasiswa->judul }}</td>
|
||||
<td><img src="{{ url($informasiBeasiswa->thumbnail) }}"
|
||||
style="width:100px">
|
||||
</td>
|
||||
<td>
|
||||
@if (strlen(strip_tags($informasiBeasiswa->teks)) > 100)
|
||||
{{ str_replace(' ', '', substr(strip_tags($informasiBeasiswa->teks), 0, 100) . '...') }}
|
||||
@else
|
||||
{{ str_replace(' ', '', substr(strip_tags($informasiBeasiswa->teks), 0, 100)) }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $informasiBeasiswa->release_date }}</td>
|
||||
@if ($informasiBeasiswa->deleted_at == '')
|
||||
@if ($informasiBeasiswa->release_date <= date('Y-m-d'))
|
||||
<td>Rilis</td>
|
||||
@else
|
||||
<td>Belum Rilis</td>
|
||||
@endif
|
||||
@else
|
||||
($informasiBeasiswa->deleted_at != "")
|
||||
<td>Terhapus</td>
|
||||
@endif
|
||||
@if ($informasiBeasiswa->deleted_at == '')
|
||||
<td>
|
||||
<a href="{{ route('informasi_beasiswa.edit', $informasiBeasiswa) }}"
|
||||
class="btn btn-warning open-formModalEdit"><i
|
||||
class="fa fa-edit"></i> Edit</a>
|
||||
<form
|
||||
action="{{ route('informasi_beasiswa.destroy', $informasiBeasiswa) }}"
|
||||
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/informasi_beasiswa/' . $informasiBeasiswa->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/informasi_beasiswa/' . $informasiBeasiswa->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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<!--Data Table -->
|
||||
<script>
|
||||
$(function() {
|
||||
$("#tabel_informasi_beasiswa").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_informasi_beasiswa_wrapper .col-md-6:eq(0)');
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,254 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Jurnal')
|
||||
|
||||
@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">Jurnal</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 Jurnal</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 Jurnal
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_jurnal" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nomor</th>
|
||||
<th>Nama Jurnal</th>
|
||||
<th>Link Jurnal</th>
|
||||
<th>Jadwal Rilis</th>
|
||||
<th>Status</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($jurnals as $jurnal)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $jurnal->nama }}</td>
|
||||
<td><a href="{{ $jurnal->url }}" download
|
||||
target="_blank">{{ $jurnal->url }}</a></td>
|
||||
<td>{{ $jurnal->release_date }}</td>
|
||||
@if ($jurnal->deleted_at == '')
|
||||
@if ($jurnal->release_date <= date('Y-m-d'))
|
||||
<td>Rilis</td>
|
||||
@else
|
||||
<td>Belum Rilis</td>
|
||||
@endif
|
||||
@else ($jurnal->deleted_at != "")
|
||||
<td>Terhapus</td>
|
||||
@endif
|
||||
@if ($jurnal->deleted_at == '')
|
||||
<td>
|
||||
<button href="#formModalEdit" role="button" data-toggle="modal"
|
||||
data-id="{{ $jurnal->id }}"
|
||||
data-nama="{{ $jurnal->nama }}"
|
||||
data-url="{{ $jurnal->url }}"
|
||||
data-release_date="{{ $jurnal->release_date }}"
|
||||
class="btn btn-warning open-formModalEdit"><i
|
||||
class="fa fa-edit"></i> Edit</button>
|
||||
<form action="{{ route('jurnal.destroy', $jurnal) }}"
|
||||
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/jurnal/' . $jurnal->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/jurnal/' . $jurnal->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 Jurnal</h5>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal" aria-label="Close">X</button>
|
||||
</div>
|
||||
<form id="formAdd" action="{{ url('/admin/jurnal') }}" method="post" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="modal-body">
|
||||
<div class="form-group mt-2">
|
||||
<label for="nama">Nama Jurnal</label>
|
||||
<input type="text" class="form-control mt-0" name="nama" required maxlength="255"
|
||||
placeholder=". . .">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="url">Link Jurnal</label>
|
||||
<input type="text" class="form-control mt-0" name="url" required 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 ($jurnals as $jurnal)
|
||||
<!-- 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 Jurnal</h5>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal" aria-label="Close">X</button>
|
||||
</div>
|
||||
<form id="formEdit" action="{{ route('jurnal.update', $jurnal->id) }}" method="POST" enctype="multipart/form-data">
|
||||
@method('patch')
|
||||
@csrf
|
||||
<div class="modal-body">
|
||||
<input type="hidden" name="id" id="id">
|
||||
<div class="form-group mt-2">
|
||||
<label for="nama">Nama Jurnal</label>
|
||||
<input type="text" class="form-control mt-0" name="nama" id="nama" required maxlength="255"
|
||||
placeholder=". . .">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="url">Link Jurnal</label>
|
||||
<input type="text" class="form-control mt-0" name="url" id="url" required
|
||||
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_jurnal").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_jurnal_wrapper .col-md-6:eq(0)');
|
||||
});
|
||||
|
||||
$(document).on("click", ".open-formModalEdit", function() {
|
||||
var id = $(this).data('id');
|
||||
var nama = $(this).data('nama');
|
||||
var url = $(this).data('url');
|
||||
var release_date = $(this).data('release_date');
|
||||
|
||||
$(".modal-body #id").val(id);
|
||||
$(".modal-body #nama").val(nama);
|
||||
$(".modal-body #release_date").val(release_date);
|
||||
$(".modal-body #url").val(url);
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,283 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Kalender Akademik')
|
||||
|
||||
@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">Kalender Akademik</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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 Kalender Akademik</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<a type="button" href="#formModalAdd" data-toggle="modal"
|
||||
class="btn btn-success mb-3"><i class="fa fa-plus-circle"></i>
|
||||
Tambah Data Kalender Akademik
|
||||
</a>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_kalender_akademik" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nomor</th>
|
||||
<th>Judul</th>
|
||||
<th>PDF</th>
|
||||
<th>Jadwal Rilis</th>
|
||||
<th>Status</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($kalenderAkademiks as $kalenderAkademik)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $kalenderAkademik->judul }}</td>
|
||||
<td>
|
||||
<a href="{{ url($kalenderAkademik->nama_file) }}"
|
||||
target="_blank">{{ $kalenderAkademik->nama_file }}</a>
|
||||
</td>
|
||||
<td>{{ $kalenderAkademik->release_date }}</td>
|
||||
<td>
|
||||
@if ($kalenderAkademik->deleted_at != '')
|
||||
Terhapus
|
||||
@elseif ($kalenderAkademik->release_date > date('Y-m-d'))
|
||||
Belum Rilis
|
||||
@else
|
||||
Rilis
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($kalenderAkademik->deleted_at != '')
|
||||
<form
|
||||
action="{{ url('/admin/kalender_akademik/' . $kalenderAkademik->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/kalender_akademik/' . $kalenderAkademik->id . '/delete_permanen') }}"
|
||||
method="post">
|
||||
@csrf
|
||||
<input type="hidden" name="nama_file"
|
||||
value="{{ $kalenderAkademik->nama_file }}">
|
||||
<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>
|
||||
@else
|
||||
<button href="#formModalEdit" role="button" data-toggle="modal"
|
||||
data-id="{{ $kalenderAkademik->id }}"
|
||||
data-judul="{{ $kalenderAkademik->judul }}"
|
||||
data-release_date="{{ $kalenderAkademik->release_date }}"
|
||||
data-old_file="{{ $kalenderAkademik->nama_file }}"
|
||||
class="btn btn-warning open-formModalEdit"><i
|
||||
class="fa fa-edit"></i> Edit</button>
|
||||
<form
|
||||
action="{{ route('kalender_akademik.destroy', $kalenderAkademik) }}"
|
||||
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>
|
||||
@endif
|
||||
</td>
|
||||
</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 Kalender Akademik</h5>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal" aria-label="Close">X</button>
|
||||
</div>
|
||||
<form id="formAdd" action="{{ url('/admin/kalender_akademik') }}" method="post"
|
||||
enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="modal-body">
|
||||
<div class="form-group mt-2">
|
||||
<label for="judul">Judul</label>
|
||||
<input type="text" class="form-control" name="judul" placeholder="Masukkan Judul" value=""
|
||||
required maxlength="255">
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="nama_file">PDF (Maksimal 2MB)</label>
|
||||
<input type="file" id="input_pdf_add" class="form-control" name="nama_file" required
|
||||
accept="application/pdf">
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="release_date">Tanggal Rilis</label>
|
||||
<input type="date" class="form-control" 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 ($kalenderAkademiks as $kalenderAkademik)
|
||||
<!-- 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 Kalender Akademik</h5>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal" aria-label="Close">X</button>
|
||||
</div>
|
||||
<form id="formEdit" action="{{ route('kalender_akademik.update', $kalenderAkademik->id) }}"
|
||||
method="POST" enctype="multipart/form-data">
|
||||
@method('patch')
|
||||
@csrf
|
||||
<div class="modal-body">
|
||||
<input type="hidden" name="id" id="id">
|
||||
<div class="form-group">
|
||||
<label for="judul">Judul</label>
|
||||
<input type="text" class="form-control mt-0" id="judul" name="judul" maxlength="255"
|
||||
placeholder="Masukkan Judul">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="nama_file">PDF (Maksimal 2MB)</label>
|
||||
<input type="file" id="input_pdf_edit" class="form-control mt-0" name="nama_file"
|
||||
accept="application/pdf">
|
||||
<input type="hidden" name="old_file" id="old_file"
|
||||
value="{{ $kalenderAkademik->nama_file }}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="release_date">Tanggal 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_kalender_akademik").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_kalender_akademik_wrapper .col-md-6:eq(0)');
|
||||
});
|
||||
</script>
|
||||
|
||||
<!--Modal Edit -->
|
||||
<script type="text/javascript">
|
||||
$(document).on("click", ".open-formModalEdit", function() {
|
||||
var id = $(this).data('id');
|
||||
var judul = $(this).data('judul');
|
||||
var release_date = $(this).data('release_date');
|
||||
var old_file = $(this).data('old_file');
|
||||
|
||||
$(".modal-body #id").val(id);
|
||||
$(".modal-body #judul").val(judul);
|
||||
$(".modal-body #release_date").val(release_date);
|
||||
$(".modal-body #input_pdf_edit").val("");
|
||||
$(".modal-body #old_file").val(old_file);
|
||||
});
|
||||
|
||||
//Form add image validation
|
||||
var uploadField = document.getElementById("input_pdf_add");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
};
|
||||
};
|
||||
|
||||
//Form edit image validation
|
||||
var uploadField = document.getElementById("input_pdf_edit");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
};
|
||||
};
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,234 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Kegiatan Eksternal Kampus')
|
||||
|
||||
@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">Kegiatan Eksternal Kampus</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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">Tambah Data Kegiatan Eksternal Kampus</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<!-- form start -->
|
||||
<form class="from-prevent-multiple-submits" action="{{ route('kegiatan_eksternal_kampus.store') }}" method="POST"
|
||||
id="ckeditorForm" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label for="judul">Judul</label>
|
||||
<input type="text" class="form-control" id="judul" name="judul"
|
||||
placeholder="Masukkan Judul" value="" required maxlength="255">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="nama_foto">Thumbnail (Maksimal 2MB)</label>
|
||||
<div class="form-group">
|
||||
<img id="img_preview_add" style="max-width: 200px;"
|
||||
class="mt-2" />
|
||||
</div>
|
||||
<input type="file" accept="image/*" class="form-control mt-0"
|
||||
name="thumbnail" id="input_foto_add" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="teks">Teks (Foto Maksimal 2MB)</label>
|
||||
<textarea id="teks" placeholder="Masukkan Teks" name="teks"
|
||||
class="ck_editor_txt" id="ck_editor_txt"></textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="release_date">Tanggal Rilis</label>
|
||||
<input type="date" class="form-control" name="release_date" required>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
|
||||
<div class="card-footer">
|
||||
<button id="submit" type="submit" class="btn btn-primary from-prevent-multiple-submits">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
//Define an adapter to upload the files
|
||||
class MyUploadAdapter {
|
||||
constructor(loader) {
|
||||
// The file loader instance to use during the upload. It sounds scary but do not
|
||||
// worry — the loader will be passed into the adapter later on in this guide.
|
||||
this.loader = loader;
|
||||
|
||||
// URL where to send files.
|
||||
this.url = '{{ route('ckeditor.upload') }}';
|
||||
|
||||
//
|
||||
}
|
||||
// Starts the upload process.
|
||||
upload() {
|
||||
return this.loader.file.then(
|
||||
(file) =>
|
||||
new Promise((resolve, reject) => {
|
||||
this._initRequest();
|
||||
this._initListeners(resolve, reject, file);
|
||||
this._sendRequest(file);
|
||||
})
|
||||
);
|
||||
}
|
||||
// Aborts the upload process.
|
||||
abort() {
|
||||
if (this.xhr) {
|
||||
this.xhr.abort();
|
||||
}
|
||||
}
|
||||
// Initializes the XMLHttpRequest object using the URL passed to the constructor.
|
||||
_initRequest() {
|
||||
const xhr = (this.xhr = new XMLHttpRequest());
|
||||
// Note that your request may look different. It is up to you and your editor
|
||||
// integration to choose the right communication channel. This example uses
|
||||
// a POST request with JSON as a data structure but your configuration
|
||||
// could be different.
|
||||
// xhr.open('POST', this.url, true);
|
||||
xhr.open("POST", this.url, true);
|
||||
xhr.setRequestHeader("x-csrf-token", "{{ csrf_token() }}");
|
||||
xhr.responseType = "json";
|
||||
}
|
||||
// Initializes XMLHttpRequest listeners.
|
||||
_initListeners(resolve, reject, file) {
|
||||
const xhr = this.xhr;
|
||||
const loader = this.loader;
|
||||
const genericErrorText = `Couldn't upload file: ${file.name}.`;
|
||||
xhr.addEventListener("error", () => reject(genericErrorText));
|
||||
xhr.addEventListener("abort", () => reject());
|
||||
xhr.addEventListener("load", () => {
|
||||
const response = xhr.response;
|
||||
// This example assumes the XHR server's "response" object will come with
|
||||
// an "error" which has its own "message" that can be passed to reject()
|
||||
// in the upload promise.
|
||||
//
|
||||
// Your integration may handle upload errors in a different way so make sure
|
||||
// it is done properly. The reject() function must be called when the upload fails.
|
||||
if (!response || response.error) {
|
||||
return reject(response && response.error ? response.error.message : genericErrorText);
|
||||
}
|
||||
// If the upload is successful, resolve the upload promise with an object containing
|
||||
// at least the "default" URL, pointing to the image on the server.
|
||||
// This URL will be used to display the image in the content. Learn more in the
|
||||
// UploadAdapter#upload documentation.
|
||||
resolve({
|
||||
default: response.url,
|
||||
});
|
||||
});
|
||||
// Upload progress when it is supported. The file loader has the #uploadTotal and #uploaded
|
||||
// properties which are used e.g. to display the upload progress bar in the editor
|
||||
// user interface.
|
||||
if (xhr.upload) {
|
||||
xhr.upload.addEventListener("progress", (evt) => {
|
||||
if (evt.lengthComputable) {
|
||||
loader.uploadTotal = evt.total;
|
||||
loader.uploaded = evt.loaded;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// Prepares the data and sends the request.
|
||||
_sendRequest(file) {
|
||||
// Prepare the form data.
|
||||
const data = new FormData();
|
||||
data.append("upload", file);
|
||||
// Important note: This is the right place to implement security mechanisms
|
||||
// like authentication and CSRF protection. For instance, you can use
|
||||
// XMLHttpRequest.setRequestHeader() to set the request headers containing
|
||||
// the CSRF token generated earlier by your application.
|
||||
// Send the request.
|
||||
this.xhr.send(data);
|
||||
}
|
||||
// ...
|
||||
}
|
||||
|
||||
function SimpleUploadAdapterPlugin(editor) {
|
||||
editor.plugins.get("FileRepository").createUploadAdapter = (loader) => {
|
||||
// Configure the URL to the upload script in your back-end here!
|
||||
return new MyUploadAdapter(loader);
|
||||
};
|
||||
}
|
||||
|
||||
var allEditors = document.querySelector('.ck_editor_txt');
|
||||
|
||||
//Initialize the ckeditor
|
||||
ClassicEditor.create(document.querySelector("#teks"), {
|
||||
extraPlugins: [SimpleUploadAdapterPlugin],
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
$("#ckeditorForm").submit(function(e) {
|
||||
var content = $('.ck_editor_txt').val();
|
||||
html = $(content).text();
|
||||
if ($.trim(html) == '') {
|
||||
alert("Teks Tidak Boleh Kosong!");
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
//Form add image validation
|
||||
var uploadField = document.getElementById("input_foto_add");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
} else {
|
||||
//Ubah Img Preview
|
||||
var reader = new FileReader();
|
||||
reader.onload = function() {
|
||||
var output = document.getElementById('img_preview_add');
|
||||
output.src = reader.result;
|
||||
}
|
||||
reader.readAsDataURL(event.target.files[0]);
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
$('.from-prevent-multiple-submits').on('submit', function(){
|
||||
$('.from-prevent-multiple-submits').attr('disabled','true');
|
||||
})
|
||||
})();
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,230 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Kegiatan Eksternal Kampus')
|
||||
|
||||
@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">Kegiatan Eksternal Kampus</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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">Edit Data Kegiatan Eksternal Kampus</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<!-- form start -->
|
||||
<form class="from-prevent-multiple-submits"
|
||||
action="{{ route('kegiatan_eksternal_kampus.update', $kegiatanEksternalKampu) }}"
|
||||
method="POST" enctype="multipart/form-data">
|
||||
@method('patch')
|
||||
@csrf
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label for="judul">Judul</label>
|
||||
<input type="text" class="form-control" id="judul" name="judul"
|
||||
placeholder="Masukkan Judul" maxlength="255"
|
||||
value="{{ $kegiatanEksternalKampu->judul }}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="nama_foto">Thumbnail (Maksimal 2MB)</label>
|
||||
<div class="form-group">
|
||||
<img src="{{ url($kegiatanEksternalKampu->thumbnail) }}"
|
||||
alt="Image Missing" id="old_nama_foto" style="max-width: 200px;"
|
||||
class="mt-2" />
|
||||
</div>
|
||||
<input type="file" accept="image/*" class="form-control mt-0"
|
||||
name="thumbnail" id="input_foto_edit">
|
||||
<input type="hidden" name="old_thumbnail"
|
||||
value="{{ $kegiatanEksternalKampu->thumbnail }}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="teks">Teks (Foto Maksimal 2MB)</label>
|
||||
<textarea id="teks" placeholder="Masukkan Deskripsi Video"
|
||||
name="teks">{{ $kegiatanEksternalKampu->teks }}</textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="release_date">Tanggal Rilis</label>
|
||||
<input type="date" class="form-control" name="release_date"
|
||||
value="{{ $kegiatanEksternalKampu->release_date }}" required>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
|
||||
<div class="card-footer">
|
||||
<button id="submit" type="submit"
|
||||
class="btn btn-primary from-prevent-multiple-submits">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
//Define an adapter to upload the files
|
||||
class MyUploadAdapter {
|
||||
constructor(loader) {
|
||||
// The file loader instance to use during the upload. It sounds scary but do not
|
||||
// worry — the loader will be passed into the adapter later on in this guide.
|
||||
this.loader = loader;
|
||||
|
||||
// URL where to send files.
|
||||
this.url = '{{ route('ckeditor.upload') }}';
|
||||
|
||||
//
|
||||
}
|
||||
// Starts the upload process.
|
||||
upload() {
|
||||
return this.loader.file.then(
|
||||
(file) =>
|
||||
new Promise((resolve, reject) => {
|
||||
this._initRequest();
|
||||
this._initListeners(resolve, reject, file);
|
||||
this._sendRequest(file);
|
||||
})
|
||||
);
|
||||
}
|
||||
// Aborts the upload process.
|
||||
abort() {
|
||||
if (this.xhr) {
|
||||
this.xhr.abort();
|
||||
}
|
||||
}
|
||||
// Initializes the XMLHttpRequest object using the URL passed to the constructor.
|
||||
_initRequest() {
|
||||
const xhr = (this.xhr = new XMLHttpRequest());
|
||||
// Note that your request may look different. It is up to you and your editor
|
||||
// integration to choose the right communication channel. This example uses
|
||||
// a POST request with JSON as a data structure but your configuration
|
||||
// could be different.
|
||||
// xhr.open('POST', this.url, true);
|
||||
xhr.open("POST", this.url, true);
|
||||
xhr.setRequestHeader("x-csrf-token", "{{ csrf_token() }}");
|
||||
xhr.responseType = "json";
|
||||
}
|
||||
// Initializes XMLHttpRequest listeners.
|
||||
_initListeners(resolve, reject, file) {
|
||||
const xhr = this.xhr;
|
||||
const loader = this.loader;
|
||||
const genericErrorText = `Couldn't upload file: ${file.name}.`;
|
||||
xhr.addEventListener("error", () => reject(genericErrorText));
|
||||
xhr.addEventListener("abort", () => reject());
|
||||
xhr.addEventListener("load", () => {
|
||||
const response = xhr.response;
|
||||
// This example assumes the XHR server's "response" object will come with
|
||||
// an "error" which has its own "message" that can be passed to reject()
|
||||
// in the upload promise.
|
||||
//
|
||||
// Your integration may handle upload errors in a different way so make sure
|
||||
// it is done properly. The reject() function must be called when the upload fails.
|
||||
if (!response || response.error) {
|
||||
return reject(response && response.error ? response.error.message : genericErrorText);
|
||||
}
|
||||
// If the upload is successful, resolve the upload promise with an object containing
|
||||
// at least the "default" URL, pointing to the image on the server.
|
||||
// This URL will be used to display the image in the content. Learn more in the
|
||||
// UploadAdapter#upload documentation.
|
||||
resolve({
|
||||
default: response.url,
|
||||
});
|
||||
});
|
||||
// Upload progress when it is supported. The file loader has the #uploadTotal and #uploaded
|
||||
// properties which are used e.g. to display the upload progress bar in the editor
|
||||
// user interface.
|
||||
if (xhr.upload) {
|
||||
xhr.upload.addEventListener("progress", (evt) => {
|
||||
if (evt.lengthComputable) {
|
||||
loader.uploadTotal = evt.total;
|
||||
loader.uploaded = evt.loaded;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// Prepares the data and sends the request.
|
||||
_sendRequest(file) {
|
||||
// Prepare the form data.
|
||||
const data = new FormData();
|
||||
data.append("upload", file);
|
||||
// Important note: This is the right place to implement security mechanisms
|
||||
// like authentication and CSRF protection. For instance, you can use
|
||||
// XMLHttpRequest.setRequestHeader() to set the request headers containing
|
||||
// the CSRF token generated earlier by your application.
|
||||
// Send the request.
|
||||
this.xhr.send(data);
|
||||
}
|
||||
// ...
|
||||
}
|
||||
|
||||
function SimpleUploadAdapterPlugin(editor) {
|
||||
editor.plugins.get("FileRepository").createUploadAdapter = (loader) => {
|
||||
// Configure the URL to the upload script in your back-end here!
|
||||
return new MyUploadAdapter(loader);
|
||||
};
|
||||
}
|
||||
|
||||
//Initialize the ckeditor
|
||||
ClassicEditor.create(document.querySelector("#teks"), {
|
||||
extraPlugins: [SimpleUploadAdapterPlugin],
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
//Form edit image validation
|
||||
var uploadField = document.getElementById("input_foto_edit");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
} else {
|
||||
//Ubah Img Preview
|
||||
var reader = new FileReader();
|
||||
reader.onload = function() {
|
||||
var output = document.getElementById('old_nama_foto');
|
||||
output.src = reader.result;
|
||||
}
|
||||
reader.readAsDataURL(event.target.files[0]);
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
$('.from-prevent-multiple-submits').on('submit', function() {
|
||||
$('.from-prevent-multiple-submits').attr('disabled', 'true');
|
||||
})
|
||||
})();
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,158 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Kegiatan Eksternal Kampus')
|
||||
|
||||
@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">Kegiatan Eksternal Kampus</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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 Kegiatan Eksternal Kampus</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-12 text-left">
|
||||
<a type="button" href="{{ url('/admin/kegiatan_eksternal_kampus/create') }}"
|
||||
class="btn btn-success mb-3"><i class="fa fa-plus-circle"></i>
|
||||
Tambah Data Kegiatan Eksternal Kampus
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_kegiatan_eksternal_kampus" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nomor</th>
|
||||
<th>Judul</th>
|
||||
<th>Thumbnail</th>
|
||||
<th>Teks</th>
|
||||
<th>Jadwal Rilis</th>
|
||||
<th>Status</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($kegiatanEksternalKampus as $kegiatanEksternalKampu)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $kegiatanEksternalKampu->judul }}</td>
|
||||
<td>
|
||||
<img src="{{ url($kegiatanEksternalKampu->thumbnail) }}"
|
||||
alt="Image Missing" style="width: 100px;">
|
||||
</td>
|
||||
<td>
|
||||
@if (strlen(strip_tags($kegiatanEksternalKampu->teks)) > 100)
|
||||
{{ str_replace(' ', '', substr(strip_tags($kegiatanEksternalKampu->teks), 0, 100) . '...') }}
|
||||
@else
|
||||
{{ str_replace(' ', '', substr(strip_tags($kegiatanEksternalKampu->teks), 0, 100)) }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $kegiatanEksternalKampu->release_date }}</td>
|
||||
<td>
|
||||
@if ($kegiatanEksternalKampu->deleted_at != '')
|
||||
Terhapus
|
||||
@elseif ($kegiatanEksternalKampu->release_date > date('Y-m-d'))
|
||||
Belum Rilis
|
||||
@else
|
||||
Rilis
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($kegiatanEksternalKampu->deleted_at != '')
|
||||
<form
|
||||
action="{{ url('/admin/kegiatan_eksternal_kampus/' . $kegiatanEksternalKampu->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/kegiatan_eksternal_kampus/' . $kegiatanEksternalKampu->id . '/delete_permanen') }}"
|
||||
method="post">
|
||||
@csrf
|
||||
<input type="hidden" name="thumbnail"
|
||||
value="{{ $kegiatanEksternalKampu->thumbnail }}">
|
||||
<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>
|
||||
@else
|
||||
<a href="{{ route('kegiatan_eksternal_kampus.edit', $kegiatanEksternalKampu) }}"
|
||||
class="btn btn-warning open-formModalEdit">
|
||||
<i class="fa fa-edit"></i> Edit
|
||||
</a>
|
||||
<form
|
||||
action="{{ route('kegiatan_eksternal_kampus.destroy', $kegiatanEksternalKampu) }}"
|
||||
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>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<!--Data Table -->
|
||||
<script>
|
||||
$(function() {
|
||||
$("#tabel_kegiatan_eksternal_kampus").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_kegiatan_eksternal_kampus_wrapper .col-md-6:eq(0)');
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,235 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Kegiatan Internal Kampus')
|
||||
|
||||
@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">Kegiatan Internal Kampus</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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">Tambah Data Kegiatan Internal Kampus</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<!-- form start -->
|
||||
<form class="from-prevent-multiple-submits" action="{{ route('kegiatan_internal_kampus.store') }}" method="POST"
|
||||
id="ckeditorForm" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label for="judul">Judul</label>
|
||||
<input type="text" class="form-control" id="judul" name="judul"
|
||||
placeholder="Masukkan Judul" value="" required maxlength="255">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="nama_foto">Thumbnail (Maksimal 2MB)</label>
|
||||
<div class="form-group">
|
||||
<img id="img_preview_add" style="max-width: 200px;"
|
||||
class="mt-2" />
|
||||
</div>
|
||||
<input type="file" accept="image/*" class="form-control mt-0"
|
||||
name="thumbnail" id="input_foto_add" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="teks">Teks (Foto Maksimal 2MB)</label>
|
||||
<textarea id="teks" placeholder="Masukkan Teks" name="teks"
|
||||
class="ck_editor_txt" id="ck_editor_txt"></textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="release_date">Tanggal Rilis</label>
|
||||
<input type="date" class="form-control" name="release_date" required>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
|
||||
<div class="card-footer">
|
||||
<button id="submit" type="submit" class="btn btn-primary from-prevent-multiple-submits">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
//Define an adapter to upload the files
|
||||
class MyUploadAdapter {
|
||||
constructor(loader) {
|
||||
// The file loader instance to use during the upload. It sounds scary but do not
|
||||
// worry — the loader will be passed into the adapter later on in this guide.
|
||||
this.loader = loader;
|
||||
|
||||
// URL where to send files.
|
||||
this.url = '{{ route('ckeditor.upload') }}';
|
||||
|
||||
//
|
||||
}
|
||||
// Starts the upload process.
|
||||
upload() {
|
||||
return this.loader.file.then(
|
||||
(file) =>
|
||||
new Promise((resolve, reject) => {
|
||||
this._initRequest();
|
||||
this._initListeners(resolve, reject, file);
|
||||
this._sendRequest(file);
|
||||
})
|
||||
);
|
||||
}
|
||||
// Aborts the upload process.
|
||||
abort() {
|
||||
if (this.xhr) {
|
||||
this.xhr.abort();
|
||||
}
|
||||
}
|
||||
// Initializes the XMLHttpRequest object using the URL passed to the constructor.
|
||||
_initRequest() {
|
||||
const xhr = (this.xhr = new XMLHttpRequest());
|
||||
// Note that your request may look different. It is up to you and your editor
|
||||
// integration to choose the right communication channel. This example uses
|
||||
// a POST request with JSON as a data structure but your configuration
|
||||
// could be different.
|
||||
// xhr.open('POST', this.url, true);
|
||||
xhr.open("POST", this.url, true);
|
||||
xhr.setRequestHeader("x-csrf-token", "{{ csrf_token() }}");
|
||||
xhr.responseType = "json";
|
||||
}
|
||||
// Initializes XMLHttpRequest listeners.
|
||||
_initListeners(resolve, reject, file) {
|
||||
const xhr = this.xhr;
|
||||
const loader = this.loader;
|
||||
const genericErrorText = `Couldn't upload file: ${file.name}.`;
|
||||
xhr.addEventListener("error", () => reject(genericErrorText));
|
||||
xhr.addEventListener("abort", () => reject());
|
||||
xhr.addEventListener("load", () => {
|
||||
const response = xhr.response;
|
||||
// This example assumes the XHR server's "response" object will come with
|
||||
// an "error" which has its own "message" that can be passed to reject()
|
||||
// in the upload promise.
|
||||
//
|
||||
// Your integration may handle upload errors in a different way so make sure
|
||||
// it is done properly. The reject() function must be called when the upload fails.
|
||||
if (!response || response.error) {
|
||||
return reject(response && response.error ? response.error.message : genericErrorText);
|
||||
}
|
||||
// If the upload is successful, resolve the upload promise with an object containing
|
||||
// at least the "default" URL, pointing to the image on the server.
|
||||
// This URL will be used to display the image in the content. Learn more in the
|
||||
// UploadAdapter#upload documentation.
|
||||
resolve({
|
||||
default: response.url,
|
||||
});
|
||||
});
|
||||
// Upload progress when it is supported. The file loader has the #uploadTotal and #uploaded
|
||||
// properties which are used e.g. to display the upload progress bar in the editor
|
||||
// user interface.
|
||||
if (xhr.upload) {
|
||||
xhr.upload.addEventListener("progress", (evt) => {
|
||||
if (evt.lengthComputable) {
|
||||
loader.uploadTotal = evt.total;
|
||||
loader.uploaded = evt.loaded;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// Prepares the data and sends the request.
|
||||
_sendRequest(file) {
|
||||
// Prepare the form data.
|
||||
const data = new FormData();
|
||||
data.append("upload", file);
|
||||
// Important note: This is the right place to implement security mechanisms
|
||||
// like authentication and CSRF protection. For instance, you can use
|
||||
// XMLHttpRequest.setRequestHeader() to set the request headers containing
|
||||
// the CSRF token generated earlier by your application.
|
||||
// Send the request.
|
||||
this.xhr.send(data);
|
||||
}
|
||||
// ...
|
||||
}
|
||||
|
||||
function SimpleUploadAdapterPlugin(editor) {
|
||||
editor.plugins.get("FileRepository").createUploadAdapter = (loader) => {
|
||||
// Configure the URL to the upload script in your back-end here!
|
||||
return new MyUploadAdapter(loader);
|
||||
};
|
||||
}
|
||||
|
||||
var allEditors = document.querySelector('.ck_editor_txt');
|
||||
|
||||
//Initialize the ckeditor
|
||||
ClassicEditor.create(document.querySelector("#teks"), {
|
||||
extraPlugins: [SimpleUploadAdapterPlugin],
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
$("#ckeditorForm").submit(function(e) {
|
||||
var content = $('.ck_editor_txt').val();
|
||||
html = $(content).text();
|
||||
if ($.trim(html) == '') {
|
||||
alert("Teks Tidak Boleh Kosong!");
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
//Form add image validation
|
||||
var uploadField = document.getElementById("input_foto_add");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
} else {
|
||||
//Ubah Img Preview
|
||||
var reader = new FileReader();
|
||||
reader.onload = function() {
|
||||
var output = document.getElementById('img_preview_add');
|
||||
output.src = reader.result;
|
||||
}
|
||||
reader.readAsDataURL(event.target.files[0]);
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
$('.from-prevent-multiple-submits').on('submit', function(){
|
||||
$('.from-prevent-multiple-submits').attr('disabled','true');
|
||||
})
|
||||
})();
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,232 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Kegiatan Internal Kampus')
|
||||
|
||||
@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">Kegiatan Internal Kampus</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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">Edit Data Kegiatan Internal Kampus</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<!-- form start -->
|
||||
<form class="from-prevent-multiple-submits"
|
||||
action="{{ route('kegiatan_internal_kampus.update', $kegiatanInternalKampu) }}"
|
||||
method="POST" enctype="multipart/form-data">
|
||||
@method('patch')
|
||||
@csrf
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label for="judul">Judul</label>
|
||||
<input type="text" class="form-control" id="judul" name="judul"
|
||||
placeholder="Masukkan Judul" maxlength="255"
|
||||
value="{{ $kegiatanInternalKampu->judul }}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="nama_foto">Thumbnail (Maksimal 2MB)</label>
|
||||
<div class="form-group">
|
||||
<img src="{{ url($kegiatanInternalKampu->thumbnail) }}"
|
||||
alt="Image Missing" id="old_nama_foto" style="max-width: 200px;"
|
||||
class="mt-2" />
|
||||
</div>
|
||||
<input type="file" accept="image/*" class="form-control mt-0"
|
||||
name="thumbnail" id="input_foto_edit">
|
||||
<input type="hidden" name="old_thumbnail"
|
||||
value="{{ $kegiatanInternalKampu->thumbnail }}">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="teks">Teks (Foto Maksimal 2MB)</label>
|
||||
<textarea id="teks" placeholder="Masukkan Deskripsi Video"
|
||||
name="teks">{{ $kegiatanInternalKampu->teks }}</textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="release_date">Tanggal Rilis</label>
|
||||
<input type="date" class="form-control" name="release_date"
|
||||
value="{{ $kegiatanInternalKampu->release_date }}" required>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
|
||||
<div class="card-footer">
|
||||
<button id="submit" type="submit"
|
||||
class="btn btn-primary from-prevent-multiple-submits">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
//Define an adapter to upload the files
|
||||
class MyUploadAdapter {
|
||||
constructor(loader) {
|
||||
// The file loader instance to use during the upload. It sounds scary but do not
|
||||
// worry — the loader will be passed into the adapter later on in this guide.
|
||||
this.loader = loader;
|
||||
|
||||
// URL where to send files.
|
||||
this.url = '{{ route('ckeditor.upload') }}';
|
||||
|
||||
//
|
||||
}
|
||||
// Starts the upload process.
|
||||
upload() {
|
||||
return this.loader.file.then(
|
||||
(file) =>
|
||||
new Promise((resolve, reject) => {
|
||||
this._initRequest();
|
||||
this._initListeners(resolve, reject, file);
|
||||
this._sendRequest(file);
|
||||
})
|
||||
);
|
||||
}
|
||||
// Aborts the upload process.
|
||||
abort() {
|
||||
if (this.xhr) {
|
||||
this.xhr.abort();
|
||||
}
|
||||
}
|
||||
// Initializes the XMLHttpRequest object using the URL passed to the constructor.
|
||||
_initRequest() {
|
||||
const xhr = (this.xhr = new XMLHttpRequest());
|
||||
// Note that your request may look different. It is up to you and your editor
|
||||
// integration to choose the right communication channel. This example uses
|
||||
// a POST request with JSON as a data structure but your configuration
|
||||
// could be different.
|
||||
// xhr.open('POST', this.url, true);
|
||||
xhr.open("POST", this.url, true);
|
||||
xhr.setRequestHeader("x-csrf-token", "{{ csrf_token() }}");
|
||||
xhr.responseType = "json";
|
||||
}
|
||||
// Initializes XMLHttpRequest listeners.
|
||||
_initListeners(resolve, reject, file) {
|
||||
const xhr = this.xhr;
|
||||
const loader = this.loader;
|
||||
const genericErrorText = `Couldn't upload file: ${file.name}.`;
|
||||
xhr.addEventListener("error", () => reject(genericErrorText));
|
||||
xhr.addEventListener("abort", () => reject());
|
||||
xhr.addEventListener("load", () => {
|
||||
const response = xhr.response;
|
||||
// This example assumes the XHR server's "response" object will come with
|
||||
// an "error" which has its own "message" that can be passed to reject()
|
||||
// in the upload promise.
|
||||
//
|
||||
// Your integration may handle upload errors in a different way so make sure
|
||||
// it is done properly. The reject() function must be called when the upload fails.
|
||||
if (!response || response.error) {
|
||||
return reject(response && response.error ? response.error.message : genericErrorText);
|
||||
}
|
||||
// If the upload is successful, resolve the upload promise with an object containing
|
||||
// at least the "default" URL, pointing to the image on the server.
|
||||
// This URL will be used to display the image in the content. Learn more in the
|
||||
// UploadAdapter#upload documentation.
|
||||
resolve({
|
||||
default: response.url,
|
||||
});
|
||||
});
|
||||
// Upload progress when it is supported. The file loader has the #uploadTotal and #uploaded
|
||||
// properties which are used e.g. to display the upload progress bar in the editor
|
||||
// user interface.
|
||||
if (xhr.upload) {
|
||||
xhr.upload.addEventListener("progress", (evt) => {
|
||||
if (evt.lengthComputable) {
|
||||
loader.uploadTotal = evt.total;
|
||||
loader.uploaded = evt.loaded;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// Prepares the data and sends the request.
|
||||
_sendRequest(file) {
|
||||
// Prepare the form data.
|
||||
const data = new FormData();
|
||||
data.append("upload", file);
|
||||
// Important note: This is the right place to implement security mechanisms
|
||||
// like authentication and CSRF protection. For instance, you can use
|
||||
// XMLHttpRequest.setRequestHeader() to set the request headers containing
|
||||
// the CSRF token generated earlier by your application.
|
||||
// Send the request.
|
||||
this.xhr.send(data);
|
||||
}
|
||||
// ...
|
||||
}
|
||||
|
||||
function SimpleUploadAdapterPlugin(editor) {
|
||||
editor.plugins.get("FileRepository").createUploadAdapter = (loader) => {
|
||||
// Configure the URL to the upload script in your back-end here!
|
||||
return new MyUploadAdapter(loader);
|
||||
};
|
||||
}
|
||||
|
||||
//Initialize the ckeditor
|
||||
ClassicEditor.create(document.querySelector("#teks"), {
|
||||
extraPlugins: [SimpleUploadAdapterPlugin],
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
//Form edit image validation
|
||||
var uploadField = document.getElementById("input_foto_edit");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
} else {
|
||||
//Ubah Img Preview
|
||||
var reader = new FileReader();
|
||||
reader.onload = function() {
|
||||
var output = document.getElementById('old_nama_foto');
|
||||
output.src = reader.result;
|
||||
}
|
||||
reader.readAsDataURL(event.target.files[0]);
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
$('.from-prevent-multiple-submits').on('submit', function() {
|
||||
$('.from-prevent-multiple-submits').attr('disabled', 'true');
|
||||
})
|
||||
})();
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,158 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Kegiatan Internal Kampus')
|
||||
|
||||
@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">Kegiatan Internal Kampus</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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 Kegiatan Internal Kampus</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-12 text-left">
|
||||
<a type="button" href="{{ url('/admin/kegiatan_internal_kampus/create') }}"
|
||||
class="btn btn-success mb-3"><i class="fa fa-plus-circle"></i>
|
||||
Tambah Data Kegiatan Internal Kampus
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_kegiatan_internal_kampus" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nomor</th>
|
||||
<th>Judul</th>
|
||||
<th>Thumbnail</th>
|
||||
<th>Teks</th>
|
||||
<th>Jadwal Rilis</th>
|
||||
<th>Status</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($kegiatanInternalKampus as $kegiatanInternalKampu)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $kegiatanInternalKampu->judul }}</td>
|
||||
<td>
|
||||
<img src="{{ url($kegiatanInternalKampu->thumbnail) }}"
|
||||
alt="Image Missing" style="width: 100px;">
|
||||
</td>
|
||||
<td>
|
||||
@if (strlen(strip_tags($kegiatanInternalKampu->teks)) > 100)
|
||||
{{ str_replace(' ', '', substr(strip_tags($kegiatanInternalKampu->teks), 0, 100) . '...') }}
|
||||
@else
|
||||
{{ str_replace(' ', '', substr(strip_tags($kegiatanInternalKampu->teks), 0, 100)) }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $kegiatanInternalKampu->release_date }}</td>
|
||||
<td>
|
||||
@if ($kegiatanInternalKampu->deleted_at != '')
|
||||
Terhapus
|
||||
@elseif ($kegiatanInternalKampu->release_date > date('Y-m-d'))
|
||||
Belum Rilis
|
||||
@else
|
||||
Rilis
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($kegiatanInternalKampu->deleted_at != '')
|
||||
<form
|
||||
action="{{ url('/admin/kegiatan_internal_kampus/' . $kegiatanInternalKampu->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/kegiatan_internal_kampus/' . $kegiatanInternalKampu->id . '/delete_permanen') }}"
|
||||
method="post">
|
||||
@csrf
|
||||
<input type="hidden" name="thumbnail"
|
||||
value="{{ $kegiatanInternalKampu->thumbnail }}">
|
||||
<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>
|
||||
@else
|
||||
<a href="{{ route('kegiatan_internal_kampus.edit', $kegiatanInternalKampu) }}"
|
||||
class="btn btn-warning open-formModalEdit">
|
||||
<i class="fa fa-edit"></i> Edit
|
||||
</a>
|
||||
<form
|
||||
action="{{ route('kegiatan_internal_kampus.destroy', $kegiatanInternalKampu) }}"
|
||||
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>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<!--Data Table -->
|
||||
<script>
|
||||
$(function() {
|
||||
$("#tabel_kegiatan_internal_kampus").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_kegiatan_internal_kampus_wrapper .col-md-6:eq(0)');
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,299 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Kemitraan')
|
||||
|
||||
@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">Kemitraan</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 Kemitraan</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 Kemitraan
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_kemitraan" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nomor</th>
|
||||
<th>Foto</th>
|
||||
<th>Jadwal Rilis</th>
|
||||
<th>Status</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($kemitraans as $kemitraan)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td><img src="{{ url($kemitraan->nama_foto) }}"
|
||||
style="width:300px;height:auto;object-fit:cover"></td>
|
||||
<td>{{ $kemitraan->release_date }}</td>
|
||||
@if ($kemitraan->deleted_at == '')
|
||||
@if ($kemitraan->release_date <= date('Y-m-d'))
|
||||
<td>Rilis</td>
|
||||
@else
|
||||
<td>Belum Rilis</td>
|
||||
@endif
|
||||
@else ($kemitraan->deleted_at != "")
|
||||
<td>Terhapus</td>
|
||||
@endif
|
||||
@if ($kemitraan->deleted_at == '')
|
||||
<td>
|
||||
<button href="#formModalEdit" role="button" data-toggle="modal"
|
||||
data-id="{{ $kemitraan->id }}"
|
||||
data-teks="{{ $kemitraan->teks }}"
|
||||
data-nama_foto="{{ url($kemitraan->nama_foto) }}"
|
||||
data-sumber="{{ $kemitraan->sumber }}"
|
||||
data-release_date="{{ $kemitraan->release_date }}"
|
||||
class="btn btn-warning open-formModalEdit"><i
|
||||
class="fa fa-edit"></i> Edit</button>
|
||||
<form action="{{ route('kemitraan.destroy', $kemitraan) }}"
|
||||
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/kemitraan/' . $kemitraan->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/kemitraan/' . $kemitraan->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 Kemitraan</h5>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal" aria-label="Close">X</button>
|
||||
</div>
|
||||
<form id="formAdd" action="{{ url('/admin/kemitraan') }}" method="post" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label for="nama_foto">Foto (Maksimal 2MB)</label>
|
||||
<div class="form-group">
|
||||
<img id="img_preview_add" style="max-width: 200px;" class="mt-2" />
|
||||
</div>
|
||||
<input type="file" accept="image/*" class="form-control mt-0" name="nama_foto"
|
||||
id="input_foto_add" required>
|
||||
</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 ($kemitraans as $kemitraan)
|
||||
<!-- 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 Kemitraan</h5>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal" aria-label="Close">X</button>
|
||||
</div>
|
||||
<form id="formEdit" action="{{ route('kemitraan.update', $kemitraan->id) }}" method="POST"
|
||||
enctype="multipart/form-data">
|
||||
@method('patch')
|
||||
@csrf
|
||||
<div class="modal-body">
|
||||
<input type="hidden" name="id" id="id">
|
||||
<div class="form-group">
|
||||
<label for="nama_foto">Foto (Maksimal 2MB)</label>
|
||||
<div class="form-group">
|
||||
<img src="" alt="Image Missing" id="old_nama_foto" style="max-width: 200px;"
|
||||
class="mt-2" />
|
||||
</div>
|
||||
<input type="file" accept="image/*" class="form-control mt-0" name="nama_foto"
|
||||
id="input_foto_edit">
|
||||
</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_kemitraan").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_kemitraan_wrapper .col-md-6:eq(0)');
|
||||
});
|
||||
|
||||
$(document).on("click", ".open-formModalEdit", function() {
|
||||
var id = $(this).data('id');
|
||||
var teks = $(this).data('teks');
|
||||
var sumber = $(this).data('sumber');
|
||||
var nama_foto = $(this).data('nama_foto');
|
||||
var release_date = $(this).data('release_date');
|
||||
|
||||
$(".modal-body #id").val(id);
|
||||
$(".modal-body #teks").val(teks);
|
||||
$(".modal-body #sumber").val(sumber);
|
||||
$(".modal-body #release_date").val(release_date);
|
||||
$(".modal-body #input_foto_edit").val("");
|
||||
$(".modal-body #old_nama_foto").attr('src', nama_foto);
|
||||
});
|
||||
|
||||
//Form add image validation
|
||||
var uploadField = document.getElementById("input_foto_add");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
} else {
|
||||
//Ubah Img Preview
|
||||
var reader = new FileReader();
|
||||
reader.onload = function() {
|
||||
var output = document.getElementById('img_preview_add');
|
||||
output.src = reader.result;
|
||||
}
|
||||
reader.readAsDataURL(event.target.files[0]);
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
//Form edit image validation
|
||||
var uploadField = document.getElementById("input_foto_edit");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
} else {
|
||||
//Ubah Img Preview
|
||||
var reader = new FileReader();
|
||||
reader.onload = function() {
|
||||
var output = document.getElementById('old_nama_foto');
|
||||
output.src = reader.result;
|
||||
}
|
||||
reader.readAsDataURL(event.target.files[0]);
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
$('.from-prevent-multiple-submits').on('submit', function(){
|
||||
$('.from-prevent-multiple-submits').attr('disabled','true');
|
||||
})
|
||||
})();
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,234 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Kerjasama Mitra Kolaborasi')
|
||||
|
||||
@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">Kerjasama Mitra Kolaborasi</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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">Tambah Data Kerjasama Mitra Kolaborasi</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<!-- form start -->
|
||||
<form class="from-prevent-multiple-submits" action="{{ route('kerjasama_mitra_kolaborasi.store') }}" method="POST"
|
||||
id="ckeditorForm" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label for="judul">Judul</label>
|
||||
<input type="text" class="form-control" id="judul" name="judul"
|
||||
placeholder="Masukkan Judul" value="" required maxlength="255">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="nama_foto">Thumbnail (Maksimal 2MB)</label>
|
||||
<div class="form-group">
|
||||
<img id="img_preview_add" style="max-width: 200px;"
|
||||
class="mt-2" />
|
||||
</div>
|
||||
<input type="file" accept="image/*" class="form-control mt-0"
|
||||
name="thumbnail" id="input_foto_add" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="teks">Teks (Foto Maksimal 2MB)</label>
|
||||
<textarea id="teks" placeholder="Masukkan Teks" name="teks"
|
||||
class="ck_editor_txt" id="ck_editor_txt"></textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="release_date">Tanggal Rilis</label>
|
||||
<input type="date" class="form-control" name="release_date" required>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
|
||||
<div class="card-footer">
|
||||
<button id="submit" type="submit" class="btn btn-primary from-prevent-multiple-submits">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
//Define an adapter to upload the files
|
||||
class MyUploadAdapter {
|
||||
constructor(loader) {
|
||||
// The file loader instance to use during the upload. It sounds scary but do not
|
||||
// worry — the loader will be passed into the adapter later on in this guide.
|
||||
this.loader = loader;
|
||||
|
||||
// URL where to send files.
|
||||
this.url = '{{ route('ckeditor.upload') }}';
|
||||
|
||||
//
|
||||
}
|
||||
// Starts the upload process.
|
||||
upload() {
|
||||
return this.loader.file.then(
|
||||
(file) =>
|
||||
new Promise((resolve, reject) => {
|
||||
this._initRequest();
|
||||
this._initListeners(resolve, reject, file);
|
||||
this._sendRequest(file);
|
||||
})
|
||||
);
|
||||
}
|
||||
// Aborts the upload process.
|
||||
abort() {
|
||||
if (this.xhr) {
|
||||
this.xhr.abort();
|
||||
}
|
||||
}
|
||||
// Initializes the XMLHttpRequest object using the URL passed to the constructor.
|
||||
_initRequest() {
|
||||
const xhr = (this.xhr = new XMLHttpRequest());
|
||||
// Note that your request may look different. It is up to you and your editor
|
||||
// integration to choose the right communication channel. This example uses
|
||||
// a POST request with JSON as a data structure but your configuration
|
||||
// could be different.
|
||||
// xhr.open('POST', this.url, true);
|
||||
xhr.open("POST", this.url, true);
|
||||
xhr.setRequestHeader("x-csrf-token", "{{ csrf_token() }}");
|
||||
xhr.responseType = "json";
|
||||
}
|
||||
// Initializes XMLHttpRequest listeners.
|
||||
_initListeners(resolve, reject, file) {
|
||||
const xhr = this.xhr;
|
||||
const loader = this.loader;
|
||||
const genericErrorText = `Couldn't upload file: ${file.name}.`;
|
||||
xhr.addEventListener("error", () => reject(genericErrorText));
|
||||
xhr.addEventListener("abort", () => reject());
|
||||
xhr.addEventListener("load", () => {
|
||||
const response = xhr.response;
|
||||
// This example assumes the XHR server's "response" object will come with
|
||||
// an "error" which has its own "message" that can be passed to reject()
|
||||
// in the upload promise.
|
||||
//
|
||||
// Your integration may handle upload errors in a different way so make sure
|
||||
// it is done properly. The reject() function must be called when the upload fails.
|
||||
if (!response || response.error) {
|
||||
return reject(response && response.error ? response.error.message : genericErrorText);
|
||||
}
|
||||
// If the upload is successful, resolve the upload promise with an object containing
|
||||
// at least the "default" URL, pointing to the image on the server.
|
||||
// This URL will be used to display the image in the content. Learn more in the
|
||||
// UploadAdapter#upload documentation.
|
||||
resolve({
|
||||
default: response.url,
|
||||
});
|
||||
});
|
||||
// Upload progress when it is supported. The file loader has the #uploadTotal and #uploaded
|
||||
// properties which are used e.g. to display the upload progress bar in the editor
|
||||
// user interface.
|
||||
if (xhr.upload) {
|
||||
xhr.upload.addEventListener("progress", (evt) => {
|
||||
if (evt.lengthComputable) {
|
||||
loader.uploadTotal = evt.total;
|
||||
loader.uploaded = evt.loaded;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// Prepares the data and sends the request.
|
||||
_sendRequest(file) {
|
||||
// Prepare the form data.
|
||||
const data = new FormData();
|
||||
data.append("upload", file);
|
||||
// Important note: This is the right place to implement security mechanisms
|
||||
// like authentication and CSRF protection. For instance, you can use
|
||||
// XMLHttpRequest.setRequestHeader() to set the request headers containing
|
||||
// the CSRF token generated earlier by your application.
|
||||
// Send the request.
|
||||
this.xhr.send(data);
|
||||
}
|
||||
// ...
|
||||
}
|
||||
|
||||
function SimpleUploadAdapterPlugin(editor) {
|
||||
editor.plugins.get("FileRepository").createUploadAdapter = (loader) => {
|
||||
// Configure the URL to the upload script in your back-end here!
|
||||
return new MyUploadAdapter(loader);
|
||||
};
|
||||
}
|
||||
|
||||
var allEditors = document.querySelector('.ck_editor_txt');
|
||||
|
||||
//Initialize the ckeditor
|
||||
ClassicEditor.create(document.querySelector("#teks"), {
|
||||
extraPlugins: [SimpleUploadAdapterPlugin],
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
$("#ckeditorForm").submit(function(e) {
|
||||
var content = $('.ck_editor_txt').val();
|
||||
html = $(content).text();
|
||||
if ($.trim(html) == '') {
|
||||
alert("Teks Tidak Boleh Kosong!");
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
//Form add image validation
|
||||
var uploadField = document.getElementById("input_foto_add");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
} else {
|
||||
//Ubah Img Preview
|
||||
var reader = new FileReader();
|
||||
reader.onload = function() {
|
||||
var output = document.getElementById('img_preview_add');
|
||||
output.src = reader.result;
|
||||
}
|
||||
reader.readAsDataURL(event.target.files[0]);
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
$('.from-prevent-multiple-submits').on('submit', function(){
|
||||
$('.from-prevent-multiple-submits').attr('disabled','true');
|
||||
})
|
||||
})();
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,230 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Kerjasma Mitra Kolaborasi')
|
||||
|
||||
@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">Kerjasma Mitra Kolaborasi</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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">Edit Data Kerjasma Mitra Kolaborasi</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<!-- form start -->
|
||||
<form
|
||||
action="{{ route('kerjasama_mitra_kolaborasi.update', $kerjasamaMitraKolaborasi) }}"
|
||||
method="POST" enctype="multipart/form-data">
|
||||
@method('patch')
|
||||
@csrf
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label for="judul">Judul</label>
|
||||
<input type="text" class="form-control" id="judul" name="judul"
|
||||
placeholder="Masukkan Judul" maxlength="255"
|
||||
value="{{ $kerjasamaMitraKolaborasi->judul }}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="nama_foto">Thumbnail (Maksimal 2MB)</label>
|
||||
<div class="form-group">
|
||||
<img src="{{ url($kerjasamaMitraKolaborasi->thumbnail) }}"
|
||||
alt="Image Missing" id="old_nama_foto" style="max-width: 200px;"
|
||||
class="mt-2" />
|
||||
</div>
|
||||
<input type="file" accept="image/*" class="form-control mt-0"
|
||||
name="thumbnail" id="input_foto_edit">
|
||||
<input type="hidden" name="old_thumbnail"
|
||||
value="{{ $kerjasamaMitraKolaborasi->thumbnail }}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="teks">Teks (Foto Maksimal 2MB)</label>
|
||||
<textarea id="teks" placeholder="Masukkan Deskripsi Video"
|
||||
name="teks">{{ $kerjasamaMitraKolaborasi->teks }}</textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="release_date">Tanggal Rilis</label>
|
||||
<input type="date" class="form-control" name="release_date"
|
||||
value="{{ $kerjasamaMitraKolaborasi->release_date }}" required>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
|
||||
<div class="card-footer">
|
||||
<button id="submit" type="submit"
|
||||
class="btn btn-primary from-prevent-multiple-submits">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
//Define an adapter to upload the files
|
||||
class MyUploadAdapter {
|
||||
constructor(loader) {
|
||||
// The file loader instance to use during the upload. It sounds scary but do not
|
||||
// worry — the loader will be passed into the adapter later on in this guide.
|
||||
this.loader = loader;
|
||||
|
||||
// URL where to send files.
|
||||
this.url = '{{ route('ckeditor.upload') }}';
|
||||
|
||||
//
|
||||
}
|
||||
// Starts the upload process.
|
||||
upload() {
|
||||
return this.loader.file.then(
|
||||
(file) =>
|
||||
new Promise((resolve, reject) => {
|
||||
this._initRequest();
|
||||
this._initListeners(resolve, reject, file);
|
||||
this._sendRequest(file);
|
||||
})
|
||||
);
|
||||
}
|
||||
// Aborts the upload process.
|
||||
abort() {
|
||||
if (this.xhr) {
|
||||
this.xhr.abort();
|
||||
}
|
||||
}
|
||||
// Initializes the XMLHttpRequest object using the URL passed to the constructor.
|
||||
_initRequest() {
|
||||
const xhr = (this.xhr = new XMLHttpRequest());
|
||||
// Note that your request may look different. It is up to you and your editor
|
||||
// integration to choose the right communication channel. This example uses
|
||||
// a POST request with JSON as a data structure but your configuration
|
||||
// could be different.
|
||||
// xhr.open('POST', this.url, true);
|
||||
xhr.open("POST", this.url, true);
|
||||
xhr.setRequestHeader("x-csrf-token", "{{ csrf_token() }}");
|
||||
xhr.responseType = "json";
|
||||
}
|
||||
// Initializes XMLHttpRequest listeners.
|
||||
_initListeners(resolve, reject, file) {
|
||||
const xhr = this.xhr;
|
||||
const loader = this.loader;
|
||||
const genericErrorText = `Couldn't upload file: ${file.name}.`;
|
||||
xhr.addEventListener("error", () => reject(genericErrorText));
|
||||
xhr.addEventListener("abort", () => reject());
|
||||
xhr.addEventListener("load", () => {
|
||||
const response = xhr.response;
|
||||
// This example assumes the XHR server's "response" object will come with
|
||||
// an "error" which has its own "message" that can be passed to reject()
|
||||
// in the upload promise.
|
||||
//
|
||||
// Your integration may handle upload errors in a different way so make sure
|
||||
// it is done properly. The reject() function must be called when the upload fails.
|
||||
if (!response || response.error) {
|
||||
return reject(response && response.error ? response.error.message : genericErrorText);
|
||||
}
|
||||
// If the upload is successful, resolve the upload promise with an object containing
|
||||
// at least the "default" URL, pointing to the image on the server.
|
||||
// This URL will be used to display the image in the content. Learn more in the
|
||||
// UploadAdapter#upload documentation.
|
||||
resolve({
|
||||
default: response.url,
|
||||
});
|
||||
});
|
||||
// Upload progress when it is supported. The file loader has the #uploadTotal and #uploaded
|
||||
// properties which are used e.g. to display the upload progress bar in the editor
|
||||
// user interface.
|
||||
if (xhr.upload) {
|
||||
xhr.upload.addEventListener("progress", (evt) => {
|
||||
if (evt.lengthComputable) {
|
||||
loader.uploadTotal = evt.total;
|
||||
loader.uploaded = evt.loaded;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// Prepares the data and sends the request.
|
||||
_sendRequest(file) {
|
||||
// Prepare the form data.
|
||||
const data = new FormData();
|
||||
data.append("upload", file);
|
||||
// Important note: This is the right place to implement security mechanisms
|
||||
// like authentication and CSRF protection. For instance, you can use
|
||||
// XMLHttpRequest.setRequestHeader() to set the request headers containing
|
||||
// the CSRF token generated earlier by your application.
|
||||
// Send the request.
|
||||
this.xhr.send(data);
|
||||
}
|
||||
// ...
|
||||
}
|
||||
|
||||
function SimpleUploadAdapterPlugin(editor) {
|
||||
editor.plugins.get("FileRepository").createUploadAdapter = (loader) => {
|
||||
// Configure the URL to the upload script in your back-end here!
|
||||
return new MyUploadAdapter(loader);
|
||||
};
|
||||
}
|
||||
|
||||
//Initialize the ckeditor
|
||||
ClassicEditor.create(document.querySelector("#teks"), {
|
||||
extraPlugins: [SimpleUploadAdapterPlugin],
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
//Form edit image validation
|
||||
var uploadField = document.getElementById("input_foto_edit");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
} else {
|
||||
//Ubah Img Preview
|
||||
var reader = new FileReader();
|
||||
reader.onload = function() {
|
||||
var output = document.getElementById('old_nama_foto');
|
||||
output.src = reader.result;
|
||||
}
|
||||
reader.readAsDataURL(event.target.files[0]);
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
$('.from-prevent-multiple-submits').on('submit', function() {
|
||||
$('.from-prevent-multiple-submits').attr('disabled', 'true');
|
||||
})
|
||||
})();
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,158 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Kerjasama Mitra Kolaborasi')
|
||||
|
||||
@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">Kerjasama Mitra Kolaborasi</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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 Kerjasama Mitra Kolaborasi</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-12 text-left">
|
||||
<a type="button" href="{{ url('/admin/kerjasama_mitra_kolaborasi/create') }}"
|
||||
class="btn btn-success mb-3"><i class="fa fa-plus-circle"></i>
|
||||
Tambah Data Kerjasama Mitra Kolaborasi
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_kerjasama_mitra_kolaborasi" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nomor</th>
|
||||
<th>Judul</th>
|
||||
<th>Thumbnail</th>
|
||||
<th>Teks</th>
|
||||
<th>Jadwal Rilis</th>
|
||||
<th>Status</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($kerjasamaMitraKolaborasis as $kerjasamaMitraKolaborasi)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $kerjasamaMitraKolaborasi->judul }}</td>
|
||||
<td>
|
||||
<img src="{{ url($kerjasamaMitraKolaborasi->thumbnail) }}"
|
||||
alt="Image Missing" style="width: 100px;">
|
||||
</td>
|
||||
<td>
|
||||
@if (strlen(strip_tags($kerjasamaMitraKolaborasi->teks)) > 100)
|
||||
{{ str_replace(' ', '', substr(strip_tags($kerjasamaMitraKolaborasi->teks), 0, 100) . '...') }}
|
||||
@else
|
||||
{{ str_replace(' ', '', substr(strip_tags($kerjasamaMitraKolaborasi->teks), 0, 100)) }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $kerjasamaMitraKolaborasi->release_date }}</td>
|
||||
<td>
|
||||
@if ($kerjasamaMitraKolaborasi->deleted_at != '')
|
||||
Terhapus
|
||||
@elseif ($kerjasamaMitraKolaborasi->release_date > date('Y-m-d'))
|
||||
Belum Rilis
|
||||
@else
|
||||
Rilis
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($kerjasamaMitraKolaborasi->deleted_at != '')
|
||||
<form
|
||||
action="{{ url('/admin/kerjasama_mitra_kolaborasi/' . $kerjasamaMitraKolaborasi->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/kerjasama_mitra_kolaborasi/' . $kerjasamaMitraKolaborasi->id . '/delete_permanen') }}"
|
||||
method="post">
|
||||
@csrf
|
||||
<input type="hidden" name="thumbnail"
|
||||
value="{{ $kerjasamaMitraKolaborasi->thumbnail }}">
|
||||
<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>
|
||||
@else
|
||||
<a href="{{ route('kerjasama_mitra_kolaborasi.edit', $kerjasamaMitraKolaborasi) }}"
|
||||
class="btn btn-warning open-formModalEdit">
|
||||
<i class="fa fa-edit"></i> Edit
|
||||
</a>
|
||||
<form
|
||||
action="{{ route('kerjasama_mitra_kolaborasi.destroy', $kerjasamaMitraKolaborasi) }}"
|
||||
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>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<!--Data Table -->
|
||||
<script>
|
||||
$(function() {
|
||||
$("#tabel_kerjasama_mitra_kolaborasi").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_kerjasama_mitra_kolaborasi_wrapper .col-md-6:eq(0)');
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,153 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Kontak')
|
||||
|
||||
@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">Kontak</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">Edit Menu Kontak</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<!-- form start -->
|
||||
<form class="from-prevent-multiple-submits" action="{{ route('kontak.update', $kontak->id) }}" method="POST">
|
||||
@method('patch')
|
||||
@csrf
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label for="email">Email</label>
|
||||
<input type="text" class="form-control" id="email" name="email"
|
||||
value="{{ $kontak->email }}" required maxlength="255">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="fax">Fax</label>
|
||||
<input type="text" class="form-control" id="fax" name="fax"
|
||||
value="{{ $kontak->fax }}" required maxlength="255">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="alamat">Alamat</label>
|
||||
<input type="text" class="form-control" id="alamat" name="alamat"
|
||||
value="{{ $kontak->alamat }}" required maxlength="255">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="nomor_telepon">Nomor Telepon</label>
|
||||
<input type="number" class="form-control" id="nomor_telepon"
|
||||
name="nomor_telepon" value="{{ $kontak->nomor_telepon }}" required
|
||||
maxlength="255">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="youtube">Nama Channel Youtube</label>
|
||||
<input type="text" class="form-control" id="youtube" name="youtube"
|
||||
value="{{ $kontak->youtube }}" maxlength="255">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="url_youtube">Link Channel Youtube</label>
|
||||
<input type="text" class="form-control" id="url_youtube"
|
||||
name="url_youtube" value="{{ $kontak->url_youtube }}" maxlength="255">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="twitter">Nama Pengguna Twitter</label>
|
||||
<input type="text" class="form-control" id="twitter" name="twitter"
|
||||
value="{{ $kontak->twitter }}" maxlength="255">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="url_twitter">Link Twitter</label>
|
||||
<input type="text" class="form-control" id="url_twitter"
|
||||
name="url_twitter" value="{{ $kontak->url_twitter }}"
|
||||
maxlength="255">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="facebook">Nama Pengguna Facebook</label>
|
||||
<input type="text" class="form-control" id="facebook" name="facebook"
|
||||
value="{{ $kontak->facebook }}" maxlength="255">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="url_facebook">Link Facebook</label>
|
||||
<input type="text" class="form-control" id="url_facebook"
|
||||
name="url_facebook" value="{{ $kontak->url_facebook }}"
|
||||
maxlength="255">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="instagram">Nama Pengguna Instagram</label>
|
||||
<input type="text" class="form-control" id="instagram" name="instagram"
|
||||
value="{{ $kontak->instagram }}" maxlength="255">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="url_instagram">Link Instagram</label>
|
||||
<input type="text" class="form-control" id="url_instagram"
|
||||
name="url_instagram" value="{{ $kontak->url_instagram }}"
|
||||
maxlength="255">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="whatsapp">Nomor Whatsapp</label>
|
||||
<div class="row">
|
||||
<input type="text" value="+62" readonly
|
||||
class="form-control ml-2 col-lg-2">
|
||||
<input type="number" class="form-control mt-0 ml-2 col-lg-9"
|
||||
id="whatsapp" name="whatsapp" value="{{ $kontak->whatsapp }}"
|
||||
maxlength="255">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
|
||||
<div class="card-footer">
|
||||
<button id="submit" type="submit" class="btn btn-primary from-prevent-multiple-submits">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,246 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Kurikulum')
|
||||
|
||||
@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">Kurikulum</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 Kurikulum</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 Kurikulum
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_kurikulum" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nomor</th>
|
||||
<th>Nama Prodi</th>
|
||||
<th>Strata</th>
|
||||
<th>Link Kurikulum</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($kurikulums as $kurikulum)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $kurikulum->nama }}</td>
|
||||
<td>{{ $kurikulum->strata }}</td>
|
||||
<td>
|
||||
<a href="{{ $kurikulum->url }}">{{ $kurikulum->url }}</a>
|
||||
</td>
|
||||
@if ($kurikulum->deleted_at == '')
|
||||
<td>
|
||||
<button href="#formModalEdit" role="button" data-toggle="modal"
|
||||
data-id="{{ $kurikulum->id }}"
|
||||
data-nama="{{ $kurikulum->nama }}"
|
||||
data-strata="{{ $kurikulum->strata }}"
|
||||
data-url="{{ $kurikulum->url }}"
|
||||
class="btn btn-warning open-formModalEdit"><i
|
||||
class="fa fa-edit"></i> Edit</button>
|
||||
<form action="{{ route('kurikulum.destroy', $kurikulum) }}"
|
||||
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/kurikulum/' . $kurikulum->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/kurikulum/' . $kurikulum->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 Kurikulum</h5>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal" aria-label="Close">X</button>
|
||||
</div>
|
||||
<form id="formAdd" action="{{ url('/admin/kurikulum') }}" method="post">
|
||||
@csrf
|
||||
<div class="modal-body">
|
||||
<div class="form-group mt-2">
|
||||
<label for="nama">Nama Prodi</label>
|
||||
<input type="text" class="form-control mt-0" name="nama" required maxlength="255"
|
||||
placeholder=". . .">
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="strata">Strata</label>
|
||||
<input type="text" class="form-control mt-0" name="strata" required maxlength="10"
|
||||
placeholder=". . .">
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="url">Link Kurikulum</label>
|
||||
<input type="text" class="form-control mt-0" name="url" required placeholder=". . .">
|
||||
</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 ($kurikulums as $kurikulum)
|
||||
<!-- 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 Kurikulum</h5>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal" aria-label="Close">X</button>
|
||||
</div>
|
||||
<form id="formEdit" action="{{ route('kurikulum.update', $kurikulum->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">Nama Prodi</label>
|
||||
<input type="text" class="form-control mt-0" name="nama" id="nama" required maxlength="255"
|
||||
placeholder=". . .">
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="strata">Strata</label>
|
||||
<input type="text" class="form-control mt-0" name="strata" id="strata" required
|
||||
maxlength="10" placeholder=". . .">
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="url">Link Kurikulum</label>
|
||||
<input type="text" class="form-control mt-0" name="url" id="url" required
|
||||
placeholder=". . .">
|
||||
</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_kurikulum").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_kurikulum_wrapper .col-md-6:eq(0)');
|
||||
});
|
||||
|
||||
$(document).on("click", ".open-formModalEdit", function() {
|
||||
var id = $(this).data('id');
|
||||
var nama = $(this).data('nama');
|
||||
var strata = $(this).data('strata');
|
||||
var url = $(this).data('url');
|
||||
|
||||
$(".modal-body #id").val(id);
|
||||
$(".modal-body #nama").val(nama);
|
||||
$(".modal-body #strata").val(strata);
|
||||
$(".modal-body #url").val(url);
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,221 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Layanan Mahasiswa')
|
||||
|
||||
@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">Layanan Mahasiswa</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
|
||||
<!-- 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">Tambah Data Layanan Mahasiswa</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<!-- form start -->
|
||||
<form class="from-prevent-multiple-submits" action="{{ route('layanan_mahasiswa.store') }}" method="POST" id="ckeditorForm"
|
||||
enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label for="judul">Judul</label>
|
||||
<input type="text" class="form-control" id="judul" name="judul"
|
||||
placeholder="Masukkan Judul" value="" required maxlength="255">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="nama_foto">Thumbnail (Maksimal 2MB)</label>
|
||||
<div class="form-group">
|
||||
<img id="img_preview_add" style="max-width: 200px;"
|
||||
class="mt-2" />
|
||||
</div>
|
||||
<input type="file" accept="image/*" class="form-control mt-0"
|
||||
name="thumbnail" id="input_foto_add" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="teks">Teks (Foto Maksimal 2MB)</label>
|
||||
<textarea id="teks" placeholder="Masukkan Teks Layanan Mahasiswa"
|
||||
name="teks" class="ck_editor_txt" id="ck_editor_txt"></textarea>
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="release_date">Tanggal Rilis</label>
|
||||
<input type="date" class="form-control mt-0" name="release_date" required>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
|
||||
<div class="card-footer">
|
||||
<button id="submit" type="submit" class="btn btn-primary from-prevent-multiple-submits">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
//Define an adapter to upload the files
|
||||
class MyUploadAdapter {
|
||||
constructor(loader) {
|
||||
// The file loader instance to use during the upload. It sounds scary but do not
|
||||
// worry — the loader will be passed into the adapter later on in this guide.
|
||||
this.loader = loader;
|
||||
|
||||
// URL where to send files.
|
||||
this.url = '{{ route('ckeditor.upload') }}';
|
||||
|
||||
//
|
||||
}
|
||||
// Starts the upload process.
|
||||
upload() {
|
||||
return this.loader.file.then(
|
||||
(file) =>
|
||||
new Promise((resolve, reject) => {
|
||||
this._initRequest();
|
||||
this._initListeners(resolve, reject, file);
|
||||
this._sendRequest(file);
|
||||
})
|
||||
);
|
||||
}
|
||||
// Aborts the upload process.
|
||||
abort() {
|
||||
if (this.xhr) {
|
||||
this.xhr.abort();
|
||||
}
|
||||
}
|
||||
// Initializes the XMLHttpRequest object using the URL passed to the constructor.
|
||||
_initRequest() {
|
||||
const xhr = (this.xhr = new XMLHttpRequest());
|
||||
// Note that your request may look different. It is up to you and your editor
|
||||
// integration to choose the right communication channel. This example uses
|
||||
// a POST request with JSON as a data structure but your configuration
|
||||
// could be different.
|
||||
// xhr.open('POST', this.url, true);
|
||||
xhr.open("POST", this.url, true);
|
||||
xhr.setRequestHeader("x-csrf-token", "{{ csrf_token() }}");
|
||||
xhr.responseType = "json";
|
||||
}
|
||||
// Initializes XMLHttpRequest listeners.
|
||||
_initListeners(resolve, reject, file) {
|
||||
const xhr = this.xhr;
|
||||
const loader = this.loader;
|
||||
const genericErrorText = `Couldn't upload file: ${file.name}.`;
|
||||
xhr.addEventListener("error", () => reject(genericErrorText));
|
||||
xhr.addEventListener("abort", () => reject());
|
||||
xhr.addEventListener("load", () => {
|
||||
const response = xhr.response;
|
||||
// This example assumes the XHR server's "response" object will come with
|
||||
// an "error" which has its own "message" that can be passed to reject()
|
||||
// in the upload promise.
|
||||
//
|
||||
// Your integration may handle upload errors in a different way so make sure
|
||||
// it is done properly. The reject() function must be called when the upload fails.
|
||||
if (!response || response.error) {
|
||||
return reject(response && response.error ? response.error.message : genericErrorText);
|
||||
}
|
||||
// If the upload is successful, resolve the upload promise with an object containing
|
||||
// at least the "default" URL, pointing to the image on the server.
|
||||
// This URL will be used to display the image in the content. Learn more in the
|
||||
// UploadAdapter#upload documentation.
|
||||
resolve({
|
||||
default: response.url,
|
||||
});
|
||||
});
|
||||
// Upload progress when it is supported. The file loader has the #uploadTotal and #uploaded
|
||||
// properties which are used e.g. to display the upload progress bar in the editor
|
||||
// user interface.
|
||||
if (xhr.upload) {
|
||||
xhr.upload.addEventListener("progress", (evt) => {
|
||||
if (evt.lengthComputable) {
|
||||
loader.uploadTotal = evt.total;
|
||||
loader.uploaded = evt.loaded;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// Prepares the data and sends the request.
|
||||
_sendRequest(file) {
|
||||
// Prepare the form data.
|
||||
const data = new FormData();
|
||||
data.append("upload", file);
|
||||
// Important note: This is the right place to implement security mechanisms
|
||||
// like authentication and CSRF protection. For instance, you can use
|
||||
// XMLHttpRequest.setRequestHeader() to set the request headers containing
|
||||
// the CSRF token generated earlier by your application.
|
||||
// Send the request.
|
||||
this.xhr.send(data);
|
||||
}
|
||||
// ...
|
||||
}
|
||||
|
||||
function SimpleUploadAdapterPlugin(editor) {
|
||||
editor.plugins.get("FileRepository").createUploadAdapter = (loader) => {
|
||||
// Configure the URL to the upload script in your back-end here!
|
||||
return new MyUploadAdapter(loader);
|
||||
};
|
||||
}
|
||||
|
||||
var allEditors = document.querySelector('.ck_editor_txt');
|
||||
|
||||
//Initialize the ckeditor
|
||||
ClassicEditor.create(document.querySelector("#teks"), {
|
||||
extraPlugins: [SimpleUploadAdapterPlugin],
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
$("#ckeditorForm").submit(function(e) {
|
||||
var content = $('.ck_editor_txt').val();
|
||||
html = $(content).text();
|
||||
if ($.trim(html) == '') {
|
||||
alert("Teks Tidak Boleh Kosong!");
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
//Form add image validation
|
||||
var uploadField = document.getElementById("input_foto_add");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
} else {
|
||||
//Ubah Img Preview
|
||||
var reader = new FileReader();
|
||||
reader.onload = function() {
|
||||
var output = document.getElementById('img_preview_add');
|
||||
output.src = reader.result;
|
||||
}
|
||||
reader.readAsDataURL(event.target.files[0]);
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
$('.from-prevent-multiple-submits').on('submit', function(){
|
||||
$('.from-prevent-multiple-submits').attr('disabled','true');
|
||||
})
|
||||
})();
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,227 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Layanan Mahasiswa')
|
||||
|
||||
@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">Layanan Mahasiswa</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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">Edit Data Layanan Mahasiswa</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<!-- form start -->
|
||||
<form class="from-prevent-multiple-submits"
|
||||
action="{{ route('layanan_mahasiswa.update', $layananMahasiswa) }}"
|
||||
method="POST" enctype="multipart/form-data">
|
||||
@method('patch')
|
||||
@csrf
|
||||
<div class="card-body">
|
||||
<input type="hidden" value="{{ $layananMahasiswa->id }}" name="id">
|
||||
<div class="form-group">
|
||||
<label for="judul">Judul</label>
|
||||
<input type="text" class="form-control" id="judul" name="judul"
|
||||
maxlength="255" placeholder="Masukkan Judul"
|
||||
value="{{ $layananMahasiswa->judul }}" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="nama_foto">Thumbnail (Maksimal 2MB)</label>
|
||||
<div class="form-group">
|
||||
<img src="{{ url($layananMahasiswa->thumbnail) }}"
|
||||
alt="Image Missing" id="old_nama_foto" style="max-width: 200px;"
|
||||
class="mt-2" />
|
||||
</div>
|
||||
<input type="file" accept="image/*" class="form-control mt-0"
|
||||
name="thumbnail" id="input_foto_edit">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="teks">Teks (Foto Maksimal 2MB)</label>
|
||||
<textarea id="teks" placeholder="Masukkan Deskripsi"
|
||||
name="teks">{{ $layananMahasiswa->teks }}</textarea>
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="release_date">Tanggal Rilis</label>
|
||||
<input type="date" class="form-control mt-0" name="release_date"
|
||||
value="{{ $layananMahasiswa->release_date }}" required>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
|
||||
<div class="card-footer">
|
||||
<button id="submit" type="submit"
|
||||
class="btn btn-primary from-prevent-multiple-submits">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
//Define an adapter to upload the files
|
||||
class MyUploadAdapter {
|
||||
constructor(loader) {
|
||||
// The file loader instance to use during the upload. It sounds scary but do not
|
||||
// worry — the loader will be passed into the adapter later on in this guide.
|
||||
this.loader = loader;
|
||||
|
||||
// URL where to send files.
|
||||
this.url = '{{ route('ckeditor.upload') }}';
|
||||
|
||||
//
|
||||
}
|
||||
// Starts the upload process.
|
||||
upload() {
|
||||
return this.loader.file.then(
|
||||
(file) =>
|
||||
new Promise((resolve, reject) => {
|
||||
this._initRequest();
|
||||
this._initListeners(resolve, reject, file);
|
||||
this._sendRequest(file);
|
||||
})
|
||||
);
|
||||
}
|
||||
// Aborts the upload process.
|
||||
abort() {
|
||||
if (this.xhr) {
|
||||
this.xhr.abort();
|
||||
}
|
||||
}
|
||||
// Initializes the XMLHttpRequest object using the URL passed to the constructor.
|
||||
_initRequest() {
|
||||
const xhr = (this.xhr = new XMLHttpRequest());
|
||||
// Note that your request may look different. It is up to you and your editor
|
||||
// integration to choose the right communication channel. This example uses
|
||||
// a POST request with JSON as a data structure but your configuration
|
||||
// could be different.
|
||||
// xhr.open('POST', this.url, true);
|
||||
xhr.open("POST", this.url, true);
|
||||
xhr.setRequestHeader("x-csrf-token", "{{ csrf_token() }}");
|
||||
xhr.responseType = "json";
|
||||
}
|
||||
// Initializes XMLHttpRequest listeners.
|
||||
_initListeners(resolve, reject, file) {
|
||||
const xhr = this.xhr;
|
||||
const loader = this.loader;
|
||||
const genericErrorText = `Couldn't upload file: ${file.name}.`;
|
||||
xhr.addEventListener("error", () => reject(genericErrorText));
|
||||
xhr.addEventListener("abort", () => reject());
|
||||
xhr.addEventListener("load", () => {
|
||||
const response = xhr.response;
|
||||
// This example assumes the XHR server's "response" object will come with
|
||||
// an "error" which has its own "message" that can be passed to reject()
|
||||
// in the upload promise.
|
||||
//
|
||||
// Your integration may handle upload errors in a different way so make sure
|
||||
// it is done properly. The reject() function must be called when the upload fails.
|
||||
if (!response || response.error) {
|
||||
return reject(response && response.error ? response.error.message : genericErrorText);
|
||||
}
|
||||
// If the upload is successful, resolve the upload promise with an object containing
|
||||
// at least the "default" URL, pointing to the image on the server.
|
||||
// This URL will be used to display the image in the content. Learn more in the
|
||||
// UploadAdapter#upload documentation.
|
||||
resolve({
|
||||
default: response.url,
|
||||
});
|
||||
});
|
||||
// Upload progress when it is supported. The file loader has the #uploadTotal and #uploaded
|
||||
// properties which are used e.g. to display the upload progress bar in the editor
|
||||
// user interface.
|
||||
if (xhr.upload) {
|
||||
xhr.upload.addEventListener("progress", (evt) => {
|
||||
if (evt.lengthComputable) {
|
||||
loader.uploadTotal = evt.total;
|
||||
loader.uploaded = evt.loaded;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// Prepares the data and sends the request.
|
||||
_sendRequest(file) {
|
||||
// Prepare the form data.
|
||||
const data = new FormData();
|
||||
data.append("upload", file);
|
||||
// Important note: This is the right place to implement security mechanisms
|
||||
// like authentication and CSRF protection. For instance, you can use
|
||||
// XMLHttpRequest.setRequestHeader() to set the request headers containing
|
||||
// the CSRF token generated earlier by your application.
|
||||
// Send the request.
|
||||
this.xhr.send(data);
|
||||
}
|
||||
// ...
|
||||
}
|
||||
|
||||
function SimpleUploadAdapterPlugin(editor) {
|
||||
editor.plugins.get("FileRepository").createUploadAdapter = (loader) => {
|
||||
// Configure the URL to the upload script in your back-end here!
|
||||
return new MyUploadAdapter(loader);
|
||||
};
|
||||
}
|
||||
|
||||
//Initialize the ckeditor
|
||||
ClassicEditor.create(document.querySelector("#teks"), {
|
||||
extraPlugins: [SimpleUploadAdapterPlugin],
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
$("#ckeditorForm").submit(function(e) {
|
||||
var content = $('.ck_editor_txt').val();
|
||||
html = $(content).text();
|
||||
if ($.trim(html) == '') {
|
||||
alert("Teks Tidak Boleh Kosong!");
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
//Form edit image validation
|
||||
var uploadField = document.getElementById("input_foto_edit");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
} else {
|
||||
//Ubah Img Preview
|
||||
var reader = new FileReader();
|
||||
reader.onload = function() {
|
||||
var output = document.getElementById('old_nama_foto');
|
||||
output.src = reader.result;
|
||||
}
|
||||
reader.readAsDataURL(event.target.files[0]);
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
$('.from-prevent-multiple-submits').on('submit', function() {
|
||||
$('.from-prevent-multiple-submits').attr('disabled', 'true');
|
||||
})
|
||||
})();
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,155 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Layanan Mahasiswa')
|
||||
|
||||
@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">Layanan Mahasiswa</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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 Layanan Mahasiswa</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-12 text-left">
|
||||
<a href="{{ url('/admin/layanan_mahasiswa/create') }}" type="button"
|
||||
class="btn btn-success mb-3">
|
||||
<i class="fa fa-plus-circle mr-2"></i>Tambah Data
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table id="tabel_layanan_mahasiswa" class="table table-bordered table-striped mt-2">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th>Judul</th>
|
||||
<th>Thumbnail</th>
|
||||
<th>Teks</th>
|
||||
<th>Jadwal Rilis</th>
|
||||
<th>Status</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@foreach ($layananMahasiswas as $layananMahasiswa)
|
||||
<tr id="{{ $layananMahasiswa->id }}">
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $layananMahasiswa->judul }}</td>
|
||||
<td><img src="{{ url($layananMahasiswa->thumbnail) }}"
|
||||
style="width:100px">
|
||||
</td>
|
||||
<td>
|
||||
@if (strlen(strip_tags($layananMahasiswa->teks)) > 100)
|
||||
{{ str_replace(' ', '', substr(strip_tags($layananMahasiswa->teks), 0, 100) . '...') }}
|
||||
@else
|
||||
{{ str_replace(' ', '', substr(strip_tags($layananMahasiswa->teks), 0, 100)) }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $layananMahasiswa->release_date }}</td>
|
||||
@if ($layananMahasiswa->deleted_at == '')
|
||||
@if ($layananMahasiswa->release_date <= date('Y-m-d'))
|
||||
<td>Rilis</td>
|
||||
@else
|
||||
<td>Belum Rilis</td>
|
||||
@endif
|
||||
@else
|
||||
($layananMahasiswa->deleted_at != "")
|
||||
<td>Terhapus</td>
|
||||
@endif
|
||||
@if ($layananMahasiswa->deleted_at == '')
|
||||
<td>
|
||||
<a href="{{ route('layanan_mahasiswa.edit', $layananMahasiswa) }}"
|
||||
class="btn btn-warning open-formModalEdit"><i
|
||||
class="fa fa-edit"></i> Edit</a>
|
||||
<form
|
||||
action="{{ route('layanan_mahasiswa.destroy', $layananMahasiswa) }}"
|
||||
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/layanan_mahasiswa/' . $layananMahasiswa->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/layanan_mahasiswa/' . $layananMahasiswa->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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<!--Data Table -->
|
||||
<script>
|
||||
$(function() {
|
||||
$("#tabel_layanan_mahasiswa").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_layanan_mahasiswa_wrapper .col-md-6:eq(0)');
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,712 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<style>
|
||||
.space-maju {
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>@yield('title')</title>
|
||||
<link rel="shortcut icon" href="{{ asset('/admin_template/dist/img/favicon.ico') }}">
|
||||
|
||||
<!-- Google Font: Source Sans Pro -->
|
||||
<link rel="stylesheet"
|
||||
href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
|
||||
<!-- Font Awesome -->
|
||||
<link rel="stylesheet" href="{{ url('/admin_template/plugins/fontawesome-free/css/all.min.css') }}">
|
||||
<!-- iCheck -->
|
||||
<link rel="stylesheet" href="{{ url('/admin_template/plugins/icheck-bootstrap/icheck-bootstrap.min.css') }}">
|
||||
<!-- JQVMap -->
|
||||
<link rel="stylesheet" href="{{ url('/admin_template/plugins/jqvmap/jqvmap.min.css') }}">
|
||||
<!-- Theme style -->
|
||||
<link rel="stylesheet" href="{{ url('/admin_template/dist/css/adminlte.min.css') }}">
|
||||
<!-- overlayScrollbars -->
|
||||
<link rel="stylesheet"
|
||||
href="{{ url('/admin_template/plugins/overlayScrollbars/css/OverlayScrollbars.min.css') }}">
|
||||
<!-- DataTables -->
|
||||
<link rel="stylesheet"
|
||||
href="{{ url('/admin_template/plugins/datatables-bs4/css/dataTables.bootstrap4.min.css') }}">
|
||||
<link rel="stylesheet"
|
||||
href="{{ url('/admin_template/plugins/datatables-responsive/css/responsive.bootstrap4.min.css') }}">
|
||||
<link rel="stylesheet"
|
||||
href="{{ url('/admin_template/plugins/datatables-buttons/css/buttons.bootstrap4.min.css') }}">
|
||||
<!-- Webicon -->
|
||||
<link href="{{ url('/images/logo.ico') }}" rel="shortcut icon" type="image/vnd.microsoft.icon" />
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="{{ url('/admin_template/plugins/sweetalert2-theme-bootstrap-4/bootstrap-4.min.css') }}">
|
||||
|
||||
<!-- CK Editor -->
|
||||
<script src="{{ asset('admin_template/ck_editor/build/ckeditor.js') }}"></script>
|
||||
|
||||
<!-- jQuery -->
|
||||
<script src="{{ url('/admin_template/plugins/jquery/jquery.min.js') }}"></script>
|
||||
<!-- jQuery UI 1.11.4 -->
|
||||
<script src="{{ url('/admin_template/plugins/jquery-ui/jquery-ui.min.js') }}"></script>
|
||||
<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
|
||||
<script>
|
||||
$.widget.bridge('uibutton', $.ui.button)
|
||||
</script>
|
||||
<!-- Bootstrap 4 -->
|
||||
<script src="{{ url('/admin_template/plugins/bootstrap/js/bootstrap.bundle.min.js') }}"></script>
|
||||
<!-- ChartJS -->
|
||||
<script src="{{ url('/admin_template/plugins/chart.js/Chart.min.js') }}"></script>
|
||||
<!-- Sparkline -->
|
||||
<script src="{{ url('/admin_template/plugins/sparklines/sparkline.js') }}"></script>
|
||||
<!-- JQVMap -->
|
||||
<script src="{{ url('/admin_template/plugins/jqvmap/jquery.vmap.min.js') }}"></script>
|
||||
<script src="{{ url('/admin_template/plugins/jqvmap/maps/jquery.vmap.usa.js') }}"></script>
|
||||
<!-- jQuery Knob Chart -->
|
||||
<script src="{{ url('/admin_template/plugins/jquery-knob/jquery.knob.min.js') }}"></script>
|
||||
<!-- overlayScrollbars -->
|
||||
<script src="{{ url('/admin_template/plugins/overlayScrollbars/js/jquery.overlayScrollbars.min.js') }}"></script>
|
||||
<!-- DataTables & Plugins -->
|
||||
<script src="{{ url('/admin_template/plugins/datatables/jquery.dataTables.min.js') }}"></script>
|
||||
<script src="{{ url('/admin_template/plugins/datatables-bs4/js/dataTables.bootstrap4.min.js') }}"></script>
|
||||
<script src="{{ url('/admin_template/plugins/datatables-responsive/js/dataTables.responsive.min.js') }}"></script>
|
||||
<script src="{{ url('/admin_template/plugins/datatables-responsive/js/responsive.bootstrap4.min.js') }}"></script>
|
||||
<script src="{{ url('/admin_template/plugins/datatables-buttons/js/dataTables.buttons.min.js') }}"></script>
|
||||
<script src="{{ url('/admin_template/plugins/datatables-buttons/js/buttons.bootstrap4.min.js') }}"></script>
|
||||
<script src="{{ url('/admin_template/plugins/jszip/jszip.min.js') }}"></script>
|
||||
<script src="{{ url('/admin_template/plugins/pdfmake/pdfmake.min.js') }}"></script>
|
||||
<script src="{{ url('/admin_template/plugins/pdfmake/vfs_fonts.js') }}"></script>
|
||||
<script src="{{ url('/admin_template/plugins/datatables-buttons/js/buttons.html5.min.js') }}"></script>
|
||||
<script src="{{ url('/admin_template/plugins/datatables-buttons/js/buttons.print.min.js') }}"></script>
|
||||
<script src="{{ url('/admin_template/plugins/datatables-buttons/js/buttons.colVis.min.js') }}"></script>
|
||||
<!-- AdminLTE for demo purposes -->
|
||||
<script src="{{ url('/admin_template/dist/js/demo.js') }}"></script>
|
||||
<!-- AdminLTE dashboard demo (This is only for demo purposes) -->
|
||||
<script src="{{ url('/admin_template/dist/js/pages/dashboard.js') }}"></script>
|
||||
<!-- AdminLTE App -->
|
||||
<script src="{{ url('/admin_template/dist/js/adminlte.min.js') }}"></script>
|
||||
|
||||
<script src="{{ url('/admin_template/plugins/sweetalert2/sweetalert2.min.js') }}"></script>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body class="hold-transition sidebar-mini layout-fixed">
|
||||
<div class="wrapper">
|
||||
|
||||
<!-- Navbar -->
|
||||
<nav class="main-header navbar navbar-expand navbar-white navbar-light">
|
||||
<!-- Left navbar links -->
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-widget="pushmenu" href="#" role="button"><i
|
||||
class="fas fa-bars"></i></a>
|
||||
</li>
|
||||
<li class="nav-item d-none d-sm-inline-block">
|
||||
<a href="{{ url('admin/dashboard') }}" class="nav-link">Dashboard</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<!-- Right navbar links -->
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<!-- Navbar Search -->
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-widget="fullscreen" href="#" role="button">
|
||||
<i class="fas fa-expand-arrows-alt"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link" data-toggle="dropdown" href="#">
|
||||
<i class="far fa-user"></i>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-md dropdown-menu-right">
|
||||
<span class="dropdown-item dropdown-header"><b>{{ $session_user->name }}</b></span>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a href="{{ url('admin/dashboard') }}" class="dropdown-item dropdown-footer">
|
||||
<i class="fas fa-tachometer-alt fa-sm fa-fw mr-2"></i>
|
||||
Dashboard</a>
|
||||
</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a href="{{ url('admin/logout') }}" class="dropdown-item text-danger dropdown-footer">
|
||||
<i class="fas fa-sign-out-alt fa-sm fa-fw mr-2"></i>
|
||||
Logout</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<!-- /.navbar -->
|
||||
|
||||
<!-- Main Sidebar Container -->
|
||||
<aside class="main-sidebar sidebar-dark-primary elevation-4">
|
||||
<!-- Brand Logo -->
|
||||
<div>
|
||||
<a href="{{ url('admin/dashboard') }}" class="brand-link">
|
||||
<img src="{{ url('/images/logo.png') }}" alt="Logo" class="brand-image img-circle elevation-3"
|
||||
style="opacity: .8">
|
||||
<span class="brand-text font-weight-light">Fakultas Teknik</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- Sidebar -->
|
||||
<div class="sidebar">
|
||||
<!-- Sidebar user panel (optional) -->
|
||||
<div class="user-panel mt-3 pb-3 mb-3 d-flex">
|
||||
<div class="image">
|
||||
<img src="{{ url('/images/user.png') }}" class="img-circle elevation-2" alt="User Image">
|
||||
</div>
|
||||
<div class="info">
|
||||
<a href="#" class="d-block">{{ $session_user->name }}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Sidebar Menu -->
|
||||
<nav class="mt-2 pb-2">
|
||||
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu"
|
||||
data-accordion="false">
|
||||
<!-- Add icons to the links using the .nav-icon class
|
||||
with font-awesome or any other icon font library -->
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('admin/dashboard') }}"
|
||||
class="nav-link {{ set_active(['dashboard.index']) }}">
|
||||
<i class="nav-icon fas fa-tachometer-alt"></i>
|
||||
<p>
|
||||
Dashboard
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li
|
||||
class="nav-item {{ set_open(['banner.index','quote.index','profil_singkat.index','galeri.index','kemitraan.index','ucapan_selamat_datang.index']) }}">
|
||||
<a href="#"
|
||||
class="nav-link {{ set_active(['banner.index','quote.index','profil_singkat.index','galeri.index','kemitraan.index','ucapan_selamat_datang.index']) }}">
|
||||
<i class="nav-icon fas fa-home"></i>
|
||||
<p>
|
||||
Beranda
|
||||
<i class="right fas fa-angle-left"></i>
|
||||
</p>
|
||||
</a>
|
||||
<ul class="nav nav-treeview space-maju">
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('admin/banner') }}"
|
||||
class="nav-link {{ set_active(['banner.index']) }}">
|
||||
<i class="far fa{{ set_dot(['banner.index']) }}-circle nav-icon"></i>
|
||||
<p>Banner</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('admin/quote') }}"
|
||||
class="nav-link {{ set_active(['quote.index']) }}">
|
||||
<i class="far fa{{ set_dot(['quote.index']) }}-circle nav-icon"></i>
|
||||
<p>Quote</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('admin/profil_singkat') }}"
|
||||
class="nav-link {{ set_active(['profil_singkat.index']) }}">
|
||||
<i class="far fa{{ set_dot(['profil_singkat.index']) }}-circle nav-icon"></i>
|
||||
<p>Profil Singkat</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('admin/galeri') }}"
|
||||
class="nav-link {{ set_active(['galeri.index']) }}">
|
||||
<i class="far fa{{ set_dot(['galeri.index']) }}-circle nav-icon"></i>
|
||||
<p>Galeri</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('admin/kemitraan') }}"
|
||||
class="nav-link {{ set_active(['kemitraan.index']) }}">
|
||||
<i class="far fa{{ set_dot(['kemitraan.index']) }}-circle nav-icon"></i>
|
||||
<p>Kemitraan</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('admin/ucapan_selamat_datang') }}"
|
||||
class="nav-link {{ set_active(['ucapan_selamat_datang.index']) }}">
|
||||
<i
|
||||
class="far fa{{ set_dot(['ucapan_selamat_datang.index']) }}-circle nav-icon"></i>
|
||||
<p>Ucapan Selamat Datang</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li
|
||||
class="nav-item {{ set_open(['sejarah.index','video_profil.index','sambutan_pimpinan_instansi.index','visi_misi.index','struktur_instansi.index','akreditasi.index','kerjasama_mitra_kolaborasi.index','kerjasama_mitra_kolaborasi.create','kerjasama_mitra_kolaborasi.edit']) }}">
|
||||
<a href="#"
|
||||
class="nav-link {{ set_active(['sejarah.index','video_profil.index','sambutan_pimpinan_instansi.index','visi_misi.index','struktur_instansi.index','akreditasi.index','kerjasama_mitra_kolaborasi.index','kerjasama_mitra_kolaborasi.create','kerjasama_mitra_kolaborasi.edit']) }}">
|
||||
<i class="nav-icon fas fa-id-card"></i>
|
||||
<p>
|
||||
Profil
|
||||
<i class="right fas fa-angle-left"></i>
|
||||
</p>
|
||||
</a>
|
||||
<ul class="nav nav-treeview space-maju">
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('admin/sejarah') }}"
|
||||
class="nav-link {{ set_active(['sejarah.index']) }}">
|
||||
<i class="far fa{{ set_dot(['sejarah.index']) }}-circle nav-icon"></i>
|
||||
<p>Sejarah</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('admin/video_profil') }}"
|
||||
class="nav-link {{ set_active(['video_profil.index']) }}">
|
||||
<i class="far fa{{ set_dot(['video_profil.index']) }}-circle nav-icon"></i>
|
||||
<p>Video Profil</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('admin/sambutan_pimpinan_instansi') }}"
|
||||
class="nav-link {{ set_active(['sambutan_pimpinan_instansi.index']) }}">
|
||||
<i
|
||||
class="far fa{{ set_dot(['sambutan_pimpinan_instansi.index']) }}-circle nav-icon"></i>
|
||||
<p>Sambutan Pimpinan Instansi</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('admin/visi_misi') }}"
|
||||
class="nav-link {{ set_active(['visi_misi.index']) }}">
|
||||
<i class="far fa{{ set_dot(['visi_misi.index']) }}-circle nav-icon"></i>
|
||||
<p>Visi & Misi</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('admin/struktur_instansi') }}"
|
||||
class="nav-link {{ set_active(['struktur_instansi.index']) }}">
|
||||
<i
|
||||
class="far fa{{ set_dot(['struktur_instansi.index']) }}-circle nav-icon"></i>
|
||||
<p>Struktur Instansi</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('admin/akreditasi') }}"
|
||||
class="nav-link {{ set_active(['akreditasi.index']) }}">
|
||||
<i class="far fa{{ set_dot(['akreditasi.index']) }}-circle nav-icon"></i>
|
||||
<p>Akreditasi</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('admin/kerjasama_mitra_kolaborasi') }}"
|
||||
class="nav-link {{ set_active(['kerjasama_mitra_kolaborasi.index','kerjasama_mitra_kolaborasi.create','kerjasama_mitra_kolaborasi.edit']) }}">
|
||||
<i
|
||||
class="far fa{{ set_dot(['kerjasama_mitra_kolaborasi.index','kerjasama_mitra_kolaborasi.create','kerjasama_mitra_kolaborasi.edit']) }}-circle nav-icon"></i>
|
||||
<p>Kerjasama & Mitra Kolaborasi</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
<li
|
||||
class="nav-item {{ set_open(['kurikulum.index','hasil_karya.index','hasil_karya.edit','hasil_karya.create','kalender_akademik.index','penelitian.index','penelitian.edit','penelitian.create','pengabdian_ke_masyarakat.index','pengabdian_ke_masyarakat.edit','pengabdian_ke_masyarakat.create','jurnal.index','link_prodi.index']) }}">
|
||||
<a href="#"
|
||||
class="nav-link {{ set_active(['kurikulum.index','hasil_karya.index','hasil_karya.edit','hasil_karya.create','kalender_akademik.index','penelitian.index','penelitian.edit','penelitian.create','pengabdian_ke_masyarakat.index','pengabdian_ke_masyarakat.edit','pengabdian_ke_masyarakat.create','jurnal.index','link_prodi.index']) }}">
|
||||
<i class="nav-icon fas fa-school"></i>
|
||||
<p>
|
||||
Akademik
|
||||
<i class="right fas fa-angle-left"></i>
|
||||
</p>
|
||||
</a>
|
||||
<ul class="nav nav-treeview space-maju">
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('admin/kurikulum') }}"
|
||||
class="nav-link {{ set_active(['kurikulum.index']) }}">
|
||||
<i class="far fa{{ set_dot(['kurikulum.index']) }}-circle nav-icon"></i>
|
||||
<p>Kurikulum</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('admin/hasil_karya') }}"
|
||||
class="nav-link {{ set_active(['hasil_karya.index', 'hasil_karya.edit', 'hasil_karya.create']) }}">
|
||||
<i
|
||||
class="far fa{{ set_dot(['hasil_karya.index', 'hasil_karya.edit', 'hasil_karya.create']) }}-circle nav-icon"></i>
|
||||
<p>Hasil Karya</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('admin/kalender_akademik') }}"
|
||||
class="nav-link {{ set_active(['kalender_akademik.index']) }}">
|
||||
<i
|
||||
class="far fa{{ set_dot(['kalender_akademik.index']) }}-circle nav-icon"></i>
|
||||
<p>Kalender Akademik</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('admin/penelitian') }}"
|
||||
class="nav-link {{ set_active(['penelitian.index', 'penelitian.edit', 'penelitian.create']) }}">
|
||||
<i
|
||||
class="far fa{{ set_dot(['penelitian.index', 'penelitian.edit', 'penelitian.create']) }}-circle nav-icon"></i>
|
||||
<p>Penelitian</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('admin/pengabdian_ke_masyarakat') }}"
|
||||
class="nav-link {{ set_active(['pengabdian_ke_masyarakat.index','pengabdian_ke_masyarakat.edit','pengabdian_ke_masyarakat.create']) }}">
|
||||
<i
|
||||
class="far fa{{ set_dot(['pengabdian_ke_masyarakat.index','pengabdian_ke_masyarakat.edit','pengabdian_ke_masyarakat.create']) }}-circle nav-icon"></i>
|
||||
<p>Pengabdian Kepada Masyarakat</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('admin/jurnal') }}"
|
||||
class="nav-link {{ set_active(['jurnal.index']) }}">
|
||||
<i class="far fa{{ set_dot(['jurnal.index']) }}-circle nav-icon"></i>
|
||||
<p>Jurnal</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('admin/link_prodi') }}"
|
||||
class="nav-link {{ set_active(['link_prodi.index']) }}">
|
||||
<i class="far fa{{ set_dot(['link_prodi.index']) }}-circle nav-icon"></i>
|
||||
<p>Website Prodi</p>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li
|
||||
class="nav-item {{ set_open(['kegiatan_eksternal_kampus.index','kegiatan_eksternal_kampus.edit','kegiatan_eksternal_kampus.create','kegiatan_internal_kampus.index','kegiatan_internal_kampus.edit','kegiatan_internal_kampus.create','lomba_kompetisi.index','lomba_kompetisi.edit','lomba_kompetisi.create']) }}">
|
||||
<a href="#"
|
||||
class="nav-link {{ set_active(['kegiatan_eksternal_kampus.index','kegiatan_internal_kampus.index','lomba_kompetisi.index','lomba_kompetisi.edit','lomba_kompetisi.create']) }}">
|
||||
<i class="nav-icon fas fa-calendar"></i>
|
||||
<p>
|
||||
Agenda
|
||||
<i class="right fas fa-angle-left"></i>
|
||||
</p>
|
||||
</a>
|
||||
<ul class="nav nav-treeview space-maju">
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('admin/kegiatan_eksternal_kampus') }}"
|
||||
class="nav-link {{ set_active(['kegiatan_eksternal_kampus.index','kegiatan_eksternal_kampus.edit','kegiatan_eksternal_kampus.create']) }}">
|
||||
<i
|
||||
class="far fa{{ set_dot(['kegiatan_eksternal_kampus.index','kegiatan_eksternal_kampus.edit','kegiatan_eksternal_kampus.create']) }}-circle nav-icon"></i>
|
||||
<p>Kegiatan Eksternal</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('admin/kegiatan_internal_kampus') }}"
|
||||
class="nav-link {{ set_active(['kegiatan_internal_kampus.index','kegiatan_internal_kampus.edit','kegiatan_internal_kampus.create']) }}">
|
||||
<i
|
||||
class="far fa{{ set_dot(['kegiatan_internal_kampus.index','kegiatan_internal_kampus.edit','kegiatan_internal_kampus.create']) }}-circle nav-icon"></i>
|
||||
<p>Kegiatan Internal</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('admin/lomba_kompetisi') }}"
|
||||
class="nav-link {{ set_active(['lomba_kompetisi.index', 'lomba_kompetisi.create', 'lomba_kompetisi.edit']) }}">
|
||||
<i
|
||||
class="far fa{{ set_dot(['lomba_kompetisi.index', 'lomba_kompetisi.edit', 'lomba_kompetisi.create']) }}-circle nav-icon"></i>
|
||||
<p>Lomba & Kompetisi</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li
|
||||
class="nav-item {{ set_open(['ukm_mahasiswa.index','ukm_mahasiswa.edit','ukm_mahasiswa.create','himpunan_mahasiswa.index','himpunan_mahasiswa.edit','himpunan_mahasiswa.create','prestasi_aktivitas_mahasiswa.index','prestasi_aktivitas_mahasiswa.edit','prestasi_aktivitas_mahasiswa.create','layanan_mahasiswa.index','layanan_mahasiswa.edit','layanan_mahasiswa.create','informasi_beasiswa.index','informasi_beasiswa.edit','informasi_beasiswa.create']) }}">
|
||||
<a href="#"
|
||||
class="nav-link {{ set_active(['ukm_mahasiswa.index','ukm_mahasiswa.edit','ukm_mahasiswa.create','himpunan_mahasiswa.index','himpunan_mahasiswa.edit','himpunan_mahasiswa.create','prestasi_aktivitas_mahasiswa.index','prestasi_aktivitas_mahasiswa.edit','prestasi_aktivitas_mahasiswa.create','layanan_mahasiswa.index','layanan_mahasiswa.edit','layanan_mahasiswa.create','informasi_beasiswa.index','informasi_beasiswa.edit','informasi_beasiswa.create']) }}">
|
||||
<i class="nav-icon fas fa-user-graduate"></i>
|
||||
<p>
|
||||
Mahasiswa & Alumni
|
||||
<i class="right fas fa-angle-left"></i>
|
||||
</p>
|
||||
</a>
|
||||
<ul class="nav nav-treeview space-maju">
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('admin/ukm_mahasiswa') }}"
|
||||
class="nav-link {{ set_active(['ukm_mahasiswa.index', 'ukm_mahasiswa.edit', 'ukm_mahasiswa.create']) }}">
|
||||
<i
|
||||
class="far fa{{ set_dot(['ukm_mahasiswa.index', 'ukm_mahasiswa.edit', 'ukm_mahasiswa.create']) }}-circle nav-icon"></i>
|
||||
<p>UKM Mahasiswa</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('admin/himpunan_mahasiswa') }}"
|
||||
class="nav-link {{ set_active(['himpunan_mahasiswa.index', 'himpunan_mahasiswa.edit', 'himpunan_mahasiswa.create']) }}">
|
||||
<i
|
||||
class="far fa{{ set_dot(['himpunan_mahasiswa.index', 'himpunan_mahasiswa.edit', 'himpunan_mahasiswa.create']) }}-circle nav-icon"></i>
|
||||
<p>Himpunan Mahasiswa</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('admin/prestasi_aktivitas_mahasiswa') }}"
|
||||
class="nav-link {{ set_active(['prestasi_aktivitas_mahasiswa.index','prestasi_aktivitas_mahasiswa.edit','prestasi_aktivitas_mahasiswa.create']) }}">
|
||||
<i
|
||||
class="far fa{{ set_dot(['prestasi_aktivitas_mahasiswa.index','prestasi_aktivitas_mahasiswa.edit','prestasi_aktivitas_mahasiswa.create']) }}-circle nav-icon"></i>
|
||||
<p>Prestasi & Aktivitas Mahasiswa</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('admin/layanan_mahasiswa') }}"
|
||||
class="nav-link {{ set_active(['layanan_mahasiswa.index', 'layanan_mahasiswa.edit', 'layanan_mahasiswa.create']) }}">
|
||||
<i
|
||||
class="far fa{{ set_dot(['layanan_mahasiswa.index', 'layanan_mahasiswa.edit', 'layanan_mahasiswa.create']) }}-circle nav-icon"></i>
|
||||
<p>Layanan Mahasiswa</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('admin/informasi_beasiswa') }}"
|
||||
class="nav-link {{ set_active(['informasi_beasiswa.index', 'informasi_beasiswa.edit', 'informasi_beasiswa.create']) }}">
|
||||
<i
|
||||
class="far fa{{ set_dot(['informasi_beasiswa.index', 'informasi_beasiswa.edit', 'informasi_beasiswa.create']) }}-circle nav-icon"></i>
|
||||
<p>Informasi Beasiswa</p>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li
|
||||
class="nav-item {{ set_open(['ruang_perkuliahan.index','ruang_lab.index','ruang_pengelolaan_tata_usaha.index','perpustakaan.index']) }}">
|
||||
<a href="#"
|
||||
class="nav-link {{ set_active(['ruang_perkuliahan.index','ruang_lab.index','ruang_pengelolaan_tata_usaha.index','perpustakaan.index']) }}">
|
||||
<i class="nav-icon fas fa-building"></i>
|
||||
<p>
|
||||
Fasilitas
|
||||
<i class="right fas fa-angle-left"></i>
|
||||
</p>
|
||||
</a>
|
||||
<ul class="nav nav-treeview space-maju">
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('admin/ruang_perkuliahan') }}"
|
||||
class="nav-link {{ set_active(['ruang_perkuliahan.index']) }}">
|
||||
<i
|
||||
class="far fa{{ set_dot(['ruang_perkuliahan.index']) }}-circle nav-icon"></i>
|
||||
<p>Ruang Perkuliahan</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('admin/ruang_lab') }}"
|
||||
class="nav-link {{ set_active(['ruang_lab.index']) }}">
|
||||
<i class="far fa{{ set_dot(['ruang_lab.index']) }}-circle nav-icon"></i>
|
||||
<p>Ruang Lab</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('admin/ruang_pengelolaan_tata_usaha') }}"
|
||||
class="nav-link {{ set_active(['ruang_pengelolaan_tata_usaha.index']) }}">
|
||||
<i
|
||||
class="far fa{{ set_dot(['ruang_pengelolaan_tata_usaha.index']) }}-circle nav-icon"></i>
|
||||
<p>Ruang Pengelolaan & Tata Usaha</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('admin/perpustakaan') }}"
|
||||
class="nav-link {{ set_active(['perpustakaan.index']) }}">
|
||||
<i class="far fa{{ set_dot(['perpustakaan.index']) }}-circle nav-icon"></i>
|
||||
<p>Perpustakaan</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li
|
||||
class="nav-item {{ request()->is('admin/berita/' . $berita->id . '/edit') ? 'menu-open' : '' }}{{ set_open(['berita.index', 'berita.create', 'berita.edit', 'blog.index', 'blog.create', 'blog.edit']) }}">
|
||||
<a href="#"
|
||||
class="nav-link {{ request()->is('admin/berita/' . $berita->id . '/edit') ? 'active' : '' }}{{ set_active(['berita.index', 'berita.create', 'berita.edit', 'blog.index', 'blog.create', 'blog.edit']) }}">
|
||||
|
||||
<i class="nav-icon fas fa-newspaper"></i>
|
||||
<p>
|
||||
Berita & Blog
|
||||
<i class="right fas fa-angle-left"></i>
|
||||
</p>
|
||||
</a>
|
||||
<ul class="nav nav-treeview space-maju">
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('admin/berita') }}"
|
||||
class="nav-link {{ request()->is('admin/berita/' . $berita->id . '/edit') ? 'active' : '' }} {{ set_active(['berita.index', 'berita.create', 'berita.edit']) }}">
|
||||
<i
|
||||
class="far fa{{ set_dot(['berita.index', 'berita.create', 'berita.edit']) }}{{ request()->is('admin/berita/' . $berita->id . '/edit') ? '-dot' : '' }}-circle nav-icon"></i>
|
||||
|
||||
<p>Berita</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('admin/blog') }}"
|
||||
class="nav-link {{ set_active(['blog.index', 'blog.create', 'blog.edit']) }}">
|
||||
<i
|
||||
class="far fa{{ set_dot(['blog.index', 'blog.create', 'blog.edit']) }}-circle nav-icon"></i>
|
||||
|
||||
<p>Blog</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="nav-item {{ set_open(['kontak.index', 'staf.index', 'dosen.index']) }}">
|
||||
<a href="#"
|
||||
class="nav-link {{ set_active(['kontak.index', 'staf.index', 'dosen.index']) }}">
|
||||
<i class="nav-icon fas fa-users"></i>
|
||||
<p>
|
||||
Seputar Kampus
|
||||
<i class="right fas fa-angle-left"></i>
|
||||
</p>
|
||||
</a>
|
||||
<ul class="nav nav-treeview space-maju">
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('admin/staf') }}"
|
||||
class="nav-link {{ set_active(['staf.index']) }}">
|
||||
<i class="far fa{{ set_dot(['staf.index']) }}-circle nav-icon"></i>
|
||||
<p>Staf</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('admin/dosen') }}"
|
||||
class="nav-link {{ set_active(['dosen.index']) }}">
|
||||
<i class="far fa{{ set_dot(['dosen.index']) }}-circle nav-icon"></i>
|
||||
<p>Dosen</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('admin/kontak') }}"
|
||||
class="nav-link {{ set_active(['kontak.index']) }}">
|
||||
<i class="far fa{{ set_dot(['kontak.index']) }}-circle nav-icon"></i>
|
||||
<p>
|
||||
Kontak
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('admin/aplikasi_integrasi') }}"
|
||||
class="nav-link {{ set_active(['aplikasi_integrasi.index']) }}">
|
||||
<i class="nav-icon fas fa-tablet-alt"></i>
|
||||
<p>
|
||||
Aplikasi Terintegrasi
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
class="nav-item {{ set_open(['peraturan_perundang_undangan.index', 'dokumen_akademik.index']) }}">
|
||||
<a href="#"
|
||||
class="nav-link {{ set_active(['peraturan_perundang_undangan.index', 'dokumen_akademik.index']) }}">
|
||||
<i class="nav-icon fas fa-download"></i>
|
||||
<p>
|
||||
Unduhan
|
||||
<i class="right fas fa-angle-left"></i>
|
||||
</p>
|
||||
</a>
|
||||
<ul class="nav nav-treeview space-maju">
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('admin/dokumen_akademik') }}"
|
||||
class="nav-link {{ set_active(['dokumen_akademik.index']) }}">
|
||||
<i
|
||||
class="far fa{{ set_dot(['dokumen_akademik.index']) }}-circle nav-icon"></i>
|
||||
<p>Dokumen Akademik</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('admin/peraturan_perundang_undangan') }}"
|
||||
class="nav-link {{ set_active(['peraturan_perundang_undangan.index']) }}">
|
||||
<i
|
||||
class="far fa{{ set_dot(['peraturan_perundang_undangan.index']) }}-circle nav-icon"></i>
|
||||
<p>Peraturan & Perundang-undangan</p>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li
|
||||
class="nav-item {{ set_open(['faq.index','faq.edit','faq.create','pertanyaan.index','pertanyaan.edit','pertanyaan.create']) }}">
|
||||
<a href="#"
|
||||
class="nav-link {{ set_active(['faq.index', 'faq.edit', 'faq.create', 'pertanyaan.index']) }}">
|
||||
<i class="nav-icon fas fa-question"></i>
|
||||
<p>
|
||||
Interaksi
|
||||
<i class="right fas fa-angle-left"></i>
|
||||
</p>
|
||||
</a>
|
||||
<ul class="nav nav-treeview space-maju">
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('admin/pertanyaan') }}"
|
||||
class="nav-link {{ set_active(['pertanyaan.index']) }}">
|
||||
<i class="far fa{{ set_dot(['pertanyaan.index']) }}-circle nav-icon"></i>
|
||||
<p>Pertanyaan</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('admin/faq') }}"
|
||||
class="nav-link {{ set_active(['faq.index', 'faq.edit', 'faq.create']) }}">
|
||||
<i
|
||||
class="far fa{{ set_dot(['faq.index', 'faq.edit', 'faq.create']) }}-circle nav-icon"></i>
|
||||
<p>FAQ</p>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
<!-- /.sidebar-menu -->
|
||||
</div>
|
||||
<!-- /.sidebar -->
|
||||
</aside>
|
||||
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
@yield('container')
|
||||
<!-- /.content-wrapper -->
|
||||
<footer class="main-footer">
|
||||
|
||||
<div class="float-right d-none d-sm-inline-block">
|
||||
2022 © Jurusan Informatika, Universitas Tanjungpura.
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<!-- Control Sidebar -->
|
||||
<aside class="control-sidebar control-sidebar-dark">
|
||||
<!-- Control sidebar content goes here -->
|
||||
</aside>
|
||||
<!-- /.control-sidebar -->
|
||||
</div>
|
||||
<!-- ./wrapper -->
|
||||
</body>
|
||||
@yield('script')
|
||||
|
||||
</html>
|
||||
@@ -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
|
||||
@@ -0,0 +1,80 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Login Admin Fakultas Teknik</title>
|
||||
|
||||
<!-- Google Font: Source Sans Pro -->
|
||||
<link rel="stylesheet"
|
||||
href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
|
||||
<!-- Font Awesome -->
|
||||
<link rel="stylesheet" href="{{url('/admin_template/plugins/fontawesome-free/css/all.min.css')}}">
|
||||
<!-- icheck bootstrap -->
|
||||
<link rel="stylesheet" href="{{url('/admin_template/plugins/icheck-bootstrap/icheck-bootstrap.min.css')}}">
|
||||
<!-- Theme style -->
|
||||
<link rel="stylesheet" href="{{url('/admin_template/dist/css/adminlte.min.css')}}">
|
||||
</head>
|
||||
|
||||
<body class="hold-transition login-page">
|
||||
<div class="login-box">
|
||||
<!-- /.login-logo -->
|
||||
<div class="card card-outline card-primary">
|
||||
<div class="card-header text-center">
|
||||
<img src="{{ url('/images/logo.png') }}" alt="Logo" class="brand-image"
|
||||
style="width :10rem;opacity: .8">
|
||||
<p class="h1"><b>Fakultas </b>Teknik</p>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<p class="login-box-msg">Halaman Admin Web Fakultas Teknik</p>
|
||||
|
||||
@if (session('alert'))
|
||||
<div class="alert alert-danger">
|
||||
{{session('alert')}}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<form action="{{route('postlogin')}}" method="post">
|
||||
@csrf
|
||||
<div class="input-group mb-3">
|
||||
<input type="email" name="email" class="form-control" placeholder="Email">
|
||||
<div class="input-group-append">
|
||||
<div class="input-group-text">
|
||||
<span class="fas fa-envelope"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group mb-3">
|
||||
<input type="password" name="password" class="form-control" placeholder="Password">
|
||||
<div class="input-group-append">
|
||||
<div class="input-group-text">
|
||||
<span class="fas fa-lock"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<!-- /.col -->
|
||||
<div class="col-4">
|
||||
<button type="submit" class="btn btn-primary btn-block">Login</button>
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
</form>
|
||||
<!-- /.social-auth-links -->
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
</div>
|
||||
<!-- /.card -->
|
||||
</div>
|
||||
<!-- /.login-box -->
|
||||
|
||||
<!-- jQuery -->
|
||||
<script src="{{url('/admin_template/plugins/jquery/jquery.min.js')}}"></script>
|
||||
<!-- Bootstrap 4 -->
|
||||
<script src="{{url('/admin_template/plugins/bootstrap/js/bootstrap.bundle.min.js')}}"></script>
|
||||
<!-- AdminLTE App -->
|
||||
<script src="{{url('/admin_template/dist/js/adminlte.min.js')}}"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,235 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Lomba & Kompetisi')
|
||||
|
||||
@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">Lomba & Kompetisi</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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">Tambah Data Lomba & Kompetisi</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<!-- form start -->
|
||||
<form class="from-prevent-multiple-submits" action="{{ route('lomba_kompetisi.store') }}" method="POST" id="ckeditorForm"
|
||||
enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label for="judul">Judul</label>
|
||||
<input type="text" class="form-control" id="judul" name="judul"
|
||||
placeholder="Masukkan Judul" value="" required maxlength="255">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="nama_foto">Thumbnail (Maksimal 2MB)</label>
|
||||
<div class="form-group">
|
||||
<img id="img_preview_add" style="max-width: 200px;"
|
||||
class="mt-2" />
|
||||
</div>
|
||||
<input type="file" accept="image/*" class="form-control mt-0"
|
||||
name="thumbnail" id="input_foto_add" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="teks">Teks (Foto Maksimal 2MB)</label>
|
||||
<textarea id="teks" placeholder="Masukkan Teks" name="teks"
|
||||
class="ck_editor_txt" id="ck_editor_txt"></textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="release_date">Tanggal Rilis</label>
|
||||
<input type="date" class="form-control" name="release_date" required>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
|
||||
<div class="card-footer">
|
||||
<button id="submit" type="submit" class="btn btn-primary from-prevent-multiple-submits">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
//Define an adapter to upload the files
|
||||
class MyUploadAdapter {
|
||||
constructor(loader) {
|
||||
// The file loader instance to use during the upload. It sounds scary but do not
|
||||
// worry — the loader will be passed into the adapter later on in this guide.
|
||||
this.loader = loader;
|
||||
|
||||
// URL where to send files.
|
||||
this.url = '{{ route('ckeditor.upload') }}';
|
||||
|
||||
//
|
||||
}
|
||||
// Starts the upload process.
|
||||
upload() {
|
||||
return this.loader.file.then(
|
||||
(file) =>
|
||||
new Promise((resolve, reject) => {
|
||||
this._initRequest();
|
||||
this._initListeners(resolve, reject, file);
|
||||
this._sendRequest(file);
|
||||
})
|
||||
);
|
||||
}
|
||||
// Aborts the upload process.
|
||||
abort() {
|
||||
if (this.xhr) {
|
||||
this.xhr.abort();
|
||||
}
|
||||
}
|
||||
// Initializes the XMLHttpRequest object using the URL passed to the constructor.
|
||||
_initRequest() {
|
||||
const xhr = (this.xhr = new XMLHttpRequest());
|
||||
// Note that your request may look different. It is up to you and your editor
|
||||
// integration to choose the right communication channel. This example uses
|
||||
// a POST request with JSON as a data structure but your configuration
|
||||
// could be different.
|
||||
// xhr.open('POST', this.url, true);
|
||||
xhr.open("POST", this.url, true);
|
||||
xhr.setRequestHeader("x-csrf-token", "{{ csrf_token() }}");
|
||||
xhr.responseType = "json";
|
||||
}
|
||||
// Initializes XMLHttpRequest listeners.
|
||||
_initListeners(resolve, reject, file) {
|
||||
const xhr = this.xhr;
|
||||
const loader = this.loader;
|
||||
const genericErrorText = `Couldn't upload file: ${file.name}.`;
|
||||
xhr.addEventListener("error", () => reject(genericErrorText));
|
||||
xhr.addEventListener("abort", () => reject());
|
||||
xhr.addEventListener("load", () => {
|
||||
const response = xhr.response;
|
||||
// This example assumes the XHR server's "response" object will come with
|
||||
// an "error" which has its own "message" that can be passed to reject()
|
||||
// in the upload promise.
|
||||
//
|
||||
// Your integration may handle upload errors in a different way so make sure
|
||||
// it is done properly. The reject() function must be called when the upload fails.
|
||||
if (!response || response.error) {
|
||||
return reject(response && response.error ? response.error.message : genericErrorText);
|
||||
}
|
||||
// If the upload is successful, resolve the upload promise with an object containing
|
||||
// at least the "default" URL, pointing to the image on the server.
|
||||
// This URL will be used to display the image in the content. Learn more in the
|
||||
// UploadAdapter#upload documentation.
|
||||
resolve({
|
||||
default: response.url,
|
||||
});
|
||||
});
|
||||
// Upload progress when it is supported. The file loader has the #uploadTotal and #uploaded
|
||||
// properties which are used e.g. to display the upload progress bar in the editor
|
||||
// user interface.
|
||||
if (xhr.upload) {
|
||||
xhr.upload.addEventListener("progress", (evt) => {
|
||||
if (evt.lengthComputable) {
|
||||
loader.uploadTotal = evt.total;
|
||||
loader.uploaded = evt.loaded;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// Prepares the data and sends the request.
|
||||
_sendRequest(file) {
|
||||
// Prepare the form data.
|
||||
const data = new FormData();
|
||||
data.append("upload", file);
|
||||
// Important note: This is the right place to implement security mechanisms
|
||||
// like authentication and CSRF protection. For instance, you can use
|
||||
// XMLHttpRequest.setRequestHeader() to set the request headers containing
|
||||
// the CSRF token generated earlier by your application.
|
||||
// Send the request.
|
||||
this.xhr.send(data);
|
||||
}
|
||||
// ...
|
||||
}
|
||||
|
||||
function SimpleUploadAdapterPlugin(editor) {
|
||||
editor.plugins.get("FileRepository").createUploadAdapter = (loader) => {
|
||||
// Configure the URL to the upload script in your back-end here!
|
||||
return new MyUploadAdapter(loader);
|
||||
};
|
||||
}
|
||||
|
||||
var allEditors = document.querySelector('.ck_editor_txt');
|
||||
|
||||
//Initialize the ckeditor
|
||||
ClassicEditor.create(document.querySelector("#teks"), {
|
||||
extraPlugins: [SimpleUploadAdapterPlugin],
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
$("#ckeditorForm").submit(function(e) {
|
||||
var content = $('.ck_editor_txt').val();
|
||||
html = $(content).text();
|
||||
if ($.trim(html) == '') {
|
||||
alert("Teks Tidak Boleh Kosong!");
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
//Form add image validation
|
||||
var uploadField = document.getElementById("input_foto_add");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
} else {
|
||||
//Ubah Img Preview
|
||||
var reader = new FileReader();
|
||||
reader.onload = function() {
|
||||
var output = document.getElementById('img_preview_add');
|
||||
output.src = reader.result;
|
||||
}
|
||||
reader.readAsDataURL(event.target.files[0]);
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
$('.from-prevent-multiple-submits').on('submit', function(){
|
||||
$('.from-prevent-multiple-submits').attr('disabled','true');
|
||||
})
|
||||
})();
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,228 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Lomba & Kompetisi')
|
||||
|
||||
@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">Lomba & Kompetisi</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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">Edit Data Lomba & Kompetisi</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<!-- form start -->
|
||||
<form class="from-prevent-multiple-submits" action="{{ route('lomba_kompetisi.update', $lombaKompetisi) }}" method="POST"
|
||||
enctype="multipart/form-data">
|
||||
@method('patch')
|
||||
@csrf
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label for="judul">Judul</label>
|
||||
<input type="text" class="form-control" id="judul" name="judul"
|
||||
placeholder="Masukkan Judul" value="{{ $lombaKompetisi->judul }}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="nama_foto">Thumbnail (Maksimal 2MB)</label>
|
||||
<div class="form-group">
|
||||
<img src="{{ url($lombaKompetisi->thumbnail) }}" alt="Image Missing"
|
||||
id="old_nama_foto" style="max-width: 200px;"
|
||||
class="mt-2" />
|
||||
</div>
|
||||
<input type="file" accept="image/*" class="form-control mt-0"
|
||||
name="thumbnail" id="input_foto_edit">
|
||||
<input type="hidden" name="old_thumbnail"
|
||||
value="{{ $lombaKompetisi->thumbnail }}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="teks">Teks (Foto Maksimal 2MB)</label>
|
||||
<textarea id="teks" placeholder="Masukkan Deskripsi Video"
|
||||
name="teks">{{ $lombaKompetisi->teks }}</textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="release_date">Tanggal Rilis</label>
|
||||
<input type="date" class="form-control" name="release_date"
|
||||
value="{{ $lombaKompetisi->release_date }}" required>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
|
||||
<div class="card-footer">
|
||||
<button id="submit" type="submit" class="btn btn-primary from-prevent-multiple-submits">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
//Define an adapter to upload the files
|
||||
class MyUploadAdapter {
|
||||
constructor(loader) {
|
||||
// The file loader instance to use during the upload. It sounds scary but do not
|
||||
// worry — the loader will be passed into the adapter later on in this guide.
|
||||
this.loader = loader;
|
||||
|
||||
// URL where to send files.
|
||||
this.url = '{{ route('ckeditor.upload') }}';
|
||||
|
||||
//
|
||||
}
|
||||
// Starts the upload process.
|
||||
upload() {
|
||||
return this.loader.file.then(
|
||||
(file) =>
|
||||
new Promise((resolve, reject) => {
|
||||
this._initRequest();
|
||||
this._initListeners(resolve, reject, file);
|
||||
this._sendRequest(file);
|
||||
})
|
||||
);
|
||||
}
|
||||
// Aborts the upload process.
|
||||
abort() {
|
||||
if (this.xhr) {
|
||||
this.xhr.abort();
|
||||
}
|
||||
}
|
||||
// Initializes the XMLHttpRequest object using the URL passed to the constructor.
|
||||
_initRequest() {
|
||||
const xhr = (this.xhr = new XMLHttpRequest());
|
||||
// Note that your request may look different. It is up to you and your editor
|
||||
// integration to choose the right communication channel. This example uses
|
||||
// a POST request with JSON as a data structure but your configuration
|
||||
// could be different.
|
||||
// xhr.open('POST', this.url, true);
|
||||
xhr.open("POST", this.url, true);
|
||||
xhr.setRequestHeader("x-csrf-token", "{{ csrf_token() }}");
|
||||
xhr.responseType = "json";
|
||||
}
|
||||
// Initializes XMLHttpRequest listeners.
|
||||
_initListeners(resolve, reject, file) {
|
||||
const xhr = this.xhr;
|
||||
const loader = this.loader;
|
||||
const genericErrorText = `Couldn't upload file: ${file.name}.`;
|
||||
xhr.addEventListener("error", () => reject(genericErrorText));
|
||||
xhr.addEventListener("abort", () => reject());
|
||||
xhr.addEventListener("load", () => {
|
||||
const response = xhr.response;
|
||||
// This example assumes the XHR server's "response" object will come with
|
||||
// an "error" which has its own "message" that can be passed to reject()
|
||||
// in the upload promise.
|
||||
//
|
||||
// Your integration may handle upload errors in a different way so make sure
|
||||
// it is done properly. The reject() function must be called when the upload fails.
|
||||
if (!response || response.error) {
|
||||
return reject(response && response.error ? response.error.message : genericErrorText);
|
||||
}
|
||||
// If the upload is successful, resolve the upload promise with an object containing
|
||||
// at least the "default" URL, pointing to the image on the server.
|
||||
// This URL will be used to display the image in the content. Learn more in the
|
||||
// UploadAdapter#upload documentation.
|
||||
resolve({
|
||||
default: response.url,
|
||||
});
|
||||
});
|
||||
// Upload progress when it is supported. The file loader has the #uploadTotal and #uploaded
|
||||
// properties which are used e.g. to display the upload progress bar in the editor
|
||||
// user interface.
|
||||
if (xhr.upload) {
|
||||
xhr.upload.addEventListener("progress", (evt) => {
|
||||
if (evt.lengthComputable) {
|
||||
loader.uploadTotal = evt.total;
|
||||
loader.uploaded = evt.loaded;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// Prepares the data and sends the request.
|
||||
_sendRequest(file) {
|
||||
// Prepare the form data.
|
||||
const data = new FormData();
|
||||
data.append("upload", file);
|
||||
// Important note: This is the right place to implement security mechanisms
|
||||
// like authentication and CSRF protection. For instance, you can use
|
||||
// XMLHttpRequest.setRequestHeader() to set the request headers containing
|
||||
// the CSRF token generated earlier by your application.
|
||||
// Send the request.
|
||||
this.xhr.send(data);
|
||||
}
|
||||
// ...
|
||||
}
|
||||
|
||||
function SimpleUploadAdapterPlugin(editor) {
|
||||
editor.plugins.get("FileRepository").createUploadAdapter = (loader) => {
|
||||
// Configure the URL to the upload script in your back-end here!
|
||||
return new MyUploadAdapter(loader);
|
||||
};
|
||||
}
|
||||
|
||||
//Initialize the ckeditor
|
||||
ClassicEditor.create(document.querySelector("#teks"), {
|
||||
extraPlugins: [SimpleUploadAdapterPlugin],
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
//Form edit image validation
|
||||
var uploadField = document.getElementById("input_foto_edit");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
} else {
|
||||
//Ubah Img Preview
|
||||
var reader = new FileReader();
|
||||
reader.onload = function() {
|
||||
var output = document.getElementById('old_nama_foto');
|
||||
output.src = reader.result;
|
||||
}
|
||||
reader.readAsDataURL(event.target.files[0]);
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
$('.from-prevent-multiple-submits').on('submit', function(){
|
||||
$('.from-prevent-multiple-submits').attr('disabled','true');
|
||||
})
|
||||
})();
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,158 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Lomba & Kompetisi')
|
||||
|
||||
@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">Lomba & Kompetisi</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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 Lomba & Kompetisi</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-12 text-left">
|
||||
<a type="button" href="{{ url('/admin/lomba_kompetisi/create') }}"
|
||||
class="btn btn-success mb-3"><i class="fa fa-plus-circle"></i>
|
||||
Tambah Data Lomba & Kompetisi
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_lomba_kompetisi" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nomor</th>
|
||||
<th>Judul</th>
|
||||
<th>Thumbnail</th>
|
||||
<th>Teks</th>
|
||||
<th>Jadwal Rilis</th>
|
||||
<th>Status</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($lombaKompetisis as $lombaKompetisi)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $lombaKompetisi->judul }}</td>
|
||||
<td>
|
||||
<img src="{{ url($lombaKompetisi->thumbnail) }}"
|
||||
alt="Image Missing" style="width: 100px;">
|
||||
</td>
|
||||
<td>
|
||||
@if (strlen(strip_tags($lombaKompetisi->teks)) > 100)
|
||||
{{ str_replace(' ', '', substr(strip_tags($lombaKompetisi->teks), 0, 100) . '...') }}
|
||||
@else
|
||||
{{ str_replace(' ', '', substr(strip_tags($lombaKompetisi->teks), 0, 100)) }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $lombaKompetisi->release_date }}</td>
|
||||
<td>
|
||||
@if ($lombaKompetisi->deleted_at != '')
|
||||
Terhapus
|
||||
@elseif ($lombaKompetisi->release_date > date('Y-m-d'))
|
||||
Belum Rilis
|
||||
@else
|
||||
Rilis
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($lombaKompetisi->deleted_at != '')
|
||||
<form
|
||||
action="{{ url('/admin/lomba_kompetisi/' . $lombaKompetisi->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/lomba_kompetisi/' . $lombaKompetisi->id . '/delete_permanen') }}"
|
||||
method="post">
|
||||
@csrf
|
||||
<input type="hidden" name="thumbnail"
|
||||
value="{{ $lombaKompetisi->thumbnail }}">
|
||||
<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>
|
||||
@else
|
||||
<a href="{{ route('lomba_kompetisi.edit', $lombaKompetisi) }}"
|
||||
class="btn btn-warning open-formModalEdit">
|
||||
<i class="fa fa-edit"></i> Edit
|
||||
</a>
|
||||
<form
|
||||
action="{{ route('lomba_kompetisi.destroy', $lombaKompetisi) }}"
|
||||
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>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<!--Data Table -->
|
||||
<script>
|
||||
$(function() {
|
||||
$("#tabel_lomba_kompetisi").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_lomba_kompetisi_wrapper .col-md-6:eq(0)');
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,220 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Penelitian')
|
||||
|
||||
@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">Penelitian</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
|
||||
<!-- 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">Tambah Data Penelitian</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<!-- form start -->
|
||||
<form class="from-prevent-multiple-submits" action="{{ route('penelitian.store') }}" method="POST" id="ckeditorForm"
|
||||
enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label for="judul">Judul</label>
|
||||
<input type="text" class="form-control" id="judul" name="judul"
|
||||
placeholder="Masukkan Judul" value="" required maxlength="255">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="nama_foto">Thumbnail (Maksimal 2MB)</label>
|
||||
<div class="form-group">
|
||||
<img id="img_preview_add" style="max-width: 200px;"
|
||||
class="mt-2" />
|
||||
</div>
|
||||
<input type="file" accept="image/*" class="form-control mt-0"
|
||||
name="thumbnail" id="input_foto_add" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="teks">Teks (Foto Maksimal 2MB)</label>
|
||||
<textarea id="teks" placeholder="Masukkan Teks Penelitian" name="teks"
|
||||
class="ck_editor_txt" id="ck_editor_txt"></textarea>
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="release_date">Tanggal Rilis</label>
|
||||
<input type="date" class="form-control mt-0" name="release_date" required>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
|
||||
<div class="card-footer">
|
||||
<button id="submit" type="submit" class="btn btn-primary from-prevent-multiple-submits">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
//Define an adapter to upload the files
|
||||
class MyUploadAdapter {
|
||||
constructor(loader) {
|
||||
// The file loader instance to use during the upload. It sounds scary but do not
|
||||
// worry — the loader will be passed into the adapter later on in this guide.
|
||||
this.loader = loader;
|
||||
|
||||
// URL where to send files.
|
||||
this.url = '{{ route('ckeditor.upload') }}';
|
||||
|
||||
//
|
||||
}
|
||||
// Starts the upload process.
|
||||
upload() {
|
||||
return this.loader.file.then(
|
||||
(file) =>
|
||||
new Promise((resolve, reject) => {
|
||||
this._initRequest();
|
||||
this._initListeners(resolve, reject, file);
|
||||
this._sendRequest(file);
|
||||
})
|
||||
);
|
||||
}
|
||||
// Aborts the upload process.
|
||||
abort() {
|
||||
if (this.xhr) {
|
||||
this.xhr.abort();
|
||||
}
|
||||
}
|
||||
// Initializes the XMLHttpRequest object using the URL passed to the constructor.
|
||||
_initRequest() {
|
||||
const xhr = (this.xhr = new XMLHttpRequest());
|
||||
// Note that your request may look different. It is up to you and your editor
|
||||
// integration to choose the right communication channel. This example uses
|
||||
// a POST request with JSON as a data structure but your configuration
|
||||
// could be different.
|
||||
// xhr.open('POST', this.url, true);
|
||||
xhr.open("POST", this.url, true);
|
||||
xhr.setRequestHeader("x-csrf-token", "{{ csrf_token() }}");
|
||||
xhr.responseType = "json";
|
||||
}
|
||||
// Initializes XMLHttpRequest listeners.
|
||||
_initListeners(resolve, reject, file) {
|
||||
const xhr = this.xhr;
|
||||
const loader = this.loader;
|
||||
const genericErrorText = `Couldn't upload file: ${file.name}.`;
|
||||
xhr.addEventListener("error", () => reject(genericErrorText));
|
||||
xhr.addEventListener("abort", () => reject());
|
||||
xhr.addEventListener("load", () => {
|
||||
const response = xhr.response;
|
||||
// This example assumes the XHR server's "response" object will come with
|
||||
// an "error" which has its own "message" that can be passed to reject()
|
||||
// in the upload promise.
|
||||
//
|
||||
// Your integration may handle upload errors in a different way so make sure
|
||||
// it is done properly. The reject() function must be called when the upload fails.
|
||||
if (!response || response.error) {
|
||||
return reject(response && response.error ? response.error.message : genericErrorText);
|
||||
}
|
||||
// If the upload is successful, resolve the upload promise with an object containing
|
||||
// at least the "default" URL, pointing to the image on the server.
|
||||
// This URL will be used to display the image in the content. Learn more in the
|
||||
// UploadAdapter#upload documentation.
|
||||
resolve({
|
||||
default: response.url,
|
||||
});
|
||||
});
|
||||
// Upload progress when it is supported. The file loader has the #uploadTotal and #uploaded
|
||||
// properties which are used e.g. to display the upload progress bar in the editor
|
||||
// user interface.
|
||||
if (xhr.upload) {
|
||||
xhr.upload.addEventListener("progress", (evt) => {
|
||||
if (evt.lengthComputable) {
|
||||
loader.uploadTotal = evt.total;
|
||||
loader.uploaded = evt.loaded;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// Prepares the data and sends the request.
|
||||
_sendRequest(file) {
|
||||
// Prepare the form data.
|
||||
const data = new FormData();
|
||||
data.append("upload", file);
|
||||
// Important note: This is the right place to implement security mechanisms
|
||||
// like authentication and CSRF protection. For instance, you can use
|
||||
// XMLHttpRequest.setRequestHeader() to set the request headers containing
|
||||
// the CSRF token generated earlier by your application.
|
||||
// Send the request.
|
||||
this.xhr.send(data);
|
||||
}
|
||||
// ...
|
||||
}
|
||||
|
||||
function SimpleUploadAdapterPlugin(editor) {
|
||||
editor.plugins.get("FileRepository").createUploadAdapter = (loader) => {
|
||||
// Configure the URL to the upload script in your back-end here!
|
||||
return new MyUploadAdapter(loader);
|
||||
};
|
||||
}
|
||||
|
||||
var allEditors = document.querySelector('.ck_editor_txt');
|
||||
|
||||
//Initialize the ckeditor
|
||||
ClassicEditor.create(document.querySelector("#teks"), {
|
||||
extraPlugins: [SimpleUploadAdapterPlugin],
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
$("#ckeditorForm").submit(function(e) {
|
||||
var content = $('.ck_editor_txt').val();
|
||||
html = $(content).text();
|
||||
if ($.trim(html) == '') {
|
||||
alert("Teks Tidak Boleh Kosong!");
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
//Form add image validation
|
||||
var uploadField = document.getElementById("input_foto_add");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
} else {
|
||||
//Ubah Img Preview
|
||||
var reader = new FileReader();
|
||||
reader.onload = function() {
|
||||
var output = document.getElementById('img_preview_add');
|
||||
output.src = reader.result;
|
||||
}
|
||||
reader.readAsDataURL(event.target.files[0]);
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
$('.from-prevent-multiple-submits').on('submit', function(){
|
||||
$('.from-prevent-multiple-submits').attr('disabled','true');
|
||||
})
|
||||
})();
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,226 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Penelitian')
|
||||
|
||||
@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">Penelitian</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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">Edit Data Penelitian</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<!-- form start -->
|
||||
<form class="from-prevent-multiple-submits"
|
||||
action="{{ route('penelitian.update', $penelitian) }}" method="POST"
|
||||
enctype="multipart/form-data">
|
||||
@method('patch')
|
||||
@csrf
|
||||
<div class="card-body">
|
||||
<input type="hidden" value="{{ $penelitian->id }}" name="id">
|
||||
<div class="form-group">
|
||||
<label for="judul">Judul</label>
|
||||
<input type="text" class="form-control" id="judul" name="judul"
|
||||
maxlength="255" placeholder="Masukkan Judul"
|
||||
value="{{ $penelitian->judul }}" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="nama_foto">Thumbnail (Maksimal 2MB)</label>
|
||||
<div class="form-group">
|
||||
<img src="{{ url($penelitian->thumbnail) }}" alt="Image Missing"
|
||||
id="old_nama_foto" style="max-width: 200px;"
|
||||
class="mt-2" />
|
||||
</div>
|
||||
<input type="file" accept="image/*" class="form-control mt-0"
|
||||
name="thumbnail" id="input_foto_edit">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="teks">Teks (Foto Maksimal 2MB)</label>
|
||||
<textarea id="teks" placeholder="Masukkan Deskripsi Video"
|
||||
name="teks">{{ $penelitian->teks }}</textarea>
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="release_date">Tanggal Rilis</label>
|
||||
<input type="date" class="form-control mt-0" name="release_date"
|
||||
value="{{ $penelitian->release_date }}" required>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
|
||||
<div class="card-footer">
|
||||
<button id="submit" type="submit"
|
||||
class="btn btn-primary from-prevent-multiple-submits">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
//Define an adapter to upload the files
|
||||
class MyUploadAdapter {
|
||||
constructor(loader) {
|
||||
// The file loader instance to use during the upload. It sounds scary but do not
|
||||
// worry — the loader will be passed into the adapter later on in this guide.
|
||||
this.loader = loader;
|
||||
|
||||
// URL where to send files.
|
||||
this.url = '{{ route('ckeditor.upload') }}';
|
||||
|
||||
//
|
||||
}
|
||||
// Starts the upload process.
|
||||
upload() {
|
||||
return this.loader.file.then(
|
||||
(file) =>
|
||||
new Promise((resolve, reject) => {
|
||||
this._initRequest();
|
||||
this._initListeners(resolve, reject, file);
|
||||
this._sendRequest(file);
|
||||
})
|
||||
);
|
||||
}
|
||||
// Aborts the upload process.
|
||||
abort() {
|
||||
if (this.xhr) {
|
||||
this.xhr.abort();
|
||||
}
|
||||
}
|
||||
// Initializes the XMLHttpRequest object using the URL passed to the constructor.
|
||||
_initRequest() {
|
||||
const xhr = (this.xhr = new XMLHttpRequest());
|
||||
// Note that your request may look different. It is up to you and your editor
|
||||
// integration to choose the right communication channel. This example uses
|
||||
// a POST request with JSON as a data structure but your configuration
|
||||
// could be different.
|
||||
// xhr.open('POST', this.url, true);
|
||||
xhr.open("POST", this.url, true);
|
||||
xhr.setRequestHeader("x-csrf-token", "{{ csrf_token() }}");
|
||||
xhr.responseType = "json";
|
||||
}
|
||||
// Initializes XMLHttpRequest listeners.
|
||||
_initListeners(resolve, reject, file) {
|
||||
const xhr = this.xhr;
|
||||
const loader = this.loader;
|
||||
const genericErrorText = `Couldn't upload file: ${file.name}.`;
|
||||
xhr.addEventListener("error", () => reject(genericErrorText));
|
||||
xhr.addEventListener("abort", () => reject());
|
||||
xhr.addEventListener("load", () => {
|
||||
const response = xhr.response;
|
||||
// This example assumes the XHR server's "response" object will come with
|
||||
// an "error" which has its own "message" that can be passed to reject()
|
||||
// in the upload promise.
|
||||
//
|
||||
// Your integration may handle upload errors in a different way so make sure
|
||||
// it is done properly. The reject() function must be called when the upload fails.
|
||||
if (!response || response.error) {
|
||||
return reject(response && response.error ? response.error.message : genericErrorText);
|
||||
}
|
||||
// If the upload is successful, resolve the upload promise with an object containing
|
||||
// at least the "default" URL, pointing to the image on the server.
|
||||
// This URL will be used to display the image in the content. Learn more in the
|
||||
// UploadAdapter#upload documentation.
|
||||
resolve({
|
||||
default: response.url,
|
||||
});
|
||||
});
|
||||
// Upload progress when it is supported. The file loader has the #uploadTotal and #uploaded
|
||||
// properties which are used e.g. to display the upload progress bar in the editor
|
||||
// user interface.
|
||||
if (xhr.upload) {
|
||||
xhr.upload.addEventListener("progress", (evt) => {
|
||||
if (evt.lengthComputable) {
|
||||
loader.uploadTotal = evt.total;
|
||||
loader.uploaded = evt.loaded;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// Prepares the data and sends the request.
|
||||
_sendRequest(file) {
|
||||
// Prepare the form data.
|
||||
const data = new FormData();
|
||||
data.append("upload", file);
|
||||
// Important note: This is the right place to implement security mechanisms
|
||||
// like authentication and CSRF protection. For instance, you can use
|
||||
// XMLHttpRequest.setRequestHeader() to set the request headers containing
|
||||
// the CSRF token generated earlier by your application.
|
||||
// Send the request.
|
||||
this.xhr.send(data);
|
||||
}
|
||||
// ...
|
||||
}
|
||||
|
||||
function SimpleUploadAdapterPlugin(editor) {
|
||||
editor.plugins.get("FileRepository").createUploadAdapter = (loader) => {
|
||||
// Configure the URL to the upload script in your back-end here!
|
||||
return new MyUploadAdapter(loader);
|
||||
};
|
||||
}
|
||||
|
||||
//Initialize the ckeditor
|
||||
ClassicEditor.create(document.querySelector("#teks"), {
|
||||
extraPlugins: [SimpleUploadAdapterPlugin],
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
$("#ckeditorForm").submit(function(e) {
|
||||
var content = $('.ck_editor_txt').val();
|
||||
html = $(content).text();
|
||||
if ($.trim(html) == '') {
|
||||
alert("Teks Tidak Boleh Kosong!");
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
//Form edit image validation
|
||||
var uploadField = document.getElementById("input_foto_edit");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
} else {
|
||||
//Ubah Img Preview
|
||||
var reader = new FileReader();
|
||||
reader.onload = function() {
|
||||
var output = document.getElementById('old_nama_foto');
|
||||
output.src = reader.result;
|
||||
}
|
||||
reader.readAsDataURL(event.target.files[0]);
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
$('.from-prevent-multiple-submits').on('submit', function() {
|
||||
$('.from-prevent-multiple-submits').attr('disabled', 'true');
|
||||
})
|
||||
})();
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,152 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Penelitian')
|
||||
|
||||
@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">Penelitian</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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 Penelitian</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-12 text-left">
|
||||
<a href="{{ url('/admin/penelitian/create') }}" type="button"
|
||||
class="btn btn-success mb-3">
|
||||
<i class="fa fa-plus-circle mr-2"></i>Tambah Data
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table id="tabel_penelitian" class="table table-bordered table-striped mt-2">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th>Judul</th>
|
||||
<th>Thumbnail</th>
|
||||
<th>Teks</th>
|
||||
<th>Jadwal Rilis</th>
|
||||
<th>Status</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@foreach ($penelitians as $penelitian)
|
||||
<tr id="{{ $penelitian->id }}">
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $penelitian->judul }}</td>
|
||||
<td><img src="{{ url($penelitian->thumbnail) }}" style="width:100px"></td>
|
||||
<td>
|
||||
@if (strlen(strip_tags($penelitian->teks)) > 100)
|
||||
{{ str_replace(' ', '', substr(strip_tags($penelitian->teks), 0, 100) . '...') }}
|
||||
@else
|
||||
{{ str_replace(' ', '', substr(strip_tags($penelitian->teks), 0, 100)) }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $penelitian->release_date }}</td>
|
||||
@if ($penelitian->deleted_at == '')
|
||||
@if ($penelitian->release_date <= date('Y-m-d'))
|
||||
<td>Rilis</td>
|
||||
@else
|
||||
<td>Belum Rilis</td>
|
||||
@endif
|
||||
@else
|
||||
($penelitian->deleted_at != "")
|
||||
<td>Terhapus</td>
|
||||
@endif
|
||||
@if ($penelitian->deleted_at == '')
|
||||
<td>
|
||||
<a href="{{ route('penelitian.edit', $penelitian) }}"
|
||||
class="btn btn-warning open-formModalEdit"><i
|
||||
class="fa fa-edit"></i> Edit</a>
|
||||
<form action="{{ route('penelitian.destroy', $penelitian) }}"
|
||||
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/penelitian/' . $penelitian->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/penelitian/' . $penelitian->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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<!--Data Table -->
|
||||
<script>
|
||||
$(function() {
|
||||
$("#tabel_penelitian").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_penelitian_wrapper .col-md-6:eq(0)');
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,220 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Pengabdian Kepada Masyarakat')
|
||||
|
||||
@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">Pengabdian Kepada Masyarakat</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
|
||||
<!-- 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">Tambah Data Pengabdian Kepada Masyarakat</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<!-- form start -->
|
||||
<form class="from-prevent-multiple-submits" action="{{ route('pengabdian_ke_masyarakat.store') }}" method="POST"
|
||||
id="ckeditorForm" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label for="judul">Judul</label>
|
||||
<input type="text" class="form-control" id="judul" name="judul"
|
||||
placeholder="Masukkan Judul" value="" required maxlength="255">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="nama_foto">Thumbnail (Maksimal 2MB)</label>
|
||||
<div class="form-group">
|
||||
<img id="img_preview_add" style="max-width: 200px;"
|
||||
class="mt-2" />
|
||||
</div>
|
||||
<input type="file" accept="image/*" class="form-control mt-0"
|
||||
name="thumbnail" id="input_foto_add" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="teks">Teks (Foto Maksimal 2MB)</label>
|
||||
<textarea id="teks" placeholder="Masukkan Teks Pengabdian Kepada Masyarakat"
|
||||
name="teks" class="ck_editor_txt" id="ck_editor_txt"></textarea>
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="release_date">Tanggal Rilis</label>
|
||||
<input type="date" class="form-control mt-0" name="release_date" required>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
|
||||
<div class="card-footer">
|
||||
<button id="submit" type="submit" class="btn btn-primary from-prevent-multiple-submits">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
//Define an adapter to upload the files
|
||||
class MyUploadAdapter {
|
||||
constructor(loader) {
|
||||
// The file loader instance to use during the upload. It sounds scary but do not
|
||||
// worry — the loader will be passed into the adapter later on in this guide.
|
||||
this.loader = loader;
|
||||
|
||||
// URL where to send files.
|
||||
this.url = '{{ route('ckeditor.upload') }}';
|
||||
|
||||
//
|
||||
}
|
||||
// Starts the upload process.
|
||||
upload() {
|
||||
return this.loader.file.then(
|
||||
(file) =>
|
||||
new Promise((resolve, reject) => {
|
||||
this._initRequest();
|
||||
this._initListeners(resolve, reject, file);
|
||||
this._sendRequest(file);
|
||||
})
|
||||
);
|
||||
}
|
||||
// Aborts the upload process.
|
||||
abort() {
|
||||
if (this.xhr) {
|
||||
this.xhr.abort();
|
||||
}
|
||||
}
|
||||
// Initializes the XMLHttpRequest object using the URL passed to the constructor.
|
||||
_initRequest() {
|
||||
const xhr = (this.xhr = new XMLHttpRequest());
|
||||
// Note that your request may look different. It is up to you and your editor
|
||||
// integration to choose the right communication channel. This example uses
|
||||
// a POST request with JSON as a data structure but your configuration
|
||||
// could be different.
|
||||
// xhr.open('POST', this.url, true);
|
||||
xhr.open("POST", this.url, true);
|
||||
xhr.setRequestHeader("x-csrf-token", "{{ csrf_token() }}");
|
||||
xhr.responseType = "json";
|
||||
}
|
||||
// Initializes XMLHttpRequest listeners.
|
||||
_initListeners(resolve, reject, file) {
|
||||
const xhr = this.xhr;
|
||||
const loader = this.loader;
|
||||
const genericErrorText = `Couldn't upload file: ${file.name}.`;
|
||||
xhr.addEventListener("error", () => reject(genericErrorText));
|
||||
xhr.addEventListener("abort", () => reject());
|
||||
xhr.addEventListener("load", () => {
|
||||
const response = xhr.response;
|
||||
// This example assumes the XHR server's "response" object will come with
|
||||
// an "error" which has its own "message" that can be passed to reject()
|
||||
// in the upload promise.
|
||||
//
|
||||
// Your integration may handle upload errors in a different way so make sure
|
||||
// it is done properly. The reject() function must be called when the upload fails.
|
||||
if (!response || response.error) {
|
||||
return reject(response && response.error ? response.error.message : genericErrorText);
|
||||
}
|
||||
// If the upload is successful, resolve the upload promise with an object containing
|
||||
// at least the "default" URL, pointing to the image on the server.
|
||||
// This URL will be used to display the image in the content. Learn more in the
|
||||
// UploadAdapter#upload documentation.
|
||||
resolve({
|
||||
default: response.url,
|
||||
});
|
||||
});
|
||||
// Upload progress when it is supported. The file loader has the #uploadTotal and #uploaded
|
||||
// properties which are used e.g. to display the upload progress bar in the editor
|
||||
// user interface.
|
||||
if (xhr.upload) {
|
||||
xhr.upload.addEventListener("progress", (evt) => {
|
||||
if (evt.lengthComputable) {
|
||||
loader.uploadTotal = evt.total;
|
||||
loader.uploaded = evt.loaded;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// Prepares the data and sends the request.
|
||||
_sendRequest(file) {
|
||||
// Prepare the form data.
|
||||
const data = new FormData();
|
||||
data.append("upload", file);
|
||||
// Important note: This is the right place to implement security mechanisms
|
||||
// like authentication and CSRF protection. For instance, you can use
|
||||
// XMLHttpRequest.setRequestHeader() to set the request headers containing
|
||||
// the CSRF token generated earlier by your application.
|
||||
// Send the request.
|
||||
this.xhr.send(data);
|
||||
}
|
||||
// ...
|
||||
}
|
||||
|
||||
function SimpleUploadAdapterPlugin(editor) {
|
||||
editor.plugins.get("FileRepository").createUploadAdapter = (loader) => {
|
||||
// Configure the URL to the upload script in your back-end here!
|
||||
return new MyUploadAdapter(loader);
|
||||
};
|
||||
}
|
||||
|
||||
var allEditors = document.querySelector('.ck_editor_txt');
|
||||
|
||||
//Initialize the ckeditor
|
||||
ClassicEditor.create(document.querySelector("#teks"), {
|
||||
extraPlugins: [SimpleUploadAdapterPlugin],
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
$("#ckeditorForm").submit(function(e) {
|
||||
var content = $('.ck_editor_txt').val();
|
||||
html = $(content).text();
|
||||
if ($.trim(html) == '') {
|
||||
alert("Teks Tidak Boleh Kosong!");
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
//Form add image validation
|
||||
var uploadField = document.getElementById("input_foto_add");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
} else {
|
||||
//Ubah Img Preview
|
||||
var reader = new FileReader();
|
||||
reader.onload = function() {
|
||||
var output = document.getElementById('img_preview_add');
|
||||
output.src = reader.result;
|
||||
}
|
||||
reader.readAsDataURL(event.target.files[0]);
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
$('.from-prevent-multiple-submits').on('submit', function(){
|
||||
$('.from-prevent-multiple-submits').attr('disabled','true');
|
||||
})
|
||||
})();
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,226 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Pengabdian Kepada Masyarakat')
|
||||
|
||||
@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">Pengabdian Kepada Masyarakat</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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">Edit Data Pengabdian Kepada Masyarakat</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<!-- form start -->
|
||||
<form class="from-prevent-multiple-submits"
|
||||
action="{{ route('pengabdian_ke_masyarakat.update', $pengabdianKeMasyarakat) }}"
|
||||
method="POST" enctype="multipart/form-data">
|
||||
@method('patch')
|
||||
@csrf
|
||||
<div class="card-body">
|
||||
<input type="hidden" value="{{ $pengabdianKeMasyarakat->id }}" name="id">
|
||||
<div class="form-group">
|
||||
<label for="judul">Judul</label>
|
||||
<input type="text" class="form-control" id="judul" name="judul"
|
||||
placeholder="Masukkan Judul" maxlength="255"
|
||||
value="{{ $pengabdianKeMasyarakat->judul }}" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="nama_foto">Thumbnail (Maksimal 2MB)</label>
|
||||
<div class="form-group">
|
||||
<img src="{{ url($pengabdianKeMasyarakat->thumbnail) }}"
|
||||
alt="Image Missing" id="old_nama_foto" style="max-width: 200px;"
|
||||
class="mt-2" />
|
||||
</div>
|
||||
<input type="file" accept="image/*" class="form-control mt-0"
|
||||
name="thumbnail" id="input_foto_edit">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="teks">Teks (Foto Maksimal 2MB)</label>
|
||||
<textarea id="teks" placeholder="Masukkan Deskripsi Video"
|
||||
name="teks">{{ $pengabdianKeMasyarakat->teks }}</textarea>
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="release_date">Tanggal Rilis</label>
|
||||
<input type="date" class="form-control mt-0" name="release_date"
|
||||
value="{{ $pengabdianKeMasyarakat->release_date }}" required>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
|
||||
<div class="card-footer">
|
||||
<button id="submit" type="submit"
|
||||
class="btn btn-primary from-prevent-multiple-submits">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
//Define an adapter to upload the files
|
||||
class MyUploadAdapter {
|
||||
constructor(loader) {
|
||||
// The file loader instance to use during the upload. It sounds scary but do not
|
||||
// worry — the loader will be passed into the adapter later on in this guide.
|
||||
this.loader = loader;
|
||||
|
||||
// URL where to send files.
|
||||
this.url = '{{ route('ckeditor.upload') }}';
|
||||
|
||||
//
|
||||
}
|
||||
// Starts the upload process.
|
||||
upload() {
|
||||
return this.loader.file.then(
|
||||
(file) =>
|
||||
new Promise((resolve, reject) => {
|
||||
this._initRequest();
|
||||
this._initListeners(resolve, reject, file);
|
||||
this._sendRequest(file);
|
||||
})
|
||||
);
|
||||
}
|
||||
// Aborts the upload process.
|
||||
abort() {
|
||||
if (this.xhr) {
|
||||
this.xhr.abort();
|
||||
}
|
||||
}
|
||||
// Initializes the XMLHttpRequest object using the URL passed to the constructor.
|
||||
_initRequest() {
|
||||
const xhr = (this.xhr = new XMLHttpRequest());
|
||||
// Note that your request may look different. It is up to you and your editor
|
||||
// integration to choose the right communication channel. This example uses
|
||||
// a POST request with JSON as a data structure but your configuration
|
||||
// could be different.
|
||||
// xhr.open('POST', this.url, true);
|
||||
xhr.open("POST", this.url, true);
|
||||
xhr.setRequestHeader("x-csrf-token", "{{ csrf_token() }}");
|
||||
xhr.responseType = "json";
|
||||
}
|
||||
// Initializes XMLHttpRequest listeners.
|
||||
_initListeners(resolve, reject, file) {
|
||||
const xhr = this.xhr;
|
||||
const loader = this.loader;
|
||||
const genericErrorText = `Couldn't upload file: ${file.name}.`;
|
||||
xhr.addEventListener("error", () => reject(genericErrorText));
|
||||
xhr.addEventListener("abort", () => reject());
|
||||
xhr.addEventListener("load", () => {
|
||||
const response = xhr.response;
|
||||
// This example assumes the XHR server's "response" object will come with
|
||||
// an "error" which has its own "message" that can be passed to reject()
|
||||
// in the upload promise.
|
||||
//
|
||||
// Your integration may handle upload errors in a different way so make sure
|
||||
// it is done properly. The reject() function must be called when the upload fails.
|
||||
if (!response || response.error) {
|
||||
return reject(response && response.error ? response.error.message : genericErrorText);
|
||||
}
|
||||
// If the upload is successful, resolve the upload promise with an object containing
|
||||
// at least the "default" URL, pointing to the image on the server.
|
||||
// This URL will be used to display the image in the content. Learn more in the
|
||||
// UploadAdapter#upload documentation.
|
||||
resolve({
|
||||
default: response.url,
|
||||
});
|
||||
});
|
||||
// Upload progress when it is supported. The file loader has the #uploadTotal and #uploaded
|
||||
// properties which are used e.g. to display the upload progress bar in the editor
|
||||
// user interface.
|
||||
if (xhr.upload) {
|
||||
xhr.upload.addEventListener("progress", (evt) => {
|
||||
if (evt.lengthComputable) {
|
||||
loader.uploadTotal = evt.total;
|
||||
loader.uploaded = evt.loaded;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// Prepares the data and sends the request.
|
||||
_sendRequest(file) {
|
||||
// Prepare the form data.
|
||||
const data = new FormData();
|
||||
data.append("upload", file);
|
||||
// Important note: This is the right place to implement security mechanisms
|
||||
// like authentication and CSRF protection. For instance, you can use
|
||||
// XMLHttpRequest.setRequestHeader() to set the request headers containing
|
||||
// the CSRF token generated earlier by your application.
|
||||
// Send the request.
|
||||
this.xhr.send(data);
|
||||
}
|
||||
// ...
|
||||
}
|
||||
|
||||
function SimpleUploadAdapterPlugin(editor) {
|
||||
editor.plugins.get("FileRepository").createUploadAdapter = (loader) => {
|
||||
// Configure the URL to the upload script in your back-end here!
|
||||
return new MyUploadAdapter(loader);
|
||||
};
|
||||
}
|
||||
|
||||
//Initialize the ckeditor
|
||||
ClassicEditor.create(document.querySelector("#teks"), {
|
||||
extraPlugins: [SimpleUploadAdapterPlugin],
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
$("#ckeditorForm").submit(function(e) {
|
||||
var content = $('.ck_editor_txt').val();
|
||||
html = $(content).text();
|
||||
if ($.trim(html) == '') {
|
||||
alert("Teks Tidak Boleh Kosong!");
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
//Form edit image validation
|
||||
var uploadField = document.getElementById("input_foto_edit");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
} else {
|
||||
//Ubah Img Preview
|
||||
var reader = new FileReader();
|
||||
reader.onload = function() {
|
||||
var output = document.getElementById('old_nama_foto');
|
||||
output.src = reader.result;
|
||||
}
|
||||
reader.readAsDataURL(event.target.files[0]);
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
$('.from-prevent-multiple-submits').on('submit', function() {
|
||||
$('.from-prevent-multiple-submits').attr('disabled', 'true');
|
||||
})
|
||||
})();
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,156 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Pengabdian Kepada Masyarakat')
|
||||
|
||||
@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">Pengabdian Kepada Masyarakat</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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 Pengabdian Kepada Masyarakat</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-12 text-left">
|
||||
<a href="{{ url('/admin/pengabdian_ke_masyarakat/create') }}" type="button"
|
||||
class="btn btn-success mb-3">
|
||||
<i class="fa fa-plus-circle mr-2"></i>Tambah Data
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table id="tabel_pengabdian_ke_masyarakat" class="table table-bordered table-striped mt-2">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th>Judul</th>
|
||||
<th>Thumbnail</th>
|
||||
<th>Teks</th>
|
||||
<th>Jadwal Rilis</th>
|
||||
<th>Status</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@foreach ($pengabdianKeMasyarakats as $pengabdianKeMasyarakat)
|
||||
<tr id="{{ $pengabdianKeMasyarakat->id }}">
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $pengabdianKeMasyarakat->judul }}</td>
|
||||
<td>
|
||||
<img src="{{ url($pengabdianKeMasyarakat->thumbnail) }}"
|
||||
style="width:100px">
|
||||
</td>
|
||||
<td>
|
||||
@if (strlen(strip_tags($pengabdianKeMasyarakat->teks)) > 100)
|
||||
{{ str_replace(' ', '', substr(strip_tags($pengabdianKeMasyarakat->teks), 0, 100) . '...') }}
|
||||
@else
|
||||
{{ str_replace(' ', '', substr(strip_tags($pengabdianKeMasyarakat->teks), 0, 100)) }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $pengabdianKeMasyarakat->release_date }}</td>
|
||||
@if ($pengabdianKeMasyarakat->deleted_at == '')
|
||||
@if ($pengabdianKeMasyarakat->release_date <= date('Y-m-d'))
|
||||
<td>Rilis</td>
|
||||
@else
|
||||
<td>Belum Rilis</td>
|
||||
@endif
|
||||
@else
|
||||
($pengabdianKeMasyarakat->deleted_at != "")
|
||||
<td>Terhapus</td>
|
||||
@endif
|
||||
@if ($pengabdianKeMasyarakat->deleted_at == '')
|
||||
<td>
|
||||
<a href="{{ route('pengabdian_ke_masyarakat.edit', $pengabdianKeMasyarakat) }}"
|
||||
class="btn btn-warning open-formModalEdit"><i
|
||||
class="fa fa-edit"></i> Edit</a>
|
||||
<form
|
||||
action="{{ route('pengabdian_ke_masyarakat.destroy', $pengabdianKeMasyarakat) }}"
|
||||
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/pengabdian_ke_masyarakat/' . $pengabdianKeMasyarakat->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/pengabdian_ke_masyarakat/' . $pengabdianKeMasyarakat->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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<!--Data Table -->
|
||||
<script>
|
||||
$(function() {
|
||||
$("#tabel_pengabdian_ke_masyarakat").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_pengabdian_ke_masyarakat_wrapper .col-md-6:eq(0)');
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,280 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Peraturan & Perundang Undangan')
|
||||
|
||||
@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">Peraturan & Perundang Undangan</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 Peraturan & Perundang Undangan</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 Peraturan & Perundang Undangan
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_peraturan_perundang_undangan"
|
||||
class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nomor</th>
|
||||
<th>Judul</th>
|
||||
<th>File</th>
|
||||
<th>Jadwal Rilis</th>
|
||||
<th>Status</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($peraturanPerundangUndangans as $peraturanPerundangUndangan)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $peraturanPerundangUndangan->judul }}</td>
|
||||
<td><a href="{{ url($peraturanPerundangUndangan->nama_file) }}"
|
||||
download
|
||||
target="_blank">{{ $peraturanPerundangUndangan->nama_file }}</a>
|
||||
</td>
|
||||
<td>{{ $peraturanPerundangUndangan->release_date }}</td>
|
||||
@if ($peraturanPerundangUndangan->deleted_at == '')
|
||||
@if ($peraturanPerundangUndangan->release_date <= date('Y-m-d'))
|
||||
<td>Rilis</td>
|
||||
@else
|
||||
<td>Belum Rilis</td>
|
||||
@endif
|
||||
@else ($peraturanPerundangUndangan->deleted_at != "")
|
||||
<td>Terhapus</td>
|
||||
@endif
|
||||
@if ($peraturanPerundangUndangan->deleted_at == '')
|
||||
<td>
|
||||
<button href="#formModalEdit" role="button" data-toggle="modal"
|
||||
data-id="{{ $peraturanPerundangUndangan->id }}"
|
||||
data-judul="{{ $peraturanPerundangUndangan->judul }}"
|
||||
data-nama_file="{{ $peraturanPerundangUndangan->nama_file }}"
|
||||
data-release_date="{{ $peraturanPerundangUndangan->release_date }}"
|
||||
class="btn btn-warning open-formModalEdit"><i
|
||||
class="fa fa-edit"></i> Edit</button>
|
||||
<form
|
||||
action="{{ route('peraturan_perundang_undangan.destroy', $peraturanPerundangUndangan) }}"
|
||||
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/peraturan_perundang_undangan/' . $peraturanPerundangUndangan->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/peraturan_perundang_undangan/' . $peraturanPerundangUndangan->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 Peraturan & Perundang Undangan</h5>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal" aria-label="Close">X</button>
|
||||
</div>
|
||||
<form id="formAdd" action="{{ url('/admin/peraturan_perundang_undangan') }}" method="post"
|
||||
enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="modal-body">
|
||||
<div class="form-group mt-2">
|
||||
<label for="judul">Judul</label>
|
||||
<input type="text" class="form-control mt-0" name="judul" id="judul" required maxlength="255"
|
||||
placeholder=". . .">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="nama_file">File Peraturan & Perundang Undangan</label>
|
||||
<input type="file" id="input_file_add" class="form-control mt-0" name="nama_file"
|
||||
required onchange="Filevalidation()" accept="application/pdf">
|
||||
</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 ($peraturanPerundangUndangans as $peraturanPerundangUndangan)
|
||||
<!-- 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 Peraturan & Perundang Undangan</h5>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal" aria-label="Close">X</button>
|
||||
</div>
|
||||
<form id="formEdit" action="{{ route('peraturan_perundang_undangan.update', $peraturanPerundangUndangan->id) }}"
|
||||
method="POST" enctype="multipart/form-data">
|
||||
@method('patch')
|
||||
@csrf
|
||||
<div class="modal-body">
|
||||
<input type="hidden" name="id" id="id">
|
||||
<div class="form-group mt-2">
|
||||
<label for="judul">Nama</label>
|
||||
<input type="text" class="form-control mt-0" name="judul" id="judul" required
|
||||
maxlength="255" placeholder=". . .">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="nama_file">File Peraturan & Perundang Undangan</label>
|
||||
<input type="file" id="input_file_edit" class="form-control mt-0" name="nama_file"
|
||||
id="nama_file" accept="application/pdf">
|
||||
</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_peraturan_perundang_undangan").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_peraturan_perundang_undangan_wrapper .col-md-6:eq(0)');
|
||||
});
|
||||
|
||||
$(document).on("click", ".open-formModalEdit", function() {
|
||||
var id = $(this).data('id');
|
||||
var judul = $(this).data('judul');
|
||||
var nama_file = $(this).data('nama_file');
|
||||
var release_date = $(this).data('release_date');
|
||||
|
||||
$(".modal-body #id").val(id);
|
||||
$(".modal-body #judul").val(judul);
|
||||
$(".modal-body #release_date").val(release_date);
|
||||
$(".modal-body #nama_file").val(nama_file);
|
||||
$(".modal-body #input_file_edit").val("");
|
||||
});
|
||||
|
||||
//Form add image validation
|
||||
var uploadField = document.getElementById("input_file_add");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
};
|
||||
};
|
||||
|
||||
//Form edit image validation
|
||||
var uploadField = document.getElementById("input_file_edit");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
};
|
||||
};
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,182 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Perpustakaan')
|
||||
|
||||
@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">Perpustakaan</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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">Edit Menu Perpustakaan</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<form class="from-prevent-multiple-submits" action="{{ route('perpustakaan.update', $perpustakaan->id) }}" method="POST">
|
||||
@method('patch')
|
||||
@csrf
|
||||
<textarea id="teks" placeholder="Enter the Description"
|
||||
name="teks">{{ $perpustakaan->teks }}</textarea>
|
||||
<br>
|
||||
<button id="submit" type="submit" class="btn btn-primary from-prevent-multiple-submits">Save</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
<script>
|
||||
//Define an adapter to upload the files
|
||||
class MyUploadAdapter {
|
||||
constructor(loader) {
|
||||
// The file loader instance to use during the upload. It sounds scary but do not
|
||||
// worry — the loader will be passed into the adapter later on in this guide.
|
||||
this.loader = loader;
|
||||
|
||||
// URL where to send files.
|
||||
this.url = '{{ route('ckeditor.upload') }}';
|
||||
|
||||
//
|
||||
}
|
||||
// Starts the upload process.
|
||||
upload() {
|
||||
return this.loader.file.then(
|
||||
(file) =>
|
||||
new Promise((resolve, reject) => {
|
||||
this._initRequest();
|
||||
this._initListeners(resolve, reject, file);
|
||||
this._sendRequest(file);
|
||||
})
|
||||
);
|
||||
}
|
||||
// Aborts the upload process.
|
||||
abort() {
|
||||
if (this.xhr) {
|
||||
this.xhr.abort();
|
||||
}
|
||||
}
|
||||
// Initializes the XMLHttpRequest object using the URL passed to the constructor.
|
||||
_initRequest() {
|
||||
const xhr = (this.xhr = new XMLHttpRequest());
|
||||
// Note that your request may look different. It is up to you and your editor
|
||||
// integration to choose the right communication channel. This example uses
|
||||
// a POST request with JSON as a data structure but your configuration
|
||||
// could be different.
|
||||
// xhr.open('POST', this.url, true);
|
||||
xhr.open("POST", this.url, true);
|
||||
xhr.setRequestHeader("x-csrf-token", "{{ csrf_token() }}");
|
||||
xhr.responseType = "json";
|
||||
}
|
||||
// Initializes XMLHttpRequest listeners.
|
||||
_initListeners(resolve, reject, file) {
|
||||
const xhr = this.xhr;
|
||||
const loader = this.loader;
|
||||
const genericErrorText = `Couldn't upload file: ${file.name}.`;
|
||||
xhr.addEventListener("error", () => reject(genericErrorText));
|
||||
xhr.addEventListener("abort", () => reject());
|
||||
xhr.addEventListener("load", () => {
|
||||
const response = xhr.response;
|
||||
// This example assumes the XHR server's "response" object will come with
|
||||
// an "error" which has its own "message" that can be passed to reject()
|
||||
// in the upload promise.
|
||||
//
|
||||
// Your integration may handle upload errors in a different way so make sure
|
||||
// it is done properly. The reject() function must be called when the upload fails.
|
||||
if (!response || response.error) {
|
||||
return reject(response && response.error ? response.error.message : genericErrorText);
|
||||
}
|
||||
// If the upload is successful, resolve the upload promise with an object containing
|
||||
// at least the "default" URL, pointing to the image on the server.
|
||||
// This URL will be used to display the image in the content. Learn more in the
|
||||
// UploadAdapter#upload documentation.
|
||||
resolve({
|
||||
default: response.url,
|
||||
});
|
||||
});
|
||||
// Upload progress when it is supported. The file loader has the #uploadTotal and #uploaded
|
||||
// properties which are used e.g. to display the upload progress bar in the editor
|
||||
// user interface.
|
||||
if (xhr.upload) {
|
||||
xhr.upload.addEventListener("progress", (evt) => {
|
||||
if (evt.lengthComputable) {
|
||||
loader.uploadTotal = evt.total;
|
||||
loader.uploaded = evt.loaded;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// Prepares the data and sends the request.
|
||||
_sendRequest(file) {
|
||||
// Prepare the form data.
|
||||
const data = new FormData();
|
||||
data.append("upload", file);
|
||||
// Important note: This is the right place to implement security mechanisms
|
||||
// like authentication and CSRF protection. For instance, you can use
|
||||
// XMLHttpRequest.setRequestHeader() to set the request headers containing
|
||||
// the CSRF token generated earlier by your application.
|
||||
// Send the request.
|
||||
this.xhr.send(data);
|
||||
}
|
||||
// ...
|
||||
}
|
||||
|
||||
function SimpleUploadAdapterPlugin(editor) {
|
||||
editor.plugins.get("FileRepository").createUploadAdapter = (loader) => {
|
||||
// Configure the URL to the upload script in your back-end here!
|
||||
return new MyUploadAdapter(loader);
|
||||
};
|
||||
}
|
||||
|
||||
//Initialize the ckeditor
|
||||
ClassicEditor.create(document.querySelector("#teks"), {
|
||||
extraPlugins: [SimpleUploadAdapterPlugin],
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
$('.from-prevent-multiple-submits').on('submit', function(){
|
||||
$('.from-prevent-multiple-submits').attr('disabled','true');
|
||||
})
|
||||
})();
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,140 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Pertanyaan')
|
||||
|
||||
@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">Pertanyaan</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 Pertanyaan</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_pertanyaan" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nomor</th>
|
||||
<th>Nama</th>
|
||||
<th>Email</th>
|
||||
<th>Pertanyaan</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($pertanyaans as $pertanyaan)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $pertanyaan->nama }}</td>
|
||||
<td>{{ $pertanyaan->email }}</td>
|
||||
<td>{{ $pertanyaan->pertanyaan }}</td>
|
||||
@if ($pertanyaan->deleted_at == '')
|
||||
<td>
|
||||
<form
|
||||
action="{{ route('pertanyaan.destroy', $pertanyaan) }}"
|
||||
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/pertanyaan/' . $pertanyaan->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/pertanyaan/' . $pertanyaan->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>
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
<!--Data Table -->
|
||||
<script>
|
||||
$(function () {
|
||||
$("#tabel_pertanyaan").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_pertanyaan_wrapper .col-md-6:eq(0)');
|
||||
});
|
||||
|
||||
$(document).on("click", ".open-formModalEdit", function () {
|
||||
var id = $(this).data('id');
|
||||
var nama = $(this).data('nama');
|
||||
var email = $(this).data('email');
|
||||
var pertanyaan = $(this).data('pertanyaan');
|
||||
var answer = $(this).data('answer');
|
||||
var status = $(this).data('status');
|
||||
|
||||
$(".modal-body #id").val(id);
|
||||
$(".modal-body #nama").val(nama);
|
||||
$(".modal-body #email").val(email);
|
||||
$(".modal-body #pertanyaan").val(pertanyaan);
|
||||
$(".modal-body #answer").val(answer);
|
||||
$(".modal-body #status").val(status);
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,235 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Prestasi & Aktivitas Mahasiswa')
|
||||
|
||||
@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">Prestasi & Aktivitas Mahasiswa</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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">Tambah Data Prestasi & Aktivitas Mahasiswa</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<!-- form start -->
|
||||
<form class="from-prevent-multiple-submits" action="{{ route('prestasi_aktivitas_mahasiswa.store') }}" method="POST"
|
||||
id="ckeditorForm" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label for="judul">Judul</label>
|
||||
<input type="text" class="form-control" id="judul" name="judul"
|
||||
placeholder="Masukkan Judul" value="" required maxlength="255">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="nama_foto">Thumbnail (Maksimal 2MB)</label>
|
||||
<div class="form-group">
|
||||
<img id="img_preview_add" style="max-width: 200px;"
|
||||
class="mt-2" />
|
||||
</div>
|
||||
<input type="file" accept="image/*" class="form-control mt-0"
|
||||
name="thumbnail" id="input_foto_add" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="teks">Teks (Foto Maksimal 2MB)</label>
|
||||
<textarea id="teks" placeholder="Masukkan Teks" name="teks"
|
||||
class="ck_editor_txt" id="ck_editor_txt"></textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="release_date">Tanggal Rilis</label>
|
||||
<input type="date" class="form-control" name="release_date" required>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
|
||||
<div class="card-footer">
|
||||
<button id="submit" type="submit" class="btn btn-primary from-prevent-multiple-submits">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
//Define an adapter to upload the files
|
||||
class MyUploadAdapter {
|
||||
constructor(loader) {
|
||||
// The file loader instance to use during the upload. It sounds scary but do not
|
||||
// worry — the loader will be passed into the adapter later on in this guide.
|
||||
this.loader = loader;
|
||||
|
||||
// URL where to send files.
|
||||
this.url = '{{ route('ckeditor.upload') }}';
|
||||
|
||||
//
|
||||
}
|
||||
// Starts the upload process.
|
||||
upload() {
|
||||
return this.loader.file.then(
|
||||
(file) =>
|
||||
new Promise((resolve, reject) => {
|
||||
this._initRequest();
|
||||
this._initListeners(resolve, reject, file);
|
||||
this._sendRequest(file);
|
||||
})
|
||||
);
|
||||
}
|
||||
// Aborts the upload process.
|
||||
abort() {
|
||||
if (this.xhr) {
|
||||
this.xhr.abort();
|
||||
}
|
||||
}
|
||||
// Initializes the XMLHttpRequest object using the URL passed to the constructor.
|
||||
_initRequest() {
|
||||
const xhr = (this.xhr = new XMLHttpRequest());
|
||||
// Note that your request may look different. It is up to you and your editor
|
||||
// integration to choose the right communication channel. This example uses
|
||||
// a POST request with JSON as a data structure but your configuration
|
||||
// could be different.
|
||||
// xhr.open('POST', this.url, true);
|
||||
xhr.open("POST", this.url, true);
|
||||
xhr.setRequestHeader("x-csrf-token", "{{ csrf_token() }}");
|
||||
xhr.responseType = "json";
|
||||
}
|
||||
// Initializes XMLHttpRequest listeners.
|
||||
_initListeners(resolve, reject, file) {
|
||||
const xhr = this.xhr;
|
||||
const loader = this.loader;
|
||||
const genericErrorText = `Couldn't upload file: ${file.name}.`;
|
||||
xhr.addEventListener("error", () => reject(genericErrorText));
|
||||
xhr.addEventListener("abort", () => reject());
|
||||
xhr.addEventListener("load", () => {
|
||||
const response = xhr.response;
|
||||
// This example assumes the XHR server's "response" object will come with
|
||||
// an "error" which has its own "message" that can be passed to reject()
|
||||
// in the upload promise.
|
||||
//
|
||||
// Your integration may handle upload errors in a different way so make sure
|
||||
// it is done properly. The reject() function must be called when the upload fails.
|
||||
if (!response || response.error) {
|
||||
return reject(response && response.error ? response.error.message : genericErrorText);
|
||||
}
|
||||
// If the upload is successful, resolve the upload promise with an object containing
|
||||
// at least the "default" URL, pointing to the image on the server.
|
||||
// This URL will be used to display the image in the content. Learn more in the
|
||||
// UploadAdapter#upload documentation.
|
||||
resolve({
|
||||
default: response.url,
|
||||
});
|
||||
});
|
||||
// Upload progress when it is supported. The file loader has the #uploadTotal and #uploaded
|
||||
// properties which are used e.g. to display the upload progress bar in the editor
|
||||
// user interface.
|
||||
if (xhr.upload) {
|
||||
xhr.upload.addEventListener("progress", (evt) => {
|
||||
if (evt.lengthComputable) {
|
||||
loader.uploadTotal = evt.total;
|
||||
loader.uploaded = evt.loaded;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// Prepares the data and sends the request.
|
||||
_sendRequest(file) {
|
||||
// Prepare the form data.
|
||||
const data = new FormData();
|
||||
data.append("upload", file);
|
||||
// Important note: This is the right place to implement security mechanisms
|
||||
// like authentication and CSRF protection. For instance, you can use
|
||||
// XMLHttpRequest.setRequestHeader() to set the request headers containing
|
||||
// the CSRF token generated earlier by your application.
|
||||
// Send the request.
|
||||
this.xhr.send(data);
|
||||
}
|
||||
// ...
|
||||
}
|
||||
|
||||
function SimpleUploadAdapterPlugin(editor) {
|
||||
editor.plugins.get("FileRepository").createUploadAdapter = (loader) => {
|
||||
// Configure the URL to the upload script in your back-end here!
|
||||
return new MyUploadAdapter(loader);
|
||||
};
|
||||
}
|
||||
|
||||
var allEditors = document.querySelector('.ck_editor_txt');
|
||||
|
||||
//Initialize the ckeditor
|
||||
ClassicEditor.create(document.querySelector("#teks"), {
|
||||
extraPlugins: [SimpleUploadAdapterPlugin],
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
$("#ckeditorForm").submit(function(e) {
|
||||
var content = $('.ck_editor_txt').val();
|
||||
html = $(content).text();
|
||||
if ($.trim(html) == '') {
|
||||
alert("Teks Tidak Boleh Kosong!");
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
//Form add image validation
|
||||
var uploadField = document.getElementById("input_foto_add");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
} else {
|
||||
//Ubah Img Preview
|
||||
var reader = new FileReader();
|
||||
reader.onload = function() {
|
||||
var output = document.getElementById('img_preview_add');
|
||||
output.src = reader.result;
|
||||
}
|
||||
reader.readAsDataURL(event.target.files[0]);
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
$('.from-prevent-multiple-submits').on('submit', function(){
|
||||
$('.from-prevent-multiple-submits').attr('disabled','true');
|
||||
})
|
||||
})();
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,231 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Prestasi Aktivitas Mahasiswa')
|
||||
|
||||
@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">Prestasi Aktivitas Mahasiswa</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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">Edit Data Prestasi Aktivitas Mahasiswa</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<!-- form start -->
|
||||
<form
|
||||
action="{{ route('prestasi_aktivitas_mahasiswa.update', $prestasiAktivitasMahasiswa) }}"
|
||||
method="POST" enctype="multipart/form-data">
|
||||
@method('patch')
|
||||
@csrf
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label for="judul">Judul</label>
|
||||
<input type="text" class="form-control" id="judul" name="judul"
|
||||
placeholder="Masukkan Judul" maxlength="255"
|
||||
value="{{ $prestasiAktivitasMahasiswa->judul }}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="nama_foto">Foto (Maksimal 2MB)</label>
|
||||
<div class="form-group">
|
||||
<img src="{{ url($prestasiAktivitasMahasiswa->thumbnail) }}"
|
||||
alt="Image Missing" id="old_nama_foto" style="max-width: 200px;"
|
||||
class="mt-2" />
|
||||
</div>
|
||||
<input type="file" accept="image/*" class="form-control mt-0"
|
||||
name="thumbnail" id="input_foto_edit">
|
||||
<input type="hidden" name="old_thumbnail"
|
||||
value="{{ $prestasiAktivitasMahasiswa->thumbnail }}">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="teks">Teks (Foto Maksimal 2MB)</label>
|
||||
<textarea id="teks" placeholder="Masukkan Deskripsi Video"
|
||||
name="teks">{{ $prestasiAktivitasMahasiswa->teks }}</textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="release_date">Tanggal Rilis</label>
|
||||
<input type="date" class="form-control" name="release_date"
|
||||
value="{{ $prestasiAktivitasMahasiswa->release_date }}" required>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
|
||||
<div class="card-footer">
|
||||
<button id="submit" type="submit"
|
||||
class="btn btn-primary from-prevent-multiple-submits">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
//Define an adapter to upload the files
|
||||
class MyUploadAdapter {
|
||||
constructor(loader) {
|
||||
// The file loader instance to use during the upload. It sounds scary but do not
|
||||
// worry — the loader will be passed into the adapter later on in this guide.
|
||||
this.loader = loader;
|
||||
|
||||
// URL where to send files.
|
||||
this.url = '{{ route('ckeditor.upload') }}';
|
||||
|
||||
//
|
||||
}
|
||||
// Starts the upload process.
|
||||
upload() {
|
||||
return this.loader.file.then(
|
||||
(file) =>
|
||||
new Promise((resolve, reject) => {
|
||||
this._initRequest();
|
||||
this._initListeners(resolve, reject, file);
|
||||
this._sendRequest(file);
|
||||
})
|
||||
);
|
||||
}
|
||||
// Aborts the upload process.
|
||||
abort() {
|
||||
if (this.xhr) {
|
||||
this.xhr.abort();
|
||||
}
|
||||
}
|
||||
// Initializes the XMLHttpRequest object using the URL passed to the constructor.
|
||||
_initRequest() {
|
||||
const xhr = (this.xhr = new XMLHttpRequest());
|
||||
// Note that your request may look different. It is up to you and your editor
|
||||
// integration to choose the right communication channel. This example uses
|
||||
// a POST request with JSON as a data structure but your configuration
|
||||
// could be different.
|
||||
// xhr.open('POST', this.url, true);
|
||||
xhr.open("POST", this.url, true);
|
||||
xhr.setRequestHeader("x-csrf-token", "{{ csrf_token() }}");
|
||||
xhr.responseType = "json";
|
||||
}
|
||||
// Initializes XMLHttpRequest listeners.
|
||||
_initListeners(resolve, reject, file) {
|
||||
const xhr = this.xhr;
|
||||
const loader = this.loader;
|
||||
const genericErrorText = `Couldn't upload file: ${file.name}.`;
|
||||
xhr.addEventListener("error", () => reject(genericErrorText));
|
||||
xhr.addEventListener("abort", () => reject());
|
||||
xhr.addEventListener("load", () => {
|
||||
const response = xhr.response;
|
||||
// This example assumes the XHR server's "response" object will come with
|
||||
// an "error" which has its own "message" that can be passed to reject()
|
||||
// in the upload promise.
|
||||
//
|
||||
// Your integration may handle upload errors in a different way so make sure
|
||||
// it is done properly. The reject() function must be called when the upload fails.
|
||||
if (!response || response.error) {
|
||||
return reject(response && response.error ? response.error.message : genericErrorText);
|
||||
}
|
||||
// If the upload is successful, resolve the upload promise with an object containing
|
||||
// at least the "default" URL, pointing to the image on the server.
|
||||
// This URL will be used to display the image in the content. Learn more in the
|
||||
// UploadAdapter#upload documentation.
|
||||
resolve({
|
||||
default: response.url,
|
||||
});
|
||||
});
|
||||
// Upload progress when it is supported. The file loader has the #uploadTotal and #uploaded
|
||||
// properties which are used e.g. to display the upload progress bar in the editor
|
||||
// user interface.
|
||||
if (xhr.upload) {
|
||||
xhr.upload.addEventListener("progress", (evt) => {
|
||||
if (evt.lengthComputable) {
|
||||
loader.uploadTotal = evt.total;
|
||||
loader.uploaded = evt.loaded;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// Prepares the data and sends the request.
|
||||
_sendRequest(file) {
|
||||
// Prepare the form data.
|
||||
const data = new FormData();
|
||||
data.append("upload", file);
|
||||
// Important note: This is the right place to implement security mechanisms
|
||||
// like authentication and CSRF protection. For instance, you can use
|
||||
// XMLHttpRequest.setRequestHeader() to set the request headers containing
|
||||
// the CSRF token generated earlier by your application.
|
||||
// Send the request.
|
||||
this.xhr.send(data);
|
||||
}
|
||||
// ...
|
||||
}
|
||||
|
||||
function SimpleUploadAdapterPlugin(editor) {
|
||||
editor.plugins.get("FileRepository").createUploadAdapter = (loader) => {
|
||||
// Configure the URL to the upload script in your back-end here!
|
||||
return new MyUploadAdapter(loader);
|
||||
};
|
||||
}
|
||||
|
||||
//Initialize the ckeditor
|
||||
ClassicEditor.create(document.querySelector("#teks"), {
|
||||
extraPlugins: [SimpleUploadAdapterPlugin],
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
//Form edit image validation
|
||||
var uploadField = document.getElementById("input_foto_edit");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
} else {
|
||||
//Ubah Img Preview
|
||||
var reader = new FileReader();
|
||||
reader.onload = function() {
|
||||
var output = document.getElementById('old_nama_foto');
|
||||
output.src = reader.result;
|
||||
}
|
||||
reader.readAsDataURL(event.target.files[0]);
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
$('.from-prevent-multiple-submits').on('submit', function() {
|
||||
$('.from-prevent-multiple-submits').attr('disabled', 'true');
|
||||
})
|
||||
})();
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,159 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Prestasi & Aktivitas Mahasiswa')
|
||||
|
||||
@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">Prestasi & Aktivitas Mahasiswa</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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 Prestasi & Aktivitas Mahasiswa</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-12 text-left">
|
||||
<a type="button" href="{{ url('/admin/prestasi_aktivitas_mahasiswa/create') }}"
|
||||
class="btn btn-success mb-3"><i class="fa fa-plus-circle"></i>
|
||||
Tambah Data Prestasi & Aktivitas Mahasiswa
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_prestasi_aktivitas_mahasiswa"
|
||||
class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nomor</th>
|
||||
<th>Judul</th>
|
||||
<th>Thumbnail</th>
|
||||
<th>Teks</th>
|
||||
<th>Jadwal Rilis</th>
|
||||
<th>Status</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($prestasiAktivitasMahasiswas as $prestasiAktivitasMahasiswa)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $prestasiAktivitasMahasiswa->judul }}</td>
|
||||
<td>
|
||||
<img src="{{ url($prestasiAktivitasMahasiswa->thumbnail) }}"
|
||||
alt="Image Missing" style="width: 100px;">
|
||||
</td>
|
||||
<td>
|
||||
@if (strlen(strip_tags($prestasiAktivitasMahasiswa->teks)) > 100)
|
||||
{{ str_replace(' ', '', substr(strip_tags($prestasiAktivitasMahasiswa->teks), 0, 100) . '...') }}
|
||||
@else
|
||||
{{ str_replace(' ', '', substr(strip_tags($prestasiAktivitasMahasiswa->teks), 0, 100)) }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $prestasiAktivitasMahasiswa->release_date }}</td>
|
||||
<td>
|
||||
@if ($prestasiAktivitasMahasiswa->deleted_at != '')
|
||||
Terhapus
|
||||
@elseif ($prestasiAktivitasMahasiswa->release_date > date('Y-m-d'))
|
||||
Belum Rilis
|
||||
@else
|
||||
Rilis
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($prestasiAktivitasMahasiswa->deleted_at != '')
|
||||
<form
|
||||
action="{{ url('/admin/prestasi_aktivitas_mahasiswa/' . $prestasiAktivitasMahasiswa->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/prestasi_aktivitas_mahasiswa/' . $prestasiAktivitasMahasiswa->id . '/delete_permanen') }}"
|
||||
method="post">
|
||||
@csrf
|
||||
<input type="hidden" name="thumbnail"
|
||||
value="{{ $prestasiAktivitasMahasiswa->thumbnail }}">
|
||||
<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>
|
||||
@else
|
||||
<a href="{{ route('prestasi_aktivitas_mahasiswa.edit', $prestasiAktivitasMahasiswa) }}"
|
||||
class="btn btn-warning open-formModalEdit">
|
||||
<i class="fa fa-edit"></i> Edit
|
||||
</a>
|
||||
<form
|
||||
action="{{ route('prestasi_aktivitas_mahasiswa.destroy', $prestasiAktivitasMahasiswa) }}"
|
||||
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>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<!--Data Table -->
|
||||
<script>
|
||||
$(function() {
|
||||
$("#tabel_prestasi_aktivitas_mahasiswa").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_prestasi_aktivitas_mahasiswa_wrapper .col-md-6:eq(0)');
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,104 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Profil Singkat')
|
||||
|
||||
@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">Profil Singkat</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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">Edit Menu Profil Singkat</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<form class="from-prevent-multiple-submits"
|
||||
action="{{ route('profil_singkat.update', $profilSingkat->id) }}" method="POST"
|
||||
enctype="multipart/form-data">
|
||||
@method('patch')
|
||||
@csrf
|
||||
<input type="hidden" name="id" value="{{ $profilSingkat->id }}">
|
||||
<div class="form-group">
|
||||
<label for="nama_foto">Foto (Maksimal 2MB)</label>
|
||||
<div class="form-group">
|
||||
<img id="img_preview_add" src="{{ url($profilSingkat->nama_foto) }}"
|
||||
style="width:300px;">
|
||||
</div>
|
||||
<input type="file" accept="image/*" class="form-control mt-0" name="nama_foto"
|
||||
id="input_foto_add">
|
||||
</div>
|
||||
<div class=" form-group">
|
||||
<textarea class="form-control" style="width : 40rem;height:20rem" type="text"
|
||||
id="teks" name="teks"
|
||||
maxlength="255">{{ $profilSingkat->teks }}</textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-success"> Save </button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
//Form add image validation
|
||||
var uploadField = document.getElementById("input_foto_add");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
} else {
|
||||
//Ubah Img Preview
|
||||
var reader = new FileReader();
|
||||
reader.onload = function() {
|
||||
var output = document.getElementById('img_preview_add');
|
||||
output.src = reader.result;
|
||||
}
|
||||
reader.readAsDataURL(event.target.files[0]);
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
$('.from-prevent-multiple-submits').on('submit', function() {
|
||||
$('.from-prevent-multiple-submits').attr('disabled', 'true');
|
||||
})
|
||||
})();
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,317 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Quote')
|
||||
|
||||
@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">Quote</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 Quote</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 Quote
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_quote" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nomor</th>
|
||||
<th>Teks</th>
|
||||
<th>Foto</th>
|
||||
<th>Sumber</th>
|
||||
<th>Jadwal Rilis</th>
|
||||
<th>Status</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($quotes as $quote)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $quote->teks }}</td>
|
||||
<td><img src="{{ url($quote->nama_foto) }}"
|
||||
style="width:100px;height:auto;object-fit:cover"></td>
|
||||
<td>{{ $quote->sumber }}</td>
|
||||
<td>{{ $quote->release_date }}</td>
|
||||
@if ($quote->deleted_at == '')
|
||||
@if ($quote->release_date <= date('Y-m-d'))
|
||||
<td>Rilis</td>
|
||||
@else
|
||||
<td>Belum Rilis</td>
|
||||
@endif
|
||||
@else ($quote->deleted_at != "")
|
||||
<td>Terhapus</td>
|
||||
@endif
|
||||
@if ($quote->deleted_at == '')
|
||||
<td>
|
||||
<button href="#formModalEdit" role="button" data-toggle="modal"
|
||||
data-id="{{ $quote->id }}"
|
||||
data-teks="{{ $quote->teks }}"
|
||||
data-nama_foto="{{ url($quote->nama_foto) }}"
|
||||
data-sumber="{{ $quote->sumber }}"
|
||||
data-release_date="{{ $quote->release_date }}"
|
||||
class="btn btn-warning open-formModalEdit"><i
|
||||
class="fa fa-edit"></i> Edit</button>
|
||||
<form action="{{ route('quote.destroy', $quote) }}"
|
||||
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/quote/' . $quote->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/quote/' . $quote->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 Quote</h5>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal" aria-label="Close">X</button>
|
||||
</div>
|
||||
<form id="formAdd" action="{{ url('/admin/quote') }}" method="post" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="modal-body">
|
||||
<div class="form-group mt-2">
|
||||
<label for="teks">Teks Quotes</label>
|
||||
<input type="text" class="form-control mt-0" name="teks" required maxlength="255"
|
||||
placeholder=". . .">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="nama_foto">Foto (Maksimal 2MB)</label>
|
||||
<div class="form-group">
|
||||
<img id="img_preview_add" style="max-width: 200px;" class="mt-2" />
|
||||
</div>
|
||||
<input type="file" accept="image/*" class="form-control mt-0" name="nama_foto"
|
||||
id="input_foto_add" required>
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="sumber">Sumber</label>
|
||||
<input type="text" class="form-control mt-0" name="sumber" 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 ($quotes as $quote)
|
||||
<!-- 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 Quote</h5>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal" aria-label="Close">X</button>
|
||||
</div>
|
||||
<form id="formEdit" action="{{ route('quote.update', $quote->id) }}" method="POST" enctype="multipart/form-data">
|
||||
@method('patch')
|
||||
@csrf
|
||||
<div class="modal-body">
|
||||
<input type="hidden" name="id" id="id">
|
||||
<div class="form-group mt-2">
|
||||
<label for="teks">Teks (Foto Maksimal 2MB)</label>
|
||||
<input type="text" class="form-control mt-0" name="teks" id="teks" required maxlength="255"
|
||||
placeholder=". . .">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="nama_foto">Foto (Maksimal 2MB)</label>
|
||||
<div class="form-group">
|
||||
<img src="" alt="Image Missing" id="old_nama_foto" style="max-width: 200px;"
|
||||
class="mt-2" />
|
||||
</div>
|
||||
<input type="file" accept="image/*" class="form-control mt-0" name="nama_foto"
|
||||
id="input_foto_edit">
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="sumber">Sumber</label>
|
||||
<input type="text" class="form-control mt-0" name="sumber" id="sumber" 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_quote").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_quote_wrapper .col-md-6:eq(0)');
|
||||
});
|
||||
|
||||
$(document).on("click", ".open-formModalEdit", function() {
|
||||
var id = $(this).data('id');
|
||||
var teks = $(this).data('teks');
|
||||
var sumber = $(this).data('sumber');
|
||||
var nama_foto = $(this).data('nama_foto');
|
||||
var release_date = $(this).data('release_date');
|
||||
|
||||
$(".modal-body #id").val(id);
|
||||
$(".modal-body #teks").val(teks);
|
||||
$(".modal-body #sumber").val(sumber);
|
||||
$(".modal-body #release_date").val(release_date);
|
||||
$(".modal-body #old_nama_foto").attr('src', nama_foto);
|
||||
});
|
||||
|
||||
var uploadField = document.getElementById("input_foto_add");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
} else {
|
||||
//Ubah Img Preview
|
||||
var reader = new FileReader();
|
||||
reader.onload = function() {
|
||||
var output = document.getElementById('img_preview_add');
|
||||
output.src = reader.result;
|
||||
}
|
||||
reader.readAsDataURL(event.target.files[0]);
|
||||
};
|
||||
};
|
||||
//Form edit image validation
|
||||
var uploadField = document.getElementById("input_foto_edit");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
} else {
|
||||
//Ubah Img Preview
|
||||
var reader = new FileReader();
|
||||
reader.onload = function() {
|
||||
var output = document.getElementById('old_nama_foto');
|
||||
output.src = reader.result;
|
||||
}
|
||||
reader.readAsDataURL(event.target.files[0]);
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
$('.from-prevent-multiple-submits').on('submit', function(){
|
||||
$('.from-prevent-multiple-submits').attr('disabled','true');
|
||||
})
|
||||
})();
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,182 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Ruang Lab')
|
||||
|
||||
@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">Ruang Lab</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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">Edit Menu Ruang Lab</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<form class="from-prevent-multiple-submits" action="{{ route('ruang_lab.update', $ruangLab->id) }}" method="POST">
|
||||
@method('patch')
|
||||
@csrf
|
||||
<textarea id="teks" placeholder="Enter the Description"
|
||||
name="teks">{{ $ruangLab->teks }}</textarea>
|
||||
<br>
|
||||
<button id="submit" type="submit" class="btn btn-primary from-prevent-multiple-submits">Save</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
<script>
|
||||
//Define an adapter to upload the files
|
||||
class MyUploadAdapter {
|
||||
constructor(loader) {
|
||||
// The file loader instance to use during the upload. It sounds scary but do not
|
||||
// worry — the loader will be passed into the adapter later on in this guide.
|
||||
this.loader = loader;
|
||||
|
||||
// URL where to send files.
|
||||
this.url = '{{ route('ckeditor.upload') }}';
|
||||
|
||||
//
|
||||
}
|
||||
// Starts the upload process.
|
||||
upload() {
|
||||
return this.loader.file.then(
|
||||
(file) =>
|
||||
new Promise((resolve, reject) => {
|
||||
this._initRequest();
|
||||
this._initListeners(resolve, reject, file);
|
||||
this._sendRequest(file);
|
||||
})
|
||||
);
|
||||
}
|
||||
// Aborts the upload process.
|
||||
abort() {
|
||||
if (this.xhr) {
|
||||
this.xhr.abort();
|
||||
}
|
||||
}
|
||||
// Initializes the XMLHttpRequest object using the URL passed to the constructor.
|
||||
_initRequest() {
|
||||
const xhr = (this.xhr = new XMLHttpRequest());
|
||||
// Note that your request may look different. It is up to you and your editor
|
||||
// integration to choose the right communication channel. This example uses
|
||||
// a POST request with JSON as a data structure but your configuration
|
||||
// could be different.
|
||||
// xhr.open('POST', this.url, true);
|
||||
xhr.open("POST", this.url, true);
|
||||
xhr.setRequestHeader("x-csrf-token", "{{ csrf_token() }}");
|
||||
xhr.responseType = "json";
|
||||
}
|
||||
// Initializes XMLHttpRequest listeners.
|
||||
_initListeners(resolve, reject, file) {
|
||||
const xhr = this.xhr;
|
||||
const loader = this.loader;
|
||||
const genericErrorText = `Couldn't upload file: ${file.name}.`;
|
||||
xhr.addEventListener("error", () => reject(genericErrorText));
|
||||
xhr.addEventListener("abort", () => reject());
|
||||
xhr.addEventListener("load", () => {
|
||||
const response = xhr.response;
|
||||
// This example assumes the XHR server's "response" object will come with
|
||||
// an "error" which has its own "message" that can be passed to reject()
|
||||
// in the upload promise.
|
||||
//
|
||||
// Your integration may handle upload errors in a different way so make sure
|
||||
// it is done properly. The reject() function must be called when the upload fails.
|
||||
if (!response || response.error) {
|
||||
return reject(response && response.error ? response.error.message : genericErrorText);
|
||||
}
|
||||
// If the upload is successful, resolve the upload promise with an object containing
|
||||
// at least the "default" URL, pointing to the image on the server.
|
||||
// This URL will be used to display the image in the content. Learn more in the
|
||||
// UploadAdapter#upload documentation.
|
||||
resolve({
|
||||
default: response.url,
|
||||
});
|
||||
});
|
||||
// Upload progress when it is supported. The file loader has the #uploadTotal and #uploaded
|
||||
// properties which are used e.g. to display the upload progress bar in the editor
|
||||
// user interface.
|
||||
if (xhr.upload) {
|
||||
xhr.upload.addEventListener("progress", (evt) => {
|
||||
if (evt.lengthComputable) {
|
||||
loader.uploadTotal = evt.total;
|
||||
loader.uploaded = evt.loaded;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// Prepares the data and sends the request.
|
||||
_sendRequest(file) {
|
||||
// Prepare the form data.
|
||||
const data = new FormData();
|
||||
data.append("upload", file);
|
||||
// Important note: This is the right place to implement security mechanisms
|
||||
// like authentication and CSRF protection. For instance, you can use
|
||||
// XMLHttpRequest.setRequestHeader() to set the request headers containing
|
||||
// the CSRF token generated earlier by your application.
|
||||
// Send the request.
|
||||
this.xhr.send(data);
|
||||
}
|
||||
// ...
|
||||
}
|
||||
|
||||
function SimpleUploadAdapterPlugin(editor) {
|
||||
editor.plugins.get("FileRepository").createUploadAdapter = (loader) => {
|
||||
// Configure the URL to the upload script in your back-end here!
|
||||
return new MyUploadAdapter(loader);
|
||||
};
|
||||
}
|
||||
|
||||
//Initialize the ckeditor
|
||||
ClassicEditor.create(document.querySelector("#teks"), {
|
||||
extraPlugins: [SimpleUploadAdapterPlugin],
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
$('.from-prevent-multiple-submits').on('submit', function(){
|
||||
$('.from-prevent-multiple-submits').attr('disabled','true');
|
||||
})
|
||||
})();
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,185 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Ruang Pengelolaan dan Tata Usaha')
|
||||
|
||||
@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">Ruang Pengelolaan dan Tata Usaha</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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">Edit Menu Ruang Pengelolaan dan Tata Usaha</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<form class="from-prevent-multiple-submits"
|
||||
action="{{ route('ruang_pengelolaan_tata_usaha.update', $ruangPengelolaanTataUsaha->id) }}"
|
||||
method="POST">
|
||||
@method('patch')
|
||||
@csrf
|
||||
<textarea id="teks" placeholder="Enter the Description"
|
||||
name="teks">{{ $ruangPengelolaanTataUsaha->teks }}</textarea>
|
||||
<br>
|
||||
<button id="submit" type="submit"
|
||||
class="btn btn-primary from-prevent-multiple-submits">Save</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
<script>
|
||||
//Define an adapter to upload the files
|
||||
class MyUploadAdapter {
|
||||
constructor(loader) {
|
||||
// The file loader instance to use during the upload. It sounds scary but do not
|
||||
// worry — the loader will be passed into the adapter later on in this guide.
|
||||
this.loader = loader;
|
||||
|
||||
// URL where to send files.
|
||||
this.url = '{{ route('ckeditor.upload') }}';
|
||||
|
||||
//
|
||||
}
|
||||
// Starts the upload process.
|
||||
upload() {
|
||||
return this.loader.file.then(
|
||||
(file) =>
|
||||
new Promise((resolve, reject) => {
|
||||
this._initRequest();
|
||||
this._initListeners(resolve, reject, file);
|
||||
this._sendRequest(file);
|
||||
})
|
||||
);
|
||||
}
|
||||
// Aborts the upload process.
|
||||
abort() {
|
||||
if (this.xhr) {
|
||||
this.xhr.abort();
|
||||
}
|
||||
}
|
||||
// Initializes the XMLHttpRequest object using the URL passed to the constructor.
|
||||
_initRequest() {
|
||||
const xhr = (this.xhr = new XMLHttpRequest());
|
||||
// Note that your request may look different. It is up to you and your editor
|
||||
// integration to choose the right communication channel. This example uses
|
||||
// a POST request with JSON as a data structure but your configuration
|
||||
// could be different.
|
||||
// xhr.open('POST', this.url, true);
|
||||
xhr.open("POST", this.url, true);
|
||||
xhr.setRequestHeader("x-csrf-token", "{{ csrf_token() }}");
|
||||
xhr.responseType = "json";
|
||||
}
|
||||
// Initializes XMLHttpRequest listeners.
|
||||
_initListeners(resolve, reject, file) {
|
||||
const xhr = this.xhr;
|
||||
const loader = this.loader;
|
||||
const genericErrorText = `Couldn't upload file: ${file.name}.`;
|
||||
xhr.addEventListener("error", () => reject(genericErrorText));
|
||||
xhr.addEventListener("abort", () => reject());
|
||||
xhr.addEventListener("load", () => {
|
||||
const response = xhr.response;
|
||||
// This example assumes the XHR server's "response" object will come with
|
||||
// an "error" which has its own "message" that can be passed to reject()
|
||||
// in the upload promise.
|
||||
//
|
||||
// Your integration may handle upload errors in a different way so make sure
|
||||
// it is done properly. The reject() function must be called when the upload fails.
|
||||
if (!response || response.error) {
|
||||
return reject(response && response.error ? response.error.message : genericErrorText);
|
||||
}
|
||||
// If the upload is successful, resolve the upload promise with an object containing
|
||||
// at least the "default" URL, pointing to the image on the server.
|
||||
// This URL will be used to display the image in the content. Learn more in the
|
||||
// UploadAdapter#upload documentation.
|
||||
resolve({
|
||||
default: response.url,
|
||||
});
|
||||
});
|
||||
// Upload progress when it is supported. The file loader has the #uploadTotal and #uploaded
|
||||
// properties which are used e.g. to display the upload progress bar in the editor
|
||||
// user interface.
|
||||
if (xhr.upload) {
|
||||
xhr.upload.addEventListener("progress", (evt) => {
|
||||
if (evt.lengthComputable) {
|
||||
loader.uploadTotal = evt.total;
|
||||
loader.uploaded = evt.loaded;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// Prepares the data and sends the request.
|
||||
_sendRequest(file) {
|
||||
// Prepare the form data.
|
||||
const data = new FormData();
|
||||
data.append("upload", file);
|
||||
// Important note: This is the right place to implement security mechanisms
|
||||
// like authentication and CSRF protection. For instance, you can use
|
||||
// XMLHttpRequest.setRequestHeader() to set the request headers containing
|
||||
// the CSRF token generated earlier by your application.
|
||||
// Send the request.
|
||||
this.xhr.send(data);
|
||||
}
|
||||
// ...
|
||||
}
|
||||
|
||||
function SimpleUploadAdapterPlugin(editor) {
|
||||
editor.plugins.get("FileRepository").createUploadAdapter = (loader) => {
|
||||
// Configure the URL to the upload script in your back-end here!
|
||||
return new MyUploadAdapter(loader);
|
||||
};
|
||||
}
|
||||
|
||||
//Initialize the ckeditor
|
||||
ClassicEditor.create(document.querySelector("#teks"), {
|
||||
extraPlugins: [SimpleUploadAdapterPlugin],
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
$('.from-prevent-multiple-submits').on('submit', function() {
|
||||
$('.from-prevent-multiple-submits').attr('disabled', 'true');
|
||||
})
|
||||
})();
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,183 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Ruang Perkuliahan')
|
||||
|
||||
@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">Ruang Perkuliahan</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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">Edit Menu Ruang Perkuliahan</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<form class="from-prevent-multiple-submits" action="{{ route('ruang_perkuliahan.update', $ruangPerkuliahan->id) }}"
|
||||
method="POST">
|
||||
@method('patch')
|
||||
@csrf
|
||||
<textarea id="teks" placeholder="Enter the Description"
|
||||
name="teks">{{ $ruangPerkuliahan->teks }}</textarea>
|
||||
<br>
|
||||
<button id="submit" type="submit" class="btn btn-primary from-prevent-multiple-submits">Save</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
<script>
|
||||
//Define an adapter to upload the files
|
||||
class MyUploadAdapter {
|
||||
constructor(loader) {
|
||||
// The file loader instance to use during the upload. It sounds scary but do not
|
||||
// worry — the loader will be passed into the adapter later on in this guide.
|
||||
this.loader = loader;
|
||||
|
||||
// URL where to send files.
|
||||
this.url = '{{ route('ckeditor.upload') }}';
|
||||
|
||||
//
|
||||
}
|
||||
// Starts the upload process.
|
||||
upload() {
|
||||
return this.loader.file.then(
|
||||
(file) =>
|
||||
new Promise((resolve, reject) => {
|
||||
this._initRequest();
|
||||
this._initListeners(resolve, reject, file);
|
||||
this._sendRequest(file);
|
||||
})
|
||||
);
|
||||
}
|
||||
// Aborts the upload process.
|
||||
abort() {
|
||||
if (this.xhr) {
|
||||
this.xhr.abort();
|
||||
}
|
||||
}
|
||||
// Initializes the XMLHttpRequest object using the URL passed to the constructor.
|
||||
_initRequest() {
|
||||
const xhr = (this.xhr = new XMLHttpRequest());
|
||||
// Note that your request may look different. It is up to you and your editor
|
||||
// integration to choose the right communication channel. This example uses
|
||||
// a POST request with JSON as a data structure but your configuration
|
||||
// could be different.
|
||||
// xhr.open('POST', this.url, true);
|
||||
xhr.open("POST", this.url, true);
|
||||
xhr.setRequestHeader("x-csrf-token", "{{ csrf_token() }}");
|
||||
xhr.responseType = "json";
|
||||
}
|
||||
// Initializes XMLHttpRequest listeners.
|
||||
_initListeners(resolve, reject, file) {
|
||||
const xhr = this.xhr;
|
||||
const loader = this.loader;
|
||||
const genericErrorText = `Couldn't upload file: ${file.name}.`;
|
||||
xhr.addEventListener("error", () => reject(genericErrorText));
|
||||
xhr.addEventListener("abort", () => reject());
|
||||
xhr.addEventListener("load", () => {
|
||||
const response = xhr.response;
|
||||
// This example assumes the XHR server's "response" object will come with
|
||||
// an "error" which has its own "message" that can be passed to reject()
|
||||
// in the upload promise.
|
||||
//
|
||||
// Your integration may handle upload errors in a different way so make sure
|
||||
// it is done properly. The reject() function must be called when the upload fails.
|
||||
if (!response || response.error) {
|
||||
return reject(response && response.error ? response.error.message : genericErrorText);
|
||||
}
|
||||
// If the upload is successful, resolve the upload promise with an object containing
|
||||
// at least the "default" URL, pointing to the image on the server.
|
||||
// This URL will be used to display the image in the content. Learn more in the
|
||||
// UploadAdapter#upload documentation.
|
||||
resolve({
|
||||
default: response.url,
|
||||
});
|
||||
});
|
||||
// Upload progress when it is supported. The file loader has the #uploadTotal and #uploaded
|
||||
// properties which are used e.g. to display the upload progress bar in the editor
|
||||
// user interface.
|
||||
if (xhr.upload) {
|
||||
xhr.upload.addEventListener("progress", (evt) => {
|
||||
if (evt.lengthComputable) {
|
||||
loader.uploadTotal = evt.total;
|
||||
loader.uploaded = evt.loaded;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// Prepares the data and sends the request.
|
||||
_sendRequest(file) {
|
||||
// Prepare the form data.
|
||||
const data = new FormData();
|
||||
data.append("upload", file);
|
||||
// Important note: This is the right place to implement security mechanisms
|
||||
// like authentication and CSRF protection. For instance, you can use
|
||||
// XMLHttpRequest.setRequestHeader() to set the request headers containing
|
||||
// the CSRF token generated earlier by your application.
|
||||
// Send the request.
|
||||
this.xhr.send(data);
|
||||
}
|
||||
// ...
|
||||
}
|
||||
|
||||
function SimpleUploadAdapterPlugin(editor) {
|
||||
editor.plugins.get("FileRepository").createUploadAdapter = (loader) => {
|
||||
// Configure the URL to the upload script in your back-end here!
|
||||
return new MyUploadAdapter(loader);
|
||||
};
|
||||
}
|
||||
|
||||
//Initialize the ckeditor
|
||||
ClassicEditor.create(document.querySelector("#teks"), {
|
||||
extraPlugins: [SimpleUploadAdapterPlugin],
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
$('.from-prevent-multiple-submits').on('submit', function(){
|
||||
$('.from-prevent-multiple-submits').attr('disabled','true');
|
||||
})
|
||||
})();
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,181 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Sambutan Pimpinan Instansi')
|
||||
|
||||
@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">Sambutan Pimpinan Instansi</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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">Edit Menu Sambutan Pimpinan Instansi</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<form
|
||||
action="{{ route('sambutan_pimpinan_instansi.update', $sambutanPimpinanInstansi->id) }}"
|
||||
method="POST">
|
||||
@method('patch')
|
||||
@csrf
|
||||
<textarea id="teks" placeholder="Enter the Description"
|
||||
name="teks">{{ $sambutanPimpinanInstansi->teks }}</textarea>
|
||||
<br>
|
||||
<button id="submit" type="submit" class="btn btn-primary from-prevent-multiple-submits">Save</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
//Define an adapter to upload the files
|
||||
class MyUploadAdapter {
|
||||
constructor(loader) {
|
||||
// The file loader instance to use during the upload. It sounds scary but do not
|
||||
// worry — the loader will be passed into the adapter later on in this guide.
|
||||
this.loader = loader;
|
||||
|
||||
// URL where to send files.
|
||||
this.url = '{{ route('ckeditor.upload') }}';
|
||||
|
||||
//
|
||||
}
|
||||
// Starts the upload process.
|
||||
upload() {
|
||||
return this.loader.file.then(
|
||||
(file) =>
|
||||
new Promise((resolve, reject) => {
|
||||
this._initRequest();
|
||||
this._initListeners(resolve, reject, file);
|
||||
this._sendRequest(file);
|
||||
})
|
||||
);
|
||||
}
|
||||
// Aborts the upload process.
|
||||
abort() {
|
||||
if (this.xhr) {
|
||||
this.xhr.abort();
|
||||
}
|
||||
}
|
||||
// Initializes the XMLHttpRequest object using the URL passed to the constructor.
|
||||
_initRequest() {
|
||||
const xhr = (this.xhr = new XMLHttpRequest());
|
||||
// Note that your request may look different. It is up to you and your editor
|
||||
// integration to choose the right communication channel. This example uses
|
||||
// a POST request with JSON as a data structure but your configuration
|
||||
// could be different.
|
||||
// xhr.open('POST', this.url, true);
|
||||
xhr.open("POST", this.url, true);
|
||||
xhr.setRequestHeader("x-csrf-token", "{{ csrf_token() }}");
|
||||
xhr.responseType = "json";
|
||||
}
|
||||
// Initializes XMLHttpRequest listeners.
|
||||
_initListeners(resolve, reject, file) {
|
||||
const xhr = this.xhr;
|
||||
const loader = this.loader;
|
||||
const genericErrorText = `Couldn't upload file: ${file.name}.`;
|
||||
xhr.addEventListener("error", () => reject(genericErrorText));
|
||||
xhr.addEventListener("abort", () => reject());
|
||||
xhr.addEventListener("load", () => {
|
||||
const response = xhr.response;
|
||||
// This example assumes the XHR server's "response" object will come with
|
||||
// an "error" which has its own "message" that can be passed to reject()
|
||||
// in the upload promise.
|
||||
//
|
||||
// Your integration may handle upload errors in a different way so make sure
|
||||
// it is done properly. The reject() function must be called when the upload fails.
|
||||
if (!response || response.error) {
|
||||
return reject(response && response.error ? response.error.message : genericErrorText);
|
||||
}
|
||||
// If the upload is successful, resolve the upload promise with an object containing
|
||||
// at least the "default" URL, pointing to the image on the server.
|
||||
// This URL will be used to display the image in the content. Learn more in the
|
||||
// UploadAdapter#upload documentation.
|
||||
resolve({
|
||||
default: response.url,
|
||||
});
|
||||
});
|
||||
// Upload progress when it is supported. The file loader has the #uploadTotal and #uploaded
|
||||
// properties which are used e.g. to display the upload progress bar in the editor
|
||||
// user interface.
|
||||
if (xhr.upload) {
|
||||
xhr.upload.addEventListener("progress", (evt) => {
|
||||
if (evt.lengthComputable) {
|
||||
loader.uploadTotal = evt.total;
|
||||
loader.uploaded = evt.loaded;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// Prepares the data and sends the request.
|
||||
_sendRequest(file) {
|
||||
// Prepare the form data.
|
||||
const data = new FormData();
|
||||
data.append("upload", file);
|
||||
// Important note: This is the right place to implement security mechanisms
|
||||
// like authentication and CSRF protection. For instance, you can use
|
||||
// XMLHttpRequest.setRequestHeader() to set the request headers containing
|
||||
// the CSRF token generated earlier by your application.
|
||||
// Send the request.
|
||||
this.xhr.send(data);
|
||||
}
|
||||
// ...
|
||||
}
|
||||
|
||||
function SimpleUploadAdapterPlugin(editor) {
|
||||
editor.plugins.get("FileRepository").createUploadAdapter = (loader) => {
|
||||
// Configure the URL to the upload script in your back-end here!
|
||||
return new MyUploadAdapter(loader);
|
||||
};
|
||||
}
|
||||
|
||||
//Initialize the ckeditor
|
||||
ClassicEditor.create(document.querySelector("#teks"), {
|
||||
extraPlugins: [SimpleUploadAdapterPlugin],
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
$('.from-prevent-multiple-submits').on('submit', function(){
|
||||
$('.from-prevent-multiple-submits').attr('disabled','true');
|
||||
})
|
||||
})();
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,178 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Sejarah')
|
||||
|
||||
@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">Sejarah</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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">Edit Menu Sejarah</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<form class="from-prevent-multiple-submits" action="{{ route('sejarah.update', $sejarah->id) }}" method="POST">
|
||||
@method('patch')
|
||||
@csrf
|
||||
<textarea id="teks" placeholder="Enter the Description"
|
||||
name="teks">{{ $sejarah->teks }}</textarea>
|
||||
<br>
|
||||
<button id="submit" type="submit" class="btn btn-primary from-prevent-multiple-submits">Save</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
//Define an adapter to upload the files
|
||||
class MyUploadAdapter {
|
||||
constructor(loader) {
|
||||
// The file loader instance to use during the upload. It sounds scary but do not
|
||||
// worry — the loader will be passed into the adapter later on in this guide.
|
||||
this.loader = loader;
|
||||
|
||||
// URL where to send files.
|
||||
this.url = '{{ route('ckeditor.upload') }}';
|
||||
|
||||
//
|
||||
}
|
||||
// Starts the upload process.
|
||||
upload() {
|
||||
return this.loader.file.then(
|
||||
(file) =>
|
||||
new Promise((resolve, reject) => {
|
||||
this._initRequest();
|
||||
this._initListeners(resolve, reject, file);
|
||||
this._sendRequest(file);
|
||||
})
|
||||
);
|
||||
}
|
||||
// Aborts the upload process.
|
||||
abort() {
|
||||
if (this.xhr) {
|
||||
this.xhr.abort();
|
||||
}
|
||||
}
|
||||
// Initializes the XMLHttpRequest object using the URL passed to the constructor.
|
||||
_initRequest() {
|
||||
const xhr = (this.xhr = new XMLHttpRequest());
|
||||
// Note that your request may look different. It is up to you and your editor
|
||||
// integration to choose the right communication channel. This example uses
|
||||
// a POST request with JSON as a data structure but your configuration
|
||||
// could be different.
|
||||
// xhr.open('POST', this.url, true);
|
||||
xhr.open("POST", this.url, true);
|
||||
xhr.setRequestHeader("x-csrf-token", "{{ csrf_token() }}");
|
||||
xhr.responseType = "json";
|
||||
}
|
||||
// Initializes XMLHttpRequest listeners.
|
||||
_initListeners(resolve, reject, file) {
|
||||
const xhr = this.xhr;
|
||||
const loader = this.loader;
|
||||
const genericErrorText = `Couldn't upload file: ${file.name}.`;
|
||||
xhr.addEventListener("error", () => reject(genericErrorText));
|
||||
xhr.addEventListener("abort", () => reject());
|
||||
xhr.addEventListener("load", () => {
|
||||
const response = xhr.response;
|
||||
// This example assumes the XHR server's "response" object will come with
|
||||
// an "error" which has its own "message" that can be passed to reject()
|
||||
// in the upload promise.
|
||||
//
|
||||
// Your integration may handle upload errors in a different way so make sure
|
||||
// it is done properly. The reject() function must be called when the upload fails.
|
||||
if (!response || response.error) {
|
||||
return reject(response && response.error ? response.error.message : genericErrorText);
|
||||
}
|
||||
// If the upload is successful, resolve the upload promise with an object containing
|
||||
// at least the "default" URL, pointing to the image on the server.
|
||||
// This URL will be used to display the image in the content. Learn more in the
|
||||
// UploadAdapter#upload documentation.
|
||||
resolve({
|
||||
default: response.url,
|
||||
});
|
||||
});
|
||||
// Upload progress when it is supported. The file loader has the #uploadTotal and #uploaded
|
||||
// properties which are used e.g. to display the upload progress bar in the editor
|
||||
// user interface.
|
||||
if (xhr.upload) {
|
||||
xhr.upload.addEventListener("progress", (evt) => {
|
||||
if (evt.lengthComputable) {
|
||||
loader.uploadTotal = evt.total;
|
||||
loader.uploaded = evt.loaded;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// Prepares the data and sends the request.
|
||||
_sendRequest(file) {
|
||||
// Prepare the form data.
|
||||
const data = new FormData();
|
||||
data.append("upload", file);
|
||||
// Important note: This is the right place to implement security mechanisms
|
||||
// like authentication and CSRF protection. For instance, you can use
|
||||
// XMLHttpRequest.setRequestHeader() to set the request headers containing
|
||||
// the CSRF token generated earlier by your application.
|
||||
// Send the request.
|
||||
this.xhr.send(data);
|
||||
}
|
||||
// ...
|
||||
}
|
||||
|
||||
function SimpleUploadAdapterPlugin(editor) {
|
||||
editor.plugins.get("FileRepository").createUploadAdapter = (loader) => {
|
||||
// Configure the URL to the upload script in your back-end here!
|
||||
return new MyUploadAdapter(loader);
|
||||
};
|
||||
}
|
||||
|
||||
//Initialize the ckeditor
|
||||
ClassicEditor.create(document.querySelector("#teks"), {
|
||||
extraPlugins: [SimpleUploadAdapterPlugin],
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
$('.from-prevent-multiple-submits').on('submit', function(){
|
||||
$('.from-prevent-multiple-submits').attr('disabled','true');
|
||||
})
|
||||
})();
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,224 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Staf')
|
||||
|
||||
@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">Staf</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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 Staf</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 Staf
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_staf" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nomor</th>
|
||||
<th>Nama</th>
|
||||
<th>NIP</th>
|
||||
<th>Pangkat/Golongan</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($stafs as $staf)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $staf->nama }}</td>
|
||||
<td>{{ $staf->nip }}</td>
|
||||
<td>{{ $staf->pangkat_golongan }}</td>
|
||||
<td>
|
||||
<button href="#formModalEdit" role="button" data-toggle="modal"
|
||||
data-id="{{ $staf->id }}" data-nama="{{ $staf->nama }}"
|
||||
data-nip="{{ $staf->nip }}"
|
||||
data-pangkat_golongan="{{ $staf->pangkat_golongan }}"
|
||||
class="btn btn-warning open-formModalEdit"><i
|
||||
class="fa fa-edit"></i> Edit</button>
|
||||
<form action="{{ route('staf.destroy', $staf) }}" 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>
|
||||
</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 Staf</h5>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal" aria-label="Close">X</button>
|
||||
</div>
|
||||
<form id="formAdd" action="{{ url('/admin/staf') }}" method="post">
|
||||
@csrf
|
||||
<div class="modal-body">
|
||||
<div class="form-group mt-2">
|
||||
<label for="nama">Nama</label>
|
||||
<input type="text" class="form-control mt-0" name="nama" required maxlength="255"
|
||||
placeholder=". . .">
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="nip">NIP</label>
|
||||
<input type="text" class="form-control mt-0" name="nip" required maxlength="25"
|
||||
placeholder=". . .">
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="pangkat_golongan">Pangkat/Golongan</label>
|
||||
<input type="text" class="form-control mt-0" name="pangkat_golongan"
|
||||
required maxlength="100" placeholder=". . .">
|
||||
</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 ($stafs as $staf)
|
||||
<!-- 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 Staf</h5>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal" aria-label="Close">X</button>
|
||||
</div>
|
||||
<form id="formEdit" action="{{ route('staf.update', $staf->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">Nama</label>
|
||||
<input type="text" class="form-control mt-0" name="nama" id="nama" required maxlength="255"
|
||||
placeholder=". . .">
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="nip">NIP</label>
|
||||
<input type="text" class="form-control mt-0" name="nip" id="nip" required maxlength="25"
|
||||
placeholder=". . .">
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
<label for="pangkat_golongan">Pangkat Golongan</label>
|
||||
<input type="text" class="form-control mt-0" name="pangkat_golongan" id="pangkat_golongan"
|
||||
required maxlength="100" placeholder=". . .">
|
||||
</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_staf").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_staf_wrapper .col-md-6:eq(0)');
|
||||
});
|
||||
</script>
|
||||
|
||||
<!--Modal Edit -->
|
||||
<script type="text/javascript">
|
||||
$(document).on("click", ".open-formModalEdit", function() {
|
||||
var id = $(this).data('id');
|
||||
var nama = $(this).data('nama');
|
||||
var nip = $(this).data('nip');
|
||||
var pangkat_golongan = $(this).data('pangkat_golongan');
|
||||
|
||||
$(".modal-body #id").val(id);
|
||||
$(".modal-body #nama").val(nama);
|
||||
$(".modal-body #nip").val(nip);
|
||||
$(".modal-body #pangkat_golongan").val(pangkat_golongan);
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,179 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Struktur Instansi')
|
||||
|
||||
@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">Struktur Instansi</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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">Edit Menu Struktur Instansi</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<form class="from-prevent-multiple-submits" action="{{ route('struktur_instansi.update', $strukturInstansi->id) }}"
|
||||
method="POST">
|
||||
@method('patch')
|
||||
@csrf
|
||||
<textarea id="teks" placeholder="Enter the Description"
|
||||
name="teks">{{ $strukturInstansi->teks }}</textarea>
|
||||
<br>
|
||||
<button id="submit" type="submit" class="btn btn-primary from-prevent-multiple-submits">Save</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
//Define an adapter to upload the files
|
||||
class MyUploadAdapter {
|
||||
constructor(loader) {
|
||||
// The file loader instance to use during the upload. It sounds scary but do not
|
||||
// worry — the loader will be passed into the adapter later on in this guide.
|
||||
this.loader = loader;
|
||||
|
||||
// URL where to send files.
|
||||
this.url = '{{ route('ckeditor.upload') }}';
|
||||
|
||||
//
|
||||
}
|
||||
// Starts the upload process.
|
||||
upload() {
|
||||
return this.loader.file.then(
|
||||
(file) =>
|
||||
new Promise((resolve, reject) => {
|
||||
this._initRequest();
|
||||
this._initListeners(resolve, reject, file);
|
||||
this._sendRequest(file);
|
||||
})
|
||||
);
|
||||
}
|
||||
// Aborts the upload process.
|
||||
abort() {
|
||||
if (this.xhr) {
|
||||
this.xhr.abort();
|
||||
}
|
||||
}
|
||||
// Initializes the XMLHttpRequest object using the URL passed to the constructor.
|
||||
_initRequest() {
|
||||
const xhr = (this.xhr = new XMLHttpRequest());
|
||||
// Note that your request may look different. It is up to you and your editor
|
||||
// integration to choose the right communication channel. This example uses
|
||||
// a POST request with JSON as a data structure but your configuration
|
||||
// could be different.
|
||||
// xhr.open('POST', this.url, true);
|
||||
xhr.open("POST", this.url, true);
|
||||
xhr.setRequestHeader("x-csrf-token", "{{ csrf_token() }}");
|
||||
xhr.responseType = "json";
|
||||
}
|
||||
// Initializes XMLHttpRequest listeners.
|
||||
_initListeners(resolve, reject, file) {
|
||||
const xhr = this.xhr;
|
||||
const loader = this.loader;
|
||||
const genericErrorText = `Couldn't upload file: ${file.name}.`;
|
||||
xhr.addEventListener("error", () => reject(genericErrorText));
|
||||
xhr.addEventListener("abort", () => reject());
|
||||
xhr.addEventListener("load", () => {
|
||||
const response = xhr.response;
|
||||
// This example assumes the XHR server's "response" object will come with
|
||||
// an "error" which has its own "message" that can be passed to reject()
|
||||
// in the upload promise.
|
||||
//
|
||||
// Your integration may handle upload errors in a different way so make sure
|
||||
// it is done properly. The reject() function must be called when the upload fails.
|
||||
if (!response || response.error) {
|
||||
return reject(response && response.error ? response.error.message : genericErrorText);
|
||||
}
|
||||
// If the upload is successful, resolve the upload promise with an object containing
|
||||
// at least the "default" URL, pointing to the image on the server.
|
||||
// This URL will be used to display the image in the content. Learn more in the
|
||||
// UploadAdapter#upload documentation.
|
||||
resolve({
|
||||
default: response.url,
|
||||
});
|
||||
});
|
||||
// Upload progress when it is supported. The file loader has the #uploadTotal and #uploaded
|
||||
// properties which are used e.g. to display the upload progress bar in the editor
|
||||
// user interface.
|
||||
if (xhr.upload) {
|
||||
xhr.upload.addEventListener("progress", (evt) => {
|
||||
if (evt.lengthComputable) {
|
||||
loader.uploadTotal = evt.total;
|
||||
loader.uploaded = evt.loaded;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// Prepares the data and sends the request.
|
||||
_sendRequest(file) {
|
||||
// Prepare the form data.
|
||||
const data = new FormData();
|
||||
data.append("upload", file);
|
||||
// Important note: This is the right place to implement security mechanisms
|
||||
// like authentication and CSRF protection. For instance, you can use
|
||||
// XMLHttpRequest.setRequestHeader() to set the request headers containing
|
||||
// the CSRF token generated earlier by your application.
|
||||
// Send the request.
|
||||
this.xhr.send(data);
|
||||
}
|
||||
// ...
|
||||
}
|
||||
|
||||
function SimpleUploadAdapterPlugin(editor) {
|
||||
editor.plugins.get("FileRepository").createUploadAdapter = (loader) => {
|
||||
// Configure the URL to the upload script in your back-end here!
|
||||
return new MyUploadAdapter(loader);
|
||||
};
|
||||
}
|
||||
|
||||
//Initialize the ckeditor
|
||||
ClassicEditor.create(document.querySelector("#teks"), {
|
||||
extraPlugins: [SimpleUploadAdapterPlugin],
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
$('.from-prevent-multiple-submits').on('submit', function(){
|
||||
$('.from-prevent-multiple-submits').attr('disabled','true');
|
||||
})
|
||||
})();
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,68 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Ucapan Selamat Datang')
|
||||
|
||||
@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">Ucapan Selamat Datang</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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">Edit Menu Ucapan Selamat Datang</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<form action="{{ route('ucapan_selamat_datang.update', $ucapanSelamatDatang->id) }}"
|
||||
method="POST" enctype="multipart/form-data">
|
||||
@method('patch')
|
||||
@csrf
|
||||
<input type="hidden" name="id" value="{{ $ucapanSelamatDatang->id }}">
|
||||
|
||||
<div class="form-group">
|
||||
<textarea class="form-control" style="width : 40rem" rows="5" type="text"
|
||||
id="teks" name="teks"
|
||||
maxlength="255">{{ $ucapanSelamatDatang->teks }}</textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-success"> Save </button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -0,0 +1,234 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'UKM Mahasiswa')
|
||||
|
||||
@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">UKM Mahasiswa</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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">Tambah Data UKM Mahasiswa</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<!-- form start -->
|
||||
<form class="from-prevent-multiple-submits" action="{{ route('ukm_mahasiswa.store') }}" method="POST" id="ckeditorForm"
|
||||
enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label for="judul">Judul</label>
|
||||
<input type="text" class="form-control" id="judul" name="judul"
|
||||
placeholder="Masukkan Judul" value="" required maxlength="255">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="nama_foto">Thumbnail (Maksimal 2MB)</label>
|
||||
<div class="form-group">
|
||||
<img id="img_preview_add" style="max-width: 200px;"
|
||||
class="mt-2" />
|
||||
</div>
|
||||
<input type="file" accept="image/*" class="form-control mt-0"
|
||||
name="thumbnail" id="input_foto_add" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="teks">Teks (Foto Maksimal 2MB)</label>
|
||||
<textarea id="teks" placeholder="Masukkan Teks" name="teks"
|
||||
class="ck_editor_txt" id="ck_editor_txt"></textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="release_date">Tanggal Rilis</label>
|
||||
<input type="date" class="form-control" name="release_date" required>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
|
||||
<div class="card-footer">
|
||||
<button id="submit" type="submit" class="btn btn-primary from-prevent-multiple-submits">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
//Define an adapter to upload the files
|
||||
class MyUploadAdapter {
|
||||
constructor(loader) {
|
||||
// The file loader instance to use during the upload. It sounds scary but do not
|
||||
// worry — the loader will be passed into the adapter later on in this guide.
|
||||
this.loader = loader;
|
||||
|
||||
// URL where to send files.
|
||||
this.url = '{{ route('ckeditor.upload') }}';
|
||||
|
||||
//
|
||||
}
|
||||
// Starts the upload process.
|
||||
upload() {
|
||||
return this.loader.file.then(
|
||||
(file) =>
|
||||
new Promise((resolve, reject) => {
|
||||
this._initRequest();
|
||||
this._initListeners(resolve, reject, file);
|
||||
this._sendRequest(file);
|
||||
})
|
||||
);
|
||||
}
|
||||
// Aborts the upload process.
|
||||
abort() {
|
||||
if (this.xhr) {
|
||||
this.xhr.abort();
|
||||
}
|
||||
}
|
||||
// Initializes the XMLHttpRequest object using the URL passed to the constructor.
|
||||
_initRequest() {
|
||||
const xhr = (this.xhr = new XMLHttpRequest());
|
||||
// Note that your request may look different. It is up to you and your editor
|
||||
// integration to choose the right communication channel. This example uses
|
||||
// a POST request with JSON as a data structure but your configuration
|
||||
// could be different.
|
||||
// xhr.open('POST', this.url, true);
|
||||
xhr.open("POST", this.url, true);
|
||||
xhr.setRequestHeader("x-csrf-token", "{{ csrf_token() }}");
|
||||
xhr.responseType = "json";
|
||||
}
|
||||
// Initializes XMLHttpRequest listeners.
|
||||
_initListeners(resolve, reject, file) {
|
||||
const xhr = this.xhr;
|
||||
const loader = this.loader;
|
||||
const genericErrorText = `Couldn't upload file: ${file.name}.`;
|
||||
xhr.addEventListener("error", () => reject(genericErrorText));
|
||||
xhr.addEventListener("abort", () => reject());
|
||||
xhr.addEventListener("load", () => {
|
||||
const response = xhr.response;
|
||||
// This example assumes the XHR server's "response" object will come with
|
||||
// an "error" which has its own "message" that can be passed to reject()
|
||||
// in the upload promise.
|
||||
//
|
||||
// Your integration may handle upload errors in a different way so make sure
|
||||
// it is done properly. The reject() function must be called when the upload fails.
|
||||
if (!response || response.error) {
|
||||
return reject(response && response.error ? response.error.message : genericErrorText);
|
||||
}
|
||||
// If the upload is successful, resolve the upload promise with an object containing
|
||||
// at least the "default" URL, pointing to the image on the server.
|
||||
// This URL will be used to display the image in the content. Learn more in the
|
||||
// UploadAdapter#upload documentation.
|
||||
resolve({
|
||||
default: response.url,
|
||||
});
|
||||
});
|
||||
// Upload progress when it is supported. The file loader has the #uploadTotal and #uploaded
|
||||
// properties which are used e.g. to display the upload progress bar in the editor
|
||||
// user interface.
|
||||
if (xhr.upload) {
|
||||
xhr.upload.addEventListener("progress", (evt) => {
|
||||
if (evt.lengthComputable) {
|
||||
loader.uploadTotal = evt.total;
|
||||
loader.uploaded = evt.loaded;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// Prepares the data and sends the request.
|
||||
_sendRequest(file) {
|
||||
// Prepare the form data.
|
||||
const data = new FormData();
|
||||
data.append("upload", file);
|
||||
// Important note: This is the right place to implement security mechanisms
|
||||
// like authentication and CSRF protection. For instance, you can use
|
||||
// XMLHttpRequest.setRequestHeader() to set the request headers containing
|
||||
// the CSRF token generated earlier by your application.
|
||||
// Send the request.
|
||||
this.xhr.send(data);
|
||||
}
|
||||
// ...
|
||||
}
|
||||
|
||||
function SimpleUploadAdapterPlugin(editor) {
|
||||
editor.plugins.get("FileRepository").createUploadAdapter = (loader) => {
|
||||
// Configure the URL to the upload script in your back-end here!
|
||||
return new MyUploadAdapter(loader);
|
||||
};
|
||||
}
|
||||
|
||||
var allEditors = document.querySelector('.ck_editor_txt');
|
||||
|
||||
//Initialize the ckeditor
|
||||
ClassicEditor.create(document.querySelector("#teks"), {
|
||||
extraPlugins: [SimpleUploadAdapterPlugin],
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
$("#ckeditorForm").submit(function(e) {
|
||||
var content = $('.ck_editor_txt').val();
|
||||
html = $(content).text();
|
||||
if ($.trim(html) == '') {
|
||||
alert("Teks Tidak Boleh Kosong!");
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
//Form add image validation
|
||||
var uploadField = document.getElementById("input_foto_add");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
} else {
|
||||
//Ubah Img Preview
|
||||
var reader = new FileReader();
|
||||
reader.onload = function() {
|
||||
var output = document.getElementById('img_preview_add');
|
||||
output.src = reader.result;
|
||||
}
|
||||
reader.readAsDataURL(event.target.files[0]);
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
$('.from-prevent-multiple-submits').on('submit', function(){
|
||||
$('.from-prevent-multiple-submits').attr('disabled','true');
|
||||
})
|
||||
})();
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,232 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'UKM Mahasiswa')
|
||||
|
||||
@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">UKM Mahasiswa</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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">Edit Data UKM Mahasiswa</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<!-- form start -->
|
||||
<form class="from-prevent-multiple-submits"
|
||||
action="{{ route('ukm_mahasiswa.update', $ukmMahasiswa) }}" method="POST"
|
||||
enctype="multipart/form-data">
|
||||
@method('patch')
|
||||
@csrf
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label for="judul">Judul</label>
|
||||
<input type="text" class="form-control" id="judul" name="judul"
|
||||
maxlength="255" placeholder="Masukkan Judul"
|
||||
value="{{ $ukmMahasiswa->judul }}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="nama_foto">Thumbnail (Maksimal 2MB)</label>
|
||||
<div class="form-group">
|
||||
<img src="{{ url($ukmMahasiswa->thumbnail) }}" alt="Image Missing"
|
||||
id="old_nama_foto" style="max-width: 200px;"
|
||||
class="mt-2" />
|
||||
</div>
|
||||
<input type="file" accept="image/*" class="form-control mt-0"
|
||||
name="thumbnail" id="input_foto_edit">
|
||||
<input type="hidden" name="old_thumbnail"
|
||||
value="{{ $ukmMahasiswa->thumbnail }}">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="teks">Teks (Foto Maksimal 2MB)</label>
|
||||
<textarea id="teks" placeholder="Masukkan Deskripsi Video"
|
||||
name="teks">{{ $ukmMahasiswa->teks }}</textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="release_date">Tanggal Rilis</label>
|
||||
<input type="date" class="form-control" name="release_date"
|
||||
value="{{ $ukmMahasiswa->release_date }}" required>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
|
||||
<div class="card-footer">
|
||||
<button id="submit" type="submit"
|
||||
class="btn btn-primary from-prevent-multiple-submits">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
//Define an adapter to upload the files
|
||||
class MyUploadAdapter {
|
||||
constructor(loader) {
|
||||
// The file loader instance to use during the upload. It sounds scary but do not
|
||||
// worry — the loader will be passed into the adapter later on in this guide.
|
||||
this.loader = loader;
|
||||
|
||||
// URL where to send files.
|
||||
this.url = '{{ route('ckeditor.upload') }}';
|
||||
|
||||
//
|
||||
}
|
||||
// Starts the upload process.
|
||||
upload() {
|
||||
return this.loader.file.then(
|
||||
(file) =>
|
||||
new Promise((resolve, reject) => {
|
||||
this._initRequest();
|
||||
this._initListeners(resolve, reject, file);
|
||||
this._sendRequest(file);
|
||||
})
|
||||
);
|
||||
}
|
||||
// Aborts the upload process.
|
||||
abort() {
|
||||
if (this.xhr) {
|
||||
this.xhr.abort();
|
||||
}
|
||||
}
|
||||
// Initializes the XMLHttpRequest object using the URL passed to the constructor.
|
||||
_initRequest() {
|
||||
const xhr = (this.xhr = new XMLHttpRequest());
|
||||
// Note that your request may look different. It is up to you and your editor
|
||||
// integration to choose the right communication channel. This example uses
|
||||
// a POST request with JSON as a data structure but your configuration
|
||||
// could be different.
|
||||
// xhr.open('POST', this.url, true);
|
||||
xhr.open("POST", this.url, true);
|
||||
xhr.setRequestHeader("x-csrf-token", "{{ csrf_token() }}");
|
||||
xhr.responseType = "json";
|
||||
}
|
||||
// Initializes XMLHttpRequest listeners.
|
||||
_initListeners(resolve, reject, file) {
|
||||
const xhr = this.xhr;
|
||||
const loader = this.loader;
|
||||
const genericErrorText = `Couldn't upload file: ${file.name}.`;
|
||||
xhr.addEventListener("error", () => reject(genericErrorText));
|
||||
xhr.addEventListener("abort", () => reject());
|
||||
xhr.addEventListener("load", () => {
|
||||
const response = xhr.response;
|
||||
// This example assumes the XHR server's "response" object will come with
|
||||
// an "error" which has its own "message" that can be passed to reject()
|
||||
// in the upload promise.
|
||||
//
|
||||
// Your integration may handle upload errors in a different way so make sure
|
||||
// it is done properly. The reject() function must be called when the upload fails.
|
||||
if (!response || response.error) {
|
||||
return reject(response && response.error ? response.error.message : genericErrorText);
|
||||
}
|
||||
// If the upload is successful, resolve the upload promise with an object containing
|
||||
// at least the "default" URL, pointing to the image on the server.
|
||||
// This URL will be used to display the image in the content. Learn more in the
|
||||
// UploadAdapter#upload documentation.
|
||||
resolve({
|
||||
default: response.url,
|
||||
});
|
||||
});
|
||||
// Upload progress when it is supported. The file loader has the #uploadTotal and #uploaded
|
||||
// properties which are used e.g. to display the upload progress bar in the editor
|
||||
// user interface.
|
||||
if (xhr.upload) {
|
||||
xhr.upload.addEventListener("progress", (evt) => {
|
||||
if (evt.lengthComputable) {
|
||||
loader.uploadTotal = evt.total;
|
||||
loader.uploaded = evt.loaded;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// Prepares the data and sends the request.
|
||||
_sendRequest(file) {
|
||||
// Prepare the form data.
|
||||
const data = new FormData();
|
||||
data.append("upload", file);
|
||||
// Important note: This is the right place to implement security mechanisms
|
||||
// like authentication and CSRF protection. For instance, you can use
|
||||
// XMLHttpRequest.setRequestHeader() to set the request headers containing
|
||||
// the CSRF token generated earlier by your application.
|
||||
// Send the request.
|
||||
this.xhr.send(data);
|
||||
}
|
||||
// ...
|
||||
}
|
||||
|
||||
function SimpleUploadAdapterPlugin(editor) {
|
||||
editor.plugins.get("FileRepository").createUploadAdapter = (loader) => {
|
||||
// Configure the URL to the upload script in your back-end here!
|
||||
return new MyUploadAdapter(loader);
|
||||
};
|
||||
}
|
||||
|
||||
//Initialize the ckeditor
|
||||
ClassicEditor.create(document.querySelector("#teks"), {
|
||||
extraPlugins: [SimpleUploadAdapterPlugin],
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
//Form edit image validation
|
||||
var uploadField = document.getElementById("input_foto_edit");
|
||||
uploadField.onchange = function() {
|
||||
if (this.files[0].size > 2000000) {
|
||||
alert("Batas maksimum 2MB!");
|
||||
this.value = "";
|
||||
} else {
|
||||
//Ubah Img Preview
|
||||
var reader = new FileReader();
|
||||
reader.onload = function() {
|
||||
var output = document.getElementById('old_nama_foto');
|
||||
output.src = reader.result;
|
||||
}
|
||||
reader.readAsDataURL(event.target.files[0]);
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
$('.from-prevent-multiple-submits').on('submit', function() {
|
||||
$('.from-prevent-multiple-submits').attr('disabled', 'true');
|
||||
})
|
||||
})();
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,158 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'UKM Mahasiswa')
|
||||
|
||||
@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">UKM Mahasiswa</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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 UKM Mahasiswa</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-12 text-left">
|
||||
<a type="button" href="{{ url('/admin/ukm_mahasiswa/create') }}"
|
||||
class="btn btn-success mb-3"><i class="fa fa-plus-circle"></i>
|
||||
Tambah Data UKM Mahasiswa
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_ukm_mahasiswa" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nomor</th>
|
||||
<th>Judul</th>
|
||||
<th>Thumbnail</th>
|
||||
<th>Teks</th>
|
||||
<th>Jadwal Rilis</th>
|
||||
<th>Status</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($ukmMahasiswas as $ukmMahasiswa)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $ukmMahasiswa->judul }}</td>
|
||||
<td>
|
||||
<img src="{{ url($ukmMahasiswa->thumbnail) }}" alt="Image Missing"
|
||||
style="width: 100px;">
|
||||
</td>
|
||||
<td>
|
||||
@if (strlen(strip_tags($ukmMahasiswa->teks)) > 100)
|
||||
{{ str_replace(' ', '', substr(strip_tags($ukmMahasiswa->teks), 0, 100) . '...') }}
|
||||
@else
|
||||
{{ str_replace(' ', '', substr(strip_tags($ukmMahasiswa->teks), 0, 100)) }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $ukmMahasiswa->release_date }}</td>
|
||||
<td>
|
||||
@if ($ukmMahasiswa->deleted_at != '')
|
||||
Terhapus
|
||||
@elseif ($ukmMahasiswa->release_date > date('Y-m-d'))
|
||||
Belum Rilis
|
||||
@else
|
||||
Rilis
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($ukmMahasiswa->deleted_at != '')
|
||||
<form
|
||||
action="{{ url('/admin/ukm_mahasiswa/' . $ukmMahasiswa->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/ukm_mahasiswa/' . $ukmMahasiswa->id . '/delete_permanen') }}"
|
||||
method="post">
|
||||
@csrf
|
||||
<input type="hidden" name="thumbnail"
|
||||
value="{{ $ukmMahasiswa->thumbnail }}">
|
||||
<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>
|
||||
@else
|
||||
<a href="{{ route('ukm_mahasiswa.edit', $ukmMahasiswa) }}"
|
||||
class="btn btn-warning open-formModalEdit">
|
||||
<i class="fa fa-edit"></i> Edit
|
||||
</a>
|
||||
<form
|
||||
action="{{ route('ukm_mahasiswa.destroy', $ukmMahasiswa) }}"
|
||||
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>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<!--Data Table -->
|
||||
<script>
|
||||
$(function() {
|
||||
$("#tabel_ukm_mahasiswa").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_ukm_mahasiswa_wrapper .col-md-6:eq(0)');
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,203 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Video Profil')
|
||||
|
||||
@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">Video Profil</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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">Edit Menu Video Profil</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<!-- form start -->
|
||||
<form class="from-prevent-multiple-submits"
|
||||
action="{{ route('video_profil.update', $videoProfil->id) }}" method="POST">
|
||||
@method('patch')
|
||||
@csrf
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label for="judul">Judul</label>
|
||||
<input type="text" class="form-control" id="judul" name="judul"
|
||||
maxlength="255" placeholder="Masukkan Judul Video"
|
||||
value="{{ $videoProfil->judul }}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="url">ID Youtube</label>
|
||||
<input type="text" class="form-control" id="url" name="url"
|
||||
maxlength="255" placeholder="Masukkan Url Video"
|
||||
value="{{ $videoProfil->url }}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="teks">Deskripsi Video</label>
|
||||
<textarea id="teks" placeholder="Masukkan Deskripsi Video" name="teks">
|
||||
{{ $videoProfil->teks }}
|
||||
</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
|
||||
<div class="card-footer">
|
||||
<button id="submit" type="submit"
|
||||
class="btn btn-primary from-prevent-multiple-submits">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
//Define an adapter to upload the files
|
||||
class MyUploadAdapter {
|
||||
constructor(loader) {
|
||||
// The file loader instance to use during the upload. It sounds scary but do not
|
||||
// worry — the loader will be passed into the adapter later on in this guide.
|
||||
this.loader = loader;
|
||||
|
||||
// URL where to send files.
|
||||
this.url = '{{ route('ckeditor.upload') }}';
|
||||
|
||||
//
|
||||
}
|
||||
// Starts the upload process.
|
||||
upload() {
|
||||
return this.loader.file.then(
|
||||
(file) =>
|
||||
new Promise((resolve, reject) => {
|
||||
this._initRequest();
|
||||
this._initListeners(resolve, reject, file);
|
||||
this._sendRequest(file);
|
||||
})
|
||||
);
|
||||
}
|
||||
// Aborts the upload process.
|
||||
abort() {
|
||||
if (this.xhr) {
|
||||
this.xhr.abort();
|
||||
}
|
||||
}
|
||||
// Initializes the XMLHttpRequest object using the URL passed to the constructor.
|
||||
_initRequest() {
|
||||
const xhr = (this.xhr = new XMLHttpRequest());
|
||||
// Note that your request may look different. It is up to you and your editor
|
||||
// integration to choose the right communication channel. This example uses
|
||||
// a POST request with JSON as a data structure but your configuration
|
||||
// could be different.
|
||||
// xhr.open('POST', this.url, true);
|
||||
xhr.open("POST", this.url, true);
|
||||
xhr.setRequestHeader("x-csrf-token", "{{ csrf_token() }}");
|
||||
xhr.responseType = "json";
|
||||
}
|
||||
// Initializes XMLHttpRequest listeners.
|
||||
_initListeners(resolve, reject, file) {
|
||||
const xhr = this.xhr;
|
||||
const loader = this.loader;
|
||||
const genericErrorText = `Couldn't upload file: ${file.name}.`;
|
||||
xhr.addEventListener("error", () => reject(genericErrorText));
|
||||
xhr.addEventListener("abort", () => reject());
|
||||
xhr.addEventListener("load", () => {
|
||||
const response = xhr.response;
|
||||
// This example assumes the XHR server's "response" object will come with
|
||||
// an "error" which has its own "message" that can be passed to reject()
|
||||
// in the upload promise.
|
||||
//
|
||||
// Your integration may handle upload errors in a different way so make sure
|
||||
// it is done properly. The reject() function must be called when the upload fails.
|
||||
if (!response || response.error) {
|
||||
return reject(response && response.error ? response.error.message : genericErrorText);
|
||||
}
|
||||
// If the upload is successful, resolve the upload promise with an object containing
|
||||
// at least the "default" URL, pointing to the image on the server.
|
||||
// This URL will be used to display the image in the content. Learn more in the
|
||||
// UploadAdapter#upload documentation.
|
||||
resolve({
|
||||
default: response.url,
|
||||
});
|
||||
});
|
||||
// Upload progress when it is supported. The file loader has the #uploadTotal and #uploaded
|
||||
// properties which are used e.g. to display the upload progress bar in the editor
|
||||
// user interface.
|
||||
if (xhr.upload) {
|
||||
xhr.upload.addEventListener("progress", (evt) => {
|
||||
if (evt.lengthComputable) {
|
||||
loader.uploadTotal = evt.total;
|
||||
loader.uploaded = evt.loaded;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// Prepares the data and sends the request.
|
||||
_sendRequest(file) {
|
||||
// Prepare the form data.
|
||||
const data = new FormData();
|
||||
data.append("upload", file);
|
||||
// Important note: This is the right place to implement security mechanisms
|
||||
// like authentication and CSRF protection. For instance, you can use
|
||||
// XMLHttpRequest.setRequestHeader() to set the request headers containing
|
||||
// the CSRF token generated earlier by your application.
|
||||
// Send the request.
|
||||
this.xhr.send(data);
|
||||
}
|
||||
// ...
|
||||
}
|
||||
|
||||
function SimpleUploadAdapterPlugin(editor) {
|
||||
editor.plugins.get("FileRepository").createUploadAdapter = (loader) => {
|
||||
// Configure the URL to the upload script in your back-end here!
|
||||
return new MyUploadAdapter(loader);
|
||||
};
|
||||
}
|
||||
|
||||
//Initialize the ckeditor
|
||||
ClassicEditor.create(document.querySelector("#teks"), {
|
||||
extraPlugins: [SimpleUploadAdapterPlugin],
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
$('.from-prevent-multiple-submits').on('submit', function() {
|
||||
$('.from-prevent-multiple-submits').attr('disabled', 'true');
|
||||
})
|
||||
})();
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,178 @@
|
||||
@extends('admin/layout/main')
|
||||
|
||||
@section('title', 'Visi & Misi')
|
||||
|
||||
@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">Visi & Misi</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- 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">Edit Menu Visi & Misi</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<form class="from-prevent-multiple-submits" action="{{ route('visi_misi.update', $visiMisi->id) }}" method="POST">
|
||||
@method('patch')
|
||||
@csrf
|
||||
<textarea id="teks" placeholder="Enter the Description"
|
||||
name="teks">{{ $visiMisi->teks }}</textarea>
|
||||
<br>
|
||||
<button id="submit" type="submit" class="btn btn-primary from-prevent-multiple-submits">Save</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
//Define an adapter to upload the files
|
||||
class MyUploadAdapter {
|
||||
constructor(loader) {
|
||||
// The file loader instance to use during the upload. It sounds scary but do not
|
||||
// worry — the loader will be passed into the adapter later on in this guide.
|
||||
this.loader = loader;
|
||||
|
||||
// URL where to send files.
|
||||
this.url = '{{ route('ckeditor.upload') }}';
|
||||
|
||||
//
|
||||
}
|
||||
// Starts the upload process.
|
||||
upload() {
|
||||
return this.loader.file.then(
|
||||
(file) =>
|
||||
new Promise((resolve, reject) => {
|
||||
this._initRequest();
|
||||
this._initListeners(resolve, reject, file);
|
||||
this._sendRequest(file);
|
||||
})
|
||||
);
|
||||
}
|
||||
// Aborts the upload process.
|
||||
abort() {
|
||||
if (this.xhr) {
|
||||
this.xhr.abort();
|
||||
}
|
||||
}
|
||||
// Initializes the XMLHttpRequest object using the URL passed to the constructor.
|
||||
_initRequest() {
|
||||
const xhr = (this.xhr = new XMLHttpRequest());
|
||||
// Note that your request may look different. It is up to you and your editor
|
||||
// integration to choose the right communication channel. This example uses
|
||||
// a POST request with JSON as a data structure but your configuration
|
||||
// could be different.
|
||||
// xhr.open('POST', this.url, true);
|
||||
xhr.open("POST", this.url, true);
|
||||
xhr.setRequestHeader("x-csrf-token", "{{ csrf_token() }}");
|
||||
xhr.responseType = "json";
|
||||
}
|
||||
// Initializes XMLHttpRequest listeners.
|
||||
_initListeners(resolve, reject, file) {
|
||||
const xhr = this.xhr;
|
||||
const loader = this.loader;
|
||||
const genericErrorText = `Couldn't upload file: ${file.name}.`;
|
||||
xhr.addEventListener("error", () => reject(genericErrorText));
|
||||
xhr.addEventListener("abort", () => reject());
|
||||
xhr.addEventListener("load", () => {
|
||||
const response = xhr.response;
|
||||
// This example assumes the XHR server's "response" object will come with
|
||||
// an "error" which has its own "message" that can be passed to reject()
|
||||
// in the upload promise.
|
||||
//
|
||||
// Your integration may handle upload errors in a different way so make sure
|
||||
// it is done properly. The reject() function must be called when the upload fails.
|
||||
if (!response || response.error) {
|
||||
return reject(response && response.error ? response.error.message : genericErrorText);
|
||||
}
|
||||
// If the upload is successful, resolve the upload promise with an object containing
|
||||
// at least the "default" URL, pointing to the image on the server.
|
||||
// This URL will be used to display the image in the content. Learn more in the
|
||||
// UploadAdapter#upload documentation.
|
||||
resolve({
|
||||
default: response.url,
|
||||
});
|
||||
});
|
||||
// Upload progress when it is supported. The file loader has the #uploadTotal and #uploaded
|
||||
// properties which are used e.g. to display the upload progress bar in the editor
|
||||
// user interface.
|
||||
if (xhr.upload) {
|
||||
xhr.upload.addEventListener("progress", (evt) => {
|
||||
if (evt.lengthComputable) {
|
||||
loader.uploadTotal = evt.total;
|
||||
loader.uploaded = evt.loaded;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// Prepares the data and sends the request.
|
||||
_sendRequest(file) {
|
||||
// Prepare the form data.
|
||||
const data = new FormData();
|
||||
data.append("upload", file);
|
||||
// Important note: This is the right place to implement security mechanisms
|
||||
// like authentication and CSRF protection. For instance, you can use
|
||||
// XMLHttpRequest.setRequestHeader() to set the request headers containing
|
||||
// the CSRF token generated earlier by your application.
|
||||
// Send the request.
|
||||
this.xhr.send(data);
|
||||
}
|
||||
// ...
|
||||
}
|
||||
|
||||
function SimpleUploadAdapterPlugin(editor) {
|
||||
editor.plugins.get("FileRepository").createUploadAdapter = (loader) => {
|
||||
// Configure the URL to the upload script in your back-end here!
|
||||
return new MyUploadAdapter(loader);
|
||||
};
|
||||
}
|
||||
|
||||
//Initialize the ckeditor
|
||||
ClassicEditor.create(document.querySelector("#teks"), {
|
||||
extraPlugins: [SimpleUploadAdapterPlugin],
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
$('.from-prevent-multiple-submits').on('submit', function(){
|
||||
$('.from-prevent-multiple-submits').attr('disabled','true');
|
||||
})
|
||||
})();
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,30 @@
|
||||
@extends('portal/layout/main')
|
||||
|
||||
@section('title', 'Kesalahan - Fakultas Teknik UNTAN')
|
||||
|
||||
@section('container')
|
||||
<!-- Breadcrumb -->
|
||||
<div class="container">
|
||||
<ol class="breadcrumb">
|
||||
<li class="active"><a href="{{ url('/') }}">Beranda</a></li>
|
||||
<li>Erorr</li>
|
||||
</ol>
|
||||
</div>
|
||||
<!-- end Breadcrumb -->
|
||||
|
||||
<!-- Page Content -->
|
||||
<div id="page-content">
|
||||
<div class="container">
|
||||
<!--MAIN Content-->
|
||||
<div id="page-main">
|
||||
<section id="right-sidebar">
|
||||
<h2>404</h2>
|
||||
<h3>Halaman Tidak Ditemukan!</h3>
|
||||
<p>Maaf, halaman yang anda akses tidak ditemukan. Silahkan cek kembali url.</p>
|
||||
</section>
|
||||
</div><!-- /#page-main -->
|
||||
<!-- end MAIN Content -->
|
||||
</div><!-- /.container -->
|
||||
</div>
|
||||
<!-- end Page Content -->
|
||||
@endsection
|
||||
@@ -0,0 +1,134 @@
|
||||
@extends('portal/layout/main')
|
||||
|
||||
@section('title')
|
||||
Akreditasi - Fakultas Teknik UNTAN
|
||||
@endsection
|
||||
|
||||
@section('description')
|
||||
Daftar akreditas fakultas teknik UNTAN
|
||||
@endsection
|
||||
|
||||
@section('url')
|
||||
{{ Request::fullUrl() }}
|
||||
@endsection
|
||||
|
||||
@section('image')
|
||||
{{ url('portal_template/assets/img/logo.png') }}
|
||||
@endsection
|
||||
|
||||
@section('container')
|
||||
<!-- Breadcrumb -->
|
||||
<div class="container">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ url('/') }}">Beranda</a></li>
|
||||
<li><a class="nav-link active">Akreditasi</a></li>
|
||||
</ol>
|
||||
</div>
|
||||
<!-- end Breadcrumb -->
|
||||
|
||||
<!-- Page Content -->
|
||||
<div id="page-content">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<!--MAIN Content-->
|
||||
<div class="col-md-8">
|
||||
<div id="page-main">
|
||||
<section id="right-sidebar">
|
||||
<header>
|
||||
<h2>Akreditasi</h2>
|
||||
</header>
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_akreditasi" class="table table-hover course-list-table tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nomor</th>
|
||||
<th>Program Studi</th>
|
||||
<th>Strata</th>
|
||||
<th>Peringkat</th>
|
||||
<th>Tanggal Kadaluarsa</th>
|
||||
<th>Nomor SK</th>
|
||||
<th>PDF</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($akreditasis as $akreditasi)
|
||||
<tr>
|
||||
<th>{{ $loop->iteration }}</th>
|
||||
<th>{{ $akreditasi->program_studi }}</th>
|
||||
<th>{{ $akreditasi->strata }}</th>
|
||||
<th>{{ $akreditasi->peringkat }}</th>
|
||||
<th>{{ $akreditasi->tanggal_kadaluarsa }}</th>
|
||||
<th>{{ $akreditasi->nomor_sk }}</th>
|
||||
<th><a class="btn btn-primary" href="{{ $akreditasi->nama_file }}"
|
||||
role="button" download>Download</a></th>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</div><!-- /#page-main -->
|
||||
</div><!-- /.col-md-8 -->
|
||||
|
||||
<!--SIDEBAR Content-->
|
||||
<div class="col-md-4">
|
||||
<div id="page-sidebar" class="sidebar">
|
||||
<aside class="news-small" id="news-small">
|
||||
<header>
|
||||
<h2>Informasi Terbaru</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
@foreach ($informasiTerbarus as $informasiTerbaru)
|
||||
<article>
|
||||
<figure class="date"><i
|
||||
class="fa fa-file-o"></i>{{ $informasiTerbaru->release_date }}</figure>
|
||||
<header><a
|
||||
href="{{ url($informasiTerbaru->slug) }}">{{ $informasiTerbaru->judul }}</a>
|
||||
</header>
|
||||
</article><!-- /article -->
|
||||
@endforeach
|
||||
</div><!-- /.section-content -->
|
||||
<a href="{{ url('/informasi_terbaru') }}" class="read-more">Semua Informasi</a>
|
||||
</aside><!-- /.news-small -->
|
||||
<aside id="our-professors">
|
||||
<header>
|
||||
<h2>Aplikasi Integrasi</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
<div class="professors">
|
||||
@foreach ($aplikasiIntegrasis as $aplikasiIntegrasi)
|
||||
<article class="professor-thumbnail">
|
||||
<figure class="professor-image"><a href="{{ $aplikasiIntegrasi->url }}"><img
|
||||
src="{{ url($aplikasiIntegrasi->thumbnail) }}"
|
||||
style="width:80px;height:80px;object-fit:contain" alt=""></a>
|
||||
</figure>
|
||||
<aside>
|
||||
<header>
|
||||
<a
|
||||
href="{{ url($aplikasiIntegrasi->url) }}">{{ $aplikasiIntegrasi->nama }}</a>
|
||||
<div class="divider"></div>
|
||||
<figure class="professor-description">{{ $aplikasiIntegrasi->teks }}
|
||||
</figure>
|
||||
</header>
|
||||
</aside>
|
||||
</article><!-- /.professor-thumbnail -->
|
||||
@endforeach
|
||||
<a href="{{ url('aplikasi_integrasi') }}" class="read-more">Semua Aplikasi</a>
|
||||
</div><!-- /.professors -->
|
||||
</div><!-- /.section-content -->
|
||||
</aside><!-- /.our-professors -->
|
||||
</div><!-- /#sidebar -->
|
||||
</div><!-- /.col-md-4 -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container -->
|
||||
</div>
|
||||
<!-- end Page Content -->
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#tabel_akreditasi').DataTable();
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,125 @@
|
||||
@extends('portal/layout/main')
|
||||
|
||||
@section('title', 'Aplikasi Integrasi - Fakultas Teknik UNTAN')
|
||||
|
||||
@section('container')
|
||||
<!-- Breadcrumb -->
|
||||
<div class="container">
|
||||
<ol class="breadcrumb">
|
||||
<li class="active"><a href="{{ url('/') }}">Beranda</a></li>
|
||||
<li>Aplikasi Integrasi</li>
|
||||
</ol>
|
||||
</div>
|
||||
<!-- end Breadcrumb -->
|
||||
|
||||
<!-- Page Content -->
|
||||
<div id="page-content">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<!--MAIN Content-->
|
||||
<div class="col-md-8">
|
||||
<div id="page-main">
|
||||
<section class="course-listing" id="courses">
|
||||
<header>
|
||||
<h1>Aplikasi Integrasi</h1>
|
||||
</header>
|
||||
<?php $batas = 0; ?>
|
||||
@foreach ($aplikasiIntegrasiPaginates as $aplikasiIntegrasi)
|
||||
@if ($loop->iteration % 3 == 1)
|
||||
<div class="row" style="margin-bottom: 40px">
|
||||
<?php $batas = 1; ?>
|
||||
@endif
|
||||
<div class="col-md-4 col-sm-4">
|
||||
<article class="course-thumbnail">
|
||||
<figure class="image">
|
||||
<div class="image-wrapper"><a href="{{ $aplikasiIntegrasi->url }}"
|
||||
target="_blank"><img
|
||||
src="{{ url($aplikasiIntegrasi->thumbnail) }}"></a></div>
|
||||
</figure>
|
||||
<div class="description">
|
||||
<a href="{{ $aplikasiIntegrasi->url }}" target="_blank">
|
||||
<h3>{{ $aplikasiIntegrasi->nama }}</h3>
|
||||
</a>
|
||||
<p>{{ $aplikasiIntegrasi->teks }}</p>
|
||||
<hr>
|
||||
<div class="course-meta">
|
||||
<span class="course-date"><i
|
||||
class="fa fa-calendar-o"></i>{{ $aplikasiIntegrasi->release_date }}</span>
|
||||
</div>
|
||||
<div class="stick-to-bottom"><a href="{{ $aplikasiIntegrasi->url }}"
|
||||
target="_blank" class="btn btn-framed btn-color-grey btn-small">Lihat
|
||||
Selengkapnya</a></div>
|
||||
</div>
|
||||
</article><!-- /.featured-course -->
|
||||
</div><!-- /.col-md-3 -->
|
||||
@if ($loop->iteration % 3 == 0)
|
||||
</div>
|
||||
<?php $batas = 0; ?>
|
||||
@endif
|
||||
@endforeach
|
||||
@if ($batas == 1)
|
||||
</div>
|
||||
@endif
|
||||
</section><!-- /.course-listing -->
|
||||
<div class="center">
|
||||
<ul class="pagination">
|
||||
{{ $aplikasiIntegrasiPaginates->links('pagination::default') }}
|
||||
</ul>
|
||||
</div>
|
||||
</div><!-- /#page-main -->
|
||||
</div><!-- /.col-md-8 -->
|
||||
|
||||
<!--SIDEBAR Content-->
|
||||
<div class="col-md-4">
|
||||
<div id="page-sidebar" class="sidebar">
|
||||
<aside class="news-small" id="news-small">
|
||||
<header>
|
||||
<h2>Informasi Terbaru</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
@foreach ($informasiTerbarus as $informasiTerbaru)
|
||||
<article>
|
||||
<figure class="date"><i
|
||||
class="fa fa-file-o"></i>{{ $informasiTerbaru->release_date }}
|
||||
</figure>
|
||||
<header><a href="{{ url($informasiTerbaru->slug) }}">{{ $informasiTerbaru->judul }}</a>
|
||||
</header>
|
||||
</article><!-- /article -->
|
||||
@endforeach
|
||||
</div><!-- /.section-content -->
|
||||
<a href="{{ url('/informasi_terbaru') }}" class="read-more">Semua Informasi</a>
|
||||
</aside><!-- /.news-small -->
|
||||
|
||||
<aside id="our-professors">
|
||||
<header>
|
||||
<h2>Aplikasi Integrasi</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
<div class="professors">
|
||||
@foreach ($aplikasiIntegrasis as $aplikasiIntegrasi)
|
||||
<article class="professor-thumbnail">
|
||||
<figure class="professor-image"><a href="{{ $aplikasiIntegrasi->url }}"><img
|
||||
src="{{ url($aplikasiIntegrasi->thumbnail) }}"
|
||||
style="width:80px;height:80px;object-fit:contain" alt=""></a></figure>
|
||||
<aside>
|
||||
<header>
|
||||
<a
|
||||
href="{{ url($aplikasiIntegrasi->url) }}">{{ $aplikasiIntegrasi->nama }}</a>
|
||||
<div class="divider"></div>
|
||||
<figure class="professor-description">{{ $aplikasiIntegrasi->teks }}
|
||||
</figure>
|
||||
</header>
|
||||
</aside>
|
||||
</article><!-- /.professor-thumbnail -->
|
||||
@endforeach
|
||||
<a href="{{ url('aplikasi_integrasi') }}" class="read-more">Semua Aplikasi</a>
|
||||
</div><!-- /.professors -->
|
||||
</div><!-- /.section-content -->
|
||||
</aside><!-- /.our-professors -->
|
||||
</div><!-- /#sidebar -->
|
||||
</div><!-- /.col-md-4 -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container -->
|
||||
</div>
|
||||
<!-- end Page Content -->
|
||||
@endsection
|
||||
@@ -0,0 +1,348 @@
|
||||
@extends('portal/layout/main')
|
||||
|
||||
@section('title', 'Beranda - Fakultas Teknik UNTAN')
|
||||
|
||||
@section('container')
|
||||
<!-- Page Content -->
|
||||
<div id="page-content">
|
||||
<!-- Slider -->
|
||||
<div id="homepage-carousel">
|
||||
<div class="container">
|
||||
<div class="homepage-carousel-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-9 col-sm-7">
|
||||
<div class="image-carousel">
|
||||
@foreach ($banners as $banner)
|
||||
<div class="gambar"><img src="{{ url($banner->nama_foto) }}" alt="" style="width:100%">
|
||||
</div>
|
||||
@endforeach
|
||||
</div><!-- /.slider-image -->
|
||||
</div><!-- /.col-md-6 -->
|
||||
<div class="col-md-3 col-sm-5">
|
||||
<div class="slider-content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h1 class="welcome"><?= $ucapanSelamatDatang->teks ?></h1>
|
||||
</div><!-- /.col-md-12 -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.slider-content -->
|
||||
</div><!-- /.col-md-6 -->
|
||||
</div><!-- /.row -->
|
||||
<div class="background"></div>
|
||||
</div><!-- /.slider-wrapper -->
|
||||
<div class="slider-inner"></div>
|
||||
</div><!-- /.container -->
|
||||
</div>
|
||||
<!-- end Slider -->
|
||||
|
||||
<!-- News, Events, About -->
|
||||
<div class="block">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-4 col-sm-6">
|
||||
<section class="news-small" id="news-small">
|
||||
<header>
|
||||
<h2>Informasi Terbaru</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
@foreach ($informasiTerbarus as $informasiTerbaru)
|
||||
<article>
|
||||
<figure class="date"><i
|
||||
class="fa fa-file-o"></i>{{ $informasiTerbaru->release_date }}</figure>
|
||||
<header><a
|
||||
href="{{ url($informasiTerbaru->slug) }}">{{ $informasiTerbaru->judul }}</a>
|
||||
</header>
|
||||
</article><!-- /article -->
|
||||
@endforeach
|
||||
</div><!-- /.section-content -->
|
||||
<a href="{{ url('informasi_terbaru') }}" class="read-more stick-to-bottom">Semua Informasi</a>
|
||||
</section><!-- /.news-small -->
|
||||
</div><!-- /.col-md-4 -->
|
||||
<div class="col-md-4 col-sm-6">
|
||||
<section class="events small" id="events-small">
|
||||
<header>
|
||||
<h2>Unduhan Terbaru</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
@foreach ($unduhanTerbarus as $unduhanTerbaru)
|
||||
<article class="event nearest-second">
|
||||
<figure class="date">
|
||||
<div class="month">
|
||||
{{ substr(date('F', strtotime($unduhanTerbaru->release_date)), 0, 3) }}
|
||||
</div>
|
||||
<div class="day">
|
||||
{{ date('d', strtotime($unduhanTerbaru->release_date)) }}</div>
|
||||
</figure>
|
||||
<aside>
|
||||
<header>
|
||||
<a
|
||||
href="{{ url($unduhanTerbaru->slug) }}">{{ $unduhanTerbaru->judul }}</a>
|
||||
</header>
|
||||
<div class="additional-info clearfix">{{ $unduhanTerbaru->release_date }}
|
||||
</div>
|
||||
</aside>
|
||||
</article><!-- /article -->
|
||||
@endforeach
|
||||
|
||||
</div><!-- /.section-content -->
|
||||
<a href="{{ url('unduhan_terbaru') }}" class="read-more stick-to-bottom">Semua Unduhan</a>
|
||||
</section><!-- /.events-small -->
|
||||
</div><!-- /.col-md-4 -->
|
||||
<div class="col-md-4 col-sm-12">
|
||||
<section id="about">
|
||||
<header>
|
||||
<h2>Tentang Fakultas Teknik UNTAN</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
<img src="{{ url($profilSingkat->nama_foto) }}" alt="" class="add-margin col-md-12">
|
||||
<p>{{ $profilSingkat->teks }}</p>
|
||||
</div><!-- /.section-content -->
|
||||
<a href="{{ url('sejarah') }}" class="read-more">Selengkapnya</a>
|
||||
</section><!-- /.about -->
|
||||
</div><!-- /.col-md-4 -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container -->
|
||||
</div>
|
||||
<!-- end News, Events, About -->
|
||||
|
||||
<!-- Testimonial -->
|
||||
<section id="testimonials">
|
||||
<div class="block">
|
||||
<div class="container">
|
||||
<div class="author-carousel">
|
||||
@foreach ($quotes as $quote)
|
||||
<div class="author">
|
||||
<blockquote>
|
||||
<figure class="author-picture"><img src="{{ url($quote->nama_foto) }}"
|
||||
style="width:100px;height:100px;object-fit:cover;" alt="">
|
||||
</figure>
|
||||
<article class="paragraph-wrapper">
|
||||
<div class="inner">
|
||||
<header>{{ $quote->teks }}
|
||||
</header>
|
||||
<footer>{{ $quote->sumber }}</footer>
|
||||
</div>
|
||||
</article>
|
||||
</blockquote>
|
||||
</div><!-- /.author -->
|
||||
@endforeach
|
||||
|
||||
</div><!-- /.author-carousel -->
|
||||
</div><!-- /.container -->
|
||||
</div><!-- /.block -->
|
||||
</section>
|
||||
<!-- end Testimonial -->
|
||||
|
||||
<!-- Academic Life, Campus Life, Newsletter -->
|
||||
<div class="block">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-4 col-sm-4">
|
||||
<section class="news-small" id="news-small">
|
||||
<header>
|
||||
<h2>Penelitian</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
@foreach ($penelitians as $penelitian)
|
||||
<article>
|
||||
<figure class="date"><i
|
||||
class="fa fa-file-o"></i>{{ $penelitian->release_date }}</figure>
|
||||
<header><a href="{{ url($penelitian->slug) }}">{{ $penelitian->judul }}</a>
|
||||
</header>
|
||||
</article><!-- /article -->
|
||||
@endforeach
|
||||
</div><!-- /.section-content -->
|
||||
<a href="{{ url('penelitian') }}" class="read-more stick-to-bottom">Semua
|
||||
Penelitian</a>
|
||||
</section><!-- /.news-small -->
|
||||
</div><!-- /.col-md-4 -->
|
||||
|
||||
<div class="col-md-4 col-sm-4">
|
||||
<section class="news-small" id="news-small">
|
||||
<header>
|
||||
<h2>Pengabdian Kepada Masyarakat</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
@foreach ($pengabdianKeMasyarakats as $pengabdianKeMasyarakat)
|
||||
<article>
|
||||
<figure class="date"><i
|
||||
class="fa fa-file-o"></i>{{ $pengabdianKeMasyarakat->release_date }}
|
||||
</figure>
|
||||
<header><a
|
||||
href="{{ url($pengabdianKeMasyarakat->slug) }}">{{ $pengabdianKeMasyarakat->judul }}</a>
|
||||
</header>
|
||||
</article><!-- /article -->
|
||||
@endforeach
|
||||
</div><!-- /.section-content -->
|
||||
<a href="{{ url('pengabdian_ke_masyarakat') }}" class="read-more stick-to-bottom">Semua
|
||||
PKM</a>
|
||||
</section><!-- /.news-small -->
|
||||
</div><!-- /.col-md-4 -->
|
||||
|
||||
<div class="col-md-4 col-sm-4">
|
||||
<section class="news-small" id="news-small">
|
||||
<header>
|
||||
<h2>Hasil Karya</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
@foreach ($hasilKaryas as $hasilKarya)
|
||||
<article>
|
||||
<figure class="date"><i
|
||||
class="fa fa-file-o"></i>{{ $hasilKarya->release_date }}</figure>
|
||||
<header><a href="{{ url($hasilKarya->slug) }}">{{ $hasilKarya->judul }}</a>
|
||||
</header>
|
||||
</article><!-- /article -->
|
||||
@endforeach
|
||||
</div><!-- /.section-content -->
|
||||
<a href="{{ url('hasil_karya') }}" class="read-more stick-to-bottom">Semua
|
||||
Karya</a>
|
||||
</section><!-- /.news-small -->
|
||||
</div><!-- /.col-md-4 -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container -->
|
||||
</div>
|
||||
<!-- end Academic Life, Campus Life, Newsletter -->
|
||||
|
||||
<!-- Divisions, Connect -->
|
||||
<div class="block">
|
||||
<div class="container">
|
||||
<div class="block-dark-background">
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-sm-4">
|
||||
<section id="division" class="has-dark-background">
|
||||
<header>
|
||||
<h2>Fasilitas</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
<ul class="list-links">
|
||||
<li><a href="{{ url('ruang_perkuliahan') }}">Ruang Perkuliahan</a></li>
|
||||
<li><a href="{{ url('ruang_lab') }}">Ruang Lab</a></li>
|
||||
<li><a href="{{ url('ruang_pengelolaan_tata_usaha') }}">Ruang Pengelolaan & Tata
|
||||
Usaha</a></li>
|
||||
<li><a href="{{ url('perpustakaan') }}">Perpustakaan</a></li>
|
||||
</ul>
|
||||
</div><!-- /.section-content -->
|
||||
</section><!-- #.divisions -->
|
||||
</div>
|
||||
<div class="col-md-9 col-sm-8">
|
||||
<section id="connect" class="has-dark-background">
|
||||
<header>
|
||||
<h2>Berita</h2>
|
||||
</header>
|
||||
<div class="connect-block">
|
||||
<div class="row">
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade in active" id="tab-twitter">
|
||||
@foreach ($beritas as $berita)
|
||||
<div class="col-md-3">
|
||||
<article class="social-post twitter-post">
|
||||
<header><a
|
||||
href="{{ url($berita->slug) }}">{{ $berita->judul }}</a>
|
||||
</header>
|
||||
<figure>{{ $berita->release_date }}</figure>
|
||||
<p>
|
||||
@if (strlen(strip_tags($berita->teks)) > 100)
|
||||
{{ str_replace(' ', '', substr(strip_tags($berita->teks), 0, 100) . '...') }}
|
||||
@else
|
||||
{{ str_replace(' ', '', substr(strip_tags($berita->teks), 0, 100)) }}
|
||||
@endif
|
||||
</p>
|
||||
</article><!-- /.twitter-post -->
|
||||
</div>
|
||||
@endforeach
|
||||
</div><!-- /.tab-twitter -->
|
||||
</div><!-- /.tab-content -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.section-content -->
|
||||
</section><!-- #.divisions -->
|
||||
</div><!-- /.col-md-9 -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.block-dark-background -->
|
||||
</div><!-- /.container -->
|
||||
</div>
|
||||
<!-- end Divisions, Connect -->
|
||||
|
||||
<!-- Our Professors, Galeri -->
|
||||
<div class="block">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-4 col-sm-4">
|
||||
<section id="our-professors">
|
||||
<header>
|
||||
<h2>Aplikasi Integrasi</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
<div class="professors">
|
||||
@foreach ($aplikasiIntegrasis as $aplikasiIntegrasi)
|
||||
<article class="professor-thumbnail">
|
||||
<figure class="professor-image"><a href="{{ $aplikasiIntegrasi->url }}"><img
|
||||
src="{{ url($aplikasiIntegrasi->thumbnail) }}"
|
||||
style="width:80px;height:80px;object-fit:contain" alt=""></a>
|
||||
</figure>
|
||||
<aside>
|
||||
<header>
|
||||
<a
|
||||
href="{{ url($aplikasiIntegrasi->url) }}">{{ $aplikasiIntegrasi->nama }}</a>
|
||||
<div class="divider"></div>
|
||||
<figure class="professor-description">{{ $aplikasiIntegrasi->teks }}
|
||||
</figure>
|
||||
</header>
|
||||
</aside>
|
||||
</article><!-- /.professor-thumbnail -->
|
||||
@endforeach
|
||||
<a href="{{ url('aplikasi_integrasi') }}" class="read-more">Semua Aplikasi</a>
|
||||
</div><!-- /.professors -->
|
||||
</div><!-- /.section-content -->
|
||||
</section><!-- /.our-professors -->
|
||||
</div><!-- /.col-md-4 -->
|
||||
|
||||
<div class="col-md-8 col-sm-8">
|
||||
<section id="gallery">
|
||||
<header>
|
||||
<h2>Galeri</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
<ul class="gallery-list">
|
||||
@foreach ($galeris as $galeri)
|
||||
<li><a href="{{ url($galeri->nama_foto) }}" data-lightbox="photos"><img
|
||||
src="{{ url($galeri->nama_foto) }}"
|
||||
style="width:100px;height:100px;object-fit:cover;" alt=""></a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div><!-- /.section-content -->
|
||||
</section><!-- /.gallery -->
|
||||
</div><!-- /.col-md-4 -->
|
||||
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container -->
|
||||
</div>
|
||||
<!-- end Our Professors, Galeri -->
|
||||
|
||||
<!-- Partners, Make a Donation -->
|
||||
<div class="block">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12">
|
||||
<section id="partners">
|
||||
<header>
|
||||
<h2>Kemitraan</h2>
|
||||
</header>
|
||||
<div class="section-content ">
|
||||
<div class="logos kemitraan-carousel">
|
||||
@foreach ($kemitraans as $kemitraan)
|
||||
<div class="logo"><img src="{{ url($kemitraan->nama_foto) }}" alt="">
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div><!-- /.col-md-12 -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container -->
|
||||
</div>
|
||||
<!-- end Partners, Make a Donation -->
|
||||
</div>
|
||||
|
||||
<!-- end Page Content -->
|
||||
@endsection
|
||||
@@ -0,0 +1,153 @@
|
||||
@extends('portal/layout/main')
|
||||
|
||||
@section('title', 'Berita - Fakultas Teknik UNTAN')
|
||||
|
||||
@section('container')
|
||||
<!-- Breadcrumb -->
|
||||
<div class="container">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ url('/') }}">Beranda</a></li>
|
||||
<li><a href="{{ url('/berita') }}">Berita</a></li>
|
||||
<li class="active">{{ $berita->judul }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
<!-- end Breadcrumb -->
|
||||
|
||||
<!-- Page Content -->
|
||||
<div id="page-content">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<!--MAIN Content-->
|
||||
<div class="col-md-8">
|
||||
<div id="page-main">
|
||||
<section id="blog-detail">
|
||||
<header>
|
||||
<h1>Berita</h1>
|
||||
</header>
|
||||
<article class="blog-detail">
|
||||
<header class="blog-detail-header">
|
||||
<img src="{{ url($berita->thumbnail) }}"
|
||||
style="width:750px;height:350px;object-fit:contain;">
|
||||
<br>
|
||||
<h2>{{ $berita->judul }}</h2>
|
||||
<div class="blog-detail-meta">
|
||||
<span class="date"><span
|
||||
class="fa fa-file-o"></span>{{ $berita->release_date }}</span>
|
||||
</div>
|
||||
</header>
|
||||
<div class="ck-content">
|
||||
{!! $berita->teks !!}
|
||||
</div>
|
||||
<footer>
|
||||
<section id="share-post">
|
||||
<div class="icons">
|
||||
<span>Bagikan ke :</span>
|
||||
<a href="{{ 'https://www.facebook.com/sharer/sharer.php?u=' . url()->current() }}"
|
||||
class="social-button" target="_blank" id="">
|
||||
<span class="fa fa-facebook-square"></span>
|
||||
</a>
|
||||
<a href="{{ 'https://twitter.com/intent/tweet?text=Fakultas Teknik Universitas Tanjungpura&url=' . url()->current() }}"
|
||||
class="social-button " target="_blank" id="">
|
||||
<span class="fa fa-twitter-square"></span>
|
||||
</a>
|
||||
<a href="{{ 'https://wa.me/?text=' . url()->current() }}"
|
||||
class="social-button " target="_blank" id="">
|
||||
<span class="fa fa-phone-square"></span>
|
||||
</a>
|
||||
</div><!-- /.icons -->
|
||||
</section><!-- /share -->
|
||||
|
||||
</footer>
|
||||
</article>
|
||||
</section><!-- /.blog-detail -->
|
||||
|
||||
<hr>
|
||||
|
||||
<section id="related-articles">
|
||||
<header>
|
||||
<h2>Berita Lainnya</h2>
|
||||
</header>
|
||||
<div class="row">
|
||||
@foreach ($beritas as $berita)
|
||||
<div class="col-md-6 col-sm-6">
|
||||
<article class="blog-listing-post">
|
||||
<figure class="blog-thumbnail">
|
||||
<figure class="blog-meta"><span
|
||||
class="fa fa-file-text-o"></span>{{ $berita->release_date }}
|
||||
</figure>
|
||||
<div class="image-wrapper"><a href="{{ url($berita->slug) }}"><img
|
||||
src="{{ url($berita->thumbnail) }}"></a></div>
|
||||
</figure>
|
||||
<aside>
|
||||
<header>
|
||||
<a href="{{ url($berita->slug) }}">
|
||||
<h3>{{ $berita->judul }}</h3>
|
||||
</a>
|
||||
</header>
|
||||
</aside>
|
||||
</article><!-- /article -->
|
||||
</div><!-- /.col-md-6 -->
|
||||
@endforeach
|
||||
</div><!-- /.row -->
|
||||
</section><!-- /related articles -->
|
||||
<hr>
|
||||
</div><!-- /#page-main -->
|
||||
</div><!-- /.col-md-8 -->
|
||||
|
||||
<!--SIDEBAR Content-->
|
||||
<div class="col-md-4">
|
||||
<div id="page-sidebar" class="sidebar">
|
||||
<aside class="news-small" id="news-small">
|
||||
<header>
|
||||
<h2>Informasi Terbaru</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
@foreach ($informasiTerbarus as $informasiTerbaru)
|
||||
<article>
|
||||
<figure class="date"><i
|
||||
class="fa fa-file-o"></i>{{ $informasiTerbaru->release_date }}
|
||||
</figure>
|
||||
<header><a
|
||||
href="{{ url($informasiTerbaru->slug) }}">{{ $informasiTerbaru->judul }}</a>
|
||||
</header>
|
||||
</article><!-- /article -->
|
||||
@endforeach
|
||||
</div><!-- /.section-content -->
|
||||
<a href="{{ url('/informasi_terbaru') }}" class="read-more">Semua Informasi</a>
|
||||
</aside><!-- /.news-small -->
|
||||
|
||||
<aside id="our-professors">
|
||||
<header>
|
||||
<h2>Aplikasi Integrasi</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
<div class="professors">
|
||||
@foreach ($aplikasiIntegrasis as $aplikasiIntegrasi)
|
||||
<article class="professor-thumbnail">
|
||||
<figure class="professor-image"><a href="{{ $aplikasiIntegrasi->url }}"><img
|
||||
src="{{ url($aplikasiIntegrasi->thumbnail) }}"
|
||||
style="width:80px;height:80px;object-fit:contain" alt=""></a>
|
||||
</figure>
|
||||
<aside>
|
||||
<header>
|
||||
<a href="member-detail.html">{{ $aplikasiIntegrasi->nama }}</a>
|
||||
<div class="divider"></div>
|
||||
<figure class="professor-description">{{ $aplikasiIntegrasi->teks }}
|
||||
</figure>
|
||||
</header>
|
||||
</aside>
|
||||
</article><!-- /.professor-thumbnail -->
|
||||
@endforeach
|
||||
<a href="{{ url('aplikasi_integrasi') }}" class="read-more">Semua Aplikasi</a>
|
||||
</div><!-- /.professors -->
|
||||
</div><!-- /.section-content -->
|
||||
</aside><!-- /.our-professors -->
|
||||
</div><!-- /#sidebar -->
|
||||
</div><!-- /.col-md-4 -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container -->
|
||||
</div>
|
||||
<!-- end Page Content -->
|
||||
|
||||
<!-- end Page Content -->
|
||||
@endsection
|
||||
@@ -0,0 +1,131 @@
|
||||
@extends('portal/layout/main')
|
||||
|
||||
@section('title', 'Berita - Fakultas Teknik UNTAN')
|
||||
|
||||
@section('container')
|
||||
<!-- Breadcrumb -->
|
||||
<div class="container">
|
||||
<ol class="breadcrumb">
|
||||
<li class="active"><a href="{{ url('/') }}">Beranda</a></li>
|
||||
<li>Berita</li>
|
||||
</ol>
|
||||
</div>
|
||||
<!-- end Breadcrumb -->
|
||||
|
||||
<!-- Page Content -->
|
||||
<div id="page-content">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<!--MAIN Content-->
|
||||
<div class="col-md-8">
|
||||
<div id="page-main">
|
||||
<section class="blog-listing" id="blog-listing">
|
||||
<header>
|
||||
<h1>Berita</h1>
|
||||
</header>
|
||||
<div class="row">
|
||||
@foreach ($beritas as $berita)
|
||||
@if ($loop->iteration % 2 == 1)
|
||||
<div class="row">
|
||||
@endif
|
||||
<div class="col-md-6 col-sm-6">
|
||||
<article class="blog-listing-post" style="margin-left : 10px;margin-right : 10px;">
|
||||
<figure class="blog-thumbnail">
|
||||
<figure class="blog-meta"><span
|
||||
class="fa fa-file-text-o"></span>{{ $berita->release_date }}
|
||||
</figure>
|
||||
<div class="image-wrapper"><a href="{{ url($berita->slug) }}"><img
|
||||
src="{{ url($berita->thumbnail) }}"
|
||||
style="object-fit:cover;"></a></div>
|
||||
</figure>
|
||||
<aside>
|
||||
<header>
|
||||
<a href="{{ url($berita->slug) }}">
|
||||
<h3>{{ $berita->judul }}</h3>
|
||||
</a>
|
||||
</header>
|
||||
<div class="description">
|
||||
<p>
|
||||
@if (strlen(strip_tags($berita->teks)) > 256)
|
||||
{{ str_replace(' ', '', substr(strip_tags($berita->teks), 0, 256) . '...') }}
|
||||
@else
|
||||
{{ str_replace(' ', '', substr(strip_tags($berita->teks), 0, 256)) }}
|
||||
@endif
|
||||
</p>
|
||||
</div>
|
||||
<a href="{{ url($berita->slug) }}" class="read-more stick-to-bottom">Read
|
||||
More</a>
|
||||
</aside>
|
||||
</article><!-- /article -->
|
||||
</div><!-- /.col-md-6 -->
|
||||
@if ($loop->iteration % 2 == 0)
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
</section><!-- /.blog-listing -->
|
||||
<div class="center">
|
||||
<ul class="pagination">
|
||||
{{ $beritas->links('pagination::default') }}
|
||||
</ul>
|
||||
</div>
|
||||
</div><!-- /#page-main -->
|
||||
</div><!-- /.col-md-8 -->
|
||||
|
||||
<!--SIDEBAR Content-->
|
||||
<div class="col-md-4">
|
||||
<div id="page-sidebar" class="sidebar">
|
||||
<aside class="news-small" id="news-small">
|
||||
<header>
|
||||
<h2>Informasi Terbaru</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
@foreach ($informasiTerbarus as $informasiTerbaru)
|
||||
<article>
|
||||
<figure class="date"><i
|
||||
class="fa fa-file-o"></i>{{ $informasiTerbaru->release_date }}
|
||||
</figure>
|
||||
<header><a
|
||||
href="{{ url($informasiTerbaru->slug) }}">{{ $informasiTerbaru->judul }}</a>
|
||||
</header>
|
||||
</article><!-- /article -->
|
||||
@endforeach
|
||||
</div><!-- /.section-content -->
|
||||
<a href="{{ url('/informasi_terbaru') }}" class="read-more">Semua Informasi</a>
|
||||
</aside><!-- /.news-small -->
|
||||
|
||||
<aside id="our-professors">
|
||||
<header>
|
||||
<h2>Aplikasi Integrasi</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
<div class="professors">
|
||||
@foreach ($aplikasiIntegrasis as $aplikasiIntegrasi)
|
||||
<article class="professor-thumbnail">
|
||||
<figure class="professor-image"><a href="{{ $aplikasiIntegrasi->url }}"><img
|
||||
src="{{ url($aplikasiIntegrasi->thumbnail) }}"
|
||||
style="width:80px;height:80px;object-fit:contain" alt=""></a>
|
||||
</figure>
|
||||
<aside>
|
||||
<header>
|
||||
<a
|
||||
href="{{ url($aplikasiIntegrasi->url) }}">{{ $aplikasiIntegrasi->nama }}</a>
|
||||
<div class="divider"></div>
|
||||
<figure class="professor-description">{{ $aplikasiIntegrasi->teks }}
|
||||
</figure>
|
||||
</header>
|
||||
</aside>
|
||||
</article><!-- /.professor-thumbnail -->
|
||||
@endforeach
|
||||
<a href="{{ url('aplikasi_integrasi') }}" class="read-more">Semua Aplikasi</a>
|
||||
</div><!-- /.professors -->
|
||||
</div><!-- /.section-content -->
|
||||
</aside><!-- /.our-professors -->
|
||||
|
||||
</div><!-- /#sidebar -->
|
||||
</div><!-- /.col-md-4 -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container -->
|
||||
</div>
|
||||
<!-- end Page Content -->
|
||||
@endsection
|
||||
@@ -0,0 +1,110 @@
|
||||
@extends('portal/layout/main')
|
||||
|
||||
@section('title', 'Blog Dosen - Fakultas Teknik UNTAN')
|
||||
|
||||
@section('container')
|
||||
<!-- Breadcrumb -->
|
||||
<div class="container">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ url('/') }}">Beranda</a></li>
|
||||
<li><a class="nav-link active">Blog Dosen</a></li>
|
||||
</ol>
|
||||
</div>
|
||||
<!-- end Breadcrumb -->
|
||||
|
||||
<!-- Page Content -->
|
||||
<div id="page-content">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<!--MAIN Content-->
|
||||
<div class="col-md-8">
|
||||
<div id="page-main">
|
||||
|
||||
|
||||
<section id="course-list">
|
||||
<header>
|
||||
<h1>Blog Dosen</h1>
|
||||
</header>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover course-list-table tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Dosen</th>
|
||||
<th>Link Blog</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($blogs as $blog)
|
||||
<tr>
|
||||
<th>{{ $blog->nama }}</th>
|
||||
<th><a href="{{ $blog->url }}" target="_blank">{{ $blog->url }}</a>
|
||||
</th>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</section><!-- /.course-listing -->
|
||||
<div class="center">
|
||||
<ul class="pagination">
|
||||
{{ $blogs->links('pagination::default') }}
|
||||
</ul>
|
||||
</div>
|
||||
</div><!-- /#page-main -->
|
||||
</div><!-- /.col-md-8 -->
|
||||
|
||||
<!--SIDEBAR Content-->
|
||||
<div class="col-md-4">
|
||||
<div id="page-sidebar" class="sidebar">
|
||||
<aside class="news-small" id="news-small">
|
||||
<header>
|
||||
<h2>Informasi Terbaru</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
@foreach ($informasiTerbarus as $informasiTerbaru)
|
||||
<article>
|
||||
<figure class="date"><i
|
||||
class="fa fa-file-o"></i>{{ $informasiTerbaru->release_date }}
|
||||
</figure>
|
||||
<header><a
|
||||
href="{{ url($informasiTerbaru->slug) }}">{{ $informasiTerbaru->judul }}</a>
|
||||
</header>
|
||||
</article><!-- /article -->
|
||||
@endforeach
|
||||
</div><!-- /.section-content -->
|
||||
<a href="{{ url('/informasi_terbaru') }}" class="read-more">Semua Informasi</a>
|
||||
</aside><!-- /.news-small -->
|
||||
<aside id="our-professors">
|
||||
<header>
|
||||
<h2>Aplikasi Integrasi</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
<div class="professors">
|
||||
@foreach ($aplikasiIntegrasis as $aplikasiIntegrasi)
|
||||
<article class="professor-thumbnail">
|
||||
<figure class="professor-image"><a href="{{ $aplikasiIntegrasi->url }}"><img
|
||||
src="{{ url($aplikasiIntegrasi->thumbnail) }}"
|
||||
style="width:80px;height:80px;object-fit:contain" alt=""></a></figure>
|
||||
<aside>
|
||||
<header>
|
||||
<a
|
||||
href="{{ url($aplikasiIntegrasi->url) }}">{{ $aplikasiIntegrasi->nama }}</a>
|
||||
<div class="divider"></div>
|
||||
<figure class="professor-description">{{ $aplikasiIntegrasi->teks }}
|
||||
</figure>
|
||||
</header>
|
||||
</aside>
|
||||
</article><!-- /.professor-thumbnail -->
|
||||
@endforeach
|
||||
<a href="{{ url('aplikasi_integrasi') }}" class="read-more">Semua Aplikasi</a>
|
||||
</div><!-- /.professors -->
|
||||
</div><!-- /.section-content -->
|
||||
</aside><!-- /.our-professors -->
|
||||
</div><!-- /#sidebar -->
|
||||
</div><!-- /.col-md-4 -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container -->
|
||||
</div>
|
||||
<!-- end Page Content -->
|
||||
@endsection
|
||||
@@ -0,0 +1,110 @@
|
||||
@extends('portal/layout/main')
|
||||
|
||||
@section('title', 'Dokumen Akademik - Fakultas Teknik UNTAN')
|
||||
|
||||
@section('container')
|
||||
<!-- Breadcrumb -->
|
||||
<div class="container">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ url('/') }}">Beranda</a></li>
|
||||
<li><a class="nav-link active">Dokumen Akademik</a></li>
|
||||
</ol>
|
||||
</div>
|
||||
<!-- end Breadcrumb -->
|
||||
|
||||
<!-- Page Content -->
|
||||
<div id="page-content">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<!--MAIN Content-->
|
||||
<div class="col-md-8">
|
||||
<div id="page-main">
|
||||
<section class="events" id="events">
|
||||
<header>
|
||||
<h1>Dokumen Akademik</h1>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
@foreach ($dokumenAkademiks as $dokumenAkademik)
|
||||
<article class="event">
|
||||
<figure class="date">
|
||||
<div class="month">
|
||||
{{ substr(date('F', strtotime($dokumenAkademik->release_date)), 0, 3) }}
|
||||
</div>
|
||||
<div class="day">
|
||||
{{ date('d', strtotime($dokumenAkademik->release_date)) }}</div>
|
||||
</figure>
|
||||
<aside>
|
||||
<header>
|
||||
<a
|
||||
href="{{ url($dokumenAkademik->slug) }}">{{ $dokumenAkademik->judul }}</a>
|
||||
</header>
|
||||
<div class="additional-info"> {{ $dokumenAkademik->release_date }}</div>
|
||||
|
||||
<a target="_blank" href="{{ url($dokumenAkademik->nama_file) }}"
|
||||
class="btn btn-framed btn-color-grey btn-small">Download</a>
|
||||
</aside>
|
||||
</article><!-- /article -->
|
||||
@endforeach
|
||||
</div><!-- /.section-content -->
|
||||
</section><!-- /.events -->
|
||||
<div class="center">
|
||||
<ul class="pagination">
|
||||
{{ $dokumenAkademiks->links('pagination::default') }}
|
||||
</ul>
|
||||
</div>
|
||||
</div><!-- /#page-main -->
|
||||
</div><!-- /.col-md-8 -->
|
||||
|
||||
<!--SIDEBAR Content-->
|
||||
<div class="col-md-4">
|
||||
<div id="page-sidebar" class="sidebar">
|
||||
<aside class="news-small" id="news-small">
|
||||
<header>
|
||||
<h2>Informasi Terbaru</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
@foreach ($informasiTerbarus as $informasiTerbaru)
|
||||
<article>
|
||||
<figure class="date"><i
|
||||
class="fa fa-file-o"></i>{{ $informasiTerbaru->release_date }}</figure>
|
||||
<header><a
|
||||
href="{{ url($informasiTerbaru->slug) }}">{{ $informasiTerbaru->judul }}</a>
|
||||
</header>
|
||||
</article><!-- /article -->
|
||||
@endforeach
|
||||
</div><!-- /.section-content -->
|
||||
<a href="{{ url('/informasi_terbaru') }}" class="read-more">Semua Informasi</a>
|
||||
</aside><!-- /.news-small -->
|
||||
<aside id="our-professors">
|
||||
<header>
|
||||
<h2>Aplikasi Integrasi</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
<div class="professors">
|
||||
@foreach ($aplikasiIntegrasis as $aplikasiIntegrasi)
|
||||
<article class="professor-thumbnail">
|
||||
<figure class="professor-image"><a href="{{ $aplikasiIntegrasi->url }}"><img
|
||||
src="{{ url($aplikasiIntegrasi->thumbnail) }}"
|
||||
style="width:80px;height:80px;object-fit:contain" alt=""></a></figure>
|
||||
<aside>
|
||||
<header>
|
||||
<a
|
||||
href="{{ url($aplikasiIntegrasi->url) }}">{{ $aplikasiIntegrasi->nama }}</a>
|
||||
<div class="divider"></div>
|
||||
<figure class="professor-description">{{ $aplikasiIntegrasi->teks }}
|
||||
</figure>
|
||||
</header>
|
||||
</aside>
|
||||
</article><!-- /.professor-thumbnail -->
|
||||
@endforeach
|
||||
<a href="{{ url('aplikasi_integrasi') }}" class="read-more">Semua Aplikasi</a>
|
||||
</div><!-- /.professors -->
|
||||
</div><!-- /.section-content -->
|
||||
</aside><!-- /.our-professors -->
|
||||
</div><!-- /#sidebar -->
|
||||
</div><!-- /.col-md-4 -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container -->
|
||||
</div>
|
||||
<!-- end Page Content -->
|
||||
@endsection
|
||||
@@ -0,0 +1,132 @@
|
||||
@extends('portal/layout/main')
|
||||
|
||||
@section('title', 'Dokumen Akademik - Fakultas Teknik UNTAN')
|
||||
|
||||
@section('container')
|
||||
<!-- Breadcrumb -->
|
||||
<div class="container">
|
||||
<ol class="breadcrumb">
|
||||
<li>Akademik</li>
|
||||
<li><a class="nav-link active" href="{{ url('/kalender_akademik') }}">Dokumen Akademik</a></li>
|
||||
</ol>
|
||||
</div>
|
||||
<!-- end Breadcrumb -->
|
||||
|
||||
<!-- Page Content -->
|
||||
<div id="page-content">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<!--MAIN Content-->
|
||||
<div class="col-md-8">
|
||||
<div id="page-main">
|
||||
<section id="blog-detail">
|
||||
<header>
|
||||
<h1>Dokumen Akademik</h1>
|
||||
</header>
|
||||
<article class="blog-detail">
|
||||
<header class="blog-detail-header">
|
||||
<h2>{{ $dokumenAkademik->judul }}</h2>
|
||||
<div class="blog-detail-meta">
|
||||
<span class="date"><span
|
||||
class="fa fa-file-o"></span>{{ $dokumenAkademik->release_date }}</span>
|
||||
</div>
|
||||
</header>
|
||||
<hr>
|
||||
<div class="embed-responsive embed-responsive-4by3">
|
||||
<object data="{{ url($dokumenAkademik->nama_file) }}" type="application/pdf">
|
||||
<iframe
|
||||
src="https://docs.google.com/viewer?url=your_url_to_pdf&embedded=true"></iframe>
|
||||
</object>
|
||||
</div>
|
||||
<br>
|
||||
<footer>
|
||||
<section id="share-post">
|
||||
<div class="icons">
|
||||
<span>Bagikan ke :</span>
|
||||
<a href="{{ 'https://www.facebook.com/sharer/sharer.php?u=' . url()->current() }}"
|
||||
class="social-button" target="_blank" id="">
|
||||
<span class="fa fa-facebook-square"></span>
|
||||
</a>
|
||||
<a href="{{ 'https://twitter.com/intent/tweet?text=Fakultas Teknik Universitas Tanjungpura&url=' . url()->current() }}"
|
||||
class="social-button " target="_blank" id="">
|
||||
<span class="fa fa-twitter-square"></span>
|
||||
</a>
|
||||
<a href="{{ 'https://wa.me/?text=' . url()->current() }}"
|
||||
class="social-button " target="_blank" id="">
|
||||
<span class="fa fa-phone-square"></span>
|
||||
</a>
|
||||
</div><!-- /.icons -->
|
||||
</section><!-- /share -->
|
||||
<hr>
|
||||
<section id="post-pager" class="clearfix">
|
||||
@if ($previousPost->slug != null)
|
||||
<span class="pull-left">
|
||||
<a href=" {{ url($previousPost->slug) }} " class="link-icon"><span
|
||||
class="fa fa-arrow-circle-o-left"></span>Previous Post</a></span>
|
||||
@endif
|
||||
@if ($nextPost->slug != null)
|
||||
<span class="pull-right"><a href=" {{ url($nextPost->slug) }} "
|
||||
class="link-icon">Next Post<span
|
||||
class="fa fa-arrow-circle-o-right"></span></a></span>
|
||||
@endif
|
||||
</section><!-- /post-pager -->
|
||||
</footer>
|
||||
</article>
|
||||
</section><!-- /.blog-detail -->
|
||||
</div><!-- /#page-main -->
|
||||
</div><!-- /.col-md-8 -->
|
||||
|
||||
<!--SIDEBAR Content-->
|
||||
<div class="col-md-4">
|
||||
<div id="page-sidebar" class="sidebar">
|
||||
<aside class="news-small" id="news-small">
|
||||
<header>
|
||||
<h2>Informasi Terbaru</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
@foreach ($informasiTerbarus as $informasiTerbaru)
|
||||
<article>
|
||||
<figure class="date"><i
|
||||
class="fa fa-file-o"></i>{{ $informasiTerbaru->release_date }}</figure>
|
||||
<header><a
|
||||
href="{{ url($informasiTerbaru->slug) }}">{{ $informasiTerbaru->judul }}</a>
|
||||
</header>
|
||||
</article><!-- /article -->
|
||||
@endforeach
|
||||
</div><!-- /.section-content -->
|
||||
<a href="{{ url('/informasi_terbaru') }}" class="read-more">Semua Informasi</a>
|
||||
</aside><!-- /.news-small -->
|
||||
<aside id="our-professors">
|
||||
<header>
|
||||
<h2>Aplikasi Integrasi</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
<div class="professors">
|
||||
@foreach ($aplikasiIntegrasis as $aplikasiIntegrasi)
|
||||
<article class="professor-thumbnail">
|
||||
<figure class="professor-image"><a href="{{ $aplikasiIntegrasi->url }}"><img
|
||||
src="{{ url($aplikasiIntegrasi->thumbnail) }}"
|
||||
style="width:80px;height:80px;object-fit:contain" alt=""></a>
|
||||
</figure>
|
||||
<aside>
|
||||
<header>
|
||||
<a
|
||||
href="{{ url($aplikasiIntegrasi->url) }}">{{ $aplikasiIntegrasi->nama }}</a>
|
||||
<div class="divider"></div>
|
||||
<figure class="professor-description">{{ $aplikasiIntegrasi->teks }}
|
||||
</figure>
|
||||
</header>
|
||||
</aside>
|
||||
</article><!-- /.professor-thumbnail -->
|
||||
@endforeach
|
||||
<a href="{{ url('aplikasi_integrasi') }}" class="read-more">Semua Aplikasi</a>
|
||||
</div><!-- /.professors -->
|
||||
</div><!-- /.section-content -->
|
||||
</aside><!-- /.our-professors -->
|
||||
</div><!-- /#sidebar -->
|
||||
</div><!-- /.col-md-4 -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container -->
|
||||
</div>
|
||||
<!-- end Page Content -->
|
||||
@endsection
|
||||
@@ -0,0 +1,835 @@
|
||||
<?php
|
||||
$activeDosen = " active ";
|
||||
$nip = $decodedData['nip'];
|
||||
$urlDataSister = "https://bkd.untan.ac.id/sisterbkd/API/public/getDetailDosen.php?nip=$nip&secretKey=KaS8CHcXI9OwTsD53CP13ZlHHBIpk8oCsuSndMj2b6VuTCPcFx";
|
||||
$getDataSister = file_get_contents($urlDataSister);
|
||||
$decodedSister = json_decode($getDataSister, true);
|
||||
$decodedDataSister = $decodedSister['data'];
|
||||
|
||||
$dataPengajaran = $decodedDataSister['dataPengajaran'];
|
||||
$dataBimbinganMahasiswa = $decodedDataSister['dataBimbinganMahasiswa'];
|
||||
$dataVisitingScientist = $decodedDataSister['dataVisitingScientist'];
|
||||
$dataDetasering = $decodedDataSister['dataDetasering'];
|
||||
$dataOrasiIlmiah = $decodedDataSister['dataOrasiIlmiah'];
|
||||
$dataPembimbingDosen = $decodedDataSister['dataPembimbingDosen'];
|
||||
$dataTugasTambahan = $decodedDataSister['dataTugasTambahan'];
|
||||
$dataPenelitian = $decodedDataSister['dataPenelitian'];
|
||||
$dataPublikasiKarya = $decodedDataSister['dataPublikasiKarya'];
|
||||
$dataPaten = $decodedDataSister['dataPaten'];
|
||||
$dataPengabdian = $decodedDataSister['dataPengabdian'];
|
||||
$dataPembicara = $decodedDataSister['dataPembicara'];
|
||||
$dataPengelolaJurnal = $decodedDataSister['dataPengelolaJurnal'];
|
||||
$dataJabatanStruktural = $decodedDataSister['dataJabatanStruktural'];
|
||||
$dataAnggotaProfesi = $decodedDataSister['dataAnggotaProfesi'];
|
||||
$dataPenghargaan = $decodedDataSister['dataPenghargaan'];
|
||||
$dataPenunjangLain = $decodedDataSister['dataPenunjangLain'];
|
||||
|
||||
$listPenelitianFinal = [];
|
||||
$listPengabdianFinal = [];
|
||||
|
||||
foreach($dataPenelitian as $key => $val){
|
||||
array_push($listPenelitianFinal, [
|
||||
'tahun' => intval($val['tahun']),
|
||||
'judul' => $val['judul'],
|
||||
'sumber' => 'SISTER',
|
||||
]);
|
||||
}
|
||||
|
||||
foreach($dataPengabdian as $key => $val){
|
||||
array_push($listPengabdianFinal, [
|
||||
'tahun' => intval($val['tahun']),
|
||||
'judul' => $val['judul'],
|
||||
'sumber' => 'SISTER',
|
||||
]);
|
||||
}
|
||||
|
||||
usort($listPenelitianFinal, function($a, $b) {
|
||||
return $b['tahun'] <=> $a['tahun'];
|
||||
});
|
||||
|
||||
usort($listPengabdianFinal, function($a, $b) {
|
||||
return $b['tahun'] <=> $a['tahun'];
|
||||
});
|
||||
?>
|
||||
|
||||
@extends('portal/layout/main')
|
||||
|
||||
@section('title', 'Detail Dosen - '.$decodedData['nama'].' - Fakultas Teknik UNTAN')
|
||||
|
||||
@section('container')
|
||||
|
||||
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" crossorigin="anonymous"></script>
|
||||
<script src="<?php echo url('portal_template/assets/js/jquery.dataTables.min.js'); ?>"></script>
|
||||
<script src="<?php echo url('portal_template/assets/js/dataTables.bootstrap4.min.js'); ?>"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.6.4/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.6.4/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.6.4/js/buttons.print.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.6.4/js/buttons.colVis.min.js"></script>
|
||||
|
||||
<style>
|
||||
table{
|
||||
width:100% !important;
|
||||
}
|
||||
|
||||
td{
|
||||
color:#595959;
|
||||
padding:5px 5px;
|
||||
}
|
||||
|
||||
canvas{
|
||||
max-height:300px;
|
||||
}
|
||||
|
||||
tfoot {
|
||||
display: table-header-group;
|
||||
}
|
||||
|
||||
.buttons-excel{
|
||||
height:30px;
|
||||
width:90px;
|
||||
margin-bottom:2rem;
|
||||
}
|
||||
|
||||
.buttons-excel span{
|
||||
display:none;
|
||||
}
|
||||
|
||||
.buttons-excel:after {
|
||||
content: 'Ekspor Excel';
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- Breadcrumb -->
|
||||
<div class="container">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ url('/') }}">Beranda</a></li>
|
||||
<li><a href="{{ url('/dosen') }}">Dosen</a></li>
|
||||
<li><a class="nav-link active">Detail Dosen</a></li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
<!-- end Breadcrumb -->
|
||||
|
||||
<!-- Page Content -->
|
||||
<div id="page-content">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<!--MAIN Content-->
|
||||
<div class="col-md-12">
|
||||
<div id="page-main">
|
||||
<section id="right-sidebar">
|
||||
<header>
|
||||
<h2>Detail Dosen</h2>
|
||||
</header>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr><td colspan="3"><img src="<?= $decodedData['foto']; ?>" style="width:150px;height:200px"></td></tr>
|
||||
<tr><td>Nama</td><td>:</td><td><?= $decodedData['nama']; ?></td></tr>
|
||||
<tr><td>E-mail</td><td>:</td><td><a href="mailto:<?= $decodedData['email']; ?>" target="_blank"><?= $decodedData['email']; ?></a></td></tr>
|
||||
<tr><td>Homebase</td><td>:</td><td><?= $decodedData['penempatan']; ?></td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="panel-heading panel-heading-nav">
|
||||
<ul class="nav nav-tabs" style="z-index:0">
|
||||
<li role="presentation" class="<?php echo $activeDosen; ?>" >
|
||||
<a href="#5" aria-controls="5" role="tab" data-toggle="tab">Pengajaran</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="#6" aria-controls="6" role="tab" data-toggle="tab">Bimbingan Mahasiswa</a>
|
||||
</li>
|
||||
<li role="presentation" >
|
||||
<a href="#1" aria-controls="1" role="tab" data-toggle="tab">Penelitian</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="#2" aria-controls="2" role="tab" data-toggle="tab">Pengabdian Kepada Masyarakat</a>
|
||||
</li>
|
||||
<li role="presentation" >
|
||||
<a href="#7" aria-controls="7" role="tab" data-toggle="tab">Visiting Scientist</a>
|
||||
</li>
|
||||
<li role="presentation" >
|
||||
<a href="#8" aria-controls="8" role="tab" data-toggle="tab">Detasering</a>
|
||||
</li>
|
||||
<li role="presentation" >
|
||||
<a href="#10" aria-controls="10" role="tab" data-toggle="tab">Orasi Ilmiah</a>
|
||||
</li>
|
||||
<li role="presentation" >
|
||||
<a href="#11" aria-controls="11" role="tab" data-toggle="tab">Tugas Tambahan</a>
|
||||
</li>
|
||||
<li role="presentation" >
|
||||
<a href="#12" aria-controls="12" role="tab" data-toggle="tab">Publikasi Karya</a>
|
||||
</li>
|
||||
<li role="presentation" >
|
||||
<a href="#13" aria-controls="13" role="tab" data-toggle="tab">Paten</a>
|
||||
</li>
|
||||
<li role="presentation" >
|
||||
<a href="#14" aria-controls="14" role="tab" data-toggle="tab">Pembicara</a>
|
||||
</li>
|
||||
<li role="presentation" >
|
||||
<a href="#15" aria-controls="15" role="tab" data-toggle="tab">Pengelola Jurnal</a>
|
||||
</li>
|
||||
<li role="presentation" >
|
||||
<a href="#16" aria-controls="16" role="tab" data-toggle="tab">Jabatan Struktural</a>
|
||||
</li>
|
||||
<li role="presentation" >
|
||||
<a href="#17" aria-controls="17" role="tab" data-toggle="tab">Anggota Profesi</a>
|
||||
</li>
|
||||
<li role="presentation" >
|
||||
<a href="#18" aria-controls="18" role="tab" data-toggle="tab">Penghargaan</a>
|
||||
</li>
|
||||
<li role="presentation" >
|
||||
<a href="#19" aria-controls="19" role="tab" data-toggle="tab">Penunjang Lainnya</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<div class="tab-content">
|
||||
<div role="tabpanel" class="tab-pane fade" id="1" >
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_penelitian" class="table table-hover course-list-table tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>No</td>
|
||||
<td>Tahun</td>
|
||||
<td>Judul</td>
|
||||
<td>Sumber Data</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$isiTabel = "";
|
||||
if(sizeof($listPenelitianFinal) == 0){
|
||||
$isiTabel = "<tr><td style='text-align:center' colspan='3'>Tidak ada data.</td></tr>";
|
||||
}
|
||||
|
||||
$no = 1;
|
||||
foreach($listPenelitianFinal as $key => $val){
|
||||
$isiTabel .= "<tr><td>$no</td><td>".$val['tahun']."</td><td>".$val['judul']."</td><td>".$val['sumber']."</td></tr>";
|
||||
$no++;
|
||||
}
|
||||
|
||||
echo $isiTabel;
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane fade" id="2">
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_pkm" class="table table-hover course-list-table tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>No</td>
|
||||
<td>Tahun</td>
|
||||
<td>Judul</td>
|
||||
<td>Sumber Data</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$isiTabel = "";
|
||||
if(sizeof($listPengabdianFinal) == 0){
|
||||
$isiTabel = "<tr><td style='text-align:center' colspan='4'>Tidak ada data.</td></tr>";
|
||||
}
|
||||
|
||||
$no = 1;
|
||||
foreach($listPengabdianFinal as $key => $val){
|
||||
$isiTabel .= "<tr><td>$no</td><td>".$val['tahun']."</td><td>".$val['judul']."</td><td>".$val['sumber']."</td></tr>";
|
||||
$no++;
|
||||
}
|
||||
|
||||
echo $isiTabel;
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div role="tabpanel" class="tab-pane fade in <?php echo $activeDosen; ?>" id="5">
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_pengajaran" class="table table-hover course-list-table tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>No</td>
|
||||
<td>Semester</td>
|
||||
<td>Kode MK</td>
|
||||
<td>Nama MK</td>
|
||||
<td>Kelas</td>
|
||||
<td>SKS</td>
|
||||
<td>Nama Perguruan Tinggi</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$isiTabel = "";
|
||||
if(sizeof($dataPengajaran) == 0){
|
||||
$isiTabel = "<tr><td style='text-align:center' colspan='7'>Tidak ada data.</td></tr>";
|
||||
}
|
||||
|
||||
$no = 1;
|
||||
foreach($dataPengajaran as $key => $val){
|
||||
$isiTabel .= "<tr><td>$no</td><td>".$val['semester']."</td><td>".$val['kodeMK']."</td><td>".$val['mataKuliah']."</td><td>".$val['kelas']."</td><td>".$val['sksMakul']."</td><td>".$val['namaPT']."</td></tr>";
|
||||
$no++;
|
||||
}
|
||||
|
||||
echo $isiTabel;
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div role="tabpanel" class="tab-pane fade" id="6">
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_bimbinganmahasiswa" class="table table-hover course-list-table tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>No</td>
|
||||
<td>Semester</td>
|
||||
<td>Judul</td>
|
||||
<td>Jenis Bimbingan</td>
|
||||
<td>Prodi</td>
|
||||
<td>Nama Perguruan Tinggi</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$isiTabel = "";
|
||||
if(sizeof($dataBimbinganMahasiswa) == 0){
|
||||
$isiTabel = "<tr><td style='text-align:center' colspan='6'>Tidak ada data.</td></tr>";
|
||||
}
|
||||
|
||||
$no = 1;
|
||||
foreach($dataBimbinganMahasiswa as $key => $val){
|
||||
$isiTabel .= "<tr><td>$no</td><td>".$val['semester']."</td><td>".$val['judul']."</td><td>".$val['jenisBimbingan']."</td><td>".$val['prodiBimbingan']."</td><td>".$val['namaPerguruanTinggi']."</td></tr>";
|
||||
$no++;
|
||||
}
|
||||
|
||||
echo $isiTabel;
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div role="tabpanel" class="tab-pane fade" id="7">
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_visitingscientist" class="table table-hover course-list-table tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>No</td>
|
||||
<td>Tanggal</td>
|
||||
<td>Kegiatan</td>
|
||||
<td>Lama Kegiatan</td>
|
||||
<td>Nama Perguruan Tinggi</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$isiTabel = "";
|
||||
if(sizeof($dataVisitingScientist) == 0){
|
||||
$isiTabel = "<tr><td style='text-align:center' colspan='5'>Tidak ada data.</td></tr>";
|
||||
}
|
||||
|
||||
$no = 1;
|
||||
foreach($dataVisitingScientist as $key => $val){
|
||||
$isiTabel .= "<tr><td>$no</td><td>".$val['tanggal']."</td><td>".$val['kegiatan']."</td><td>".$val['lama']."</td><td>".$val['perguruanTinggi']."</td></tr>";
|
||||
$no++;
|
||||
}
|
||||
|
||||
echo $isiTabel;
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div role="tabpanel" class="tab-pane fade" id="8">
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_detasering" class="table table-hover course-list-table tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>No</td>
|
||||
<td>Tahun</td>
|
||||
<td>Kategori Kegiatan</td>
|
||||
<td>Bidang Tugas</td>
|
||||
<td>Nama Perguruan Tinggi</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$isiTabel = "";
|
||||
if(sizeof($dataDetasering) == 0){
|
||||
$isiTabel = "<tr><td style='text-align:center' colspan='5'>Tidak ada data.</td></tr>";
|
||||
}
|
||||
|
||||
$no = 1;
|
||||
foreach($dataDetasering as $key => $val){
|
||||
$isiTabel .= "<tr><td>$no</td><td>".date('Y', strtotime($val['tanggalSK']))."</td><td>".$val['kategoriKegiatan']."</td><td>".$val['bidangTugas']."</td><td>".$val['perguruanTinggi']."</td></tr>";
|
||||
$no++;
|
||||
}
|
||||
|
||||
echo $isiTabel;
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div role="tabpanel" class="tab-pane fade" id="10">
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_orasiilmiah" class="table table-hover course-list-table tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>No</td>
|
||||
<td>Tanggal</td>
|
||||
<td>Kategori Kegiatan</td>
|
||||
<td>Judul Makalah</td>
|
||||
<td>Nama Pertemuan</td>
|
||||
<td>Penyelenggara</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$isiTabel = "";
|
||||
if(sizeof($dataOrasiIlmiah) == 0){
|
||||
$isiTabel = "<tr><td style='text-align:center' colspan='6'>Tidak ada data.</td></tr>";
|
||||
}
|
||||
|
||||
$no = 1;
|
||||
foreach($dataOrasiIlmiah as $key => $val){
|
||||
$isiTabel .= "<tr><td>$no</td><td>".$val['tanggal']."</td><td>".$val['kategoriKegiatan']."</td><td>".$val['judulMakalah']."</td><td>".$val['namaPertemuan']."</td><td>".$val['penyelenggara']."</td></tr>";
|
||||
$no++;
|
||||
}
|
||||
|
||||
echo $isiTabel;
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div role="tabpanel" class="tab-pane fade" id="11">
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_tugastambahan" class="table table-hover course-list-table tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>No</td>
|
||||
<td>Tanggal</td>
|
||||
<td>Jenis Tugas Tambahan</td>
|
||||
<td>Unit Kerja</td>
|
||||
<td>Perguruan Tinggi</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$isiTabel = "";
|
||||
if(sizeof($dataTugasTambahan) == 0){
|
||||
$isiTabel = "<tr><td style='text-align:center' colspan='5'>Tidak ada data.</td></tr>";
|
||||
}
|
||||
|
||||
$no = 1;
|
||||
foreach($dataTugasTambahan as $key => $val){
|
||||
$isiTabel .= "<tr><td>$no</td><td>".$val['tanggalMulai']." sampai ".$val['tanggalSelesai']."</td><td>".$val['jenisTugasTambahan']."</td><td>".$val['unitKerja']."</td><td>".$val['perguruanTinggi']."</td></tr>";
|
||||
$no++;
|
||||
}
|
||||
|
||||
echo $isiTabel;
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div role="tabpanel" class="tab-pane fade" id="12">
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_publikasi" class="table table-hover course-list-table tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>No</td>
|
||||
<td>Tanggal</td>
|
||||
<td>Judul</td>
|
||||
<td>Jenis Publikasi</td>
|
||||
<td>Status</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$isiTabel = "";
|
||||
if(sizeof($dataPublikasiKarya) == 0){
|
||||
$isiTabel = "<tr><td style='text-align:center' colspan='5'>Tidak ada data.</td></tr>";
|
||||
}
|
||||
|
||||
$no = 1;
|
||||
foreach($dataPublikasiKarya as $key => $val){
|
||||
$isiTabel .= "<tr><td>$no</td><td>".$val['tanggal']."</td><td>".$val['judul']."</td><td>".$val['jenisPublikasi']."</td><td>".$val['statusDosen']."</td></tr>";
|
||||
$no++;
|
||||
}
|
||||
|
||||
echo $isiTabel;
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div role="tabpanel" class="tab-pane fade" id="13">
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_paten" class="table table-hover course-list-table tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>No</td>
|
||||
<td>Tanggal Terbit</td>
|
||||
<td>Judul</td>
|
||||
<td>Jenis Publikasi</td>
|
||||
<td>Status</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$isiTabel = "";
|
||||
if(sizeof($dataPaten) == 0){
|
||||
$isiTabel = "<tr><td style='text-align:center' colspan='5'>Tidak ada data.</td></tr>";
|
||||
}
|
||||
|
||||
$no = 1;
|
||||
foreach($dataPaten as $key => $val){
|
||||
$isiTabel .= "<tr><td>$no</td><td>".$val['tanggalTerbit']."</td><td>".$val['judul']."</td><td>".$val['jenisPublikasi']."</td><td>".$val['statusDosen']."</td></tr>";
|
||||
$no++;
|
||||
}
|
||||
|
||||
echo $isiTabel;
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div role="tabpanel" class="tab-pane fade" id="14">
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_pembicara" class="table table-hover course-list-table tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>No</td>
|
||||
<td>Tanggal</td>
|
||||
<td>Judul Makalah</td>
|
||||
<td>Nama Pertemuan</td>
|
||||
<td>Penyelenggara</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$isiTabel = "";
|
||||
if(sizeof($dataPembicara) == 0){
|
||||
$isiTabel = "<tr><td style='text-align:center' colspan='5'>Tidak ada data.</td></tr>";
|
||||
}
|
||||
|
||||
$no = 1;
|
||||
foreach($dataPembicara as $key => $val){
|
||||
$isiTabel .= "<tr><td>$no</td><td>".$val['tanggal']."</td><td>".$val['judulMakalah']."</td><td>".$val['namaPertemuan']."</td><td>".$val['penyelenggara']."</td></tr>";
|
||||
$no++;
|
||||
}
|
||||
|
||||
echo $isiTabel;
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div role="tabpanel" class="tab-pane fade" id="15">
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_pengelolajurnal" class="table table-hover course-list-table tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>No</td>
|
||||
<td>Tanggal</td>
|
||||
<td>Peran</td>
|
||||
<td>Media Publikasi</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$isiTabel = "";
|
||||
if(sizeof($dataPengelolaJurnal) == 0){
|
||||
$isiTabel = "<tr><td style='text-align:center' colspan='4'>Tidak ada data.</td></tr>";
|
||||
}
|
||||
|
||||
$no = 1;
|
||||
foreach($dataPengelolaJurnal as $key => $val){
|
||||
$isiTabel .= "<tr><td>$no</td><td>".$val['tanggalMulai']." sampai ".$val['tanggalSelesai']."</td><td>".$val['peran']."</td><td>".$val['mediaPublikasi']."</td></tr>";
|
||||
$no++;
|
||||
}
|
||||
|
||||
echo $isiTabel;
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div role="tabpanel" class="tab-pane fade" id="16">
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_jabatanstruktural" class="table table-hover course-list-table tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>No</td>
|
||||
<td>Tanggal</td>
|
||||
<td>Jabatan</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$isiTabel = "";
|
||||
if(sizeof($dataJabatanStruktural) == 0){
|
||||
$isiTabel = "<tr><td style='text-align:center' colspan='3'>Tidak ada data.</td></tr>";
|
||||
}
|
||||
|
||||
$no = 1;
|
||||
foreach($dataJabatanStruktural as $key => $val){
|
||||
$isiTabel .= "<tr><td>$no</td><td>".$val['tanggalMulai']." sampai ".$val['tanggalSelesai']."</td><td>".$val['jabatan']."</td></tr>";
|
||||
$no++;
|
||||
}
|
||||
|
||||
echo $isiTabel;
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div role="tabpanel" class="tab-pane fade" id="17">
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_anggotaprofesi" class="table table-hover course-list-table tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>No</td>
|
||||
<td>Tanggal</td>
|
||||
<td>Peran</td>
|
||||
<td>Nama Organisasi</td>
|
||||
<td>Instansi Profesi</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$isiTabel = "";
|
||||
if(sizeof($dataAnggotaProfesi) == 0){
|
||||
$isiTabel = "<tr><td style='text-align:center' colspan='5'>Tidak ada data.</td></tr>";
|
||||
}
|
||||
|
||||
$no = 1;
|
||||
foreach($dataAnggotaProfesi as $key => $val){
|
||||
$isiTabel .= "<tr><td>$no</td><td>".$val['tanggalMulai']." sampai ".$val['tanggalSelesai']."</td><td>".$val['peran']."</td><td>".$val['namaOrganisasi']."</td><td>".$val['instansiProfesi']."</td></tr>";
|
||||
$no++;
|
||||
}
|
||||
|
||||
echo $isiTabel;
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div role="tabpanel" class="tab-pane fade" id="18">
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_penghargaan" class="table table-hover course-list-table tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>No</td>
|
||||
<td>Tahun</td>
|
||||
<td>Nama Penghargaan</td>
|
||||
<td>Pemberi</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$isiTabel = "";
|
||||
if(sizeof($dataPenghargaan) == 0){
|
||||
$isiTabel = "<tr><td style='text-align:center' colspan='4'>Tidak ada data.</td></tr>";
|
||||
}
|
||||
|
||||
$no = 1;
|
||||
foreach($dataPenghargaan as $key => $val){
|
||||
$isiTabel .= "<tr><td>$no</td><td>".$val['tahun']."</td><td>".$val['nama']."</td><td>".$val['pemberi']."</td></tr>";
|
||||
$no++;
|
||||
}
|
||||
|
||||
echo $isiTabel;
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div role="tabpanel" class="tab-pane fade" id="19">
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_penunjanglain" class="table table-hover course-list-table tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>No</td>
|
||||
<td>Tanggal</td>
|
||||
<td>Nama</td>
|
||||
<td>Peran</td>
|
||||
<td>Instansi</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$isiTabel = "";
|
||||
if(sizeof($dataPenunjangLain) == 0){
|
||||
$isiTabel = "<tr><td style='text-align:center' colspan='5'>Tidak ada data.</td></tr>";
|
||||
}
|
||||
|
||||
$no = 1;
|
||||
foreach($dataPenunjangLain as $key => $val){
|
||||
$isiTabel .= "<tr><td>$no</td><td>".$val['tanggalMulai']." sampai ".$val['tanggalSelesai']."</td><td>".$val['nama']."</td><td>".$val['peran']."</td><td>".$val['instansi']."</td></tr>";
|
||||
$no++;
|
||||
}
|
||||
|
||||
echo $isiTabel;
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</section>
|
||||
</div><!-- /#page-main -->
|
||||
</div><!-- /.col-md-8 -->
|
||||
|
||||
<!--SIDEBAR Content-->
|
||||
<div class="col-md-6">
|
||||
<aside class="news-small" id="news-small">
|
||||
<header>
|
||||
<h2>Informasi Terbaru</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
@foreach ($informasiTerbarus as $informasiTerbaru)
|
||||
<article>
|
||||
<figure class="date"><i
|
||||
class="fa fa-file-o"></i>{{ $informasiTerbaru->release_date }}</figure>
|
||||
<header><a
|
||||
href="{{ url($informasiTerbaru->slug) }}">{{ $informasiTerbaru->judul }}</a>
|
||||
</header>
|
||||
</article><!-- /article -->
|
||||
@endforeach
|
||||
</div><!-- /.section-content -->
|
||||
<a href="{{ url('/informasi_terbaru') }}" class="read-more">Semua Informasi</a>
|
||||
</aside><!-- /.news-small -->
|
||||
</div><!-- /.col-md-4 -->
|
||||
<div class="col-md-6">
|
||||
<aside id="our-professors">
|
||||
<header>
|
||||
<h2>Aplikasi Integrasi</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
<div class="professors">
|
||||
@foreach ($aplikasiIntegrasis as $aplikasiIntegrasi)
|
||||
<article class="professor-thumbnail">
|
||||
<figure class="professor-image"><a href="{{ $aplikasiIntegrasi->url }}"><img
|
||||
src="{{ url($aplikasiIntegrasi->thumbnail) }}"
|
||||
style="width:80px;height:80px;object-fit:contain" alt=""></a></figure>
|
||||
<aside>
|
||||
<header>
|
||||
<a
|
||||
href="{{ url($aplikasiIntegrasi->url) }}">{{ $aplikasiIntegrasi->nama }}</a>
|
||||
<div class="divider"></div>
|
||||
<figure class="professor-description">{{ $aplikasiIntegrasi->teks }}
|
||||
</figure>
|
||||
</header>
|
||||
</aside>
|
||||
</article><!-- /.professor-thumbnail -->
|
||||
@endforeach
|
||||
<a href="{{ url('aplikasi_integrasi') }}" class="read-more">Semua Aplikasi</a>
|
||||
</div><!-- /.professors -->
|
||||
</div><!-- /.section-content -->
|
||||
</aside><!-- /.our-professors -->
|
||||
</div>
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container -->
|
||||
</div>
|
||||
<!-- end Page Content -->
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
<?php if(sizeof($dataPenelitian) > 0) {?>
|
||||
$('#tabel_penelitian').DataTable();
|
||||
<?php } ?>
|
||||
|
||||
<?php if(sizeof($dataPengabdian) > 0) {?>
|
||||
$('#tabel_pkm').DataTable();
|
||||
<?php } ?>
|
||||
|
||||
<?php if(sizeof($dataPengajaran) > 0) {?>
|
||||
$('#tabel_pengajaran').DataTable();
|
||||
<?php } ?>
|
||||
|
||||
<?php if(sizeof($dataBimbinganMahasiswa) > 0) {?>
|
||||
$('#tabel_bimbinganmahasiswa').DataTable();
|
||||
<?php } ?>
|
||||
|
||||
<?php if(sizeof($dataVisitingScientist) > 0) {?>
|
||||
$('#tabel_visitingscientist').DataTable();
|
||||
<?php } ?>
|
||||
|
||||
<?php if(sizeof($dataDetasering) > 0) {?>
|
||||
$('#tabel_detasering').DataTable();
|
||||
<?php } ?>
|
||||
|
||||
<?php if(sizeof($dataOrasiIlmiah) > 0) {?>
|
||||
$('#tabel_orasiilmiah').DataTable();
|
||||
<?php } ?>
|
||||
|
||||
<?php if(sizeof($dataTugasTambahan) > 0) {?>
|
||||
$('#tabel_tugastambahan').DataTable();
|
||||
<?php } ?>
|
||||
|
||||
<?php if(sizeof($dataPublikasiKarya) > 0) {?>
|
||||
$('#tabel_publikasi').DataTable();
|
||||
<?php } ?>
|
||||
|
||||
<?php if(sizeof($dataPaten) > 0) {?>
|
||||
$('#tabel_paten').DataTable();
|
||||
<?php } ?>
|
||||
|
||||
<?php if(sizeof($dataPembicara) > 0) {?>
|
||||
$('#tabel_pembicara').DataTable();
|
||||
<?php } ?>
|
||||
|
||||
<?php if(sizeof($dataPengelolaJurnal) > 0) {?>
|
||||
$('#tabel_pengelolajurnal').DataTable();
|
||||
<?php } ?>
|
||||
|
||||
<?php if(sizeof($dataJabatanStruktural) > 0) {?>
|
||||
$('#tabel_jabatanstruktural').DataTable();
|
||||
<?php } ?>
|
||||
|
||||
<?php if(sizeof($dataAnggotaProfesi) > 0) {?>
|
||||
$('#tabel_anggotaprofesi').DataTable();
|
||||
<?php } ?>
|
||||
|
||||
<?php if(sizeof($dataPenghargaan) > 0) {?>
|
||||
$('#tabel_penghargaan').DataTable();
|
||||
<?php } ?>
|
||||
|
||||
<?php if(sizeof($dataPenunjangLain) > 0) {?>
|
||||
$('#tabel_penunjanglain').DataTable();
|
||||
<?php } ?>
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
|
||||
@endsection
|
||||
@@ -0,0 +1,432 @@
|
||||
@extends('portal/layout/main')
|
||||
|
||||
@section('title', 'Dosen - Fakultas Teknik UNTAN')
|
||||
|
||||
@section('container')
|
||||
|
||||
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" crossorigin="anonymous"></script>
|
||||
<script src="<?php echo url('portal_template/assets/js/jquery.dataTables.min.js'); ?>"></script>
|
||||
<script src="<?php echo url('portal_template/assets/js/dataTables.bootstrap4.min.js'); ?>"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.6.4/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.6.4/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.6.4/js/buttons.print.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.6.4/js/buttons.colVis.min.js"></script>
|
||||
|
||||
<style>
|
||||
td{
|
||||
color:#595959;
|
||||
}
|
||||
|
||||
canvas{
|
||||
max-height:300px;
|
||||
}
|
||||
|
||||
tfoot {
|
||||
display: table-header-group;
|
||||
}
|
||||
|
||||
.buttons-excel{
|
||||
height:30px;
|
||||
width:90px;
|
||||
margin-bottom:2rem;
|
||||
}
|
||||
|
||||
.buttons-excel span{
|
||||
display:none;
|
||||
}
|
||||
|
||||
.buttons-excel:after {
|
||||
content: 'Ekspor Excel';
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- Breadcrumb -->
|
||||
<div class="container">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ url('/') }}">Beranda</a></li>
|
||||
<li><a class="nav-link active">Dosen</a></li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$rawData = file_get_contents(env("APP_KEPEGAWAIAN_URL")."/API/public/getListDataPegawai.php?jenis=DOSEN");
|
||||
$decodedData = json_decode($rawData, true);
|
||||
|
||||
$listPegawai = $decodedData['data'];
|
||||
$stats = $decodedData['stats'];
|
||||
?>
|
||||
<!-- end Breadcrumb -->
|
||||
|
||||
<!-- Page Content -->
|
||||
<div id="page-content">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<!--MAIN Content-->
|
||||
<div class="col-md-12">
|
||||
<div id="page-main">
|
||||
<section id="right-sidebar">
|
||||
<header>
|
||||
<h2>Dosen</h2>
|
||||
</header>
|
||||
<h3>Statistik Berdasarkan : </h3>
|
||||
<div class="panel-heading panel-heading-nav">
|
||||
<ul class="nav nav-tabs" style="z-index:0">
|
||||
<li role="presentation" class="active">
|
||||
<a href="#1" aria-controls="1" role="tab" data-toggle="tab">Status Kepegawaian</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="#2" aria-controls="2" role="tab" data-toggle="tab">Status Keaktifan</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="#3" aria-controls="3" role="tab" data-toggle="tab">Jenjang Studi</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="#4" aria-controls="4" role="tab" data-toggle="tab">Jabatan</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="#5" aria-controls="5" role="tab" data-toggle="tab">Golongan</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="#6" aria-controls="6" role="tab" data-toggle="tab">Jenis Kelamin</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="#7" aria-controls="7" role="tab" data-toggle="tab">Jenis Kelamin x Golongan</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="#8" aria-controls="8" role="tab" data-toggle="tab">Jenis Kelamin x Jenjang Studi</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="#9" aria-controls="9" role="tab" data-toggle="tab">Jenjang Studi x Golongan</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="#10" aria-controls="10" role="tab" data-toggle="tab">Jabatan x Jenjang Studi</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="#11" aria-controls="11" role="tab" data-toggle="tab">Jabatan x Jenis Kelamin</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="tab-content">
|
||||
<div role="tabpanel" class="tab-pane fade in active" id="1"><canvas id="myChart1"></canvas></div>
|
||||
<div role="tabpanel" class="tab-pane fade" id="2"><canvas id="myChart2"></canvas></div>
|
||||
<div role="tabpanel" class="tab-pane fade" id="3"><canvas id="myChart3"></canvas></div>
|
||||
<div role="tabpanel" class="tab-pane fade" id="4"><canvas id="myChart4"></canvas></div>
|
||||
<div role="tabpanel" class="tab-pane fade" id="5"><canvas id="myChart5"></canvas></div>
|
||||
<div role="tabpanel" class="tab-pane fade" id="6"><canvas id="myChart6"></canvas></div>
|
||||
<div role="tabpanel" class="tab-pane fade" id="7"><canvas id="myChart7"></canvas></div>
|
||||
<div role="tabpanel" class="tab-pane fade" id="8"><canvas id="myChart8"></canvas></div>
|
||||
<div role="tabpanel" class="tab-pane fade" id="9"><canvas id="myChart9"></canvas></div>
|
||||
<div role="tabpanel" class="tab-pane fade" id="10"><canvas id="myChart10"></canvas></div>
|
||||
<div role="tabpanel" class="tab-pane fade" id="11"><canvas id="myChart11"></canvas></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3>Data Dosen: </h3>
|
||||
<div class="table-responsive" style="margin-bottom:5rem">
|
||||
<table id="tabel_dosen" class="table table-hover course-list-table tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No.</th>
|
||||
<th>Nama</th>
|
||||
<th>NIP</th>
|
||||
<th>Prodi</th>
|
||||
<th>Jabatan</th>
|
||||
<th>Golongan</th>
|
||||
<th>Jenis Kelamin</th>
|
||||
<th>Jenjang Studi</th>
|
||||
<th>Status Kepegawaian</th>
|
||||
<th>Status Aktif</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th>Prodi</th>
|
||||
<th>Jabatan</th>
|
||||
<th>Golongan</th>
|
||||
<th>Jenis Kelamin</th>
|
||||
<th>Jenjang Studi</th>
|
||||
<th>Status Kepegawaian</th>
|
||||
<th>Status Aktif</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<?php
|
||||
$no = 1;
|
||||
foreach($listPegawai as $keyPegawai => $valPegawai){
|
||||
echo "<tr>
|
||||
<td>".$no."</td>
|
||||
<td><a style='display:block;width:200px' href='".url('/dosen/'.$valPegawai['id'])."' target='_blank'>".$valPegawai['nama']."</a></td>
|
||||
<td>".$valPegawai['noInduk']."</td>
|
||||
<td>".$valPegawai['prodi']."</td>
|
||||
<td>".$valPegawai['jabatan']."</td>
|
||||
<td>".$valPegawai['golongan']."</td>
|
||||
<td>".$valPegawai['jk']."</td>
|
||||
<td>".$valPegawai['jenjangStudi']."</td>
|
||||
<td>".$valPegawai['status']."</td>
|
||||
<td>".$valPegawai['aktif']."</td>
|
||||
</tr>";
|
||||
$no++;
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</div><!-- /#page-main -->
|
||||
</div><!-- /.col-md-8 -->
|
||||
|
||||
<!--SIDEBAR Content-->
|
||||
<div class="col-md-6">
|
||||
<aside class="news-small" id="news-small">
|
||||
<header>
|
||||
<h2>Informasi Terbaru</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
@foreach ($informasiTerbarus as $informasiTerbaru)
|
||||
<article>
|
||||
<figure class="date"><i
|
||||
class="fa fa-file-o"></i>{{ $informasiTerbaru->release_date }}</figure>
|
||||
<header><a
|
||||
href="{{ url($informasiTerbaru->slug) }}">{{ $informasiTerbaru->judul }}</a>
|
||||
</header>
|
||||
</article><!-- /article -->
|
||||
@endforeach
|
||||
</div><!-- /.section-content -->
|
||||
<a href="{{ url('/informasi_terbaru') }}" class="read-more">Semua Informasi</a>
|
||||
</aside><!-- /.news-small -->
|
||||
</div><!-- /.col-md-4 -->
|
||||
<div class="col-md-6">
|
||||
<aside id="our-professors">
|
||||
<header>
|
||||
<h2>Aplikasi Integrasi</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
<div class="professors">
|
||||
@foreach ($aplikasiIntegrasis as $aplikasiIntegrasi)
|
||||
<article class="professor-thumbnail">
|
||||
<figure class="professor-image"><a href="{{ $aplikasiIntegrasi->url }}"><img
|
||||
src="{{ url($aplikasiIntegrasi->thumbnail) }}"
|
||||
style="width:80px;height:80px;object-fit:contain" alt=""></a></figure>
|
||||
<aside>
|
||||
<header>
|
||||
<a
|
||||
href="{{ url($aplikasiIntegrasi->url) }}">{{ $aplikasiIntegrasi->nama }}</a>
|
||||
<div class="divider"></div>
|
||||
<figure class="professor-description">{{ $aplikasiIntegrasi->teks }}
|
||||
</figure>
|
||||
</header>
|
||||
</aside>
|
||||
</article><!-- /.professor-thumbnail -->
|
||||
@endforeach
|
||||
<a href="{{ url('aplikasi_integrasi') }}" class="read-more">Semua Aplikasi</a>
|
||||
</div><!-- /.professors -->
|
||||
</div><!-- /.section-content -->
|
||||
</aside><!-- /.our-professors -->
|
||||
</div>
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container -->
|
||||
</div>
|
||||
<!-- end Page Content -->
|
||||
|
||||
<script>
|
||||
let chartColor = ["rgb(160,227,183)", "rgb(45,116,122)", "rgb(37,184,234)", "rgb(69,63,188)", "rgb(161,143,248)", "rgb(86,60,102)", "rgb(208,101,225)", "rgb(154,16,115)", "rgb(255,196,222)", "rgb(83,16,240)", "rgb(92,240,112)", "rgb(45,122,44)", "rgb(169,213,65)", "rgb(127,43,4)", "rgb(241,169,112)", "rgb(192,0,24)", "rgb(253,108,160)", "rgb(78,72,9)", "rgb(244,212,3)", "rgb(254,116,70)"];
|
||||
let statsGolongan = JSON.parse(`<?php echo json_encode($stats['golongan']); ?>`);
|
||||
let statsJk = JSON.parse(`<?php echo json_encode($stats['jk']); ?>`);
|
||||
let statsJenjangStudi = JSON.parse(`<?php echo json_encode($stats['jenjangStudi']); ?>`);
|
||||
let statsJabatan = JSON.parse(`<?php echo json_encode($stats['jabatan']); ?>`);
|
||||
let statsStatus = JSON.parse(`<?php echo json_encode($stats['status']); ?>`);
|
||||
let statsAktif = JSON.parse(`<?php echo json_encode($stats['aktif']); ?>`);
|
||||
|
||||
function createChartAndTable(chartId, listData){
|
||||
let listLabel = [];
|
||||
let listValue = [];
|
||||
let listColor = [];
|
||||
|
||||
for(let i = 0; i < listData.length; i++){
|
||||
const data = listData[i];
|
||||
listLabel.push(data.nama);
|
||||
listValue.push(data.jumlah);
|
||||
listColor.push(chartColor[i]);
|
||||
}
|
||||
|
||||
var config = {
|
||||
type: "bar",
|
||||
data: {
|
||||
datasets: [
|
||||
{
|
||||
data: listValue,
|
||||
backgroundColor: listColor,
|
||||
},
|
||||
],
|
||||
labels: listLabel,
|
||||
},
|
||||
options: {
|
||||
responsive: true,
|
||||
plugins: {
|
||||
legend: {
|
||||
display:false,
|
||||
position: "right",
|
||||
},
|
||||
},
|
||||
title: {
|
||||
display: false,
|
||||
text: "",
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
};
|
||||
|
||||
var ctx = document
|
||||
.getElementById(chartId)
|
||||
.getContext("2d");
|
||||
window.myPie = new Chart(ctx, config);
|
||||
}
|
||||
|
||||
function createChartAndTableMultiData(chartId, jenisData){
|
||||
let listData = [];
|
||||
|
||||
let keyData = null;
|
||||
switch(jenisData){
|
||||
case 'golonganJK' :
|
||||
listData = statsGolongan;
|
||||
keyData = 'jk';
|
||||
break;
|
||||
case 'jenjangStudiJK' :
|
||||
listData = statsJenjangStudi;
|
||||
keyData = 'jk';
|
||||
break;
|
||||
case 'golonganJenjangStudi' :
|
||||
listData = statsGolongan;
|
||||
keyData = 'jenjangStudi';
|
||||
break;
|
||||
case 'jabatanJenjangStudi' :
|
||||
listData = statsJabatan;
|
||||
keyData = 'jenjangStudi';
|
||||
break;
|
||||
case 'jabatanJK' :
|
||||
listData = statsJabatan;
|
||||
keyData = 'jk';
|
||||
break;
|
||||
}
|
||||
|
||||
let listDataSet = [];
|
||||
let listLabel = [];
|
||||
for(let i = 0; i < listData.length; i++){
|
||||
const data = listData[i];
|
||||
listLabel.push(data.nama);
|
||||
|
||||
let ambilData = data[keyData];
|
||||
|
||||
for(let j = 0; j < ambilData.length; j++){
|
||||
const dataDetail = ambilData[j];
|
||||
if(listDataSet[j] == undefined){
|
||||
listDataSet[j] = {
|
||||
label: dataDetail.nama,
|
||||
data: [],
|
||||
borderColor: chartColor[j],
|
||||
backgroundColor: chartColor[j],
|
||||
};
|
||||
}
|
||||
|
||||
listDataSet[j].data.push(dataDetail.jumlah);
|
||||
}
|
||||
}
|
||||
|
||||
var config = {
|
||||
type: "bar",
|
||||
data: {
|
||||
datasets: listDataSet,
|
||||
labels: listLabel,
|
||||
},
|
||||
options: {
|
||||
interaction: {
|
||||
mode: 'index',
|
||||
},
|
||||
responsive: true,
|
||||
plugins: {
|
||||
legend: {
|
||||
display:false,
|
||||
position: "right",
|
||||
},
|
||||
},
|
||||
title: {
|
||||
display: false,
|
||||
text: "",
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
};
|
||||
|
||||
var ctx = document
|
||||
.getElementById(chartId)
|
||||
.getContext("2d");
|
||||
window.myPie = new Chart(ctx, config);
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
let indexNoFilter = [0, 1, 2];
|
||||
$('#tabel_dosen').DataTable({
|
||||
dom: 'Blfrtip',
|
||||
buttons: [
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
},
|
||||
|
||||
],
|
||||
initComplete: function () {
|
||||
this.api()
|
||||
.columns()
|
||||
.every(function () {
|
||||
var column = this;
|
||||
const idx = this.index();
|
||||
if(indexNoFilter.includes(idx)){
|
||||
return ;
|
||||
}
|
||||
|
||||
var select = $('<select><option value=""></option></select>')
|
||||
.appendTo($(column.footer()).empty())
|
||||
.on('change', function () {
|
||||
var val = $.fn.dataTable.util.escapeRegex($(this).val());
|
||||
|
||||
column.search(val ? '^' + val + '$' : '', true, false).draw();
|
||||
});
|
||||
|
||||
column
|
||||
.data()
|
||||
.unique()
|
||||
.sort()
|
||||
.each(function (d, j) {
|
||||
select.append('<option value="' + d + '">' + d + '</option>');
|
||||
});
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
createChartAndTable('myChart5', statsGolongan);
|
||||
createChartAndTable('myChart6', statsJk);
|
||||
createChartAndTable('myChart3', statsJenjangStudi);
|
||||
createChartAndTable('myChart4', statsJabatan);
|
||||
createChartAndTable('myChart1', statsStatus);
|
||||
createChartAndTable('myChart2', statsAktif);
|
||||
createChartAndTableMultiData('myChart7', 'golonganJK');
|
||||
createChartAndTableMultiData('myChart8', 'jenjangStudiJK');
|
||||
createChartAndTableMultiData('myChart9', 'golonganJenjangStudi');
|
||||
createChartAndTableMultiData('myChart10', 'jabatanJenjangStudi');
|
||||
createChartAndTableMultiData('myChart11', 'jabatanJK');
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
|
||||
@endsection
|
||||
@@ -0,0 +1,204 @@
|
||||
@extends('portal/layout/main')
|
||||
|
||||
@section('title', 'FAQ (Frequently Asked Questions) - Fakultas Teknik UNTAN')
|
||||
|
||||
@section('container')
|
||||
|
||||
@section('tag')
|
||||
{!! ReCaptcha::htmlScriptTagJsApi() !!}
|
||||
@endsection
|
||||
|
||||
<!-- Breadcrumb -->
|
||||
<div class="container">
|
||||
<ol class="breadcrumb">
|
||||
<li class="nav-link"><a href="{{ url('/') }}">Beranda</a></li>
|
||||
<li><a class="nav-link active">FAQ (Frequently Asked Questions)</a></li>
|
||||
</ol>
|
||||
</div>
|
||||
<!-- end Breadcrumb -->
|
||||
|
||||
<!-- Page Content -->
|
||||
<div id="page-content">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<!--MAIN Content-->
|
||||
<div class="col-md-8">
|
||||
<div id="page-main">
|
||||
|
||||
|
||||
<section id="course-list">
|
||||
<header>
|
||||
<h1>FAQ (Frequently Asked Questions)</h1>
|
||||
</header>
|
||||
@foreach ($faqs as $faq)
|
||||
<p>
|
||||
<div class="btn btn-secondary faq-color" type="button" data-toggle="collapse"
|
||||
style="width:100%;white-space: normal;text-align:left;"
|
||||
data-target="#collapseExample{{ $faq->id }}" aria-expanded="false"
|
||||
aria-controls="collapseExample">
|
||||
<b> Pertanyaan : </b> <br>
|
||||
{{ $faq->question }}
|
||||
</div>
|
||||
</p>
|
||||
<div class="collapse answer-color" id="collapseExample{{ $faq->id }}">
|
||||
<div class="card card-body">
|
||||
<b> Jawaban : </b> <br>
|
||||
<br>
|
||||
{{ $faq->answer }}
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
@endforeach
|
||||
</section><!-- /.course-listing -->
|
||||
<div class="center">
|
||||
<ul class="pagination">
|
||||
{{ $faqs->links('pagination::default') }}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@if (session('status'))
|
||||
<div class="alert alert-success">
|
||||
{{ session('status') }}
|
||||
</div>
|
||||
@endif
|
||||
<section id="contact-form" class="clearfix">
|
||||
<header>
|
||||
<h2>Berikan Pertanyaan Anda</h2>
|
||||
</header>
|
||||
<form class="contact-form from-prevent-multiple-submits" id="contactform" action="{{ url('faq.storePertanyaan') }}"
|
||||
method="POST" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="input-group">
|
||||
<div class="controls">
|
||||
<label for="nama">Nama</label>
|
||||
<input type="text" name="nama" id="nama" required
|
||||
placeholder="Masukkan nama anda">
|
||||
</div><!-- /.controls -->
|
||||
</div><!-- /.control-group -->
|
||||
</div><!-- /.col-md-4 -->
|
||||
<div class="col-md-6">
|
||||
<div class="input-group">
|
||||
<div class="controls">
|
||||
<label for="email">Email</label>
|
||||
<input type="email" name="email" id="email" required
|
||||
placeholder="Masukkan email anda">
|
||||
</div><!-- /.controls -->
|
||||
</div><!-- /.control-group -->
|
||||
</div><!-- /.col-md-4 -->
|
||||
</div><!-- /.row -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="input-group">
|
||||
<div class="controls">
|
||||
<label for="pertanyaan">Pertanyaan Anda</label>
|
||||
<textarea name="pertanyaan" id="pertanyaan" style="height:150px" required
|
||||
placeholder="Apa pertanyaan anda?"></textarea>
|
||||
</div><!-- /.controls -->
|
||||
</div><!-- /.control-group -->
|
||||
</div><!-- /.col-md-4 -->
|
||||
<div class="col-md-6">
|
||||
<div class="input-group">
|
||||
<div class="controls">
|
||||
<label for="captcha">Captcha</label><br>
|
||||
<div class="col-md-6"> {!! htmlFormSnippet() !!} </div>
|
||||
</div><!-- /.controls -->
|
||||
</div><!-- /.control-group -->
|
||||
</div><!-- /.col-md-4 -->
|
||||
</div><!-- /.row -->
|
||||
<div class="pull-right">
|
||||
<input type="submit" class="btn btn-color-primary from-prevent-multiple-submits" id="submit"
|
||||
value="Kirimkan Pertanyaan">
|
||||
</div><!-- /.form-actions -->
|
||||
<div id="form-status"></div>
|
||||
</form><!-- /.footer-form -->
|
||||
</section>
|
||||
</div><!-- /#page-main -->
|
||||
</div><!-- /.col-md-8 -->
|
||||
|
||||
<!--SIDEBAR Content-->
|
||||
<div class="col-md-4">
|
||||
<div id="page-sidebar" class="sidebar">
|
||||
<aside class="news-small" id="news-small">
|
||||
<header>
|
||||
<h2>Informasi Terbaru</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
@foreach ($informasiTerbarus as $informasiTerbaru)
|
||||
<article>
|
||||
<figure class="date"><i
|
||||
class="fa fa-file-o"></i>{{ $informasiTerbaru->release_date }}
|
||||
</figure>
|
||||
<header><a
|
||||
href="{{ url($informasiTerbaru->slug) }}">{{ $informasiTerbaru->judul }}</a>
|
||||
</header>
|
||||
</article><!-- /article -->
|
||||
@endforeach
|
||||
</div><!-- /.section-content -->
|
||||
<a href="{{ url('/informasi_terbaru') }}" class="read-more">Semua Informasi</a>
|
||||
</aside><!-- /.news-small -->
|
||||
<aside id="our-professors">
|
||||
<header>
|
||||
<h2>Aplikasi Integrasi</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
<div class="professors">
|
||||
@foreach ($aplikasiIntegrasis as $aplikasiIntegrasi)
|
||||
<article class="professor-thumbnail">
|
||||
<figure class="professor-image"><a href="{{ $aplikasiIntegrasi->url }}"><img
|
||||
src="{{ url($aplikasiIntegrasi->thumbnail) }}"
|
||||
style="width:80px;height:80px;object-fit:contain" alt=""></a>
|
||||
</figure>
|
||||
<aside>
|
||||
<header>
|
||||
<a
|
||||
href="{{ url($aplikasiIntegrasi->url) }}">{{ $aplikasiIntegrasi->nama }}</a>
|
||||
<div class="divider"></div>
|
||||
<figure class="professor-description">{{ $aplikasiIntegrasi->teks }}
|
||||
</figure>
|
||||
</header>
|
||||
</aside>
|
||||
</article><!-- /.professor-thumbnail -->
|
||||
@endforeach
|
||||
<a href="{{ url('aplikasi_integrasi') }}" class="read-more">Semua Aplikasi</a>
|
||||
</div><!-- /.professors -->
|
||||
</div><!-- /.section-content -->
|
||||
</aside><!-- /.our-professors -->
|
||||
</div><!-- /#sidebar -->
|
||||
</div><!-- /.col-md-4 -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container -->
|
||||
</div>
|
||||
<!-- end Page Content -->
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
<script type="text/javascript">
|
||||
$(".btn-refresh").click(function() {
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: '/refresh_captcha',
|
||||
success: function(data) {
|
||||
$(".captcha span").html(data.captcha);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
window.onload = function() {
|
||||
var $recaptcha = document.querySelector('#g-recaptcha-response');
|
||||
|
||||
if ($recaptcha) {
|
||||
$recaptcha.setAttribute("required", "required");
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
$('.from-prevent-multiple-submits').on('submit', function(){
|
||||
$('.from-prevent-multiple-submits').attr('disabled','true');
|
||||
})
|
||||
})();
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,126 @@
|
||||
@extends('portal/layout/main')
|
||||
|
||||
@section('title', 'Hasil Karya - Fakultas Teknik UNTAN')
|
||||
|
||||
@section('container')
|
||||
<!-- Breadcrumb -->
|
||||
<div class="container">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ url('/') }}">Beranda</a></li>
|
||||
<li><a class="nav-link active">Hasil Karya</a></li>
|
||||
</ol>
|
||||
</div>
|
||||
<!-- end Breadcrumb -->
|
||||
|
||||
<!-- Page Content -->
|
||||
<div id="page-content">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<!--MAIN Content-->
|
||||
<div class="col-md-8">
|
||||
<div id="page-main">
|
||||
<section class="blog-listing" id="blog-listing">
|
||||
<header>
|
||||
<h1>Hasil Karya</h1>
|
||||
</header>
|
||||
@foreach ($hasilKaryas as $hasilKarya)
|
||||
@if ($loop->iteration % 2 == 1)
|
||||
<div class="row">
|
||||
@endif
|
||||
|
||||
<div class="col-md-6 col-sm-6">
|
||||
<article class="blog-listing-post">
|
||||
<figure class="blog-thumbnail">
|
||||
<figure class="blog-meta"><span
|
||||
class="fa fa-file-text-o"></span>{{ $hasilKarya->release_date }}
|
||||
</figure>
|
||||
<div class="image-wrapper"><a href="{{ url($hasilKarya->slug) }}"><img
|
||||
src="{{ asset($hasilKarya->thumbnail) }}"></a>
|
||||
</div>
|
||||
</figure>
|
||||
<aside>
|
||||
<header>
|
||||
<a href="{{ url($hasilKarya->slug) }}">
|
||||
<h3>{{ $hasilKarya->judul }}</h3>
|
||||
</a>
|
||||
</header>
|
||||
<div class="description">
|
||||
<p>
|
||||
@if (strlen(strip_tags($hasilKarya->teks)) > 256)
|
||||
{{ str_replace(' ', '', substr(strip_tags($hasilKarya->teks), 0, 256) . '...') }}
|
||||
@else
|
||||
{{ str_replace(' ', '', substr(strip_tags($hasilKarya->teks), 0, 256)) }}
|
||||
@endif
|
||||
</p>
|
||||
</div>
|
||||
<a href="{{ url($hasilKarya->slug) }}"
|
||||
class="read-more stick-to-bottom">Selengkapnya</a>
|
||||
</aside>
|
||||
</article><!-- /article -->
|
||||
</div><!-- /.col-md-6 -->
|
||||
@if ($loop->iteration % 2 == 0)
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
</section><!-- /.blog-listing -->
|
||||
<div class="center">
|
||||
<ul class="pagination">
|
||||
{{ $hasilKaryas->links('pagination::default') }}
|
||||
</ul>
|
||||
</div>
|
||||
</div><!-- /#page-main -->
|
||||
</div><!-- /.col-md-8 -->
|
||||
|
||||
<!--SIDEBAR Content-->
|
||||
<div class="col-md-4">
|
||||
<div id="page-sidebar" class="sidebar">
|
||||
<aside class="news-small" id="news-small">
|
||||
<header>
|
||||
<h2>Informasi Terbaru</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
@foreach ($informasiTerbarus as $informasiTerbaru)
|
||||
<article>
|
||||
<figure class="date"><i
|
||||
class="fa fa-file-o"></i>{{ $informasiTerbaru->release_date }}</figure>
|
||||
<header><a
|
||||
href="{{ url($informasiTerbaru->slug) }}">{{ $informasiTerbaru->judul }}</a>
|
||||
</header>
|
||||
</article><!-- /article -->
|
||||
@endforeach
|
||||
</div><!-- /.section-content -->
|
||||
<a href="{{ url('/informasi_terbaru') }}" class="read-more">Semua Informasi</a>
|
||||
</aside><!-- /.news-small -->
|
||||
<aside id="our-professors">
|
||||
<header>
|
||||
<h2>Aplikasi Integrasi</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
<div class="professors">
|
||||
@foreach ($aplikasiIntegrasis as $aplikasiIntegrasi)
|
||||
<article class="professor-thumbnail">
|
||||
<figure class="professor-image"><a href="{{ $aplikasiIntegrasi->url }}"><img
|
||||
src="{{ url($aplikasiIntegrasi->thumbnail) }}"
|
||||
style="width:80px;height:80px;object-fit:contain" alt=""></a></figure>
|
||||
<aside>
|
||||
<header>
|
||||
<a
|
||||
href="{{ url($aplikasiIntegrasi->url) }}">{{ $aplikasiIntegrasi->nama }}</a>
|
||||
<div class="divider"></div>
|
||||
<figure class="professor-description">{{ $aplikasiIntegrasi->teks }}
|
||||
</figure>
|
||||
</header>
|
||||
</aside>
|
||||
</article><!-- /.professor-thumbnail -->
|
||||
@endforeach
|
||||
<a href="{{ url('aplikasi_integrasi') }}" class="read-more">Semua Aplikasi</a>
|
||||
</div><!-- /.professors -->
|
||||
</div><!-- /.section-content -->
|
||||
</aside><!-- /.our-professors -->
|
||||
</div><!-- /#sidebar -->
|
||||
</div><!-- /.col-md-4 -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container -->
|
||||
</div>
|
||||
<!-- end Page Content -->
|
||||
@endsection
|
||||
@@ -0,0 +1,150 @@
|
||||
@extends('portal/layout/main')
|
||||
|
||||
@section('title', 'Hasil Karya - Fakultas Teknik UNTAN')
|
||||
|
||||
@section('container')
|
||||
<!-- Breadcrumb -->
|
||||
<div class="container">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ url('/') }}">Beranda</a></li>
|
||||
<li><a href="{{ url('/hasil_karya') }}">Hasil Karya</a></li>
|
||||
<li><a class="nav-link active">{{ $hasilKarya->judul }}</a></li>
|
||||
</ol>
|
||||
</div>
|
||||
<!-- end Breadcrumb -->
|
||||
|
||||
<!-- Page Content -->
|
||||
<div id="page-content">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<!--MAIN Content-->
|
||||
<div class="col-md-8">
|
||||
<div id="page-main">
|
||||
<section id="blog-detail">
|
||||
<header>
|
||||
<h1>Hasil Karya</h1>
|
||||
</header>
|
||||
<article class="blog-detail">
|
||||
<header class="blog-detail-header">
|
||||
<img src="{{ asset($hasilKarya->thumbnail) }}"
|
||||
style="width:750px;height:350px;object-fit:contain;">
|
||||
<br>
|
||||
<h2>{{ $hasilKarya->judul }}</h2>
|
||||
<div class="blog-detail-meta">
|
||||
<span class="date"><span
|
||||
class="fa fa-file-o"></span>{{ $hasilKarya->release_date }}</span>
|
||||
</div>
|
||||
</header>
|
||||
<hr>
|
||||
<div class="ck-content">
|
||||
{!! $hasilKarya->teks !!}
|
||||
</div>
|
||||
<br>
|
||||
<footer>
|
||||
<section id="share-post">
|
||||
<div class="icons">
|
||||
<span>Bagikan ke :</span>
|
||||
<a href="{{ 'https://www.facebook.com/sharer/sharer.php?u=' . url()->current() }}"
|
||||
class="social-button" target="_blank" id="">
|
||||
<span class="fa fa-facebook-square"></span>
|
||||
</a>
|
||||
<a href="{{ 'https://twitter.com/intent/tweet?text=Fakultas Teknik Universitas Tanjungpura&url=' . url()->current() }}"
|
||||
class="social-button " target="_blank" id="">
|
||||
<span class="fa fa-twitter-square"></span>
|
||||
</a>
|
||||
<a href="{{ 'https://wa.me/?text=' . url()->current() }}"
|
||||
class="social-button " target="_blank" id="">
|
||||
<span class="fa fa-phone-square"></span>
|
||||
</a>
|
||||
</div><!-- /.icons -->
|
||||
</section><!-- /share -->
|
||||
<hr>
|
||||
</footer>
|
||||
</article>
|
||||
</section><!-- /.blog-detail -->
|
||||
<section id="related-articles">
|
||||
<header>
|
||||
<h2>Kerjasama & Mitra Kolaborasi
|
||||
Lainnya</h2>
|
||||
</header>
|
||||
<div class="row">
|
||||
@foreach ($hasilKaryas as $hasilKarya)
|
||||
<div class="col-md-6 col-sm-6">
|
||||
<article class="blog-listing-post">
|
||||
<figure class="blog-thumbnail">
|
||||
<figure class="blog-meta"><span
|
||||
class="fa fa-file-text-o"></span>{{ $hasilKarya->release_date }}
|
||||
</figure>
|
||||
<div class="image-wrapper"><a href="{{ url($hasilKarya->slug) }}"><img
|
||||
src="{{ url($hasilKarya->thumbnail) }}"></a>
|
||||
</div>
|
||||
</figure>
|
||||
<aside>
|
||||
<header>
|
||||
<a href="{{ url($hasilKarya->slug) }}">
|
||||
<h3>{{ $hasilKarya->judul }}</h3>
|
||||
</a>
|
||||
</header>
|
||||
</aside>
|
||||
</article><!-- /article -->
|
||||
</div><!-- /.col-md-6 -->
|
||||
@endforeach
|
||||
</div><!-- /.row -->
|
||||
</section><!-- /related articles -->
|
||||
</div><!-- /#page-main -->
|
||||
</div><!-- /.col-md-8 -->
|
||||
|
||||
<!--SIDEBAR Content-->
|
||||
<div class="col-md-4">
|
||||
<div id="page-sidebar" class="sidebar">
|
||||
<aside class="news-small" id="news-small">
|
||||
<header>
|
||||
<h2>Informasi Terbaru</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
@foreach ($informasiTerbarus as $informasiTerbaru)
|
||||
<article>
|
||||
<figure class="date"><i
|
||||
class="fa fa-file-o"></i>{{ $informasiTerbaru->release_date }}</figure>
|
||||
<header><a
|
||||
href="{{ url($informasiTerbaru->slug) }}">{{ $informasiTerbaru->judul }}</a>
|
||||
</header>
|
||||
</article><!-- /article -->
|
||||
@endforeach
|
||||
</div><!-- /.section-content -->
|
||||
<a href="{{ url('/informasi_terbaru') }}" class="read-more">Semua Informasi</a>
|
||||
</aside><!-- /.news-small -->
|
||||
<aside id="our-professors">
|
||||
<header>
|
||||
<h2>Aplikasi Integrasi</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
<div class="professors">
|
||||
@foreach ($aplikasiIntegrasis as $aplikasiIntegrasi)
|
||||
<article class="professor-thumbnail">
|
||||
<figure class="professor-image"><a href="{{ $aplikasiIntegrasi->url }}"><img
|
||||
src="{{ url($aplikasiIntegrasi->thumbnail) }}"
|
||||
style="width:80px;height:80px;object-fit:contain" alt=""></a>
|
||||
</figure>
|
||||
<aside>
|
||||
<header>
|
||||
<a
|
||||
href="{{ url($aplikasiIntegrasi->url) }}">{{ $aplikasiIntegrasi->nama }}</a>
|
||||
<div class="divider"></div>
|
||||
<figure class="professor-description">{{ $aplikasiIntegrasi->teks }}
|
||||
</figure>
|
||||
</header>
|
||||
</aside>
|
||||
</article><!-- /.professor-thumbnail -->
|
||||
@endforeach
|
||||
<a href="{{ url('aplikasi_integrasi') }}" class="read-more">Semua Aplikasi</a>
|
||||
</div><!-- /.professors -->
|
||||
</div><!-- /.section-content -->
|
||||
</aside><!-- /.our-professors -->
|
||||
</div><!-- /#sidebar -->
|
||||
</div><!-- /.col-md-4 -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container -->
|
||||
</div>
|
||||
<!-- end Page Content -->
|
||||
@endsection
|
||||
@@ -0,0 +1,196 @@
|
||||
@extends('portal/layout/main')
|
||||
|
||||
@section('title', 'Himpunan Mahasiswa - Fakultas Teknik UNTAN')
|
||||
|
||||
@section('container')
|
||||
<!-- Breadcrumb -->
|
||||
<div class="container">
|
||||
<ol class="breadcrumb">
|
||||
<li class="nav-link"><a href="{{ url('/') }}">Beranda</a></li>
|
||||
<li><a class="nav-link" href="{{ url('/himpunan_mahasiswa') }}">Himpunan Mahasiswa</a></li>
|
||||
<li><a class="nav-link active">{{ $himpunanMahasiswa->nama }}</a></li>
|
||||
</ol>
|
||||
</div>
|
||||
<!-- end Breadcrumb -->
|
||||
|
||||
<!-- Page Content -->
|
||||
<div id="page-content">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<!--MAIN Content-->
|
||||
<div class="col-md-8">
|
||||
<div id="page-main">
|
||||
<section id="blog-detail">
|
||||
<header>
|
||||
<h1>Himpunan Mahasiswa</h1>
|
||||
</header>
|
||||
<article class="blog-detail">
|
||||
<header class="blog-detail-header">
|
||||
<img src="{{ asset($himpunanMahasiswa->thumbnail) }}"
|
||||
style="width:750px;height:350px;object-fit:contain;">
|
||||
<br>
|
||||
<h2>{{ $himpunanMahasiswa->nama }}</h2>
|
||||
<div class="blog-detail-meta">
|
||||
<span class="date"><span
|
||||
class="fa fa-file-o"></span>{{ $himpunanMahasiswa->release_date }}</span>
|
||||
</div>
|
||||
</header>
|
||||
<hr>
|
||||
<div class="ck-content">
|
||||
{!! $himpunanMahasiswa->teks !!}
|
||||
</div>
|
||||
<br>
|
||||
<h2> Kontak : </h2>
|
||||
<table class="desktop">
|
||||
<tr>
|
||||
<td style="padding-right : 10px">
|
||||
<h3><a href="{{ $himpunanMahasiswa->url_facebook }}"><span
|
||||
style="font-size : 30px" class="fa fa-facebook-square"></span> :
|
||||
{{ $himpunanMahasiswa->facebook }}</a></h3>
|
||||
<h3><a href="{{ $himpunanMahasiswa->url_instagram }}"><span
|
||||
style="font-size : 30px" class="fa fa-instagram"></span> :
|
||||
{{ $himpunanMahasiswa->instagram }}</a></h3>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<h3><a href="{{ $himpunanMahasiswa->url_youtube }}"><span
|
||||
style="font-size : 30px" class="fa fa-youtube-play"></span> :
|
||||
{{ $himpunanMahasiswa->youtube }}</a></h3>
|
||||
<h3><a href="{{ $himpunanMahasiswa->url_twitter }}"><span
|
||||
style="font-size : 30px" class="fa fa-twitter-square"></span> :
|
||||
{{ $himpunanMahasiswa->twitter }}</a></h3>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="mobile1">
|
||||
|
||||
|
||||
<h3><a href="{{ $himpunanMahasiswa->url_facebook }}"><span style="font-size : 30px"
|
||||
class="fa fa-facebook-square"></span> :
|
||||
{{ $himpunanMahasiswa->facebook }}</a></h3>
|
||||
<h3><a href="{{ $himpunanMahasiswa->url_instagram }}"><span style="font-size : 30px"
|
||||
class="fa fa-instagram"></span> :
|
||||
{{ $himpunanMahasiswa->instagram }}</a></h3>
|
||||
|
||||
|
||||
|
||||
<h3><a href="{{ $himpunanMahasiswa->url_youtube }}"><span style="font-size : 30px"
|
||||
class="fa fa-youtube-play"></span> :
|
||||
{{ $himpunanMahasiswa->youtube }}</a></h3>
|
||||
<h3><a href="{{ $himpunanMahasiswa->url_twitter }}"><span style="font-size : 30px"
|
||||
class="fa fa-twitter-square"></span> :
|
||||
{{ $himpunanMahasiswa->twitter }}</a></h3>
|
||||
</div>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<footer>
|
||||
<section id="share-post">
|
||||
<div class="icons">
|
||||
<span>Bagikan ke :</span>
|
||||
<a href="{{ 'https://www.facebook.com/sharer/sharer.php?u=' . url()->current() }}"
|
||||
class="social-button" target="_blank" id="">
|
||||
<span class="fa fa-facebook-square"></span>
|
||||
</a>
|
||||
<a href="{{ 'https://twitter.com/intent/tweet?text=Fakultas Teknik Universitas Tanjungpura&url=' . url()->current() }}"
|
||||
class="social-button " target="_blank" id="">
|
||||
<span class="fa fa-twitter-square"></span>
|
||||
</a>
|
||||
<a href="{{ 'https://wa.me/?text=' . url()->current() }}"
|
||||
class="social-button " target="_blank" id="">
|
||||
<span class="fa fa-phone-square"></span>
|
||||
</a>
|
||||
</div><!-- /.icons -->
|
||||
</section><!-- /share -->
|
||||
<hr>
|
||||
</footer>
|
||||
</article>
|
||||
</section><!-- /.blog-detail -->
|
||||
<section id="related-articles">
|
||||
<header>
|
||||
<h2>Himpunan Mahasiswa
|
||||
Lainnya</h2>
|
||||
</header>
|
||||
<div class="row">
|
||||
@foreach ($himpunanMahasiswas as $himpunanMahasiswa)
|
||||
<div class="col-md-6 col-sm-6">
|
||||
<article class="blog-listing-post">
|
||||
<figure class="blog-thumbnail">
|
||||
<figure class="blog-meta"><span
|
||||
class="fa fa-file-text-o"></span>{{ $himpunanMahasiswa->release_date }}
|
||||
</figure>
|
||||
<div class="image-wrapper"><a
|
||||
href="{{ url($himpunanMahasiswa->slug) }}"><img
|
||||
src="{{ url($himpunanMahasiswa->thumbnail) }}"></a>
|
||||
</div>
|
||||
</figure>
|
||||
<aside>
|
||||
<header>
|
||||
<a href="{{ url($himpunanMahasiswa->slug) }}">
|
||||
<h3>{{ $himpunanMahasiswa->judul }}</h3>
|
||||
</a>
|
||||
</header>
|
||||
</aside>
|
||||
</article><!-- /article -->
|
||||
</div><!-- /.col-md-6 -->
|
||||
@endforeach
|
||||
</div><!-- /.row -->
|
||||
</section><!-- /related articles -->
|
||||
</div><!-- /#page-main -->
|
||||
</div><!-- /.col-md-8 -->
|
||||
|
||||
<!--SIDEBAR Content-->
|
||||
<div class="col-md-4">
|
||||
<div id="page-sidebar" class="sidebar">
|
||||
<aside class="news-small" id="news-small">
|
||||
<header>
|
||||
<h2>Informasi Terbaru</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
@foreach ($informasiTerbarus as $informasiTerbaru)
|
||||
<article>
|
||||
<figure class="date"><i
|
||||
class="fa fa-file-o"></i>{{ $informasiTerbaru->release_date }}</figure>
|
||||
<header><a
|
||||
href="{{ url($informasiTerbaru->slug) }}">{{ $informasiTerbaru->judul }}</a>
|
||||
</header>
|
||||
</article><!-- /article -->
|
||||
@endforeach
|
||||
</div><!-- /.section-content -->
|
||||
<a href="{{ url('/informasi_terbaru') }}" class="read-more">Semua Informasi</a>
|
||||
</aside><!-- /.news-small -->
|
||||
<aside id="our-professors">
|
||||
<header>
|
||||
<h2>Aplikasi Integrasi</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
<div class="professors">
|
||||
@foreach ($aplikasiIntegrasis as $aplikasiIntegrasi)
|
||||
<article class="professor-thumbnail">
|
||||
<figure class="professor-image"><a href="{{ $aplikasiIntegrasi->url }}"><img
|
||||
src="{{ url($aplikasiIntegrasi->thumbnail) }}"
|
||||
style="width:80px;height:80px;object-fit:contain" alt=""></a>
|
||||
</figure>
|
||||
<aside>
|
||||
<header>
|
||||
<a
|
||||
href="{{ url($aplikasiIntegrasi->url) }}">{{ $aplikasiIntegrasi->nama }}</a>
|
||||
<div class="divider"></div>
|
||||
<figure class="professor-description">{{ $aplikasiIntegrasi->teks }}
|
||||
</figure>
|
||||
</header>
|
||||
</aside>
|
||||
</article><!-- /.professor-thumbnail -->
|
||||
@endforeach
|
||||
<a href="{{ url('aplikasi_integrasi') }}" class="read-more">Semua Aplikasi</a>
|
||||
</div><!-- /.professors -->
|
||||
</div><!-- /.section-content -->
|
||||
</aside><!-- /.our-professors -->
|
||||
</div><!-- /#sidebar -->
|
||||
</div><!-- /.col-md-4 -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container -->
|
||||
</div>
|
||||
<!-- end Page Content -->
|
||||
@endsection
|
||||
@@ -0,0 +1,127 @@
|
||||
@extends('portal/layout/main')
|
||||
|
||||
@section('title', 'Himpunan Mahasiswa - Fakultas Teknik UNTAN')
|
||||
|
||||
@section('container')
|
||||
<!-- Breadcrumb -->
|
||||
<div class="container">
|
||||
<ol class="breadcrumb">
|
||||
<li class="nav-link"><a href="{{ url('/') }}">Beranda</a></li>
|
||||
<li><a class="nav-link active">Himpunan Mahasiswa</a></li>
|
||||
</ol>
|
||||
</div>
|
||||
<!-- end Breadcrumb -->
|
||||
|
||||
<!-- Page Content -->
|
||||
<div id="page-content">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<!--MAIN Content-->
|
||||
<div class="col-md-8">
|
||||
<div id="page-main">
|
||||
<section class="blog-listing" id="blog-listing">
|
||||
<header>
|
||||
<h1>Himpunan Mahasiswa</h1>
|
||||
</header>
|
||||
@foreach ($himpunanMahasiswas as $himpunanMahasiswa)
|
||||
@if ($loop->iteration % 2 == 1)
|
||||
<div class="row">
|
||||
@endif
|
||||
|
||||
<div class="col-md-6 col-sm-6">
|
||||
<article class="blog-listing-post">
|
||||
<figure class="blog-thumbnail">
|
||||
<figure class="blog-meta"><span
|
||||
class="fa fa-file-text-o"></span>{{ $himpunanMahasiswa->release_date }}
|
||||
</figure>
|
||||
<div class="image-wrapper"><a href="{{ url($himpunanMahasiswa->slug) }}"><img
|
||||
src="{{ asset($himpunanMahasiswa->thumbnail) }}"></a>
|
||||
</div>
|
||||
</figure>
|
||||
<aside>
|
||||
<header>
|
||||
<a href="{{ url($himpunanMahasiswa->slug) }}">
|
||||
<h3>{{ $himpunanMahasiswa->nama }}</h3>
|
||||
</a>
|
||||
</header>
|
||||
<div class="description">
|
||||
<p>
|
||||
@if (strlen(strip_tags($himpunanMahasiswa->teks)) > 256)
|
||||
{{ str_replace(' ', '', substr(strip_tags($himpunanMahasiswa->teks), 0, 256) . '...') }}
|
||||
@else
|
||||
{{ str_replace(' ', '', substr(strip_tags($himpunanMahasiswa->teks), 0, 256)) }}
|
||||
@endif
|
||||
</p>
|
||||
</div>
|
||||
<a href="{{ url($himpunanMahasiswa->slug) }}"
|
||||
class="read-more stick-to-bottom">Read
|
||||
More</a>
|
||||
</aside>
|
||||
</article><!-- /article -->
|
||||
</div><!-- /.col-md-6 -->
|
||||
@if ($loop->iteration % 2 == 0)
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
</section><!-- /.blog-listing -->
|
||||
<div class="center">
|
||||
<ul class="pagination">
|
||||
{{ $himpunanMahasiswas->links('pagination::default') }}
|
||||
</ul>
|
||||
</div>
|
||||
</div><!-- /#page-main -->
|
||||
</div><!-- /.col-md-8 -->
|
||||
|
||||
<!--SIDEBAR Content-->
|
||||
<div class="col-md-4">
|
||||
<div id="page-sidebar" class="sidebar">
|
||||
<aside class="news-small" id="news-small">
|
||||
<header>
|
||||
<h2>Informasi Terbaru</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
@foreach ($informasiTerbarus as $informasiTerbaru)
|
||||
<article>
|
||||
<figure class="date"><i
|
||||
class="fa fa-file-o"></i>{{ $informasiTerbaru->release_date }}</figure>
|
||||
<header><a
|
||||
href="{{ url($informasiTerbaru->slug) }}">{{ $informasiTerbaru->judul }}</a>
|
||||
</header>
|
||||
</article><!-- /article -->
|
||||
@endforeach
|
||||
</div><!-- /.section-content -->
|
||||
<a href="{{ url('/informasi_terbaru') }}" class="read-more">Semua Informasi</a>
|
||||
</aside><!-- /.news-small -->
|
||||
<aside id="our-professors">
|
||||
<header>
|
||||
<h2>Aplikasi Integrasi</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
<div class="professors">
|
||||
@foreach ($aplikasiIntegrasis as $aplikasiIntegrasi)
|
||||
<article class="professor-thumbnail">
|
||||
<figure class="professor-image"><a href="{{ $aplikasiIntegrasi->url }}"><img
|
||||
src="{{ url($aplikasiIntegrasi->thumbnail) }}"
|
||||
style="width:80px;height:80px;object-fit:contain" alt=""></a></figure>
|
||||
<aside>
|
||||
<header>
|
||||
<a
|
||||
href="{{ url($aplikasiIntegrasi->url) }}">{{ $aplikasiIntegrasi->nama }}</a>
|
||||
<div class="divider"></div>
|
||||
<figure class="professor-description">{{ $aplikasiIntegrasi->teks }}
|
||||
</figure>
|
||||
</header>
|
||||
</aside>
|
||||
</article><!-- /.professor-thumbnail -->
|
||||
@endforeach
|
||||
<a href="{{ url('aplikasi_integrasi') }}" class="read-more">Semua Aplikasi</a>
|
||||
</div><!-- /.professors -->
|
||||
</div><!-- /.section-content -->
|
||||
</aside><!-- /.our-professors -->
|
||||
</div><!-- /#sidebar -->
|
||||
</div><!-- /.col-md-4 -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container -->
|
||||
</div>
|
||||
<!-- end Page Content -->
|
||||
@endsection
|
||||
@@ -0,0 +1,153 @@
|
||||
@extends('portal/layout/main')
|
||||
|
||||
@section('title', 'Informasi Beasiswa - Fakultas Teknik UNTAN')
|
||||
|
||||
@section('container')
|
||||
<!-- Breadcrumb -->
|
||||
<div class="container">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ url('/') }}">Beranda</a></li>
|
||||
<li><a href="{{ url('/informasi_beasiswa') }}">Informasi Beasiswa</a></li>
|
||||
<li class="active">{{ $informasiBeasiswa->judul }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
<!-- end Breadcrumb -->
|
||||
|
||||
<!-- Page Content -->
|
||||
<div id="page-content">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<!--MAIN Content-->
|
||||
<div class="col-md-8">
|
||||
<div id="page-main">
|
||||
<section id="blog-detail">
|
||||
<header>
|
||||
<h1>Informasi Beasiswa</h1>
|
||||
</header>
|
||||
<article class="blog-detail">
|
||||
<header class="blog-detail-header">
|
||||
<img src="{{ url($informasiBeasiswa->thumbnail) }}"
|
||||
style="width:750px;height:350px;object-fit:contain;">
|
||||
<h2>{{ $informasiBeasiswa->judul }}</h2>
|
||||
<div class="blog-detail-meta">
|
||||
<span class="date"><span
|
||||
class="fa fa-file-o"></span>{{ $informasiBeasiswa->release_date }}</span>
|
||||
</div>
|
||||
</header>
|
||||
<div class="ck-content">
|
||||
{!! $informasiBeasiswa->teks !!}
|
||||
</div>
|
||||
<footer>
|
||||
<section id="share-post">
|
||||
<div class="icons">
|
||||
<span>Bagikan ke :</span>
|
||||
<a href="{{ 'https://www.facebook.com/sharer/sharer.php?u=' . url()->current() }}"
|
||||
class="social-button" target="_blank" id="">
|
||||
<span class="fa fa-facebook-square"></span>
|
||||
</a>
|
||||
<a href="{{ 'https://twitter.com/intent/tweet?text=Fakultas Teknik Universitas Tanjungpura&url=' . url()->current() }}"
|
||||
class="social-button " target="_blank" id="">
|
||||
<span class="fa fa-twitter-square"></span>
|
||||
</a>
|
||||
<a href="{{ 'https://wa.me/?text=' . url()->current() }}"
|
||||
class="social-button " target="_blank" id="">
|
||||
<span class="fa fa-phone-square"></span>
|
||||
</a>
|
||||
</div><!-- /.icons -->
|
||||
</section><!-- /share -->
|
||||
|
||||
</footer>
|
||||
</article>
|
||||
</section><!-- /.blog-detail -->
|
||||
|
||||
<hr>
|
||||
|
||||
<section id="related-articles">
|
||||
<header>
|
||||
<h2>Informasi Beasiswa Lainnya</h2>
|
||||
</header>
|
||||
<div class="row">
|
||||
@foreach ($informasiBeasiswas as $informasiBeasiswa)
|
||||
<div class="col-md-6 col-sm-6">
|
||||
<article class="blog-listing-post">
|
||||
<figure class="blog-thumbnail">
|
||||
<figure class="blog-meta"><span
|
||||
class="fa fa-file-text-o"></span>{{ $informasiBeasiswa->release_date }}
|
||||
</figure>
|
||||
<div class="image-wrapper"><a
|
||||
href="{{ url($informasiBeasiswa->slug) }}"><img
|
||||
src="{{ url($informasiBeasiswa->thumbnail) }}"></a></div>
|
||||
</figure>
|
||||
<aside>
|
||||
<header>
|
||||
<a href="{{ url($informasiBeasiswa->slug) }}">
|
||||
<h3>{{ $informasiBeasiswa->judul }}</h3>
|
||||
</a>
|
||||
</header>
|
||||
</aside>
|
||||
</article><!-- /article -->
|
||||
</div><!-- /.col-md-6 -->
|
||||
@endforeach
|
||||
</div><!-- /.row -->
|
||||
</section><!-- /related articles -->
|
||||
<hr>
|
||||
</div><!-- /#page-main -->
|
||||
</div><!-- /.col-md-8 -->
|
||||
|
||||
<!--SIDEBAR Content-->
|
||||
<div class="col-md-4">
|
||||
<div id="page-sidebar" class="sidebar">
|
||||
<aside class="news-small" id="news-small">
|
||||
<header>
|
||||
<h2>Informasi Terbaru</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
@foreach ($informasiTerbarus as $informasiTerbaru)
|
||||
<article>
|
||||
<figure class="date"><i
|
||||
class="fa fa-file-o"></i>{{ $informasiTerbaru->release_date }}
|
||||
</figure>
|
||||
<header><a
|
||||
href="{{ url($informasiTerbaru->slug) }}">{{ $informasiTerbaru->judul }}</a>
|
||||
</header>
|
||||
</article><!-- /article -->
|
||||
@endforeach
|
||||
</div><!-- /.section-content -->
|
||||
<a href="{{ url('/informasi_terbaru') }}" class="read-more">Semua Informasi</a>
|
||||
</aside><!-- /.news-small -->
|
||||
|
||||
<aside id="our-professors">
|
||||
<header>
|
||||
<h2>Aplikasi Integrasi</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
<div class="professors">
|
||||
@foreach ($aplikasiIntegrasis as $aplikasiIntegrasi)
|
||||
<article class="professor-thumbnail">
|
||||
<figure class="professor-image"><a href="{{ $aplikasiIntegrasi->url }}"><img
|
||||
src="{{ url($aplikasiIntegrasi->thumbnail) }}"
|
||||
style="width:80px;height:80px;object-fit:contain" alt=""></a>
|
||||
</figure>
|
||||
<aside>
|
||||
<header>
|
||||
<a href="member-detail.html">{{ $aplikasiIntegrasi->nama }}</a>
|
||||
<div class="divider"></div>
|
||||
<figure class="professor-description">{{ $aplikasiIntegrasi->teks }}
|
||||
</figure>
|
||||
</header>
|
||||
</aside>
|
||||
</article><!-- /.professor-thumbnail -->
|
||||
@endforeach
|
||||
<a href="{{ url('aplikasi_integrasi') }}" class="read-more">Semua Aplikasi</a>
|
||||
</div><!-- /.professors -->
|
||||
</div><!-- /.section-content -->
|
||||
</aside><!-- /.our-professors -->
|
||||
</div><!-- /#sidebar -->
|
||||
</div><!-- /.col-md-4 -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container -->
|
||||
</div>
|
||||
<!-- end Page Content -->
|
||||
|
||||
<!-- end Page Content -->
|
||||
@endsection
|
||||
@@ -0,0 +1,132 @@
|
||||
@extends('portal/layout/main')
|
||||
|
||||
@section('title', 'Informasi Beasiswa - Fakultas Teknik UNTAN')
|
||||
|
||||
@section('container')
|
||||
<!-- Breadcrumb -->
|
||||
<div class="container">
|
||||
<ol class="breadcrumb">
|
||||
<li class="active"><a href="{{ url('/') }}">Beranda</a></li>
|
||||
<li>Informasi Beasiswa</li>
|
||||
</ol>
|
||||
</div>
|
||||
<!-- end Breadcrumb -->
|
||||
|
||||
<!-- Page Content -->
|
||||
<div id="page-content">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<!--MAIN Content-->
|
||||
<div class="col-md-8">
|
||||
<div id="page-main">
|
||||
<section class="blog-listing" id="blog-listing">
|
||||
<header>
|
||||
<h1>Informasi Beasiswa</h1>
|
||||
</header>
|
||||
<div class="row">
|
||||
@foreach ($informasiBeasiswas as $informasiBeasiswa)
|
||||
@if ($loop->iteration % 2 == 1)
|
||||
<div class="row">
|
||||
@endif
|
||||
<div class="col-md-6 col-sm-6">
|
||||
<article class="blog-listing-post">
|
||||
<figure class="blog-thumbnail">
|
||||
<figure class="blog-meta"><span
|
||||
class="fa fa-file-text-o"></span>{{ $informasiBeasiswa->release_date }}
|
||||
</figure>
|
||||
<div class="image-wrapper"><a
|
||||
href="{{ url($informasiBeasiswa->slug) }}"><img
|
||||
src="{{ url($informasiBeasiswa->thumbnail) }}"
|
||||
style="object-fit:cover;"></a></div>
|
||||
</figure>
|
||||
<aside>
|
||||
<header>
|
||||
<a href="{{ url($informasiBeasiswa->slug) }}">
|
||||
<h3>{{ $informasiBeasiswa->judul }}</h3>
|
||||
</a>
|
||||
</header>
|
||||
<div class="description">
|
||||
<p>
|
||||
@if (strlen(strip_tags($informasiBeasiswa->teks)) > 256)
|
||||
{{ str_replace(' ', '', substr(strip_tags($informasiBeasiswa->teks), 0, 256) . '...') }}
|
||||
@else
|
||||
{{ str_replace(' ', '', substr(strip_tags($informasiBeasiswa->teks), 0, 256)) }}
|
||||
@endif
|
||||
</p>
|
||||
</div>
|
||||
<a href="{{ url($informasiBeasiswa->slug) }}"
|
||||
class="read-more stick-to-bottom">Selengkapnya</a>
|
||||
</aside>
|
||||
</article><!-- /article -->
|
||||
</div><!-- /.col-md-6 -->
|
||||
@if ($loop->iteration % 2 == 0)
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
</section><!-- /.blog-listing -->
|
||||
<div class="center">
|
||||
<ul class="pagination">
|
||||
{{ $informasiBeasiswas->links('pagination::default') }}
|
||||
</ul>
|
||||
</div>
|
||||
</div><!-- /#page-main -->
|
||||
</div><!-- /.col-md-8 -->
|
||||
|
||||
<!--SIDEBAR Content-->
|
||||
<div class="col-md-4">
|
||||
<div id="page-sidebar" class="sidebar">
|
||||
<aside class="news-small" id="news-small">
|
||||
<header>
|
||||
<h2>Informasi Terbaru</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
@foreach ($informasiTerbarus as $informasiTerbaru)
|
||||
<article>
|
||||
<figure class="date"><i
|
||||
class="fa fa-file-o"></i>{{ $informasiTerbaru->release_date }}
|
||||
</figure>
|
||||
<header><a
|
||||
href="{{ url($informasiTerbaru->slug) }}">{{ $informasiTerbaru->judul }}</a>
|
||||
</header>
|
||||
</article><!-- /article -->
|
||||
@endforeach
|
||||
</div><!-- /.section-content -->
|
||||
<a href="{{ url('/informasi_terbaru') }}" class="read-more">Semua Informasi</a>
|
||||
</aside><!-- /.news-small -->
|
||||
|
||||
<aside id="our-professors">
|
||||
<header>
|
||||
<h2>Aplikasi Integrasi</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
<div class="professors">
|
||||
@foreach ($aplikasiIntegrasis as $aplikasiIntegrasi)
|
||||
<article class="professor-thumbnail">
|
||||
<figure class="professor-image"><a href="{{ $aplikasiIntegrasi->url }}"><img
|
||||
src="{{ url($aplikasiIntegrasi->thumbnail) }}"
|
||||
style="width:80px;height:80px;object-fit:contain" alt=""></a>
|
||||
</figure>
|
||||
<aside>
|
||||
<header>
|
||||
<a
|
||||
href="{{ url($aplikasiIntegrasi->url) }}">{{ $aplikasiIntegrasi->nama }}</a>
|
||||
<div class="divider"></div>
|
||||
<figure class="professor-description">{{ $aplikasiIntegrasi->teks }}
|
||||
</figure>
|
||||
</header>
|
||||
</aside>
|
||||
</article><!-- /.professor-thumbnail -->
|
||||
@endforeach
|
||||
<a href="{{ url('aplikasi_integrasi') }}" class="read-more">Semua Aplikasi</a>
|
||||
</div><!-- /.professors -->
|
||||
</div><!-- /.section-content -->
|
||||
</aside><!-- /.our-professors -->
|
||||
|
||||
</div><!-- /#sidebar -->
|
||||
</div><!-- /.col-md-4 -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container -->
|
||||
</div>
|
||||
<!-- end Page Content -->
|
||||
@endsection
|
||||
@@ -0,0 +1,126 @@
|
||||
@extends('portal/layout/main')
|
||||
|
||||
@section('title', 'Informasi Terbaru - Fakultas Teknik UNTAN')
|
||||
|
||||
@section('container')
|
||||
<!-- Breadcrumb -->
|
||||
<div class="container">
|
||||
<ol class="breadcrumb">
|
||||
<li class="nav-link"><a href="{{ url('/') }}">Beranda</a></li>
|
||||
<li><a class="nav-link active">Semua Informasi Terbaru</a></li>
|
||||
</ol>
|
||||
</div>
|
||||
<!-- end Breadcrumb -->
|
||||
|
||||
<!-- Page Content -->
|
||||
<div id="page-content">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<!--MAIN Content-->
|
||||
<div class="col-md-8">
|
||||
<div id="page-main">
|
||||
<section class="blog-listing" id="blog-listing">
|
||||
<header>
|
||||
<h1>Informasi Terbaru</h1>
|
||||
</header>
|
||||
@foreach ($informasiTerbaruPaginates as $latestNew)
|
||||
@if ($loop->iteration % 2 == 1)
|
||||
<div class="row">
|
||||
@endif
|
||||
|
||||
<div class="col-md-6 col-sm-6">
|
||||
<article class="blog-listing-post">
|
||||
<figure class="blog-thumbnail">
|
||||
<figure class="blog-meta"><span
|
||||
class="fa fa-file-text-o"></span>{{ $latestNew->release_date }}
|
||||
</figure>
|
||||
<div class="image-wrapper"><a href="{{ url($latestNew->slug) }}"><img
|
||||
src="{{ asset($latestNew->thumbnail) }}"></a>
|
||||
</div>
|
||||
</figure>
|
||||
<aside>
|
||||
<header>
|
||||
<a href="{{ url($latestNew->slug) }}">
|
||||
<h3>{{ $latestNew->judul }}</h3>
|
||||
</a>
|
||||
</header>
|
||||
<div class="description">
|
||||
<p>
|
||||
@if (strlen(strip_tags($latestNew->teks)) > 256)
|
||||
{{ str_replace(' ', '', substr(strip_tags($latestNew->teks), 0, 256) . '...') }}
|
||||
@else
|
||||
{{ str_replace(' ', '', substr(strip_tags($latestNew->teks), 0, 256)) }}
|
||||
@endif
|
||||
</p>
|
||||
</div>
|
||||
<a href="{{ url($latestNew->slug) }}"
|
||||
class="read-more stick-to-bottom">Selengkapnya</a>
|
||||
</aside>
|
||||
</article><!-- /article -->
|
||||
</div><!-- /.col-md-6 -->
|
||||
@if ($loop->iteration % 2 == 0)
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
</section><!-- /.blog-listing -->
|
||||
<div class="center">
|
||||
<ul class="pagination">
|
||||
{{ $informasiTerbaruPaginates->links('pagination::default') }}
|
||||
</ul>
|
||||
</div>
|
||||
</div><!-- /#page-main -->
|
||||
</div><!-- /.col-md-8 -->
|
||||
|
||||
<!--SIDEBAR Content-->
|
||||
<div class="col-md-4">
|
||||
<div id="page-sidebar" class="sidebar">
|
||||
<aside class="news-small" id="news-small">
|
||||
<header>
|
||||
<h2>Informasi Terbaru</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
@foreach ($informasiTerbarus as $informasiTerbaru)
|
||||
<article>
|
||||
<figure class="date"><i
|
||||
class="fa fa-file-o"></i>{{ $informasiTerbaru->release_date }}</figure>
|
||||
<header><a
|
||||
href="{{ url($informasiTerbaru->slug) }}">{{ $informasiTerbaru->judul }}</a>
|
||||
</header>
|
||||
</article><!-- /article -->
|
||||
@endforeach
|
||||
</div><!-- /.section-content -->
|
||||
<a href="{{ url('/informasi_terbaru') }}" class="read-more">Semua Informasi Terbaru</a>
|
||||
</aside><!-- /.news-small -->
|
||||
<aside id="our-professors">
|
||||
<header>
|
||||
<h2>Aplikasi Integrasi</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
<div class="professors">
|
||||
@foreach ($aplikasiIntegrasis as $aplikasiIntegrasi)
|
||||
<article class="professor-thumbnail">
|
||||
<figure class="professor-image"><a href="{{ $aplikasiIntegrasi->url }}"><img
|
||||
src="{{ url($aplikasiIntegrasi->thumbnail) }}"
|
||||
style="width:80px;height:80px;object-fit:contain" alt=""></a></figure>
|
||||
<aside>
|
||||
<header>
|
||||
<a
|
||||
href="{{ url($aplikasiIntegrasi->url) }}">{{ $aplikasiIntegrasi->nama }}</a>
|
||||
<div class="divider"></div>
|
||||
<figure class="professor-description">{{ $aplikasiIntegrasi->teks }}
|
||||
</figure>
|
||||
</header>
|
||||
</aside>
|
||||
</article><!-- /.professor-thumbnail -->
|
||||
@endforeach
|
||||
<a href="{{ url('aplikasi_integrasi') }}" class="read-more">Semua Aplikasi</a>
|
||||
</div><!-- /.professors -->
|
||||
</div><!-- /.section-content -->
|
||||
</aside><!-- /.our-professors -->
|
||||
</div><!-- /#sidebar -->
|
||||
</div><!-- /.col-md-4 -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container -->
|
||||
</div>
|
||||
<!-- end Page Content -->
|
||||
@endsection
|
||||
@@ -0,0 +1,118 @@
|
||||
@extends('portal/layout/main')
|
||||
|
||||
@section('title', 'Jurnal - Fakultas Teknik UNTAN')
|
||||
|
||||
@section('container')
|
||||
<!-- Breadcrumb -->
|
||||
<div class="container">
|
||||
<ol class="breadcrumb">
|
||||
<li class="nav-link"><a href="{{ url('/') }}">Beranda</a></li>
|
||||
<li><a class="nav-link active">Jurnal</a></li>
|
||||
</ol>
|
||||
</div>
|
||||
<!-- end Breadcrumb -->
|
||||
|
||||
<!-- Page Content -->
|
||||
<div id="page-content">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<!--MAIN Content-->
|
||||
<div class="col-md-8">
|
||||
<div id="page-main">
|
||||
|
||||
|
||||
<section id="course-list">
|
||||
<header>
|
||||
<h1>Jurnal</h1>
|
||||
</header>
|
||||
<div class="table-responsive">
|
||||
<table id="tabel_jurnal" class="table table-hover course-list-table tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nama Jurnal</th>
|
||||
<th>Link Jurnal</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($jurnals as $jurnal)
|
||||
<tr>
|
||||
<th>{{ $jurnal->nama }}</th>
|
||||
<th><a href="{{ $jurnal->url }}" target="_blank">{{ $jurnal->url }}</a>
|
||||
</th>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</section><!-- /.course-listing -->
|
||||
<div class="center">
|
||||
<ul class="pagination">
|
||||
{{ $jurnals->links('pagination::default') }}
|
||||
</ul>
|
||||
</div>
|
||||
</div><!-- /#page-main -->
|
||||
</div><!-- /.col-md-8 -->
|
||||
|
||||
<!--SIDEBAR Content-->
|
||||
<div class="col-md-4">
|
||||
<div id="page-sidebar" class="sidebar">
|
||||
<aside class="news-small" id="news-small">
|
||||
<header>
|
||||
<h2>Informasi Terbaru</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
@foreach ($informasiTerbarus as $informasiTerbaru)
|
||||
<article>
|
||||
<figure class="date"><i
|
||||
class="fa fa-file-o"></i>{{ $informasiTerbaru->release_date }}
|
||||
</figure>
|
||||
<header><a
|
||||
href="{{ url($informasiTerbaru->slug) }}">{{ $informasiTerbaru->judul }}</a>
|
||||
</header>
|
||||
</article><!-- /article -->
|
||||
@endforeach
|
||||
</div><!-- /.section-content -->
|
||||
<a href="{{ url('/informasi_terbaru') }}" class="read-more">Semua Informasi</a>
|
||||
</aside><!-- /.news-small -->
|
||||
<aside id="our-professors">
|
||||
<header>
|
||||
<h2>Aplikasi Integrasi</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
<div class="professors">
|
||||
@foreach ($aplikasiIntegrasis as $aplikasiIntegrasi)
|
||||
<article class="professor-thumbnail">
|
||||
<figure class="professor-image"><a href="{{ $aplikasiIntegrasi->url }}"><img
|
||||
src="{{ url($aplikasiIntegrasi->thumbnail) }}"
|
||||
style="width:80px;height:80px;object-fit:contain" alt=""></a></figure>
|
||||
<aside>
|
||||
<header>
|
||||
<a
|
||||
href="{{ url($aplikasiIntegrasi->url) }}">{{ $aplikasiIntegrasi->nama }}</a>
|
||||
<div class="divider"></div>
|
||||
<figure class="professor-description">{{ $aplikasiIntegrasi->teks }}
|
||||
</figure>
|
||||
</header>
|
||||
</aside>
|
||||
</article><!-- /.professor-thumbnail -->
|
||||
@endforeach
|
||||
<a href="{{ url('aplikasi_integrasi') }}" class="read-more">Semua Aplikasi</a>
|
||||
</div><!-- /.professors -->
|
||||
</div><!-- /.section-content -->
|
||||
</aside><!-- /.our-professors -->
|
||||
</div><!-- /#sidebar -->
|
||||
</div><!-- /.col-md-4 -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container -->
|
||||
</div>
|
||||
<!-- end Page Content -->
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#tabel_jurnal').DataTable();
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,123 @@
|
||||
@extends('portal/layout/main')
|
||||
|
||||
@section('title', 'K3L - Fakultas Teknik UNTAN')
|
||||
|
||||
@section('container')
|
||||
<!-- Breadcrumb -->
|
||||
<div class="container">
|
||||
<ol class="breadcrumb">
|
||||
<li class="nav-link"><a href="{{ url('/') }}">Beranda</a></li>
|
||||
<li><a class="nav-link active">K3L</a></li>
|
||||
</ol>
|
||||
</div>
|
||||
<!-- end Breadcrumb -->
|
||||
|
||||
<!-- Page Content -->
|
||||
<div id="page-content">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<!--MAIN Content-->
|
||||
<div class="col-md-8">
|
||||
<div id="page-main">
|
||||
|
||||
|
||||
<section id="course-list">
|
||||
<header>
|
||||
<h1>K3L</h1>
|
||||
</header>
|
||||
|
||||
<h3>Dokumen K3L</h3>
|
||||
|
||||
<div class="table-responsive" style="margin-bottom:5rem">
|
||||
<table id="tabel_k3l" class="table table-hover course-list-table tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No.</th>
|
||||
<th>Nama Dokumen</th>
|
||||
<th>Jenis</th>
|
||||
<th>File</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $no = 1;
|
||||
foreach($dokumenK3L as $keyDokumen => $valDokumen){
|
||||
echo "<tr>
|
||||
<td>".$no."</td>
|
||||
<td>".$valDokumen->namaDokumen."</td>
|
||||
<td>".$valDokumen->kategoriDokumen."</td>
|
||||
<td><a href='".url('storage/'.$valDokumen->namaFileDokumen)."' target='_blank'>Lihat</a></td>
|
||||
</tr>";
|
||||
$no++;
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</section><!-- /.course-listing -->
|
||||
</div><!-- /#page-main -->
|
||||
</div><!-- /.col-md-8 -->
|
||||
|
||||
<!--SIDEBAR Content-->
|
||||
<div class="col-md-4">
|
||||
<div id="page-sidebar" class="sidebar">
|
||||
<aside class="news-small" id="news-small">
|
||||
<header>
|
||||
<h2>Informasi Terbaru</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
@foreach ($informasiTerbarus as $informasiTerbaru)
|
||||
<article>
|
||||
<figure class="date"><i
|
||||
class="fa fa-file-o"></i>{{ $informasiTerbaru->release_date }}
|
||||
</figure>
|
||||
<header><a
|
||||
href="{{ url($informasiTerbaru->slug) }}">{{ $informasiTerbaru->judul }}</a>
|
||||
</header>
|
||||
</article><!-- /article -->
|
||||
@endforeach
|
||||
</div><!-- /.section-content -->
|
||||
<a href="{{ url('/informasi_terbaru') }}" class="read-more">Semua Informasi</a>
|
||||
</aside><!-- /.news-small -->
|
||||
<aside id="our-professors">
|
||||
<header>
|
||||
<h2>Aplikasi Integrasi</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
<div class="professors">
|
||||
@foreach ($aplikasiIntegrasis as $aplikasiIntegrasi)
|
||||
<article class="professor-thumbnail">
|
||||
<figure class="professor-image"><a href="{{ $aplikasiIntegrasi->url }}"><img
|
||||
src="{{ url($aplikasiIntegrasi->thumbnail) }}"
|
||||
style="width:80px;height:80px;object-fit:contain" alt=""></a></figure>
|
||||
<aside>
|
||||
<header>
|
||||
<a
|
||||
href="{{ url($aplikasiIntegrasi->url) }}">{{ $aplikasiIntegrasi->nama }}</a>
|
||||
<div class="divider"></div>
|
||||
<figure class="professor-description">{{ $aplikasiIntegrasi->teks }}
|
||||
</figure>
|
||||
</header>
|
||||
</aside>
|
||||
</article><!-- /.professor-thumbnail -->
|
||||
@endforeach
|
||||
<a href="{{ url('aplikasi_integrasi') }}" class="read-more">Semua Aplikasi</a>
|
||||
</div><!-- /.professors -->
|
||||
</div><!-- /.section-content -->
|
||||
</aside><!-- /.our-professors -->
|
||||
</div><!-- /#sidebar -->
|
||||
</div><!-- /.col-md-4 -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container -->
|
||||
</div>
|
||||
<!-- end Page Content -->
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#tabel_k3l').DataTable();
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,111 @@
|
||||
@extends('portal/layout/main')
|
||||
|
||||
@section('title', 'Kalender Akademik - Fakultas Teknik UNTAN')
|
||||
|
||||
@section('container')
|
||||
<!-- Breadcrumb -->
|
||||
<div class="container">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ url('/') }}">Beranda</a></li>
|
||||
<li><a class="nav-link active">Kalender Akademik</a></li>
|
||||
</ol>
|
||||
</div>
|
||||
<!-- end Breadcrumb -->
|
||||
|
||||
<!-- Page Content -->
|
||||
<div id="page-content">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<!--MAIN Content-->
|
||||
<div class="col-md-8">
|
||||
<div id="page-main">
|
||||
<section class="events" id="events">
|
||||
<header>
|
||||
<h1>Kalender Akademik</h1>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
@foreach ($kalenderAkademiks as $kalenderAkademik)
|
||||
<article class="event">
|
||||
<figure class="date">
|
||||
<div class="month">
|
||||
{{ substr(date('F', strtotime($kalenderAkademik->release_date)), 0, 3) }}
|
||||
</div>
|
||||
<div class="day">
|
||||
{{ date('d', strtotime($kalenderAkademik->release_date)) }}</div>
|
||||
</figure>
|
||||
<aside>
|
||||
<header>
|
||||
<a
|
||||
href="{{ url($kalenderAkademik->slug) }}">{{ $kalenderAkademik->judul }}</a>
|
||||
</header>
|
||||
<div class="additional-info"> {{ $kalenderAkademik->release_date }}</div>
|
||||
<a href="{{ url($kalenderAkademik->slug) }}"
|
||||
class="btn btn-framed btn-color-grey btn-small">Lihat</a>
|
||||
<a target="_blank" href="{{ url($kalenderAkademik->nama_file) }}"
|
||||
class="btn btn-framed btn-color-grey btn-small">Download</a>
|
||||
</aside>
|
||||
</article><!-- /article -->
|
||||
@endforeach
|
||||
</div><!-- /.section-content -->
|
||||
</section><!-- /.events -->
|
||||
<div class="center">
|
||||
<ul class="pagination">
|
||||
{{ $kalenderAkademiks->links('pagination::default') }}
|
||||
</ul>
|
||||
</div>
|
||||
</div><!-- /#page-main -->
|
||||
</div><!-- /.col-md-8 -->
|
||||
|
||||
<!--SIDEBAR Content-->
|
||||
<div class="col-md-4">
|
||||
<div id="page-sidebar" class="sidebar">
|
||||
<aside class="news-small" id="news-small">
|
||||
<header>
|
||||
<h2>Informasi Terbaru</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
@foreach ($informasiTerbarus as $informasiTerbaru)
|
||||
<article>
|
||||
<figure class="date"><i
|
||||
class="fa fa-file-o"></i>{{ $informasiTerbaru->release_date }}</figure>
|
||||
<header><a
|
||||
href="{{ url($informasiTerbaru->slug) }}">{{ $informasiTerbaru->judul }}</a>
|
||||
</header>
|
||||
</article><!-- /article -->
|
||||
@endforeach
|
||||
</div><!-- /.section-content -->
|
||||
<a href="{{ url('/informasi_terbaru') }}" class="read-more">Semua Informasi</a>
|
||||
</aside><!-- /.news-small -->
|
||||
<aside id="our-professors">
|
||||
<header>
|
||||
<h2>Aplikasi Integrasi</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
<div class="professors">
|
||||
@foreach ($aplikasiIntegrasis as $aplikasiIntegrasi)
|
||||
<article class="professor-thumbnail">
|
||||
<figure class="professor-image"><a href="{{ $aplikasiIntegrasi->url }}"><img
|
||||
src="{{ url($aplikasiIntegrasi->thumbnail) }}"
|
||||
style="width:80px;height:80px;object-fit:contain" alt=""></a></figure>
|
||||
<aside>
|
||||
<header>
|
||||
<a
|
||||
href="{{ url($aplikasiIntegrasi->url) }}">{{ $aplikasiIntegrasi->nama }}</a>
|
||||
<div class="divider"></div>
|
||||
<figure class="professor-description">{{ $aplikasiIntegrasi->teks }}
|
||||
</figure>
|
||||
</header>
|
||||
</aside>
|
||||
</article><!-- /.professor-thumbnail -->
|
||||
@endforeach
|
||||
<a href="{{ url('aplikasi_integrasi') }}" class="read-more">Semua Aplikasi</a>
|
||||
</div><!-- /.professors -->
|
||||
</div><!-- /.section-content -->
|
||||
</aside><!-- /.our-professors -->
|
||||
</div><!-- /#sidebar -->
|
||||
</div><!-- /.col-md-4 -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container -->
|
||||
</div>
|
||||
<!-- end Page Content -->
|
||||
@endsection
|
||||
@@ -0,0 +1,121 @@
|
||||
@extends('portal/layout/main')
|
||||
|
||||
@section('title', 'Kalender Akademik - Fakultas Teknik UNTAN')
|
||||
|
||||
@section('container')
|
||||
<!-- Breadcrumb -->
|
||||
<div class="container">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ url('/') }}">Beranda</a></li>
|
||||
<li><a href="{{ url('/kalender_akademik') }}">Kalender Akademik</a></li>
|
||||
<li><a class="nav-link active">{{ $kalenderAkademik->judul }}</a></li>
|
||||
</ol>
|
||||
</div>
|
||||
<!-- end Breadcrumb -->
|
||||
|
||||
<!-- Page Content -->
|
||||
<div id="page-content">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<!--MAIN Content-->
|
||||
<div class="col-md-8">
|
||||
<div id="page-main">
|
||||
<section id="blog-detail">
|
||||
<header>
|
||||
<h1>Kalender Akademik</h1>
|
||||
</header>
|
||||
<article class="blog-detail">
|
||||
<header class="blog-detail-header">
|
||||
<h2>{{ $kalenderAkademik->judul }}</h2>
|
||||
<div class="blog-detail-meta">
|
||||
<span class="date"><span
|
||||
class="fa fa-file-o"></span>{{ $kalenderAkademik->release_date }}</span>
|
||||
</div>
|
||||
</header>
|
||||
<hr>
|
||||
<div class="embed-responsive embed-responsive-4by3">
|
||||
<object data="{{ url($kalenderAkademik->nama_file) }}" type="application/pdf">
|
||||
<iframe
|
||||
src="https://docs.google.com/viewer?url=your_url_to_pdf&embedded=true"></iframe>
|
||||
</object>
|
||||
</div>
|
||||
<br>
|
||||
<footer>
|
||||
<section id="share-post">
|
||||
<div class="icons">
|
||||
<span>Bagikan ke :</span>
|
||||
<a href="{{ 'https://www.facebook.com/sharer/sharer.php?u=' . url()->current() }}"
|
||||
class="social-button" target="_blank" id="">
|
||||
<span class="fa fa-facebook-square"></span>
|
||||
</a>
|
||||
<a href="{{ 'https://twitter.com/intent/tweet?text=Fakultas Teknik Universitas Tanjungpura&url=' . url()->current() }}"
|
||||
class="social-button " target="_blank" id="">
|
||||
<span class="fa fa-twitter-square"></span>
|
||||
</a>
|
||||
<a href="{{ 'https://wa.me/?text=' . url()->current() }}"
|
||||
class="social-button " target="_blank" id="">
|
||||
<span class="fa fa-phone-square"></span>
|
||||
</a>
|
||||
</div><!-- /.icons -->
|
||||
</section><!-- /share -->
|
||||
<hr>
|
||||
</footer>
|
||||
</article>
|
||||
</section><!-- /.blog-detail -->
|
||||
</div><!-- /#page-main -->
|
||||
</div><!-- /.col-md-8 -->
|
||||
|
||||
<!--SIDEBAR Content-->
|
||||
<div class="col-md-4">
|
||||
<div id="page-sidebar" class="sidebar">
|
||||
<aside class="news-small" id="news-small">
|
||||
<header>
|
||||
<h2>Informasi Terbaru</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
@foreach ($informasiTerbarus as $informasiTerbaru)
|
||||
<article>
|
||||
<figure class="date"><i
|
||||
class="fa fa-file-o"></i>{{ $informasiTerbaru->release_date }}</figure>
|
||||
<header><a
|
||||
href="{{ url($informasiTerbaru->slug) }}">{{ $informasiTerbaru->judul }}</a>
|
||||
</header>
|
||||
</article><!-- /article -->
|
||||
@endforeach
|
||||
</div><!-- /.section-content -->
|
||||
<a href="{{ url('/informasi_terbaru') }}" class="read-more">Semua Informasi</a>
|
||||
</aside><!-- /.news-small -->
|
||||
<aside id="our-professors">
|
||||
<header>
|
||||
<h2>Aplikasi Integrasi</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
<div class="professors">
|
||||
@foreach ($aplikasiIntegrasis as $aplikasiIntegrasi)
|
||||
<article class="professor-thumbnail">
|
||||
<figure class="professor-image"><a href="{{ $aplikasiIntegrasi->url }}"><img
|
||||
src="{{ url($aplikasiIntegrasi->thumbnail) }}"
|
||||
style="width:80px;height:80px;object-fit:contain" alt=""></a>
|
||||
</figure>
|
||||
<aside>
|
||||
<header>
|
||||
<a
|
||||
href="{{ url($aplikasiIntegrasi->url) }}">{{ $aplikasiIntegrasi->nama }}</a>
|
||||
<div class="divider"></div>
|
||||
<figure class="professor-description">{{ $aplikasiIntegrasi->teks }}
|
||||
</figure>
|
||||
</header>
|
||||
</aside>
|
||||
</article><!-- /.professor-thumbnail -->
|
||||
@endforeach
|
||||
<a href="{{ url('aplikasi_integrasi') }}" class="read-more">Semua Aplikasi</a>
|
||||
</div><!-- /.professors -->
|
||||
</div><!-- /.section-content -->
|
||||
</aside><!-- /.our-professors -->
|
||||
</div><!-- /#sidebar -->
|
||||
</div><!-- /.col-md-4 -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container -->
|
||||
</div>
|
||||
<!-- end Page Content -->
|
||||
@endsection
|
||||
@@ -0,0 +1,127 @@
|
||||
@extends('portal/layout/main')
|
||||
|
||||
@section('title', 'Kegiatan Eksternal Kampus - Fakultas Teknik UNTAN')
|
||||
|
||||
@section('container')
|
||||
<!-- Breadcrumb -->
|
||||
<div class="container">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ url('/') }}">Beranda</a></li>
|
||||
<li><a class="nav-link active">Kegiatan Eksternal Kampus</a></li>
|
||||
</ol>
|
||||
</div>
|
||||
<!-- end Breadcrumb -->
|
||||
|
||||
<!-- Page Content -->
|
||||
<div id="page-content">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<!--MAIN Content-->
|
||||
<div class="col-md-8">
|
||||
<div id="page-main">
|
||||
<section class="blog-listing" id="blog-listing">
|
||||
<header>
|
||||
<h1>Kegiatan Eksternal Kampus</h1>
|
||||
</header>
|
||||
@foreach ($kegiatanEksternalKampus as $kegiatanEksternalKampu)
|
||||
@if ($loop->iteration % 2 == 1)
|
||||
<div class="row">
|
||||
@endif
|
||||
|
||||
<div class="col-md-6 col-sm-6">
|
||||
<article class="blog-listing-post">
|
||||
<figure class="blog-thumbnail">
|
||||
<figure class="blog-meta"><span
|
||||
class="fa fa-file-text-o"></span>{{ $kegiatanEksternalKampu->release_date }}
|
||||
</figure>
|
||||
<div class="image-wrapper"><a
|
||||
href="{{ url($kegiatanEksternalKampu->slug) }}"><img
|
||||
src="{{ asset($kegiatanEksternalKampu->thumbnail) }}"></a>
|
||||
</div>
|
||||
</figure>
|
||||
<aside>
|
||||
<header>
|
||||
<a href="{{ url($kegiatanEksternalKampu->slug) }}">
|
||||
<h3>{{ $kegiatanEksternalKampu->judul }}</h3>
|
||||
</a>
|
||||
</header>
|
||||
<div class="description">
|
||||
<p>
|
||||
@if (strlen(strip_tags($kegiatanEksternalKampu->teks)) > 256)
|
||||
{{ str_replace(' ', '', substr(strip_tags($kegiatanEksternalKampu->teks), 0, 256) . '...') }}
|
||||
@else
|
||||
{{ str_replace(' ', '', substr(strip_tags($kegiatanEksternalKampu->teks), 0, 256)) }}
|
||||
@endif
|
||||
</p>
|
||||
</div>
|
||||
<a href="{{ url($kegiatanEksternalKampu->slug) }}"
|
||||
class="read-more stick-to-bottom">Selengkapnya</a>
|
||||
</aside>
|
||||
</article><!-- /article -->
|
||||
</div><!-- /.col-md-6 -->
|
||||
@if ($loop->iteration % 2 == 0)
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
</section><!-- /.blog-listing -->
|
||||
<div class="center">
|
||||
<ul class="pagination">
|
||||
{{ $kegiatanEksternalKampus->links('pagination::default') }}
|
||||
</ul>
|
||||
</div>
|
||||
</div><!-- /#page-main -->
|
||||
</div><!-- /.col-md-8 -->
|
||||
|
||||
<!--SIDEBAR Content-->
|
||||
<div class="col-md-4">
|
||||
<div id="page-sidebar" class="sidebar">
|
||||
<aside class="news-small" id="news-small">
|
||||
<header>
|
||||
<h2>Informasi Terbaru</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
@foreach ($informasiTerbarus as $informasiTerbaru)
|
||||
<article>
|
||||
<figure class="date"><i
|
||||
class="fa fa-file-o"></i>{{ $informasiTerbaru->release_date }}</figure>
|
||||
<header><a
|
||||
href="{{ url($informasiTerbaru->slug) }}">{{ $informasiTerbaru->judul }}</a>
|
||||
</header>
|
||||
</article><!-- /article -->
|
||||
@endforeach
|
||||
</div><!-- /.section-content -->
|
||||
<a href="{{ url('/informasi_terbaru') }}" class="read-more">Semua Informasi</a>
|
||||
</aside><!-- /.news-small -->
|
||||
<aside id="our-professors">
|
||||
<header>
|
||||
<h2>Aplikasi Integrasi</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
<div class="professors">
|
||||
@foreach ($aplikasiIntegrasis as $aplikasiIntegrasi)
|
||||
<article class="professor-thumbnail">
|
||||
<figure class="professor-image"><a href="{{ $aplikasiIntegrasi->url }}"><img
|
||||
src="{{ url($aplikasiIntegrasi->thumbnail) }}"
|
||||
style="width:80px;height:80px;object-fit:contain" alt=""></a></figure>
|
||||
<aside>
|
||||
<header>
|
||||
<a
|
||||
href="{{ url($aplikasiIntegrasi->url) }}">{{ $aplikasiIntegrasi->nama }}</a>
|
||||
<div class="divider"></div>
|
||||
<figure class="professor-description">{{ $aplikasiIntegrasi->teks }}
|
||||
</figure>
|
||||
</header>
|
||||
</aside>
|
||||
</article><!-- /.professor-thumbnail -->
|
||||
@endforeach
|
||||
<a href="{{ url('aplikasi_integrasi') }}" class="read-more">Semua Aplikasi</a>
|
||||
</div><!-- /.professors -->
|
||||
</div><!-- /.section-content -->
|
||||
</aside><!-- /.our-professors -->
|
||||
</div><!-- /#sidebar -->
|
||||
</div><!-- /.col-md-4 -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container -->
|
||||
</div>
|
||||
<!-- end Page Content -->
|
||||
@endsection
|
||||
@@ -0,0 +1,153 @@
|
||||
@extends('portal/layout/main')
|
||||
|
||||
@section('title', 'Kegiatan Eksternal Kampus - Fakultas Teknik UNTAN')
|
||||
|
||||
@section('container')
|
||||
<!-- Breadcrumb -->
|
||||
<div class="container">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ url('/') }}">Beranda</a></li>
|
||||
<li><a href="{{ url('/kegiatan_eksternal_kampus') }}">Kegiatan Eksternal Kampus</a>
|
||||
</li>
|
||||
<li><a class="nav-link active">{{ $kegiatanEksternalKampu->judul }}</a>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<!-- end Breadcrumb -->
|
||||
|
||||
<!-- Page Content -->
|
||||
<div id="page-content">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<!--MAIN Content-->
|
||||
<div class="col-md-8">
|
||||
<div id="page-main">
|
||||
<section id="blog-detail">
|
||||
<header>
|
||||
<h1>Kegiatan Eksternal Kampus</h1>
|
||||
</header>
|
||||
<article class="blog-detail">
|
||||
<header class="blog-detail-header">
|
||||
<img src="{{ asset($kegiatanEksternalKampu->thumbnail) }}"
|
||||
style="width:750px;height:350px;object-fit:contain;">
|
||||
<br>
|
||||
<h2>{{ $kegiatanEksternalKampu->judul }}</h2>
|
||||
<div class="blog-detail-meta">
|
||||
<span class="date"><span
|
||||
class="fa fa-file-o"></span>{{ $kegiatanEksternalKampu->release_date }}</span>
|
||||
</div>
|
||||
</header>
|
||||
<hr>
|
||||
<div class="ck-content">
|
||||
{!! $kegiatanEksternalKampu->teks !!}
|
||||
</div>
|
||||
<br>
|
||||
<footer>
|
||||
<section id="share-post">
|
||||
<div class="icons">
|
||||
<span>Bagikan ke :</span>
|
||||
<a href="{{ 'https://www.facebook.com/sharer/sharer.php?u=' . url()->current() }}"
|
||||
class="social-button" target="_blank" id="">
|
||||
<span class="fa fa-facebook-square"></span>
|
||||
</a>
|
||||
<a href="{{ 'https://twitter.com/intent/tweet?text=Fakultas Teknik Universitas Tanjungpura&url=' . url()->current() }}"
|
||||
class="social-button " target="_blank" id="">
|
||||
<span class="fa fa-twitter-square"></span>
|
||||
</a>
|
||||
<a href="{{ 'https://wa.me/?text=' . url()->current() }}"
|
||||
class="social-button " target="_blank" id="">
|
||||
<span class="fa fa-phone-square"></span>
|
||||
</a>
|
||||
</div><!-- /.icons -->
|
||||
</section><!-- /share -->
|
||||
<hr>
|
||||
</footer>
|
||||
</article>
|
||||
</section><!-- /.blog-detail -->
|
||||
<section id="related-articles">
|
||||
<header>
|
||||
<h2>Kerjasama & Mitra Kolaborasi
|
||||
Lainnya</h2>
|
||||
</header>
|
||||
<div class="row">
|
||||
@foreach ($kegiatanEksternalKampus as $kegiatanEksternalKampu)
|
||||
<div class="col-md-6 col-sm-6">
|
||||
<article class="blog-listing-post">
|
||||
<figure class="blog-thumbnail">
|
||||
<figure class="blog-meta"><span
|
||||
class="fa fa-file-text-o"></span>{{ $kegiatanEksternalKampu->release_date }}
|
||||
</figure>
|
||||
<div class="image-wrapper"><a
|
||||
href="{{ url($kegiatanEksternalKampu->slug) }}"><img
|
||||
src="{{ url($kegiatanEksternalKampu->thumbnail) }}"></a>
|
||||
</div>
|
||||
</figure>
|
||||
<aside>
|
||||
<header>
|
||||
<a href="{{ url($kegiatanEksternalKampu->slug) }}">
|
||||
<h3>{{ $kegiatanEksternalKampu->judul }}</h3>
|
||||
</a>
|
||||
</header>
|
||||
</aside>
|
||||
</article><!-- /article -->
|
||||
</div><!-- /.col-md-6 -->
|
||||
@endforeach
|
||||
</div><!-- /.row -->
|
||||
</section><!-- /related articles -->
|
||||
</div><!-- /#page-main -->
|
||||
</div><!-- /.col-md-8 -->
|
||||
|
||||
<!--SIDEBAR Content-->
|
||||
<div class="col-md-4">
|
||||
<div id="page-sidebar" class="sidebar">
|
||||
<aside class="news-small" id="news-small">
|
||||
<header>
|
||||
<h2>Informasi Terbaru</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
@foreach ($informasiTerbarus as $informasiTerbaru)
|
||||
<article>
|
||||
<figure class="date"><i
|
||||
class="fa fa-file-o"></i>{{ $informasiTerbaru->release_date }}</figure>
|
||||
<header><a
|
||||
href="{{ url($informasiTerbaru->slug) }}">{{ $informasiTerbaru->judul }}</a>
|
||||
</header>
|
||||
</article><!-- /article -->
|
||||
@endforeach
|
||||
</div><!-- /.section-content -->
|
||||
<a href="{{ url('/informasi_terbaru') }}" class="read-more">Semua Informasi</a>
|
||||
</aside><!-- /.news-small -->
|
||||
<aside id="our-professors">
|
||||
<header>
|
||||
<h2>Aplikasi Integrasi</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
<div class="professors">
|
||||
@foreach ($aplikasiIntegrasis as $aplikasiIntegrasi)
|
||||
<article class="professor-thumbnail">
|
||||
<figure class="professor-image"><a href="{{ $aplikasiIntegrasi->url }}"><img
|
||||
src="{{ url($aplikasiIntegrasi->thumbnail) }}"
|
||||
style="width:80px;height:80px;object-fit:contain" alt=""></a>
|
||||
</figure>
|
||||
<aside>
|
||||
<header>
|
||||
<a
|
||||
href="{{ url($aplikasiIntegrasi->url) }}">{{ $aplikasiIntegrasi->nama }}</a>
|
||||
<div class="divider"></div>
|
||||
<figure class="professor-description">{{ $aplikasiIntegrasi->teks }}
|
||||
</figure>
|
||||
</header>
|
||||
</aside>
|
||||
</article><!-- /.professor-thumbnail -->
|
||||
@endforeach
|
||||
<a href="{{ url('aplikasi_integrasi') }}" class="read-more">Semua Aplikasi</a>
|
||||
</div><!-- /.professors -->
|
||||
</div><!-- /.section-content -->
|
||||
</aside><!-- /.our-professors -->
|
||||
</div><!-- /#sidebar -->
|
||||
</div><!-- /.col-md-4 -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container -->
|
||||
</div>
|
||||
<!-- end Page Content -->
|
||||
@endsection
|
||||
@@ -0,0 +1,127 @@
|
||||
@extends('portal/layout/main')
|
||||
|
||||
@section('title', 'Kegiatan Internal Kampus - Fakultas Teknik UNTAN')
|
||||
|
||||
@section('container')
|
||||
<!-- Breadcrumb -->
|
||||
<div class="container">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ url('/') }}">Beranda</a></li>
|
||||
<li><a class="nav-link active">Kegiatan Internal Kampus</a></li>
|
||||
</ol>
|
||||
</div>
|
||||
<!-- end Breadcrumb -->
|
||||
|
||||
<!-- Page Content -->
|
||||
<div id="page-content">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<!--MAIN Content-->
|
||||
<div class="col-md-8">
|
||||
<div id="page-main">
|
||||
<section class="blog-listing" id="blog-listing">
|
||||
<header>
|
||||
<h1>Kegiatan Internal Kampus</h1>
|
||||
</header>
|
||||
@foreach ($kegiatanInternalKampus as $kegiatanInternalKampu)
|
||||
@if ($loop->iteration % 2 == 1)
|
||||
<div class="row">
|
||||
@endif
|
||||
|
||||
<div class="col-md-6 col-sm-6">
|
||||
<article class="blog-listing-post">
|
||||
<figure class="blog-thumbnail">
|
||||
<figure class="blog-meta"><span
|
||||
class="fa fa-file-text-o"></span>{{ $kegiatanInternalKampu->release_date }}
|
||||
</figure>
|
||||
<div class="image-wrapper"><a
|
||||
href="{{ url($kegiatanInternalKampu->slug) }}"><img
|
||||
src="{{ asset($kegiatanInternalKampu->thumbnail) }}"></a>
|
||||
</div>
|
||||
</figure>
|
||||
<aside>
|
||||
<header>
|
||||
<a href="{{ url($kegiatanInternalKampu->slug) }}">
|
||||
<h3>{{ $kegiatanInternalKampu->judul }}</h3>
|
||||
</a>
|
||||
</header>
|
||||
<div class="description">
|
||||
<p>
|
||||
@if (strlen(strip_tags($kegiatanInternalKampu->teks)) > 256)
|
||||
{{ str_replace(' ', '', substr(strip_tags($kegiatanInternalKampu->teks), 0, 256) . '...') }}
|
||||
@else
|
||||
{{ str_replace(' ', '', substr(strip_tags($kegiatanInternalKampu->teks), 0, 256)) }}
|
||||
@endif
|
||||
</p>
|
||||
</div>
|
||||
<a href="{{ url($kegiatanInternalKampu->slug) }}"
|
||||
class="read-more stick-to-bottom">Selengkapnya</a>
|
||||
</aside>
|
||||
</article><!-- /article -->
|
||||
</div><!-- /.col-md-6 -->
|
||||
@if ($loop->iteration % 2 == 0)
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
</section><!-- /.blog-listing -->
|
||||
<div class="center">
|
||||
<ul class="pagination">
|
||||
{{ $kegiatanInternalKampus->links('pagination::default') }}
|
||||
</ul>
|
||||
</div>
|
||||
</div><!-- /#page-main -->
|
||||
</div><!-- /.col-md-8 -->
|
||||
|
||||
<!--SIDEBAR Content-->
|
||||
<div class="col-md-4">
|
||||
<div id="page-sidebar" class="sidebar">
|
||||
<aside class="news-small" id="news-small">
|
||||
<header>
|
||||
<h2>Informasi Terbaru</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
@foreach ($informasiTerbarus as $informasiTerbaru)
|
||||
<article>
|
||||
<figure class="date"><i
|
||||
class="fa fa-file-o"></i>{{ $informasiTerbaru->release_date }}</figure>
|
||||
<header><a
|
||||
href="{{ url($informasiTerbaru->slug) }}">{{ $informasiTerbaru->judul }}</a>
|
||||
</header>
|
||||
</article><!-- /article -->
|
||||
@endforeach
|
||||
</div><!-- /.section-content -->
|
||||
<a href="{{ url('/informasi_terbaru') }}" class="read-more">Semua Informasi</a>
|
||||
</aside><!-- /.news-small -->
|
||||
<aside id="our-professors">
|
||||
<header>
|
||||
<h2>Aplikasi Integrasi</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
<div class="professors">
|
||||
@foreach ($aplikasiIntegrasis as $aplikasiIntegrasi)
|
||||
<article class="professor-thumbnail">
|
||||
<figure class="professor-image"><a href="{{ $aplikasiIntegrasi->url }}"><img
|
||||
src="{{ url($aplikasiIntegrasi->thumbnail) }}"
|
||||
style="width:80px;height:80px;object-fit:contain" alt=""></a></figure>
|
||||
<aside>
|
||||
<header>
|
||||
<a
|
||||
href="{{ url($aplikasiIntegrasi->url) }}">{{ $aplikasiIntegrasi->nama }}</a>
|
||||
<div class="divider"></div>
|
||||
<figure class="professor-description">{{ $aplikasiIntegrasi->teks }}
|
||||
</figure>
|
||||
</header>
|
||||
</aside>
|
||||
</article><!-- /.professor-thumbnail -->
|
||||
@endforeach
|
||||
<a href="{{ url('aplikasi_integrasi') }}" class="read-more">Semua Aplikasi</a>
|
||||
</div><!-- /.professors -->
|
||||
</div><!-- /.section-content -->
|
||||
</aside><!-- /.our-professors -->
|
||||
</div><!-- /#sidebar -->
|
||||
</div><!-- /.col-md-4 -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container -->
|
||||
</div>
|
||||
<!-- end Page Content -->
|
||||
@endsection
|
||||
@@ -0,0 +1,151 @@
|
||||
@extends('portal/layout/main')
|
||||
|
||||
@section('title', 'Kegiatan Internal Kampus - Fakultas Teknik UNTAN')
|
||||
|
||||
@section('container')
|
||||
<!-- Breadcrumb -->
|
||||
<div class="container">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ url('/') }}">Beranda</a></li>
|
||||
<li><a href="{{ url('/kegiatan_internal_kampus') }}">Kegiatan Internal Kampus</a></li>
|
||||
<li><a class="nav-link active">{{ $kegiatanInternalKampu->judul }}</a></li>
|
||||
</ol>
|
||||
</div>
|
||||
<!-- end Breadcrumb -->
|
||||
|
||||
<!-- Page Content -->
|
||||
<div id="page-content">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<!--MAIN Content-->
|
||||
<div class="col-md-8">
|
||||
<div id="page-main">
|
||||
<section id="blog-detail">
|
||||
<header>
|
||||
<h1>Kegiatan Internal Kampus</h1>
|
||||
</header>
|
||||
<article class="blog-detail">
|
||||
<header class="blog-detail-header">
|
||||
<img src="{{ asset($kegiatanInternalKampu->thumbnail) }}"
|
||||
style="width:750px;height:350px;object-fit:contain;">
|
||||
<br>
|
||||
<h2>{{ $kegiatanInternalKampu->judul }}</h2>
|
||||
<div class="blog-detail-meta">
|
||||
<span class="date"><span
|
||||
class="fa fa-file-o"></span>{{ $kegiatanInternalKampu->release_date }}</span>
|
||||
</div>
|
||||
</header>
|
||||
<hr>
|
||||
<div class="ck-content">
|
||||
{!! $kegiatanInternalKampu->teks !!}
|
||||
</div>
|
||||
<br>
|
||||
<footer>
|
||||
<section id="share-post">
|
||||
<div class="icons">
|
||||
<span>Bagikan ke :</span>
|
||||
<a href="{{ 'https://www.facebook.com/sharer/sharer.php?u=' . url()->current() }}"
|
||||
class="social-button" target="_blank" id="">
|
||||
<span class="fa fa-facebook-square"></span>
|
||||
</a>
|
||||
<a href="{{ 'https://twitter.com/intent/tweet?text=Fakultas Teknik Universitas Tanjungpura&url=' . url()->current() }}"
|
||||
class="social-button " target="_blank" id="">
|
||||
<span class="fa fa-twitter-square"></span>
|
||||
</a>
|
||||
<a href="{{ 'https://wa.me/?text=' . url()->current() }}"
|
||||
class="social-button " target="_blank" id="">
|
||||
<span class="fa fa-phone-square"></span>
|
||||
</a>
|
||||
</div><!-- /.icons -->
|
||||
</section><!-- /share -->
|
||||
<hr>
|
||||
</footer>
|
||||
</article>
|
||||
</section><!-- /.blog-detail -->
|
||||
<section id="related-articles">
|
||||
<header>
|
||||
<h2>Kerjasama & Mitra Kolaborasi
|
||||
Lainnya</h2>
|
||||
</header>
|
||||
<div class="row">
|
||||
@foreach ($kegiatanInternalKampus as $kegiatanInternalKampu)
|
||||
<div class="col-md-6 col-sm-6">
|
||||
<article class="blog-listing-post">
|
||||
<figure class="blog-thumbnail">
|
||||
<figure class="blog-meta"><span
|
||||
class="fa fa-file-text-o"></span>{{ $kegiatanInternalKampu->release_date }}
|
||||
</figure>
|
||||
<div class="image-wrapper"><a
|
||||
href="{{ url($kegiatanInternalKampu->slug) }}"><img
|
||||
src="{{ url($kegiatanInternalKampu->thumbnail) }}"></a>
|
||||
</div>
|
||||
</figure>
|
||||
<aside>
|
||||
<header>
|
||||
<a href="{{ url($kegiatanInternalKampu->slug) }}">
|
||||
<h3>{{ $kegiatanInternalKampu->judul }}</h3>
|
||||
</a>
|
||||
</header>
|
||||
</aside>
|
||||
</article><!-- /article -->
|
||||
</div><!-- /.col-md-6 -->
|
||||
@endforeach
|
||||
</div><!-- /.row -->
|
||||
</section><!-- /related articles -->
|
||||
</div><!-- /#page-main -->
|
||||
</div><!-- /.col-md-8 -->
|
||||
|
||||
<!--SIDEBAR Content-->
|
||||
<div class="col-md-4">
|
||||
<div id="page-sidebar" class="sidebar">
|
||||
<aside class="news-small" id="news-small">
|
||||
<header>
|
||||
<h2>Informasi Terbaru</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
@foreach ($informasiTerbarus as $informasiTerbaru)
|
||||
<article>
|
||||
<figure class="date"><i
|
||||
class="fa fa-file-o"></i>{{ $informasiTerbaru->release_date }}</figure>
|
||||
<header><a
|
||||
href="{{ url($informasiTerbaru->slug) }}">{{ $informasiTerbaru->judul }}</a>
|
||||
</header>
|
||||
</article><!-- /article -->
|
||||
@endforeach
|
||||
</div><!-- /.section-content -->
|
||||
<a href="{{ url('/informasi_terbaru') }}" class="read-more">Semua Informasi</a>
|
||||
</aside><!-- /.news-small -->
|
||||
<aside id="our-professors">
|
||||
<header>
|
||||
<h2>Aplikasi Integrasi</h2>
|
||||
</header>
|
||||
<div class="section-content">
|
||||
<div class="professors">
|
||||
@foreach ($aplikasiIntegrasis as $aplikasiIntegrasi)
|
||||
<article class="professor-thumbnail">
|
||||
<figure class="professor-image"><a href="{{ $aplikasiIntegrasi->url }}"><img
|
||||
src="{{ url($aplikasiIntegrasi->thumbnail) }}"
|
||||
style="width:80px;height:80px;object-fit:contain" alt=""></a>
|
||||
</figure>
|
||||
<aside>
|
||||
<header>
|
||||
<a
|
||||
href="{{ url($aplikasiIntegrasi->url) }}">{{ $aplikasiIntegrasi->nama }}</a>
|
||||
<div class="divider"></div>
|
||||
<figure class="professor-description">{{ $aplikasiIntegrasi->teks }}
|
||||
</figure>
|
||||
</header>
|
||||
</aside>
|
||||
</article><!-- /.professor-thumbnail -->
|
||||
@endforeach
|
||||
<a href="{{ url('aplikasi_integrasi') }}" class="read-more">Semua Aplikasi</a>
|
||||
</div><!-- /.professors -->
|
||||
</div><!-- /.section-content -->
|
||||
</aside><!-- /.our-professors -->
|
||||
</div><!-- /#sidebar -->
|
||||
</div><!-- /.col-md-4 -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.container -->
|
||||
</div>
|
||||
<!-- end Page Content -->
|
||||
@endsection
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user