activity: correction of displaying activity when durationTime or travelTime is null

This commit is contained in:
nobohan 2021-09-21 10:06:06 +02:00
parent c6bbe46bae
commit 99f2692684
2 changed files with 13 additions and 3 deletions

View File

@ -19,7 +19,7 @@
{% endif %}
<div class="duration">
{% if t.durationTimeVisible > 0 %}
{% if activity.durationTime and t.durationTimeVisible %}
<p>
<i class="fa fa-fw fa-hourglass-end"></i>
{{ activity.durationTime|date('H:i') }}

View File

@ -64,12 +64,22 @@
{% if t.durationTimeVisible %}
<dt class="inline">{{ 'Duration Time'|trans }}</dt>
<dd>{{ entity.durationTime|date('H:i') }}</dd>
<dd>{% if entity.durationTime is not null %}
{{ entity.durationTime|date('H:i') }}
{% else %}
{{ 'None'|trans|capitalize }}
{% endif %}
</dd>
{% endif %}
{% if t.travelTimeVisible %}
<dt class="inline">{{ 'Travel Time'|trans }}</dt>
<dd>{{ entity.travelTime|date('H:i') }}</dd>
<dd>{% if entity.travelTime is not null %}
{{ entity.travelTime|date('H:i') }}
{% else %}
{{ 'None'|trans|capitalize }}
{% endif %}
</dd>
{% endif %}
{% if t.commentVisible %}