authentic/src/authentic2/apps/authenticators/templates/authentic2/authenticators/authenticator_detail.html

64 lines
2.5 KiB
HTML

{% extends "authentic2/authenticators/authenticator_common.html" %}
{% load i18n gadjo %}
{% block appbar %}
{{ block.super }}
<span class="actions">
<a class="extra-actions-menu-opener"></a>
{% if object.has_valid_configuration and not object.protected %}
<a href="{% url 'a2-manager-authenticator-toggle' pk=object.pk %}">{{ object.enabled|yesno:_("Disable,Enable") }}</a>
{% endif %}
<a href="{% url 'a2-manager-authenticator-edit' pk=object.pk %}">{% trans "Edit" %}</a>
<ul class="extra-actions-menu">
<li><a href="{% url 'a2-manager-authenticator-journal' pk=object.pk %}">{% trans "Journal" %}</a></li>
{% if not object.protected %}
<li><a rel="popup" href="{% url 'a2-manager-authenticator-delete' pk=object.pk %}">{% trans "Delete" %}</a></li>
{% endif %}
</ul>
</span>
{% endblock %}
{% block breadcrumb %}
{{ block.super }}
<a href="#"></a>
{% endblock %}
{% block content %}
{% if not object.has_valid_configuration %}
<div class="warningnotice">
{% trans "This authenticator cannot be enabled because configuration is not complete." %}
</div>
{% endif %}
<div class='section authenticator-detail'>
<div class='pk-tabs'>
<div class="pk-tabs--tab-list" role="tablist">
<button aria-controls="panel-description" aria-selected="true" id="tab-description" role="tab" tabindex="0">{% trans "Description" %}</button>
{% for model in object.related_models %}
<button aria-controls="panel-{{ model.model_name }}" aria-selected="false" id="tab-{{ model.model_name }}" role="tab" tabindex="-1">{{ model.verbose_name_plural }}</button>
{% endfor %}
{% block extra-tab-buttons %}
{% endblock %}
</div>
<div class="pk-tabs--container">
<div aria-labelledby="tab-description" id="panel-description" role="tabpanel" tabindex="0">
<ul>
{% for line in object.get_full_description %}
<li>{{ line }}</li>
{% endfor %}
</ul>
</div>
{% for model, objects in object.related_models.items %}
<div aria-labelledby="tab-{{ model.model_name }}" hidden="" id="panel-{{ model.model_name }}" role="tabpanel" tabindex="0">
{% include 'authentic2/authenticators/related_object_list.html' with object_list=objects model_name=model.model_name %}
</div>
{% endfor %}
{% block extra-tab-list %}
{% endblock %}
</div>
</div>
</div>
{% endblock %}