]> git.ipfire.org Git - pbs.git/commitdiff
jobs: Show a message if the queue is empty
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 23 Jan 2025 09:56:01 +0000 (09:56 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 23 Jan 2025 09:56:01 +0000 (09:56 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/templates/jobs/macros.html

index a5c34a83901a7ebc41e6d8cb6f460d1b222dffd3..50e865660c286c66eb96d8862aa58d4dc6ddb9e9 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 }}">
                                        </span>
                                {% endif %}
                        </a>
+
+                       {% set i = i + 1 %}
                {% endfor %}
+
+               {# Show a message if there were no jobs #}
+               {% if i == 0 %}
+                       <div class="notification has-text-centered">
+                               {{ _("The job queue is empty") }}
+                       </div>
+               {% endif %}
        </nav>
 {% endmacro %}