Fix flow quirks in "order information" section
This commit is contained in:
parent
8cefb48768
commit
c23a11bfdb
1 changed files with 49 additions and 36 deletions
|
@ -135,43 +135,47 @@
|
||||||
<div class="box" id="order_info">
|
<div class="box" id="order_info">
|
||||||
<h3>Order information</h3>
|
<h3>Order information</h3>
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Location</dt>
|
<div>
|
||||||
<dd>
|
<dt>Order opens</dt>
|
||||||
{% if order.location %}
|
<dd>{{ order.starttime.strftime("%Y-%m-%d, %H:%M") }}</dd>
|
||||||
<a href="{{ url_for('general_bp.location', location_id=order.location_id) }}">{{ order.location_name }}</a>
|
|
||||||
{% else %}
|
|
||||||
{{ order.location_name }}
|
|
||||||
{% endif %}
|
|
||||||
</dd>
|
|
||||||
|
|
||||||
<dt>Courier</dt>
|
<dt>Order closes</dt>
|
||||||
<dd>
|
<dd>
|
||||||
{% if order.courier == None %}
|
{% if order.stoptime %}
|
||||||
{% if not current_user.is_anonymous() %}
|
{% set stoptimefmt = (
|
||||||
<form action="{{ url_for('order_bp.volunteer', order_id=order.id) }}" method="post" style="display:inline">
|
"%H:%M" if order.stoptime.date() == order.starttime.date()
|
||||||
<input type="submit" class="btn btn-primary btn-sm" value="Volunteer"></input>
|
else "%Y-%m-%d, %H:%M"
|
||||||
</form>
|
) %}
|
||||||
{% else %}No-one{% endif %}
|
{{ order.stoptime.strftime(stoptimefmt) }} ({{ order.stoptime|countdown }})
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ order.courier.username }}
|
Never
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</dd>
|
</dd>
|
||||||
|
</div>
|
||||||
|
|
||||||
<dt>Order opens</dt>
|
<div>
|
||||||
<dd>{{ order.starttime.strftime("%Y-%m-%d, %H:%M") }}</dd>
|
<dt>Location</dt>
|
||||||
|
<dd>
|
||||||
|
{% if order.location %}
|
||||||
|
<a href="{{ url_for('general_bp.location', location_id=order.location_id) }}">{{ order.location_name }}</a>
|
||||||
|
{% else %}
|
||||||
|
{{ order.location_name }}
|
||||||
|
{% endif %}
|
||||||
|
</dd>
|
||||||
|
|
||||||
<dt>Order closes</dt>
|
<dt>Courier</dt>
|
||||||
<dd>
|
<dd>
|
||||||
{% if order.stoptime %}
|
{% if order.courier == None %}
|
||||||
{% set stoptimefmt = (
|
{% if not current_user.is_anonymous() %}
|
||||||
"%H:%M" if order.stoptime.date() == order.starttime.date()
|
<form action="{{ url_for('order_bp.volunteer', order_id=order.id) }}" method="post" style="display:inline">
|
||||||
else "%Y-%m-%d, %H:%M"
|
<input type="submit" class="btn btn-primary btn-sm" value="Volunteer"></input>
|
||||||
) %}
|
</form>
|
||||||
{{ order.stoptime.strftime(stoptimefmt) }} ({{ order.stoptime|countdown }})
|
{% else %}No-one{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
Never
|
{{ order.courier.username }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</dd>
|
</dd>
|
||||||
|
</div>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
@ -190,16 +194,21 @@
|
||||||
<h3>About {{ order.location_name }}</h3>
|
<h3>About {{ order.location_name }}</h3>
|
||||||
<dl>
|
<dl>
|
||||||
{% if order.location.telephone %}
|
{% if order.location.telephone %}
|
||||||
|
<div>
|
||||||
<dt>Telephone</dt>
|
<dt>Telephone</dt>
|
||||||
<dd><a href="tel://{{ order.location.telephone }}">{{ order.location.telephone }}</a></dd>
|
<dd><a href="tel://{{ order.location.telephone }}">{{ order.location.telephone }}</a></dd>
|
||||||
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if order.location.website %}
|
{% if order.location.website %}
|
||||||
|
<div>
|
||||||
<dt>Website</dt>
|
<dt>Website</dt>
|
||||||
<dd><a href="{{ order.location.website }}">{{ order.location.website }}</a></dd>
|
<dd><a href="{{ order.location.website }}">{{ order.location.website }}</a></dd>
|
||||||
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if order.location.address or order.location.osm %}
|
{% if order.location.address or order.location.osm %}
|
||||||
|
<div>
|
||||||
<dt>Location</dt>
|
<dt>Location</dt>
|
||||||
<dd>
|
<dd>
|
||||||
{% if order.location.osm %}
|
{% if order.location.osm %}
|
||||||
|
@ -208,6 +217,7 @@
|
||||||
{{ order.location.address }}
|
{{ order.location.address }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</dd>
|
</dd>
|
||||||
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
|
@ -364,8 +374,11 @@ h3 {
|
||||||
margin-bottom: 30px;
|
margin-bottom: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#order_info dl {
|
@media (min-width: 1200px) {
|
||||||
column-width: 150px;
|
#order_info dl {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 1fr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#from_favourites ul, #my_items ul, #per_person ul {
|
#from_favourites ul, #my_items ul, #per_person ul {
|
||||||
|
|
Loading…
Reference in a new issue