{% extends "base.html" %}
{% comment %}
SPDX-License-Identifier: GPL-3.0-or-later
{% endcomment %}
{% load i18n crispy_forms_tags %}

{% block content %}
<div class="card bg-white mb-3">
  <h3 class="card-header text-center">
    HTML not finished <br>
    {{ title }}
  </h3>
  <div class="card-body">
    <p>name : {{ food.name }}</p>
    <p>owner : {{ food.owner }}</p>
    <p>creation_date : {{ food.creation_date }}</p>
    <p>expiry_date : {{ food.expiry_date }}</p>
    <p>allergens :</p>
    <ul>
      {% for allergen in food.allergens.iterator %}
        <li>{{ allergen.name }}</li>
      {% endfor %}
    </ul>
    <p>ingredients :</p>
    <ul>
      {% for ingredient in food.ingredient.iterator %}
        <li><a href="{% url "food:food_view" pk=ingredient.pk %}">{{ ingredient.name }}</a></li>
      {% endfor %}
    </ul>
    <a href="{% url "food:transformed_update" pk=food.pk %}">Update</a>
  </div>
</div>
{% endblock %}
