Fixes #17700: Fix warning when no scripts are found within a script module

This commit is contained in:
Jeremy Stretch 2024-10-29 17:28:29 -04:00
parent 5f94dff815
commit f00a93c066

View File

@ -37,7 +37,8 @@
{% endif %}
</div>
</h2>
{% if module.scripts %}
{% with scripts=module.scripts.all %}
{% if scripts %}
<table class="table table-hover scripts">
<thead>
<tr>
@ -49,7 +50,7 @@
</tr>
</thead>
<tbody>
{% for script in module.scripts.all %}
{% for script in scripts %}
{% with last_job=script.get_latest_jobs|first %}
<tr>
<td>
@ -128,10 +129,12 @@
{% else %}
<div class="card-body">
<div class="alert alert-warning" role="alert">
<i class="mdi mdi-alert"></i> Could not load scripts from {{ module.name }}
<i class="mdi mdi-alert"></i>
{% blocktrans with module=module.name %}Could not load scripts from module {{ module }}{% endblocktrans %}
</div>
</div>
{% endif %}
{% endwith %}
</div>
{% empty %}
<div class="alert alert-info" role="alert">