{% extends "base.html" %}
{% comment %}
Copyright (C) 2018-2025 by BDE ENS Paris-Saclay
SPDX-License-Identifier: GPL-3.0-or-later
{% endcomment %}
{% load render_table from django_tables2 %}
{% load static i18n %}

{% block content %}
<div class="card bg-white mb-3">
    <h3 class="card-header text-center">
        {{ title }}
    </h3>
    <a class="btn btn-primary" href="{% url 'food:served_order_list' activity_pk=activity.pk %}">{% trans "View served orders" %}</a>
      {% for table in tables %}
        <div class="card bg-light mb-3" id="orders_table_{{ table.prefix }}">
        <h3 class="card-header text-center">
            {% trans "Orders of " %} {{ table.prefix }} 
        </h3>
        {% if table.data %}
            {% render_table table %}
        {% endif %}
        </div>
      {% endfor %}
</div>
{% endblock %}

{% block extrajavascript %}
<script src="{% static "food/js/order.js" %}"></script>
{% endblock%}