2023-07-26 00:43:40 +07:00
|
|
|
{% extends 'generic/object.html' %}
|
|
|
|
{% load form_helpers %}
|
|
|
|
{% load helpers %}
|
|
|
|
{% load i18n %}
|
|
|
|
{% load plugins %}
|
|
|
|
|
|
|
|
{% block breadcrumbs %}
|
2023-07-25 15:48:40 -04:00
|
|
|
<li class="breadcrumb-item"><a href="{% url 'account:usertoken_list' %}">{% trans "My API Tokens" %}</a></li>
|
2023-07-26 00:43:40 +07:00
|
|
|
{% endblock breadcrumbs %}
|
|
|
|
|
|
|
|
{% block title %}{% trans "Token" %} {{ object }}{% endblock %}
|
|
|
|
|
|
|
|
{% block subtitle %}{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
<div class="row">
|
|
|
|
<div class="col col-md-12">
|
|
|
|
<div class="card">
|
|
|
|
<h5 class="card-header">{% trans "Token" %}</h5>
|
2024-01-17 16:25:42 -05:00
|
|
|
<table class="table table-hover attr-table">
|
|
|
|
<tr>
|
|
|
|
<th scope="row">{% trans "Key" %}</th>
|
|
|
|
<td>
|
|
|
|
{% if key %}
|
|
|
|
<div class="float-end">
|
|
|
|
{% copy_content "token_id" %}
|
|
|
|
</div>
|
|
|
|
<div id="token_id">{{ key }}</div>
|
|
|
|
{% else %}
|
|
|
|
{{ object.partial }}
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th scope="row">{% trans "Description" %}</th>
|
|
|
|
<td>{{ object.description|placeholder }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th scope="row">{% trans "Write enabled" %}</th>
|
|
|
|
<td>{% checkmark object.write_enabled %}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th scope="row">{% trans "Created" %}</th>
|
|
|
|
<td>{{ object.created|annotated_date }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th scope="row">{% trans "Expires" %}</th>
|
|
|
|
<td>{{ object.expires|placeholder }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th scope="row">{% trans "Last used" %}</th>
|
|
|
|
<td>{{ object.last_used|placeholder }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th scope="row">{% trans "Allowed IPs" %}</th>
|
|
|
|
<td>{{ object.allowed_ips|join:", "|placeholder }}</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2023-07-26 00:43:40 +07:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|