haldis/app/templates/utils.html

22 lines
762 B
HTML
Raw Normal View History

2015-03-28 23:06:36 +01:00
{% macro render_order(order) -%}
<div class="row darker">
2015-03-31 00:51:30 +02:00
<div class="col-md-8 col-lg-9">
2015-03-28 23:06:36 +01:00
<h5>{{ order.location.name }}</h5>
2015-03-30 23:02:05 +02:00
<p><b>Status:</b> <span class="time">{{ order.stoptime|countdown }}</span><br/>
2015-03-28 23:06:36 +01:00
<b>Orders:</b> {{ order.items.count() }}</p>
</div>
2015-03-31 00:51:30 +02:00
<div class="col-md-4 col-lg-3">
<a class="btn btn-primary btn-block align-bottom" href="{{ url_for('order_bp.order', id=order.id) }}">Expand</a>
2015-03-28 23:06:36 +01:00
</div>
</div>
2015-03-29 22:44:26 +02:00
{%- 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 %}