{% macro updatedBy(entity) %}
    <div class="updatedBy">
        {% if entity.updatedAt != null %}
            {{ 'Last updated on'|trans }}
            <span class="date">
                {{ entity.updatedAt|format_datetime('medium', 'short') }}
            </span>
        {% endif %}
        {% if entity.updatedBy != null %}
            {% if entity.updatedAt != null %}
                {{ ', ' ~ 'by_user'|trans }}
            {% else %}
                {{ 'Last updated by'|trans }}
            {% endif %}
            <span class="user">
                {{ entity.updatedBy|chill_entity_render_box({'at_date': entity.updatedAt }) }}
            </span>
        {% endif %}
    </div>
{% endmacro %}

{% macro createdBy(entity) %}
    <div class="createdBy">
        {% if entity.createdAt != null %}
            {{ 'Created on'|trans }}
            <span class="date">
                {{ entity.createdAt|format_datetime('medium', 'short') }}
            </span>
        {% endif %}
        {% if entity.createdBy != null %}
            {% if entity.createdAt != null %}
                {{ ', ' ~ 'by_user'|trans }}
            {% else %}
                {{ 'Created by'|trans }}
            {% endif %}
            <span class="user">
                {{ entity.createdBy|chill_entity_render_string({'at_date': entity.createdAt}) }}
            </span>
        {% endif %}
    </div>
{% endmacro %}
