home · contact · privacy
Rename /booking/{id} to /bookings/{id}.
authorChristian Heller <c.heller@plomlompom.de>
Tue, 28 Jan 2025 12:51:34 +0000 (13:51 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Tue, 28 Jan 2025 12:51:34 +0000 (13:51 +0100)
ledger.py
templates/_macros.tmpl
templates/balance.tmpl

index a4a94bd7b8e61cbe50634e0201ab1e161ef7f88f..d7ebad6e139e4809e66f6e3095746fd7380bffb8 100755 (executable)
--- a/ledger.py
+++ b/ledger.py
@@ -299,7 +299,7 @@ class Handler(PlomHttpHandler):
     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_
@@ -310,7 +310,7 @@ class Handler(PlomHttpHandler):
                                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':
index acf74d92b8960128e9fe1a7b6dc622b170805440..bf9bff59c5fff6ab42461d378326407c40aa9063 100644 (file)
@@ -22,14 +22,14 @@ td.invalid, tr.warning td.invalid { background-color: #ff0000; }
   {% 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>
@@ -77,8 +77,8 @@ function taint() {
 <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 %}
index 15ebf833a0ff669fa152146abf94c8a26db1f7fb..a8a3b7f32b27ada408a9b8efb038335e8fd60b8d 100644 (file)
@@ -62,7 +62,7 @@ span.indent { letter-spacing: 3em; }
 {% 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) }}