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.
121 lines
5.5 KiB
121 lines
5.5 KiB
{% extends 'base.html' %}
|
|
{% block main %}
|
|
|
|
|
|
<ol class="breadcrumb">
|
|
<li><span class="glyphicon glyphicon-home"></span></li>
|
|
<li><a href="{% url 'abonapp:group_list' %}">Группы абонентов</a></li>
|
|
<li class="active">{{ abon_group.title }}</li>
|
|
</ol>
|
|
|
|
{% include 'message_block.html' %}
|
|
|
|
<h3>Народ в выбранной группе</h3>
|
|
<div class="table-responsive">
|
|
<table class="table table-striped table-bordered">
|
|
<thead>
|
|
<tr>
|
|
<th>
|
|
<a href="{% url 'abonapp:people_list' abon_group.id %}?order_by=username&dir={{ dir|default:"down" }}">
|
|
Абонент
|
|
</a>
|
|
{% if order_by == 'username' %}<span class="glyphicon glyphicon-filter"></span>{% endif %}
|
|
</th>
|
|
<th>
|
|
<a href="{% url 'abonapp:people_list' abon_group.id %}?order_by=ip_address&dir={{ dir|default:"down" }}">
|
|
IP Адрес
|
|
</a>
|
|
{% if order_by == 'ip_address' %}<span class="glyphicon glyphicon-filter"></span>{% endif %}
|
|
</th>
|
|
<th>
|
|
<a href="{% url 'abonapp:people_list' abon_group.id %}?order_by=fio&dir={{ dir|default:"down" }}">
|
|
ФИО
|
|
</a>
|
|
{% if order_by == 'fio' %}<span class="glyphicon glyphicon-filter"></span>{% endif %}
|
|
</th>
|
|
<th>
|
|
<a herf="{% url 'abonapp:people_list' abon_group.id %}?order_by=street&dir={{ dir|default:"down" }}">
|
|
Улица
|
|
</a>
|
|
{% if order_by == 'street' %}<span class="glyphicon glyphicon-filter"></span>{% endif %}
|
|
</th>
|
|
<th width="100">
|
|
<a herf="{% url 'abonapp:people_list' abon_group.id %}?order_by=house&dir={{ dir|default:"down" }}">
|
|
дом/кв
|
|
</a>
|
|
{% if order_by == 'house' %}<span class="glyphicon glyphicon-filter"></span>{% endif %}
|
|
</th>
|
|
<th width="150">Телефон</th>
|
|
<th width="150">Тариф</th>
|
|
<th width="50">
|
|
<a href="{% url 'abonapp:people_list' abon_group.id %}?order_by=ballance&dir={{ dir|default:"down" }}">
|
|
Балланс
|
|
</a>
|
|
{% if order_by == 'ballance' %}<span class="glyphicon glyphicon-filter"></span>{% endif %}
|
|
</th>
|
|
<th width="100">Do</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for human in peoples %}
|
|
{% if human.is_active %}
|
|
<tr>
|
|
{% else %}
|
|
<tr class="danger">
|
|
{% endif %}
|
|
<td><a href="{% url 'abonapp:abon_home' human.group.id human.id %}">{{ human.username }}</a></td>
|
|
<td>{{ human.ip_address|default:'Не назначен' }}</td>
|
|
<td>{{ human.fio }}</td>
|
|
<td>{{ human.street|default:'Не указан' }}</td>
|
|
<td>{{ human.house|default:'Не указан' }}</td>
|
|
<td><a href="tel:{{ human.telephone }}">{{ human.telephone }}</a></td>
|
|
<td>
|
|
{% if human.active_tariff %}
|
|
{% if perms.tariff_app.change_tariff %}
|
|
<a href="{% url 'tarifs:edit' human.active_tariff.id %}">{{ human.active_tariff.title }}</a>
|
|
{% else %}
|
|
{{ human.active_tariff.title }}
|
|
{% endif %}
|
|
{% else %}———
|
|
{% endif %}
|
|
</td>
|
|
<td>{{ human.ballance }}</td>
|
|
<td>
|
|
{% if perms.abonapp.delete_abon %}
|
|
<a href="{% url 'abonapp:del_abon' %}?t=a&id={{ human.id }}" class="btn btn-danger btn-sm">
|
|
<span class="glyphicon glyphicon-remove"></span>
|
|
</a>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% empty %}
|
|
<tr>
|
|
<td colspan="9">
|
|
Ещё нет абонентов.
|
|
{% if perms.abonapp.add_abon %}
|
|
<a href="{% url 'abonapp:add_abon' abon_group.id %}">Добавить</a>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
<td colspan="9" class="btn-group">
|
|
{% if perms.abonapp.add_abon %}
|
|
<a href="{% url 'abonapp:add_abon' abon_group.id %}" class="btn btn-sm btn-default" title="Добавить">
|
|
<span class="glyphicon glyphicon-plus"></span> Добавить абонента
|
|
</a>
|
|
{% endif %}
|
|
<a href="{% url 'abonapp:update_nas' abon_group.id %}" class="btn btn-sm btn-default">
|
|
<span class="glyphicon glyphicon-refresh"></span> Обновить абонентов в NAS
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
|
|
{% include 'toolbar_page.html' with pag=peoples %}
|
|
|
|
{% endblock %}
|