launderette_admin.jinja 2.05 KB
Newer Older
Skia's avatar
Skia committed
1
2
3
4
5
6
7
{% extends "core/base.jinja" %}

{% block title %}
{% trans %}Launderette admin{% endtrans %}
{% endblock %}

{% block content %}
8
9
10
<h3>{% trans %}Selling{% endtrans %}</h3>
<p><a href="{{ url('launderette:main_click', launderette_id=launderette.id) }}">{% trans %}Sell{% endtrans %}</a></p>
<hr>
11
12
13
14
15
16
17
18
<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>
Skia's avatar
Skia committed
19
20
21
<hr>
<h3>{% trans %}Tokens{% endtrans %}</h3>
<p>
22
<form method="post" action="" id="token_form">
Skia's avatar
Skia committed
23
    {% csrf_token %}
24
25
26
27
28
29
30
31
32
33
34
    <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 }}
Skia's avatar
Skia committed
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
    <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>
Skia's avatar
Skia committed
65
66
67
68
69
{% endblock %}