You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
87 lines
3.8 KiB
87 lines
3.8 KiB
{% extends request.is_ajax|yesno:'nullcont.htm,tariff_app/ext.html' %}
|
|
{% load i18n %}
|
|
{% load dpagination %}
|
|
{% block content %}
|
|
|
|
<div class="table-responsive">
|
|
<table class="table table-striped table-bordered">
|
|
<thead>
|
|
<tr>
|
|
<th>
|
|
<a href="{% url 'tarifs:home' %}?{% url_order_by request order_by='title' %}">
|
|
{% trans 'tariff' %}
|
|
</a>
|
|
{% if order_by == 'title' %}<span class="glyphicon glyphicon-filter"></span>{% endif %}
|
|
</th>
|
|
<th>
|
|
<a href="{% url 'tarifs:home' %}?{% url_order_by request order_by='speedIn' %}">
|
|
{% trans 'Speed In' %}
|
|
</a>
|
|
{% if order_by == 'speedIn' %}<span class="glyphicon glyphicon-filter"></span>{% endif %}
|
|
</th>
|
|
<th>
|
|
<a href="{% url 'tarifs:home' %}?{% url_order_by request order_by='speedOut' %}">
|
|
{% trans 'Speed Out' %}
|
|
</a>
|
|
{% if order_by == 'speedOut' %}<span class="glyphicon glyphicon-filter"></span>{% endif %}
|
|
</th>
|
|
<th>
|
|
<a href="{% url 'tarifs:home' %}?{% url_order_by request order_by='amount' %}">
|
|
{% trans 'Price' %}
|
|
</a>
|
|
{% if order_by == 'amount' %}<span class="glyphicon glyphicon-filter"></span>{% endif %}
|
|
</th>
|
|
<th width="250">{% trans 'Script' %}</th>
|
|
<th width="50">#</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% with can_ch_trf=perms.tariff_app.change_tariff can_del_trf=perms.tariff_app.delete_tariff %}
|
|
{% for tar in tariflist %}
|
|
<tr>
|
|
<td>
|
|
{% if can_ch_trf %}
|
|
<a href="{% url 'tarifs:edit' tar.id %}"><b>{{ tar.title }}</b></a>
|
|
{% else %}
|
|
{{ tar.title }}
|
|
{% endif %}
|
|
</td>
|
|
<td>{{ tar.speedIn }}</td>
|
|
<td>{{ tar.speedOut }}</td>
|
|
<td>{{ tar.amount }} {% trans 'currency' %}</td>
|
|
<td>{{ tar.get_calc_type_display }}</td>
|
|
<td>
|
|
{% if can_del_trf %}
|
|
<a href="{% url 'tarifs:del' tar.id %}" class="btn btn-sm btn-danger btn-modal">
|
|
<span class="glyphicon glyphicon-remove-circle"></span>
|
|
</a>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% empty %}
|
|
<tr>
|
|
<td colspan="6">{% trans 'Services does not exist yet' %}.
|
|
{% if perms.tariff_app.add_tariff %}
|
|
<a href="{% url 'tarifs:add' %}" class="lgtbx">{% trans 'Create' %}</a>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
{% endwith %}
|
|
</tbody>
|
|
|
|
{% if perms.tariff_app.add_tariff %}
|
|
<tfoot>
|
|
<tr>
|
|
<td colspan="6">
|
|
<a href="{% url 'tarifs:add' %}" class="btn btn-sm btn-success">
|
|
<span class="glyphicon glyphicon-plus"></span> {% trans 'Add' %}
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
</tfoot>
|
|
{% endif %}
|
|
|
|
</table>
|
|
</div>
|
|
{% endblock %}
|