{% macro captcha() %}
{% set public_key = app['phraseanet.registry'].get('GV_captcha_public_key') %} {% endmacro %} {% macro flashes() %} {% for type in app.getAvailableFlashTypes %} {% for message in app.getFlash(type) %}
{{ message }} ×
{% endfor %} {% endfor %} {% endmacro %} {% macro caption_value(field, bounceable) %} {% autoescape false %} {% set terms = [] %} {% for data in field.values %} {% if data.from_thesaurus and bounceable %} {% set value = data.value|e|bounce(field.name, data.qjs, field.sbas_id) %} {% else %} {% set value = data.value|e %} {% endif %} {% set terms = [value]|merge(terms) %} {% endfor %} {{ terms|join(' ' ~ field.separator ~ ' ') }} {% endautoescape %} {% endmacro %} {% macro caption_field(field, bounceable, extra_classes) %}
{{ field.label }} : {{ _self.caption_value(field, bounceable|default(true))|highlight|linkify }}
{% endmacro %} {% macro format_caption(record, highlight, search_engine, include_business, bounceable, technical_data) %} {% for field in record.get_caption().get_highlight_fields(highlight, null, search_engine, include_business) %} {% set extra_classes = ['pair'] %} {% if loop.index is odd %} {% set extra_classes = ['impair'] %} {% endif %} {{ _self.caption_field(field, bounceable|default(true), extra_classes) }} {% endfor %} {% if technical_data|default(true) and app['authentication'].getUser() is not none and app['authentication'].getUser().getPrefs('technical_display') == 'group' %}
{% include 'common/technical_datas.html.twig' %} {% endif %} {% endmacro %}