{% extends "layout.html" -%}
{% set active_page = "home" -%}
{% import "utils.html" as util -%}
{% block container %}
Hi, I'm Haldis
What would you like to eat?
{% if orders|count > 0 -%}
Open orders:
{% for order in orders %}
{{ util.render_order(order) }}
{% endfor %}
{% else %}
No orders available.
{% if not current_user.is_anonymous() %}
To create an order, fill in the form here.
{% else %}
Login to create an order, or ask someone else.
{% endif %}
{%- endif %}
{% if recently_closed|count > 0 -%}
Recently closed orders:
{% for order in recently_closed %}
{{ util.render_order(order) }}
{% endfor %}
{%- endif %}