2015-03-27 18:07:06 +01:00
|
|
|
{% extends "layout.html" %}
|
2015-03-27 21:57:37 +01:00
|
|
|
{% set active_page = "orders" -%}
|
|
|
|
|
2015-03-28 00:44:58 +01:00
|
|
|
{% import "bootstrap/wtf.html" as wtf %}
|
2015-03-27 21:57:37 +01:00
|
|
|
{% block container %}
|
2015-03-27 18:07:06 +01:00
|
|
|
<div class="row">
|
2015-03-28 00:44:58 +01:00
|
|
|
<div class="col-md-7"><!-- Shitty html-->
|
2015-03-27 18:07:06 +01:00
|
|
|
<h3>Order {{ order.id }}</h3>
|
2015-03-28 01:09:59 +01:00
|
|
|
Courrier: {{ order.courrier.username }}
|
|
|
|
{% if order.courrier == None %}
|
|
|
|
<a href="{{ url_for('.volunteer', id=order.id) }}" class="btn btn-primary">Volunteer</a>
|
|
|
|
{% endif %}
|
|
|
|
<br/>
|
2015-03-27 18:07:06 +01:00
|
|
|
Location: <a href="{{ order.location.website }}">{{ order.location.name }}</a><br/>
|
|
|
|
Starttime: {{ order.starttime }}<br/>
|
|
|
|
Stoptime: {{ order.stoptime }}<br/>
|
2015-03-28 00:44:58 +01:00
|
|
|
Total price: {{ total_price|euro }}
|
2015-03-27 18:07:06 +01:00
|
|
|
<h3>Orders</h3>
|
|
|
|
{% for item in order.orders %}
|
2015-03-28 00:44:58 +01:00
|
|
|
{{ item.user.username }} - {{ item.food.name }} - {{ item.food.price|euro }}
|
|
|
|
{% if item.can_delete(order.id, current_user.id) -%}<a href="{{ url_for('.delete_item', order_id=order.id, item_id=item.id) }}"><span class="glyphicon glyphicon-remove"></span></a>{%- endif %}<br/>
|
2015-03-27 18:07:06 +01:00
|
|
|
{% endfor %}
|
|
|
|
</div>
|
2015-03-28 00:44:58 +01:00
|
|
|
<div class="col-md-push-1 col-md-4">
|
|
|
|
<h4>Order:</h4>
|
2015-03-28 01:09:59 +01:00
|
|
|
{{ wtf.quick_form(form, action=url_for('.order_item_create', id=order.id), button_map={'submit_button': 'primary'}, form_type='horizontal') }}
|
2015-03-28 00:44:58 +01:00
|
|
|
</div>
|
2015-03-27 18:07:06 +01:00
|
|
|
</div>
|
|
|
|
{% endblock %}
|