2024-07-03 17:20:01 +00:00
|
|
|
{% 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">
|
2024-08-06 13:20:22 +00:00
|
|
|
<h3 class="card-header text-center">
|
2024-08-17 00:28:27 +00:00
|
|
|
{{ title }} {% trans 'number' %} {{ qrcode.qr_code_number }}
|
2024-08-06 13:20:22 +00:00
|
|
|
</h3>
|
|
|
|
<div class="card-body">
|
2024-08-17 00:28:27 +00:00
|
|
|
<ul>
|
|
|
|
<li><p>{% trans 'Name' %} : {{ qrcode.food_container.name }}</p></li>
|
|
|
|
<li><p>{% trans 'Owner' %} : {{ qrcode.food_container.owner }}</p></li>
|
|
|
|
<li><p>{% trans 'Expiry date' %} : {{ qrcode.food_container.expiry_date }}</p></li>
|
|
|
|
</ul>
|
2024-08-13 23:32:55 +00:00
|
|
|
{% 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>
|
2024-08-06 13:20:22 +00:00
|
|
|
{% endif %}
|
2024-08-17 00:28:27 +00:00
|
|
|
{% if can_view_detail %}
|
|
|
|
<a class="btn btn-sm btn-primary" href="{% url "food:food_view" pk=qrcode.food_container.pk %}">
|
|
|
|
{% trans 'View details' %}
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
2024-08-13 23:32:55 +00:00
|
|
|
{% if can_add_ingredient %}
|
|
|
|
<a class="btn btn-sm btn-success" href="{% url "food:add_ingredient" pk=qrcode.food_container.pk %}">
|
2024-08-17 00:28:27 +00:00
|
|
|
{% trans 'Add to a meal' %}
|
2024-08-13 23:32:55 +00:00
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
2024-07-03 17:20:01 +00:00
|
|
|
</div>
|
|
|
|
{% endblock %}
|