def do_GET(self) -> None:
# pylint: disable=invalid-name,missing-function-docstring
ctx = {'tainted': self.server.tainted, 'path': self.path}
- if self.pagename == 'booking' or self.pagename.startswith('edit_'):
+ if self.pagename == 'bookings' or self.pagename.startswith('edit_'):
id_ = int(self.path_toks[2])
if self.pagename.startswith('edit_'):
ctx['id'] = id_
ctx | {'roots': balance_roots,
'valid': valid,
'booking': self.server.bookings[id_]})
- elif self.pagename == 'booking':
+ elif self.pagename == 'bookings':
self.redirect(
Path('/').joinpath('edit_structured').joinpath(str(id_)))
elif self.pagename == 'edit_structured':
{% if raw %}
<td{% if dat_line.error %} class="invalid"{% endif %}>
{% if dat_line.is_intro %}
- <a href="/booking/{{dat_line.booking_id}}"/>{{dat_line.raw_nbsp|safe}}</a>
+ <a href="/bookings/{{dat_line.booking_id}}"/>{{dat_line.raw_nbsp|safe}}</a>
{% else %}
{{dat_line.raw_nbsp|safe}}
{% endif %}
</td>
{% else %}
{% if dat_line.is_intro %}
- <td{% if dat_line.error %} class="invalid"{% endif %}><a href="/booking/{{dat_line.booking_id}}">{{dat_line.booking_line.date}}</a></td>
+ <td{% if dat_line.error %} class="invalid"{% endif %}><a href="/bookings/{{dat_line.booking_id}}">{{dat_line.booking_line.date}}</a></td>
<td{% if dat_line.error %} class="invalid"{% endif %} colspan=2>{{dat_line.booking_line.target}}</td>
{% elif not dat_line.error %}
<td class="amt">{{dat_line.booking_line.amount_short}}</td>
<span id="booking_links">
<a class="disable_on_change" href="/edit_{{target}}/{{id}}">switch to {{target}}</a>
<a class="disable_on_change" href="/balance?up_incl={{id}}">balance after</a>
-<a class="disable_on_change" href="/booking/{{id-1}}">prev</a>
-<a class="disable_on_change" href="/booking/{{id+1}}">next</a>
+<a class="disable_on_change" href="/bookings/{{id-1}}">prev</a>
+<a class="disable_on_change" href="/bookings/{{id+1}}">next</a>
</span>
<hr />
{% endmacro %}
{% endblock css %}
{% block content %}
-<p>balance after <a href="/booking/{{booking.id_}}">booking {{booking.id_}} ({{booking.intro_line.date}}: {{booking.intro_line.target}})</a></p>
+<p>balance after <a href="/bookings/{{booking.id_}}">booking {{booking.id_}} ({{booking.intro_line.date}}: {{booking.intro_line.target}})</a></p>
<table{% if not valid %} class="warning"{% endif %}>
{% for root in roots %}
{{ account_with_children(root, indent=0) }}