2019-05-29 20:12:19 +02:00
|
|
|
|
{% extends "bootstrap/base.html" %}
|
|
|
|
|
{% import "bootstrap/utils.html" as utils %}
|
|
|
|
|
|
|
|
|
|
{% block title %}
|
|
|
|
|
Haldis - Order {{ order.id }}
|
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
|
|
{% block styles %}
|
2020-02-29 17:23:20 +01:00
|
|
|
|
{{ super() }}
|
2021-06-21 00:46:29 +02:00
|
|
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/shop_view.css') }}" media="screen">
|
2019-05-29 20:12:19 +02:00
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
|
|
{% block scripts %}
|
2020-02-29 17:23:20 +01:00
|
|
|
|
{{ super() }}
|
|
|
|
|
<script type="text/javascript" src="{{ url_for('static', filename='js/timer.js') }}"></script>
|
2020-03-05 00:37:16 +01:00
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
$("#open-message").html("Wait until order is closed!");
|
|
|
|
|
</script>
|
2019-05-29 20:12:19 +02:00
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
|
|
{% block content -%}
|
2020-02-29 17:23:20 +01:00
|
|
|
|
{{ utils.flashed_messages(container=True) }}
|
|
|
|
|
|
2021-06-21 00:46:29 +02:00
|
|
|
|
<div class="ticket" id="items-ordered">
|
2020-02-29 17:23:20 +01:00
|
|
|
|
<h1>Haldis order {{ order.id }}</h1>
|
|
|
|
|
|
|
|
|
|
{% if not order.is_closed() %}
|
|
|
|
|
<div class="open-order-warning">
|
2020-03-05 00:37:16 +01:00
|
|
|
|
{{ order.stoptime|countdown }}
|
|
|
|
|
<div id="open-message">Refresh page when closed!</div>
|
2020-02-29 17:23:20 +01:00
|
|
|
|
</div>
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
2021-06-21 02:05:11 +02:00
|
|
|
|
{% for dish_name, dish_quantity, dish_comment_groups in order.group_by_dish() -%}
|
2020-02-29 17:23:20 +01:00
|
|
|
|
<div class="dish">
|
2021-06-21 02:05:11 +02:00
|
|
|
|
<h2><span class="quantity">{{ dish_quantity }}</span> × {{ dish_name }}</h2>
|
|
|
|
|
{% if dish_comment_groups | map("first") | any -%}
|
2020-02-29 17:23:20 +01:00
|
|
|
|
<ul class="comments">
|
2021-06-21 02:05:11 +02:00
|
|
|
|
{% for comment, items in dish_comment_groups -%}
|
|
|
|
|
<li><span class="quantity">{{ items | length }}</span> ×
|
2021-06-21 02:08:32 +02:00
|
|
|
|
{% if comment %}{{ comment }}
|
2020-02-29 17:23:20 +01:00
|
|
|
|
{% 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>
|
2019-05-29 20:12:19 +02:00
|
|
|
|
|
2019-10-31 11:11:52 +01:00
|
|
|
|
{%- endblock %}
|