launderette_admin.jinja 1.69 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
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<hr>
<h3>{% trans %}Tokens{% endtrans %}</h3>
<p>
<form method="post" action="">
    {% csrf_token %}
    {{ form.as_p() }}
    <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
55
56
57
58
59
{% endblock %}