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
b43ebe3e
Commit
b43ebe3e
authored
Oct 02, 2020
by
insan ramadhan
Browse files
1906457480-105 add request material feature
parent
b5126bfc
Changes
6
Hide whitespace changes
Inline
Side-by-side
app/migrations/0015_reqmaterial.py
0 → 100644
View file @
b43ebe3e
# Generated by Django 3.0.3 on 2020-10-01 04:23
from
django.db
import
migrations
,
models
import
django.utils.timezone
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'app'
,
'0014_rating'
),
]
operations
=
[
migrations
.
CreateModel
(
name
=
'ReqMaterial'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'title'
,
models
.
CharField
(
max_length
=
100
)),
(
'timestamp'
,
models
.
DateTimeField
(
default
=
django
.
utils
.
timezone
.
now
)),
],
),
]
app/models.py
View file @
b43ebe3e
...
...
@@ -83,6 +83,10 @@ class Like(models.Model):
timestamp
=
models
.
DateTimeField
(
default
=
timezone
.
now
)
session_id
=
models
.
CharField
(
max_length
=
32
,
blank
=
False
)
class
ReqMaterial
(
models
.
Model
):
title
=
models
.
CharField
(
max_length
=
100
)
timestamp
=
models
.
DateTimeField
(
default
=
timezone
.
now
)
class
ViewStatistics
(
models
.
Model
):
materi
=
models
.
ForeignKey
(
...
...
app/templates/app/katalog_materi.html
View file @
b43ebe3e
...
...
@@ -62,6 +62,7 @@
</div>
<button
type=
"submit"
class=
"btn btn-cari"
>
Cari
</button>
</form>
<p
class=
"pageTitle"
>
Tidak menemukan materi yang kamu cari ? ajukan permintaan materi kami
<a
href=
"/req-materi"
>
disini
</a></p>
</div>
</div>
</div>
...
...
app/templates/req_materi.html
0 → 100644
View file @
b43ebe3e
{% extends "base.html" %}
{% load static %}
{% block title %}Digipus Home{% endblock %}
{% block header %}
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<title>
Digipus Home
</title>
<meta
charset=
"UTF-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{% static 'app/css/katalog_materi.css' %}"
>
<!-- Bootstrap core CSS -->
<link
href=
"../../static/app/vendor/bootstrap/css/bootstrap.min.css"
rel=
"stylesheet"
>
<!-- Custom styles for this template -->
<link
href=
"../../static/app/css/heroic-features.css"
rel=
"stylesheet"
>
<!--===============================================================================================-->
<link
rel=
"icon"
type=
"image/png"
href=
"{% static 'images/icons/logo.ico' %}"
/>
<!--===============================================================================================-->
<!--===============================================================================================-->
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{% static 'fonts/font-awesome-4.7.0/css/font-awesome.min.css' %}"
>
<!--===============================================================================================-->
<!--===============================================================================================-->
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{% static 'vendor/animate/animate.css' %}"
>
<!--===============================================================================================-->
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{% static 'vendor/css-hamburgers/hamburgers.min.css' %}"
>
<!--===============================================================================================-->
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{% static 'vendor/animsition/css/animsition.min.css' %}"
>
<!--===============================================================================================-->
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{% static 'vendor/select2/select2.min.css' %}"
>
<!--===============================================================================================-->
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{% static 'vendor/daterangepicker/daterangepicker.css' %}"
>
<!--===============================================================================================-->
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{% static 'css/styles.css' %}"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{% static 'css/util.css' %}"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{% static 'css/main.css' %}"
>
<!--===============================================================================================-->
{% endblock header %}
{% block content %}
</head>
<body
style=
"background-color: #f8f8f8;"
>
<!-- Page Content -->
<div
class=
"container"
>
<header
class=
"jumbotron my-4"
>
<div
class=
"container"
>
<div
class=
"row header"
>
<div
class=
"col"
>
<h2
class=
"pageTitle"
>
Permintaan materi!
</h2>
{% if user %}
<p
class=
"description"
>
Tuliskan judul materi yang kamu mau
</p>
{% else %}
<p
class=
"description"
>
Tuliskan judul materi yang kamu mau, anda harus login terlebih dahulu untuk melakukan permintaan
</p>
{% endif %}
<form
class=
"searchBar"
>
{% csrf_token %}
<div
class=
"col-6 form-group"
>
<input
type=
"text"
name=
'search'
class=
"form-control"
placeholder=
"Tulis di sini"
id=
"title"
value=
""
required
>
</div>
<button
id=
"btn_req_submit"
style=
"width: auto;padding-left: 10px;padding-right: 10px;"
class=
"btn btn-cari"
>
Kirim Permintaan
</button>
</form>
<p
id=
"msg"
style=
"display: none;margin: 5px"
>
Permintaan berhasil dikirim
</p>
</div>