This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
authentik/passbook/admin/templates/administration/group/list.html

115 lines
4.6 KiB
HTML
Raw Normal View History

2019-03-08 14:49:45 +00:00
{% extends "administration/base.html" %}
{% load i18n %}
{% block content %}
<section class="pf-c-page__main-section pf-m-light">
<div class="pf-c-content">
<h1>
<i class="pf-icon pf-icon-users"></i>
{% trans 'Groups' %}
</h1>
<p>{% trans "Group users together and give them permissions based on the membership." %}
</p>
</div>
</section>
<section class="pf-c-page__main-section pf-m-no-padding-mobile">
<div class="pf-c-card">
{% if object_list %}
<div class="pf-c-toolbar">
<div class="pf-c-toolbar__content">
{% include 'partials/toolbar_search.html' %}
<div class="pf-c-toolbar__bulk-select">
<pb-modal-button href="{% url 'passbook_admin:group-create' %}">
<pb-spinner-button slot="trigger" class="pf-m-primary">
{% trans 'Create' %}
</pb-spinner-button>
<div slot="modal"></div>
</pb-modal-button>
<button role="pb-refresh" class="pf-c-button pf-m-primary">
{% trans 'Refresh' %}
</button>
</div>
{% include 'partials/pagination.html' %}
</div>
</div>
2020-02-21 19:24:02 +00:00
<table class="pf-c-table pf-m-compact pf-m-grid-xl" role="grid">
<thead>
<tr role="row">
<th role="columnheader" scope="col">{% trans 'Name' %}</th>
<th role="columnheader" scope="col">{% trans 'Parent' %}</th>
<th role="columnheader" scope="col">{% trans 'Members' %}</th>
<th role="cell"></th>
</tr>
</thead>
<tbody role="rowgroup">
{% for group in object_list %}
<tr role="row">
<td role="cell">
<span>
{{ group.name }}
</span>
</td>
<td role="cell">
<span>
{{ group.parent }}
</span>
</td>
<td role="cell">
<span>
{{ group.users.all|length }}
</span>
</td>
<td>
<pb-modal-button href="{% url 'passbook_admin:group-update' pk=group.pk %}">
<pb-spinner-button slot="trigger" class="pf-m-secondary">
{% trans 'Edit' %}
</pb-spinner-button>
<div slot="modal"></div>
</pb-modal-button>
<pb-modal-button href="{% url 'passbook_admin:group-delete' pk=group.pk %}">
<pb-spinner-button slot="trigger" class="pf-m-danger">
{% trans 'Delete' %}
</pb-spinner-button>
<div slot="modal"></div>
</pb-modal-button>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class="pf-c-pagination pf-m-bottom">
{% include 'partials/pagination.html' %}
</div>
{% else %}
<div class="pf-c-toolbar">
<div class="pf-c-toolbar__content">
{% include 'partials/toolbar_search.html' %}
</div>
</div>
<div class="pf-c-empty-state">
2020-06-09 07:52:25 +00:00
<div class="pf-c-empty-state__content">
<i class="pf-icon pf-icon-users pf-c-empty-state__icon" aria-hidden="true"></i>
2020-06-09 07:52:25 +00:00
<h1 class="pf-c-title pf-m-lg">
{% trans 'No Groups.' %}
</h1>
<div class="pf-c-empty-state__body">
{% if request.GET.search != "" %}
{% trans "Your search query doesn't match any groups." %}
{% else %}
2020-06-09 07:52:25 +00:00
{% trans 'Currently no group exist. Click the button below to create one.' %}
{% endif %}
2020-06-09 07:52:25 +00:00
</div>
<pb-modal-button href="{% url 'passbook_admin:group-create' %}">
<pb-spinner-button slot="trigger" class="pf-m-primary">
{% trans 'Create' %}
</pb-spinner-button>
<div slot="modal"></div>
</pb-modal-button>
</div>
</div>
{% endif %}
</div>
</section>
2019-03-08 14:49:45 +00:00
{% endblock %}