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.
 
 
 
 
 

81 lines
3.6 KiB

{% extends 'base.html' %}
{% block main %}
<ol class="breadcrumb">
<li><span class="glyphicon glyphicon-home"></span></li>
<li class="active">Администраторы</li>
</ol>
{% include 'message_block.html' %}
<h3>Список аккаунтов администраторов</h3>
<div class="table-responsive">
<table class="table table-striped table-bordered">
<thead>
<tr>
<th class="col-sm-1">Фото</th>
<th class="col-sm-2">Ник</th>
<th class="col-sm-4">ФИО (или ник если нет)</th>
<th class="col-sm-2 hidden-xs">Телефон</th>
<th class="col-sm-2 hidden-xs">Email</th>
<th class="col-sm-1 hidden-xs">&mdash;</th>
</tr>
</thead>
<tbody>
{% for usr in users %}
<tr>
<td><a href="{% url 'acc_app:other_profile' usr.id %}">
<img width="50" src="{{ usr.get_min_ava }}"
alt="{{ usr.username }}"/>
</a></td>
<td><a href="{% url 'acc_app:other_profile' usr.id %}">{{ usr.username }}</a></td>
<td>{{ usr.get_full_name }}</td>
<td class="hidden-xs">{% if usr.telephone %}<a href="tel:{{ usr.telephone }}">{{ usr.telephone }}</a>{% else %}
Нету{% endif %}</td>
<td class="hidden-xs">{% if usr.email %}<a href="mailto:{{ usr.email }}">{{ usr.email }}{% else %}
Нету{% endif %}</a></td>
<td class="btn-group hidden-xs">
<a href="#" class="btn btn-sm btn-default disabled"
title="Дать задание">
<span class="glyphicon glyphicon-tasks"></span>
</a>
<a href="{ % url 'django_messages:messages_compose' % }?a={{ usr.id }}" class="btn btn-sm btn-info"
title="Отправить сообщение">
<span class="glyphicon glyphicon-envelope"></span>
</a>
{% if usr.id == request.user.id or perms.acc_app.delete_userprofile %}
<a href="{% url 'acc_app:delete_profile' usr.id %}" class="btn btn-sm btn-danger">
<span class="glyphicon glyphicon-remove"></span>
</a>
{% else %}
<a href="#" class="btn btn-sm btn-danger disabled" title="Не прав на удаление">
<span class="glyphicon glyphicon-remove"></span>
</a>
{% endif %}
</td>
</tr>
{% empty %}
<tr>
<td colspan="6"><b>Нет пользователей</b></td>
</tr>
{% endfor %}
</tbody>
{% if request.user.is_superuser %}
<tfoot>
<tr>
<th colspan="6">
<a href="{% url 'acc_app:create_profile' %}" class="btn btn-default" title="Добавить аккаунт">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
</th>
</tr>
</tfoot>
{% endif %}
</table>
</div>
{% include 'toolbar_page.html' with pag=users %}
{% endblock %}