mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-04 05:44:58 +00:00
replace dropdown for selecting reasons and use chillEntity for reason rendering
This commit is contained in:
@@ -16,8 +16,6 @@
|
||||
#}
|
||||
{% extends "ChillPersonBundle::layout.html.twig" %}
|
||||
|
||||
{% import 'ChillActivityBundle:ActivityReason:macro.html.twig' as m %}
|
||||
|
||||
{% set activeRouteKey = 'chill_activity_activity_list' %}
|
||||
|
||||
{% block title %}{{ 'Activity list' |trans }}{% endblock title %}
|
||||
@@ -47,10 +45,15 @@
|
||||
<td>{% if activity.date %}{{ activity.date|localizeddate('long', 'none') }}{% endif %}</td>
|
||||
<td>{{ activity.durationTime|date('H:i') }}</td>
|
||||
<td>
|
||||
{% if activity.remark is not empty %}
|
||||
<blockquote class="chill-user-quote">
|
||||
{{ activity.remark|truncate(250, true) }}
|
||||
</blockquote>
|
||||
{% endif %}
|
||||
{%- if activity.reasons is empty -%}
|
||||
{{ 'No reason associated'|trans }}
|
||||
{%- else -%}
|
||||
{% for r in activity.reasons %}{{ m.reason(r) }} {% endfor %}
|
||||
{% for r in activity.reasons %}{{ r|chill_entity_render_box }} {% endfor %}
|
||||
{%- endif -%}
|
||||
</td>
|
||||
<td>{{ activity.type.name | localize_translatable_string }}</td>
|
||||
|
@@ -35,7 +35,7 @@
|
||||
{%- if entity.reasons is empty -%}
|
||||
<dd><span class="chill-no-data-statement">{{ 'No reason associated'|trans }}</span></dd>
|
||||
{%- else -%}
|
||||
<dd>{% for r in entity.reasons %}{{ m.reason(r) }} {% endfor %}</dd>
|
||||
<dd>{% for r in entity.reasons %}{{ r|chill_entity_render_box }} {% endfor %}</dd>
|
||||
{%- endif -%}
|
||||
|
||||
</dl>
|
||||
|
@@ -20,7 +20,7 @@
|
||||
{%- if activity.reasons is empty -%}
|
||||
<dd><span class="chill-no-data-statement">{{ 'No reason associated'|trans }}</span></dd>
|
||||
{%- else -%}
|
||||
<dd>{% for r in activity.reasons %}{{ m.reason(r) }} {% endfor %}</dd>
|
||||
<dd>{% for r in activity.reasons %}{{ r|chill_entity_render_box }} {% endfor %}</dd>
|
||||
{%- endif -%}
|
||||
|
||||
</dl>
|
||||
|
Reference in New Issue
Block a user