summaryrefslogtreecommitdiff
path: root/ishtar_common/templates/ishtar/blocks/sheet_relation_image.html
blob: f636f0b50e0dc2230db13038345a5ed90499c789 (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
{% load i18n ishtar_helpers %}{% if relation_image %}
<div class="svg-image">
{{relation_image|file_content|safe}}
</div>
{% comment %}
<object class="svg-image" data="{{relation_image.url}}"  class="img-fluid img-thumbnail" type="image/svg+xml"> 
    <img src="{{relation_image.url}}" class="img-fluid img-thumbnail">
</object>
<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>
{% endcomment %}
{% 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 %}