forked from rc/aircox
fix logs merge with diff algorithm
This commit is contained in:
@ -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>
|
||||
|
@ -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">♬</span>
|
||||
<span>{{ track.title }}</span>
|
||||
<span class="has-text-grey-dark has-text-weight-light">
|
||||
— {{ 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">♬</span>
|
||||
<span>{{ track.title }}</span>
|
||||
<span class="has-text-grey-dark has-text-weight-light">
|
||||
— {{ track.artist }}
|
||||
{% if track.info %}(<i>{{ track.info }}</i>){% endif %}
|
||||
</span>
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
|
||||
|
@ -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>
|
||||
|
@ -49,8 +49,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user