]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/index.html.twig
Merge pull request #2330 from pmichelazzo/master
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Resources / views / themes / material / Developer / index.html.twig
index 87dd4a5fe6f27202c852444ba371b0c152d6d85d..001c5cbbc7c1768632c887caa583a54bb063e110 100644 (file)
@@ -1,6 +1,6 @@
 {% extends "WallabagCoreBundle::layout.html.twig" %}
 
-{% block title %}{% trans %}Developer{% endtrans %}{% endblock %}
+{% block title %}{{ 'developer.page_title'|trans }}{% endblock %}
 
 {% block content %}
 <div class="row">
@@ -8,20 +8,58 @@
         <div class="card-panel settings">
 
             <div class="row">
-                <h3>{% trans %}Welcome to the wallabag API{% endtrans %}</h3>
+                <h3>{{ 'developer.welcome_message'|trans }}</h3>
 
-                <h4>{% trans %}Documentation{% endtrans %}</h4>
+                <h4>{{ 'developer.documentation'|trans }}</h4>
 
                 <ul>
-                    <li><a href="{{ path('howto-firstapp') }}">{% trans %}How to create my first application{% endtrans %}</a></li>
-                    <li><a href="{{ path('nelmio_api_doc_index') }}">{% trans %}View full API documentation{% endtrans %}</a></li>
+                    <li><a href="{{ path('developer_howto_firstapp') }}">{{ 'developer.how_to_first_app'|trans }}</a></li>
+                    <li><a href="http://doc.wallabag.org/en/master/developer/api.html">{{ 'developer.full_documentation'|trans }}</a></li>
+                    <li><a href="{{ path('nelmio_api_doc_index') }}">{{ 'developer.list_methods'|trans }}</a></li>
                 </ul>
 
-                <h4>{% trans %}Clients{% endtrans %}</h4>
+                <h4>{{ 'developer.clients.title'|trans }}</h4>
                 <ul>
-                    <li><a href="{{ path('create_client') }}">{% trans %}Create a new client{% endtrans %}</a></li>
+                    <li><a href="{{ path('developer_create_client') }}">{{ 'developer.clients.create_new'|trans }}</a></li>
                 </ul>
 
+                <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.id }}</div>
+                                <div class="collapsible-body">
+                                    <table class="striped">
+                                        <tr>
+                                            <td>{{ 'developer.existing_clients.field_id'|trans }}</td>
+                                            <td><strong><code>{{ client.id }}_{{ client.randomId }}</code></strong></td>
+                                        </tr>
+                                        <tr>
+                                            <td>{{ 'developer.existing_clients.field_secret'|trans }}</td>
+                                            <td><strong><code>{{ client.secret }}</code></strong></td>
+                                        </tr>
+                                        <tr>
+                                            <td>{{ 'developer.existing_clients.field_uris'|trans }}</td>
+                                            <td><strong><code>{{ client.redirectUris|json_encode() }}</code></strong></td>
+                                        </tr>
+                                        <tr>
+                                            <td>{{ 'developer.existing_clients.field_grant_types'|trans }}</td>
+                                            <td><strong><code>{{ client.allowedGrantTypes|json_encode() }}</code></strong></td>
+                                        </tr>
+                                    </table>
+                                    <p>
+                                        {{ 'developer.remove.warn_message_1'|trans }}<br/>
+                                        {{ 'developer.remove.warn_message_2'|trans }}<br/>
+                                        <a class="waves-effect waves-light red btn" href="{{ path('developer_delete_client', {'id': client.id}) }}">{{ 'developer.remove.action'|trans }}</a>
+                                    </p>
+                                </div>
+                            </li>
+                        {% endfor %}
+                    </ul>
+                {% else %}
+                    {{ 'developer.existing_clients.no_client'|trans }}
+                {% endif %}
             </div>
 
         </div>