diff options
Diffstat (limited to 'src/Wallabag')
26 files changed, 879 insertions, 223 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/ConfigController.php b/src/Wallabag/CoreBundle/Controller/ConfigController.php index f1e212d9..51d8bdd1 100644 --- a/src/Wallabag/CoreBundle/Controller/ConfigController.php +++ b/src/Wallabag/CoreBundle/Controller/ConfigController.php | |||
@@ -13,7 +13,6 @@ use Wallabag\CoreBundle\Entity\Config; | |||
13 | use Wallabag\CoreBundle\Entity\TaggingRule; | 13 | use Wallabag\CoreBundle\Entity\TaggingRule; |
14 | use Wallabag\CoreBundle\Form\Type\ConfigType; | 14 | use Wallabag\CoreBundle\Form\Type\ConfigType; |
15 | use Wallabag\CoreBundle\Form\Type\ChangePasswordType; | 15 | use Wallabag\CoreBundle\Form\Type\ChangePasswordType; |
16 | use Wallabag\CoreBundle\Form\Type\NewUserType; | ||
17 | use Wallabag\CoreBundle\Form\Type\RssType; | 16 | use Wallabag\CoreBundle\Form\Type\RssType; |
18 | use Wallabag\CoreBundle\Form\Type\TaggingRuleType; | 17 | use Wallabag\CoreBundle\Form\Type\TaggingRuleType; |
19 | use Wallabag\CoreBundle\Form\Type\UserInformationType; | 18 | use Wallabag\CoreBundle\Form\Type\UserInformationType; |
@@ -138,38 +137,12 @@ class ConfigController extends Controller | |||
138 | return $this->redirect($this->generateUrl('config').'#set5'); | 137 | return $this->redirect($this->generateUrl('config').'#set5'); |
139 | } | 138 | } |
140 | 139 | ||
141 | // handle adding new user | ||
142 | $newUser = $userManager->createUser(); | ||
143 | // enable created user by default | ||
144 | $newUser->setEnabled(true); | ||
145 | $newUserForm = $this->createForm(NewUserType::class, $newUser, [ | ||
146 | 'validation_groups' => ['Profile'], | ||
147 | 'action' => $this->generateUrl('config').'#set6', | ||
148 | ]); | ||
149 | $newUserForm->handleRequest($request); | ||
150 | |||
151 | if ($newUserForm->isValid() && $this->get('security.authorization_checker')->isGranted('ROLE_SUPER_ADMIN')) { | ||
152 | $userManager->updateUser($newUser); | ||
153 | |||
154 | // dispatch a created event so the associated config will be created | ||
155 | $event = new UserEvent($newUser, $request); | ||
156 | $this->get('event_dispatcher')->dispatch(FOSUserEvents::USER_CREATED, $event); | ||
157 | |||
158 | $this->get('session')->getFlashBag()->add( | ||
159 | 'notice', | ||
160 | $this->get('translator')->trans('flashes.config.notice.user_added', ['%username%' => $newUser->getUsername()]) | ||
161 | ); | ||
162 | |||
163 | return $this->redirect($this->generateUrl('config').'#set6'); | ||
164 | } | ||
165 | |||
166 | return $this->render('WallabagCoreBundle:Config:index.html.twig', [ | 140 | return $this->render('WallabagCoreBundle:Config:index.html.twig', [ |
167 | 'form' => [ | 141 | 'form' => [ |
168 | 'config' => $configForm->createView(), | 142 | 'config' => $configForm->createView(), |
169 | 'rss' => $rssForm->createView(), | 143 | 'rss' => $rssForm->createView(), |
170 | 'pwd' => $pwdForm->createView(), | 144 | 'pwd' => $pwdForm->createView(), |
171 | 'user' => $userForm->createView(), | 145 | 'user' => $userForm->createView(), |
172 | 'new_user' => $newUserForm->createView(), | ||
173 | 'new_tagging_rule' => $newTaggingRule->createView(), | 146 | 'new_tagging_rule' => $newTaggingRule->createView(), |
174 | ], | 147 | ], |
175 | 'rss' => [ | 148 | 'rss' => [ |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml index da7e2652..40644ff5 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml | |||
@@ -31,6 +31,7 @@ menu: | |||
31 | search: 'Søg' | 31 | search: 'Søg' |
32 | # save_link: 'Save a link' | 32 | # save_link: 'Save a link' |
33 | back_to_unread: 'Tilbage til de ulæste artikler' | 33 | back_to_unread: 'Tilbage til de ulæste artikler' |
34 | # users_management: 'Users management' | ||
34 | top: | 35 | top: |
35 | add_new_entry: 'Tilføj ny artikel' | 36 | add_new_entry: 'Tilføj ny artikel' |
36 | search: 'Søg' | 37 | search: 'Søg' |
@@ -129,12 +130,6 @@ config: | |||
129 | # or: 'One rule OR another' | 130 | # or: 'One rule OR another' |
130 | # and: 'One rule AND another' | 131 | # and: 'One rule AND another' |
131 | # matches: 'Tests that a <i>subject</i> is matches a <i>search</i> (case-insensitive).<br />Example: <code>title matches "football"</code>' | 132 | # matches: 'Tests that a <i>subject</i> is matches a <i>search</i> (case-insensitive).<br />Example: <code>title matches "football"</code>' |
132 | form_new_user: | ||
133 | username_label: 'Brugernavn' | ||
134 | password_label: 'Adgangskode' | ||
135 | repeat_new_password_label: 'Gentag adgangskode' | ||
136 | plain_password_label: '????' | ||
137 | email_label: 'Emailadresse' | ||
138 | 133 | ||
139 | entry: | 134 | entry: |
140 | page_titles: | 135 | page_titles: |
@@ -396,12 +391,14 @@ developer: | |||
396 | # page_title: 'Developer > New client' | 391 | # page_title: 'Developer > New client' |
397 | # page_description: 'You are about to create a new client. Please fill the field below for the redirect URI of your application.' | 392 | # page_description: 'You are about to create a new client. Please fill the field below for the redirect URI of your application.' |
398 | # form: | 393 | # form: |
394 | # name_label: 'Name of the client' | ||
399 | # redirect_uris_label: 'Redirect URIs' | 395 | # redirect_uris_label: 'Redirect URIs' |
400 | # save_label: 'Create a new client' | 396 | # save_label: 'Create a new client' |
401 | # action_back: 'Back' | 397 | # action_back: 'Back' |
402 | # client_parameter: | 398 | # client_parameter: |
403 | # page_title: 'Developer > Client parameters' | 399 | # page_title: 'Developer > Client parameters' |
404 | # page_description: 'Here are your client parameters.' | 400 | # page_description: 'Here are your client parameters.' |
401 | # field_name: 'Client name' | ||
405 | # field_id: 'Client ID' | 402 | # field_id: 'Client ID' |
406 | # field_secret: 'Client secret' | 403 | # field_secret: 'Client secret' |
407 | # back: 'Back' | 404 | # back: 'Back' |
@@ -419,6 +416,33 @@ developer: | |||
419 | # paragraph_8: 'If you want to see all the API endpoints, you can have a look <a href="%link%">to our API documentation</a>.' | 416 | # paragraph_8: 'If you want to see all the API endpoints, you can have a look <a href="%link%">to our API documentation</a>.' |
420 | # back: 'Back' | 417 | # back: 'Back' |
421 | 418 | ||
419 | user: | ||
420 | # page_title: Users management | ||
421 | # new_user: Create a new user | ||
422 | # edit_user: Edit an existing user | ||
423 | # description: "Here you can manage all users (create, edit and delete)" | ||
424 | # list: | ||
425 | # actions: Actions | ||
426 | # edit_action: Edit | ||
427 | # yes: Yes | ||
428 | # no: No | ||
429 | # create_new_one: Create a new user | ||
430 | form: | ||
431 | username_label: 'Brugernavn' | ||
432 | # name_label: 'Name' | ||
433 | password_label: 'Adgangskode' | ||
434 | repeat_new_password_label: 'Gentag adgangskode' | ||
435 | plain_password_label: '????' | ||
436 | email_label: 'Emailadresse' | ||
437 | # enabled_label: 'Enabled' | ||
438 | # locked_label: 'Locked' | ||
439 | # last_login_label: 'Last login' | ||
440 | # twofactor_label: Two factor authentication | ||
441 | # save: Save | ||
442 | # delete: Delete | ||
443 | # delete_confirm: Are you sure? | ||
444 | # back_to_list: Back to list | ||
445 | |||
422 | flashes: | 446 | flashes: |
423 | config: | 447 | config: |
424 | notice: | 448 | notice: |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml index eb82f13f..6f790744 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml | |||
@@ -31,6 +31,7 @@ menu: | |||
31 | search: 'Suche' | 31 | search: 'Suche' |
32 | save_link: 'Link speichern' | 32 | save_link: 'Link speichern' |
33 | back_to_unread: 'Zurück zu ungelesenen Artikeln' | 33 | back_to_unread: 'Zurück zu ungelesenen Artikeln' |
34 | # users_management: 'Users management' | ||
34 | top: | 35 | top: |
35 | add_new_entry: 'Neuen Artikel hinzufügen' | 36 | add_new_entry: 'Neuen Artikel hinzufügen' |
36 | search: 'Suche' | 37 | search: 'Suche' |
@@ -129,12 +130,6 @@ config: | |||
129 | or: 'Eine Regel ODER die andere' | 130 | or: 'Eine Regel ODER die andere' |
130 | and: 'Eine Regel UND eine andere' | 131 | and: 'Eine Regel UND eine andere' |
131 | matches: 'Tests, ob eine <i>Variable</i> auf eine <i>Suche</i> zutrifft (Groß- und Kleinschreibung wird nicht berücksichtigt).<br />Beispiel: <code>title matches "Fußball"</code>' | 132 | matches: 'Tests, ob eine <i>Variable</i> auf eine <i>Suche</i> zutrifft (Groß- und Kleinschreibung wird nicht berücksichtigt).<br />Beispiel: <code>title matches "Fußball"</code>' |
132 | form_new_user: | ||
133 | username_label: 'Benutzername' | ||
134 | password_label: 'Kennwort' | ||
135 | repeat_new_password_label: 'Neues Kennwort wiederholen' | ||
136 | plain_password_label: '????' | ||
137 | email_label: 'E-Mail-Adresse' | ||
138 | 133 | ||
139 | entry: | 134 | entry: |
140 | page_titles: | 135 | page_titles: |
@@ -396,12 +391,14 @@ developer: | |||
396 | page_title: 'Entwickler > Neuer Client' | 391 | page_title: 'Entwickler > Neuer Client' |
397 | page_description: 'Du bist dabei, einen neuen Client zu erstellen. Fülle das nachfolgende Feld für die Weiterleitungs-URIs deiner Anwendung aus.' | 392 | page_description: 'Du bist dabei, einen neuen Client zu erstellen. Fülle das nachfolgende Feld für die Weiterleitungs-URIs deiner Anwendung aus.' |
398 | form: | 393 | form: |
394 | # name_label: 'Name of the client' | ||
399 | redirect_uris_label: 'Weiterleitungs-URIs' | 395 | redirect_uris_label: 'Weiterleitungs-URIs' |
400 | save_label: 'Neuen Client erstellen' | 396 | save_label: 'Neuen Client erstellen' |
401 | action_back: 'Zurück' | 397 | action_back: 'Zurück' |
402 | client_parameter: | 398 | client_parameter: |
403 | page_title: 'Entwickler > Client-Parameter' | 399 | page_title: 'Entwickler > Client-Parameter' |
404 | page_description: 'Dies sind deine Client-Parameter.' | 400 | page_description: 'Dies sind deine Client-Parameter.' |
401 | # field_name: 'Client name' | ||
405 | field_id: 'Client-ID' | 402 | field_id: 'Client-ID' |
406 | field_secret: 'Client-Secret' | 403 | field_secret: 'Client-Secret' |
407 | back: 'Zurück' | 404 | back: 'Zurück' |
@@ -419,6 +416,33 @@ developer: | |||
419 | paragraph_8: 'Wenn du alle API-Endpunkte sehen willst, werfe einen Blick auf die <a href="%link%">API-Dokumentation</a>.' | 416 | paragraph_8: 'Wenn du alle API-Endpunkte sehen willst, werfe einen Blick auf die <a href="%link%">API-Dokumentation</a>.' |
420 | back: 'Zurück' | 417 | back: 'Zurück' |
421 | 418 | ||
419 | user: | ||
420 | # page_title: Users management | ||
421 | # new_user: Create a new user | ||
422 | # edit_user: Edit an existing user | ||
423 | # description: "Here you can manage all users (create, edit and delete)" | ||
424 | # list: | ||
425 | # actions: Actions | ||
426 | # edit_action: Edit | ||
427 | # yes: Yes | ||
428 | # no: No | ||
429 | # create_new_one: Create a new user | ||
430 | form: | ||
431 | username_label: 'Benutzername' | ||
432 | # name_label: 'Name' | ||
433 | password_label: 'Kennwort' | ||
434 | repeat_new_password_label: 'Neues Kennwort wiederholen' | ||
435 | plain_password_label: '????' | ||
436 | email_label: 'E-Mail-Adresse' | ||
437 | # enabled_label: 'Enabled' | ||
438 | # locked_label: 'Locked' | ||
439 | # last_login_label: 'Last login' | ||
440 | # twofactor_label: Two factor authentication | ||
441 | # save: Save | ||
442 | # delete: Delete | ||
443 | # delete_confirm: Are you sure? | ||
444 | # back_to_list: Back to list | ||
445 | |||
422 | flashes: | 446 | flashes: |
423 | config: | 447 | config: |
424 | notice: | 448 | notice: |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml index 01d8053b..91abe162 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml | |||
@@ -31,6 +31,7 @@ menu: | |||
31 | search: 'Search' | 31 | search: 'Search' |
32 | save_link: 'Save a link' | 32 | save_link: 'Save a link' |
33 | back_to_unread: 'Back to unread articles' | 33 | back_to_unread: 'Back to unread articles' |
34 | users_management: 'Users management' | ||
34 | top: | 35 | top: |
35 | add_new_entry: 'Add a new entry' | 36 | add_new_entry: 'Add a new entry' |
36 | search: 'Search' | 37 | search: 'Search' |
@@ -129,12 +130,6 @@ config: | |||
129 | or: 'One rule OR another' | 130 | or: 'One rule OR another' |
130 | and: 'One rule AND another' | 131 | and: 'One rule AND another' |
131 | matches: 'Tests that a <i>subject</i> is matches a <i>search</i> (case-insensitive).<br />Example: <code>title matches "football"</code>' | 132 | matches: 'Tests that a <i>subject</i> is matches a <i>search</i> (case-insensitive).<br />Example: <code>title matches "football"</code>' |
132 | form_new_user: | ||
133 | username_label: 'Username' | ||
134 | password_label: 'Password' | ||
135 | repeat_new_password_label: 'Repeat new password' | ||
136 | plain_password_label: '????' | ||
137 | email_label: 'Email' | ||
138 | 133 | ||
139 | entry: | 134 | entry: |
140 | page_titles: | 135 | page_titles: |
@@ -421,6 +416,33 @@ developer: | |||
421 | paragraph_8: 'If you want to see all the API endpoints, you can have a look <a href="%link%">to our API documentation</a>.' | 416 | paragraph_8: 'If you want to see all the API endpoints, you can have a look <a href="%link%">to our API documentation</a>.' |
422 | back: 'Back' | 417 | back: 'Back' |
423 | 418 | ||
419 | user: | ||
420 | page_title: Users management | ||
421 | new_user: Create a new user | ||
422 | edit_user: Edit an existing user | ||
423 | description: "Here you can manage all users (create, edit and delete)" | ||
424 | list: | ||
425 | actions: Actions | ||
426 | edit_action: Edit | ||
427 | yes: Yes | ||
428 | no: No | ||
429 | create_new_one: Create a new user | ||
430 | form: | ||
431 | username_label: 'Username' | ||
432 | name_label: 'Name' | ||
433 | password_label: 'Password' | ||
434 | repeat_new_password_label: 'Repeat new password' | ||
435 | plain_password_label: '????' | ||
436 | email_label: 'Email' | ||
437 | enabled_label: 'Enabled' | ||
438 | locked_label: 'Locked' | ||
439 | last_login_label: 'Last login' | ||
440 | twofactor_label: Two factor authentication | ||
441 | save: Save | ||
442 | delete: Delete | ||
443 | delete_confirm: Are you sure? | ||
444 | back_to_list: Back to list | ||
445 | |||
424 | flashes: | 446 | flashes: |
425 | config: | 447 | config: |
426 | notice: | 448 | notice: |
@@ -431,7 +453,6 @@ flashes: | |||
431 | rss_updated: 'RSS information updated' | 453 | rss_updated: 'RSS information updated' |
432 | tagging_rules_updated: 'Tagging rules updated' | 454 | tagging_rules_updated: 'Tagging rules updated' |
433 | tagging_rules_deleted: 'Tagging rule deleted' | 455 | tagging_rules_deleted: 'Tagging rule deleted' |
434 | user_added: 'User "%username%" added' | ||
435 | rss_token_updated: 'RSS token updated' | 456 | rss_token_updated: 'RSS token updated' |
436 | entry: | 457 | entry: |
437 | notice: | 458 | notice: |
@@ -462,3 +483,8 @@ flashes: | |||
462 | notice: | 483 | notice: |
463 | client_created: 'New client %name% created.' | 484 | client_created: 'New client %name% created.' |
464 | client_deleted: 'Client %name% deleted' | 485 | client_deleted: 'Client %name% deleted' |
486 | user: | ||
487 | notice: | ||
488 | added: 'User "%username%" added' | ||
489 | updated: 'User "%username%" updated' | ||
490 | deleted: 'User "%username%" deleted' | ||
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml index 5364e99a..25d2f3a2 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml | |||
@@ -31,6 +31,7 @@ menu: | |||
31 | search: 'Buscar' | 31 | search: 'Buscar' |
32 | save_link: 'Archivar un enlace' | 32 | save_link: 'Archivar un enlace' |
33 | back_to_unread: 'Volver a los artículos sin leer' | 33 | back_to_unread: 'Volver a los artículos sin leer' |
34 | # users_management: 'Users management' | ||
34 | top: | 35 | top: |
35 | add_new_entry: 'Añadir un nuevo artículo' | 36 | add_new_entry: 'Añadir un nuevo artículo' |
36 | search: 'Buscar' | 37 | search: 'Buscar' |
@@ -129,12 +130,6 @@ config: | |||
129 | or: 'Una regla U otra' | 130 | or: 'Una regla U otra' |
130 | and: 'Una regla Y la otra' | 131 | and: 'Una regla Y la otra' |
131 | matches: 'Pruebe si un <i>sujeto</i> corresponde a una <i>búsqueda</i> (insensible a mayusculas).<br />Ejemplo : <code>título coincide "football"</code>' | 132 | matches: 'Pruebe si un <i>sujeto</i> corresponde a una <i>búsqueda</i> (insensible a mayusculas).<br />Ejemplo : <code>título coincide "football"</code>' |
132 | form_new_user: | ||
133 | username_label: 'Nombre de usuario' | ||
134 | password_label: 'Contraseña' | ||
135 | repeat_new_password_label: 'Confirmar la nueva contraseña' | ||
136 | plain_password_label: '????' | ||
137 | email_label: 'Email' | ||
138 | 133 | ||
139 | entry: | 134 | entry: |
140 | page_titles: | 135 | page_titles: |
@@ -396,12 +391,14 @@ developer: | |||
396 | page_title: 'Promotor > Nuevo cliente' | 391 | page_title: 'Promotor > Nuevo cliente' |
397 | page_description: 'Va a crear un nuevo cliente. Por favor, llene el campo abajo para URI redirigido de su aplicación.' | 392 | page_description: 'Va a crear un nuevo cliente. Por favor, llene el campo abajo para URI redirigido de su aplicación.' |
398 | form: | 393 | form: |
394 | # name_label: 'Name of the client' | ||
399 | redirect_uris_label: 'los URI redirigidos' | 395 | redirect_uris_label: 'los URI redirigidos' |
400 | save_label: 'Crear un nuevo cliente' | 396 | save_label: 'Crear un nuevo cliente' |
401 | action_back: 'Atrás' | 397 | action_back: 'Atrás' |
402 | client_parameter: | 398 | client_parameter: |
403 | page_title: 'Promotor > Parámetros del cliente' | 399 | page_title: 'Promotor > Parámetros del cliente' |
404 | page_description: 'Aquí hay sus parámetros del cliente.' | 400 | page_description: 'Aquí hay sus parámetros del cliente.' |
401 | # field_name: 'Client name' | ||
405 | field_id: 'Identificación del cliente' | 402 | field_id: 'Identificación del cliente' |
406 | field_secret: 'Cliente secreto' | 403 | field_secret: 'Cliente secreto' |
407 | back: 'Atrás' | 404 | back: 'Atrás' |
@@ -419,6 +416,33 @@ developer: | |||
419 | paragraph_8: 'Si quiere ver todos los fines de API, se puede ver <a href="%link%">a nuestra documentación API</a>.' | 416 | paragraph_8: 'Si quiere ver todos los fines de API, se puede ver <a href="%link%">a nuestra documentación API</a>.' |
420 | back: 'Atrás' | 417 | back: 'Atrás' |
421 | 418 | ||
419 | user: | ||
420 | # page_title: Users management | ||
421 | # new_user: Create a new user | ||
422 | # edit_user: Edit an existing user | ||
423 | # description: "Here you can manage all users (create, edit and delete)" | ||
424 | # list: | ||
425 | # actions: Actions | ||
426 | # edit_action: Edit | ||
427 | # yes: Yes | ||
428 | # no: No | ||
429 | # create_new_one: Create a new user | ||
430 | form: | ||
431 | username_label: 'Nombre de usuario' | ||
432 | # name_label: 'Name' | ||
433 | password_label: 'Contraseña' | ||
434 | repeat_new_password_label: 'Confirmar la nueva contraseña' | ||
435 | plain_password_label: '????' | ||
436 | email_label: 'Email' | ||
437 | # enabled_label: 'Enabled' | ||
438 | # locked_label: 'Locked' | ||
439 | # last_login_label: 'Last login' | ||
440 | # twofactor_label: Two factor authentication | ||
441 | # save: Save | ||
442 | # delete: Delete | ||
443 | # delete_confirm: Are you sure? | ||
444 | # back_to_list: Back to list | ||
445 | |||
422 | flashes: | 446 | flashes: |
423 | config: | 447 | config: |
424 | notice: | 448 | notice: |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml index 6f42b173..b02ffea0 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml | |||
@@ -31,6 +31,7 @@ menu: | |||
31 | search: 'جستجو' | 31 | search: 'جستجو' |
32 | save_link: 'ذخیرهٔ یک پیوند' | 32 | save_link: 'ذخیرهٔ یک پیوند' |
33 | back_to_unread: 'بازگشت به خواندهنشدهها' | 33 | back_to_unread: 'بازگشت به خواندهنشدهها' |
34 | # users_management: 'Users management' | ||
34 | top: | 35 | top: |
35 | add_new_entry: 'افزودن مقالهٔ تازه' | 36 | add_new_entry: 'افزودن مقالهٔ تازه' |
36 | search: 'جستجو' | 37 | search: 'جستجو' |
@@ -129,12 +130,6 @@ config: | |||
129 | # or: 'One rule OR another' | 130 | # or: 'One rule OR another' |
130 | # and: 'One rule AND another' | 131 | # and: 'One rule AND another' |
131 | # matches: 'Tests that a <i>subject</i> is matches a <i>search</i> (case-insensitive).<br />Example: <code>title matches "football"</code>' | 132 | # matches: 'Tests that a <i>subject</i> is matches a <i>search</i> (case-insensitive).<br />Example: <code>title matches "football"</code>' |
132 | form_new_user: | ||
133 | username_label: 'نام کاربری' | ||
134 | password_label: 'رمز' | ||
135 | repeat_new_password_label: 'رمز تازه را دوباره بنویسید' | ||
136 | plain_password_label: '????' | ||
137 | email_label: 'نشانی ایمیل' | ||
138 | 133 | ||
139 | entry: | 134 | entry: |
140 | page_titles: | 135 | page_titles: |
@@ -395,12 +390,14 @@ developer: | |||
395 | # page_title: 'Developer > New client' | 390 | # page_title: 'Developer > New client' |
396 | # page_description: 'You are about to create a new client. Please fill the field below for the redirect URI of your application.' | 391 | # page_description: 'You are about to create a new client. Please fill the field below for the redirect URI of your application.' |
397 | # form: | 392 | # form: |
393 | # name_label: 'Name of the client' | ||
398 | # redirect_uris_label: 'Redirect URIs' | 394 | # redirect_uris_label: 'Redirect URIs' |
399 | # save_label: 'Create a new client' | 395 | # save_label: 'Create a new client' |
400 | # action_back: 'بازگشت' | 396 | # action_back: 'بازگشت' |
401 | # client_parameter: | 397 | # client_parameter: |
402 | # page_title: 'Developer > Client parameters' | 398 | # page_title: 'Developer > Client parameters' |
403 | # page_description: 'Here are your client parameters.' | 399 | # page_description: 'Here are your client parameters.' |
400 | # field_name: 'Client name' | ||
404 | # field_id: 'Client ID' | 401 | # field_id: 'Client ID' |
405 | # field_secret: 'Client secret' | 402 | # field_secret: 'Client secret' |
406 | # back: 'بازگشت' | 403 | # back: 'بازگشت' |
@@ -418,6 +415,33 @@ developer: | |||
418 | # paragraph_8: 'If you want to see all the API endpoints, you can have a look <a href="%link%">to our API documentation</a>.' | 415 | # paragraph_8: 'If you want to see all the API endpoints, you can have a look <a href="%link%">to our API documentation</a>.' |
419 | # back: 'بازگشت' | 416 | # back: 'بازگشت' |
420 | 417 | ||
418 | user: | ||
419 | # page_title: Users management | ||
420 | # new_user: Create a new user | ||
421 | # edit_user: Edit an existing user | ||
422 | # description: "Here you can manage all users (create, edit and delete)" | ||
423 | # list: | ||
424 | # actions: Actions | ||
425 | # edit_action: Edit | ||
426 | # yes: Yes | ||
427 | # no: No | ||
428 | # create_new_one: Create a new user | ||
429 | form: | ||
430 | username_label: 'نام کاربری' | ||
431 | # name_label: 'Name' | ||
432 | password_label: 'رمز' | ||
433 | repeat_new_password_label: 'رمز تازه را دوباره بنویسید' | ||
434 | plain_password_label: '????' | ||
435 | email_label: 'نشانی ایمیل' | ||
436 | # enabled_label: 'Enabled' | ||
437 | # locked_label: 'Locked' | ||
438 | # last_login_label: 'Last login' | ||
439 | # twofactor_label: Two factor authentication | ||
440 | # save: Save | ||
441 | # delete: Delete | ||
442 | # delete_confirm: Are you sure? | ||
443 | # back_to_list: Back to list | ||
444 | |||
421 | flashes: | 445 | flashes: |
422 | config: | 446 | config: |
423 | notice: | 447 | notice: |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml index 6984be83..598205b0 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml | |||
@@ -31,6 +31,7 @@ menu: | |||
31 | search: 'Recherche' | 31 | search: 'Recherche' |
32 | save_link: 'Sauvegarder un nouvel article' | 32 | save_link: 'Sauvegarder un nouvel article' |
33 | back_to_unread: 'Retour aux articles non lus' | 33 | back_to_unread: 'Retour aux articles non lus' |
34 | users_management: 'Gestion des utilisateurs' | ||
34 | top: | 35 | top: |
35 | add_new_entry: 'Sauvegarder un nouvel article' | 36 | add_new_entry: 'Sauvegarder un nouvel article' |
36 | search: 'Rechercher' | 37 | search: 'Rechercher' |
@@ -129,12 +130,6 @@ config: | |||
129 | or: "Une règle OU l'autre" | 130 | or: "Une règle OU l'autre" |
130 | and: "Une règle ET l'autre" | 131 | and: "Une règle ET l'autre" |
131 | matches: 'Teste si un <i>sujet</i> correspond à une <i>recherche</i> (non sensible à la casse).<br />Exemple : <code>title matches "football"</code>' | 132 | matches: 'Teste si un <i>sujet</i> correspond à une <i>recherche</i> (non sensible à la casse).<br />Exemple : <code>title matches "football"</code>' |
132 | form_new_user: | ||
133 | username_label: "Nom d'utilisateur" | ||
134 | password_label: 'Mot de passe' | ||
135 | repeat_new_password_label: 'Confirmez votre nouveau mot de passe' | ||
136 | plain_password_label: 'Mot de passe en clair' | ||
137 | email_label: 'Adresse e-mail' | ||
138 | 133 | ||
139 | entry: | 134 | entry: |
140 | page_titles: | 135 | page_titles: |
@@ -421,6 +416,33 @@ developer: | |||
421 | paragraph_8: "Si vous voulez toutes les méthodes de l'API, jetez un oeil <a href=\"%link%\">à la documentation de l'API</a>." | 416 | paragraph_8: "Si vous voulez toutes les méthodes de l'API, jetez un oeil <a href=\"%link%\">à la documentation de l'API</a>." |
422 | back: 'Retour' | 417 | back: 'Retour' |
423 | 418 | ||
419 | user: | ||
420 | page_title: Gestion des utilisateurs | ||
421 | new_user: Créer un nouvel utilisateur | ||
422 | edit_user: Éditer un utilisateur existant | ||
423 | description: Ici vous pouvez gérer vos utilisateurs (création, mise à jour et suppression) | ||
424 | list: | ||
425 | actions: Actions | ||
426 | edit_action: Éditer | ||
427 | yes: Oui | ||
428 | no: Non | ||
429 | create_new_one: Créer un nouvel utilisateur | ||
430 | form: | ||
431 | username_label: "Nom d'utilisateur" | ||
432 | name_label: 'Nom' | ||
433 | password_label: 'Mot de passe' | ||
434 | repeat_new_password_label: 'Confirmez votre nouveau mot de passe' | ||
435 | plain_password_label: 'Mot de passe en clair' | ||
436 | email_label: 'Adresse e-mail' | ||
437 | enabled_label: 'Activé' | ||
438 | locked_label: 'Bloqué' | ||
439 | last_login_label: 'Dernière connexion' | ||
440 | twofactor_label: Double authentification | ||
441 | save: Sauvegarder | ||
442 | delete: Supprimer | ||
443 | delete_confirm: Êtes-vous sûr? | ||
444 | back_to_list: Revenir à la liste | ||
445 | |||
424 | flashes: | 446 | flashes: |
425 | config: | 447 | config: |
426 | notice: | 448 | notice: |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml index 30b3287e..c58c929f 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml | |||
@@ -31,6 +31,7 @@ menu: | |||
31 | search: 'Cerca' | 31 | search: 'Cerca' |
32 | save_link: 'Salva collegamento' | 32 | save_link: 'Salva collegamento' |
33 | back_to_unread: 'Torna ai contenuti non letti' | 33 | back_to_unread: 'Torna ai contenuti non letti' |
34 | # users_management: 'Users management' | ||
34 | top: | 35 | top: |
35 | add_new_entry: 'Aggiungi un nuovo contenuto' | 36 | add_new_entry: 'Aggiungi un nuovo contenuto' |
36 | search: 'Cerca' | 37 | search: 'Cerca' |
@@ -129,12 +130,6 @@ config: | |||
129 | or: "Una regola O un'altra" | 130 | or: "Una regola O un'altra" |
130 | and: "Una regola E un'altra" | 131 | and: "Una regola E un'altra" |
131 | matches: 'Verifica che un <i>oggetto</i> risulti in una <i>ricerca</i> (case-insensitive).<br />Esempio: <code>titolo contiene "football"</code>' | 132 | matches: 'Verifica che un <i>oggetto</i> risulti in una <i>ricerca</i> (case-insensitive).<br />Esempio: <code>titolo contiene "football"</code>' |
132 | form_new_user: | ||
133 | username_label: 'Username' | ||
134 | password_label: 'Password' | ||
135 | repeat_new_password_label: 'Ripeti password' | ||
136 | plain_password_label: '????' | ||
137 | email_label: 'E-mail' | ||
138 | 133 | ||
139 | entry: | 134 | entry: |
140 | page_titles: | 135 | page_titles: |
@@ -162,6 +157,7 @@ entry: | |||
162 | status_label: 'Stato' | 157 | status_label: 'Stato' |
163 | archived_label: 'Archiviati' | 158 | archived_label: 'Archiviati' |
164 | starred_label: 'Preferiti' | 159 | starred_label: 'Preferiti' |
160 | # unread_label: 'Unread' | ||
165 | preview_picture_label: "Ha un'immagine di anteprima" | 161 | preview_picture_label: "Ha un'immagine di anteprima" |
166 | preview_picture_help: 'Immagine di anteprima' | 162 | preview_picture_help: 'Immagine di anteprima' |
167 | language_label: 'Lingua' | 163 | language_label: 'Lingua' |
@@ -395,12 +391,14 @@ developer: | |||
395 | page_title: 'Sviluppatori > Nuovo client' | 391 | page_title: 'Sviluppatori > Nuovo client' |
396 | page_description: 'Stai per creare un nuovo client. Compila i campi sottostanti per il redirect URI della tua applicazione.' | 392 | page_description: 'Stai per creare un nuovo client. Compila i campi sottostanti per il redirect URI della tua applicazione.' |
397 | form: | 393 | form: |
394 | # name_label: 'Name of the client' | ||
398 | redirect_uris_label: 'Redirect URI' | 395 | redirect_uris_label: 'Redirect URI' |
399 | save_label: 'Crea un nuovo client' | 396 | save_label: 'Crea un nuovo client' |
400 | action_back: 'Indietro' | 397 | action_back: 'Indietro' |
401 | client_parameter: | 398 | client_parameter: |
402 | page_title: 'Sviluppatori > parametri Client' | 399 | page_title: 'Sviluppatori > parametri Client' |
403 | page_description: 'Questi sono i tuoi parametri del client.' | 400 | page_description: 'Questi sono i tuoi parametri del client.' |
401 | # field_name: 'Client name' | ||
404 | field_id: 'Client ID' | 402 | field_id: 'Client ID' |
405 | field_secret: 'Client secret' | 403 | field_secret: 'Client secret' |
406 | back: 'Indietro' | 404 | back: 'Indietro' |
@@ -418,6 +416,33 @@ developer: | |||
418 | paragraph_8: 'Se vuoi visualizzare tutti gli API endpoints, dai una occhiata alla <a href="%link%">documentazione delle API</a>.' | 416 | paragraph_8: 'Se vuoi visualizzare tutti gli API endpoints, dai una occhiata alla <a href="%link%">documentazione delle API</a>.' |
419 | back: 'Indietro' | 417 | back: 'Indietro' |
420 | 418 | ||
419 | user: | ||
420 | # page_title: Users management | ||
421 | # new_user: Create a new user | ||
422 | # edit_user: Edit an existing user | ||
423 | # description: "Here you can manage all users (create, edit and delete)" | ||
424 | # list: | ||
425 | # actions: Actions | ||
426 | # edit_action: Edit | ||
427 | # yes: Yes | ||
428 | # no: No | ||
429 | # create_new_one: Create a new user | ||
430 | form: | ||
431 | username_label: 'Username' | ||
432 | # name_label: 'Name' | ||
433 | password_label: 'Password' | ||
434 | repeat_new_password_label: 'Ripeti password' | ||
435 | plain_password_label: '????' | ||
436 | email_label: 'E-mail' | ||
437 | # enabled_label: 'Enabled' | ||
438 | # locked_label: 'Locked' | ||
439 | # last_login_label: 'Last login' | ||
440 | # twofactor_label: Two factor authentication | ||
441 | # save: Save | ||
442 | # delete: Delete | ||
443 | # delete_confirm: Are you sure? | ||
444 | # back_to_list: Back to list | ||
445 | |||
421 | flashes: | 446 | flashes: |
422 | config: | 447 | config: |
423 | notice: | 448 | notice: |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml index a077f1bf..8f06434d 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml | |||
@@ -31,6 +31,7 @@ menu: | |||
31 | search: 'Cercar' | 31 | search: 'Cercar' |
32 | save_link: 'Enregistrar un novèl article' | 32 | save_link: 'Enregistrar un novèl article' |
33 | back_to_unread: 'Tornar als articles pas legits' | 33 | back_to_unread: 'Tornar als articles pas legits' |
34 | # users_management: 'Users management' | ||
34 | top: | 35 | top: |
35 | add_new_entry: 'Enregistrar un novèl article' | 36 | add_new_entry: 'Enregistrar un novèl article' |
36 | search: 'Cercar' | 37 | search: 'Cercar' |
@@ -129,12 +130,6 @@ config: | |||
129 | or: "Una règla O l'autra" | 130 | or: "Una règla O l'autra" |
130 | and: "Una règla E l'autra" | 131 | and: "Una règla E l'autra" |
131 | matches: 'Teste se un <i>subjècte</i> correspond a una <i>recerca</i> (non sensibla a la cassa).<br />Exemple : <code>title matches \"football\"</code>' | 132 | matches: 'Teste se un <i>subjècte</i> correspond a una <i>recerca</i> (non sensibla a la cassa).<br />Exemple : <code>title matches \"football\"</code>' |
132 | form_new_user: | ||
133 | username_label: "Nom d'utilizaire" | ||
134 | password_label: 'Senhal' | ||
135 | repeat_new_password_label: 'Confirmatz vòstre novèl senhal' | ||
136 | plain_password_label: 'Senhal en clar' | ||
137 | email_label: 'Adreça de corrièl' | ||
138 | 133 | ||
139 | entry: | 134 | entry: |
140 | page_titles: | 135 | page_titles: |
@@ -421,6 +416,33 @@ developer: | |||
421 | paragraph_8: "Se volètz totas las adreças d'accès de l'API, donatz un còp d’uèlh <a href=\"%link%\">a la documentacion de l'API</a>." | 416 | paragraph_8: "Se volètz totas las adreças d'accès de l'API, donatz un còp d’uèlh <a href=\"%link%\">a la documentacion de l'API</a>." |
422 | back: 'Retorn' | 417 | back: 'Retorn' |
423 | 418 | ||
419 | user: | ||
420 | # page_title: Users management | ||
421 | # new_user: Create a new user | ||
422 | # edit_user: Edit an existing user | ||
423 | # description: "Here you can manage all users (create, edit and delete)" | ||
424 | # list: | ||
425 | # actions: Actions | ||
426 | # edit_action: Edit | ||
427 | # yes: Yes | ||
428 | # no: No | ||
429 | # create_new_one: Create a new user | ||
430 | form: | ||
431 | username_label: "Nom d'utilizaire" | ||
432 | # name_label: 'Name' | ||
433 | password_label: 'Senhal' | ||
434 | repeat_new_password_label: 'Confirmatz vòstre novèl senhal' | ||
435 | plain_password_label: 'Senhal en clar' | ||
436 | email_label: 'Adreça de corrièl' | ||
437 | # enabled_label: 'Enabled' | ||
438 | # locked_label: 'Locked' | ||
439 | # last_login_label: 'Last login' | ||
440 | # twofactor_label: Two factor authentication | ||
441 | # save: Save | ||
442 | # delete: Delete | ||
443 | # delete_confirm: Are you sure? | ||
444 | # back_to_list: Back to list | ||
445 | |||
424 | flashes: | 446 | flashes: |
425 | config: | 447 | config: |
426 | notice: | 448 | notice: |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml index cad94dd5..54e669b3 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml | |||
@@ -31,6 +31,7 @@ menu: | |||
31 | search: 'Szukaj' | 31 | search: 'Szukaj' |
32 | save_link: 'Zapisz link' | 32 | save_link: 'Zapisz link' |
33 | back_to_unread: 'Powrót do nieprzeczytanych artykułów' | 33 | back_to_unread: 'Powrót do nieprzeczytanych artykułów' |
34 | # users_management: 'Users management' | ||
34 | top: | 35 | top: |
35 | add_new_entry: 'Dodaj nowy wpis' | 36 | add_new_entry: 'Dodaj nowy wpis' |
36 | search: 'Szukaj' | 37 | search: 'Szukaj' |
@@ -129,12 +130,6 @@ config: | |||
129 | or: 'Jedna reguła LUB inna' | 130 | or: 'Jedna reguła LUB inna' |
130 | and: 'Jedna reguła I inna' | 131 | and: 'Jedna reguła I inna' |
131 | matches: 'Sprawdź czy <i>temat</i> pasuje <i>szukaj</i> (duże lub małe litery).<br />Przykład: <code>tytuł zawiera "piłka nożna"</code>' | 132 | matches: 'Sprawdź czy <i>temat</i> pasuje <i>szukaj</i> (duże lub małe litery).<br />Przykład: <code>tytuł zawiera "piłka nożna"</code>' |
132 | form_new_user: | ||
133 | username_label: 'Nazwa użytkownika' | ||
134 | password_label: 'Hasło' | ||
135 | repeat_new_password_label: 'Powtórz nowe hasło' | ||
136 | plain_password_label: 'Jawne hasło' | ||
137 | email_label: 'Adres email' | ||
138 | 133 | ||
139 | entry: | 134 | entry: |
140 | page_titles: | 135 | page_titles: |
@@ -379,36 +374,38 @@ developer: | |||
379 | full_documentation: 'Pokaż pełne API' | 374 | full_documentation: 'Pokaż pełne API' |
380 | list_methods: 'Lista metod API' | 375 | list_methods: 'Lista metod API' |
381 | clients: | 376 | clients: |
382 | title: 'Klienci' | 377 | title: 'Klienci' |
383 | create_new: 'Utwórz nowego klienta' | 378 | create_new: 'Utwórz nowego klienta' |
384 | existing_clients: | 379 | existing_clients: |
385 | title: 'Istniejący klienci' | 380 | title: 'Istniejący klienci' |
386 | field_id: 'ID klienta' | 381 | field_id: 'ID klienta' |
387 | field_secret: 'Client secret' | 382 | field_secret: 'Client secret' |
388 | field_uris: 'Przekieruj URIs' | 383 | field_uris: 'Przekieruj URIs' |
389 | field_grant_types: 'Przyznaj pozwolenie' | 384 | field_grant_types: 'Przyznaj pozwolenie' |
390 | no_client: 'Nie ma jeszcze klienta.' | 385 | no_client: 'Nie ma jeszcze klienta.' |
391 | remove: | 386 | remove: |
392 | warn_message_1: 'Masz możliwość usunięcia tego klienta. Ta akcja jest NIEODWRACALNA !' | 387 | warn_message_1: 'Masz możliwość usunięcia tego klienta. Ta akcja jest NIEODWRACALNA !' |
393 | warn_message_2: "Jeżeli go usuniesz, aplikacje skonfigurowane z tym klientem nię będa w stanie autoryzować twojego wallabag." | 388 | warn_message_2: "Jeżeli go usuniesz, aplikacje skonfigurowane z tym klientem nię będa w stanie autoryzować twojego wallabag." |
394 | action: 'Usuń tego klienta' | 389 | action: 'Usuń tego klienta' |
395 | client: | 390 | client: |
396 | page_title: 'Deweloper > Nowy klient' | 391 | page_title: 'Deweloper > Nowy klient' |
397 | page_description: 'Tworzysz nowego klienta. Wypełnij poniższe pole w celu przekierowania URI twojej aplikacji.' | 392 | page_description: 'Tworzysz nowego klienta. Wypełnij poniższe pole w celu przekierowania URI twojej aplikacji.' |
398 | form: | 393 | form: |
399 | redirect_uris_label: 'Przekieruj adresy URI' | 394 | # name_label: 'Name of the client' |
400 | save_label: 'Stwórz nowego klienta' | 395 | redirect_uris_label: 'Przekieruj adresy URI' |
401 | action_back: 'Cofnij' | 396 | save_label: 'Stwórz nowego klienta' |
397 | action_back: 'Cofnij' | ||
402 | client_parameter: | 398 | client_parameter: |
403 | page_title: 'Deweloper > Parametry klienta' | 399 | page_title: 'Deweloper > Parametry klienta' |
404 | page_description: 'Tutaj znajdują się parametry klienta.' | 400 | page_description: 'Tutaj znajdują się parametry klienta.' |
405 | field_id: 'Client ID' | 401 | # field_name: 'Client name' |
406 | field_secret: 'Client secret' | 402 | field_id: 'Client ID' |
407 | back: 'Cofnij' | 403 | field_secret: 'Client secret' |
408 | read_howto: 'Przeczytaj jak "Stworzyć moją pierwszą aplikację"' | 404 | back: 'Cofnij' |
405 | read_howto: 'Przeczytaj jak "Stworzyć moją pierwszą aplikację"' | ||
409 | howto: | 406 | howto: |
410 | page_title: 'Deweloper > Jak stworzyć moją pierwszą aplikację' | 407 | page_title: 'Deweloper > Jak stworzyć moją pierwszą aplikację' |
411 | description: | 408 | description: |
412 | paragraph_1: 'Następujące komendy korzystają <a href="https://github.com/jkbrzt/httpie">Biblioteka HTTPie</a>. Upewnij się, czy zainstalowałeś ją w swoim systemie zanim z niej skorzystasz' | 409 | paragraph_1: 'Następujące komendy korzystają <a href="https://github.com/jkbrzt/httpie">Biblioteka HTTPie</a>. Upewnij się, czy zainstalowałeś ją w swoim systemie zanim z niej skorzystasz' |
413 | paragraph_2: 'Potrzebujesz tokena w celu nawiązania komunikacji między swoją aplikacją a API wallabag.' | 410 | paragraph_2: 'Potrzebujesz tokena w celu nawiązania komunikacji między swoją aplikacją a API wallabag.' |
414 | paragraph_3: 'W celu stworzenia tokena musisz <a href="%link%">stwórz nowego klienta</a>.' | 411 | paragraph_3: 'W celu stworzenia tokena musisz <a href="%link%">stwórz nowego klienta</a>.' |
@@ -417,7 +414,34 @@ developer: | |||
417 | paragraph_6: 'access_token jest użyteczny do wywołania API endpoint. Na przykład:' | 414 | paragraph_6: 'access_token jest użyteczny do wywołania API endpoint. Na przykład:' |
418 | paragraph_7: 'To wywołanie zwróci wszystkie twoje wpisy.' | 415 | paragraph_7: 'To wywołanie zwróci wszystkie twoje wpisy.' |
419 | paragraph_8: 'Jeżeli chcesz wyświetlić wszystkie punkty końcowe API, zobacz <a href="%link%">Dokumentacja naszego API</a>.' | 416 | paragraph_8: 'Jeżeli chcesz wyświetlić wszystkie punkty końcowe API, zobacz <a href="%link%">Dokumentacja naszego API</a>.' |
420 | back: 'Cofnij' | 417 | back: 'Cofnij' |
418 | |||
419 | user: | ||
420 | # page_title: Users management | ||
421 | # new_user: Create a new user | ||
422 | # edit_user: Edit an existing user | ||
423 | # description: "Here you can manage all users (create, edit and delete)" | ||
424 | # list: | ||
425 | # actions: Actions | ||
426 | # edit_action: Edit | ||
427 | # yes: Yes | ||
428 | # no: No | ||
429 | # create_new_one: Create a new user | ||
430 | form: | ||
431 | username_label: 'Nazwa użytkownika' | ||
432 | # name_label: 'Name' | ||
433 | password_label: 'Hasło' | ||
434 | repeat_new_password_label: 'Powtórz nowe hasło' | ||
435 | plain_password_label: 'Jawne hasło' | ||
436 | email_label: 'Adres email' | ||
437 | # enabled_label: 'Enabled' | ||
438 | # locked_label: 'Locked' | ||
439 | # last_login_label: 'Last login' | ||
440 | # twofactor_label: Two factor authentication | ||
441 | # save: Save | ||
442 | # delete: Delete | ||
443 | # delete_confirm: Are you sure? | ||
444 | # back_to_list: Back to list | ||
421 | 445 | ||
422 | flashes: | 446 | flashes: |
423 | config: | 447 | config: |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml index a271d6f3..4e0e454c 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml | |||
@@ -31,6 +31,7 @@ menu: | |||
31 | search: 'Căutare' | 31 | search: 'Căutare' |
32 | # save_link: 'Save a link' | 32 | # save_link: 'Save a link' |
33 | back_to_unread: 'Înapoi la articolele necitite' | 33 | back_to_unread: 'Înapoi la articolele necitite' |
34 | # users_management: 'Users management' | ||
34 | top: | 35 | top: |
35 | add_new_entry: 'Introdu un nou articol' | 36 | add_new_entry: 'Introdu un nou articol' |
36 | search: 'Căutare' | 37 | search: 'Căutare' |
@@ -129,12 +130,6 @@ config: | |||
129 | # or: 'One rule OR another' | 130 | # or: 'One rule OR another' |
130 | # and: 'One rule AND another' | 131 | # and: 'One rule AND another' |
131 | # matches: 'Tests that a <i>subject</i> is matches a <i>search</i> (case-insensitive).<br />Example: <code>title matches "football"</code>' | 132 | # matches: 'Tests that a <i>subject</i> is matches a <i>search</i> (case-insensitive).<br />Example: <code>title matches "football"</code>' |
132 | form_new_user: | ||
133 | username_label: 'Nume de utilizator' | ||
134 | password_label: 'Parolă' | ||
135 | repeat_new_password_label: 'Repeat new password' | ||
136 | plain_password_label: '????' | ||
137 | email_label: 'E-mail' | ||
138 | 133 | ||
139 | entry: | 134 | entry: |
140 | page_titles: | 135 | page_titles: |
@@ -396,12 +391,14 @@ developer: | |||
396 | # page_title: 'Developer > New client' | 391 | # page_title: 'Developer > New client' |
397 | # page_description: 'You are about to create a new client. Please fill the field below for the redirect URI of your application.' | 392 | # page_description: 'You are about to create a new client. Please fill the field below for the redirect URI of your application.' |
398 | # form: | 393 | # form: |
394 | # name_label: 'Name of the client' | ||
399 | # redirect_uris_label: 'Redirect URIs' | 395 | # redirect_uris_label: 'Redirect URIs' |
400 | # save_label: 'Create a new client' | 396 | # save_label: 'Create a new client' |
401 | # action_back: 'Back' | 397 | # action_back: 'Back' |
402 | # client_parameter: | 398 | # client_parameter: |
403 | # page_title: 'Developer > Client parameters' | 399 | # page_title: 'Developer > Client parameters' |
404 | # page_description: 'Here are your client parameters.' | 400 | # page_description: 'Here are your client parameters.' |
401 | # field_name: 'Client name' | ||
405 | # field_id: 'Client ID' | 402 | # field_id: 'Client ID' |
406 | # field_secret: 'Client secret' | 403 | # field_secret: 'Client secret' |
407 | # back: 'Back' | 404 | # back: 'Back' |
@@ -419,6 +416,33 @@ developer: | |||
419 | # paragraph_8: 'If you want to see all the API endpoints, you can have a look <a href="%link%">to our API documentation</a>.' | 416 | # paragraph_8: 'If you want to see all the API endpoints, you can have a look <a href="%link%">to our API documentation</a>.' |
420 | # back: 'Back' | 417 | # back: 'Back' |
421 | 418 | ||
419 | user: | ||
420 | # page_title: Users management | ||
421 | # new_user: Create a new user | ||
422 | # edit_user: Edit an existing user | ||
423 | # description: "Here you can manage all users (create, edit and delete)" | ||
424 | # list: | ||
425 | # actions: Actions | ||
426 | # edit_action: Edit | ||
427 | # yes: Yes | ||
428 | # no: No | ||
429 | # create_new_one: Create a new user | ||
430 | form: | ||
431 | username_label: 'Nume de utilizator' | ||
432 | # name_label: 'Name' | ||
433 | password_label: 'Parolă' | ||
434 | repeat_new_password_label: 'Repeat new password' | ||
435 | plain_password_label: '????' | ||
436 | email_label: 'E-mail' | ||
437 | # enabled_label: 'Enabled' | ||
438 | # locked_label: 'Locked' | ||
439 | # last_login_label: 'Last login' | ||
440 | # twofactor_label: Two factor authentication | ||
441 | # save: Save | ||
442 | # delete: Delete | ||
443 | # delete_confirm: Are you sure? | ||
444 | # back_to_list: Back to list | ||
445 | |||
422 | flashes: | 446 | flashes: |
423 | config: | 447 | config: |
424 | notice: | 448 | notice: |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml index f2307e65..02b3aae6 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml | |||
@@ -31,6 +31,7 @@ menu: | |||
31 | search: 'Ara' | 31 | search: 'Ara' |
32 | # save_link: 'Save a link' | 32 | # save_link: 'Save a link' |
33 | back_to_unread: 'Okunmayan makalelere geri dön' | 33 | back_to_unread: 'Okunmayan makalelere geri dön' |
34 | # users_management: 'Users management' | ||
34 | top: | 35 | top: |
35 | add_new_entry: 'Yeni bir makale ekle' | 36 | add_new_entry: 'Yeni bir makale ekle' |
36 | search: 'Ara' | 37 | search: 'Ara' |
@@ -128,12 +129,6 @@ config: | |||
128 | or: 'Bir kural veya birbaşkası' | 129 | or: 'Bir kural veya birbaşkası' |
129 | and: 'Bir kural ve diğeri' | 130 | and: 'Bir kural ve diğeri' |
130 | # matches: 'Tests that a <i>subject</i> is matches a <i>search</i> (case-insensitive).<br />Example: <code>title matches "football"</code>' | 131 | # matches: 'Tests that a <i>subject</i> is matches a <i>search</i> (case-insensitive).<br />Example: <code>title matches "football"</code>' |
131 | form_new_user: | ||
132 | username_label: 'Kullanıcı adı' | ||
133 | password_label: 'Şifre' | ||
134 | repeat_new_password_label: 'Yeni şifrenin tekrarı' | ||
135 | plain_password_label: '????' | ||
136 | email_label: 'E-posta' | ||
137 | 132 | ||
138 | entry: | 133 | entry: |
139 | page_titles: | 134 | page_titles: |
@@ -395,12 +390,14 @@ developer: | |||
395 | # page_title: 'Developer > New client' | 390 | # page_title: 'Developer > New client' |
396 | # page_description: 'You are about to create a new client. Please fill the field below for the redirect URI of your application.' | 391 | # page_description: 'You are about to create a new client. Please fill the field below for the redirect URI of your application.' |
397 | # form: | 392 | # form: |
393 | # name_label: 'Name of the client' | ||
398 | # redirect_uris_label: 'Redirect URIs' | 394 | # redirect_uris_label: 'Redirect URIs' |
399 | # save_label: 'Create a new client' | 395 | # save_label: 'Create a new client' |
400 | # action_back: 'Back' | 396 | # action_back: 'Back' |
401 | # client_parameter: | 397 | # client_parameter: |
402 | # page_title: 'Developer > Client parameters' | 398 | # page_title: 'Developer > Client parameters' |
403 | # page_description: 'Here are your client parameters.' | 399 | # page_description: 'Here are your client parameters.' |
400 | # field_name: 'Client name' | ||
404 | # field_id: 'Client ID' | 401 | # field_id: 'Client ID' |
405 | # field_secret: 'Client secret' | 402 | # field_secret: 'Client secret' |
406 | # back: 'Back' | 403 | # back: 'Back' |
@@ -418,6 +415,33 @@ developer: | |||
418 | # paragraph_8: 'If you want to see all the API endpoints, you can have a look <a href="%link%">to our API documentation</a>.' | 415 | # paragraph_8: 'If you want to see all the API endpoints, you can have a look <a href="%link%">to our API documentation</a>.' |
419 | # back: 'Back' | 416 | # back: 'Back' |
420 | 417 | ||
418 | user: | ||
419 | # page_title: Users management | ||
420 | # new_user: Create a new user | ||
421 | # edit_user: Edit an existing user | ||
422 | # description: "Here you can manage all users (create, edit and delete)" | ||
423 | # list: | ||
424 | # actions: Actions | ||
425 | # edit_action: Edit | ||
426 | # yes: Yes | ||
427 | # no: No | ||
428 | # create_new_one: Create a new user | ||
429 | form: | ||
430 | username_label: 'Kullanıcı adı' | ||
431 | # name_label: 'Name' | ||
432 | password_label: 'Şifre' | ||
433 | repeat_new_password_label: 'Yeni şifrenin tekrarı' | ||
434 | plain_password_label: '????' | ||
435 | email_label: 'E-posta' | ||
436 | # enabled_label: 'Enabled' | ||
437 | # locked_label: 'Locked' | ||
438 | # last_login_label: 'Last login' | ||
439 | # twofactor_label: Two factor authentication | ||
440 | # save: Save | ||
441 | # delete: Delete | ||
442 | # delete_confirm: Are you sure? | ||
443 | # back_to_list: Back to list | ||
444 | |||
421 | flashes: | 445 | flashes: |
422 | config: | 446 | config: |
423 | notice: | 447 | notice: |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/validators.da.yml b/src/Wallabag/CoreBundle/Resources/translations/validators.da.yml index dfe2c64d..313339ed 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/validators.da.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/validators.da.yml | |||
@@ -1,6 +1,6 @@ | |||
1 | validator: | 1 | validator: |
2 | password_must_match: 'De indtastede adgangskoder skal være ens' | 2 | password_must_match: 'De indtastede adgangskoder skal være ens' |
3 | password_too_short: 'Adgangskoden skal være mindst 8 tegn' | 3 | password_too_short: 'Adgangskoden skal være mindst 8 tegn' |
4 | # password_wrong_value: 'Wrong value for your current password' | 4 | # password_wrong_value: 'Wrong value for your current password' |
5 | # item_per_page_too_high: 'This will certainly kill the app' | 5 | # item_per_page_too_high: 'This will certainly kill the app' |
6 | # rss_limit_too_hight: 'This will certainly kill the app' | 6 | # rss_limit_too_hight: 'This will certainly kill the app' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/validators.tr.yml b/src/Wallabag/CoreBundle/Resources/translations/validators.tr.yml index 80ab470a..1b358965 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/validators.tr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/validators.tr.yml | |||
@@ -1,6 +1,6 @@ | |||
1 | validator: | 1 | validator: |
2 | # password_must_match: 'The password fields must match.' | 2 | # password_must_match: 'The password fields must match.' |
3 | # password_too_short: 'Password should by at least 8 chars long' | 3 | # password_too_short: 'Password should by at least 8 chars long' |
4 | # password_wrong_value: 'Wrong value for your current password' | 4 | # password_wrong_value: 'Wrong value for your current password' |
5 | # item_per_page_too_high: 'This will certainly kill the app' | 5 | # item_per_page_too_high: 'This will certainly kill the app' |
6 | # rss_limit_too_hight: 'This will certainly kill the app' | 6 | # rss_limit_too_hight: 'This will certainly kill the app' |
diff --git a/src/Wallabag/CoreBundle/Resources/views/base.html.twig b/src/Wallabag/CoreBundle/Resources/views/base.html.twig index 0f88901a..a1a9a136 100644 --- a/src/Wallabag/CoreBundle/Resources/views/base.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/base.html.twig | |||
@@ -43,7 +43,7 @@ | |||
43 | {% block scripts %} | 43 | {% block scripts %} |
44 | {% endblock %} | 44 | {% endblock %} |
45 | 45 | ||
46 | <title>wallabag - {% block title %}{% endblock %}</title> | 46 | <title>{% block title %}{% endblock %} – wallabag</title> |
47 | {% endblock %} | 47 | {% endblock %} |
48 | </head> | 48 | </head> |
49 | 49 | ||
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig index dd4f7b00..ff7ef73a 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig | |||
@@ -302,46 +302,4 @@ | |||
302 | </table> | 302 | </table> |
303 | </div> | 303 | </div> |
304 | </div> | 304 | </div> |
305 | |||
306 | {% if is_granted('ROLE_SUPER_ADMIN') %} | ||
307 | <h2>{{ 'config.tab_menu.new_user'|trans }}</h2> | ||
308 | |||
309 | {{ form_start(form.new_user) }} | ||
310 | {{ form_errors(form.new_user) }} | ||
311 | |||
312 | <fieldset class="w500p inline"> | ||
313 | <div class="row"> | ||
314 | {{ form_label(form.new_user.username) }} | ||
315 | {{ form_errors(form.new_user.username) }} | ||
316 | {{ form_widget(form.new_user.username) }} | ||
317 | </div> | ||
318 | </fieldset> | ||
319 | |||
320 | <fieldset class="w500p inline"> | ||
321 | <div class="row"> | ||
322 | {{ form_label(form.new_user.plainPassword.first) }} | ||
323 | {{ form_errors(form.new_user.plainPassword.first) }} | ||
324 | {{ form_widget(form.new_user.plainPassword.first) }} | ||
325 | </div> | ||
326 | </fieldset> | ||
327 | |||
328 | <fieldset class="w500p inline"> | ||
329 | <div class="row"> | ||
330 | {{ form_label(form.new_user.plainPassword.second) }} | ||
331 | {{ form_errors(form.new_user.plainPassword.second) }} | ||
332 | {{ form_widget(form.new_user.plainPassword.second) }} | ||
333 | </div> | ||
334 | </fieldset> | ||
335 | |||
336 | <fieldset class="w500p inline"> | ||
337 | <div class="row"> | ||
338 | {{ form_label(form.new_user.email) }} | ||
339 | {{ form_errors(form.new_user.email) }} | ||
340 | {{ form_widget(form.new_user.email) }} | ||
341 | </div> | ||
342 | </fieldset> | ||
343 | |||
344 | {{ form_rest(form.new_user) }} | ||
345 | {% endif %} | ||
346 | </form> | ||
347 | {% endblock %} | 305 | {% endblock %} |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig index 650a3ae2..270c077f 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig | |||
@@ -16,9 +16,6 @@ | |||
16 | <li class="tab col s3"><a href="#set3">{{ 'config.tab_menu.user_info'|trans }}</a></li> | 16 | <li class="tab col s3"><a href="#set3">{{ 'config.tab_menu.user_info'|trans }}</a></li> |
17 | <li class="tab col s3"><a href="#set4">{{ 'config.tab_menu.password'|trans }}</a></li> | 17 | <li class="tab col s3"><a href="#set4">{{ 'config.tab_menu.password'|trans }}</a></li> |
18 | <li class="tab col s3"><a href="#set5">{{ 'config.tab_menu.rules'|trans }}</a></li> | 18 | <li class="tab col s3"><a href="#set5">{{ 'config.tab_menu.rules'|trans }}</a></li> |
19 | {% if is_granted('ROLE_SUPER_ADMIN') %} | ||
20 | <li class="tab col s3"><a href="#set6">{{ 'config.tab_menu.new_user'|trans }}</a></li> | ||
21 | {% endif %} | ||
22 | </ul> | 19 | </ul> |
23 | </div> | 20 | </div> |
24 | 21 | ||
@@ -157,11 +154,9 @@ | |||
157 | <div class="row"> | 154 | <div class="row"> |
158 | <div class="input-field col s12"> | 155 | <div class="input-field col s12"> |
159 | {{ 'config.form_user.two_factor_description'|trans }} | 156 | {{ 'config.form_user.two_factor_description'|trans }} |
160 | </div> | ||
161 | </div> | ||
162 | 157 | ||
163 | <div class="row"> | 158 | <br /> |
164 | <div class="input-field col s12"> | 159 | |
165 | {{ form_widget(form.user.twoFactorAuthentication) }} | 160 | {{ form_widget(form.user.twoFactorAuthentication) }} |
166 | {{ form_label(form.user.twoFactorAuthentication) }} | 161 | {{ form_label(form.user.twoFactorAuthentication) }} |
167 | {{ form_errors(form.user.twoFactorAuthentication) }} | 162 | {{ form_errors(form.user.twoFactorAuthentication) }} |
@@ -339,49 +334,6 @@ | |||
339 | </div> | 334 | </div> |
340 | </div> | 335 | </div> |
341 | </div> | 336 | </div> |
342 | |||
343 | {% if is_granted('ROLE_SUPER_ADMIN') %} | ||
344 | <div id="set6" class="col s12"> | ||
345 | {{ form_start(form.new_user) }} | ||
346 | {{ form_errors(form.new_user) }} | ||
347 | |||
348 | <div class="row"> | ||
349 | <div class="input-field col s12"> | ||
350 | {{ form_label(form.new_user.username) }} | ||
351 | {{ form_errors(form.new_user.username) }} | ||
352 | {{ form_widget(form.new_user.username) }} | ||
353 | </div> | ||
354 | </div> | ||
355 | |||
356 | <div class="row"> | ||
357 | <div class="input-field col s12"> | ||
358 | {{ form_label(form.new_user.plainPassword.first) }} | ||
359 | {{ form_errors(form.new_user.plainPassword.first) }} | ||
360 | {{ form_widget(form.new_user.plainPassword.first) }} | ||
361 | </div> | ||
362 | </div> | ||
363 | |||
364 | <div class="row"> | ||
365 | <div class="input-field col s12"> | ||
366 | {{ form_label(form.new_user.plainPassword.second) }} | ||
367 | {{ form_errors(form.new_user.plainPassword.second) }} | ||
368 | {{ form_widget(form.new_user.plainPassword.second) }} | ||
369 | </div> | ||
370 | </div> | ||
371 | |||
372 | <div class="row"> | ||
373 | <div class="input-field col s12"> | ||
374 | {{ form_label(form.new_user.email) }} | ||
375 | {{ form_errors(form.new_user.email) }} | ||
376 | {{ form_widget(form.new_user.email) }} | ||
377 | </div> | ||
378 | </div> | ||
379 | |||
380 | {{ form_widget(form.new_user.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }} | ||
381 | {{ form_rest(form.new_user) }} | ||
382 | </form> | ||
383 | </div> | ||
384 | {% endif %} | ||
385 | </div> | 337 | </div> |
386 | 338 | ||
387 | </div> | 339 | </div> |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig index b2d77c2e..c7d6d70d 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig | |||
@@ -45,7 +45,7 @@ | |||
45 | <li class="bold {% if currentRoute == 'archive' %}active{% endif %}"> | 45 | <li class="bold {% if currentRoute == 'archive' %}active{% endif %}"> |
46 | <a class="waves-effect" href="{{ path('archive') }}">{{ 'menu.left.archive'|trans }} <span class="numberItems grey-text">{{ count_entries('archive') }}</span></a> | 46 | <a class="waves-effect" href="{{ path('archive') }}">{{ 'menu.left.archive'|trans }} <span class="numberItems grey-text">{{ count_entries('archive') }}</span></a> |
47 | </li> | 47 | </li> |
48 | <li class="bold border-bottom {% if currentRoute == 'all' %}active{% endif %}"> | 48 | <li class="bold {% if currentRoute == 'all' %}active{% endif %}"> |
49 | <a class="waves-effect" href="{{ path('all') }}">{{ 'menu.left.all_articles'|trans }} <span class="numberItems grey-text">{{ count_entries('all') }}</span></a> | 49 | <a class="waves-effect" href="{{ path('all') }}">{{ 'menu.left.all_articles'|trans }} <span class="numberItems grey-text">{{ count_entries('all') }}</span></a> |
50 | </li> | 50 | </li> |
51 | <li class="bold border-bottom {% if currentRoute == 'tags' %}active{% endif %}"> | 51 | <li class="bold border-bottom {% if currentRoute == 'tags' %}active{% endif %}"> |
@@ -55,6 +55,10 @@ | |||
55 | <a class="waves-effect" href="{{ path('config') }}">{{ 'menu.left.config'|trans }}</a> | 55 | <a class="waves-effect" href="{{ path('config') }}">{{ 'menu.left.config'|trans }}</a> |
56 | </li> | 56 | </li> |
57 | {% if is_granted('ROLE_SUPER_ADMIN') %} | 57 | {% if is_granted('ROLE_SUPER_ADMIN') %} |
58 | <li class="bold {% if currentRoute starts with 'user_' %}active{% endif %}"> | ||
59 | <a class="waves-effect" href="{{ path('user_index') }}">{{ 'menu.left.users_management'|trans }}</a> | ||
60 | </li> | ||
61 | |||
58 | <li class="bold border-bottom {% if currentRoute == 'craue_config_settings_modify' %}active{% endif %}"> | 62 | <li class="bold border-bottom {% if currentRoute == 'craue_config_settings_modify' %}active{% endif %}"> |
59 | <a class="waves-effect" href="{{ path('craue_config_settings_modify') }}">{{ 'menu.left.internal_settings'|trans }}</a> | 63 | <a class="waves-effect" href="{{ path('craue_config_settings_modify') }}">{{ 'menu.left.internal_settings'|trans }}</a> |
60 | </li> | 64 | </li> |
diff --git a/src/Wallabag/UserBundle/Controller/ManageController.php b/src/Wallabag/UserBundle/Controller/ManageController.php new file mode 100644 index 00000000..92ee2b41 --- /dev/null +++ b/src/Wallabag/UserBundle/Controller/ManageController.php | |||
@@ -0,0 +1,149 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\UserBundle\Controller; | ||
4 | |||
5 | use FOS\UserBundle\Event\UserEvent; | ||
6 | use FOS\UserBundle\FOSUserEvents; | ||
7 | use Symfony\Component\HttpFoundation\Request; | ||
8 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; | ||
9 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; | ||
10 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | ||
11 | use Wallabag\UserBundle\Entity\User; | ||
12 | use Wallabag\CoreBundle\Entity\Config; | ||
13 | |||
14 | /** | ||
15 | * User controller. | ||
16 | */ | ||
17 | class ManageController extends Controller | ||
18 | { | ||
19 | /** | ||
20 | * Lists all User entities. | ||
21 | * | ||
22 | * @Route("/", name="user_index") | ||
23 | * @Method("GET") | ||
24 | */ | ||
25 | public function indexAction() | ||
26 | { | ||
27 | $em = $this->getDoctrine()->getManager(); | ||
28 | |||
29 | $users = $em->getRepository('WallabagUserBundle:User')->findAll(); | ||
30 | |||
31 | return $this->render('WallabagUserBundle:Manage:index.html.twig', array( | ||
32 | 'users' => $users, | ||
33 | )); | ||
34 | } | ||
35 | |||
36 | /** | ||
37 | * Creates a new User entity. | ||
38 | * | ||
39 | * @Route("/new", name="user_new") | ||
40 | * @Method({"GET", "POST"}) | ||
41 | */ | ||
42 | public function newAction(Request $request) | ||
43 | { | ||
44 | $userManager = $this->container->get('fos_user.user_manager'); | ||
45 | |||
46 | $user = $userManager->createUser(); | ||
47 | // enable created user by default | ||
48 | $user->setEnabled(true); | ||
49 | |||
50 | $form = $this->createForm('Wallabag\UserBundle\Form\NewUserType', $user, [ | ||
51 | 'validation_groups' => ['Profile'], | ||
52 | ]); | ||
53 | $form->handleRequest($request); | ||
54 | |||
55 | if ($form->isSubmitted() && $form->isValid()) { | ||
56 | $userManager->updateUser($user); | ||
57 | |||
58 | // dispatch a created event so the associated config will be created | ||
59 | $event = new UserEvent($user, $request); | ||
60 | $this->get('event_dispatcher')->dispatch(FOSUserEvents::USER_CREATED, $event); | ||
61 | |||
62 | $this->get('session')->getFlashBag()->add( | ||
63 | 'notice', | ||
64 | $this->get('translator')->trans('flashes.user.notice.added', ['%username%' => $user->getUsername()]) | ||
65 | ); | ||
66 | |||
67 | return $this->redirectToRoute('user_edit', array('id' => $user->getId())); | ||
68 | } | ||
69 | |||
70 | return $this->render('WallabagUserBundle:Manage:new.html.twig', array( | ||
71 | 'user' => $user, | ||
72 | 'form' => $form->createView(), | ||
73 | )); | ||
74 | } | ||
75 | |||
76 | /** | ||
77 | * Displays a form to edit an existing User entity. | ||
78 | * | ||
79 | * @Route("/{id}/edit", name="user_edit") | ||
80 | * @Method({"GET", "POST"}) | ||
81 | */ | ||
82 | public function editAction(Request $request, User $user) | ||
83 | { | ||
84 | $deleteForm = $this->createDeleteForm($user); | ||
85 | $editForm = $this->createForm('Wallabag\UserBundle\Form\UserType', $user); | ||
86 | $editForm->handleRequest($request); | ||
87 | |||
88 | if ($editForm->isSubmitted() && $editForm->isValid()) { | ||
89 | $em = $this->getDoctrine()->getManager(); | ||
90 | $em->persist($user); | ||
91 | $em->flush(); | ||
92 | |||
93 | $this->get('session')->getFlashBag()->add( | ||
94 | 'notice', | ||
95 | $this->get('translator')->trans('flashes.user.notice.updated', ['%username%' => $user->getUsername()]) | ||
96 | ); | ||
97 | |||
98 | return $this->redirectToRoute('user_edit', array('id' => $user->getId())); | ||
99 | } | ||
100 | |||
101 | return $this->render('WallabagUserBundle:Manage:edit.html.twig', array( | ||
102 | 'user' => $user, | ||
103 | 'edit_form' => $editForm->createView(), | ||
104 | 'delete_form' => $deleteForm->createView(), | ||
105 | 'twofactor_auth' => $this->getParameter('twofactor_auth'), | ||
106 | )); | ||
107 | } | ||
108 | |||
109 | /** | ||
110 | * Deletes a User entity. | ||
111 | * | ||
112 | * @Route("/{id}", name="user_delete") | ||
113 | * @Method("DELETE") | ||
114 | */ | ||
115 | public function deleteAction(Request $request, User $user) | ||
116 | { | ||
117 | $form = $this->createDeleteForm($user); | ||
118 | $form->handleRequest($request); | ||
119 | |||
120 | if ($form->isSubmitted() && $form->isValid()) { | ||
121 | $this->get('session')->getFlashBag()->add( | ||
122 | 'notice', | ||
123 | $this->get('translator')->trans('flashes.user.notice.deleted', ['%username%' => $user->getUsername()]) | ||
124 | ); | ||
125 | |||
126 | $em = $this->getDoctrine()->getManager(); | ||
127 | $em->remove($user); | ||
128 | $em->flush(); | ||
129 | } | ||
130 | |||
131 | return $this->redirectToRoute('user_index'); | ||
132 | } | ||
133 | |||
134 | /** | ||
135 | * Creates a form to delete a User entity. | ||
136 | * | ||
137 | * @param User $user The User entity | ||
138 | * | ||
139 | * @return \Symfony\Component\Form\Form The form | ||
140 | */ | ||
141 | private function createDeleteForm(User $user) | ||
142 | { | ||
143 | return $this->createFormBuilder() | ||
144 | ->setAction($this->generateUrl('user_delete', array('id' => $user->getId()))) | ||
145 | ->setMethod('DELETE') | ||
146 | ->getForm() | ||
147 | ; | ||
148 | } | ||
149 | } | ||
diff --git a/src/Wallabag/UserBundle/Entity/User.php b/src/Wallabag/UserBundle/Entity/User.php index dfed8e47..d98ae76a 100644 --- a/src/Wallabag/UserBundle/Entity/User.php +++ b/src/Wallabag/UserBundle/Entity/User.php | |||
@@ -64,7 +64,7 @@ class User extends BaseUser implements TwoFactorInterface, TrustedComputerInterf | |||
64 | protected $entries; | 64 | protected $entries; |
65 | 65 | ||
66 | /** | 66 | /** |
67 | * @ORM\OneToOne(targetEntity="Wallabag\CoreBundle\Entity\Config", mappedBy="user") | 67 | * @ORM\OneToOne(targetEntity="Wallabag\CoreBundle\Entity\Config", mappedBy="user", cascade={"remove"}) |
68 | */ | 68 | */ |
69 | protected $config; | 69 | protected $config; |
70 | 70 | ||
diff --git a/src/Wallabag/UserBundle/Form/NewUserType.php b/src/Wallabag/UserBundle/Form/NewUserType.php new file mode 100644 index 00000000..ad5a2405 --- /dev/null +++ b/src/Wallabag/UserBundle/Form/NewUserType.php | |||
@@ -0,0 +1,58 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\UserBundle\Form; | ||
4 | |||
5 | use Symfony\Component\Form\AbstractType; | ||
6 | use Symfony\Component\Form\Extension\Core\Type\EmailType; | ||
7 | use Symfony\Component\Form\Extension\Core\Type\PasswordType; | ||
8 | use Symfony\Component\Form\Extension\Core\Type\RepeatedType; | ||
9 | use Symfony\Component\Form\Extension\Core\Type\SubmitType; | ||
10 | use Symfony\Component\Form\Extension\Core\Type\TextType; | ||
11 | use Symfony\Component\Form\FormBuilderInterface; | ||
12 | use Symfony\Component\OptionsResolver\OptionsResolver; | ||
13 | use Symfony\Component\Validator\Constraints; | ||
14 | |||
15 | class NewUserType extends AbstractType | ||
16 | { | ||
17 | public function buildForm(FormBuilderInterface $builder, array $options) | ||
18 | { | ||
19 | $builder | ||
20 | ->add('username', TextType::class, [ | ||
21 | 'required' => true, | ||
22 | 'label' => 'user.form.username_label', | ||
23 | ]) | ||
24 | ->add('plainPassword', RepeatedType::class, [ | ||
25 | 'type' => PasswordType::class, | ||
26 | 'invalid_message' => 'validator.password_must_match', | ||
27 | 'first_options' => ['label' => 'user.form.password_label'], | ||
28 | 'second_options' => ['label' => 'user.form.repeat_new_password_label'], | ||
29 | 'constraints' => [ | ||
30 | new Constraints\Length([ | ||
31 | 'min' => 8, | ||
32 | 'minMessage' => 'validator.password_too_short', | ||
33 | ]), | ||
34 | new Constraints\NotBlank(), | ||
35 | ], | ||
36 | 'label' => 'user.form.plain_password_label', | ||
37 | ]) | ||
38 | ->add('email', EmailType::class, [ | ||
39 | 'label' => 'user.form.email_label', | ||
40 | ]) | ||
41 | ->add('save', SubmitType::class, [ | ||
42 | 'label' => 'user.form.save', | ||
43 | ]) | ||
44 | ; | ||
45 | } | ||
46 | |||
47 | public function configureOptions(OptionsResolver $resolver) | ||
48 | { | ||
49 | $resolver->setDefaults([ | ||
50 | 'data_class' => 'Wallabag\UserBundle\Entity\User', | ||
51 | ]); | ||
52 | } | ||
53 | |||
54 | public function getBlockPrefix() | ||
55 | { | ||
56 | return 'new_user'; | ||
57 | } | ||
58 | } | ||
diff --git a/src/Wallabag/UserBundle/Form/UserType.php b/src/Wallabag/UserBundle/Form/UserType.php new file mode 100644 index 00000000..cfa67793 --- /dev/null +++ b/src/Wallabag/UserBundle/Form/UserType.php | |||
@@ -0,0 +1,61 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\UserBundle\Form; | ||
4 | |||
5 | use Symfony\Component\Form\AbstractType; | ||
6 | use Symfony\Component\Form\FormBuilderInterface; | ||
7 | use Symfony\Component\OptionsResolver\OptionsResolver; | ||
8 | use Symfony\Component\Form\Extension\Core\Type\CheckboxType; | ||
9 | use Symfony\Component\Form\Extension\Core\Type\SubmitType; | ||
10 | use Symfony\Component\Form\Extension\Core\Type\TextType; | ||
11 | use Symfony\Component\Form\Extension\Core\Type\EmailType; | ||
12 | |||
13 | class UserType extends AbstractType | ||
14 | { | ||
15 | /** | ||
16 | * @param FormBuilderInterface $builder | ||
17 | * @param array $options | ||
18 | */ | ||
19 | public function buildForm(FormBuilderInterface $builder, array $options) | ||
20 | { | ||
21 | $builder | ||
22 | ->add('name', TextType::class, [ | ||
23 | 'required' => false, | ||
24 | 'label' => 'user.form.name_label', | ||
25 | ]) | ||
26 | ->add('username', TextType::class, [ | ||
27 | 'required' => true, | ||
28 | 'label' => 'user.form.username_label', | ||
29 | ]) | ||
30 | ->add('email', EmailType::class, [ | ||
31 | 'required' => true, | ||
32 | 'label' => 'user.form.email_label', | ||
33 | ]) | ||
34 | ->add('enabled', CheckboxType::class, [ | ||
35 | 'required' => false, | ||
36 | 'label' => 'user.form.enabled_label', | ||
37 | ]) | ||
38 | ->add('locked', CheckboxType::class, [ | ||
39 | 'required' => false, | ||
40 | 'label' => 'user.form.locked_label', | ||
41 | ]) | ||
42 | ->add('twoFactorAuthentication', CheckboxType::class, [ | ||
43 | 'required' => false, | ||
44 | 'label' => 'user.form.twofactor_label', | ||
45 | ]) | ||
46 | ->add('save', SubmitType::class, [ | ||
47 | 'label' => 'user.form.save', | ||
48 | ]) | ||
49 | ; | ||
50 | } | ||
51 | |||
52 | /** | ||
53 | * @param OptionsResolver $resolver | ||
54 | */ | ||
55 | public function configureOptions(OptionsResolver $resolver) | ||
56 | { | ||
57 | $resolver->setDefaults(array( | ||
58 | 'data_class' => 'Wallabag\UserBundle\Entity\User', | ||
59 | )); | ||
60 | } | ||
61 | } | ||
diff --git a/src/Wallabag/UserBundle/Resources/views/Manage/edit.html.twig b/src/Wallabag/UserBundle/Resources/views/Manage/edit.html.twig new file mode 100644 index 00000000..5292ba78 --- /dev/null +++ b/src/Wallabag/UserBundle/Resources/views/Manage/edit.html.twig | |||
@@ -0,0 +1,86 @@ | |||
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} | ||
2 | |||
3 | {% block title %}{{ 'user.page_title'|trans }}{% endblock %} | ||
4 | |||
5 | {% block content %} | ||
6 | |||
7 | <div class="row"> | ||
8 | <div class="col s12"> | ||
9 | <div class="card-panel"> | ||
10 | <div class="row"> | ||
11 | <div class="input-field col s12"> | ||
12 | <h4>{{ 'user.edit_user'|trans }}</h4> | ||
13 | |||
14 | <div id="set6" class="col s12"> | ||
15 | {{ form_start(edit_form) }} | ||
16 | {{ form_errors(edit_form) }} | ||
17 | |||
18 | <div class="row"> | ||
19 | <div class="input-field col s12"> | ||
20 | {{ form_label(edit_form.name) }} | ||
21 | {{ form_errors(edit_form.name) }} | ||
22 | {{ form_widget(edit_form.name) }} | ||
23 | </div> | ||
24 | </div> | ||
25 | |||
26 | <div class="row"> | ||
27 | <div class="input-field col s12"> | ||
28 | {{ form_label(edit_form.username) }} | ||
29 | {{ form_errors(edit_form.username) }} | ||
30 | {{ form_widget(edit_form.username) }} | ||
31 | </div> | ||
32 | </div> | ||
33 | |||
34 | <div class="row"> | ||
35 | <div class="input-field col s12"> | ||
36 | {{ form_label(edit_form.email) }} | ||
37 | {{ form_errors(edit_form.email) }} | ||
38 | {{ form_widget(edit_form.email) }} | ||
39 | </div> | ||
40 | </div> | ||
41 | |||
42 | <div class="row"> | ||
43 | <div class="input-field col s12"> | ||
44 | {{ form_widget(edit_form.enabled) }} | ||
45 | {{ form_label(edit_form.enabled) }} | ||
46 | {{ form_errors(edit_form.enabled) }} | ||
47 | </div> | ||
48 | </div> | ||
49 | |||
50 | <div class="row"> | ||
51 | <div class="input-field col s12"> | ||
52 | {{ form_widget(edit_form.locked) }} | ||
53 | {{ form_label(edit_form.locked) }} | ||
54 | {{ form_errors(edit_form.locked) }} | ||
55 | </div> | ||
56 | </div> | ||
57 | |||
58 | {% if twofactor_auth %} | ||
59 | <div class="row"> | ||
60 | <div class="input-field col s12"> | ||
61 | {{ form_widget(edit_form.twoFactorAuthentication) }} | ||
62 | {{ form_label(edit_form.twoFactorAuthentication) }} | ||
63 | {{ form_errors(edit_form.twoFactorAuthentication) }} | ||
64 | </div> | ||
65 | </div> | ||
66 | {% endif %} | ||
67 | |||
68 | <br/> | ||
69 | |||
70 | {{ form_widget(edit_form.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }} | ||
71 | {{ form_rest(edit_form) }} | ||
72 | </form> | ||
73 | <p> | ||
74 | {{ form_start(delete_form) }} | ||
75 | <button onclick="return confirm('{{ 'user.form.delete_confirm'|trans|escape('js') }}')" type="submit" class="btn waves-effect waves-light red">{{ 'user.form.delete'|trans }}</button> | ||
76 | {{ form_end(delete_form) }} | ||
77 | </p> | ||
78 | <p><a class="waves-effect waves-light btn blue-grey" href="{{ path('user_index') }}">{{ 'user.form.back_to_list'|trans }}</a></p> | ||
79 | </div> | ||
80 | </div> | ||
81 | </div> | ||
82 | </div> | ||
83 | </div> | ||
84 | </div> | ||
85 | |||
86 | {% endblock %} | ||
diff --git a/src/Wallabag/UserBundle/Resources/views/Manage/index.html.twig b/src/Wallabag/UserBundle/Resources/views/Manage/index.html.twig new file mode 100644 index 00000000..996bdb1a --- /dev/null +++ b/src/Wallabag/UserBundle/Resources/views/Manage/index.html.twig | |||
@@ -0,0 +1,48 @@ | |||
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} | ||
2 | |||
3 | {% block title %}{{ 'user.page_title'|trans }}{% endblock %} | ||
4 | |||
5 | {% block content %} | ||
6 | |||
7 | <div class="row"> | ||
8 | <div class="col s12"> | ||
9 | <div class="card-panel"> | ||
10 | <div class="row"> | ||
11 | <div class="input-field col s12"> | ||
12 | <p class="help">{{ 'user.description'|trans|raw }}</p> | ||
13 | |||
14 | <table class="bordered"> | ||
15 | <thead> | ||
16 | <tr> | ||
17 | <th>{{ 'user.form.username_label'|trans }}</th> | ||
18 | <th>{{ 'user.form.email_label'|trans }}</th> | ||
19 | <th>{{ 'user.form.last_login_label'|trans }}</th> | ||
20 | <th>{{ 'user.form.locked_label'|trans }}</th> | ||
21 | <th>{{ 'user.list.actions'|trans }}</th> | ||
22 | </tr> | ||
23 | </thead> | ||
24 | <tbody> | ||
25 | {% for user in users %} | ||
26 | <tr> | ||
27 | <td>{{ user.username }}</td> | ||
28 | <td>{{ user.email }}</td> | ||
29 | <td>{% if user.lastLogin %}{{ user.lastLogin|date('Y-m-d H:i:s') }}{% endif %}</td> | ||
30 | <td>{% if user.locked %}{{ 'user.list.yes'|trans }}{% else %}{{ 'user.list.no'|trans }}{% endif %}</td> | ||
31 | <td> | ||
32 | <a href="{{ path('user_edit', { 'id': user.id }) }}">{{ 'user.list.edit_action'|trans }}</a> | ||
33 | </td> | ||
34 | </tr> | ||
35 | {% endfor %} | ||
36 | </tbody> | ||
37 | </table> | ||
38 | <br /> | ||
39 | <p> | ||
40 | <a href="{{ path('user_new') }}" class="waves-effect waves-light btn">{{ 'user.list.create_new_one'|trans }}</a> | ||
41 | </p> | ||
42 | </div> | ||
43 | </div> | ||
44 | </div> | ||
45 | </div> | ||
46 | </div> | ||
47 | |||
48 | {% endblock %} | ||
diff --git a/src/Wallabag/UserBundle/Resources/views/Manage/new.html.twig b/src/Wallabag/UserBundle/Resources/views/Manage/new.html.twig new file mode 100644 index 00000000..8c894c04 --- /dev/null +++ b/src/Wallabag/UserBundle/Resources/views/Manage/new.html.twig | |||
@@ -0,0 +1,61 @@ | |||
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} | ||
2 | |||
3 | {% block title %}{{ 'user.page_title'|trans }}{% endblock %} | ||
4 | |||
5 | {% block content %} | ||
6 | |||
7 | <div class="row"> | ||
8 | <div class="col s12"> | ||
9 | <div class="card-panel"> | ||
10 | <div class="row"> | ||
11 | <div class="input-field col s12"> | ||
12 | <h4>{{ 'user.new_user'|trans }}</h4> | ||
13 | |||
14 | <div id="set6" class="col s12"> | ||
15 | {{ form_start(form) }} | ||
16 | {{ form_errors(form) }} | ||
17 | |||
18 | <div class="row"> | ||
19 | <div class="input-field col s12"> | ||
20 | {{ form_label(form.username) }} | ||
21 | {{ form_errors(form.username) }} | ||
22 | {{ form_widget(form.username) }} | ||
23 | </div> | ||
24 | </div> | ||
25 | |||
26 | <div class="row"> | ||
27 | <div class="input-field col s12"> | ||
28 | {{ form_label(form.plainPassword.first) }} | ||
29 | {{ form_errors(form.plainPassword.first) }} | ||
30 | {{ form_widget(form.plainPassword.first) }} | ||
31 | </div> | ||
32 | </div> | ||
33 | |||
34 | <div class="row"> | ||
35 | <div class="input-field col s12"> | ||
36 | {{ form_label(form.plainPassword.second) }} | ||
37 | {{ form_errors(form.plainPassword.second) }} | ||
38 | {{ form_widget(form.plainPassword.second) }} | ||
39 | </div> | ||
40 | </div> | ||
41 | |||
42 | <div class="row"> | ||
43 | <div class="input-field col s12"> | ||
44 | {{ form_label(form.email) }} | ||
45 | {{ form_errors(form.email) }} | ||
46 | {{ form_widget(form.email) }} | ||
47 | </div> | ||
48 | </div> | ||
49 | |||
50 | {{ form_widget(form.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }} | ||
51 | {{ form_rest(form) }} | ||
52 | </form> | ||
53 | <p><a class="waves-effect waves-light btn blue-grey" href="{{ path('user_index') }}">{{ 'user.form.back_to_list'|trans }}</a></p> | ||
54 | </div> | ||
55 | </div> | ||
56 | </div> | ||
57 | </div> | ||
58 | </div> | ||
59 | </div> | ||
60 | |||
61 | {% endblock %} | ||
diff --git a/src/Wallabag/UserBundle/Resources/views/manage.html.twig b/src/Wallabag/UserBundle/Resources/views/manage.html.twig new file mode 100644 index 00000000..c614c55f --- /dev/null +++ b/src/Wallabag/UserBundle/Resources/views/manage.html.twig | |||
@@ -0,0 +1,43 @@ | |||
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} | ||
2 | |||
3 | {% block title %}{{ 'user.manage.page_title'|trans }}{% endblock %} | ||
4 | |||
5 | {% block content %} | ||
6 | |||
7 | <div class="row"> | ||
8 | <div class="col s12"> | ||
9 | <div class="card-panel"> | ||
10 | <div class="row"> | ||
11 | <div class="input-field col s12"> | ||
12 | <p class="help">{{ 'user.manage.description'|trans|raw }}</p> | ||
13 | |||
14 | <table class="bordered"> | ||
15 | <thead> | ||
16 | <tr> | ||
17 | <th>{{ 'user.manage.field.username'|trans }}</th> | ||
18 | <th>{{ 'user.manage.field.email'|trans }}</th> | ||
19 | <th>{{ 'user.manage.field.last_login'|trans }}</th> | ||
20 | <th>{{ 'user.manage.field.locked'|trans }}</th> | ||
21 | <th>{{ 'user.manage.action'|trans }}</th> | ||
22 | </tr> | ||
23 | </thead> | ||
24 | |||
25 | <tbody> | ||
26 | {% for user in users %} | ||
27 | <tr> | ||
28 | <td>{{ user.username }}</td> | ||
29 | <td>{{ user.email }}</td> | ||
30 | <td>{{ user.lastLogin|date('d/m/Y H:i:s') }}</td> | ||
31 | <td>{{ user.locked ? 'yes' : 'no' }}</td> | ||
32 | <td>edit - delete</td> | ||
33 | </tr> | ||
34 | {% endfor %} | ||
35 | </tbody> | ||
36 | </table> | ||
37 | </div> | ||
38 | </div> | ||
39 | </div> | ||
40 | </div> | ||
41 | </div> | ||
42 | |||
43 | {% endblock %} | ||