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>
|
</h3>
|
||||||
{% if timeline_objects %}
|
{% if timeline_objects %}
|
||||||
<ul class="timeline m-auto">
|
<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"' %}>
|
<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 %}">
|
<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>
|
<i class="icon-{{ object.model_name }}"></i>
|
||||||
|
@ -60,6 +63,7 @@
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
<h3 class="text-center">
|
<h3 class="text-center">
|
||||||
{% if date_previous %}
|
{% if date_previous %}
|
||||||
|
|
Loading…
Reference in New Issue