mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-15 05:53:13 +00:00
28 lines
760 B
Twig
28 lines
760 B
Twig
|
|
{% import 'common/thumbnail.html.twig' as thumbnail %}
|
|
|
|
{% if not_wrapped is defined and not_wrapped %}
|
|
{% set wrap = false %}
|
|
{% else %}
|
|
{% set wrap = true %}
|
|
{% endif %}
|
|
|
|
{% if autoplay is defined and autoplay %}
|
|
{% set autoplay = true %}
|
|
{% else %}
|
|
{% set autoplay = false %}
|
|
{% endif %}
|
|
|
|
{% set previewHtml5 = null %}
|
|
|
|
{% if app.getAclForUser(app.getAuthenticatedUser()).has_access_to_subdef(record, 'preview') %}
|
|
{% set preview_obj = record.get_preview() %}
|
|
{% else %}
|
|
{% set preview_obj = record.get_thumbnail() %}
|
|
{% endif %}
|
|
|
|
{% set width = preview_obj.get_width() %}
|
|
{% set height = preview_obj.get_height() %}
|
|
|
|
{{ thumbnail.format(preview_obj, preview_obj.get_width(), preview_obj.get_height(), '', wrap, false, autoplay) }}
|