Midgard
1ff8ceb521
Remove main CSS from shop view page. Make it theme independent and maximize contrast. Improve spacing in "add item" list. Refactor old term "showcase" to "shop_view" in code.
52 lines
1.5 KiB
HTML
52 lines
1.5 KiB
HTML
{% extends "bootstrap/base.html" %}
|
||
{% import "bootstrap/utils.html" as utils %}
|
||
|
||
{% block title %}
|
||
Haldis - Order {{ order.id }}
|
||
{% endblock %}
|
||
|
||
{% block styles %}
|
||
{{ super() }}
|
||
<link rel="stylesheet" href="{{ url_for('static', filename='css/shop_view.css') }}" media="screen">
|
||
{% endblock %}
|
||
|
||
{% block scripts %}
|
||
{{ super() }}
|
||
<script type="text/javascript" src="{{ url_for('static', filename='js/timer.js') }}"></script>
|
||
<script type="text/javascript">
|
||
$("#open-message").html("Wait until order is closed!");
|
||
</script>
|
||
{% endblock %}
|
||
|
||
{% block content -%}
|
||
{{ utils.flashed_messages(container=True) }}
|
||
|
||
<div class="ticket" id="items-ordered">
|
||
<h1>Haldis order {{ order.id }}</h1>
|
||
|
||
{% if not order.is_closed() %}
|
||
<div class="open-order-warning">
|
||
{{ order.stoptime|countdown }}
|
||
<div id="open-message">Refresh page when closed!</div>
|
||
</div>
|
||
{% endif %}
|
||
|
||
{% for dish_name, dish_order_items in order.group_by_dish() -%}
|
||
<div class="dish">
|
||
<h2><span class="quantity">{{ dish_order_items | length }}</span> × {{ dish_name }}</h2>
|
||
{% if dish_order_items | map(attribute="comment") | any -%}
|
||
<ul class="comments">
|
||
{% for item in dish_order_items -%}
|
||
<li>{% if item["comment"] %}{{ item["comment"] }}
|
||
{% else %}<i>No comment</i>
|
||
{% endif %}</li>
|
||
{% endfor %}
|
||
</ul>
|
||
{%- endif %}
|
||
</p>
|
||
</div>
|
||
{%- endfor %}
|
||
<div class="total">Total {{ order.items.count() }} items — {{ total_price|euro }}</div>
|
||
</div>
|
||
|
||
{%- endblock %}
|