mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-24 02:13:15 +00:00
PHRAS-2665 #comment fix code review #time 1h
This commit is contained in:
@@ -52,11 +52,7 @@
|
|||||||
{% set prevRatio = '' %}
|
{% set prevRatio = '' %}
|
||||||
|
|
||||||
{% if width and height %}
|
{% if width and height %}
|
||||||
{% set rawRatio = (width / height)|number_format(3, '.') %}
|
{% set ratio = (width / height)|number_format(3, '.') %}
|
||||||
{% set rawRatioLength = rawRatio|length %}
|
|
||||||
{% set ratio = rawRatio|slice(0,rawRatioLength-1) %}
|
|
||||||
{% else %}
|
|
||||||
{% set ratio = '' %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{#Set the document Ratio #}
|
{#Set the document Ratio #}
|
||||||
@@ -66,13 +62,9 @@
|
|||||||
{% set height = subdef.get_height() %}
|
{% set height = subdef.get_height() %}
|
||||||
|
|
||||||
{% if width and height %}
|
{% if width and height %}
|
||||||
{% set rawRatio = (width / height)|number_format(3, '.') %}
|
|
||||||
{% set rawRatioLength = rawRatio|length %}
|
|
||||||
{% if subdef.get_name()=='preview' %}
|
{% if subdef.get_name()=='preview' %}
|
||||||
{% set prevRatio = rawRatio|slice(0,rawRatioLength-1) %}
|
{% set prevRatio = (width / height)|number_format(3, '.') %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
|
||||||
{% set prevRatio = '' %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|||||||
Reference in New Issue
Block a user