work on home page, fix views & templates issues

This commit is contained in:
bkfox
2019-09-10 17:57:24 +02:00
parent 215a6ac331
commit e30d1b54ef
51 changed files with 658 additions and 276 deletions

View File

@ -3,8 +3,14 @@
{% block content %}{{ block.super }}
<div id="app">
{# TODO: date subtitle #}
<div class="columns">
<nav class="navbar" role="menu">
{% with "admin:tools-stats" as url_name %}
{% include "aircox/widgets/dates_menu.html" %}
{% endwith %}
</nav>
<a-statistics class="column">
<template v-slot:default="{counts}">
@ -23,13 +29,12 @@
{% for track in tracks %}
<tr>
{% if forloop.first %}
<td rowspan="{{ tracks|length }}">{{ object.start|time:"H:i" }}</td>
<td rowspan="{{ tracks|length }}">{{ object.start|time:"H:i" }} {% if object|is_diffusion %} - {{ object.end|time:"H:i" }}{% endif %}</td>
<td rowspan="{{ tracks|length }}">{{ object.episode|default:"" }}</td>
{% endif %}
{% if not object|is_diffusion %}
{% with track as object %}
<td>{% include "aircox/track_item.html" %}</td>
<td>{% include "aircox/widgets/track_item.html" %}</td>
{% endwith %}
{% with track.tags.all|join:', ' as tags %}
<td>
@ -41,10 +46,17 @@
{% endif %}
</td>
{% endwith %}
{% else %}
</tr>
{% empty %}
{% if object|is_diffusion %}
<tr>
<td>{{ object.start|time:"H:i" }} - {{ object.end|time:"H:i" }}</td>
<td>{{ object.episode|default:"" }}</td>
<td></td>
<td></td>
</tr>
{% endif %}
{% endfor %}
<tr>
{% endwith %}
{% endfor %}
</tbody>
@ -65,14 +77,6 @@
</template>
</a-statistics>
<nav class="column menu is-one-fifth-desktop" role="menu">
{% with "admin:tools-stats" as url_name %}
{% include "aircox/widgets/dates_menu.html" %}
{% endwith %}
</nav>
</div>
{% endblock %}

View File

@ -29,11 +29,10 @@
data-admin-utc-offset="{% now "Z" %}">
<!-- Container -->
<div id="app">
<div>
{% if not is_popup %}
<!-- Header -->
<nav class="navbar is-dark">
<nav class="navbar is-dark has-shadow">
<div class="navbar-brand">
{% block branding %}{% endblock %}
</div>

View File

@ -37,7 +37,7 @@
{% block coltype %}flex{% endblock %}
{% block content %}
<div id="content-main">
<div id="content-main">
{% block object-tools %}
<ul class="object-tools">
{% block object-tools-items %}
@ -74,16 +74,16 @@
{% block date_hierarchy %}{% if cl.date_hierarchy %}{% date_hierarchy cl %}{% endif %}{% endblock %}
{% block filters %}
{% if cl.has_filters %}
<div id="changelist-filter">
<h2>{% trans 'Filter' %}</h2>
{% for spec in cl.filter_specs %}{% admin_list_filter cl spec %}{% endfor %}
</div>
{% endif %}
{% if cl.has_filters %}
<div id="changelist-filter">
<h2>{% trans 'Filter' %}</h2>
{% for spec in cl.filter_specs %}{% admin_list_filter cl spec %}{% endfor %}
</div>
{% endif %}
{% endblock %}
</div>
</div>
</div>
</div>
</div>
{% endblock %}