This commit is contained in:
Vivek P Prakash
2025-11-27 11:53:46 +05:30
commit aa40080012
50 changed files with 1135 additions and 0 deletions

View 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 %}

View 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 %}

View 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 %}