wallabag/templates/Developer/index.html.twig

79 lines
4.3 KiB
Twig
Raw Normal View History

2024-02-18 23:03:14 +00:00
{% extends "layout.html.twig" %}
2016-02-16 19:18:59 +00:00
2016-03-16 22:56:42 +00:00
{% block title %}{{ 'developer.page_title'|trans }}{% endblock %}
2016-02-16 19:18:59 +00:00
{% block content %}
<div class="row">
<div class="col s12">
<div class="card-panel settings">
<div class="row">
2016-03-16 22:56:42 +00:00
<h3>{{ 'developer.welcome_message'|trans }}</h3>
2016-02-16 19:18:59 +00:00
2016-03-16 22:56:42 +00:00
<h4>{{ 'developer.documentation'|trans }}</h4>
2016-02-16 19:18:59 +00:00
<ul>
2016-03-16 22:56:42 +00:00
<li><a href="{{ path('developer_howto_firstapp') }}">{{ 'developer.how_to_first_app'|trans }}</a></li>
2017-05-13 07:33:19 +00:00
<li><a href="https://doc.wallabag.org/en/developer/api/readme.html">{{ 'developer.full_documentation'|trans }}</a></li>
<li><a href="{{ path('nelmio_api_doc.swagger_ui') }}">{{ 'developer.list_methods'|trans }}</a></li>
2016-02-16 19:18:59 +00:00
</ul>
2016-03-16 22:56:42 +00:00
<h4>{{ 'developer.clients.title'|trans }}</h4>
2016-02-16 19:18:59 +00:00
<ul>
<li><a href="{{ path('developer_create_client') }}" class="waves-effect waves-light btn">{{ 'developer.clients.create_new'|trans }}</a></li>
2016-02-16 19:18:59 +00:00
</ul>
2016-03-16 22:56:42 +00:00
<h4>{{ 'developer.existing_clients.title'|trans }}</h4>
{% if clients %}
<ul class="collapsible" data-collapsible="expandable">
{% for client in clients %}
<li>
<div class="collapsible-header">{{ client.name }} - #{{ client.id }}</div>
<div class="collapsible-body">
<table class="striped">
<tr>
2016-03-16 22:56:42 +00:00
<td>{{ 'developer.existing_clients.field_id'|trans }}</td>
<td>
<strong><code>{{ client.clientId }}</code></strong>
<button class="btn" data-clipboard-text="{{ client.clientId }}">{{ 'developer.client.copy_to_clipboard'|trans }}</button>
</td>
</tr>
<tr>
2016-03-16 22:56:42 +00:00
<td>{{ 'developer.existing_clients.field_secret'|trans }}</td>
<td>
<strong><code>{{ client.secret }}</code></strong>
<button class="btn" data-clipboard-text="{{ client.secret }}">{{ 'developer.client.copy_to_clipboard'|trans }}</button>
</td>
</tr>
<tr>
2016-03-16 22:56:42 +00:00
<td>{{ 'developer.existing_clients.field_uris'|trans }}</td>
<td><strong><code>{{ client.redirectUris|json_encode() }}</code></strong></td>
</tr>
<tr>
2016-03-16 22:56:42 +00:00
<td>{{ 'developer.existing_clients.field_grant_types'|trans }}</td>
<td><strong><code>{{ client.allowedGrantTypes|json_encode() }}</code></strong></td>
</tr>
</table>
2022-05-03 21:28:20 +00:00
<p>{{ 'developer.remove.warn_message_1'|trans({'%name%': client.name}) }}</p>
<p>{{ 'developer.remove.warn_message_2'|trans({'%name%': client.name}) }}</p>
2023-08-21 08:51:17 +00:00
<form action="{{ path('developer_delete_client', {id: client.id}) }}" method="post" name="delete-client">
<input type="hidden" name="token" value="{{ csrf_token('delete-client') }}" />
<button class="waves-effect waves-light btn red" type="submit">{{ 'developer.remove.action'|trans({'%name%': client.name}) }}</button>
</form>
</div>
</li>
{% endfor %}
</ul>
{% else %}
2016-03-16 22:56:42 +00:00
{{ 'developer.existing_clients.no_client'|trans }}
{% endif %}
2016-02-16 19:18:59 +00:00
</div>
</div>
</div>
</div>
{% endblock %}