2016-09-04 17:24:53 +00:00
|
|
|
{% extends "core/base.jinja" %}
|
2016-07-27 15:23:02 +00:00
|
|
|
|
|
|
|
{% block title %}
|
|
|
|
{% trans %}Product list{% endtrans %}
|
|
|
|
{% endblock %}
|
|
|
|
|
2016-09-04 17:24:53 +00:00
|
|
|
{% block content %}
|
2016-09-04 13:49:25 +00:00
|
|
|
{% if tab == "products" %}
|
2016-07-27 15:23:02 +00:00
|
|
|
<p><a href="{{ url('counter:new_product') }}">{% trans %}New product{% endtrans %}</a></p>
|
2016-09-04 13:49:25 +00:00
|
|
|
{% endif %}
|
2016-07-27 15:23:02 +00:00
|
|
|
{% if product_list %}
|
|
|
|
<h3>{% trans %}Product list{% endtrans %}</h3>
|
2016-09-04 13:49:25 +00:00
|
|
|
{% for t in ProductType.objects.all().order_by('name') %}
|
|
|
|
<h4>{{ t }}</h4>
|
2016-07-27 15:23:02 +00:00
|
|
|
<ul>
|
2016-09-04 13:49:25 +00:00
|
|
|
{% for p in product_list.filter(product_type=t).all().order_by('name') %}
|
2016-07-27 15:23:02 +00:00
|
|
|
<li><a href="{{ url('counter:product_edit', product_id=p.id) }}">{{ p }}</a></li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
2016-09-04 13:49:25 +00:00
|
|
|
{% endfor %}
|
2016-07-27 15:23:02 +00:00
|
|
|
{% else %}
|
|
|
|
{% trans %}There is no products in this website.{% endtrans %}
|
|
|
|
{% endif %}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|