diff --git a/bower.json b/bower.json index b187c89eef..dc4c19e27c 100644 --- a/bower.json +++ b/bower.json @@ -27,7 +27,8 @@ "zxcvbn": "https://github.com/lowe/zxcvbn.git", "geonames-server-jquery-plugin": "~0.2", "jquery-galleria": "1.2.9", - "jquery.cookie": "~1.4" + "jquery.cookie": "~1.4", + "joyride": "https://github.com/zurb/joyride/archive/v2.0.0.zip" }, "resolutions": { "jquery": "~1.8.3" diff --git a/lib/Alchemy/Phrasea/Controller/Client/Root.php b/lib/Alchemy/Phrasea/Controller/Client/Root.php index c857d6ad11..dbcd11919b 100644 --- a/lib/Alchemy/Phrasea/Controller/Client/Root.php +++ b/lib/Alchemy/Phrasea/Controller/Client/Root.php @@ -27,16 +27,6 @@ class Root implements ControllerProviderInterface $controllers = $app['controllers_factory']; $controllers->before(function (Request $request) use ($app) { - /** - * /!\/!\/!\/!\/!\/!\/!\/!\/!\ - * - * Client is not longer used - * - * Redirect to production with a nice message - */ - $app['session']->getFlashBag()->add('client_deprecated', ''); - - return $app->redirectPath('prod'); if (!$app['authentication']->isAuthenticated() && null !== $request->query->get('nolog')) { return $app->redirectPath('login_authenticate_as_guest', array('redirect' => 'client')); @@ -301,6 +291,8 @@ class Root implements ControllerProviderInterface */ public function getClient(Application $app, Request $request) { + $app['session']->getFlashBag()->add('step_by_step', ''); + try { \User_Adapter::updateClientInfos($app, 2); } catch (SessionNotFound $e) { diff --git a/templates/web/client/index.html.twig b/templates/web/client/index.html.twig index a55bf38e01..740e33e385 100644 --- a/templates/web/client/index.html.twig +++ b/templates/web/client/index.html.twig @@ -45,6 +45,22 @@ + + {% if app['phraseanet.configuration']['deprecate-client']|default(true) %} +
+ +
+ + {% endif %}
{% include 'common/menubar.html.twig' %}
diff --git a/templates/web/prod/index.html.twig b/templates/web/prod/index.html.twig index 99d17678e7..79b0bc2895 100644 --- a/templates/web/prod/index.html.twig +++ b/templates/web/prod/index.html.twig @@ -44,6 +44,7 @@ {% endmacro %} {% set jquery_theme = 'dark-hive' %} +{% set step = app.flash('step_by_step') %} {% extends "common/index_bootstrap.html.twig" %} @@ -100,6 +101,41 @@ background-color: #{% if app['authentication'].getUser().getPrefs('background-selection') != '' %}{{app['authentication'].getUser().getPrefs('background-selection')}}{% else %}404040{% endif %}; } + + {% if step %} + + + {% endif %} {% endblock %} {% block javascript %} @@ -117,22 +153,7 @@
-
- {% if app.flash('client_deprecated') %} - - - {% endif %} {% set ratio = app['authentication'].getUser().getPrefs('search_window') %} {% if ratio == 0 %} {% set ratio = '0.333' %} @@ -294,7 +315,7 @@
- + @@ -531,7 +552,7 @@
- @@ -1038,6 +1059,88 @@ + {% if step %} + + {% endif %} + @@ -1091,5 +1194,19 @@ + {% if step %} + + + + + {% endif %} {% endblock %} diff --git a/tests/Alchemy/Tests/Phrasea/Controller/Client/RootTest.php b/tests/Alchemy/Tests/Phrasea/Controller/Client/RootTest.php index b1734e998b..49487bd125 100644 --- a/tests/Alchemy/Tests/Phrasea/Controller/Client/RootTest.php +++ b/tests/Alchemy/Tests/Phrasea/Controller/Client/RootTest.php @@ -10,6 +10,6 @@ class RootTest extends \PhraseanetWebTestCaseAuthenticatedAbstract { $this->authenticate(self::$DI['app']); self::$DI['client']->request("GET", "/client/"); - $this->assertTrue(self::$DI['client']->getResponse()->isRedirect()); + $this->assertTrue(self::$DI['client']->getResponse()->isOk()); } }