Files
symfony-k3s/templates/braindump/_task_result.html.twig
T

30 lines
1.3 KiB
Twig

{% if error|default(null) %}
<p class="brain-dump-feedback brain-dump-feedback--error" role="alert">{{ error }}</p>
{% elseif tasks is empty %}
<p>No tasks were suggested.</p>
{% else %}
<h2>Suggested tasks</h2>
<ul class="suggested-tasks">
{% for task in tasks %}
<li>
<article>
<div class="summary">
<h3>{{ task.title }}</h3>
{% if task.description %}<p>{{ task.description }}</p>{% endif %}
</div>
<div class="info">
<ul>
<li><span>Duration</span><span>{{ task.estimatedDurationMinutes }} minutes</span></li>
<li><span>Priority</span><span>{{ task.priority|capitalize }}</span></li>
{% if task.category %}<li><span>Category</span><span>{{ task.category }}</span></li>{% endif %}
</ul>
</div>
{% if task.subtasks is not empty %}
<p><strong>Subtasks:</strong> {{ task.subtasks|map(subtask => subtask.title)|join(', ') }}</p>
{% endif %}
</article>
</li>
{% endfor %}
</ul>
{% endif %}