systematically at a parameter 'at_date' when displaying createdBy in twig template

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.
This commit is contained in:
Julien Fastré 2024-06-11 16:55:15 +02:00
parent 77c53972c8
commit 9ec4c77fb7
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB
6 changed files with 8 additions and 8 deletions

View File

@ -132,7 +132,7 @@
<li class="cancel"> <li class="cancel">
<span class="createdBy"> <span class="createdBy">
{{ 'Created by'|trans }} {{ 'Created by'|trans }}
<b>{{ calendar.activity.createdBy|chill_entity_render_string }}</b>, {{ 'on'|trans }} {{ calendar.activity.createdAt|format_datetime('short', 'short') }} <b>{{ calendar.activity.createdBy|chill_entity_render_string({'at_date': calendar.activity.createdAt}) }}</b>, {{ 'on'|trans }} {{ calendar.activity.createdAt|format_datetime('short', 'short') }}
</span> </span>
</li> </li>
{% if is_granted('CHILL_ACTIVITY_SEE', calendar.activity) %} {% if is_granted('CHILL_ACTIVITY_SEE', calendar.activity) %}

View File

@ -89,7 +89,7 @@
<li> <li>
{% if evaluation.createdBy is not null %} {% if evaluation.createdBy is not null %}
<span class="item-key">créé par</span> <span class="item-key">créé par</span>
<b>{{ evaluation.createdBy.username }}</b> <b>{{ evaluation.createdBy|chill_entity_render_string({'at_date': evaluation.createdAt}) }}</b>
{% endif %} {% endif %}
{% if evaluation.createdAt is not null %} {% if evaluation.createdAt is not null %}
<span class="item-key">{{ 'le'|trans }}</span> <span class="item-key">{{ 'le'|trans }}</span>

View File

@ -13,7 +13,7 @@
{{ 'Last updated by'|trans }} {{ 'Last updated by'|trans }}
{% endif %} {% endif %}
<span class="user"> <span class="user">
{{ entity.updatedBy|chill_entity_render_box }} {{ entity.updatedBy|chill_entity_render_box({'at_date': entity.updatedAt }) }}
</span> </span>
{% endif %} {% endif %}
</div> </div>
@ -34,8 +34,8 @@
{{ 'Created by'|trans }} {{ 'Created by'|trans }}
{% endif %} {% endif %}
<span class="user"> <span class="user">
{{ entity.createdBy|chill_entity_render_string }} {{ entity.createdBy|chill_entity_render_string({'at_date': entity.createdAt}) }}
</span> </span>
{% endif %} {% endif %}
</div> </div>
{% endmacro %} {% endmacro %}

View File

@ -296,7 +296,7 @@ This view should receive those arguments:
<div class="created-updated"> <div class="created-updated">
{% if person.createdBy %} {% if person.createdBy %}
<div class="createdBy"> <div class="createdBy">
{{ 'Created by'|trans}}: <b>{{ person.createdBy|chill_entity_render_box }}</b>,<br> {{ 'Created by'|trans}}: <b>{{ person.createdBy|chill_entity_render_box({'at_date': person.createdAt}) }}</b>,<br>
{{ 'on'|trans ~ person.createdAt|format_datetime('long', 'short') }} {{ 'on'|trans ~ person.createdAt|format_datetime('long', 'short') }}
</div> </div>
{% endif %} {% endif %}

View File

@ -64,7 +64,7 @@
<li> <li>
{% if evaluation.createdBy is not null %} {% if evaluation.createdBy is not null %}
<span class="item-key">créé par</span> <span class="item-key">créé par</span>
<b>{{ evaluation.createdBy.username }}</b> <b>{{ evaluation.createdBy|chill_entity_render_string({'at_date': evaluation.createdAt}) }}</b>
{% endif %} {% endif %}
{% if evaluation.createdAt is not null %} {% if evaluation.createdAt is not null %}
<span class="item-key">{{ 'le'|trans }}</span> <span class="item-key">{{ 'le'|trans }}</span>

View File

@ -92,7 +92,7 @@
<li> <li>
{% if evaluation.createdBy is not null %} {% if evaluation.createdBy is not null %}
<span class="item-key">créé par</span> <span class="item-key">créé par</span>
<b>{{ evaluation.createdBy.username }}</b> <b>{{ evaluation.createdBy|chill_entity_render_string({'at_date': evaluation.createdAt}) }}</b>
{% endif %} {% endif %}
{% if evaluation.createdAt is not null %} {% if evaluation.createdAt is not null %}
<span class="item-key">{{ 'le'|trans }}</span> <span class="item-key">{{ 'le'|trans }}</span>