aboutsummaryrefslogtreecommitdiffhomepage
path: root/app
diff options
context:
space:
mode:
authorNicolas Lœuillet <nicolas@loeuillet.org>2016-02-04 15:59:57 +0100
committerNicolas Lœuillet <nicolas@loeuillet.org>2016-02-04 15:59:57 +0100
commite008c037f53324b931f027483f9f1053171109c5 (patch)
tree441c54eb946ffb53a161cad8f686ce7aff875abd /app
parent74f39b0952440fa0c55e5e8a2e1a8d2bbd3acfd7 (diff)
parent79b9e49d9464e9a67f6ee66fbf6f6c541b1a29f4 (diff)
downloadwallabag-e008c037f53324b931f027483f9f1053171109c5.tar.gz
wallabag-e008c037f53324b931f027483f9f1053171109c5.tar.zst
wallabag-e008c037f53324b931f027483f9f1053171109c5.zip
Merge pull request #1612 from wallabag/v2-settings-page
Settings page
Diffstat (limited to 'app')
-rw-r--r--app/AppKernel.php1
-rw-r--r--app/DoctrineMigrations/.gitkeep0
-rw-r--r--app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml19
-rw-r--r--app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml19
-rw-r--r--app/Resources/CraueConfigBundle/views/Settings/modify.html.twig43
-rw-r--r--app/config/config.yml29
-rw-r--r--app/config/parameters.yml.dist37
-rw-r--r--app/config/routing.yml9
-rw-r--r--app/config/security.yml1
-rw-r--r--app/config/tests/parameters.yml.dist.mysql37
-rw-r--r--app/config/tests/parameters.yml.dist.pgsql37
-rw-r--r--app/config/tests/parameters.yml.dist.sqlite37
12 files changed, 101 insertions, 168 deletions
diff --git a/app/AppKernel.php b/app/AppKernel.php
index 7e76a9e9..82d3aa38 100644
--- a/app/AppKernel.php
+++ b/app/AppKernel.php
@@ -33,6 +33,7 @@ class AppKernel extends Kernel
33 new KPhoen\RulerZBundle\KPhoenRulerZBundle(), 33 new KPhoen\RulerZBundle\KPhoenRulerZBundle(),
34 new Wallabag\ImportBundle\WallabagImportBundle(), 34 new Wallabag\ImportBundle\WallabagImportBundle(),
35 new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(), 35 new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),
36 new Craue\ConfigBundle\CraueConfigBundle(),
36 ]; 37 ];
37 38
38 if (in_array($this->getEnvironment(), ['dev', 'test'], true)) { 39 if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
diff --git a/app/DoctrineMigrations/.gitkeep b/app/DoctrineMigrations/.gitkeep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/app/DoctrineMigrations/.gitkeep
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml
new file mode 100644
index 00000000..b5385dc3
--- /dev/null
+++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml
@@ -0,0 +1,19 @@
1download_pictures: Download pictures on your server
2carrot: Enable share to Carrot
3diaspora_url: Diaspora URL, if the service is enabled
4export_epub: Enable ePub export
5export_mobi: Enable .mobi export
6export_pdf: Enable PDF export
7export_csv: Enable CSV export
8export_json: Enable JSON export
9export_txt: Enable TXT export
10export_xml: Enable XML export
11pocket_consumer_key: Consumer key for Pocket to import contents (https://getpocket.com/developer/docs/authentication)
12shaarli_url: URL de Shaarli, if the service is enabled
13share_diaspora: Enable share to Diaspora
14share_mail: Enable share by email
15share_shaarli: Enable share to Shaarli
16share_twitter: Enable share to Twitter
17show_printlink: Display a link to print content
18wallabag_support_url: Support URL for wallabag
19wallabag_url: URL of *your* wallabag instance
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml
new file mode 100644
index 00000000..cdd56acd
--- /dev/null
+++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml
@@ -0,0 +1,19 @@
1download_pictures: Télécharger les images sur le serveur
2carrot: Activer le partage vers Carrot
3diaspora_url: URL de Diaspora, si le service Diaspora est activé
4export_epub: Activer l'export ePub
5export_mobi: Activer l'export .mobi
6export_pdf: Activer l'export PDF
7export_csv: Activer l'export CSV
8export_json: Activer l'export JSON
9export_txt: Activer l'export TXT
10export_xml: Activer l'export XML
11pocket_consumer_key: Clé d'authentification Pocket pour importer les données (https://getpocket.com/developer/docs/authentication)
12shaarli_url: URL de Shaarli, si le service Shaarli est activé
13share_diaspora: Activer le partage vers Diaspora
14share_mail: Activer le partage par email
15share_shaarli: Activer le partage vers Shaarli
16share_twitter: Activer le partage vers Twitter
17show_printlink: Afficher un lien pour imprimer
18wallabag_support_url: URL de support de wallabag
19wallabag_url: URL de *votre* instance de wallabag
diff --git a/app/Resources/CraueConfigBundle/views/Settings/modify.html.twig b/app/Resources/CraueConfigBundle/views/Settings/modify.html.twig
new file mode 100644
index 00000000..f44db420
--- /dev/null
+++ b/app/Resources/CraueConfigBundle/views/Settings/modify.html.twig
@@ -0,0 +1,43 @@
1{% extends "WallabagCoreBundle::layout.html.twig" %}
2
3{% block title %}{% trans %}internal settings{% endtrans %}{% endblock %}
4
5{% block content %}
6 <div class="row">
7 <div class="col s12">
8 <div class="card-panel settings">
9 {{ form_start(form, {'attr': {'class': 'craue_config_settings_modify'}}) }}
10 {{ form_errors(form) }}
11
12 <div class="row">
13 <div class="div_tabs col s12">
14 <ul class="tabs">
15 {% for section in sections | craue_sortSections %}
16 <li class="tab col s3"><a href="#set-{{ section }}">{{ section | trans({}, 'CraueConfigBundle') }}</a></li>
17 {% endfor %}
18 </ul>
19 </div>
20
21 {% for section in sections | craue_sortSections %}
22 <div id="set-{{ section }}" class="col s12">
23 {% for setting in form.settings if setting.section.vars.value == section %}
24 {{ form_row(setting.name) }}
25 {{ form_row(setting.section) }}
26 {{ form_row(setting.value, {
27 'label': setting.name.vars.value | trans({}, 'CraueConfigBundle'),
28 }) }}
29 {% endfor %}
30 </div>
31 {% endfor %}
32 </div>
33
34 <button class="btn waves-effect waves-light" type="submit" name="action">
35 {{ 'modify_settings' | trans({}, 'CraueConfigBundle') }}
36 </button>
37
38 {{ form_rest(form) }}
39 {{ form_end(form) }}
40 </div>
41 </div>
42 </div>
43{% endblock %}
diff --git a/app/config/config.yml b/app/config/config.yml
index a6cfc67d..dc6bccee 100644
--- a/app/config/config.yml
+++ b/app/config/config.yml
@@ -28,11 +28,17 @@ framework:
28 assets: ~ 28 assets: ~
29 29
30wallabag_core: 30wallabag_core:
31 version: 2.0.0-alpha.2
32 paypal_url: "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9UBA65LG3FX9Y&lc=gb"
31 languages: 33 languages:
32 en: 'English' 34 en: 'English'
33 fr: 'Français' 35 fr: 'Français'
34 de: 'Deutsch' 36 de: 'Deutsch'
35 tr: 'Türkçe' 37 tr: 'Türkçe'
38 items_on_page: 12
39 theme: material
40 language: en
41 rss_limit: 50
36 42
37wallabag_import: 43wallabag_import:
38 allow_mimetypes: ['application/octet-stream', 'application/json', 'text/plain'] 44 allow_mimetypes: ['application/octet-stream', 'application/json', 'text/plain']
@@ -42,29 +48,6 @@ wallabag_import:
42twig: 48twig:
43 debug: "%kernel.debug%" 49 debug: "%kernel.debug%"
44 strict_variables: "%kernel.debug%" 50 strict_variables: "%kernel.debug%"
45 globals:
46 share_twitter: %share_twitter%
47 share_mail: %share_mail%
48 share_shaarli: %share_shaarli%
49 shaarli_url: %shaarli_url%
50 share_diaspora: %share_diaspora%
51 diaspora_url: %diaspora_url%
52 flattr: %flattr%
53 flattrable: 1
54 flattred: 2
55 carrot: %carrot%
56 show_printlink: %show_printlink%
57 export_epub: %export_epub%
58 export_mobi: %export_mobi%
59 export_pdf: %export_pdf%
60 export_csv: %export_csv%
61 export_json: %export_json%
62 export_txt: %export_txt%
63 export_xml: %export_xml%
64 version: %app.version%
65 twofactor_auth: %twofactor_auth%
66 warning_message: %warning_message%
67 paypal_url: "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9UBA65LG3FX9Y&lc=gb"
68 form_themes: 51 form_themes:
69 - "LexikFormFilterBundle:Form:form_div_layout.html.twig" 52 - "LexikFormFilterBundle:Form:form_div_layout.html.twig"
70 53
diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist
index ac4a4cc8..79654e9e 100644
--- a/app/config/parameters.yml.dist
+++ b/app/config/parameters.yml.dist
@@ -37,43 +37,8 @@ parameters:
37 # A secret key that's used to generate certain security-related tokens 37 # A secret key that's used to generate certain security-related tokens
38 secret: ovmpmAWXRCabNlMgzlzFXDYmCFfzGv 38 secret: ovmpmAWXRCabNlMgzlzFXDYmCFfzGv
39 39
40 # wallabag misc 40 # two factor stuff
41 app.version: 2.0.0-alpha
42 twofactor_auth: true 41 twofactor_auth: true
43 twofactor_sender: no-reply@wallabag.org 42 twofactor_sender: no-reply@wallabag.org
44 43
45 # message to display at the bottom of the page
46 warning_message: >
47 You're trying wallabag v2, which is in alpha version. If you find a bug, please have a look to <a href="https://github.com/wallabag/wallabag/issues">our issues list</a> and <a href="https://github.com/wallabag/wallabag/issues/new">open a new if necessary</a>
48
49 download_pictures: false # if true, pictures will be stored into data/assets for each article
50
51 # Entry view
52 share_twitter: true
53 share_mail: true
54 share_shaarli: true
55 shaarli_url: http://myshaarli.com
56 share_diaspora: true
57 diaspora_url: http://diasporapod.com
58 flattr: true
59 carrot: true
60 show_printlink: true
61 export_epub: true
62 export_mobi: true
63 export_pdf: true
64 export_csv: true
65 export_json: true
66 export_txt: true
67 export_xml: true
68 wallabag_url: http://v2.wallabag.org
69 wallabag_support_url: 'https://www.wallabag.org/pages/support.html'
70
71 # default user config
72 items_on_page: 12
73 theme: material
74 language: en
75 from_email: no-reply@wallabag.org 44 from_email: no-reply@wallabag.org
76 rss_limit: 50
77
78 # pocket import
79 pocket_consumer_key: xxxxxxxx
diff --git a/app/config/routing.yml b/app/config/routing.yml
index 84b98d23..c491d35d 100644
--- a/app/config/routing.yml
+++ b/app/config/routing.yml
@@ -22,7 +22,9 @@ rest :
22 22
23homepage: 23homepage:
24 path: "/{page}" 24 path: "/{page}"
25 defaults: { _controller: WallabagCoreBundle:Entry:showUnread, page : 1 } 25 defaults:
26 _controller: WallabagCoreBundle:Entry:showUnread
27 page : 1
26 requirements: 28 requirements:
27 page: \d+ 29 page: \d+
28 30
@@ -31,3 +33,8 @@ fos_user:
31 33
32fos_oauth_server_token: 34fos_oauth_server_token:
33 resource: "@FOSOAuthServerBundle/Resources/config/routing/token.xml" 35 resource: "@FOSOAuthServerBundle/Resources/config/routing/token.xml"
36
37craue_config_settings_modify:
38 path: /settings
39 defaults:
40 _controller: CraueConfigBundle:Settings:modify
diff --git a/app/config/security.yml b/app/config/security.yml
index a99a7d80..7c10889f 100644
--- a/app/config/security.yml
+++ b/app/config/security.yml
@@ -57,4 +57,5 @@ security:
57 - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY } 57 - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
58 - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY } 58 - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
59 - { path: /(unread|starred|archive).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY } 59 - { path: /(unread|starred|archive).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
60 - { path: ^/settings, roles: ROLE_SUPER_ADMIN }
60 - { path: ^/, roles: ROLE_USER } 61 - { path: ^/, roles: ROLE_USER }
diff --git a/app/config/tests/parameters.yml.dist.mysql b/app/config/tests/parameters.yml.dist.mysql
index 3b9262bb..dceb5dea 100644
--- a/app/config/tests/parameters.yml.dist.mysql
+++ b/app/config/tests/parameters.yml.dist.mysql
@@ -27,43 +27,8 @@ parameters:
27 # A secret key that's used to generate certain security-related tokens 27 # A secret key that's used to generate certain security-related tokens
28 secret: ThisTokenIsNotSoSecretChangeIt 28 secret: ThisTokenIsNotSoSecretChangeIt
29 29
30 # wallabag misc 30 # two factor stuff
31 app.version: 2.0.0-alpha
32 twofactor_auth: true 31 twofactor_auth: true
33 twofactor_sender: no-reply@wallabag.org 32 twofactor_sender: no-reply@wallabag.org
34 33
35 # message to display at the bottom of the page
36 warning_message: >
37 You're trying wallabag v2, which is in alpha version. If you find a bug, please have a look to <a href="https://github.com/wallabag/wallabag/issues">our issues list</a> and <a href="https://github.com/wallabag/wallabag/issues/new">open a new if necessary</a>
38
39 download_pictures: false # if true, pictures will be stored into data/assets for each article
40
41 # Entry view
42 share_twitter: true
43 share_mail: true
44 share_shaarli: true
45 shaarli_url: http://myshaarli.com
46 share_diaspora: true
47 diaspora_url: http://diasporapod.com
48 flattr: true
49 carrot: true
50 show_printlink: true
51 export_epub: true
52 export_mobi: true
53 export_pdf: true
54 export_csv: true
55 export_json: true
56 export_txt: true
57 export_xml: true
58 wallabag_url: http://v2.wallabag.org
59 wallabag_support_url: 'https://www.wallabag.org/pages/support.html'
60
61 # default user config
62 items_on_page: 12
63 theme: material
64 language: en_US
65 from_email: no-reply@wallabag.org 34 from_email: no-reply@wallabag.org
66 rss_limit: 50
67
68 # pocket import
69 pocket_consumer_key: xxxxxxxx
diff --git a/app/config/tests/parameters.yml.dist.pgsql b/app/config/tests/parameters.yml.dist.pgsql
index a5aef028..e07db610 100644
--- a/app/config/tests/parameters.yml.dist.pgsql
+++ b/app/config/tests/parameters.yml.dist.pgsql
@@ -27,43 +27,8 @@ parameters:
27 # A secret key that's used to generate certain security-related tokens 27 # A secret key that's used to generate certain security-related tokens
28 secret: ThisTokenIsNotSoSecretChangeIt 28 secret: ThisTokenIsNotSoSecretChangeIt
29 29
30 # wallabag misc 30 # two factor stuff
31 app.version: 2.0.0-alpha
32 twofactor_auth: true 31 twofactor_auth: true
33 twofactor_sender: no-reply@wallabag.org 32 twofactor_sender: no-reply@wallabag.org
34 33
35 # message to display at the bottom of the page
36 warning_message: >
37 You're trying wallabag v2, which is in alpha version. If you find a bug, please have a look to <a href="https://github.com/wallabag/wallabag/issues">our issues list</a> and <a href="https://github.com/wallabag/wallabag/issues/new">open a new if necessary</a>
38
39 download_pictures: false # if true, pictures will be stored into data/assets for each article
40
41 # Entry view
42 share_twitter: true
43 share_mail: true
44 share_shaarli: true
45 shaarli_url: http://myshaarli.com
46 share_diaspora: true
47 diaspora_url: http://diasporapod.com
48 flattr: true
49 carrot: true
50 show_printlink: true
51 export_epub: true
52 export_mobi: true
53 export_pdf: true
54 export_csv: true
55 export_json: true
56 export_txt: true
57 export_xml: true
58 wallabag_url: http://v2.wallabag.org
59 wallabag_support_url: 'https://www.wallabag.org/pages/support.html'
60
61 # default user config
62 items_on_page: 12
63 theme: material
64 language: en_US
65 from_email: no-reply@wallabag.org 34 from_email: no-reply@wallabag.org
66 rss_limit: 50
67
68 # pocket import
69 pocket_consumer_key: xxxxxxxx
diff --git a/app/config/tests/parameters.yml.dist.sqlite b/app/config/tests/parameters.yml.dist.sqlite
index cdafb1b1..01589d28 100644
--- a/app/config/tests/parameters.yml.dist.sqlite
+++ b/app/config/tests/parameters.yml.dist.sqlite
@@ -27,43 +27,8 @@ parameters:
27 # A secret key that's used to generate certain security-related tokens 27 # A secret key that's used to generate certain security-related tokens
28 secret: ThisTokenIsNotSoSecretChangeIt 28 secret: ThisTokenIsNotSoSecretChangeIt
29 29
30 # wallabag misc 30 # two factor stuff
31 app.version: 2.0.0-alpha
32 twofactor_auth: true 31 twofactor_auth: true
33 twofactor_sender: no-reply@wallabag.org 32 twofactor_sender: no-reply@wallabag.org
34 33
35 # message to display at the bottom of the page
36 warning_message: >
37 You're trying wallabag v2, which is in alpha version. If you find a bug, please have a look to <a href="https://github.com/wallabag/wallabag/issues">our issues list</a> and <a href="https://github.com/wallabag/wallabag/issues/new">open a new if necessary</a>
38
39 download_pictures: false # if true, pictures will be stored into data/assets for each article
40
41 # Entry view
42 share_twitter: true
43 share_mail: true
44 share_shaarli: true
45 shaarli_url: http://myshaarli.com
46 share_diaspora: true
47 diaspora_url: http://diasporapod.com
48 flattr: true
49 carrot: true
50 show_printlink: true
51 export_epub: true
52 export_mobi: true
53 export_pdf: true
54 export_csv: true
55 export_json: true
56 export_txt: true
57 export_xml: true
58 wallabag_url: http://v2.wallabag.org
59 wallabag_support_url: 'https://www.wallabag.org/pages/support.html'
60
61 # default user config
62 items_on_page: 12
63 theme: material
64 language: en_US
65 from_email: no-reply@wallabag.org 34 from_email: no-reply@wallabag.org
66 rss_limit: 50
67
68 # pocket import
69 pocket_consumer_key: xxxxxxxx