forked from rc/aircox
work on logs, timetable, stats
This commit is contained in:
@ -1,12 +1,67 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% load i18n %}
|
||||
{% load i18n aircox %}
|
||||
|
||||
|
||||
{% block content %}{{ block.super }}
|
||||
<table class="table">
|
||||
{# TODO: date subtitle #}
|
||||
<a-statistics>
|
||||
<template v-slot:default="{counts}">
|
||||
<table class="table is-hoverable is-fullwidth">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% trans "time" %}</th>
|
||||
<th>{% trans "episode" %}</th>
|
||||
<th>{% trans "track" %}</th>
|
||||
<th>{% trans "tags" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for object in object_list %}
|
||||
{% with object|get_tracks as tracks %}
|
||||
{% for track in tracks %}
|
||||
<tr>
|
||||
{% if forloop.first %}
|
||||
<td rowspan="{{ tracks|length }}">{{ object.start|time:"H:i" }}</td>
|
||||
<td rowspan="{{ tracks|length }}">{{ object.episode|default:"" }}</td>
|
||||
{% endif %}
|
||||
|
||||
|
||||
</table>
|
||||
{% if not object|is_diffusion %}
|
||||
{% with track as object %}
|
||||
<td>{% include "aircox/track_item.html" %}</td>
|
||||
{% endwith %}
|
||||
{% with track.tags.all|join:', ' as tags %}
|
||||
<td>
|
||||
{% if tags %}
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" checked value="{{ tags|escape }}" name="data">
|
||||
{{ tags }}
|
||||
</label>
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endwith %}
|
||||
{% else %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<tr>
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td class="is-size-6">{% trans "Totals" %}</td>
|
||||
<td colspan="100">
|
||||
<div class="columns is-size-6">
|
||||
<span v-for="(count, tag) in counts" class="column">
|
||||
<b>[[ tag ]]</b>
|
||||
[[ count ]]
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</template>
|
||||
</a-statistics>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
@ -8,6 +8,9 @@
|
||||
<link rel="stylesheet" type="text/css" href="{% static "aircox/main.css" %}">
|
||||
<link rel="stylesheet" type="text/css" href="{% static "aircox/admin.css" %}">
|
||||
|
||||
<script src="{% static "aircox/vendor.js" %}"></script>
|
||||
<script src="{% static "aircox/admin.js" %}"></script>
|
||||
|
||||
{% block extrastyle %}{% endblock %}
|
||||
|
||||
{% if LANGUAGE_BIDI %}<link rel="stylesheet" type="text/css" href="{% block stylesheet_rtl %}{% static "admin/css/rtl.css" %}{% endblock %}">{% endif %}
|
||||
@ -26,7 +29,7 @@
|
||||
data-admin-utc-offset="{% now "Z" %}">
|
||||
|
||||
<!-- Container -->
|
||||
<div id="container">
|
||||
<div id="app">
|
||||
|
||||
{% if not is_popup %}
|
||||
<!-- Header -->
|
||||
@ -59,16 +62,16 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="navbar-end">
|
||||
<div class="navbar-item has-dropdown is-hoverable">
|
||||
<a href="#" class="navbar-link">{% trans "Tools" %}</a>
|
||||
<div class="navbar-dropdown is-boxed is-right">
|
||||
<a href="{% url 'admin:tools-stats' %}" class="navbar-item">{% trans "Statistics" %}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="navbar-end">
|
||||
<div class="navbar-item has-dropdown is-hoverable">
|
||||
<a href="{% url "admin:auth_user_change" user.pk %}" class="navbar-link">
|
||||
{% firstof user.get_short_name user.get_username %}
|
||||
|
Reference in New Issue
Block a user