1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-21 18:08:21 +02:00

Edit food HTML template for translation, translations. Now the mandatory allergens are automatically created

This commit is contained in:
quark
2024-08-06 15:20:22 +02:00
parent 1c5ed2bd3f
commit b2b1f03b46
8 changed files with 964 additions and 83 deletions

View File

@ -6,19 +6,19 @@ SPDX-License-Identifier: GPL-3.0-or-later
{% 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>qrcode : {{ qrcode.qr_code_number }}</p>
<p>name : {{ qrcode.food_container.name }}</p>
{% if qrcode.food_container.polymorphic_ctype.name == 'Basic food' %}
<a href="{% url "food:basic_update" pk=qrcode.food_container.pk %}">Update</a>
{% else %}
<a href="{% url "food:transformed_update" pk=qrcode.food_container.pk %}">Update</a>
{% endif %}
<a href="{% url "food:add_ingredient" pk=qrcode.food_container.pk %}">Add the ingrdient</a>
</div>
<h3 class="card-header text-center">
HTML not finished <br>
{{ title }}
</h3>
<div class="card-body">
<p>{% trans 'QR-code' %} : {{ qrcode.qr_code_number }}</p>
<p>{% trans 'Name' %} : {{ qrcode.food_container.name }}</p>
{% if qrcode.food_container.polymorphic_ctype.name == 'Basic food' %}
<a href="{% url "food:basic_update" pk=qrcode.food_container.pk %}">{% trans 'Update' %}</a>
{% else %}
<a href="{% url "food:transformed_update" pk=qrcode.food_container.pk %}">{% trans 'Update' %}</a>
{% endif %}
<a href="{% url "food:add_ingredient" pk=qrcode.food_container.pk %}">{% trans 'Add the ingredient' %}</a>
</div>
</div>
{% endblock %}