]> git.ipfire.org Git - pbs.git/commitdiff
jobs: Fix the empty state of the job queue
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 23 Jan 2025 10:06:02 +0000 (10:06 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 23 Jan 2025 10:06:02 +0000 (10:06 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/templates/jobs/macros.html

index 50e865660c286c66eb96d8862aa58d4dc6ddb9e9..effdca8ddb5acb9ba5943ebfc458adabc016b640 100644 (file)
 
 {% macro JobQueue(jobs) %}
        <nav class="panel has-background-white">
-               {% set i = 0 %}
-
                {% for job in jobs %}
                        <a class="panel-block is-block {% if job.is_running() %}is-active{% endif %}"
                                        href="/builds/{{ job.build.uuid }}">
                                {% endif %}
                        </a>
 
-                       {% set i = i + 1 %}
-               {% endfor %}
-
                {# Show a message if there were no jobs #}
-               {% if i == 0 %}
+               {% else %}
                        <div class="notification has-text-centered">
                                {{ _("The job queue is empty") }}
                        </div>
-               {% endif %}
+               {% endfor %}
        </nav>
 {% endmacro %}