{% 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 i18n %}

{% block content %}

  <!-- Colonne de plats -->
  <div style="display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2rem;">
  {% for food, quantity in orders.items %}
    <div class="card bg-white mb-3" style="flex: 1 1 calc(33.333% - 1rem); border: 1px solid #ccc; padding: 1rem; border-radius: 0.5rem; box-sizing: border-box;">
        
        <h3 class="card-header text-center">
      <strong>{{ food }}</strong><br>
      </h3>
      <h1 class="card-body text-center">
      {{ quantity }}</h1>
    </div>
  {% endfor %}
</div>

  <!-- Colonne de la table -->
        <div class="card bg-white mb-3">
            <h3 class="card-header text-center">
                {% trans "Special orders" %}
            </h3>
            {% if table.data %}
            {% render_table table %}
            {% else %}
            <div class="card-body">
                <div class="alert alert-warning">
                    {% trans "There are no special orders." %}
                </div>
            </div>
            {% endif %}
        </div>

{% endblock %}