minor update
This commit is contained in:
@@ -13,7 +13,6 @@
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Title</th>
|
||||
<th>Category</th>
|
||||
<th>Reported By</th>
|
||||
<th>Status</th>
|
||||
<th>Created At</th>
|
||||
@@ -25,7 +24,6 @@
|
||||
<tr>
|
||||
<td>{{ forloop.counter }}</td>
|
||||
<td>{{ issue.title }}</td>
|
||||
<td>{{ issue.category.name|default:"—" }}</td>
|
||||
<td>{{ issue.reporter.username }}</td>
|
||||
<td>
|
||||
{% if issue.status == "reported" %}
|
||||
|
||||
@@ -20,12 +20,12 @@
|
||||
</option>
|
||||
</select>
|
||||
|
||||
<select name="category" class="form-select">
|
||||
<option value="">All Categories</option>
|
||||
{% for cat in categories %}
|
||||
{% with cat.id|stringformat:"s" as cat_id %}
|
||||
<option value="{{ cat_id }}" {% if request.GET.category|default:'' == cat_id %}selected{% endif %}>
|
||||
{{ cat.name }}
|
||||
<select name="department" class="form-select">
|
||||
<option value="">All Departments</option>
|
||||
{% for dept in departments %}
|
||||
{% with dept.id|stringformat:"s" as dept_id %}
|
||||
<option value="{{ dept_id }}" {% if request.GET.department|default:'' == dept_id %}selected{% endif %}>
|
||||
{{ dept.name }}
|
||||
</option>
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
@@ -52,12 +52,22 @@
|
||||
{% endif %}
|
||||
|
||||
<div class="card-body d-flex flex-column">
|
||||
<!-- Category Badge -->
|
||||
<span
|
||||
class="badge bg-{% if issue.category.name == 'Roads' %}warning text-dark{% elif issue.category.name == 'Sanitation' %}success{% else %}info{% endif %} mb-2">
|
||||
{{ issue.category.name|default:"General" }}
|
||||
<!-- Department Badge -->
|
||||
<span class="badge
|
||||
{% if issue.department.name == 'Roads & Transportation' %} bg-primary
|
||||
{% elif issue.department.name == 'Sanitation & Waste Management' %} bg-success
|
||||
{% elif issue.department.name == 'Public Safety' %} bg-danger
|
||||
{% elif issue.department.name == 'Water & Sewage' %} bg-info text-dark
|
||||
{% elif issue.department.name == 'Parks & Recreation' %} bg-warning text-dark
|
||||
{% elif issue.department.name == 'Electricity & Utilities' %} bg-dark
|
||||
{% elif issue.department.name == 'Environmental Services' %} bg-secondary
|
||||
{% elif issue.department.name == 'Public Works' %} bg-teal text-white
|
||||
{% else %} bg-light text-dark
|
||||
{% endif %} mb-2">
|
||||
{{ issue.department.name|default:"General" }}
|
||||
</span>
|
||||
|
||||
|
||||
<!-- Title + Description -->
|
||||
<h5 class="card-title">{{ issue.title|truncatewords:6 }}</h5>
|
||||
<p class="card-text text-muted flex-grow-1">
|
||||
@@ -86,7 +96,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card-footer bg-transparent d-flex justify-content-between align-items-center">
|
||||
<small
|
||||
class="text-{% if issue.status == 'resolved' %}success{% elif issue.status == 'in_progress' %}warning{% else %}info{% endif %}">
|
||||
@@ -100,7 +110,7 @@
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% empty %}
|
||||
|
||||
Reference in New Issue
Block a user