Files
project-managment/templates/pages/issues/issue_detail.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

36 lines
1.9 KiB
HTML

{% extends "base.html" %}
{% block title %}{{ issue.title }}{% endblock %}
{% block content %}
<div class="card bg-base-100 shadow-xl mb-4">
<div class="card-body">
<div class="flex justify-between items-start">
<div>
<h1 class="text-3xl font-bold">{{ issue.title }}</h1>
<p class="mt-2">Project: <a href="{% url 'project_detail' issue.project.pk %}" class="link">{{ issue.project.name }}</a></p>
</div>
<a href="{% url 'issue_edit' issue.pk %}" class="btn btn-sm btn-ghost">Edit</a>
</div>
<div class="flex gap-2 mt-2">
<span class="badge badge-{% if issue.status == 'open' %}info{% elif issue.status == 'in_progress' %}warning{% elif issue.status == 'resolved' %}success{% else %}neutral{% endif %}">{{ issue.get_status_display }}</span>
<span class="badge badge-{% if issue.priority == 'high' %}error{% elif issue.priority == 'medium' %}warning{% else %}info{% endif %}">{{ issue.get_priority_display }}</span>
</div>
<p class="mt-4">{{ issue.description|linebreaks }}</p>
<p class="text-sm opacity-60 mt-2">Reporter: {{ issue.reporter.username }} | Assignee: {{ issue.assignee.username|default:"Unassigned" }}</p>
</div>
</div>
<div class="card bg-base-100 shadow-xl">
<div class="card-body">
<h3 class="card-title">Comments</h3>
<div id="comment-list" hx-swap-oob="true">
{% include "partials/issues/comment_list.html" %}
</div>
<form method="post" action="{% url 'issue_comment' issue.pk %}"
hx-target="#comment-list" hx-swap="outerHTML">
{% csrf_token %}
<textarea name="body" class="textarea textarea-bordered w-full" placeholder="Add a comment..." required></textarea>
<button type="submit" class="btn btn-primary btn-sm mt-2">Comment</button>
</form>
</div>
</div>
{% endblock %}