mirror of https://github.com/snachodog/mybuddy.git
Add literal ordering of timeline object types
Makes it so that timline items registered at the same moment are always ordered "start->end", not "end->start". Signed-off-by: Paul Konstantin Gerke <paulkgerke@craftware.info>
This commit is contained in:
parent
bb1e854ab3
commit
847125b1c6
|
@ -17,7 +17,10 @@
|
|||
</h3>
|
||||
{% if timeline_objects %}
|
||||
<ul class="timeline m-auto">
|
||||
{% for object in timeline_objects %}
|
||||
{% regroup timeline_objects by time as timeline_moments %}
|
||||
|
||||
{% for moment_objects in timeline_moments %}
|
||||
{% for object in moment_objects.list|dictsort:"type" %}
|
||||
<li{% cycle "" ' class="timeline-inverted"' %}>
|
||||
<div class="timeline-badge {% if object.type == "start" %}bg-success{% elif object.type == "end" %}bg-danger{% else %}bg-info{% endif %}">
|
||||
<i class="icon-{{ object.model_name }}"></i>
|
||||
|
@ -60,6 +63,7 @@
|
|||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<h3 class="text-center">
|
||||
{% if date_previous %}
|
||||
|
|
Loading…
Reference in New Issue