home · contact · privacy
Refactor templates.
authorChristian Heller <c.heller@plomlompom.de>
Wed, 22 Jan 2025 12:22:28 +0000 (13:22 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Wed, 22 Jan 2025 12:22:28 +0000 (13:22 +0100)
templates/_base.tmpl
templates/_macros.tmpl

index 217af12c512a91200b6e3880b7be93833498064e..74ed6b11924446b093e2e0d799b96740fa19d771 100644 (file)
@@ -6,6 +6,8 @@
 <style>
 body { background-color: white; font-family: sans-serif; }
 tr:nth-child(odd) { background-color: #dcdcdc; }
+tr.warning td { background-color: #ff8888; }
+td.invalid, tr.warning td.invalid { background-color: #ff0000; }
 {% block css %}{% endblock %}
 </style>
 </head>
index cabb83cce988ef2c5de783330777dcb0c687f6d2..d1f6cf274622aa2f63f6adbdcc671617185a29f2 100644 (file)
@@ -21,14 +21,16 @@ td.curr { text-align: center; }
     {% endif %}
   {% endif %}
   {% if raw %}
+    <td{% if dat_line.error %} class="invalid"{% endif %}>
     {% if dat_line.is_intro %}
-      <td {% if dat_line.error %}class="invalid"{% endif %}><a href="/booking/{{dat_line.booking_id}}"/>{{dat_line.raw_nbsp}}</a></td>
+      <a href="/booking/{{dat_line.booking_id}}"/>{{dat_line.raw_nbsp}}</a>
     {% else %}
-      <td {% if dat_line.error %}class="invalid"{% endif %}>{{dat_line.raw_nbsp}}</td>
+      {{dat_line.raw_nbsp}}
     {% endif %}
+    </td>
   {% else %}
     {% if dat_line.is_intro %}
-      <td class="code{% if dat_line.error %} invalid{% endif %}" colspan=3><a href="/booking/{{dat_line.booking_id}}">{{dat_line.code}}</a></td>
+      <td{% if dat_line.error %} class="invalid"{% endif %} colspan=3><a href="/booking/{{dat_line.booking_id}}">{{dat_line.code}}</a></td>
     {% elif not dat_line.error %}
       <td class="amt">{{dat_line.booking_line.amount_short}}</td>
       <td class="curr">{{dat_line.booking_line.currency|truncate(4,true,"…")}}</td>
@@ -40,7 +42,13 @@ td.curr { text-align: center; }
   {% endif %}
   </tr>
   {% if dat_line.error and not raw %}
-    <tr class="warning">{% if not single %}<td></td>{% endif %}<td class="invalid" colspan=3>{{dat_line.error}}</td><td></td></tr>
+    <tr class="warning">
+    {% if not single %}
+      <td></td>
+    {% endif %}
+    <td class="invalid" colspan=3>{{dat_line.error}}</td>
+    <td></td>
+    </tr>
   {% endif %}
 {% endfor %}
 </table>