Fakultas Ilmu Komputer UI
Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
PMPL
Class Project
DIGIPUS
Commits
1570fba8
Commit
1570fba8
authored
Oct 29, 2020
by
Steven Kusuman
Browse files
Merge branch '1706028676-121' into 'master'
[
#121
] Bugfix: admin dashboard Closes
#121
See merge request
!70
parents
041f2dc8
d1951aab
Pipeline
#59973
passed with stages
in 25 minutes and 38 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
1570fba8
...
...
@@ -215,3 +215,4 @@ client_secrets.json
# MacOS
.DS_Store
*.bak
\ No newline at end of file
administration/templates/administration/includes/navigation.html
View file @
1570fba8
...
...
@@ -7,7 +7,7 @@
<!-- Topbar Navbar -->
<ul
class=
"navbar-nav ml-auto"
>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"/
dashboard
/"
>
<a
class=
"nav-link"
href=
"/
administration
/"
>
<span
class=
"mr-2 d-none d-lg-inline text-gray-600 small"
>
Administrasi
</span>
</a>
</li>
...
...
administration/templates/settings.html
View file @
1570fba8
{% 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 - Pengaturan {{ page_title }}
</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=
"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"
>
<i
class=
"fa fa-bars"
aria-hidden=
"true"
></i>
</button>
<div
class=
"sidebar-brand-text mx-3"
>
Diskominfo Kota Depok
</div>
<!-- Topbar Navbar -->
<ul
class=
"navbar-nav ml-auto"
>
<!-- Nav Item - Search Dropdown (Visible Only XS) -->
<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"
>
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"
>
×
</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 -->
</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
©
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"
>
<i
class=
"fas fa-angle-up"
aria-hidden=
"true"
></i>
</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>
<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>
</body>
</html>
{% 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"
>
×
</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"
>