nk20/apps/food/templates/food/qrcode_detail.html

35 lines
1.2 KiB
HTML
Raw Normal View History

{% 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 finished <br>
{{ title }}
</h3>
<div class="card-body">
<p>{% trans 'QR-code number' %} : {{ qrcode.qr_code_number }}</p>
<p>{% trans 'Name' %} : {{ qrcode.food_container.name }}</p>
<p>{% trans 'Owner' %} : {{ qrcode.food_container.owner }}</p>
<p>{% trans 'Expiry date' %} : {{ qrcode.food_container.expiry_date }}</p>
{% if qrcode.food_container.polymorphic_ctype.model == 'basicfood' and can_update_basic %}
<a class="btn btn-sm btn-warning" href="{% url "food:basic_update" pk=qrcode.food_container.pk %}" data-turbolinks="false">
{% trans 'Update' %}
</a>
{% elif can_update_transformed %}
<a class="btn btn-sm btn-warning" href="{% url "food:transformed_update" pk=qrcode.food_container.pk %}">
{% trans 'Update' %}
</a>
{% endif %}
{% if can_add_ingredient %}
<a class="btn btn-sm btn-success" href="{% url "food:add_ingredient" pk=qrcode.food_container.pk %}">
{% trans 'Add the ingredient' %}
</a>
{% endif %}
</div>
</div>
{% endblock %}