diff --git a/src/Wallabag/CoreBundle/Controller/FooterController.php b/src/Wallabag/CoreBundle/Controller/FooterController.php new file mode 100644 index 000000000..fd93c436f --- /dev/null +++ b/src/Wallabag/CoreBundle/Controller/FooterController.php @@ -0,0 +1,27 @@ +container->getParameter('addons_url'); + $socialsUrl = $this->container->getParameter('socials_url'); + + return $this->render( + 'WallabagCoreBundle::footer.html.twig', + [ + 'addonsUrl' => $addonsUrl, + 'socialsUrl' => $socialsUrl, + ] + ); + } +} diff --git a/src/Wallabag/CoreBundle/Controller/StaticController.php b/src/Wallabag/CoreBundle/Controller/StaticController.php index b41302f85..2a57f06fb 100644 --- a/src/Wallabag/CoreBundle/Controller/StaticController.php +++ b/src/Wallabag/CoreBundle/Controller/StaticController.php @@ -12,9 +12,11 @@ class StaticController extends Controller */ public function howtoAction() { + $addonsUrl = $this->container->getParameter('addons_url'); + return $this->render( 'WallabagCoreBundle:Static:howto.html.twig', - [] + ['addonsUrl' => $addonsUrl] ); } diff --git a/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php b/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php index 84599f0d7..7d08b73b7 100644 --- a/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php +++ b/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php @@ -25,6 +25,7 @@ class WallabagCoreExtension extends Extension $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); $loader->load('services.yml'); + $loader->load('parameters.yml'); } public function getAlias() diff --git a/src/Wallabag/CoreBundle/Resources/config/parameters.yml b/src/Wallabag/CoreBundle/Resources/config/parameters.yml new file mode 100644 index 000000000..abd9ab689 --- /dev/null +++ b/src/Wallabag/CoreBundle/Resources/config/parameters.yml @@ -0,0 +1,12 @@ +parameters: + addons_url: + firefox: https://addons.mozilla.org/firefox/addon/wallabag-v2/ + chrome: https://chrome.google.com/webstore/detail/wallabagit/peehlcgckcnclnjlndmoddifcicdnabm + f_droid: https://f-droid.org/app/fr.gaulupeau.apps.InThePoche + google_play: https://play.google.com/store/apps/details?id=fr.gaulupeau.apps.InThePoche + ios: https://itunes.apple.com/app/wallabag/id828331015?mt=8 + windows: https://www.microsoft.com/store/apps/wallabag/9nblggh11646 + socials_url: + twitter: https://twitter.com/wallabagapp + google_plus: https://plus.google.com/+WallabagOrg/posts + facebook: https://facebook.com/Wallabag diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Static/howto.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Static/howto.html.twig index eab092c7f..b529a0ac8 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Static/howto.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Static/howto.html.twig @@ -11,14 +11,14 @@

{{ 'howto.top_menu.browser_addons'|trans }}

{{ 'howto.top_menu.mobile_apps'|trans }}

{{ 'howto.top_menu.bookmarklet'|trans }}

diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Static/howto.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Static/howto.html.twig index 4354a6b7f..6a177d6bb 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Static/howto.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Static/howto.html.twig @@ -18,17 +18,17 @@

{{ 'howto.top_menu.browser_addons'|trans }}
{{ 'howto.top_menu.mobile_apps'|trans }}
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/footer.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/footer.html.twig new file mode 100644 index 000000000..7cb199668 --- /dev/null +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/footer.html.twig @@ -0,0 +1,41 @@ + 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 33d9e08f1..a5c16792c 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig @@ -122,45 +122,5 @@ {% endblock %} {% block footer %} - + {{ render(controller("WallabagCoreBundle:Footer:index")) }} {% endblock %}