Fakultas Ilmu Komputer UI

Commit 98fd3ff3 authored by Moh Faisal's avatar Moh Faisal
Browse files

Fix conflict

parents cb0894c9 87716fc7
Pipeline #60160 passed with stages
in 21 minutes and 10 seconds
......@@ -100,8 +100,11 @@ Dev Docker Image:
- .docker-image
- .development
allow_failure: true
when: manual
Prod Docker Image:
extends:
- .docker-image
- .production
\ No newline at end of file
- .production
when: manual
allow_failure: true
\ No newline at end of file
......@@ -18,7 +18,7 @@ BASE_PERIODE = [
]
def genereatePeriodeChoices():
def generate_periode_choices():
periode = BASE_PERIODE
now = timezone.now()
# Month
......
......@@ -3,7 +3,7 @@ from crispy_forms.layout import Layout, Submit, Row, Column, Reset, ButtonHolder
from crispy_forms.bootstrap import InlineCheckboxes
from django import forms
from administration.choices import genereatePeriodeChoices
from administration.choices import generate_periode_choices
from administration.models import VerificationSetting
from app.models import Category
from authentication.models import User
......@@ -88,7 +88,7 @@ class RegistrasiAdminForm(forms.ModelForm):
class PeriodForm(forms.Form):
period = forms.ChoiceField(
choices=genereatePeriodeChoices(), label="Periode", required=False)
choices=generate_periode_choices(), label="Periode", required=False)
start_date = forms.DateField(
widget=DateInput, label="Waktu mulai", required=False)
end_date = forms.DateField(
......@@ -102,14 +102,16 @@ class PeriodForm(forms.Form):
for field_name, field in self.fields.items():
field.widget.attrs['class'] = 'form-control'
period_css_class = 'form-group col-md-4 mb-0'
self.helper = FormHelper()
self.helper.attrs["name"] = "filter-form"
self.helper.form_method = 'get'
self.helper.layout = Layout(
Row(
Column('period', css_class='form-group col-md-4 mb-0'),
Column('start_date', css_class='form-group col-md-4 mb-0'),
Column('end_date', css_class='form-group col-md-4 mb-0'),
Column('period', css_class=period_css_class),
Column('start_date', css_class=period_css_class),
Column('end_date', css_class=period_css_class),
css_class='form-row'
),
InlineCheckboxes('categories'),
......@@ -130,10 +132,9 @@ class PeriodForm(forms.Form):
if start_date is None and end_date is not None:
self.add_error("start_date",
"masukan waktu mulai")
if start_date is not None and end_date is not None:
if start_date > end_date:
self.add_error("end_date",
"waktu selesai sebelum waktu mulai")
if start_date is not None and end_date is not None and start_date > end_date:
self.add_error("end_date",
"waktu selesai sebelum waktu mulai")
class EditAdminStatusForm(forms.ModelForm):
......
......@@ -97,20 +97,6 @@
<!-- Card Header - Dropdown -->
<div class="card-header py-3 d-flex flex-row align-items-center justify-content-between">
<h6 class="m-0 font-weight-bold text-primary">Statistik</h6>
<!-- <div class="dropdown no-arrow">
<a class="dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
<em class="fas fa-ellipsis-v fa-sm fa-fw text-gray-400"></em>
</a>
<div class="dropdown-menu dropdown-menu-right shadow animated--fade-in"
aria-labelledby="dropdownMenuLink">
<div class="dropdown-header">Dropdown Header:</div>
<a class="dropdown-item" href="#">Action</a>
<a class="dropdown-item" href="#">Another action</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#">Something else here</a>
</div>
</div> -->
</div>
<!-- Card Body -->
<div class="card-body" style="overflow:auto!important; display:inline-block!important; height: 750px;">
......@@ -128,7 +114,7 @@
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="dataTableRiwayat" width="100%" cellspacing="0"
<table class="table table-bordered" id="dataTableRiwayat"
aria-describedby="titleTabelRiwayat">
<thead>
<tr>
......
{% extends 'administration/base_administrasi2.html' %}
{% load static %}
{% extends 'detail_kontri_admin_base.html' %}
{% block title %}
<title>Kelola Admin | Digipus</title>
{% endblock %}
{% block content %}
<div class="profile-content white-text">
<div>
{% if not user.default_profile_picture %}
<img class="img-profile rounded-circle" src="https://i.ibb.co/9wgPzyZ/default-image.png" alt="Photo" class="img-thumbnail"></img>
{% else %}
<img class="img-profile rounded-circle" src="{{ user.profile_picture.url }}" alt="Photo" class="img-thumbnail"></img>
{% endif %}
<div class="profile-margin"></div>
<h2>{{ user.name }}</h2>
<h4>{{ user.email }}</h4>
<h4>{{ user.biography }}</h4>
<div class="profile-margin"></div>
<div class="row">
<div class="col-md-6 my-auto" style="font-size: 2rem;">
instansi
</div>
<div class="col-md-6 my-auto" style="font-size: 1.2rem;">
{{user.instansi}}
</div>
</div>
<div class="row">
<div class="col-md-6 my-auto" style="font-size: 2rem;">
LinkedIn
</div>
<div class="col-md-6 my-auto" style="font-size: 1.2rem;">
<a href="https://linkedin.com">{{ user.linkedin }}</a>
</div>
</div>
<div class="row">
<div class="col-md-6 my-auto" style="font-size: 2rem;">
Facebook
</div>
<div class="col-md-6 my-auto" style="font-size: 1.2rem;">
<a href="https://facebook.com">{{ user.facebook }}</a>
</div>
</div>
<div class="row">
<div class="col-md-6 my-auto" style="font-size: 2rem;">
Twitter
</div>
<div class="col-md-6 my-auto" style="font-size: 1.2rem;">
<a href="https://twitter.com">{{ user.twitter }}</a>
</div>
</div>
<div class="row">
<div class="col-md-6 my-auto" style="font-size: 2rem;">
Instagram
</div>
<div class="col-md-6 my-auto" style="font-size: 1.2rem;">
<a href="https://instagram.com">{{ user.instagram }}</a>
</div>
</div>
<a class="btn btn-primary btn-admin" href="/administration/kelola-admin/">Kembali ke Kelola Admin</a>
</div>
</div>
{% endblock%}
\ No newline at end of file
{% block return_link %}
<a class="btn btn-primary btn-admin" href="/administration/kelola-admin/">Kembali ke Kelola Admin</a>
{% endblock %}
{% extends 'administration/base_administrasi2.html' %}
{% load static %}
{% extends 'detail_kontri_admin_base.html' %}
{% block title %}
<title>Kelola Kontributor | Digipus</title>
{% endblock %}
{% block content %}
<div class="profile-content white-text">
<div>
{% if not user.default_profile_picture %}
<img class="img-profile rounded-circle" src="https://i.ibb.co/9wgPzyZ/default-image.png" alt="Photo" class="img-thumbnail"></img>
{% else %}
<img class="img-profile rounded-circle" src="{{ user.profile_picture.url }}" alt="Photo" class="img-thumbnail"></img>
{% endif %}
<div class="profile-margin"></div>
<h2>{{ user.name }}</h2>
<h4>{{ user.email }}</h4>
<h4>{{ user.biography }}</h4>
<div class="profile-margin"></div>
<div class="row">
<div class="col-md-6 my-auto" style="font-size: 2rem;">
instansi
</div>
<div class="col-md-6 my-auto" style="font-size: 1.2rem;">
{{user.instansi}}
</div>
</div>
<div class="row">
<div class="col-md-6 my-auto" style="font-size: 2rem;">
LinkedIn
</div>
<div class="col-md-6 my-auto" style="font-size: 1.2rem;">
<a href="https://linkedin.com">{{ user.linkedin }}</a>
</div>
</div>
<div class="row">
<div class="col-md-6 my-auto" style="font-size: 2rem;">
Facebook
</div>
<div class="col-md-6 my-auto" style="font-size: 1.2rem;">
<a href="https://facebook.com">{{ user.facebook }}</a>
</div>
</div>
<div class="row">
<div class="col-md-6 my-auto" style="font-size: 2rem;">
Twitter
</div>
<div class="col-md-6 my-auto" style="font-size: 1.2rem;">
<a href="https://twitter.com">{{ user.twitter }}</a>
</div>
</div>
<div class="row">
<div class="col-md-6 my-auto" style="font-size: 2rem;">
Instagram
</div>
<div class="col-md-6 my-auto" style="font-size: 1.2rem;">
<a href="https://instagram.com">{{ user.instagram }}</a>
</div>
</div>
<a class="btn btn-primary btn-admin" href="/administration/kelola-kontributor/">Kembali ke Kelola Kontributor</a>
</div>
</div>
{% endblock %}
\ No newline at end of file
{% block return_link %}
<a class="btn btn-primary btn-admin" href="/administration/kelola-kontributor/">Kembali ke Kelola Kontributor</a>
{% endblock %}
{% extends 'administration/base_administrasi2.html' %}
{% block content %}
<div class="profile-content white-text">
<div>
{% if not user.default_profile_picture %}
<img class="img-profile rounded-circle" src="https://i.ibb.co/9wgPzyZ/default-image.png" alt="Photo" class="img-thumbnail"></img>
{% else %}
<img class="img-profile rounded-circle" src="{{ user.profile_picture.url }}" alt="Photo" class="img-thumbnail"></img>
{% endif %}
<div class="profile-margin"></div>
<h2>{{ user.name }}</h2>
<h4>{{ user.email }}</h4>
<h4>{{ user.biography }}</h4>
<div class="profile-margin"></div>
<div class="row">
<div class="col-md-6 my-auto" style="font-size: 2rem;">
instansi
</div>
<div class="col-md-6 my-auto" style="font-size: 1.2rem;">
{{user.instansi}}
</div>
</div>
<div class="row">
<div class="col-md-6 my-auto" style="font-size: 2rem;">
LinkedIn
</div>
<div class="col-md-6 my-auto" style="font-size: 1.2rem;">
<a href="https://linkedin.com">{{ user.linkedin }}</a>
</div>
</div>
<div class="row">
<div class="col-md-6 my-auto" style="font-size: 2rem;">
Facebook
</div>
<div class="col-md-6 my-auto" style="font-size: 1.2rem;">
<a href="https://facebook.com">{{ user.facebook }}</a>
</div>
</div>
<div class="row">
<div class="col-md-6 my-auto" style="font-size: 2rem;">
Twitter
</div>
<div class="col-md-6 my-auto" style="font-size: 1.2rem;">
<a href="https://twitter.com">{{ user.twitter }}</a>
</div>
</div>
<div class="row">
<div class="col-md-6 my-auto" style="font-size: 2rem;">
Instagram
</div>
<div class="col-md-6 my-auto" style="font-size: 1.2rem;">
<a href="https://instagram.com">{{ user.instagram }}</a>
</div>
</div>
{% block return_link %}
{% endblock %}
</div>
</div>
{% endblock %}
\ No newline at end of file
......@@ -52,25 +52,31 @@ Pratinjau Materi
{% if riwayat %}
<div class="info-wrapper">
<div class="info" id="1">
<dt class="col col-4">
<p class="info-name"><strong>Verifikatur</strong></p>
</dt>
<dl>
<dt class="col col-4">
<p class="info-name"><strong>Verifikatur</strong></p>
</dt>
</dl>
<dd>
<p class="info-content">{{verification_report.user.name}}</p>
</dd>
</div>
<div class="info" id="1">
<dt class="col col-4">
<p class="info-name"><strong>Waktu Verifikasi</strong></p>
</dt>
<dl>
<dt class="col col-4">
<p class="info-name"><strong>Waktu Verifikasi</strong></p>
</dt>
</dl>
<dd>
<p class="info-content">{{verification_report.timestamp}}</p>
</dd>
</div>
<div class="info" id="1">
<dt class="col col-4">
<p class="info-name"><strong>Status Materi</strong></p>
</dt>
<dl>
<dt class="col col-4">
<p class="info-name"><strong>Status Materi</strong></p>
</dt>
</dl>
<dd>
<p class="info-content">{{verification_report.status}}</p>
</dd>
......
{% 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 %}
{{ item.name }}
<div class="status d-flex align-items-baseline">
{{ form.is_active }} <br> Active
</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>
......
......@@ -17,7 +17,7 @@
</div>
<div class="card-body">
<div class="table-responsive">
<table aria-describedby="table-description" class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
<table aria-describedby="table-description" class="table table-bordered" id="dataTable">
<thead>
<tr>
<th scope="col">Nama</th>
......
......@@ -21,7 +21,8 @@
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
<table class="table table-bordered" id="dataTable">
<caption>Materi yang Dilaporkan</caption>
<thead>
<tr>
<th scope="col">Judul</th>
......
{% 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">
{% extends 'administration/base_administrasi2.html' %}
{% block title %}
<title>Dasbor - Kelola Admin</title>
{% endblock %}
{% block content %}
<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="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">