contentdb/app/templates/api/list_tokens.html

29 lines
916 B
HTML
Raw Normal View History

2020-12-05 02:51:50 +01:00
{% extends "users/settings_base.html" %}
2019-11-22 15:33:22 +01:00
{% block title %}
2020-12-05 02:51:50 +01:00
{{ _("API Tokens | %(username)s", username=user.username) }}
2019-11-22 15:33:22 +01:00
{% endblock %}
2020-12-05 02:51:50 +01:00
{% block pane %}
2023-08-22 20:58:43 +02:00
<a class="btn btn-primary float-end" href="{{ url_for('api.create_edit_token', username=user.username) }}">{{ _("Create") }}</a>
<a class="btn btn-secondary me-2 float-end" href="/help/api/">{{ _("API Documentation") }}</a>
2020-12-05 02:51:50 +01:00
<h2 class="mt-0">{{ _("API Tokens") }}</h2>
2019-11-22 15:33:22 +01:00
2020-12-05 02:51:50 +01:00
<div class="list-group">
2019-11-22 15:33:22 +01:00
{% for token in user.tokens %}
2020-12-05 02:51:50 +01:00
<a class="list-group-item list-group-item-action" href="{{ url_for('api.create_edit_token', username=user.username, id=token.id) }}">
2023-10-31 19:40:01 +01:00
{% if token.client %}
<span class="badge bg-info float-end">
{{ _("Application") }}
</span>
{% endif %}
2020-12-05 02:51:50 +01:00
{{ token.name }}
</a>
2019-11-22 15:33:22 +01:00
{% else %}
2020-12-05 02:51:50 +01:00
<span class="list-group-item">
2022-01-08 00:27:00 +01:00
<i>{{ _("No tokens created") }}</i>
2020-12-05 02:51:50 +01:00
</span>
2019-11-22 15:33:22 +01:00
{% endfor %}
2020-12-05 02:51:50 +01:00
</div>
2019-11-22 15:33:22 +01:00
{% endblock %}