Initials
This commit is contained in:
7
templates/master_data/event_type_confirm_delete.html
Normal file
7
templates/master_data/event_type_confirm_delete.html
Normal file
@@ -0,0 +1,7 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block content %}
|
||||
<h3>Delete Category</h3>
|
||||
<p>Are you sure you want to delete <strong>{{ object.event_type }}</strong>?</p>
|
||||
<form method="post">{% csrf_token %}<button class="btn btn-danger">Yes, delete</button>
|
||||
<a class="btn btn-secondary" href="{% url 'master_data:event_type_list' %}">Cancel</a></form>
|
||||
{% endblock %}
|
||||
9
templates/master_data/event_type_form.html
Normal file
9
templates/master_data/event_type_form.html
Normal file
@@ -0,0 +1,9 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block content %}
|
||||
<h3>{% if object %}Edit{% else %}Add{% endif %} Category</h3>
|
||||
<form method="post">{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<button class="btn btn-primary">Save</button>
|
||||
<a class="btn btn-secondary" href="{% url 'master_data:event_type_list' %}">Cancel</a>
|
||||
</form>
|
||||
{% endblock %}
|
||||
24
templates/master_data/event_type_list.html
Normal file
24
templates/master_data/event_type_list.html
Normal file
@@ -0,0 +1,24 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block content %}
|
||||
<div class="d-flex justify-content-between mb-3">
|
||||
<h3>Event Categories</h3>
|
||||
<a class="btn btn-success" href="{% url 'master_data:event_type_add' %}">Add Category</a>
|
||||
</div>
|
||||
<table class="table table-striped">
|
||||
<thead><tr><th>#</th><th>Event Type</th><th>Actions</th></tr></thead>
|
||||
<tbody>
|
||||
{% for c in categories %}
|
||||
<tr>
|
||||
<td>{{ forloop.counter }}</td>
|
||||
<td>{{ c.event_type }}</td>
|
||||
<td>
|
||||
<a class="btn btn-sm btn-primary" href="{% url 'master_data:event_type_edit' c.pk %}">Edit</a>
|
||||
<a class="btn btn-sm btn-danger" href="{% url 'master_data:event_type_delete' c.pk %}">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr><td colspan="3">No categories yet.</td></tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user