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-08 00:09:17 +00:00
|
|
|
{% if current_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-10-03 22:41:08 +00:00
|
|
|
<li><a href="{{ url('counter:product_edit', product_id=p.id) }}">{{ p }} ({{ p.code }})</a></li>
|
2016-07-27 15:23:02 +00:00
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
2016-09-04 13:49:25 +00:00
|
|
|
{% endfor %}
|
2016-09-29 14:19:05 +00:00
|
|
|
<h4>{% trans %}Uncategorized{% endtrans %}</h4>
|
|
|
|
<ul>
|
|
|
|
{% for p in product_list.filter(product_type=None).all().order_by('name') %}
|
2016-10-03 22:41:08 +00:00
|
|
|
<li><a href="{{ url('counter:product_edit', product_id=p.id) }}">{{ p }} ({{ p.code }})</a></li>
|
2016-09-29 14:19:05 +00:00
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
2016-07-27 15:23:02 +00:00
|
|
|
{% else %}
|
|
|
|
{% trans %}There is no products in this website.{% endtrans %}
|
|
|
|
{% endif %}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|