haldis/app/templates/utils.html

26 lines
904 B
HTML
Raw Normal View History

2015-03-31 20:15:22 +02:00
{% macro render_order(order) -%}
<div class="row darker">
<div class="col-md-8 col-lg-9">
<h5>{{ order.location.name }}</h5>
<p>
{% if order.stoptime %}
<b>Closing time: </b>{{ order.stoptime.strftime("%H:%M") }} (<span class="time">{{ order.stoptime|countdown }}</span>)
{% else %}open{% endif %}<br/>
2015-03-31 20:15:22 +02:00
<b>Orders:</b> {{ order.items.count() }}</p>
</div>
<div class="col-md-4 col-lg-3">
2019-10-24 14:13:13 +02:00
<a class="btn btn-primary btn-block align-bottom" href="{{ url_for('order_bp.order_from_id', order_id=order.id) }}">Expand</a>
2015-03-31 20:15:22 +02:00
</div>
</div>
{%- endmacro %}
{% macro render_form_field_errors(field) %}
{%- if field.errors %}
{%- for error in field.errors %}
<p class="help-block">{{error}}</p>
{%- endfor %}
{%- elif field.description -%}
<p class="help-block">{{field.description|safe}}</p>
{%- endif %}
{% endmacro %}