Fakultas Ilmu Komputer UI

Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • pmpl/class-project/marjinal-digipus
  • ppl-fasilkom-ui/2020/ppl-c/diskominfo-depok-digipus/marjinal-digipus
2 results
Select Git revision
Show changes
Showing
with 3761 additions and 0 deletions
{% extends 'administration/base_administrasi.html' %}
{% load static %}
{% block content %}
<div class="card shadow mb-4">
<div class="card-header py-3">
<h6 class="m-0 font-weight-bold text-primary">
Edit {{ page_title }}
</h6>
</div>
<div class="card-body">
<form method="POST">
{% csrf_token %}
<div class="judul d-flex align-items-baseline">
{{ form.title }} {{ form.name }}
</div>
<div class="description d-flex align-items-baseline">
{{ form.description }}
</div>
<div class="">
<button class="btn-sm btn-primary rounded p-12" type="submit">
<i class="far fa-save" aria-hidden="true"></i>
Simpan
</button>
</div>
</form>
</div>
</div>
{% endblock %}
\ No newline at end of file
{% extends 'administration/base_administrasi2.html' %}
{% load static %}
{% block title %}
<title>Kelola Admin | Digipus</title>
{% endblock %}
{% block content %}
<!-- Page Heading -->
<h1 class="h3 mb-2 text-gray-800">Kelola Admin</h1>
<p class="mb-4">Tekan tombol detail untuk informasi lebih lanjut tentang admin</ehp>
<!-- DataTales Example -->
<div class="card shadow mb-4">
<div class="card-header py-3">
<div class="d-flex">
<div class="mr-auto p-2">
<h6 id="table-description" class="m-0 font-weight-bold text-primary">Tabel Daftar Admin</h6>
</div>
<div class="p-2">
<a href="/administration/kelola-admin/tambah/" class="accept-button button-decoration button-header">Buat Akun Baru</a>
</div>
</div>
</div>
<div class="card-body">
<div class="table-responsive">
<table aria-describedby="table-description" class="table table-bordered" id="dataTable">
<thead>
<tr>
<th scope="col">Nama</th>
<th scope="col">NIK</th>
<th scope="col">Instansi</th>
<th scope="col">Status</th>
<th scope="col">Pilihan</th>
</tr>
</thead>
<tfoot>
<tr>
<th scope="col">Nama</th>
<th scope="col">NIK</th>
<th scope="col">Instansi</th>
<th scope="col">Status</th>
<th scope="col">Pilihan</th>
</tr>
</tr>
</tfoot>
<tbody>
{% for current in users_list %}
<tr>
<td>{% if current.name %} {{ current.name }} {% else %} Superadmin {% endif %}</td>
<td>{{ current.nik }}</td>
<td>{{ current.instansi }}</td>
<td>{% if current.is_active %} Active {% else %} Inactive {% endif %}</td>
<td class="verif-buttons">
<span>
{% if user.is_superuser %}
{% if not current.is_superuser %}
<a href="/administration/setting/admin/{{ current.id }}/edit" class="accept-button button-decoration" role="button">Edit</a>
{% endif %}
{% endif %}
<a href="/administration/profil-admin/{{ current.id }}/" class="accept-button button-decoration">Detail</a>
{% if not current.is_superuser %}
<button type="button" class="reject-button button-decoration" data-toggle="modal" data-target="#confirmModal{{ current.id }}">Hapus</button>
<div class="modal fade" id="confirmModal{{ current.id }}" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Konfirmasi Penghapusan Akun</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Anda akan menghapus akun admin dengan email
<span class="bg-danger pr-1 pl-1 text-white" style="text-transform: lowercase">{{current.email}}</span>
. Lakukan konfirmasi penghapusan dengan mengetik: </p>
<p class="bg-danger text-white p-1"> {{current.email}} </p>
</div>
<form/>
{% csrf_token %}
<div class="form-group pl-3 pr-3">
<input name="{{ current.email }}" class="form-control" id="{{ current.id }}"required pattern="{{current.email}}" oninput="checkValue(this)">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Batal</button>
<a href="/administration/hapus-admin/{{current.id}}/" id="btn-hapus-{{current.id}}" type="button" class="btn btn-danger disabled">Hapus</a>
</div>
</form>
</div>
</div>
</div>
{% endif %}
</span>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
<div class="card shadow mb-4">
<div class="card-header py-3">
<h6 class="m-0 font-weight-bold text-primary" id="titleTabelPending">Aktivitas Penghapusan Akun Admin</h6>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="dataTablePending" aria-describedby="titleTabelPending">
{% if not deletion_history %}
Tidak ada aktivitas penghapusan akun admin
{% else %}
<thead>
<tr>
<th scope="col">Admin yang Dihapus</th>
<th scope="col">Waktu Penghapusan</th>
<th scope="col">Admin Penghapus</th>
</tr>
</thead>
<tfoot>
<tr>
<th scope="col">Admin yang Dihapus</th>
<th scope="col">Waktu Penghapusan</th>
<th scope="col">Admin Penghapus</th>
</tr>
</tfoot>
<tbody>
{% for history in deletion_history %}
<tr>
<td>{{ history.deleted_user_name }}</td>
<td>{{ history.timestamp }}</td>
<td>{{ history.deletor_admin.name }}</td>
</tr>
{% endfor %}
</tbody>
{% endif %}
</table>
</div>
</div>
</div>
<script type="text/javascript">
function checkValue(element){
buttonElement = document.getElementById("btn-hapus-" + element.id)
if(element.value != element.name) {
buttonElement.classList.add("disabled");
} else {
buttonElement.classList.remove("disabled");
}
}
</script>
{% endblock %}
\ No newline at end of file
{% extends 'administration/base_administrasi2.html' %}
{% load static %}
{% block title %}
<title>Kelola Kontributor | Digipus</title>
{% endblock %}
{% block content %}
<!-- Page Heading -->
<h1 class="h3 mb-2 text-gray-800">Kelola Kontributor</h1>
<p class="mb-4">Tekan tombol detail untuk informasi lebih lanjut tentang kontributor</p>
<!-- DataTales Example -->
<div class="card shadow mb-4">
<div class="card-header py-3">
<h6 id="table-description" class="m-0 font-weight-bold text-primary">Tabel Daftar Kontributor</h6>
</div>
<div class="card-body">
<div class="table-responsive">
<table aria-describedby="table-description" class="table table-bordered" id="dataTable">
<thead>
<tr>
<th scope="col">Nama</th>
<th scope="col">NIK</th>
<th scope="col">Instansi</th>
<th scope="col">Status</th>
<th scope="col">Detail</th>
</tr>
</thead>
<tfoot>
<tr>
<th scope="col">Nama</th>
<th scope="col">NIK</th>
<th scope="col">Instansi</th>
<th scope="col">Status</th>
<th scope="col">Detail</th>
</tr>
</tr>
</tfoot>
<tbody>
{% for user in users %}
<tr>
<td>{{ user.name }}</td>
<td>{{ user.nik }}</td>
<td>{{ user.instansi }}</td>
<td>{% if user.is_active %} Active {% else %} Inactive {% endif %}</td>
<td class="verif-buttons">
<span>
<a href="/administration/setting/kontributor/{{ user.id }}/edit" class="accept-button button-decoration" role="button">Edit</a>
<a href="/administration/profil/{{ user.id }}/" class="accept-button button-decoration">Detail</a>
<button type="button" class="reject-button button-decoration" data-toggle="modal" data-target="#confirmModal{{ user.id }}">Hapus</button>
<div class="modal fade" id="confirmModal{{ user.id }}" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Konfirmasi Penghapusan Akun</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Sila konfirmasi penghapusan akun dengan tekan tombol hapus di bawah</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Batal</button>
<a href="/administration/hapus-kontributor/{{user.id}}/" type="button" class="btn btn-danger">Hapus</a>
</div>
</div>
</div>
</div>
</span>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
<div class="card shadow mb-4">
<div class="card-header py-3">
<h6 class="m-0 font-weight-bold text-primary" id="titleTabelPending">Aktivitas Penghapusan Akun Kontributor</h6>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="dataTablePending" aria-describedby="titleTabelPending">
{% if not deletion_history %}
Tidak ada aktivitas penghapusan akun admin
{% else %}
<thead>
<tr>
<th scope="col">Kontributor yang Dihapus</th>
<th scope="col">Waktu Penghapusan</th>
<th scope="col">Admin Penghapus</th>
</tr>
</thead>
<tfoot>
<tr>
<th scope="col">Kontributor yang Dihapus</th>
<th scope="col">Waktu Penghapusan</th>
<th scope="col">Admin Penghapus</th>
</tr>
</tfoot>
<tbody>
{% for history in deletion_history %}
<tr>
<td>{{ history.deleted_user_name }}</td>
<td>{{ history.timestamp }}</td>
<td>{{ history.deletor_admin.name }}</td>
</tr>
{% endfor %}
</tbody>
{% endif %}
</table>
</div>
</div>
</div>
{% endblock %}
\ No newline at end of file
{% extends 'administration/base_administrasi2.html' %}
{% load static %}
{% block title %}
<title>Kelola Admin | Digipus</title>
{% endblock %}
{% block content %}
<!-- Page Heading -->
<h1 class="h3 mb-2 text-gray-800">Kelola Admin</h1>
<p class="mb-4">Tekan tombol detail untuk informasi lebih lanjut tentang admin</ehp>
<!-- DataTales Example -->
<div class="card shadow mb-4">
<div class="card-header py-3">
<div class="d-flex">
<div class="mr-auto p-2">
<h6 id="table-description" class="m-0 font-weight-bold text-primary">Tabel Daftar Approved Material</h6>
</div>
</div>
</div>
<div class="card-body">
<div class="table-responsive">
<table aria-describedby="table-description" class="table table-bordered" id="dataTable">
<thead>
<tr>
<th scope="col">Title</th>
<th scope="col">Cover</th>
<th scope="col">Content</th>
<th scope="col">Kontributor</th>
<th scope="col">Status</th>
<th scope="col">Jumlah Like</th>
<th scope="col">Pilihan</th>
</tr>
</thead>
<tfoot>
<tr>
<th scope="col">Title</th>
<th scope="col">Cover</th>
<th scope="col">Content</th>
<th scope="col">Kontributor</th>
<th scope="col">Status</th>
<th scope="col">Jumlah Like</th>
<th scope="col">Pilihan</th>
</tr>
</tr>
</tfoot>
<tbody>
{% for materi in materi_list %}
<tr>
<td>{{ materi.title }}</td>
<td>
{% if materi.cover %}
<img id="posts-img" src="{{ materi.cover.url }}" alt="cover-picture" style="max-width: 400px;"/>
{% endif %}
</td>
<td>
<a href="/materi/{{materi.id}}/view">Lihat konten</a></td>
<td>{{ materi.uploader }}</td>
<td>{{ materi.status }}</td>
<td>{{ materi.like_count }}</td>
<td>
{% if not materi.deleted_at %}<a type="button" href="/materi/{{materi.id}}/delete" class="reject-button button-decoration"
style="background-color:red">Hapus</a>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
{% endblock %}
{% extends 'administration/base_administrasi2.html' %}
{% load static %}
{% block title %}
<title>Laporan Materi | Digipus</title>
{% endblock %}
{% block content %}
<!-- Page Heading -->
<h1 class="h3 mb-2 text-gray-800">Laporan Materi</h1>
<p class="mb-4">Tekan blokir materi untuk memblokir materi.<br>Klik lihat laporan untuk melihat laporan dari pelapor.</ehp>
<!-- DataTales Example -->
<div class="card shadow mb-4">
<div class="card-header py-3">
<div class="d-flex">
<div class="mr-auto p-2">
<h6 class="m-0 font-weight-bold text-primary">Materi yang Dilaporkan</h6>
</div>
</div>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="dataTable">
<caption>Materi yang Dilaporkan</caption>
<thead>
<tr>
<th scope="col">Judul</th>
<th scope="col">Jumlah Laporan</th>
<th scope="col">Pilihan</th>
</tr>
</thead>
<tfoot>
<tr>
<th scope="col">Judul</th>
<th scope="col">Jumlah Laporan</th>
<th scope="col">Pilihan</th>
</tr>
</tr>
</tfoot>
<tbody>
{% for materi in materi_dilaporkan %}
<tr>
<td>{{ materi.title }}</td>
<td>{{ materi.jumlah_laporan }}</td>
<td class="verif-buttons">
<a href="{% url 'administration:laporan-materi-detail' materi.id %}" class="accept-button button-decoration">Lihat Laporan</a>
<button type="button" class="reject-button button-decoration" data-toggle="modal" data-target="#confirmModal{{ materi.id }}">Blokir</button>
<div class="modal fade" id="confirmModal{{ materi.id }}" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Konfirmasi Pemblokiran Materi</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Anda akan memblokir materi
<br><br><span style="text-transform: lowercase; font-weight: 900;">{{ materi.title }}</span><br>
email kontributor: {{ materi.uploader.email }}</p>
</div>
<div class="modal-footer">
<a href="{% url 'administration:blok-materi' materi.id %}" id="btn-hapus-{{ materi.id }}" type="button" class="btn btn-secondary">Blokir</a>
<button type="button" class="btn btn-danger" data-dismiss="modal">Batal</button>
</div>
</div>
</div>
</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
<div class="card shadow mb-4">
<div class="card-header py-3">
<h6 id="table-description" class="m-0 font-weight-bold text-primary" id="titleTabelPending">Materi yang Diblokir</h6>
</div>
<div class="card-body">
<div class="table-responsive">
<table aria-describedby="table-description" class="table table-bordered" id="dataTablePending" aria-describedby="titleTabelPending">
{% if not materi_diblokir %}
Tidak ada materi yang diblokir
{% else %}
<thead>
<tr>
<th scope="col">Judul</th>
<th scope="col">Kontributor</th>
</tr>
</thead>
<tfoot>
<tr>
<th scope="col">Judul</th>
<th scope="col">Kontributor</th>
</tr>
</tfoot>
<tbody>
{% for materi in materi_diblokir %}
<tr>
<td>{{ materi.title }}</td>
<td><a href="{% url 'katalog-per-kontributor' materi.uploader.email %}">
{{ materi.uploader.name }}
</a></td>
</tr>
{% endfor %}
</tbody>
{% endif %}
</table>
</div>
</div>
</div>
{% endblock %}
\ No newline at end of file
{% extends 'administration/base_administrasi2.html' %}
{% load static %}
{% block title %}
<title>Laporan Materi | Digipus</title>
{% endblock %}
{% block content %}
<!-- Page Heading -->
<h1 class="h3 mb-2 text-gray-800">Laporan Materi</h1>
<p class="mb-4">Klik tolak untuk menolak laporan.</ehp>
<!-- DataTales Example -->
<div class="card shadow mb-4">
<div class="card-header py-3">
<h6 class="m-0 font-weight-bold text-primary" id="titleTabelPending">
<a href="{% url 'detail-materi' materi.id %}">{{ materi.title }}</a></h6>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="dataTablePending" aria-describedby="titleTabelPending">
{% if not laporan_materi %}
Tidak ada laporan untuk materi {{ materi.title }}
{% else %}
<thead>
<tr>
<th scope="col">Pelapor</th>
<th scope="col">Alasan Melapor</th>
<th scope="col">Pilihan</th>
</tr>
</thead>
<tfoot>
<tr>
<th scope="col">Pelapor</th>
<th scope="col">Alasan Melaporr</th>
<th scope="col">Pilihan</th>
</tr>
</tfoot>
<tbody>
{% for laporan in laporan_materi %}
<tr>
<td><a href="{% url 'katalog-per-kontributor' laporan.user.email %}">{{ laporan.user.name }}</a></td>
<td>{{ laporan.laporan }}</td>
<td class="verif-buttons">
<a href="{% url 'administration:tolak-laporan' laporan.id %}" class="reject-button button-decoration">Tolak</a>
</td>
</tr>
{% endfor %}
</tbody>
{% endif %}
</table>
</div>
</div>
</div>
{% endblock %}
\ No newline at end of file
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>Dasbor - Kelola Admin</title>
<!-- Custom fonts for this template -->
<link href="https://fonts.googleapis.com/css2?family=Poppins&display=swap" rel="stylesheet">
<!-- Custom styles for this template -->
<link rel="icon" type="image/png" href="{% static 'images/icons/logo.ico' %}" />
<link href="{% static 'css/sb-admin-2.min.css' %}" rel="stylesheet">
<link rel="stylesheet" href="{% static 'css/button.css' %}">
<!-- Custom styles for this page -->
<link href="{% static 'vendor/datatables/dataTables.bootstrap4.min.css' %}" rel="stylesheet">
</head>
<body id="page-top" style="font-family: 'Poppins', sans-serif;">
<!-- Page Wrapper -->
<div id="wrapper">
<!-- Sidebar -->
<ul class="navbar-nav bg-gradient-primary sidebar sidebar-dark accordion" id="accordionSidebar">
<!-- Sidebar - Brand -->
<a class="sidebar-brand d-flex align-items-center justify-content-center" href="{% url 'daftar_katalog' %}">
<div class="sidebar-brand-icon rotate-n-15">
</div>
<div class="sidebar-brand-text mx-3">Digipus</div>
</a>
<!-- Divider -->
<hr class="sidebar-divider my-0">
<!-- Nav Item - Dashboard -->
<li class="nav-item">
<a class="nav-link" href="/administration/">
<span>Verifikasi Materi</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<span>Statistik Materi</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="/administration/laporan-materi/">
<span>Laporan Materi</span></a>
</li>
<!-- Divider -->
<hr class="sidebar-divider my-0">
<li class="nav-item">
<a class="nav-link" href="/administration/setting/verification/">
<span>Pengaturan Verifikasi</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="/administration/setting/category/">
<span>Pengaturan Kategori</span></a>
</li>
<!-- Divider -->
<hr class="sidebar-divider my-0">
<li class="nav-item">
<a class="nav-link" href="/administration/kelola-kontributor/">
<span>Kelola Kontributor</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="/administration/kelola-admin/">
<span>Kelola Admin</span></a>
</li>
<!-- Divider -->
<hr class="sidebar-divider my-0">
</ul>
<!-- End of Sidebar -->
<!-- Content Wrapper -->
<div id="content-wrapper" class="d-flex flex-column">
<!-- Main Content -->
<div id="content">
<!-- Topbar -->
<nav class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow">
<!-- Sidebar Toggle (Topbar) -->
<button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3">
<em class="fa fa-bars"></em>
</button>
<div class="sidebar-brand-text mx-3">Diskominfo Kota Depok</div>
<!-- Topbar Navbar -->
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" href="/dashboard/">
<span class="mr-2 d-none d-lg-inline text-gray-600 small">Administrasi</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/profil/">
<span class="mr-2 d-none d-lg-inline text-gray-600 small">Profil</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/logout/">
<span class="mr-2 d-none d-lg-inline text-gray-600 small">Logout</span>
</a>
</li>
<div class="topbar-divider d-none d-sm-block"></div>
<!-- Nav Item - User Information -->
<li class="nav-item dropdown no-arrow">
<a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
<span class="mr-2 d-none d-lg-inline text-gray-600 small">{{ user.name }}</span>
{% if not user.default_profile_picture %}
<img class="img-profile rounded-circle" src="https://i.ibb.co/9wgPzyZ/default-image.png" alt="User profile picture">
{% else %}
<img class="img-profile rounded-circle" src="{{ user.profile_picture.url }}" alt="User profile picture">
{% endif %}
</a>
</li>
</ul>
</nav>
<!-- End of Topbar -->
<!-- Begin Page Content -->
<div class="container-fluid">
<!-- Page Heading -->
<h1 class="h3 mb-2 text-gray-800">Registrasi Admin</h1>
<div class="form-margin"></div>
<div class="container admin-page">
<div class="col-20">
<form id="add_form" method="POST" novalidate enctype="multipart/form-data">
{% csrf_token %}
<div class="col-md-6 admin-page">
<div class="fieldWrapper">
{{ form.name.errors }}
<label for="{{ form.subject.id_for_label }}">Nama:</label>
{{ form.name }}
</div>
</div>
<div class="col-md-6 admin-page">
<div class="fieldWrapper">
{{ form.instansi.errors }}
<label for="{{ form.subject.id_for_label }}">Instansi:</label>
{{ form.instansi }}
</div>
</div>
<div class="col-md-6 admin-page">
<div class="fieldWrapper">
{{ form.nik.errors }}
<label for="{{ form.subject.id_for_label }}">NIK:</label>
{{ form.nik }}
</div>
</div>
<div class="col-md-6 admin-page">
<div class="fieldWrapper">
{{ form.alamat.errors }}
<label for="{{ form.subject.id_for_label }}">Alamat:</label>
{{ form.alamat }}
</div>
</div>
<div class="col-md-6 admin-page">
<div class="fieldWrapper">
{{ form.email.errors }}
<label for="{{ form.subject.id_for_label }}">Email:</label>
{{ form.email }}
</div>
</div>
<div class="col-md-6 admin-page">
<div class="fieldWrapper">
{{ form.nomor_telpon.errors }}
<label for="{{ form.subject.id_for_label }}">Nomor Telepon:</label>
{{ form.nomor_telpon }}
</div>
</div>
<div class="col-md-6 admin-page">
<div class="fieldWrapper">
{{ form.password.errors }}
<label for="{{ form.subject.id_for_label }}">Kata Sandi:</label>
{{ form.password }}
</div>
</div>
<div class="col-md-6 admin-page">
<div class="fieldWrapper">
{{ form.password2.errors }}
<label for="{{ form.subject.id_for_label }}">Ulang Kata Sandi:</label>
{{ form.password2 }}
</div>
</div>
<div class="form-margin"></div>
<div class="col-md-6 admin-page">
<div class="d-flex flex-row">
<div class="p-2">
<button type="submit" class="btn btn-success btn-edit" style="background-color: #615CFD; border-color: #615CFD;">Simpan</button>
</div>
<div class="p-2">
<a href="/administrasi/kelola-admin" class="btn btn-secondary">Kembali Ke Kelola Admin</a>
</div>
</div>
<div class="fieldWrapper">
</div>
</div>
</form>
</div>
</div>
</div>
<!-- /.container-fluid -->
</div>
<!-- End of Main Content -->
<!-- Footer -->
<footer class="sticky-footer bg-white">
<div class="container my-auto">
<div class="copyright text-center my-auto">
<span>Copyright &copy; Diskominfo Kota Depok 2020</span>
</div>
</div>
</footer>
<!-- End of Footer -->
</div>
<!-- End of Content Wrapper -->
</div>
<!-- End of Page Wrapper -->
<!-- Scroll to Top Button-->
<a class="scroll-to-top rounded" href="#page-top">
<em class="fas fa-angle-up"></em>
</a>
<!-- Bootstrap core JavaScript-->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
crossorigin="anonymous"></script>
<!-- Core plugin JavaScript-->
<script src="https://code.jquery.com/jquery-3.5.0.min.js"
integrity="sha256-xNzN2a4ltkB44Mc/Jz3pT4iU1cmeR0FkXs4pru/JxaQ=" crossorigin="anonymous"></script>
<!-- Custom scripts for all pages-->
<script src="{% static 'js/sb-admin-2.min.js' %}"></script>
<!-- Page level plugins -->
<script src="{% static 'vendor/datatables/jquery.dataTables.min.js' %}"></script>
<script src="{% static 'vendor/datatables/dataTables.bootstrap4.min.js' %}"></script>
<!-- Page level custom scripts -->
<script src="{% static 'js/demo/datatables-demo.js' %}"></script>
</body>
</html>
\ No newline at end of file
{% extends 'administration/base_administrasi2.html' %}
{% load static %}
{% block title %}
<title>Pengaturan Kategori | Digipus</title>
{% endblock %}
{% block content %}
{% endblock %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>Dasbor - Pengaturan Verifikasi Materi</title>
<!-- Custom fonts for this template -->
<link rel="icon" type="image/png" href="{% static 'images/icons/logo.ico' %}" />
<link href="https://fonts.googleapis.com/css2?family=Poppins&display=swap" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="{% static 'css/sb-admin-2.min.css' %}" rel="stylesheet">
<link rel="stylesheet" href="{% static 'css/button.css' %}">
<!-- Custom styles for this page -->
<link href="{% static 'vendor/datatables/dataTables.bootstrap4.min.css' %}" rel="stylesheet">
</head>
<body id="page-top" style="font-family: 'Poppins', sans-serif;">
<!-- Page Wrapper -->
<div id="wrapper">
<!-- Sidebar -->
<ul class="navbar-nav bg-gradient-primary sidebar sidebar-dark accordion" id="accordionSidebar">
<!-- Sidebar - Brand -->
<a class="sidebar-brand d-flex align-items-center justify-content-center" href="verif.html">
<div class="sidebar-brand-icon rotate-n-15">
</div>
<div class="sidebar-brand-text mx-3">Digipus</div>
</a>
<!-- Divider -->
<hr class="sidebar-divider my-0">
<!-- Nav Item - Dashboard -->
<li class="nav-item">
<a class="nav-link" href="/administration/">
<span>Verifikasi Materi</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<span>Statistik Materi</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="/administration/laporan-materi/">
<span>Laporan Materi</span></a>
</li>
<!-- Divider -->
<hr class="sidebar-divider my-0">
<li class="nav-item">
<a class="nav-link" href="/administration/setting/verification/">
<span>Pengaturan Verifikasi</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="/administration/setting/category/">
<span>Pengaturan Kategori</span></a>
</li>
<!-- Divider -->
<hr class="sidebar-divider my-0">
<li class="nav-item">
<a class="nav-link" href="/administration/kelola-kontributor/">
<span>Kelola Kontributor</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="/administration/kelola-admin/">
<span>Kelola Admin</span></a>
</li>
<!-- Divider -->
<hr class="sidebar-divider my-0">
</ul>
<!-- End of Sidebar -->
<!-- Content Wrapper -->
<div id="content-wrapper" class="d-flex flex-column">
<!-- Main Content -->
<div id="content">
<!-- Topbar -->
<nav class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow">
<!-- Sidebar Toggle (Topbar) -->
<button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3">
<em class="fa fa-bars"></em>
</button>
<div class="sidebar-brand-text mx-3">Diskominfo Kota Depok</div>
<!-- Topbar Navbar -->
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" href="/dashboard/">
<span class="mr-2 d-none d-lg-inline text-gray-600 small">Administrasi</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/profil/">
<span class="mr-2 d-none d-lg-inline text-gray-600 small">Profil</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/logout/">
<span class="mr-2 d-none d-lg-inline text-gray-600 small">Logout</span>
</a>
</li>
<div class="topbar-divider d-none d-sm-block"></div>
<!-- Nav Item - User Information -->
<li class="nav-item dropdown no-arrow">
<a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
<span class="mr-2 d-none d-lg-inline text-gray-600 small">Admin</span>
{% if not user.default_profile_picture %}
<img class="img-profile rounded-circle" src="https://i.ibb.co/9wgPzyZ/default-image.png" alt="User profile picture">
{% else %}
<img class="img-profile rounded-circle" src="{{ user.profile_picture.url }}" alt="User profile picture">
{% endif %}
</a>
</li>
</ul>
</nav>
<!-- End of Topbar -->
<!-- Begin Page Content -->
<div class="container-fluid">
<div class="card shadow mb-4">
<div class="card-header py-3">
<h6 class="m-0 font-weight-bold text-primary">Point Verifikasi Materi Baru</h6>
</div>
<div class="card-body">
<form method="POST">
{% csrf_token %}
<label>Judul &nbsp;&nbsp;&nbsp;&nbsp; :</label>{{ form.title }}<br>
<label>Deskripsi &nbsp;:</label>{{ form.description }}<br>
<br>
<div class="row">
<button class="primary_btn save" style="border-radius:20px;" type="submit"><em class="far fa-save"></em>
Simpan</button>
</div>
</form>
</div>
</div>
<!-- DataTales Example -->
<div class="card shadow mb-4">
<div class="card-header py-3">
<h6 id="table-description" class="m-0 font-weight-bold text-primary">Point Verifikasi Materi</h6>
</div>
<div class="card-body">
<div class="table-responsive">
<table aria-describedby="table-description" class="table table-bordered" id="dataTable">
<thead>
<tr>
<th scope="col">Judul Verifikasi</th>
<th scope="col">Deskripsi</th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
{% for item in verification_settings %}
<tr>
<th scope="col">{{item.title}}</th>
<th scope="col">{{item.description}}</th>
<th scope="col"> </th>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- /.container-fluid -->
</div>
<!-- End of Main Content -->
<!-- Footer -->
<footer class="sticky-footer bg-white">
<div class="container my-auto">
<div class="copyright text-center my-auto">
<span>Copyright &copy; Diskominfo Kota Depok 2020</span>
</div>
</div>
</footer>
<!-- End of Footer -->
</div>
<!-- End of Content Wrapper -->
</div>
<!-- End of Page Wrapper -->
<!-- Scroll to Top Button-->
<a class="scroll-to-top rounded" href="#page-top">
<em class="fas fa-angle-up"></em>
</a>
</body>
</html>
\ No newline at end of file
{% extends 'administration/base_administrasi2.html' %}
{% load static %}
{% block title %}
<title>Dasbor - Pengaturan {{ page_title }}</title>
{% endblock %}
{% block content %}
<div class="container-fluid">
<div class="card shadow mb-4">
<div class="card-header py-3">
<h6 class="m-0 font-weight-bold text-primary">
Tambah {{ page_title }}
</h6>
</div>
<div class="card-body">
<form method="POST">
{% csrf_token %}
<p class="h5 mb-3 border-bottom">
Tambah Point Verifikasi
</p>
<div
class="judul d-flex align-items-baseline"
>
{{ form.title }}
{{ form.name }}
</div>
<div
class="description d-flex align-items-baseline"
>
{{ form.description }}
</div>
<div class="">
<button
class="btn-sm btn-primary rounded p-12"
type="submit"
>
<i
class="far fa-save"
aria-hidden="true"
></i>
Tambahkan
</button>
</div>
</form>
</div>
</div>
<!-- DataTales Example -->
<div class="card shadow mb-4">
<div class="card-header py-3">
<h6
class="m-0 font-weight-bold text-primary"
id="titleTabel"
>
List {{ page_title }}
</h6>
</div>
<div class="card-body">
<div class="alert m-0 p-0 text-center">
{% if messages %}
{% for message in messages %}
<div class="alert alert-success" role="alert">
{{message}}
</div>
{% endfor %}
{% endif %}
</div>
<div class="table-responsive">
<table
class="table table-bordered"
id="dataTable"
aria-describedby="titleTabel"
>
<thead>
<tr>
<th scope="col">Item</th>
<th scope="col">Deskripsi</th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
{% for item in items %}
<tr>
<th scope="col">{{item.title}} {{item.name}}</th>
<th scope="col">{{item.description}}</th>
<th scope="col" class="verif-buttons">
{% if item.name is None %}
<a
href="/administration/setting/verification/{{ item.id }}/edit"
class="btn-primary btn-sm"
role="button"
>Edit</a
>
{% else %}
<a
href="/administration/setting/category/{{ item.id }}/edit"
class="btn-primary btn-sm"
role="button"
>Edit</a
>
{% endif %}
<a class="btn-sm btn-danger text-white" role="button" data-toggle="modal" data-target="#hapus-modal-{{item.id}}">
Hapus
</a>
<div class="modal fade" id="hapus-modal-{{item.id}}" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Hapus {{ page_title }}</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Anda akan menghapus
<span style="text-transform: lowercase">{{page_title}} </span>
<span class="bg-danger pr-1 pl-1 text-white" style="text-transform: lowercase">{{ item.title }}{{item.name}}</span>
. Data tersebut akan hilang, dan tidak dapat dikembalikan. Untuk melanjutkan ketik: </p>
<p class="bg-danger text-white p-1"> {{ item.title }} {{item.name}}</p>
</div>
<form/>
{% csrf_token %}
{% if item.name is None %}
<div class="form-group pl-3 pr-3">
<input name="{{ item.title }}" class="form-control" id="{{ item.id }}"required pattern="{{item.title}}" oninput="checkValue(this)">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Batal</button>
<a type="submit" id="btn-hapus-{{item.id}}" href="/administration/delete-verification/{{ item.id }}" class="btn btn-danger btn-hapus-{{item.id}} disabled">Hapus</a>
</div>
{% else %}
<div class="form-group pl-3 pr-3">
<input name="{{ item.name }}" class="form-control" id="{{ item.id }}"required pattern="{{item.name}}" oninput="checkValue(this)">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Batal</button>
<a type="submit" id="btn-hapus-{{item.id}}" href="/administration/delete-category/{{ item.id }}" class="btn btn-danger btn-hapus-{{item.id}} disabled">Hapus</a>
</div>
{% endif %}
</form>
</div>
</div>
</div>
</th>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
<!-- DataTales Example -->
<div class="card shadow mb-4">
<div class="card-header py-3">
<h6
class="m-0 font-weight-bold text-primary"
id="titleTabel"
>
{{ page_title }} Terhapus
</h6>
</div>
<div class="card-body">
<div class="table-responsive">
<table
class="table table-bordered"
id="dataTable"
aria-describedby="titleTabel"
>
<thead>
<tr>
<th scope="col">Item</th>
<th scope="col">Deskripsi</th>
<th scope="col">Admin penghapus</th>
</tr>
</thead>
<tbody>
{% for item in items_archived %}
<tr>
<th scope="col">{{item.title}} {{item.name}}</th>
<th scope="col">{{item.description}}</th>
<th scope="col">{{item.archived_by.name}}</th>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- /.container-fluid -->
{% endblock%}
{% block javascripts %}
<!-- Custom scripts for all pages-->
<script src="{% static 'js/sb-admin-2.min.js' %}"></script>
<!-- Page level plugins -->
<script src="{% static 'vendor/datatables/jquery.dataTables.min.js' %}"></script>
<script src="{% static 'vendor/datatables/dataTables.bootstrap4.min.js' %}"></script>
<!-- Page level custom scripts -->
<script src="{% static 'js/demo/datatables-demo.js' %}"></script>
<script type="text/javascript">
function checkValue(element){
buttonElement = document.getElementById("btn-hapus-" + element.id)
if(element.value != element.name) {
buttonElement.classList.add("disabled");
} else {
buttonElement.classList.remove("disabled");
}
}
</script>
{% endblock javascripts %}
\ No newline at end of file
{% extends 'administration/base_administrasi2.html' %}
{% load static %}
{% block title %}
<title>Verifikasi Materi | Digipus</title>
{% endblock %}
{% block content %}
<!-- DataTales Example -->
<div class="card shadow mb-4">
<div class="card-header py-3">
<h6 class="m-0 font-weight-bold text-primary" id="titleTabelPending">Verifikasi Materi</h6>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="dataTablePending" aria-describedby="titleTabelPending">
{% if not materi_list_pending %}
Tidak ada materi yang perlu diverifikasi
{% else %}
<thead>
<tr>
<th scope="col">Judul Materi</th>
<th scope="col">Nama Kontributor</th>
<th scope="col">Status</th>
<th scope="col">Tombol</th>
</tr>
</thead>
<tfoot>
<tr>
<th scope="col">Judul Materi</th>
<th scope="col">Nama Kontributor</th>
<th scope="col">Status</th>
<th scope="col">Tombol</th>
</tr>
</tfoot>
<tbody>
{% for materi in materi_list_pending %}
<tr>
<td>{{ materi.title }}</td>
<td>{{ materi.uploader.name }}</td>
<td>{{ materi.get_status_display }}</td>
{% if materi.status == "PENDING" %}
<td class="verif-buttons">
<a href="/administration/detail-verif/{{materi.id}}/" class="accept-button"
style="background-color:#4e73df">Detail</a>
{% endif %}
</tr>
{% endfor %}
</tbody>
{% endif %}
</table>
</div>
</div>
</div>
<!-- DataTales Example -->
<div class="card shadow mb-4">
<div class="card-header py-3">
<h6 class="m-0 font-weight-bold text-primary" id="titleTabelRiwayat">Riwayat Verifikasi Materi</h6>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="dataTableRiwayat" aria-describedby="titleTabelRiwayat">
<thead>
<tr>
<th scope="col">Judul Materi</th>
<th scope="col">Nama Kontributor</th>
<th scope="col">Status</th>
<th scope="col">Tombol</th>
</tr>
</thead>
<tfoot>
<tr>
<th scope="col">Judul Materi</th>
<th scope="col">Nama Kontributor</th>
<th scope="col">Status</th>
<th scope="col">Tombol</th>
</tr>
</tfoot>
<tbody>
{% for materi in materi_list_history %}
<tr>
<td>{{ materi.title }}</td>
<td>{{ materi.uploader.name }}</td>
<td>{{ materi.get_status_display }}</td>
<td class="verif-buttons">
<a href="/administration/detail-verif/{{materi.id}}/" class="accept-button"
style="background-color:#4e73df">Detail</a>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
{% endblock %}
\ No newline at end of file
This diff is collapsed.
from django.urls import path
from administration.views import VerificationView, DetailVerificationView, \
VerificationSettingView, CategorySettingView, \
KelolaKontributorView, ProfileContributorAdminView, \
ProfileAdminAdministrationView, KelolaAdminView, \
RegistrasiAdminView, EditVerificationView, \
delete_admin, delete_contributor, \
delete_verification, StatisticsView, \
StatisticApiView, EditCategoryView, \
EditAdminStatusView, delete_category, \
EditKontributorStatusView, \
generatedummy, KelolaMateriView, \
LaporanMateriView, LaporanMateriDetailView, \
tolak_laporan, blok_materi
app_name = "administration"
urlpatterns = [
path("", VerificationView.as_view()),
path("detail-verif/<int:pk>/", DetailVerificationView.as_view()),
path("setting/verification/", VerificationSettingView.as_view()),
path("delete-verification/<int:pk_verification>/", delete_verification),
path("setting/verification/<int:pk>/edit",
EditVerificationView.as_view(), name="edit-verification"),
path("setting/category/", CategorySettingView.as_view()),
path("setting/category/<int:pk>/edit",
EditCategoryView.as_view(), name="edit-category"),
path("delete-category/<int:pk_category>/", delete_category),
path("kelola-kontributor/", KelolaKontributorView.as_view()),
path("profil/<int:pk>/", ProfileContributorAdminView.as_view()),
path("statistics/", StatisticsView.as_view(), name="halaman-statistik"),
path("statistics/api/", StatisticApiView.as_view()),
path("profil-admin/<int:pk>/", ProfileAdminAdministrationView.as_view()),
path("kelola-admin/", KelolaAdminView.as_view()),
path("kelola-admin/tambah/", RegistrasiAdminView.as_view()),
path("setting/admin/<int:pk>/edit",
EditAdminStatusView.as_view(), name="edit-admin-status"),
path("setting/kontributor/<int:pk>/edit",
EditKontributorStatusView.as_view(), name="edit-admin-status"),
path("hapus-admin/<int:pk>/", delete_admin),
path("hapus-kontributor/<int:pk>/", delete_contributor),
path("kelola-materi/", KelolaMateriView.as_view()),
path("laporan-materi/", LaporanMateriView.as_view()),
path("laporan-materi/<int:pk>/",
LaporanMateriDetailView.as_view(), name="laporan-materi-detail"),
path("tolak-laporan/<int:pk>/", tolak_laporan, name="tolak-laporan"),
path("blok-materi/<int:pk>/", blok_materi, name="blok-materi"),
path("generate-dummy", generatedummy),
]
import random
import string
from django.utils import timezone, lorem_ipsum
from dateutil.relativedelta import relativedelta
def generate_time_step(s, e, step="DAILY"):
result = []
time = s.replace(hour=0, minute=0, second=0, microsecond=0)
while time < e:
result.append(time)
if step == "DAILY":
time = time + relativedelta(days=1)
result.append(e)
return result
def id_generator(size=6, chars=string.ascii_uppercase + string.digits): # pragma: no cover
return ''.join(random.choice(chars) for _ in range(size))
This diff is collapsed.
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted