Clarify "no events" on timeline

Suggested in #229
This commit is contained in:
Ohad Lutzky 2021-07-07 00:43:18 +01:00 committed by Christopher Charbonneau Wells
parent 8e814f1674
commit 2a7402283c
1 changed files with 24 additions and 20 deletions

View File

@ -44,28 +44,32 @@
</a> </a>
{% endif %} {% endif %}
</h3> </h3>
<ul class="timeline m-auto"> {% if timeline_objects %}
{% for object in timeline_objects %} <ul class="timeline m-auto">
<li{% cycle "" ' class="timeline-inverted"' %}> {% for object in timeline_objects %}
<div class="timeline-badge {% if object.type == "start" %}bg-success{% elif object.type == "end" %}bg-danger{% else %}bg-info{% endif %}"> <li{% cycle "" ' class="timeline-inverted"' %}>
<i class="icon icon-{{ object.model_name }}"></i> <div class="timeline-badge {% if object.type == "start" %}bg-success{% elif object.type == "end" %}bg-danger{% else %}bg-info{% endif %}">
</div> <i class="icon icon-{{ object.model_name }}"></i>
<div class="card text-right">
<div class="card-body">
{{ object.event }}<br />
{% if object.details %}
<small>{{ object.details }}</small>
{% endif %}
</div> </div>
<div class="card-footer text-muted"> <div class="card text-right">
{% blocktrans trimmed with since=object.time|timesince time=object.time|time %} <div class="card-body">
{{ since }} ago ({{ time }}) {{ object.event }}<br />
{% endblocktrans %} {% if object.details %}
<small>{{ object.details }}</small>
{% endif %}
</div>
<div class="card-footer text-muted">
{% blocktrans trimmed with since=object.time|timesince time=object.time|time %}
{{ since }} ago ({{ time }})
{% endblocktrans %}
</div>
</div> </div>
</div> </li>
</li> {% endfor %}
{% endfor %} </ul>
</ul> {% else %}
<div class="text-center">No events</div>
{% endif %}
</div> </div>
</div> </div>
{% endblock %} {% endblock %}