diff --git a/counter/templates/counter/product_form.jinja b/counter/templates/counter/product_form.jinja index be1fd850..c30b3e86 100644 --- a/counter/templates/counter/product_form.jinja +++ b/counter/templates/counter/product_form.jinja @@ -83,8 +83,17 @@ {% endmacro %} {% block content %} +
+
+ {%- trans trimmed -%} + You can see product details. + However, you cannot edit it, thus you won't be able + to submit this form. + {%- endtrans -%} +
+
{% if object %} -

{% trans name=object %}Edit product {{ name }}{% endtrans %}

+

{{ object }}

{% trans %}Creation date{% endtrans %} : {{ object.created_at|date }}

{% trans %}Last update{% endtrans %} : {{ object.updated_at|date }}

{% else %} @@ -127,19 +136,17 @@ {{ form.price_formset.management_form }}
{%- for form in form.price_formset.forms -%} -
- {{ price_form(form) }} -
+
{{ price_form(form) }}
{%- endfor -%}
- + {% if user.has_perm("counter.change_product") %} + + {% endif %}
@@ -165,11 +172,16 @@ - + {% if user.has_perm("counter.change_product") %} + + {% endif %}
{{ form.archived.as_field_group() }}
-

+ + {% if user.has_perm("counter.change_product") %} +

+ {% endif %} {% endblock %} diff --git a/counter/templates/counter/product_list.jinja b/counter/templates/counter/product_list.jinja index ca2e4c4d..b5c3c7fa 100644 --- a/counter/templates/counter/product_list.jinja +++ b/counter/templates/counter/product_list.jinja @@ -80,9 +80,11 @@

{% trans %}Product list{% endtrans %}

- - {% trans %}New product{% endtrans %} - + {% if user.has_perm("counter.add_product") %} + + {% trans %}New product{% endtrans %} + + {% endif %}