summaryrefslogtreecommitdiff
path: root/ishtar_common/templates/ishtar/blocks/window_image.html
blob: dcf0c2f5e3afdba9e75d090c22a42f266ca56aaf (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
{% load i18n link_to_window %}{% if item.images.count %}
{% if output == "ODT" or output == "PDF"%}
{% include "ishtar/blocks/window_image_odt.html" %}
{% else %}
{% trans "Sheet" as sheet_lbl %}
<div class="lightgallery-captions">
    {% if item.main_image %}{% with image=item.main_image %}
    <div id="lightgallery-{{window_id}}-caption-0">
        <span class="close">&times</span>
        {% include "ishtar/blocks/window_image_detail.html" %}
        {{image|simple_link_to_window:sheet_lbl}} &nbsp;
        <a href="{% url 'edit-document' image.pk %}" class="display_details">
            <i class="fa fa-pencil"></i> <small>{% trans "Modify" %}</small>
        </a>
    </div>
    {% endwith %}{% endif %}
    {% for image in item.images_without_main_image.all %}
    <div id="lightgallery-{{window_id}}-caption-{{forloop.counter}}">
        <span class="close">&times</span>
        {% include "ishtar/blocks/window_image_detail.html" %}
        {{image|simple_link_to_window:sheet_lbl}} &nbsp;
        <a href="{% url 'edit-document' image.pk %}" class="display_details">
            <i class="fa fa-pencil"></i> <small>{% trans "Modify" %}</small>
        </a>
    </div>
    {% endfor %}
</div>
<div id="lightgallery-{{window_id}}">
    {% if item.main_image %}{% with image=item.main_image %}
    <a data-sub-html="#lightgallery-{{window_id}}-caption-0"
       href="{{image.image.url}}" class="window-main-image">
        <img class='card-img-top' src="{{BASE_URL}}{{image.thumbnail.url}}">
    </a>
    {% endwith %}{% endif %}
    {% for image in item.images_without_main_image.all %}
    <a data-sub-html="#lightgallery-{{window_id}}-caption-{{forloop.counter}}"
       href="{{image.image.url}}" class="lightgallery-subimage">
        <img src="{{BASE_URL}}{{image.thumbnail.url}}">
    </a>
    {% endfor %}
</div>
{% endif%}
{% endif%}