aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/index.html.twig
blob: 2e7dbcab709e419afd576fd81e5ab81bf6b6a423 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
{% extends "WallabagCoreBundle::layout.html.twig" %}

{% block title %}{% trans %}Developer{% endtrans %}{% endblock %}

{% block content %}
<div class="row">
    <div class="col s12">
        <div class="card-panel settings">

            <div class="row">
                <h3>{% trans %}Welcome to the wallabag API{% endtrans %}</h3>

                <h4>{% trans %}Documentation{% endtrans %}</h4>

                <ul>
                    <li><a href="{{ path('developer_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>
                </ul>

                <h4>{% trans %}Clients{% endtrans %}</h4>
                <ul>
                    <li><a href="{{ path('developer_create_client') }}">{% trans %}Create a new client{% endtrans %}</a></li>
                </ul>

                <h4>{% trans %}Existing clients{% endtrans %}</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>{% trans %}Client ID{% endtrans %}</td>
                                            <td><strong><code>{{ client.id }}_{{ client.randomId }}</code></strong></td>
                                        </tr>
                                        <tr>
                                            <td>{% trans %}Client secret{% endtrans %}</td>
                                            <td><strong><code>{{ client.secret }}</code></strong></td>
                                        </tr>
                                        <tr>
                                            <td>{% trans %}Redirect URIs{% endtrans %}</td>
                                            <td><strong><code>{{ client.redirectUris|json_encode() }}</code></strong></td>
                                        </tr>
                                        <tr>
                                            <td>{% trans %}Grant type allowed{% endtrans %}</td>
                                            <td><strong><code>{{ client.allowedGrantTypes|json_encode() }}</code></strong></td>
                                        </tr>
                                    </table>
                                    <p>
                                        {% trans %}You have the ability to remove this client. This action is IRREVERSIBLE !{% endtrans %}<br/>
                                        {% trans %}If you remove it, every app configured with that client won't be able to auth on your wallabag.{% endtrans %}<br/>
                                        <a class="waves-effect waves-light red btn" href="{{ path('developer_delete_client', {'id': client.id}) }}">{% trans %}Remove this client{% endtrans %}</a>
                                    </p>
                                </div>
                            </li>
                        {% endfor %}
                    </ul>
                {% else %}
                    {% trans %}No client yet.{% endtrans %}
                {% endif %}
            </div>

        </div>
    </div>
</div>

{% endblock %}