From 3fae7f1d08be2debb5aff7d14e0976b6197323b8 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Wed, 16 Mar 2016 23:56:42 +0100 Subject: Add missing developer page --- .../views/themes/baggy/Developer/client.html.twig | 6 ++-- .../baggy/Developer/client_parameters.html.twig | 12 ++++---- .../themes/baggy/Developer/howto_app.html.twig | 20 +++++++------- .../views/themes/baggy/Developer/index.html.twig | 32 +++++++++++----------- 4 files changed, 35 insertions(+), 35 deletions(-) (limited to 'src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer') diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/client.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/client.html.twig index c9ce6d08..78a9dc04 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/client.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/client.html.twig @@ -1,6 +1,6 @@ {% extends "WallabagCoreBundle::layout.html.twig" %} -{% block title %}{% trans %}New client{% endtrans %}{% endblock %} +{% block title %}{{ 'developer.client.page_title'|trans }}{% endblock %} {% block content %}
@@ -8,7 +8,7 @@
-

{% trans %}You are about to create a new client. Please fill the field below for the redirect URI of your application.{% endtrans %}

+

{{ 'developer.client.page_description'|trans }}

{{ form_start(form) }} {{ form_errors(form) }} @@ -18,7 +18,7 @@ {{ form_widget(form.redirect_uris) }}
- {% trans %}Back{% endtrans %} + {{ 'developer.client.action_back'|trans }} {{ form_widget(form.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }} {{ form_rest(form) }} 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 a214dfd0..b615fa3b 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 @@ -1,20 +1,20 @@ {% extends "WallabagCoreBundle::layout.html.twig" %} -{% block title %}{% trans %}Client parameters{% endtrans %}{% endblock %} +{% block title %}{{ 'developer.client_parameter.page_title'|trans }}{% endblock %} {% block content %}
-

{% trans %}Here are your client parameters.{% endtrans %}

+

{{ 'developer.client_parameter.page_description'|trans }}

    -
  • {% trans %}Client ID{% endtrans %}:
    {{ client_id }}
  • -
  • {% trans %}Client secret{% endtrans %}:
    {{ client_secret }}
  • +
  • {{ 'developer.client_parameter.field_id'|trans }}:
    {{ client_id }}
  • +
  • {{ 'developer.client_parameter.field_secret'|trans }}:
    {{ client_secret }}
- {% trans %}Back{% endtrans %} - {% trans %}Read the howto "Create my first application"{% endtrans %} + {{ 'developer.client_parameter.back'|trans }} + {{ 'developer.client_parameter.read_howto'|trans }}
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 382e6311..acbc2c88 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 @@ -1,6 +1,6 @@ {% extends "WallabagCoreBundle::layout.html.twig" %} -{% block title %}{% trans %}How to create my first application{% endtrans %}{% endblock %} +{% block title %}{{ 'developer.howto.page_title'|trans }}{% endblock %} {% block css %} {{ parent() }} @@ -13,10 +13,10 @@
-

{% trans %}The following commands make use of the HTTPie library. Make sure it is installed on your system before using it.{% endtrans %}

-

{% trans %}You need a token to communicate between your 3rd application and wallabag API.{% endtrans %}

-

{% trans with {'%link%': path('developer_create_client')} %}To create this token, you need to create a new client.{% endtrans %}

-

{% trans %}Now, create your token (replace client_id, client_secret, username and password with the good values):{% endtrans %}

+

{{ 'developer.howto.description.paragraph_1'|trans|raw }}

+

{{ 'developer.howto.description.paragraph_2'|trans }}

+

{{ 'developer.howto.description.paragraph_3'|trans({'%link%': path('developer_create_client')})|raw }}

+

{{ 'developer.howto.description.paragraph_4'|trans }}

http POST http://v2.wallabag.org/oauth/v2/token \
     grant_type=password \
@@ -25,7 +25,7 @@
     username=yourUsername \
     password=yourPassw0rd

-

{% trans %}The API will return a response like this:{% endtrans %}

+

{{ 'developer.howto.description.paragraph_5'|trans }}

HTTP/1.1 200 OK
 Cache-Control: no-store, private
@@ -45,14 +45,14 @@ X-Powered-By: PHP/5.5.9-1ubuntu4.13
     "token_type": "bearer"
 }

-

{% trans %}The access_token is useful to do a call to the API endpoint. For example:{% endtrans %}

+

{{ 'developer.howto.description.paragraph_6'|trans }}

http GET http://v2.wallabag.org/api/entries.json \
     "Authorization:Bearer ZWFjNjA3ZWMwYWVmYzRkYTBlMmQ3NTllYmVhOGJiZDE0ZTg1NjE4MjczOTVlNzM0ZTRlMWQ0MmRlMmYwNTk5Mw"

-

{% trans %}This call will return all the entries for your user.{% endtrans %}

-

{% trans with {'%link%': path('nelmio_api_doc_index')} %}If you want to see all the API endpoints, you can have a look to our API documentation.{% endtrans %}

-

{% trans %}Back{% endtrans %}

+

{{ 'developer.howto.description.paragraph_7'|trans }}

+

{{ 'developer.howto.description.paragraph_8'|trans({'%link%': path('nelmio_api_doc_index')})|raw }}

+

{{ 'developer.howto.back'|trans }}

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 2e7dbcab..e12779b7 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 @@ -1,6 +1,6 @@ {% extends "WallabagCoreBundle::layout.html.twig" %} -{% block title %}{% trans %}Developer{% endtrans %}{% endblock %} +{% block title %}{{ 'developer.page_title'|trans }}{% endblock %} {% block content %}
@@ -8,21 +8,21 @@
-

{% trans %}Welcome to the wallabag API{% endtrans %}

+

{{ 'developer.welcome_message'|trans }}

-

{% trans %}Documentation{% endtrans %}

+

{{ 'developer.documentation'|trans }}

-

{% trans %}Clients{% endtrans %}

+

{{ 'developer.clients.title'|trans }}

-

{% trans %}Existing clients{% endtrans %}

+

{{ 'developer.existing_clients.title'|trans }}

{% if clients %}
    {% for client in clients %} @@ -31,33 +31,33 @@
    - + - + - + - +
    {% trans %}Client ID{% endtrans %}{{ 'developer.existing_clients.field_id'|trans }} {{ client.id }}_{{ client.randomId }}
    {% trans %}Client secret{% endtrans %}{{ 'developer.existing_clients.field_secret'|trans }} {{ client.secret }}
    {% trans %}Redirect URIs{% endtrans %}{{ 'developer.existing_clients.field_uris'|trans }} {{ client.redirectUris|json_encode() }}
    {% trans %}Grant type allowed{% endtrans %}{{ 'developer.existing_clients.field_grant_types'|trans }} {{ client.allowedGrantTypes|json_encode() }}

    - {% trans %}You have the ability to remove this client. This action is IRREVERSIBLE !{% endtrans %}
    - {% trans %}If you remove it, every app configured with that client won't be able to auth on your wallabag.{% endtrans %}
    - {% trans %}Remove this client{% endtrans %} + {{ 'developer.remove.warn_message_1'|trans }}
    + {{ 'developer.remove.warn_message_2'|trans }}
    + {{ 'developer.remove.action'|trans }}

    {% endfor %}
{% else %} - {% trans %}No client yet.{% endtrans %} + {{ 'developer.existing_clients.no_client'|trans }} {% endif %}
-- cgit v1.2.3