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

{% block content %}
<div class="card bg-white mb-3">
  <h3 class="card-header text-center">
    {{ title }} {{ recipe.name }}
  </h3>
  <div class="card-body">
    <ul>
      <li> {% trans "Creater" %} : {{ recipe.creater }}</li>
      <li> {% trans "Ingredients" %} : 
        {% for ingredient in ingredients %} {{ ingredient }}{% if not forloop.last %},{% endif %}{% endfor %}
      </li>
    </ul>
    {% if update %}
        <a class="btn btn-sm btn-secondary" href="{% url "food:recipe_update" pk=recipe.pk %}">
          {% trans "Update" %}
        </a>
    {% endif %}
    <a class="btn btn-sm btn-primary" href="{% url "food:recipe_list" %}">
          {% trans "Return to recipe list" %}
        </a>
  </div>
</div>
{% endblock %}
