mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-02-04 08:13:38 +00:00
- Provide an app title, description and link to manual page. - Use AppView and app.html to present most of the elements. - Remove tabs and turn create user into a button. Tested by running: py.test-3 --include-functional -k users-groups Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
81 lines
2.4 KiB
HTML
81 lines
2.4 KiB
HTML
{% extends "app.html" %}
|
|
{% comment %}
|
|
#
|
|
# This file is part of FreedomBox.
|
|
#
|
|
# This program is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU Affero General Public License as
|
|
# published by the Free Software Foundation, either version 3 of the
|
|
# License, or (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU Affero General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU Affero General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
#
|
|
{% endcomment %}
|
|
|
|
{% load bootstrap %}
|
|
{% load i18n %}
|
|
|
|
{% block page_head %}
|
|
<style type="text/css">
|
|
.user-edit-label {
|
|
display: inline-block;
|
|
width: 75%;
|
|
}
|
|
.list-group-item .btn {
|
|
margin: -5px 0;
|
|
}
|
|
</style>
|
|
{% endblock %}
|
|
|
|
{% block status %}
|
|
<a href="{% url 'users:create' %}" class="btn btn-primary"
|
|
role="button" title="{% trans 'Create User' %}">
|
|
<span class="fa fa-plus" aria-hidden="true"></span>
|
|
{% trans 'Create User' %}
|
|
</a>
|
|
{% endblock %}
|
|
|
|
{% block configuration %}
|
|
|
|
<h3>{% trans "Users" %}</h3>
|
|
|
|
<div class="row">
|
|
<div class="col-sm-6">
|
|
<div class="list-group">
|
|
{% for user in object_list %}
|
|
<div class="list-group-item clearfix">
|
|
{% if user.username != last_admin_user %}
|
|
<a href="{% url 'users:delete' user.username %}"
|
|
class="btn btn-default btn-sm pull-right"
|
|
role="button"
|
|
title="{% blocktrans with username=user.username %}Delete user {{ username }}{% endblocktrans %}">
|
|
<span class="fa fa-trash-o"
|
|
aria-hidden="true"></span>
|
|
</a>
|
|
{% endif %}
|
|
|
|
<a class='user-edit-label'
|
|
href="{% url 'users:edit' user.username %}"
|
|
title="{% blocktrans with username=user.username %}Edit user {{ username }}{% endblocktrans %}">
|
|
{{ user.username }}
|
|
</a>
|
|
|
|
{% if not user.is_active %}
|
|
<span class="fa fa-ban"
|
|
aria-hidden="true"></span>
|
|
{% endif %}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
{% endblock %}
|