Skip to content

Commit

Permalink
add oob swap
Browse files Browse the repository at this point in the history
  • Loading branch information
shapiromatron committed May 6, 2024
1 parent dda31d6 commit 3f0919e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bmds_server/analysis/templates/analysis/desktop_home.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div class="d-flex">
<h3 class="flex-grow-1">Analyses</h3>

<div class="dropdown">
<div class="dropdown mr-2">
<button class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown" aria-expanded="false">Collections</button>
<div class="dropdown-menu dropdown-menu-right">
<form class="p-2">
Expand All @@ -19,7 +19,7 @@ <h3 class="flex-grow-1">Analyses</h3>
hx-target="#collection-list"
hx-swap="afterbegin">Create</a>
<div class="clearfix"></div>
{% include "analysis/fragments/collection_list.html" with object_list=collection_qs %}
{% include "analysis/fragments/collection_list.html" with object_list=collection_qs no_oob=True %}
</form>
</div>
</div>
Expand Down Expand Up @@ -50,7 +50,7 @@ <h3 class="flex-grow-1">Analyses</h3>
</div>
</div>
<div class="ml-auto">
<a href="." class="btn btn-secondary mr-3">Reset</a>
<a href="." class="btn btn-secondary mr-2">Reset</a>
<button type="submit" class="btn btn-primary px-3">
<span class="bi bi-search mr-1"></span>Search
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,11 @@
{% endfor %}
<li class="list-group-item show-only-child text-muted">No collections!</li>
</ul>
{% if not no_oob %}
<optgroup id="id_collection" hx-swap-oob="innerHTML">
<option>--- Collection ---</option>
{% for object in object_list %}
<option value="{{object.id}}">{{object.name}}</option>
{% endfor %}
</optgroup>
{% endif %}

0 comments on commit 3f0919e

Please sign in to comment.