diff --git a/app/templates/order.html b/app/templates/order.html index cbdde26..c0a9f80 100644 --- a/app/templates/order.html +++ b/app/templates/order.html @@ -29,6 +29,109 @@
+
+

My items

+ {% if my_items %} +
    + {% for item in my_items %} +
  • + {% if item.can_delete(order.id, current_user.id, session.get('anon_name', '')) -%} +
    + +
    + {%- endif %} + {{ item.dish_name }}{% if item.comment %}; {{ item.comment }}{% endif %} {{ item.price | euro }} +
  • + {% endfor %} +
+ {% else %} +
(None)
+ {% endif %} +
+ + + {% if form %} + + + +
+

Add item to order

+ + {% for dish in order.location.dishes %} +
+ {{ form.csrf_token }} + + + {% if form.dish_id.errors %} +
+ {{ util.render_form_field_errors(form.dish_id) }} +
+ {% endif %} + +
+ + {{ dish.name }} + + + {{ dish.price_range() | price_range }} + + {% if dish.description %}
{{ dish.description }}
{% endif %} + {% for (choice_type, choice) in dish.choices %} +
+
+ +
+ {% endfor %} + +
+ {{ form.comment.label }}
+ {{ form.comment(class='form-control', placeholder='Fill in comment, when applicable') }} + {{ util.render_form_field_errors(form.comment) }} +
+ + {% if current_user.is_anonymous() %} +
+ {{ form.user_name.label(class='control-label') }} + {{ form.user_name(class='form-control', placeholder='Fill in your name...') }} + {{ util.render_form_field_errors(form.user_name) }} +
+ {% endif %} +
+ {{ form.submit_button(class='btn btn-primary') }} +
+
+
+ {% endfor %} +
+ + {% endif %} + + {% if form %} +
+ +
+ {% endif %} + +

Order information

@@ -83,107 +186,6 @@
- - {% if form %} - - - -
-

Add item to order

- - {% for dish in order.location.dishes %} -
- {{ form.csrf_token }} - - - {% if form.dish_id.errors %} -
- {{ util.render_form_field_errors(form.dish_id) }} -
- {% endif %} - -
- - {{ dish.name }} - {% if dish.tags %} {{ dish.tags | join(", ") }}{% endif %} - {% if dish.description %}{{ dish.description }}{% endif %} - - {{ dish.price_range() | price_range }} - - {% for (choice_type, choice) in dish.choices %} -
-
- -
- {% endfor %} - -
- {{ form.comment.label }}
- {{ form.comment(class='form-control', placeholder='Fill in comment, when applicable') }} - {{ util.render_form_field_errors(form.comment) }} -
- - {% if current_user.is_anonymous() %} -
- {{ form.user_name.label(class='control-label') }} - {{ form.user_name(class='form-control', placeholder='Fill in your name...') }} - {{ util.render_form_field_errors(form.user_name) }} -
- {% endif %} -
- {{ form.submit_button(class='btn btn-primary') }} -
-
-
- {% endfor %} -
- - {% endif %} - - {% if form %} - - -
- {% endif %} - - -
-

My items

- {% if my_items %} -
    - {% for item in my_items %} -
  • - {% if item.can_delete(order.id, current_user.id, session.get('anon_name', '')) -%} -
    - -
    - {%- endif %} - {{ item.dish_name }}{% if item.comment %}; {{ item.comment }}{% endif %} {{ item.price | euro }} -
  • - {% endfor %} -
- {% else %} -
(None)
- {% endif %} -
-

Ordering at {{ order.location_name }}

@@ -289,7 +291,7 @@ {% endfor %}
  • - +