Fakultas Ilmu Komputer UI

Commit d4619c36 authored by Samuel Dimas's avatar Samuel Dimas
Browse files

[GREEN] Implementing verification detail page

parent 79627332
{% 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 - Verifikasi Materi</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 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="index.html">
<span>Daftar Kontributor</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="index.html">
<span>Statistik Materi</span></a>
</li>
<!-- Divider -->
<hr class="sidebar-divider">
<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>
</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"></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 dropdown no-arrow d-sm-none">
<a class="nav-link dropdown-toggle" href="#" id="searchDropdown" role="button" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
<i class="fas fa-search fa-fw"></i>
</a>
<!-- Dropdown - Messages -->
<div class="dropdown-menu dropdown-menu-right p-3 shadow animated--grow-in"
aria-labelledby="searchDropdown">
<form class="form-inline mr-auto w-100 navbar-search">
<div class="input-group">
<input type="text" class="form-control bg-light border-0 small" placeholder="Search for..."
aria-label="Search" aria-describedby="basic-addon2">
<div class="input-group-append">
<button class="btn btn-primary" type="button">
<i class="fas fa-search fa-sm"></i>
</button>
</div>
</div>
</form>
</div>
</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>
<img class="img-profile rounded-circle" src="https://source.unsplash.com/QAB-WJcbgJk/60x60">
</a>
</li>
</ul>
</nav>
<!-- End of Topbar -->
<!-- Begin Page Content -->
<div class="container-fluid">
<div class="row materi-data">
<div class="col col-3 cover">
<img class="materi-image" src="{% static 'img/instagram.png' %}">
</div>
<div class="col col-6 ml-3 book">
<div class="category-wrapper">
</div>
<div class="info-wrapper">
<div class="info" id='1'>
<dt class="col col-4">
<p class="info-name">Deskripsi</p>
</dt>
<dd>
<p class="info-content">Loren ipsum</p>
</dd>
</div>
<div class="info" id="1">
<dt class="col col-4">
<p class="info-name">Penulis</p>
</dt>
<dd>
<p class="info-content">test</p>
</dd>
</div>
<div class="info" id="1">
<dt class="col col-4">
<p class="info-name">Penerbit</p>
</dt>
<dd>
<p class="info-content">test</p>
</dd>
</div>
<div class="info" id="1">
<dt class="col col-4">
<p class="info-name">Jumlah Halaman</p>
</dt>
<dd>
<p class="info-content">test</p>
</dd>
</div>
<div class="info" id="1">
<dt class="col col-4">
<p class="info-name">Ukuran File</p>
</dt>
<dd>
<p class="info-content">396.2 KB</p>
</dd>
</div>
</div>
<a href="/materi/1/view" class="btn btn-link btn-book shadow-sm p-2 mb-1 bg-white rounded">Baca</a>
<a href="/materi/1/unduh" class="btn btn-link btn-book shadow-sm p-2 mb-1 bg-white rounded">Unduh</a>
<button class="btn btn-link btn-book shadow-sm p-2 mb-1 bg-white rounded">Bagikan</button>
</div>
</div>
</div>
<!-- /.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</h6>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
<thead>
<tr>
<th>Judul Verifikasi</th>
<th>Deskripsi</th>
<th>Tombol</th>
</tr>
</thead>
<tbody>
<tr>
<th>Kriteria 1</th>
<th>Materi harus memenuhi kriteria 1</th>
<th>
<button class="btn btn-link btn-book shadow-sm p-2 mb-1 bg-white rounded">Setuju</button>
<button class="btn btn-link btn-book shadow-sm p-2 mb-1 bg-white rounded">Tolak</button>
</th>
</tr>
<tr>
<th>Kriteria 2</th>
<th>Materi harus memenuhi kriteria 2</th>
<th>
<button class="btn btn-link btn-book shadow-sm p-2 mb-1 bg-white rounded">Setuju</button>
<button class="btn btn-link btn-book shadow-sm p-2 mb-1 bg-white rounded">Tolak</button>
</th>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</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">
<i class="fas fa-angle-up"></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>
</body>
</html>
\ No newline at end of file
......@@ -149,30 +149,25 @@
<th>Judul Materi</th>
<th>Nama Kontributor</th>
<th>Status</th>
<th></th>
</tr>
</thead>
<tbody>
{% for materi in materi_list %}
<tr>
<td><a href="?kategori={{itemKategori.pk}}">{{ materi.title }}</a></td>
<td>{{ materi.uploader.name }}</td>
<td>
{{ materi.status.13 }}{{ materi.status.14 }}{{ materi.status.15 }}{{ materi.status.16 }}{{ materi.status.17 }}{{ materi.status.18 }}{{ materi.status.19 }}{{ materi.status.20 }}</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<tr>
<th>Judul Materi</th>
<th>Nama Kontributor</th>
<th>Status</th>
<th> </th>
</tr>
</tfoot>
<tbody>
<tr>
{% for materi in materi_list %}
<td>{{ materi.tittle }}</td>
<td>{{ materi.uploader.name }}</td>
<td>{{ materi.status.1 }}</td>
{% if materi.status.0 == "PENDING" %}
<td class="verif-buttons"><a href="/administration/api/approve/{{materi.id}}/" class="accept-button">Terima</a><a href="/administration/api/disapprove/{{materi.id}}/"
class="reject-button">Tolak</a></td>
{% endif %}
{% endfor %}
</tr>
</tbody>
</table>
</div>
</div>
......@@ -206,7 +201,6 @@
</a>
<!-- Bootstrap core JavaScript-->
<!-- <script src="{% static 'vendor/jquery/jquery.min.js' %}"></script> -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin="anonymous"></script>
......
......@@ -10,4 +10,5 @@ urlpatterns = [
path("api/disapprove/<int:pk>", views.verification),
path("setting/verification/", views.VerificationSettingView.as_view()),
path("setting/category/", views.CategorySettingView.as_view()),
path("detail", views.detail)
]
......@@ -11,7 +11,12 @@ from .models import VerificationSetting
# Create your views here.
def verification(request):
return render(request, "verif.html")
materi_list = Materi.objects.all()
context = {'materi_list': materi_list}
return render(request, "verif.html", context)
def detail(request):
return render(request, "detail.html")
def approve(request, pk):
......
# Generated by Django 3.0.3 on 2020-04-26 15:41
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='comment',
name='profile',
field=models.CharField(default='0db2a4', max_length=100),
),
migrations.AlterField(
model_name='comment',
name='user',
field=models.CharField(default='7f90724880024ace9444f17a0d1bd592', max_length=100),
),
]
......@@ -20,3 +20,31 @@
margin-left: 5px;
}
.materi-data {
padding: 20px;
border-bottom: 1px solid #d4d4d4;
}
.materi-image {
max-width: 200px;
}
.book {
color: #000000;
}
.category-wrapper {
display: flex;
flex-direction: row;
}
.info-wrapper {
margin-top: 20px;
}
.info {
margin: 10px 0;
border-bottom: 1px solid #d4d4d4;
display: flex;
flex-direction: row;
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment