Sith/counter/templates/counter/counter_list.jinja

68 lines
2.4 KiB
Plaintext
Raw Normal View History

{% extends "core/base.jinja" %}
2016-03-28 12:54:35 +00:00
{% block title %}
2016-07-19 17:03:16 +00:00
{% trans %}Counter admin list{% endtrans %}
2016-03-28 12:54:35 +00:00
{% endblock %}
{% block content %}
2016-07-19 17:03:16 +00:00
<p><a href="{{ url('counter:new') }}">{% trans %}New counter{% endtrans %}</a></p>
{% if counter_list %}
<h3>{% trans %}Counter admin list{% endtrans %}</h3>
<h4>{% trans %}Eboutic{% endtrans %}</h4>
2016-07-19 17:03:16 +00:00
<ul>
{% for c in counter_list.filter(type="EBOUTIC").order_by('name') %}
<li>
<a href="{{ url('eboutic:main') }}">{{ c }}</a> -
{% if user.can_edit(c) %}
<a href="{{ url('counter:admin', counter_id=c.id) }}">{% trans %}Edit{% endtrans %}</a> -
2016-09-15 09:07:03 +00:00
<a href="{{ url('counter:stats', counter_id=c.id) }}">{% trans %}Stats{% endtrans %}</a> -
{% endif %}
{% if user.is_owner(c) %}
<a href="{{ url('counter:prop_admin', counter_id=c.id) }}">{% trans %}Props{% endtrans %}</a>
2016-07-22 11:34:34 +00:00
{% endif %}
</li>
{% endfor %}
</ul>
<h4>{% trans %}Bars{% endtrans %}</h4>
<ul>
{% for c in counter_list.filter(type="BAR").order_by('name') %}
<li>
<a href="{{ url('counter:details', counter_id=c.id) }}">{{ c }}</a> -
{% if user.can_edit(c) %}
<a href="{{ url('counter:admin', counter_id=c.id) }}">{% trans %}Edit{% endtrans %}</a> -
2016-09-15 09:07:03 +00:00
<a href="{{ url('counter:stats', counter_id=c.id) }}">{% trans %}Stats{% endtrans %}</a> -
{% endif %}
{% if user.is_owner(c) %}
<a href="{{ url('counter:prop_admin', counter_id=c.id) }}">{% trans %}Props{% endtrans %}</a> -
{%if c.stock %}
<a href="{{ url('stock:main', stock_id=c.stock.id) }}">{{c.stock}}</a>
{% else %}
<a href="{{ url('stock:new', counter_id=c.id) }}">{% trans %}Create new stock{% endtrans%}</a>
{% endif %}
{% endif %}
</li>
{% endfor %}
</ul>
<h4>{% trans %}Offices{% endtrans %}</h4>
<ul>
{% for c in counter_list.exclude(type="BAR").exclude(type="EBOUTIC").order_by('name') %}
<li>
<a href="{{ url('counter:details', counter_id=c.id) }}">{{ c }}</a> -
{% if user.can_edit(c) %}
<a href="{{ url('counter:admin', counter_id=c.id) }}">{% trans %}Edit{% endtrans %}</a> -
2016-09-15 09:07:03 +00:00
<a href="{{ url('counter:stats', counter_id=c.id) }}">{% trans %}Stats{% endtrans %}</a> -
{% endif %}
{% if user.is_owner(c) %}
<a href="{{ url('counter:prop_admin', counter_id=c.id) }}">{% trans %}Props{% endtrans %}</a>
{% endif %}
</li>
2016-07-19 17:03:16 +00:00
{% endfor %}
</ul>
{% else %}
{% trans %}There is no counters in this website.{% endtrans %}
{% endif %}
2016-03-28 12:54:35 +00:00
{% endblock %}