|
|
|
@ -12,112 +12,125 @@ |
|
|
|
{% include 'message_block.html' %} |
|
|
|
|
|
|
|
<h3>{% trans 'The people in the selected group' %}</h3> |
|
|
|
<div class="table-responsive"> |
|
|
|
<table class="table table-striped table-bordered"> |
|
|
|
<thead> |
|
|
|
<tr> |
|
|
|
<th> |
|
|
|
<a href="{% url 'abonapp:people_list' abon_group.pk %}?order_by=username&dir={{ dir|default:"down" }}"> |
|
|
|
{% trans 'Sub' %} |
|
|
|
</a> |
|
|
|
{% if order_by == 'username' %}<span class="glyphicon glyphicon-filter"></span>{% endif %} |
|
|
|
</th> |
|
|
|
<th> |
|
|
|
<a href="{% url 'abonapp:people_list' abon_group.pk %}?order_by=ip_address&dir={{ dir|default:"down" }}"> |
|
|
|
{% trans 'Ip address' %} |
|
|
|
</a> |
|
|
|
{% if order_by == 'ip_address' %}<span class="glyphicon glyphicon-filter"></span>{% endif %} |
|
|
|
</th> |
|
|
|
<th> |
|
|
|
<a href="{% url 'abonapp:people_list' abon_group.pk %}?order_by=fio&dir={{ dir|default:"down" }}"> |
|
|
|
{% trans 'fio' %} |
|
|
|
</a> |
|
|
|
{% if order_by == 'fio' %}<span class="glyphicon glyphicon-filter"></span>{% endif %} |
|
|
|
</th> |
|
|
|
<th> |
|
|
|
<a herf="{% url 'abonapp:people_list' abon_group.pk %}?order_by=street&dir={{ dir|default:"down" }}"> |
|
|
|
{% trans 'Street' %} |
|
|
|
</a> |
|
|
|
{% if order_by == 'street' %}<span class="glyphicon glyphicon-filter"></span>{% endif %} |
|
|
|
</th> |
|
|
|
<th width="100"> |
|
|
|
<a herf="{% url 'abonapp:people_list' abon_group.pk %}?order_by=house&dir={{ dir|default:"down" }}"> |
|
|
|
{% trans 'House' %}/{% trans 'Apartment' %} |
|
|
|
</a> |
|
|
|
{% if order_by == 'house' %}<span class="glyphicon glyphicon-filter"></span>{% endif %} |
|
|
|
</th> |
|
|
|
<th width="150">{% trans 'Telephone' %}</th> |
|
|
|
<th width="150">{% trans 'Service' %}</th> |
|
|
|
<th width="50"> |
|
|
|
<a href="{% url 'abonapp:people_list' abon_group.pk %}?order_by=ballance&dir={{ dir|default:"down" }}"> |
|
|
|
{% trans 'Ballance' %} |
|
|
|
</a> |
|
|
|
{% if order_by == 'ballance' %}<span class="glyphicon glyphicon-filter"></span>{% endif %} |
|
|
|
</th> |
|
|
|
<th width="100">#</th> |
|
|
|
</tr> |
|
|
|
</thead> |
|
|
|
<tbody> |
|
|
|
{% for human in peoples %} |
|
|
|
{% if human.is_active %} |
|
|
|
<div class="row"> |
|
|
|
<div class="col-lg-10"> |
|
|
|
<div class="table-responsive"> |
|
|
|
<table class="table table-striped table-bordered"> |
|
|
|
<thead> |
|
|
|
<tr> |
|
|
|
{% else %} |
|
|
|
<tr class="danger"> |
|
|
|
{% endif %} |
|
|
|
<td><a href="{% url 'abonapp:abon_home' human.group.pk human.pk %}">{{ human.username }}</a></td> |
|
|
|
<td>{{ human.ip_address|default:_('Not assigned') }}</td> |
|
|
|
<td>{{ human.fio }}</td> |
|
|
|
<td>{{ human.street|default:_('Not assigned') }}</td> |
|
|
|
<td>{{ human.house|default:_('Not assigned') }}</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.pk %}">{{ human.active_tariff.title }}</a> |
|
|
|
{% else %} |
|
|
|
{{ human.active_tariff.title }} |
|
|
|
<th> |
|
|
|
<a href="{% url 'abonapp:people_list' abon_group.pk %}?order_by=username&dir={{ dir|default:"down" }}"> |
|
|
|
{% trans 'Sub' %} |
|
|
|
</a> |
|
|
|
{% if order_by == 'username' %}<span class="glyphicon glyphicon-filter"></span>{% endif %} |
|
|
|
</th> |
|
|
|
<th> |
|
|
|
<a href="{% url 'abonapp:people_list' abon_group.pk %}?order_by=ip_address&dir={{ dir|default:"down" }}"> |
|
|
|
{% trans 'Ip address' %} |
|
|
|
</a> |
|
|
|
{% if order_by == 'ip_address' %}<span class="glyphicon glyphicon-filter"></span>{% endif %} |
|
|
|
</th> |
|
|
|
<th> |
|
|
|
<a href="{% url 'abonapp:people_list' abon_group.pk %}?order_by=fio&dir={{ dir|default:"down" }}"> |
|
|
|
{% trans 'fio' %} |
|
|
|
</a> |
|
|
|
{% if order_by == 'fio' %}<span class="glyphicon glyphicon-filter"></span>{% endif %} |
|
|
|
</th> |
|
|
|
<th> |
|
|
|
<a herf="{% url 'abonapp:people_list' abon_group.pk %}?order_by=street&dir={{ dir|default:"down" }}"> |
|
|
|
{% trans 'Street' %} |
|
|
|
</a> |
|
|
|
{% if order_by == 'street' %}<span class="glyphicon glyphicon-filter"></span>{% endif %} |
|
|
|
</th> |
|
|
|
<th width="100"> |
|
|
|
<a herf="{% url 'abonapp:people_list' abon_group.pk %}?order_by=house&dir={{ dir|default:"down" }}"> |
|
|
|
{% trans 'House' %}/{% trans 'Apartment' %} |
|
|
|
</a> |
|
|
|
{% if order_by == 'house' %}<span class="glyphicon glyphicon-filter"></span>{% endif %} |
|
|
|
</th> |
|
|
|
<th width="150">{% trans 'Telephone' %}</th> |
|
|
|
<th width="150">{% trans 'Service' %}</th> |
|
|
|
<th width="50"> |
|
|
|
<a href="{% url 'abonapp:people_list' abon_group.pk %}?order_by=ballance&dir={{ dir|default:"down" }}"> |
|
|
|
{% trans 'Ballance' %} |
|
|
|
</a> |
|
|
|
{% if order_by == 'ballance' %}<span class="glyphicon glyphicon-filter"></span>{% endif %} |
|
|
|
</th> |
|
|
|
<th width="100">#</th> |
|
|
|
</tr> |
|
|
|
</thead> |
|
|
|
<tbody> |
|
|
|
{% for human in peoples %} |
|
|
|
{% if human.is_active %} |
|
|
|
<tr> |
|
|
|
{% else %} |
|
|
|
<tr class="danger"> |
|
|
|
{% endif %} |
|
|
|
{% else %}——— |
|
|
|
{% endif %} |
|
|
|
</td> |
|
|
|
<td>{{ human.ballance }}</td> |
|
|
|
<td> |
|
|
|
{% if perms.abonapp.delete_abon %} |
|
|
|
<a href="{% url 'abonapp:del_abon' %}?t=a&id={{ human.pk }}" class="btn btn-danger btn-sm"> |
|
|
|
<span class="glyphicon glyphicon-remove"></span> |
|
|
|
</a> |
|
|
|
{% endif %} |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
{% empty %} |
|
|
|
<tr> |
|
|
|
<td colspan="9"> |
|
|
|
{% trans 'Subscribers not found' %}. |
|
|
|
{% if perms.abonapp.add_abon %} |
|
|
|
<a href="{% url 'abonapp:add_abon' abon_group.pk %}">{% trans 'Add abon' %}</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.pk %}" class="btn btn-sm btn-default" title="Добавить"> |
|
|
|
<span class="glyphicon glyphicon-plus"></span> {% trans 'Add abon' %} |
|
|
|
</a> |
|
|
|
{% endif %} |
|
|
|
<a href="{% url 'abonapp:update_nas' abon_group.pk %}" class="btn btn-sm btn-default"> |
|
|
|
<span class="glyphicon glyphicon-refresh"></span> {% trans 'Refresh subscribers on NAS' %} |
|
|
|
</a> |
|
|
|
<a href="{% url 'abonapp:ch_group_tariff' abon_group.pk %}" class="btn btn-sm btn-default" title="{% trans 'User groups' %}"> |
|
|
|
<span class="glyphicon glyphicon-subscript"></span> {% trans 'Tariffs in groups' %} |
|
|
|
</a> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
</tfoot> |
|
|
|
</table> |
|
|
|
<td><a href="{% url 'abonapp:abon_home' human.group.pk human.pk %}">{{ human.username }}</a></td> |
|
|
|
<td>{{ human.ip_address|default:_('Not assigned') }}</td> |
|
|
|
<td>{{ human.fio }}</td> |
|
|
|
<td>{{ human.street|default:_('Not assigned') }}</td> |
|
|
|
<td>{{ human.house|default:_('Not assigned') }}</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.pk %}">{{ 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.pk }}" class="btn btn-danger btn-sm"> |
|
|
|
<span class="glyphicon glyphicon-remove"></span> |
|
|
|
</a> |
|
|
|
{% endif %} |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
{% empty %} |
|
|
|
<tr> |
|
|
|
<td colspan="9"> |
|
|
|
{% trans 'Subscribers not found' %}. |
|
|
|
{% if perms.abonapp.add_abon %} |
|
|
|
<a href="{% url 'abonapp:add_abon' abon_group.pk %}">{% trans 'Add abon' %}</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.pk %}" class="btn btn-sm btn-default" title="Добавить"> |
|
|
|
<span class="glyphicon glyphicon-plus"></span> {% trans 'Add abon' %} |
|
|
|
</a> |
|
|
|
{% endif %} |
|
|
|
<a href="{% url 'abonapp:update_nas' abon_group.pk %}" class="btn btn-sm btn-default"> |
|
|
|
<span class="glyphicon glyphicon-refresh"></span> {% trans 'Refresh subscribers on NAS' %} |
|
|
|
</a> |
|
|
|
<a href="{% url 'abonapp:ch_group_tariff' abon_group.pk %}" class="btn btn-sm btn-default" title="{% trans 'User groups' %}"> |
|
|
|
<span class="glyphicon glyphicon-subscript"></span> {% trans 'Tariffs in groups' %} |
|
|
|
</a> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
</tfoot> |
|
|
|
</table> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="col-lg-2 sidebar-offcanvas"> |
|
|
|
<div class="list-group"> |
|
|
|
{% for street in streets %} |
|
|
|
<a href="{% url 'abonapp:people_list' abon_group.pk %}?street={{ street.pk }}" class="list-group-item{% if street_id == street.pk %} active{% endif %}">{{ street.name }}</a> |
|
|
|
{% empty %} |
|
|
|
<a href="#" class="list-group-item">{% trans 'No streets found for that group' %}</a> |
|
|
|
{% endfor %} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
{% include 'toolbar_page.html' with pag=peoples %} |
|
|
|
|