Fakultas Ilmu Komputer UI

forum_home.html 1.46 KB
Newer Older
Azhar Rais's avatar
Azhar Rais committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{% extends "base.html" %}
{% load static %}
{% block title %}Digipus Forum{% endblock %}
{% block header %}
    <link rel="icon" type="image/png" href="{% static 'images/icons/logo.ico' %}"/>
    <link rel="stylesheet" type="text/css" href="{% static 'forum/forum.css' %}"/>
{% endblock %}
{% block content %}
    <div class="container">
        <div class="row">
            <div class="col">
                <h1>Discussion Forum</h1>
                <a href="{% url 'forum_create_discussion' %}">
                    <button class="btn btn-outline-primary">Create Discussion</button>
                </a>
                <a href="{% url 'daftar_katalog' %}">
                    <button class="btn btn-outline-info">Home Page</button>
                </a>
            </div>
        </div>
        {% for discussion in page_obj %}
            <a href="{% url 'forum_discussion_detail' discussion.id %}">
                <div class="card my-3">
                    <div class="card-body">
                        <h5 class="card-title">{{ discussion.title }}</h5>
                        <p class="card-text">{{ discussion.user.name }} | Posted
                            at: {{ discussion.created_at|date:'d/m/Y H:i:s' }}</p>
                    </div>
                </div>
            </a>
        {% empty %}
            <h4 id="no-discussion">There is no discussion at the moment</h4>
        {% endfor %}
34
        {% include 'forum/forum_pagination.html' %}
Azhar Rais's avatar
Azhar Rais committed
35
36
    </div>
{% endblock content %}