summaryrefslogtreecommitdiffstats
path: root/ogcp/templates/images.html
blob: 4231df2d683cbab8e408c2d8760ea8043ea6526b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{% extends 'base.html' %}

{% block nav_images %}active{% endblock %}

{% block container %}
    <form id="imagesForm">
        <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
    </form>
    {{ super() }}
</form>
{% endblock %}

{% block sidebar %}
    <ul id="servers" class="nav flex-column nav-pills">
        {% for response in responses %}
        <li class="nav-item"><b>{{ response["server"]["name"] }}</b>
                <ul id="images" class="nav flex-column nav-pills">
                    {% for image in response["json"]["images"] %}
                        <li id="{{ image["name"] }}_{{ image["id"] }}" class="nav-item">
                            <input class="form-check-input" type="checkbox" form="imagesForm"
                                   value="{{ image["id"] }}"
                                   {% if image.get("selected", False) %}checked{% endif %}
                                   name="{{ image["name"] }}_{{ image["id"] }}" />
                                    {{ image["name"] }}
                        </li>
                    {% endfor %}
                </ul>
            </li>
        {% endfor %}
    </ul>
{% endblock %}

{% block commands %}
  <input class="btn btn-light" type="submit" value="{{ _('Image details') }}"
         form="imagesForm" formaction="{{ url_for('action_image_info') }}" formmethod="get">
  <input class="btn btn-light" type="submit" value="{{ _('Delete image') }}"
         form="imagesForm" formaction="{{ url_for('action_image_delete') }}" formmethod="get">
  {% if btn_back %}
    <button class="btn btn-danger ml-3" type="button" id="backButton" onclick="history.back()">
      {{ _("Back") }}
    </button>
  {% endif %}
{% endblock %}