mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-26 20:16:14 +00:00
The rendering of the 'createdBy' entity has been updated across various .twig files to include the 'at_date' property. This makes the date an entity was created more explicit, providing clearer information to the user.
42 lines
1.4 KiB
Twig
42 lines
1.4 KiB
Twig
{% 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 %}
|