fix logs merge with diff algorithm

This commit is contained in:
bkfox
2019-08-12 04:11:04 +02:00
parent aabbcd97fa
commit e0f1ac498f
25 changed files with 485 additions and 124 deletions

View File

@ -14,6 +14,7 @@ Context:
{% block assets %}
<link rel="stylesheet" type="text/css" href="{% static "aircox/main.css" %}"/>
<link rel="stylesheet" type="text/css" href="{% static "aircox/vendor.css" %}"/>
<script src="{% static "aircox/main.js" %}"></script>
<script src="{% static "aircox/vendor.js" %}"></script>
{% endblock %}
@ -80,6 +81,9 @@ Context:
{% endif %}
</div>
</div>
<hr>
{% include "aircox/player.html" %}
</div>
</body>
</html>

View File

@ -1,11 +1,24 @@
{% load i18n %}
{% load i18n aircox %}
{% comment %}
Context objects:
- object: object to render
- hide_schedule: if true, hide the schedule
{% endcomment %}
{% with object.track as track %}
<span class="has-text-info is-size-5">&#9836;</span>
<span>{{ track.title }}</span>
<span class="has-text-grey-dark has-text-weight-light">
&mdash; {{ track.artist }}
{% if track.info %}(<i>{{ track.info }}</i>){% endif %}
</span>
{% endwith %}
{% if object|is_diffusion %}
{% with object as diffusion %}
{% with diffusion.episode as object %}
{% include "aircox/episode_item.html" %}
{% endwith %}
{% endwith %}
{% else %}
{% with object.track as track %}
<span class="has-text-info is-size-5">&#9836;</span>
<span>{{ track.title }}</span>
<span class="has-text-grey-dark has-text-weight-light">
&mdash; {{ track.artist }}
{% if track.info %}(<i>{{ track.info }}</i>){% endif %}
</span>
{% endwith %}
{% endif %}

View File

@ -33,25 +33,18 @@
<table class="table is-striped is-hoverable is-fullwidth">
{% for object in object_list reversed %}
<tr>
{% if object|is_diffusion %}
<td>
{% if object|is_diffusion %}
<time datetime="{{ object.start }}" title="{{ object.start }}">
{{ object.start|date:"H:i" }} - {{ object.end|date:"H:i" }}
</time>
</td>
{% with object as diffusion %}
{% with diffusion.episode as object %}
<td>{% include "aircox/episode_item.html" %}</td>
{% endwith %}
{% endwith %}
{% else %}
<td>
{% else %}
<time datetime="{{ object.date }}" title="{{ object.date }}">
{{ object.date|date:"H:i" }}
</time>
{% endif %}
</td>
<td>{% include "aircox/log_item.html" %}</td>
{% endif %}
</tr>
{% endfor %}
</table>

View File

@ -49,8 +49,6 @@
</div>
</div>
</div>
</div>
</form>
</section>
{% endblock %}