2018-11-26 21:09:04 +00:00
{% extends "administration/base.html" %}
2018-11-16 08:10:35 +00:00
{% load i18n %}
2020-05-15 08:54:31 +00:00
{% load passbook_utils %}
2018-12-26 16:17:24 +00:00
{% load admin_reflection %}
2018-11-16 08:10:35 +00:00
2018-11-26 21:09:04 +00:00
{% block content %}
2020-02-21 13:20:16 +00:00
< section class = "pf-c-page__main-section pf-m-light" >
< div class = "pf-c-content" >
< h1 >
< i class = "pf-icon pf-icon-middleware" > < / i >
{% trans 'Source' %}
< / h1 >
< p > {% trans "External Sources which can be used to get Identities into passbook, for example Social Providers like Twiter and GitHub or Enterprise Providers like ADFS and LDAP." %}
< / p >
2019-02-24 21:39:09 +00:00
< / div >
2020-02-21 13:20:16 +00:00
< / section >
< section class = "pf-c-page__main-section pf-m-no-padding-mobile" >
< div class = "pf-c-card" >
2020-05-16 19:43:48 +00:00
{% if object_list %}
2020-06-09 11:40:03 +00:00
< div class = "pf-c-toolbar" >
< div class = "pf-c-toolbar__content" >
< div class = "pf-c-toolbar__bulk-select" >
< div class = "pf-c-dropdown" >
< button class = "pf-m-primary pf-c-dropdown__toggle" type = "button" >
< span class = "pf-c-dropdown__toggle-text" > {% trans 'Create' %}< / span >
< i class = "fas fa-caret-down pf-c-dropdown__toggle-icon" aria-hidden = "true" > < / i >
< / button >
< ul class = "pf-c-dropdown__menu" hidden >
{% for type, name in types.items %}
< li >
< a class = "pf-c-dropdown__menu-item" href = "{% url 'passbook_admin:source-create' %}?type={{ type }}&back={{ request.get_full_path }}" >
{{ name|verbose_name }}< br >
< small >
{{ name|doc }}
< / small >
< / a >
< / li >
{% endfor %}
< / ul >
< / div >
2020-02-21 13:20:16 +00:00
< / div >
2020-06-09 11:40:03 +00:00
{% include 'partials/pagination.html' %}
2020-02-21 13:20:16 +00:00
< / div >
< / div >
2020-02-21 19:24:02 +00:00
< table class = "pf-c-table pf-m-compact pf-m-grid-xl" role = "grid" >
2020-02-21 13:20:16 +00:00
< thead >
< tr role = "row" >
< th role = "columnheader" scope = "col" > {% trans 'Name' %}< / th >
< th role = "columnheader" scope = "col" > {% trans 'Type' %}< / th >
< th role = "columnheader" scope = "col" > {% trans 'Additional Info' %}< / th >
< th role = "cell" > < / th >
< / tr >
< / thead >
< tbody role = "rowgroup" >
{% for source in object_list %}
< tr role = "row" >
< th role = "columnheader" >
< div >
< div > {{ source.name }}< / div >
{% if not source.enabled %}
< small > {% trans 'Disabled' %}< / small >
{% endif %}
< / div >
< / th >
< td role = "cell" >
< span >
{{ source|fieldtype }}
< / span >
< / td >
< td role = "cell" >
< span >
{{ source.ui_additional_info|default:""|safe }}
< / span >
< / td >
< td >
< a class = "pf-c-button pf-m-secondary" href = "{% url 'passbook_admin:source-update' pk=source.pk %}?back={{ request.get_full_path }}" > {% trans 'Edit' %}< / a >
< a class = "pf-c-button pf-m-danger" href = "{% url 'passbook_admin:source-delete' pk=source.pk %}?back={{ request.get_full_path }}" > {% trans 'Delete' %}< / a >
{% get_links source as links %}
{% for name, href in links %}
< a class = "pf-c-button pf-m-tertiary" href = "{{ href }}?back={{ request.get_full_path }}" > {% trans name %}< / a >
{% endfor %}
< / td >
< / tr >
{% endfor %}
< / tbody >
< / table >
< div class = "pf-c-toolbar" id = "page-layout-table-simple-toolbar-bottom" >
{% include 'partials/pagination.html' %}
< / div >
2020-05-16 19:43:48 +00:00
{% else %}
< div class = "pf-c-empty-state" >
2020-06-09 07:52:25 +00:00
< div class = "pf-c-empty-state__content" >
< i class = "fas fa-cubes pf-c-empty-state__icon" aria-hidden = "true" > < / i >
< h1 class = "pf-c-title pf-m-lg" >
{% trans 'No Sources.' %}
< / h1 >
< div class = "pf-c-empty-state__body" >
{% trans 'Currently no sources exist. Click the button below to create one.' %}
< / div >
< div class = "pf-c-dropdown" >
< button class = "pf-m-primary pf-c-dropdown__toggle" type = "button" >
< span class = "pf-c-dropdown__toggle-text" > {% trans 'Create' %}< / span >
< i class = "fas fa-caret-down pf-c-dropdown__toggle-icon" aria-hidden = "true" > < / i >
< / button >
< ul class = "pf-c-dropdown__menu" hidden >
{% for type, name in types.items %}
< li >
< a class = "pf-c-dropdown__menu-item" href = "{% url 'passbook_admin:source-create' %}?type={{ type }}&back={{ request.get_full_path }}" >
{{ name|verbose_name }}< br >
< small >
{{ name|doc }}
< / small >
< / a >
< / li >
{% endfor %}
< / ul >
< / div >
2020-05-16 19:43:48 +00:00
< / div >
< / div >
{% endif %}
2020-02-21 13:20:16 +00:00
< / div >
< / section >
2018-12-18 12:27:01 +00:00
{% endblock %}