mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-13 06:06:06 +00:00
Improvements in counter admin templates
This commit is contained in:
1 parent
d93dda1c0e
commit
e1ce661a04
13 files changed
+291
-131
No files matched your search
@@ -1,18 +1,23 @@
|
||||
{% extends "core/base.jinja" %}
|
||||
{% extends "counter/counter_base.jinja" %}
|
||||
|
||||
{% block title %}
|
||||
{% trans %}Product list{% endtrans %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block admin_content %}
|
||||
{% if tab == "products" %}
|
||||
<p><a href="{{ url('counter:new_product') }}">{% trans %}New product{% endtrans %}</a></p>
|
||||
{% endif %}
|
||||
{% if product_list %}
|
||||
<h3>{% trans %}Product list{% endtrans %}</h3>
|
||||
{% for t in ProductType.objects.all().order_by('name') %}
|
||||
<h4>{{ t }}</h4>
|
||||
<ul>
|
||||
{% for p in product_list %}
|
||||
{% for p in product_list.filter(product_type=t).all().order_by('name') %}
|
||||
<li><a href="{{ url('counter:product_edit', product_id=p.id) }}">{{ p }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% trans %}There is no products in this website.{% endtrans %}
|
||||
{% endif %}
|
||||
|
||||
Reference in new issue
Block a user