Fakultas Ilmu Komputer UI

Commit c16ebe34 authored by Annisa Devi Nurmalasari's avatar Annisa Devi Nurmalasari
Browse files

[REFACTOR] Mengubah layout dan button katalog mainan

parent c63add5c
......@@ -13,6 +13,7 @@
<script defer src="https://use.fontawesome.com/releases/v5.0.13/js/fontawesome.js" integrity="sha384-6OIrr52G08NpOFSZdxxz1xdNSndlD4vdcf/q2myIUVO0VsqaGHJsB0RaBE01VTOY" crossorigin="anonymous"></script>
<title>Tambah Mainan - Admin Walkiddie Toys</title>
</head>
<body>
<div class="wrapper">
......@@ -42,7 +43,7 @@
<button class="btn btn-outline-dark" onclick="history.back()">Kembali</button>
</div>
<div class="col-auto">
<input type="submit" value="Simpan" class="btn btn-primary">
<input type="submit" value="Simpan" class="btn btn-secondary">
</div>
</div>
</form>
......@@ -50,7 +51,6 @@
</div>
</div>
{% include 'admin/components/admin_scripts.html' %}
</body>
</html>
\ No newline at end of file
......@@ -24,15 +24,17 @@
<div class="container">
<div class="d-flex justify-content-between">
<h1 class="mb-5">Katalog Mainan</h1>
<a href="{% url 'admin:add_mainan' %}"><button class="btn btn-secondary">Tambah mainan</button></a>
<a href="{% url 'admin:add_mainan' %}"><button class="btn btn-primary">Tambah mainan</button></a>
</div>
<div class="row row-cols-2 row-cols-md-5 gy-5">
{% for mainan in page.object_list %}
<div class="col">
{% include 'admin/mainan/mainan_card.html' with item=mainan %}
<div class="row">
<div class="list-mainan">
<ul class="cards">
{% for mainan in page.object_list %}
{% include 'admin/mainan/mainan_card.html' with item=mainan %}
{% endfor %}
</ul>
</div>
{% endfor %}
</div>
<div class="row mt-4">
......@@ -41,7 +43,6 @@
</div>
</div>
</div>
{% include 'admin/components/admin_scripts.html' %}
</body>
......
<div class="card">
<a href="{% url 'admin:read_mainan' mainan.id %}">
<img width="18rem" src="{{mainan.gambar_mainan.url}}" class="card-img-top" alt="Gambar mainan">
</a>
<div class="card-body">
<li class="card-item">
<div class="card">
<div class="card-image"><img src="{{mainan.gambar_mainan.url}}"></div>
<div class="card-content">
<h5 class="card-title">{{mainan.nama_mainan}}</h5>
<h6 class="card-subtitle mb-2 text-muted">Rp {{mainan.get_formatted_harga}}</h6>
<p class="card-text">{{mainan.deskripsi_mainan|truncatechars:50}}</p>
<div class="col-sm-12 text-center">
<div class="mb-2">
<a href="{% url 'admin:update_mainan' mainan.id %}">
<button class="btn btn-secondary btn-md center-block">Update Mainan</button>
</a>
</div>
<div class="mb-2">
<p class="card-text">{{mainan.deskripsi_mainan|truncatechars:25}}</p>
<div class="d-flex justify-content-center mt-5">
<div>
<a href="{% url 'admin:delete_mainan' mainan.id %}">
<button class="btn btn-danger btn-md center-block">Delete Mainan</button>
<button class="btn btn-danger">Delete Mainan</button>
</a>
<a href="{% url 'admin:update_mainan' mainan.id %}">
<button class="btn btn-primary">Update Mainan</button>
</a>
</div>
</div>
</div>
</div>
\ No newline at end of file
</div>
</li>
\ No newline at end of file
......@@ -42,7 +42,7 @@
<button class="btn btn-outline-dark" onclick="history.back()">Kembali</button>
</div>
<div class="col-auto">
<input type="submit" value="Simpan" class="btn btn-primary">
<input type="submit" value="Simpan" class="btn btn-secondary">
</div>
</div>
......@@ -51,7 +51,6 @@
</div>
</div>
{% include 'admin/components/admin_scripts.html' %}
</body>
</html>
\ No newline at end of file
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