Files
project-managment/templates/pages/tickets/ticket_list.html
T
sankalp 001e6fac48 feat(templates): add core UItemplates for authentication and ticket management
New Features
- Added `templates/base.html` with Tailwind, HTMX, and project management title block.
- Introduced `templates/base/base.html` as a minimal fallback layout.
- Created `templates/components/navbar.html` with authenticated navigation menu.
- Implemented `templates/pages/accounts/login.html` for user authentication.
- Developed ticket management templates:
  - `templates/pages/tickets/ticket_list.html` for displaying tickets.
  - `templates/pages/tickets/ticket_form.html` for creating/editing tickets.

Enhancements
- Structured all new templates to inherit from the shared base layout.
- Integrated Tailwind CSS and HTMX via CDN for consistent styling and interactivity.
- Provided placeholder blocks for extra head and scripts to allow future extensions.

Bug Fixes- No bug fixes included in this commit.
2026-05-27 23:32:54 +05:45

30 lines
1.3 KiB
HTML

{% extends "base.html" %}
{% block title %}Tickets{% endblock %}
{% block content %}
<div class="flex justify-between items-center mb-4">
<h1 class="text-3xl font-bold">Tickets</h1>
<a href="{% url 'ticket_create' %}" class="btn btn-primary">New Ticket</a>
</div>
<div class="overflow-x-auto">
<table class="table table-zebra">
<thead>
<tr><th>Title</th><th>Type</th><th>Status</th><th>Project</th><th>Creator</th><th>Created</th></tr>
</thead>
<tbody>
{% for ticket in tickets %}
<tr>
<td><a href="{% url 'ticket_detail' ticket.pk %}" class="link link-hover">{{ ticket.title }}</a></td>
<td><span class="badge badge-{% if ticket.ticket_type == 'bug' %}error{% elif ticket.ticket_type == 'feature_request' %}info{% else %}neutral{% endif %}">{{ ticket.get_ticket_type_display }}</span></td>
<td>{{ ticket.get_status_display }}</td>
<td>{{ ticket.project.name|default:"-" }}</td>
<td>{{ ticket.creator.username }}</td>
<td>{{ ticket.created_at|date:"Y-m-d" }}</td>
</tr>
{% empty %}
<tr><td colspan="6" class="text-center">No tickets found.</td></tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}