Added function to entry remove categories
This commit is contained in:
36
App/Views/Data/kategori.html
Normal file
36
App/Views/Data/kategori.html
Normal file
@@ -0,0 +1,36 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Kategori{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<p>List Kategori:</p>
|
||||
<ul>
|
||||
{% for cat in categories %}
|
||||
<li>{{ cat.category }}
|
||||
<form method="post">
|
||||
<input type="hidden" name="id" value="{{ cat.id }}">
|
||||
<input type="hidden" name="_method" value="delete">
|
||||
<input type="hidden" name="_addon" value="kategori">
|
||||
<input type="hidden" name="_token" value="{{ token }}">
|
||||
|
||||
<button type="submit">Remove</button>
|
||||
</form>
|
||||
</li><br>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<form method="post">
|
||||
<label for="category">Tambah</label>
|
||||
<input type="text" name="category" value="" placeholder="Kategori">
|
||||
|
||||
<input type="hidden" name="_method" value="post">
|
||||
|
||||
<input type="hidden" name="_addon" value="kategori">
|
||||
|
||||
<input type="hidden" name="_token" value="{{ token }}">
|
||||
|
||||
<button type="submit">Entry</button>
|
||||
</form>
|
||||
|
||||
</form>
|
||||
{% endblock %}
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
{% if status %}
|
||||
<a href="/posts/entry">+ Tambah Pengumuman</a>
|
||||
<a href="/posts/category">+ Tambah Kategori</a>
|
||||
<a href="/logout">Logout</a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user