diff options
-rw-r--r-- | app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml | 3 | ||||
-rw-r--r-- | app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml | 3 | ||||
-rw-r--r-- | app/config/services.yml | 6 | ||||
-rw-r--r-- | composer.json | 3 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Command/InstallCommand.php | 15 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php | 15 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Resources/views/base.html.twig | 4 |
7 files changed, 48 insertions, 1 deletions
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml index 1c47ed2d..719e51ea 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml | |||
@@ -22,3 +22,6 @@ export: "export" | |||
22 | import: "import" | 22 | import: "import" |
23 | misc: "misc" | 23 | misc: "misc" |
24 | modify_settings: "apply" | 24 | modify_settings: "apply" |
25 | piwik_host: Host of your website in Piwik | ||
26 | piwik_site_id: ID of your website in Piwik | ||
27 | piwik_enabled: Enable Piwik | ||
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml index ddb78a13..ab5dfc72 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml | |||
@@ -22,3 +22,6 @@ export: "export" | |||
22 | import: "import" | 22 | import: "import" |
23 | misc: "divers" | 23 | misc: "divers" |
24 | modify_settings: "appliquer" | 24 | modify_settings: "appliquer" |
25 | piwik_host: URL de votre site dans Piwik | ||
26 | piwik_site_id: ID de votre site dans Piwik | ||
27 | piwik_enabled: Activer Piwik | ||
diff --git a/app/config/services.yml b/app/config/services.yml index 80d6c1a1..e0683ffc 100644 --- a/app/config/services.yml +++ b/app/config/services.yml | |||
@@ -19,6 +19,12 @@ services: | |||
19 | tags: | 19 | tags: |
20 | - { name: twig.extension } | 20 | - { name: twig.extension } |
21 | 21 | ||
22 | wallabag.twig_piwik_extension: | ||
23 | class: PiwikTwigExtension\PiwikTwigExtension | ||
24 | public: false | ||
25 | tags: | ||
26 | - { name: twig.extension } | ||
27 | |||
22 | wallabag.locale_listener: | 28 | wallabag.locale_listener: |
23 | class: Wallabag\CoreBundle\EventListener\LocaleListener | 29 | class: Wallabag\CoreBundle\EventListener\LocaleListener |
24 | arguments: ["%kernel.default_locale%"] | 30 | arguments: ["%kernel.default_locale%"] |
diff --git a/composer.json b/composer.json index 497b8012..c65ebda1 100644 --- a/composer.json +++ b/composer.json | |||
@@ -64,7 +64,8 @@ | |||
64 | "guzzlehttp/guzzle": "^5.2.0", | 64 | "guzzlehttp/guzzle": "^5.2.0", |
65 | "doctrine/doctrine-migrations-bundle": "^1.0", | 65 | "doctrine/doctrine-migrations-bundle": "^1.0", |
66 | "paragonie/random_compat": "~1.0", | 66 | "paragonie/random_compat": "~1.0", |
67 | "craue/config-bundle": "~1.4" | 67 | "craue/config-bundle": "~1.4", |
68 | "mnapoli/piwik-twig-extension": "^1.0" | ||
68 | }, | 69 | }, |
69 | "require-dev": { | 70 | "require-dev": { |
70 | "doctrine/doctrine-fixtures-bundle": "~2.2", | 71 | "doctrine/doctrine-fixtures-bundle": "~2.2", |
diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php index b3e20ceb..93520f9a 100644 --- a/src/Wallabag/CoreBundle/Command/InstallCommand.php +++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php | |||
@@ -312,6 +312,21 @@ class InstallCommand extends ContainerAwareCommand | |||
312 | 'value' => 'http://v2.wallabag.org', | 312 | 'value' => 'http://v2.wallabag.org', |
313 | 'section' => 'misc', | 313 | 'section' => 'misc', |
314 | ], | 314 | ], |
315 | [ | ||
316 | 'name' => 'piwik_enabled', | ||
317 | 'value' => '0', | ||
318 | 'section' => 'analytics', | ||
319 | ], | ||
320 | [ | ||
321 | 'name' => 'piwik_host', | ||
322 | 'value' => 'http://v2.wallabag.org', | ||
323 | 'section' => 'analytics', | ||
324 | ], | ||
325 | [ | ||
326 | 'name' => 'piwik_site_id', | ||
327 | 'value' => '1', | ||
328 | 'section' => 'analytics', | ||
329 | ], | ||
315 | ]; | 330 | ]; |
316 | 331 | ||
317 | foreach ($settings as $setting) { | 332 | foreach ($settings as $setting) { |
diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php index 5e89c2a9..10b60f30 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php +++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php | |||
@@ -110,6 +110,21 @@ class LoadSettingData extends AbstractFixture implements OrderedFixtureInterface | |||
110 | 'value' => 'http://v2.wallabag.org', | 110 | 'value' => 'http://v2.wallabag.org', |
111 | 'section' => 'misc', | 111 | 'section' => 'misc', |
112 | ], | 112 | ], |
113 | [ | ||
114 | 'name' => 'piwik_enabled', | ||
115 | 'value' => '0', | ||
116 | 'section' => 'analytics', | ||
117 | ], | ||
118 | [ | ||
119 | 'name' => 'piwik_host', | ||
120 | 'value' => 'http://v2.wallabag.org', | ||
121 | 'section' => 'analytics', | ||
122 | ], | ||
123 | [ | ||
124 | 'name' => 'piwik_site_id', | ||
125 | 'value' => '1', | ||
126 | 'section' => 'analytics', | ||
127 | ], | ||
113 | ]; | 128 | ]; |
114 | 129 | ||
115 | foreach ($settings as $setting) { | 130 | foreach ($settings as $setting) { |
diff --git a/src/Wallabag/CoreBundle/Resources/views/base.html.twig b/src/Wallabag/CoreBundle/Resources/views/base.html.twig index 1742b4aa..3cadabfb 100644 --- a/src/Wallabag/CoreBundle/Resources/views/base.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/base.html.twig | |||
@@ -71,5 +71,9 @@ | |||
71 | <div id="warning_message"> | 71 | <div id="warning_message"> |
72 | 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> | 72 | 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> |
73 | </div> | 73 | </div> |
74 | |||
75 | {% if craue_setting('piwik_enabled') %} | ||
76 | {{ piwik(craue_setting('piwik_host'), craue_setting('piwik_site_id')) }} | ||
77 | {% endif %} | ||
74 | </body> | 78 | </body> |
75 | </html> | 79 | </html> |