Files
project-managment/templates/pages/issues/issue_list.html
T
sankalp 0537ea5e5e feat(templates): enrichUI with Tailwind styling and messaging component improvements
- Add custom border, background, and spacing utilities to base template
- Enhance message notification styling and layout
- Update delete modal button appearance and behavior
- Refine comment card component with Tailwind classes and responsive behavior
- Adjust sidebar responsiveness for mobile view
2026-05-28 00:51:41 +05:45

69 lines
4.1 KiB
HTML

{% extends "base_authenticated.html" %}
{% block title %}Issues{% endblock %}
{% block content_inner %}
<div class="flex items-center justify-between mb-6">
<div>
<h1 class="text-2xl font-bold text-primary">Issues</h1>
<p class="text-tertiary mt-1">Track bugs, features, and tasks.</p>
</div>
<a href="{% url 'issue_create' %}" class="px-3 py-1.5 rounded-lg text-sm font-medium bg-blue-600 text-white hover:bg-blue-700 transition-colors">
<svg class="w-4 h-4 mr-1 inline" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"/></svg>
New Issue
</a>
</div>
<div class="card-surface overflow-hidden">
<div class="overflow-x-auto">
<table class="w-full text-sm">
<thead>
<tr class="text-xs font-semibold text-muted uppercase tracking-wider bg-hover">
<th class="px-4 py-3 text-left">Title</th>
<th class="px-4 py-3 text-left">Project</th>
<th class="px-4 py-3 text-left">Status</th>
<th class="px-4 py-3 text-left">Priority</th>
<th class="px-4 py-3 text-left">Assignee</th>
<th class="px-4 py-3 text-left">Created</th>
{% if user.is_admin %}<th class="px-4 py-3 text-left">Actions</th>{% endif %}
</tr>
</thead>
<tbody>
{% for issue in issues %}
<tr class="hover:bg-hover transition-colors border-t border-subtle">
<td class="px-4 py-3">
<a href="{% url 'issue_detail' issue.pk %}" class="font-medium text-primary hover:text-blue-600">{{ issue.title }}</a>
</td>
<td class="px-4 py-3 text-secondary">{{ issue.project.name }}</td>
<td class="px-4 py-3">
<span class="text-xs px-2 py-1 rounded-full font-medium border {% if issue.status == 'open' %}bg-blue-50 text-blue-700 border-blue-200{% elif issue.status == 'in_progress' %}bg-amber-50 text-amber-700 border-amber-200{% elif issue.status == 'resolved' %}bg-green-50 text-green-700 border-green-200{% else %}bg-gray-50 text-gray-700 border-gray-200{% endif %}">
{{ issue.get_status_display }}
</span>
</td>
<td class="px-4 py-3">
<span class="text-xs px-2 py-1 rounded-full font-medium border {% if issue.priority == 'high' %}bg-red-50 text-red-700 border-red-200{% elif issue.priority == 'medium' %}bg-amber-50 text-amber-700 border-amber-200{% else %}bg-blue-50 text-blue-700 border-blue-200{% endif %}">
{{ issue.get_priority_display }}
</span>
</td>
<td class="px-4 py-3 text-secondary">{{ issue.assignee.username|default:"-" }}</td>
<td class="px-4 py-3 text-tertiary">{{ issue.created_at|date:"M d" }}</td>
{% if user.is_admin %}
<td class="px-4 py-3">
<label for="delete-issue-{{ issue.pk }}" class="px-3 py-1.5 rounded-lg text-sm font-medium bg-red-50 text-red-700 hover:bg-red-100 border border-red-200 transition-colors cursor-pointer">Delete</label>
</td>
{% endif %}
</tr>
{% empty %}
<tr><td colspan="{% if user.is_admin %}7{% else %}6{% endif %}" class="text-center py-12 text-tertiary">No issues found.</td></tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% if user.is_admin %}
{% for issue in issues %}
{% with issue_id=issue.pk|stringformat:"s" %}
{% url 'issue_delete' issue.pk as delete_url %}
{% include "components/delete_modal.html" with modal_id="delete-issue-"|add:issue_id title="Delete Issue" message="Are you sure you want to delete this issue? This action cannot be undone." delete_url=delete_url %}
{% endwith %}
{% endfor %}
{% endif %}
{% endblock %}