bootstrap5_admin-1.0.1/templates/layout/maintenance-task-list.html.twig
templates/layout/maintenance-task-list.html.twig
{#
/**
* @file
* Theme override for a list of maintenance tasks to perform.
*
* Available variables:
* - tasks: A list of maintenance tasks to perform. Each item in the list has
* the following variables:
* - item: The maintenance task.
* - attributes: HTML attributes for the maintenance task.
* - status: (optional) Text describing the status of the maintenance task,
* 'active' or 'done'.
*/
#}
{# cspell:ignore classtask #}
<h2 class="visually-hidden">{{ 'Installation tasks'|t }}</h2>
<ol class="task-list list-group list-group-flush">
{% for task in tasks %}
{% set classtask = 'list-group-item list-group-item-action' %}
{% if task.attributes.hasClass('done') %}
{% set classtask = classtask ~ ' disabled' %}
{% endif %}
{% if task.attributes.hasClass('is-active') %}
{% set classtask = classtask ~ ' active' %}
{% endif %}
<li{{ task.attributes.addClass(classtask) }}>
{{ task.item }}
{% if task.status %}<span class="visually-hidden"> ({{ task.status }})</span>{% endif %}
</li>
{% endfor %}
</ol>
