diff options
Diffstat (limited to 'ishtar_common/templates/ishtar/blocks/alt_window_image.html')
| -rw-r--r-- | ishtar_common/templates/ishtar/blocks/alt_window_image.html | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/ishtar_common/templates/ishtar/blocks/alt_window_image.html b/ishtar_common/templates/ishtar/blocks/alt_window_image.html new file mode 100644 index 000000000..bd1565fa4 --- /dev/null +++ b/ishtar_common/templates/ishtar/blocks/alt_window_image.html @@ -0,0 +1,48 @@ +{% load i18n ishtar_helpers link_to_window %}{% if document_image.images_number %} +{% if output == "ODT" or output == "PDF"%} +{% else %} +{% with can_edit_document=permission_change_own_document|or_:permission_change_document %} +{% trans "Sheet" as sheet_lbl %} +<div class="lightgallery-captions"> + {% if document_image.main_image and document_image.main_image.image %}{% with image=document_image.main_image %} + <div id="lightgallery-{{document_window_id}}-caption-0"> + <span class="close">×</span> + {% include "ishtar/blocks/window_image_detail.html" %} + {{image|simple_link_to_window:sheet_lbl}} + {% if can_edit_document %} + <a href="{% url 'edit-document' image.pk %}" class="display_details"> + <i class="fa fa-pencil"></i> <small>{% trans "Modify" %}</small> + </a> + {% endif %} + </div> + {% endwith %}{% endif %} + {% for image in document_image.images_without_main_image.all %}{% if image.image %} + <div id="lightgallery-{{document_window_id}}-caption-{{forloop.counter}}"> + <span class="close">×</span> + {% include "ishtar/blocks/window_image_detail.html" %} + {{image|simple_link_to_window:sheet_lbl}} + {% if can_edit_document %} + <a href="{% url 'edit-document' image.pk %}" class="display_details"> + <i class="fa fa-pencil"></i> <small>{% trans "Modify" %}</small> + </a> + {% endif %} + </div> + {% endif %}{% endfor %} +</div> +<div id="lightgallery-{{document_window_id}}"> + {% if document_image.main_image and document_image.main_image.image and document_image.main_image.thumbnail %}{% with image=document_image.main_image %} + <a data-sub-html="#lightgallery-{{document_window_id}}-caption-0" + href="{{image.image.url}}" class="window-main-image"> + <img class='card-img-top' src="{{image.thumbnail.url}}"> + </a> + {% endwith %}{% endif %} + {% for image in document_image.images_without_main_image.all %}{% if image.image and image.thumbnail %} + <a data-sub-html="#lightgallery-{{document_window_id}}-caption-{{forloop.counter}}" + href="{{image.image.url}}" class="lightgallery-subimage"> + <img src="{{image.thumbnail.url}}"> + </a> + {% endif %}{% endfor %} +</div> +{% endwith %} +{% endif%} +{% endif%} |
