Files
mayan-edms/mayan/apps/documents/templates/documents/widgets/document_thumbnail.html
Roberto Rosario c9bb13f149 Add support for client side caching of document page images. The time
the images are cached is controlled by the new setting
DOCUMENTS_PAGE_IMAGE_CACHE_TIME which defaults to 3600 seconds (1 hour).

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-08 01:31:21 -04:00

24 lines
848 B
HTML

{% load documents_tags %}
<a
class="fancybox"
{% if disable_title_link %}
data-caption="{{ instance }}"
{% else %}
data-caption="<a class='a-caption' href='{{ instance.get_absolute_url }}'>{{ instance }} <i class='fa fa-external-link-alt'></i></a>"
{% endif %}
href="{% get_api_image_url instance width=size_preview_width height=size_preview_height %}"
data-type="image"
{% if gallery_name %}data-fancybox="{{ gallery_name }}"{% endif %}
>
{% with 'lazy-load thin_border-thumbnail' as image_classes %}
{% with '200px' as image_max_height %}
{% with size_thumbnail_width as image_width %}
{% with size_thumbnail_height as image_height %}
{% include 'documents/forms/widgets/document_page_image.html' %}
{% endwith %}
{% endwith %}
{% endwith %}
{% endwith %}
</a>