1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{# Static card structure. When `task` is provided and truthy, title and meta are filled (server); otherwise empty for template clone / JS fill. #}
<div class="card board-card mb-2 draggable" data-task-ref="{{ task.ref if task else '' }}" data-task-status="{{ (task.status or 'TODO') if task else 'TODO' }}" draggable="true">
<div class="card-body py-2 px-3">
<div class="board-card-title fw-medium text-truncate"{% if task %} title="{{ task.title }}"{% endif %}>{% if task %}{{ task.title or 'Untitled' }}{% endif %}</div>
<div class="board-card-description small text-muted mt-1 text-truncate">{% if task and task.description %}{{ task.description }}{% else %}{% endif %}</div>
<div class="board-card-meta d-flex align-items-center gap-1 mt-1 small text-muted">
{% if task %}
{% if task.priority and task.priority != 'LOW' %}
<span class="badge badge-outline text-{{ 'danger' if task.priority == 'CRITICAL' else 'warning' if task.priority == 'HIGH' else 'secondary' }}">{{ task.priority }}</span>
{% else %}
<span class="badge badge-outline text-secondary">LOW</span>
{% endif %}
{% if task.assignee %}
<span class="text-truncate">{{ task.assignee }}</span>
{% else %}
<span class="text-truncate">None</span>
{% endif %}
{% if task.comments_count %}
<span class="ms-auto">{{ task.comments_count }} comment{{ 's' if task.comments_count != 1 else '' }}</span>
{% else %}
<span class="ms-auto">0 comments</span>
{% endif %}
{% else %}
<span class="badge badge-outline text-secondary">LOW</span>
<span class="text-truncate">None</span>
<span class="ms-auto">0 comments</span>
{% endif %}
</div>
</div>
</div>