haldis/app/templates/utils.html

26 lines
933 B
HTML
Raw Normal View History

2015-03-31 20:15:22 +02:00
{% macro render_order(order) -%}
2019-12-05 19:39:35 +01:00
<div class="row darke order_row">
<div class="col-md-8 col-lg-9 order_data">
<h5>{{ order.location_name }}</h5>
<b class="amount_of_orders">{{ order.items.count() }} orders</b></p>
<p class="time_data">
{% if order.stoptime %}
<span><b>Closes </b>{{ order.stoptime.strftime("%H:%M") }}</span><span class="time">{{ order.stoptime|countdown }}</span>
{% else %}open{% endif %}<br/>
</div>
<div class="col-md-4 col-lg-3 expand_button_wrapper">
<a class="btn btn-primary btn-block align-bottom expand_button" href="{{ url_for('order_bp.order_from_id', order_id=order.id) }}">Expand</a>
</div>
2015-03-31 20:15:22 +02:00
</div>
{%- endmacro %}
{% macro render_form_field_errors(field) %}
{%- if field.errors %}
{%- for error in field.errors %}
<p class="help-block">{{error}}</p>
{%- endfor %}
2015-03-31 20:15:22 +02:00
{%- elif field.description -%}
<p class="help-block">{{field.description|safe}}</p>
2015-03-31 20:15:22 +02:00
{%- endif %}
{% endmacro %}