Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Style up-to-date paths this host carries section in host edit #379

Merged
merged 1 commit into from
Sep 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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