From c23a11bfdb3fff3522179658bf110365fd2c6783 Mon Sep 17 00:00:00 2001 From: Midgard Date: Tue, 13 Oct 2020 02:01:07 +0200 Subject: [PATCH] Fix flow quirks in "order information" section --- app/templates/order.html | 85 +++++++++++++++++++++++----------------- 1 file changed, 49 insertions(+), 36 deletions(-) diff --git a/app/templates/order.html b/app/templates/order.html index 6f1d8d2..03d2b67 100644 --- a/app/templates/order.html +++ b/app/templates/order.html @@ -135,43 +135,47 @@

Order information

-
Location
-
- {% if order.location %} - {{ order.location_name }} - {% else %} - {{ order.location_name }} - {% endif %} -
+
+
Order opens
+
{{ order.starttime.strftime("%Y-%m-%d, %H:%M") }}
-
Courier
-
- {% if order.courier == None %} - {% if not current_user.is_anonymous() %} -
- -
- {% else %}No-one{% endif %} - {% else %} - {{ order.courier.username }} - {% endif %} -
+
Order closes
+
+ {% if order.stoptime %} + {% set stoptimefmt = ( + "%H:%M" if order.stoptime.date() == order.starttime.date() + else "%Y-%m-%d, %H:%M" + ) %} + {{ order.stoptime.strftime(stoptimefmt) }} ({{ order.stoptime|countdown }}) + {% else %} + Never + {% endif %} +
+
-
Order opens
-
{{ order.starttime.strftime("%Y-%m-%d, %H:%M") }}
+
+
Location
+
+ {% if order.location %} + {{ order.location_name }} + {% else %} + {{ order.location_name }} + {% endif %} +
-
Order closes
-
- {% if order.stoptime %} - {% set stoptimefmt = ( - "%H:%M" if order.stoptime.date() == order.starttime.date() - else "%Y-%m-%d, %H:%M" - ) %} - {{ order.stoptime.strftime(stoptimefmt) }} ({{ order.stoptime|countdown }}) - {% else %} - Never - {% endif %} -
+
Courier
+
+ {% if order.courier == None %} + {% if not current_user.is_anonymous() %} +
+ +
+ {% else %}No-one{% endif %} + {% else %} + {{ order.courier.username }} + {% endif %} +
+
@@ -190,16 +194,21 @@

About {{ order.location_name }}

{% if order.location.telephone %} +
Telephone
{{ order.location.telephone }}
+
{% endif %} {% if order.location.website %} +
Website
{{ order.location.website }}
+
{% endif %} {% if order.location.address or order.location.osm %} +
Location
{% if order.location.osm %} @@ -208,6 +217,7 @@ {{ order.location.address }} {% endif %}
+
{% endif %}
@@ -364,8 +374,11 @@ h3 { margin-bottom: 30px; } -#order_info dl { - column-width: 150px; +@media (min-width: 1200px) { + #order_info dl { + display: grid; + grid-template-columns: 1fr 1fr; + } } #from_favourites ul, #my_items ul, #per_person ul {