diff options
author | Javier Sánchez Parra <jsanchez@soleta.eu> | 2022-09-15 14:48:55 +0200 |
---|---|---|
committer | Javier Sánchez Parra <jsanchez@soleta.eu> | 2022-09-27 09:48:36 +0200 |
commit | 5af589a94dc96fa8981d008141c71bdd0cdffe4a (patch) | |
tree | 2db13321ef0ba46bc64e03679cfc05f349b95f2b | |
parent | 0c66443db89fec72c5fb2af0588a02695683613c (diff) |
Collapse servers images
Users can collapse images list by clicking on the server.
-rw-r--r-- | ogcp/templates/images.html | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/ogcp/templates/images.html b/ogcp/templates/images.html index d053913..3b1a296 100644 --- a/ogcp/templates/images.html +++ b/ogcp/templates/images.html @@ -21,14 +21,17 @@ {% endblock %} {% block sidebar %} - <ul id="servers" class="nav flex-column nav-pills"> + <ul id="servers" class="nav ogcp-nav flex-column nav-pills"> {% for response in responses %} {% set server_str = response["server"]["ip"] ~ ":" ~ response["server"]["port"] %} - <input class="form-check-input" type="checkbox" form="imagesForm" - id="{{ server_str }}" value="{{ server_str }}" - onclick="return false;" name="image-server" hidden/> - <li class="nav-item"><b>{{ response["server"]["name"] }}</b> - <ul id="images" class="nav flex-column nav-pills"> + <li class="nav-item"> + <input class="form-check-input" type="checkbox" form="imagesForm" + id="{{ server_str }}" value="{{ server_str }}" + onclick="return false;" name="image-server" hidden/> + <a class="nav-link" data-toggle="collapse" data-target="#images-{{ loop.index0 }}"> + <b>{{ response["server"]["name"] }}</b> + </a> + <ul id="images-{{ loop.index0 }}" class="nav flex-column nav-pills collapse"> {% for image in response["json"]["images"] %} <li id="{{ image["name"] }}_{{ image["id"] }}" class="nav-item"> <input class="form-check-input" type="checkbox" form="imagesForm" |