Fakultas Ilmu Komputer UI

kelola_materi.html 2.35 KB
Newer Older
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
{% extends 'administration/base_administrasi2.html' %}
{% load static %}

{% block title %}
<title>Kelola Admin | Digipus</title>
{% endblock %}

{% block content %}
<!-- Page Heading -->
<h1 class="h3 mb-2 text-gray-800">Kelola Admin</h1>
<p class="mb-4">Tekan tombol detail untuk informasi lebih lanjut tentang admin</ehp>

<!-- DataTales Example -->
<div class="card shadow mb-4">
  <div class="card-header py-3">
    <div class="d-flex">
      <div class="mr-auto p-2">
        <h6 id="table-description" class="m-0 font-weight-bold text-primary">Tabel Daftar Approved Material</h6>
      </div>
    </div>
  </div>
  <div class="card-body">
    <div class="table-responsive">
      <table aria-describedby="table-description" class="table table-bordered" id="dataTable">
        <thead>
          <tr>
            <th scope="col">Title</th>
            <th scope="col">Cover</th>
            <th scope="col">Content</th>
            <th scope="col">Kontributor</th>
            <th scope="col">Status</th>
            <th scope="col">Jumlah Like</th>
33
            <th scope="col">Pilihan</th>
34
35
36
37
38
39
40
41
42
43
          </tr>
        </thead>
        <tfoot>
          <tr>
            <th scope="col">Title</th>
            <th scope="col">Cover</th>
            <th scope="col">Content</th>
            <th scope="col">Kontributor</th>
            <th scope="col">Status</th>
            <th scope="col">Jumlah Like</th>
44
            <th scope="col">Pilihan</th>
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
          </tr>
          </tr>
        </tfoot>
        <tbody>
          {% for materi in materi_list %}
          <tr>
            <td>{{ materi.title }}</td>
            <td>
              {% if materi.cover %}
              <img id="posts-img" src="{{ materi.cover.url }}" alt="cover-picture" style="max-width: 400px;"/>
              {% endif %}
            </td>
            <td>
              <a href="/materi/{{materi.id}}/view">Lihat konten</a></td>
            <td>{{ materi.uploader }}</td>
            <td>{{ materi.status }}</td>
            <td>{{ materi.like_count }}</td>
62
63
64
65
66
            <td>
              {% if not materi.deleted_at %}<a type="button" href="/materi/{{materi.id}}/delete" class="reject-button button-decoration"
              style="background-color:red">Hapus</a>
              {% endif %}
            </td>
67
68
69
70
71
72
73
74
          </tr>
          {% endfor %}
        </tbody>
      </table>
    </div>
  </div>
</div>
{% endblock %}