fix misc in activity (WIP)

This commit is contained in:
2021-06-08 16:55:29 +02:00
parent a947634f30
commit 0aa909f060
14 changed files with 225 additions and 55 deletions

View File

@@ -30,21 +30,24 @@
</thead>
-->
{% for activity in activities %}
{% set t = activity.type %}
<div class="item-bloc">
<div class="item-row main">
<div class="item-col">
{% if activity.date %}
<h3>{{ activity.date|format_date('long') }}</h3>
{% endif %}
<div class="duration">
{% if t.durationTimeVisible > 0 %}
<p>
<i class="fa fa-fw fa-hourglass-end"></i>
{{ activity.durationTime|date('H:i') }}
</p>
{% endif %}
{% if activity.travelTime %}
{% if activity.travelTime and t.travelTimeVisible %}
<p>
<i class="fa fa-fw fa-car"></i>
{{ activity.travelTime|date('H:i') }}
@@ -55,8 +58,7 @@
</div>
<div class="item-col">
<ul class="list-content">
{% if activity.user %}
{% if activity.user and t.userVisible %}
<li>
<b>{{ 'by'|trans }}{{ activity.user.usernameCanonical }}</b>
</li>
@@ -65,7 +67,7 @@
<li>
<b>{{ activity.type.name | localize_translatable_string }}</b>
{% if activity.attendee is not null %}
{% if activity.attendee is not null and t.attendeeVisible %}
{% if activity.attendee %}
{{ '→ ' ~ 'present'|trans|capitalize }}
{% else %}
@@ -82,7 +84,7 @@
#}
</li>
{%- if activity.reasons is defined -%}
{%- if t.reasonsVisible -%}
<li>
{%- if activity.reasons is empty -%}
<span class="chill-no-data-statement">{{ 'No reason associated'|trans }}</span>
@@ -94,24 +96,19 @@
</li>
{% endif %}
{%- if activity.socialIssues is defined -%}
{%- if t.socialIssuesVisible %}
<li class="social-issues">
{%- if activity.socialIssues is empty -%}
<span class="chill-no-data-statement">{{ 'No social issues associated'|trans }}</span>
{%- else -%}
{% for r in activity.socialIssues %}
<span class="badge badge-primary">
{% if r.parent %}
{{ r.parent.title|localize_translatable_string ~ ' > ' }}
{% endif %}
{{ r.title|localize_translatable_string }}
</span>
{{ r|chill_entity_render_box }}
{% endfor %}
{%- endif -%}
</li>
{% endif %}
{%- if activity.socialActions is defined -%}
{%- if t.socialActionsVisible -%}
<li class="social-actions">
{%- if activity.socialActions is empty -%}
<span class="chill-no-data-statement">{{ 'No social actions associated'|trans }}</span>