mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-08-01 14:11:47 +00:00
Added missing features
This commit is contained in:
parent
37108dbf56
commit
fb2759a5b5
21 changed files with 1747 additions and 1 deletions
60
templates/tools/oauth_clients/oauth_clients.html.twig
Normal file
60
templates/tools/oauth_clients/oauth_clients.html.twig
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
{% extends "main_card.html.twig" %}
|
||||
|
||||
{% block title %}{% trans %}oauth_clients.title{% endtrans %}{% endblock %}
|
||||
|
||||
{% block card_title %}
|
||||
<i class="fa-solid fa-plug-circle-bolt fa-fw" aria-hidden="true"></i> {% trans %}oauth_clients.title{% endtrans %}
|
||||
{% endblock %}
|
||||
|
||||
{% block card_content %}
|
||||
<p class="text-muted">{% trans %}oauth_clients.description{% endtrans %}</p>
|
||||
|
||||
{% if clients is empty %}
|
||||
<b>{% trans %}oauth_clients.none_yet{% endtrans %}</b>
|
||||
{% else %}
|
||||
<table class="table table-striped table-bordered table-hover table-sm mt-2">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% trans %}oauth_clients.name{% endtrans %}</th>
|
||||
<th>{% trans %}oauth_clients.client_id{% endtrans %}</th>
|
||||
<th>{% trans %}oauth_clients.scopes{% endtrans %}</th>
|
||||
<th>{% trans %}oauth_clients.redirect_uris{% endtrans %}</th>
|
||||
<th>{% trans %}oauth_clients.status{% endtrans %}</th>
|
||||
<th>{% trans %}oauth_clients.live_tokens{% endtrans %}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for row in clients %}
|
||||
{% set client = row.client %}
|
||||
<tr>
|
||||
<td>{{ client.name }}</td>
|
||||
<td><code>{{ client.identifier }}</code></td>
|
||||
<td>{{ client.scopes|join(', ') }}</td>
|
||||
<td>{{ client.redirectUris|join(', ') }}</td>
|
||||
<td>
|
||||
{% if client.active %}
|
||||
<span class="badge bg-success badge-success">{% trans %}oauth_clients.active{% endtrans %}</span>
|
||||
{% else %}
|
||||
<span class="badge bg-secondary badge-secondary">{% trans %}oauth_clients.inactive{% endtrans %}</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ row.liveTokenCount }}</td>
|
||||
<td>
|
||||
<form action="{{ path('oauth_clients_delete', {'identifier': client.identifier}) }}" method="post"
|
||||
{{ stimulus_controller('elements/delete_btn') }} {{ stimulus_action('elements/delete_btn', "submit", "submit") }}
|
||||
data-delete-title="{% trans %}oauth_clients.delete.title{% endtrans %}"
|
||||
data-delete-message="{% trans %}oauth_clients.delete.message{% endtrans %}">
|
||||
<input type="hidden" name="_method" value="DELETE">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token('oauth_client_delete' ~ client.identifier) }}">
|
||||
<button type="submit" class="btn btn-danger btn-sm">
|
||||
<i class="fas fa-trash-alt fa-fw"></i> {% trans %}oauth_clients.delete{% endtrans %}
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue