2016-07-28 18:05:56 +00:00
|
|
|
{% extends "core/base.jinja" %}
|
|
|
|
|
|
|
|
{% block title %}
|
|
|
|
{% trans %}Launderette admin{% endtrans %}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
2016-08-01 14:36:16 +00:00
|
|
|
<h3>{% trans %}Selling{% endtrans %}</h3>
|
|
|
|
<p><a href="{{ url('launderette:main_click', launderette_id=launderette.id) }}">{% trans %}Sell{% endtrans %}</a></p>
|
|
|
|
<hr>
|
2016-07-29 11:00:32 +00:00
|
|
|
<h3>{% trans %}Machines{% endtrans %}</h3>
|
|
|
|
<p><a href="{{ url('launderette:machine_new') }}?launderette={{ launderette.id }}">{% trans %}New machine{% endtrans %}</a></p>
|
|
|
|
<ul>
|
|
|
|
{% for m in launderette.machines.all() %}
|
|
|
|
<li><a href="{{ url('launderette:machine_edit', machine_id=m.id) }}">{{ m }}</a> -
|
|
|
|
<a href="{{ url('launderette:machine_delete', machine_id=m.id) }}">{% trans %}Delete{% endtrans %}</a></li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
2016-08-06 13:20:38 +00:00
|
|
|
<hr>
|
|
|
|
<h3>{% trans %}Tokens{% endtrans %}</h3>
|
|
|
|
<p>
|
2016-08-13 14:39:09 +00:00
|
|
|
<form method="post" action="" id="token_form">
|
2016-08-06 13:20:38 +00:00
|
|
|
{% csrf_token %}
|
2016-08-13 14:39:09 +00:00
|
|
|
<p>{{ form.action.errors }}<label for="{{ form.action.name }}">{{ form.action.label }}</label>
|
|
|
|
{% for c in form.action %}
|
|
|
|
{{ c }}
|
|
|
|
{% endfor %}
|
|
|
|
</p>
|
|
|
|
<p>{{ form.token_type.errors }}<label for="{{ form.token_type.name }}">{{ form.token_type.label }}</label>
|
|
|
|
{% for c in form.token_type %}
|
|
|
|
{{ c }}
|
|
|
|
{% endfor %}
|
|
|
|
</p>
|
|
|
|
{{ form.tokens }}
|
2016-08-06 13:20:38 +00:00
|
|
|
<p><input type="submit" value="{% trans %}Go{% endtrans %}" /></p>
|
|
|
|
</form>
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
<table>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<td>{% trans %}Type{% endtrans %}</td>
|
|
|
|
<td>{% trans %}Name{% endtrans %}</td>
|
|
|
|
<td>{% trans %}User{% endtrans %}</td>
|
|
|
|
<td>{% trans %}Since{% endtrans %}</td>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for t in launderette.tokens.all() %}
|
|
|
|
<tr>
|
|
|
|
<td>{{ t.get_type_display() }}</td>
|
|
|
|
<td>{{ t.name }}</td>
|
|
|
|
{% if t.user %}
|
|
|
|
<td>{{ t.user.get_display_name() }}</td>
|
|
|
|
<td>{{ t.borrow_date|date(DATETIME_FORMAT) }} - {{ t.borrow_date|time(DATETIME_FORMAT) }}</td>
|
|
|
|
{% else %}
|
|
|
|
<td></td>
|
|
|
|
<td></td>
|
|
|
|
{% endif %}
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</p>
|
2016-07-28 18:05:56 +00:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|