Skip to content

Commit

Permalink
Style up-to-date paths this host carries section in host edit
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Lerch <[email protected]>
  • Loading branch information
ryanlerch authored and abompard committed Sep 4, 2024
1 parent 7f7a569 commit 219fff2
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions mirrormanager2/templates/fedora/host.html
Original file line number Diff line number Diff line change
Expand Up @@ -231,14 +231,26 @@ <h5 class="text-center text-secondary">No URLS</h5>
</div>
{% endif %}
{% if category.directories %}
<h3>Up-to-Date Directories this host carries</h3>
<ul>
{% for dir in category.directories %}
{% if dir.up2date %}
<li>{{ dir.path }}</li>
{% endif %}
{% endfor %}
</ul>
<div class="accordion accordion-flush" id="accordion-category-{{category.id}}">
<div class="accordion-item">
<h2 class="accordion-header fw-bold" id="heading-category-{{category.id}}">
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapse-category-{{category.id}}" aria-expanded="false" aria-controls="flush-collapseOne">
<strong>Up-to-Date Directories this host carries <span class="badge bg-primary"> {{category.directories|length}}</span></strong>
</button>
</h2>
<div id="collapse-category-{{category.id}}" class="accordion-collapse collapse" aria-labelledby="#heading-category-{{category.id}}" data-bs-parent="#accordion-category-{{category.id}}">
<div class="accordion-body">
<ul>
{% for dir in category.directories %}
{% if dir.up2date %}
<li>{{ dir.path }}</li>
{% endif %}
{% endfor %}
</ul>
</div>
</div>
</div>
</div>
{% endif %}

</li>
Expand Down

0 comments on commit 219fff2

Please sign in to comment.