{{ 'Units'|trans }}

{% for unit in units %}
{% set imagePreview = 'images/noimage.jpg' %} {% set imageFullscreen = '' %} {% if (unit.imageNames is not empty) and (unit.imageNames[0] is not empty) %} {% set imagePreview = unit.imageNames[0]|replace({'%size%': '200'}) %} {% set imageFullscreen = unit.imageNames[0]|replace({'%size%': 'source'}) %} {% endif %} {% set hasFilter = (unit.links is defined) and (unit.links['getFilter'] is defined) %} {% set hasFilterClass = hasFilter ? 'filter' : '' %} {% set url = hasFilter ? '#' : path( 'app_catalog_unit', {token: unit.links.getUnitInfo.token} ) %} {% set filterUrl = hasFilter ? path( 'app_catalog_unit_filter', {token: unit.links['getFilter'].token} ) : '#' %} {# fullscreen #} {% if imageFullscreen is not empty %} {% endif %} {# filter #} {% if hasFilter %} {% endif %} {# image #} {# text #}

{{ unit.code }} {{ unit.name }}

{#
Filter

:

:

hasFilter((string)$unit['unitid'])): ?>

:
getFilterValues((string)$unit['unitid']) as $name => $value): ?> : getFilterParam((string)$unit['unitid']), (string)$unit['ssd']); ?> $unit['name'], 'class' => 'filter')) . ')'; ?>

#}

{% else %}

{{ 'No items'|trans }}

{% endfor %}