Refactor user_scores.html to replace Case Collections section with Atlas Collections, implementing HTMX for dynamic loading of user-specific collections.
This commit is contained in:
+14
-19
@@ -86,27 +86,22 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if case_collections %}
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0">Case Collections</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<p class="text-muted">The following Case Collections have been found.</p>
|
||||
<ul class="list-group">
|
||||
{% for collection in case_collections %}
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
<a href="{{ collection.get_take_url }}?cid={{ cid }}&passcode={{ passcode }}">{{ collection.name }}</a>
|
||||
<div>
|
||||
{% if collection.active %}<span class="badge bg-success">Active</span>{% endif %}
|
||||
{% if collection.publish_results %}<span class="badge bg-info text-dark ms-2">Results Published</span>{% endif %}
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0">Atlas Collections</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<p class="text-muted mb-2">Available, in-progress, and completed Atlas collections for this user.</p>
|
||||
<div
|
||||
id="atlas-collections-scores"
|
||||
hx-get="{% url 'atlas:user_collections' %}?user_id={{ cid_user.id }}"
|
||||
hx-trigger="load"
|
||||
hx-target="this"
|
||||
hx-swap="innerHTML">
|
||||
<div class="text-muted small">Loading collections...</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4">
|
||||
|
||||
Reference in New Issue
Block a user