{% extends "food_planner/base.html" %}
{% load i18n %}

{% block title %}{{ site.title }} - {% trans "Mealplan" %}{% endblock %}

{% block content %}
    <h1>{% trans "Meal plan: " %}{{ mealplan.name }}</h1>

    <table class="table">
        <thead>
            <tr>
                <th scope="col"></th>
                <th scope="col">{% trans "Monday" %}</th>
                <th scope="col">{% trans "Tuesday" %}</th>
                <th scope="col">{% trans "Wednesday" %}</th>
                <th scope="col">{% trans "Thursday" %}</th>
                <th scope="col">{% trans "Friday" %}</th>
                <th scope="col">{% trans "Saturday" %}</th>
                <th scope="col">{% trans "Sunday" %}</th>
            </tr>
        </thead>
    <tbody>
        <tr>
            <th scope="row">{% trans "Breakfast" %}</th>
            <td>{{ mealplan.monday_breakfast.name }}</td>
            <td>{{ mealplan.tuesday_breakfast.name }}</td>
            <td>{{ mealplan.wednesday_breakfast.name }}</td>
            <td>{{ mealplan.thursday_breakfast.name }}</td>
            <td>{{ mealplan.friday_breakfast.name }}</td>
            <td>{{ mealplan.saturday_breakfast.name }}</td>
            <td>{{ mealplan.sunday_breakfast.name }}</td>
        </tr>
        <tr>
            <th scope="row">{% trans "Morning snack" %}</th>
            <td>{{ mealplan.monday_morning_snack.name }}</td>
            <td>{{ mealplan.tuesday_morning_snack.name }}</td>
            <td>{{ mealplan.wednesday_morning_snack.name }}</td>
            <td>{{ mealplan.thursday_morning_snack.name }}</td>
            <td>{{ mealplan.friday_morning_snack.name }}</td>
            <td>{{ mealplan.saturday_morning_snack.name }}</td>
            <td>{{ mealplan.sunday_morning_snack.name }}</td>
        </tr>
        <tr>
            <th scope="row">{% trans "Lunch" %}</th>
            <td>{{ mealplan.monday_lunch.name }}</td>
            <td>{{ mealplan.tuesday_lunch.name }}</td>
            <td>{{ mealplan.wednesday_lunch.name }}</td>
            <td>{{ mealplan.thursday_lunch.name }}</td>
            <td>{{ mealplan.friday_lunch.name }}</td>
            <td>{{ mealplan.saturday_lunch.name }}</td>
            <td>{{ mealplan.sunday_lunch.name }}</td>
        </tr>
        <tr>
            <th scope="row">{% trans "Afternoon snack" %}</th>
            <td>{{ mealplan.monday_afternoon_snack.name }}</td>
            <td>{{ mealplan.tuesday_afternoon_snack.name }}</td>
            <td>{{ mealplan.wednesday_afternoon_snack.name }}</td>
            <td>{{ mealplan.thursday_afternoon_snack.name }}</td>
            <td>{{ mealplan.friday_afternoon_snack.name }}</td>
            <td>{{ mealplan.saturday_afternoon_snack.name }}</td>
            <td>{{ mealplan.sunday_afternoon_snack.name }}</td>
        </tr>
        <tr>
            <th scope="row">{% trans "Dinner" %}</th>
            <td>{{ mealplan.monday_dinner.name }}</td>
            <td>{{ mealplan.tuesday_dinner.name }}</td>
            <td>{{ mealplan.wednesday_dinner.name }}</td>
            <td>{{ mealplan.thursday_dinner.name }}</td>
            <td>{{ mealplan.friday_dinner.name }}</td>
            <td>{{ mealplan.saturday_dinner.name }}</td>
            <td>{{ mealplan.sunday_dinner.name }}</td>
        </tr>
        <tr>
            <th scope="row">{% trans "Calories vs demand" %}</th>
            <td>{{ calories_monday }}%</td>
            <td>{{ calories_tuesday }}%</td>
            <td>{{ calories_wednesday }}%</td>
            <td>{{ calories_thursday }}%</td>
            <td>{{ calories_friday }}%</td>
            <td>{{ calories_saturday }}%</td>
            <td>{{ calories_sunday }}%</td>
        </tr>
    </tbody>
    </table>
{% endblock %}
