122 lines
5.1 KiB
HTML
122 lines
5.1 KiB
HTML
{% extends "administration/base.html" %}
|
|
|
|
{% load i18n %}
|
|
{% load passbook_utils %}
|
|
|
|
{% block content %}
|
|
<section class="pf-c-page__main-section pf-m-light">
|
|
<div class="pf-c-content">
|
|
<h1>
|
|
<i class="pf-icon pf-icon-applications"></i>
|
|
{% trans 'Applications' %}
|
|
</h1>
|
|
<p>{% trans "External Applications which use passbook as Identity-Provider, utilizing protocols like OAuth2 and SAML." %}</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:application-create' %}">
|
|
<button slot="trigger" class="pf-c-button pf-m-primary">
|
|
{% trans 'Create' %}
|
|
</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>
|
|
<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 'Slug' %}</th>
|
|
<th role="columnheader" scope="col">{% trans 'Provider' %}</th>
|
|
<th role="columnheader" scope="col">{% trans 'Provider Type' %}</th>
|
|
<th role="cell"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody role="rowgroup">
|
|
{% for application in object_list %}
|
|
<tr role="row">
|
|
<th role="columnheader">
|
|
<div>
|
|
<div>{{ application.name }}</div>
|
|
{% if application.meta_publisher %}
|
|
<small>{{ application.meta_publisher }}</small>
|
|
{% endif %}
|
|
</div>
|
|
</th>
|
|
<td role="cell">
|
|
<code>{{ application.slug }}</span>
|
|
</td>
|
|
<td role="cell">
|
|
<span>
|
|
{{ application.get_provider }}
|
|
</span>
|
|
</td>
|
|
<td role="cell">
|
|
<span>
|
|
{{ application.get_provider|verbose_name }}
|
|
</span>
|
|
</td>
|
|
<td>
|
|
<pb-modal-button href="{% url 'passbook_admin:application-update' pk=application.pk %}">
|
|
<button slot="trigger" class="pf-c-button pf-m-secondary">
|
|
{% trans 'Edit' %}
|
|
</button>
|
|
<div slot="modal"></div>
|
|
</pb-modal-button>
|
|
<pb-modal-button href="{% url 'passbook_admin:application-delete' pk=application.pk %}">
|
|
<button slot="trigger" class="pf-c-button pf-m-danger">
|
|
{% trans 'Delete' %}
|
|
</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">
|
|
<div class="pf-c-empty-state__content">
|
|
<i class="pf-icon pf-icon-applications pf-c-empty-state__icon" aria-hidden="true"></i>
|
|
<h1 class="pf-c-title pf-m-lg">
|
|
{% trans 'No Applications.' %}
|
|
</h1>
|
|
<div class="pf-c-empty-state__body">
|
|
{% if request.GET.search != "" %}
|
|
{% trans "Your search query doesn't match any application." %}
|
|
{% else %}
|
|
{% trans 'Currently no applications exist. Click the button below to create one.' %}
|
|
{% endif %}
|
|
</div>
|
|
<pb-modal-button href="{% url 'passbook_admin:application-create' %}">
|
|
<button slot="trigger" class="pf-c-button pf-m-primary">
|
|
{% trans 'Create' %}
|
|
</button>
|
|
<div slot="modal"></div>
|
|
</pb-modal-button>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</section>
|
|
{% endblock %}
|