Better close button

This commit is contained in:
Feliciaan De Palmenaer 2015-03-28 10:49:28 +01:00
parent 09e3aece73
commit 8b99a763d8

View file

@ -5,10 +5,10 @@
{% block container %} {% block container %}
<div class="row"> <div class="row">
<div class="col-md-7"><!-- Shitty html--> <div class="col-md-7"><!-- Shitty html-->
<h3>Order {{ order.id }}</h3> <h3>Order {{ order.id }}
{% if (current_user.id == order.courrier_id or current_user.is_admin()) and not order.stoptime -%} {% if (current_user.id == order.courrier_id and (not order.stoptime)) or current_user.is_admin() -%}
<a class="btn btn-danger" href="{{ url_for('.close_order', id=order.id) }}">Close</a><br/> <a class="btn btn-danger" href="{{ url_for('.close_order', id=order.id) }}">Close</a><br/>
{%- endif %} {%- endif %}</h3>
Courrier: {{ order.courrier.username }} Courrier: {{ order.courrier.username }}
{% if order.courrier == None %} {% if order.courrier == None %}
<a href="{{ url_for('.volunteer', id=order.id) }}" class="btn btn-primary">Volunteer</a> <a href="{{ url_for('.volunteer', id=order.id) }}" class="btn btn-primary">Volunteer</a>