summaryrefslogtreecommitdiff
path: root/ishtar_common/templates/ishtar/blocks/sheet_relation_image.html
blob: 552dc5adccc91fba8607b4805380ba87cc0558ff (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
{% load i18n %}{% if relation_image %}
<div id="lightgallery-{{window_id}}-relation-image{{type}}" class="text-center">
    {% if output != "ODT" %}<a href="{{relation_image.url}}">{% endif %}
    <img src="{{relation_image.url}}" class="img-fluid img-thumbnail">
    {% if output != "ODT" %}</a>{% endif %}
</div>
{% endif %}

{% if DOT_GENERATION and output != "ODT" and output != "PDF" %}
<div class='row mt-2 mb-2'>
    <div class="col">
        <div class="btn-group btn-group-sm" role="group" aria-label="Exporter">
            {% if relation_image %}<a class="btn btn-secondary" target="_blank" href="{{relation_image.url}}">
                <i class="fa fa-file-image-o" aria-hidden="true"></i> SVG
            </a>{% endif %}
            {% if relation_png %}<a class="btn btn-secondary" target="_blank" href="{{relation_png.url}}">
                <i class="fa fa-file-image-o" aria-hidden="true"></i> PNG
            </a>{% endif %}
            {% if relation_dot %}<a class="btn btn-secondary" target="_blank" href="{{relation_dot.url}}">
                <i class="fa fa-file-o" aria-hidden="true"></i> DOT
            </a>{% endif %}
            <a class="btn btn-success" onclick="long_wait();return true;"
                href="{% url gen_url item.pk relation_type %}">
                {% if relation_image %}
                {% trans "Re-generate image" %}
                {% else %}
                {% trans "Generate image" %}
                {% endif %}
            </a>
        </div>
    </div>
</div>
{% endif %}