diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-03-05 21:44:39 +0100 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-03-05 21:44:39 +0100 |
commit | 9bf15f02695823652a0e783c915b039836f51626 (patch) | |
tree | 875efa0d2ec03d4398f98ffdb7e2ac622f40a300 /src/Wallabag/CoreBundle/Resources | |
parent | 2c2308b7830e24409c6f4a52b52a616803b1a515 (diff) | |
download | wallabag-9bf15f02695823652a0e783c915b039836f51626.tar.gz wallabag-9bf15f02695823652a0e783c915b039836f51626.tar.zst wallabag-9bf15f02695823652a0e783c915b039836f51626.zip |
Add listing clients
Rename route to be more consistive (ie: prefixed with developer_)
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources')
6 files changed, 82 insertions, 10 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/client_parameters.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/client_parameters.html.twig index a2a28d50..c2f7e95c 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/client_parameters.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/client_parameters.html.twig | |||
@@ -8,14 +8,13 @@ | |||
8 | <div class="card-panel settings"> | 8 | <div class="card-panel settings"> |
9 | <div class="row"> | 9 | <div class="row"> |
10 | <p>{% trans %}Here are your client parameters.{% endtrans %}</p> | 10 | <p>{% trans %}Here are your client parameters.{% endtrans %}</p> |
11 | <p><strong>{% trans %}Make sure to copy these parameters now. You won’t be able to see them again!{% endtrans %}</strong></p> | ||
12 | <ul> | 11 | <ul> |
13 | <li>{% trans %}Client ID:{% endtrans %} <strong><pre>{{ client_id }}</pre></strong></li> | 12 | <li>{% trans %}Client ID:{% endtrans %} <strong><pre>{{ client_id }}</pre></strong></li> |
14 | <li>{% trans %}Client secret:{% endtrans %} <strong><pre>{{ client_secret }}</pre></strong></li> | 13 | <li>{% trans %}Client secret:{% endtrans %} <strong><pre>{{ client_secret }}</pre></strong></li> |
15 | </ul> | 14 | </ul> |
16 | 15 | ||
17 | <a href="{{ path('developer') }}" class="waves-effect waves-light grey btn">{% trans %}Back{% endtrans %}</a> | 16 | <a href="{{ path('developer') }}" class="waves-effect waves-light grey btn">{% trans %}Back{% endtrans %}</a> |
18 | <a href="{{ path('howto-firstapp') }}" class="btn waves-effect waves-light">{% trans %}Read the howto "Create my first application"{% endtrans %}</a> | 17 | <a href="{{ path('developer_howto_firstapp') }}" class="btn waves-effect waves-light">{% trans %}Read the howto "Create my first application"{% endtrans %}</a> |
19 | </div> | 18 | </div> |
20 | </div> | 19 | </div> |
21 | </div> | 20 | </div> |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/howto_app.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/howto_app.html.twig index 88788776..1aece1d9 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/howto_app.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/howto_app.html.twig | |||
@@ -15,7 +15,7 @@ | |||
15 | <div class="row"> | 15 | <div class="row"> |
16 | <p>The following commands make use of the <a href="https://github.com/jkbrzt/httpie">HTTPie library</a>. Make sure it is installed on your system before using it.</p> | 16 | <p>The following commands make use of the <a href="https://github.com/jkbrzt/httpie">HTTPie library</a>. Make sure it is installed on your system before using it.</p> |
17 | <p>You need a token to communicate between your 3rd application and wallabag API.</p> | 17 | <p>You need a token to communicate between your 3rd application and wallabag API.</p> |
18 | <p>To create this token, you need <a href="{{ path('create_client') }}">to create a new client</a>.</p> | 18 | <p>To create this token, you need <a href="{{ path('developer_create_client') }}">to create a new client</a>.</p> |
19 | <p>Now, create your token (replace client_id, client_secret, username and password with the good values):</p> | 19 | <p>Now, create your token (replace client_id, client_secret, username and password with the good values):</p> |
20 | <p> | 20 | <p> |
21 | <pre><code class="language-bash">http POST http://v2.wallabag.org/oauth/v2/token \ | 21 | <pre><code class="language-bash">http POST http://v2.wallabag.org/oauth/v2/token \ |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/index.html.twig index 87dd4a5f..604bfec9 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/index.html.twig | |||
@@ -13,15 +13,52 @@ | |||
13 | <h4>{% trans %}Documentation{% endtrans %}</h4> | 13 | <h4>{% trans %}Documentation{% endtrans %}</h4> |
14 | 14 | ||
15 | <ul> | 15 | <ul> |
16 | <li><a href="{{ path('howto-firstapp') }}">{% trans %}How to create my first application{% endtrans %}</a></li> | 16 | <li><a href="{{ path('developer_howto_firstapp') }}">{% trans %}How to create my first application{% endtrans %}</a></li> |
17 | <li><a href="{{ path('nelmio_api_doc_index') }}">{% trans %}View full API documentation{% endtrans %}</a></li> | 17 | <li><a href="{{ path('nelmio_api_doc_index') }}">{% trans %}View full API documentation{% endtrans %}</a></li> |
18 | </ul> | 18 | </ul> |
19 | 19 | ||
20 | <h4>{% trans %}Clients{% endtrans %}</h4> | 20 | <h4>{% trans %}Clients{% endtrans %}</h4> |
21 | <ul> | 21 | <ul> |
22 | <li><a href="{{ path('create_client') }}">{% trans %}Create a new client{% endtrans %}</a></li> | 22 | <li><a href="{{ path('developer_create_client') }}">{% trans %}Create a new client{% endtrans %}</a></li> |
23 | </ul> | 23 | </ul> |
24 | 24 | ||
25 | <h4>{% trans %}Existing clients{% endtrans %}</h4> | ||
26 | {% if clients %} | ||
27 | <ul class="collapsible" data-collapsible="expandable"> | ||
28 | {% for client in clients %} | ||
29 | <li> | ||
30 | <div class="collapsible-header">#{{ client.id }}</div> | ||
31 | <div class="collapsible-body"> | ||
32 | <table class="striped"> | ||
33 | <tr> | ||
34 | <td>{% trans %}Client ID:{% endtrans %}</td> | ||
35 | <td><strong><code>{{ client.id }}_{{ client.randomId }}</code></strong></td> | ||
36 | </tr> | ||
37 | <tr> | ||
38 | <td>{% trans %}Client secret:{% endtrans %}</td> | ||
39 | <td><strong><code>{{ client.secret }}</code></strong></td> | ||
40 | </tr> | ||
41 | <tr> | ||
42 | <td>{% trans %}Redirect URIs:{% endtrans %}</td> | ||
43 | <td><strong><code>{{ client.redirectUris|json_encode() }}</code></strong></td> | ||
44 | </tr> | ||
45 | <tr> | ||
46 | <td>{% trans %}Grant type allowed:{% endtrans %}</td> | ||
47 | <td><strong><code>{{ client.allowedGrantTypes|json_encode() }}</code></strong></td> | ||
48 | </tr> | ||
49 | </table> | ||
50 | <p> | ||
51 | {% trans %}You have the ability to remove this client. This action is IRREVERSIBLE !{% endtrans %}<br/> | ||
52 | {% trans %}If you remove it, every app configured with that client won't be able to auth on your wallabag.{% endtrans %}<br/> | ||
53 | <a class="waves-effect waves-light red btn" href="{{ path('developer_delete_client', {'id': client.id}) }}">{% trans %}Remove this client{% endtrans %}</a> | ||
54 | </p> | ||
55 | </div> | ||
56 | </li> | ||
57 | {% endfor %} | ||
58 | </ul> | ||
59 | {% else %} | ||
60 | {% trans %}No client yet.{% endtrans %} | ||
61 | {% endif %} | ||
25 | </div> | 62 | </div> |
26 | 63 | ||
27 | </div> | 64 | </div> |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/client_parameters.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/client_parameters.html.twig index a2a28d50..c2f7e95c 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/client_parameters.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/client_parameters.html.twig | |||
@@ -8,14 +8,13 @@ | |||
8 | <div class="card-panel settings"> | 8 | <div class="card-panel settings"> |
9 | <div class="row"> | 9 | <div class="row"> |
10 | <p>{% trans %}Here are your client parameters.{% endtrans %}</p> | 10 | <p>{% trans %}Here are your client parameters.{% endtrans %}</p> |
11 | <p><strong>{% trans %}Make sure to copy these parameters now. You won’t be able to see them again!{% endtrans %}</strong></p> | ||
12 | <ul> | 11 | <ul> |
13 | <li>{% trans %}Client ID:{% endtrans %} <strong><pre>{{ client_id }}</pre></strong></li> | 12 | <li>{% trans %}Client ID:{% endtrans %} <strong><pre>{{ client_id }}</pre></strong></li> |
14 | <li>{% trans %}Client secret:{% endtrans %} <strong><pre>{{ client_secret }}</pre></strong></li> | 13 | <li>{% trans %}Client secret:{% endtrans %} <strong><pre>{{ client_secret }}</pre></strong></li> |
15 | </ul> | 14 | </ul> |
16 | 15 | ||
17 | <a href="{{ path('developer') }}" class="waves-effect waves-light grey btn">{% trans %}Back{% endtrans %}</a> | 16 | <a href="{{ path('developer') }}" class="waves-effect waves-light grey btn">{% trans %}Back{% endtrans %}</a> |
18 | <a href="{{ path('howto-firstapp') }}" class="btn waves-effect waves-light">{% trans %}Read the howto "Create my first application"{% endtrans %}</a> | 17 | <a href="{{ path('developer_howto_firstapp') }}" class="btn waves-effect waves-light">{% trans %}Read the howto "Create my first application"{% endtrans %}</a> |
19 | </div> | 18 | </div> |
20 | </div> | 19 | </div> |
21 | </div> | 20 | </div> |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/howto_app.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/howto_app.html.twig index 88788776..1aece1d9 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/howto_app.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/howto_app.html.twig | |||
@@ -15,7 +15,7 @@ | |||
15 | <div class="row"> | 15 | <div class="row"> |
16 | <p>The following commands make use of the <a href="https://github.com/jkbrzt/httpie">HTTPie library</a>. Make sure it is installed on your system before using it.</p> | 16 | <p>The following commands make use of the <a href="https://github.com/jkbrzt/httpie">HTTPie library</a>. Make sure it is installed on your system before using it.</p> |
17 | <p>You need a token to communicate between your 3rd application and wallabag API.</p> | 17 | <p>You need a token to communicate between your 3rd application and wallabag API.</p> |
18 | <p>To create this token, you need <a href="{{ path('create_client') }}">to create a new client</a>.</p> | 18 | <p>To create this token, you need <a href="{{ path('developer_create_client') }}">to create a new client</a>.</p> |
19 | <p>Now, create your token (replace client_id, client_secret, username and password with the good values):</p> | 19 | <p>Now, create your token (replace client_id, client_secret, username and password with the good values):</p> |
20 | <p> | 20 | <p> |
21 | <pre><code class="language-bash">http POST http://v2.wallabag.org/oauth/v2/token \ | 21 | <pre><code class="language-bash">http POST http://v2.wallabag.org/oauth/v2/token \ |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/index.html.twig index 87dd4a5f..604bfec9 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/index.html.twig | |||
@@ -13,15 +13,52 @@ | |||
13 | <h4>{% trans %}Documentation{% endtrans %}</h4> | 13 | <h4>{% trans %}Documentation{% endtrans %}</h4> |
14 | 14 | ||
15 | <ul> | 15 | <ul> |
16 | <li><a href="{{ path('howto-firstapp') }}">{% trans %}How to create my first application{% endtrans %}</a></li> | 16 | <li><a href="{{ path('developer_howto_firstapp') }}">{% trans %}How to create my first application{% endtrans %}</a></li> |
17 | <li><a href="{{ path('nelmio_api_doc_index') }}">{% trans %}View full API documentation{% endtrans %}</a></li> | 17 | <li><a href="{{ path('nelmio_api_doc_index') }}">{% trans %}View full API documentation{% endtrans %}</a></li> |
18 | </ul> | 18 | </ul> |
19 | 19 | ||
20 | <h4>{% trans %}Clients{% endtrans %}</h4> | 20 | <h4>{% trans %}Clients{% endtrans %}</h4> |
21 | <ul> | 21 | <ul> |
22 | <li><a href="{{ path('create_client') }}">{% trans %}Create a new client{% endtrans %}</a></li> | 22 | <li><a href="{{ path('developer_create_client') }}">{% trans %}Create a new client{% endtrans %}</a></li> |
23 | </ul> | 23 | </ul> |
24 | 24 | ||
25 | <h4>{% trans %}Existing clients{% endtrans %}</h4> | ||
26 | {% if clients %} | ||
27 | <ul class="collapsible" data-collapsible="expandable"> | ||
28 | {% for client in clients %} | ||
29 | <li> | ||
30 | <div class="collapsible-header">#{{ client.id }}</div> | ||
31 | <div class="collapsible-body"> | ||
32 | <table class="striped"> | ||
33 | <tr> | ||
34 | <td>{% trans %}Client ID:{% endtrans %}</td> | ||
35 | <td><strong><code>{{ client.id }}_{{ client.randomId }}</code></strong></td> | ||
36 | </tr> | ||
37 | <tr> | ||
38 | <td>{% trans %}Client secret:{% endtrans %}</td> | ||
39 | <td><strong><code>{{ client.secret }}</code></strong></td> | ||
40 | </tr> | ||
41 | <tr> | ||
42 | <td>{% trans %}Redirect URIs:{% endtrans %}</td> | ||
43 | <td><strong><code>{{ client.redirectUris|json_encode() }}</code></strong></td> | ||
44 | </tr> | ||
45 | <tr> | ||
46 | <td>{% trans %}Grant type allowed:{% endtrans %}</td> | ||
47 | <td><strong><code>{{ client.allowedGrantTypes|json_encode() }}</code></strong></td> | ||
48 | </tr> | ||
49 | </table> | ||
50 | <p> | ||
51 | {% trans %}You have the ability to remove this client. This action is IRREVERSIBLE !{% endtrans %}<br/> | ||
52 | {% trans %}If you remove it, every app configured with that client won't be able to auth on your wallabag.{% endtrans %}<br/> | ||
53 | <a class="waves-effect waves-light red btn" href="{{ path('developer_delete_client', {'id': client.id}) }}">{% trans %}Remove this client{% endtrans %}</a> | ||
54 | </p> | ||
55 | </div> | ||
56 | </li> | ||
57 | {% endfor %} | ||
58 | </ul> | ||
59 | {% else %} | ||
60 | {% trans %}No client yet.{% endtrans %} | ||
61 | {% endif %} | ||
25 | </div> | 62 | </div> |
26 | 63 | ||
27 | </div> | 64 | </div> |