feat(templates/partials): add issue comment list and kanban card partials
Add partial templates for rendering issue comments and Kanban cards. Details: - New Features - Add `comment_list.html` to display comment author, timestamp, and body. - Add `kanban/card.html` for draggable Kanban card UI with edit link and due date.
This commit is contained in:
2 files changed
+24
No files matched your search
@@ -0,0 +1,8 @@
|
||||
{% for comment in comments %}
|
||||
<div class="border-b border-base-300 py-2">
|
||||
<p class="text-sm"><strong>{{ comment.author.username }}</strong> <span class="text-xs opacity-50">{{ comment.created_at|timesince }} ago</span></p>
|
||||
<p>{{ comment.body }}</p>
|
||||
</div>
|
||||
{% empty %}
|
||||
<p class="text-sm opacity-50">No comments yet.</p>
|
||||
{% endfor %}
|
||||
@@ -0,0 +1,16 @@
|
||||
<div class="card bg-base-200 shadow-sm cursor-move" draggable="true"
|
||||
id="card-{{ card.pk }}"
|
||||
hx-post="{% url 'card_move' card.pk %}"
|
||||
hx-trigger="end"
|
||||
hx-target="#column-{{ card.column.pk }}"
|
||||
hx-swap="innerHTML">
|
||||
<div class="card-body p-2 text-sm">
|
||||
<div class="flex justify-between items-start">
|
||||
<span>{{ card.title }}</span>
|
||||
<a href="{% url 'card_edit' card.pk %}" class="text-xs opacity-50 hover:opacity-100">edit</a>
|
||||
</div>
|
||||
{% if card.due_date %}
|
||||
<span class="text-xs opacity-60">Due: {{ card.due_date }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
Reference in new issue
Block a user