Fakultas Ilmu Komputer UI

Commit fb620c4d authored by Saul Andre's avatar Saul Andre
Browse files

Merge branch 'PBI-Daftar_Komentar' into 'staging'

Pbi daftar komentar

See merge request ppl-fasilkom-ui/2020/ppl-c/diskominfo-depok-digipus/marjinal-digipus!55
parents 65fa64d8 d128e74c
......@@ -10,7 +10,8 @@
.comment {
border-bottom: 1px solid #d4d4d4;
}
.comment .user .profile {
.comment .headline .profile {
display: inline-block;
height: 25px;
width: 25px;
......@@ -18,7 +19,13 @@
border-radius: 50%;
margin-right: 10px;
}
.headline .timestamp {
font-size: 15px;
}
.comment .text {
padding-left: 20px;
}
.comment .link {
font-size: 15px;
color: #615cfd;
}
body{
font-family: 'Poppins', sans-serif;
body {
font-family: "Poppins", sans-serif;
}
.container{
margin-top: 20px;
.container {
margin-top: 20px;
}
.bg{
background-color: #f8f9fc
.bg {
background-color: #f8f9fc;
}
.brand-link {
color: inherit;
color: inherit;
}
.brand-link:hover,
.brand-link:active {
text-decoration: none;
color: inherit;
text-decoration: none;
color: inherit;
}
.detail-materi-color {
color: black;
}
.row{
}
.materi-data{
background-color: #ffffff;
}
.cover{
max-width: 300px;
}
.category-wrapper{
display: flex;
flex-direction: row;
}
.cover img{
width: 100%;
}
.book p, h2 {
margin: 0
}
.info-wrapper{
margin-top: 20px;
}
.info{
margin: 10px 0;
border-bottom: 1px solid #d4d4d4;
display: flex;
flex-direction: row;
}
.info .col{
padding: 0;
}
.btn-book {
background-color: #ffffff;
color: #615CFD;
}
.btn-book:hover {
color: #615CFD;
}
.menu-wrapper{
display: flex;
flex-direction: column;
}
.menu-wrapper .col{
padding: 0;
}
.menu-wrapper .navbar {
}
.menu-wrapper .nav-link {
color: #bbbbbb;
}
.nav-item :hover{
color: #615CFD;
}
.menu-wrapper .nav-item{
padding: 5px 0;
}
.description-wrapper{
border-bottom: 1px solid #d4d4d4;
margin-bottom: 10px;
}
.comment{
border-bottom: 1px solid #d4d4d4;
}
.comment .user .profile{
display: inline-block;
height: 25px;
width: 25px;
background-color: #bbb;
border-radius: 50%;
margin-right: 10px;
}
.comment .text{
padding-left: 20px;
}
\ No newline at end of file
color: black;
}
.row {
}
.materi-data {
background-color: #ffffff;
}
.cover {
max-width: 300px;
}
.category-wrapper {
display: flex;
flex-direction: row;
}
.cover img {
width: 100%;
}
.book p,
h2 {
margin: 0;
}
.info-wrapper {
margin-top: 20px;
}
.info {
margin: 10px 0;
border-bottom: 1px solid #d4d4d4;
display: flex;
flex-direction: row;
}
.info .col {
padding: 0;
}
.btn-book {
background-color: #ffffff;
color: #615cfd;
}
.btn-book:hover {
color: #615cfd;
}
.menu-wrapper {
display: flex;
flex-direction: column;
}
.menu-wrapper .col {
padding: 0;
}
.menu-wrapper .navbar {
}
.menu-wrapper .nav-link {
color: #bbbbbb;
}
.nav-item :hover {
color: #615cfd;
}
.menu-wrapper .nav-item {
padding: 5px 0;
}
.description-wrapper {
border-bottom: 1px solid #d4d4d4;
margin-bottom: 10px;
}
.comment {
border-bottom: 1px solid #d4d4d4;
}
.comment .user .profile {
display: inline-block;
height: 25px;
width: 25px;
background-color: #bbb;
border-radius: 50%;
margin-right: 10px;
}
.timestamp {
font-size: 15px;
}
.comment .text {
padding-left: 20px;
}
{% extends 'base.html' %}
{% load static %}
{% load static %} {% load humanize %}
{% block header %}
<link href="{% static 'css/sb-admin-2.min.css' %}" rel="stylesheet">
......@@ -177,6 +177,12 @@
<span style="background-color: #{{comment.profile}}" class="profile p-1 bd-highligh"></span>
{% endif %}
<p class="p-1 bd-highligh m-0"><b>{{comment.user.name}}</b></p>
<p class="p-1 bd-highligh m-0"></p>
<p
class="timestamp p-1 bd-highligh m-0 text-muted"
>
{{ comment.timestamp|naturaltime }}
</p>
{% if user.is_admin %}
<a class="ml-auto p-1 bd-highlight close" href="{% url 'delete-comment' materi_data.id comment.id %}">
<span aria-hidden="true">&times;</span>
......
{% load static %}
{% load static %} {% load humanize %}
<!DOCTYPE html>
<html lang="en">
<head>
......@@ -193,6 +193,7 @@
<div
class="row comments shadow p-3 mb-3 bg-white rounded d-flex flex-column bd-highlight"
>
{% if comments%}
<p class="h4 mb-3 bd-highlight">Komentar</p>
<div class="comments">
{% for comment in comments %}
......@@ -200,7 +201,7 @@
class="comment shadow-sm p-3 mb-1 bg-white rounded bd-highlight"
>
<div
class="d-flex bd-highlight mb-3 align-items-center user"
class="d-flex bd-highlight mb-3 align-items-center headline"
>
{% if comment.user != Null %}
<img
......@@ -217,20 +218,25 @@
<p class="p-1 bd-highligh m-0">
<b>{{comment.user.name}}</b>
</p>
{% if user.is_admin %}
<p class="p-1 bd-highligh m-0"></p>
<p
class="timestamp p-1 bd-highligh m-0"
>
{{ comment.timestamp|naturaltime }}
</p>
<a
class="ml-auto p-1 bd-highlight close"
href="{% url 'delete-comment' materi_data.id comment.id %}"
class="ml-auto p-1 bd-highlight link"
href="{% url 'detail-materi' comment.materi.id %}"
>Lihat Materi</a
>
<span aria-hidden="true"
>&times;</span
>
</a>
{% endif %}
</div>
<p class="text">{{comment.comment}}</p>
</div>
{% endfor %}
{% endfor %} {% else %}
<p class="h5">
Belum ada komentar
</p>
{% endif %}
</div>
</div>
</div>
......
......@@ -40,6 +40,7 @@ INSTALLED_APPS = [
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.staticfiles",
'django.contrib.humanize',
"authentication.apps.AuthenticationConfig",
"app.apps.AppConfig",
"register.apps.RegisterConfig",
......
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