Completely re-structured the project from scratch, wrote a better bootstrap script, changed configuration format to yaml, improved Caddyfile, and more. #15 #16 #20
This commit is contained in:
parent
0012214f9b
commit
5572fec9c1
91 changed files with 739 additions and 1345 deletions
148
app/templates/statistics.html
Normal file
148
app/templates/statistics.html
Normal file
|
@ -0,0 +1,148 @@
|
|||
{% extends "baselayout.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}
|
||||
{% translate "Drinks - Statistics" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block headAdditional %}
|
||||
<link rel="stylesheet" href="/static/css/statistics.css">
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h1 class="heading">{% translate "Statistics" %}</h1>
|
||||
|
||||
<div class="maincontainer">
|
||||
|
||||
<div class="tablescontainer">
|
||||
|
||||
<div id="noyopd" class="statisticstable">
|
||||
<h1>{% translate "Your orders per drink" %}</h1>
|
||||
{% if noyopd %}
|
||||
<table>
|
||||
<tr>
|
||||
<th>{% translate "drink" %}</th>
|
||||
<th>{% translate "count" %}</th>
|
||||
</tr>
|
||||
{% for row in noyopd %}
|
||||
<tr>
|
||||
<td>{{ row.0 }}</td>
|
||||
<td>{{ row.1 }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% else %}
|
||||
<div>{% translate "No history." %}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div id="noaopd" class="statisticstable">
|
||||
<h1>{% translate "All orders per drink" %}</h1>
|
||||
{% if noaopd %}
|
||||
<table>
|
||||
<tr>
|
||||
<th>{% translate "drink" %}</th>
|
||||
<th>{% translate "count" %}</th>
|
||||
</tr>
|
||||
{% for row in noaopd %}
|
||||
<tr>
|
||||
<td>{{ row.0 }}</td>
|
||||
<td>{{ row.1 }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% else %}
|
||||
<div>{% translate "No history." %}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div id="yopml12m" class="statisticstable">
|
||||
<h1>{% translate "Your orders per month (last 12 months)" %}</h1>
|
||||
{% if yopml12m %}
|
||||
<table>
|
||||
<tr>
|
||||
<th>{% translate "month" %}</th>
|
||||
<th>{% translate "count" %}</th>
|
||||
</tr>
|
||||
{% for row in yopml12m %}
|
||||
<tr>
|
||||
<td>{{ row.0 }}</td>
|
||||
<td>{{ row.1 }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% else %}
|
||||
<div>{% translate "No history." %}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div id="aopml12m" class="statisticstable">
|
||||
<h1>{% translate "All orders per month (last 12 months)" %}</h1>
|
||||
{% if aopml12m %}
|
||||
<table>
|
||||
<tr>
|
||||
<th>{% translate "month" %}</th>
|
||||
<th>{% translate "count" %}</th>
|
||||
</tr>
|
||||
{% for row in aopml12m %}
|
||||
<tr>
|
||||
<td>{{ row.0 }}</td>
|
||||
<td>{{ row.1 }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% else %}
|
||||
<div>{% translate "No history." %}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div id="yopwd" class="statisticstable">
|
||||
<h1>{% translate "Your orders per weekday" %}</h1>
|
||||
{% if yopwd %}
|
||||
<table>
|
||||
<tr>
|
||||
<th>{% translate "day" %}</th>
|
||||
<th>{% translate "count" %}</th>
|
||||
</tr>
|
||||
{% for row in yopwd %}
|
||||
<tr>
|
||||
<td>{{ row.0 }}</td>
|
||||
<td>{{ row.1 }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% else %}
|
||||
<div>{% translate "No history." %}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div id="aopwd" class="statisticstable">
|
||||
<h1>{% translate "All orders per weekday" %}</h1>
|
||||
{% if aopwd %}
|
||||
<table>
|
||||
<tr>
|
||||
<th>{% translate "day" %}</th>
|
||||
<th>{% translate "count" %}</th>
|
||||
</tr>
|
||||
{% for row in aopwd %}
|
||||
<tr>
|
||||
<td>{{ row.0 }}</td>
|
||||
<td>{{ row.1 }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% else %}
|
||||
<div>{% translate "No history." %}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="/static/js/autoreload.js"></script>
|
||||
|
||||
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue