Feature: add timespent on "show" page

This commit is contained in:
Julien Fastré 2023-03-24 18:16:44 +01:00
parent 322ff32e5d
commit 4319b0d804
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB
3 changed files with 23 additions and 1 deletions

View File

@ -45,3 +45,12 @@ workflow:
few {# workflows} few {# workflows}
other {# workflows} other {# workflows}
} }
duration:
minute: >-
{m, plural,
=0 {Aucune durée}
one {# minute}
few {# minutes}
other {# minutes}
}

View File

@ -118,6 +118,18 @@
</li> </li>
{% endif %} {% endif %}
{% endif %} {% endif %}
{% if e.timeSpent is not null and e.timeSpent > 0 %}
<li>
{% set minutes = (e.timeSpent / 60) %}
<span class="item-key">{{ 'accompanying_course_work.timeSpent'|trans ~ ' : ' }}</span> {{ 'duration.minute'|trans({ '{m}' : minutes }) }}
</li>
{% elseif displayContent is defined and displayContent == 'long' %}
<li>
<span class="item-key">{{ 'accompanying_course_work.timeSpent'|trans ~ ' : ' }}</span>
<span class="chill-no-data-statement">{{ 'Not given'|trans }}</span>
</li>
{% endif %}
</ul> </ul>
</li> </li>
</ul> </ul>
@ -143,7 +155,7 @@
{% else %} {% else %}
<span class="chill-no-data-statement">{{ 'No document found'|trans }}</span> <span class="chill-no-data-statement">{{ 'No document found'|trans }}</span>
{% endif %} {% endif %}
{% endif %} {% endif %}
</td> </td>

View File

@ -908,6 +908,7 @@ accompanying_course_work:
remove: Supprimer une action d'accompagnement remove: Supprimer une action d'accompagnement
social_evaluation: Évaluation social_evaluation: Évaluation
private_comment: Commentaire privé private_comment: Commentaire privé
timeSpent: Temps de rédaction
# #