diff --git a/lib/Alchemy/Phrasea/Application.php b/lib/Alchemy/Phrasea/Application.php index d556939bed..25fa5da095 100644 --- a/lib/Alchemy/Phrasea/Application.php +++ b/lib/Alchemy/Phrasea/Application.php @@ -527,19 +527,18 @@ class Application extends SilexApplication { $this['twig'] = $this->share( $this->extend('twig', function ($twig, $app) { + $paths = array(); if ($app['browser']->isTablet() || $app['browser']->isMobile()) { - $app['twig.loader.filesystem']->setPaths(array( - realpath(__DIR__ . '/../../../config/templates/mobile'), - realpath(__DIR__ . '/../../../templates/mobile'), - )); - } else { - $app['twig.loader.filesystem']->setPaths(array( - realpath(__DIR__ . '/../../../config/templates/web'), - realpath(__DIR__ . '/../../../templates/web'), - )); + $paths[] = $app['root.path'] . '/config/templates/mobile'; + $paths[] = $app['root.path'] . '/templates/mobile'; } + $paths[] = $app['root.path'] . '/config/templates/web'; + $paths[] = $app['root.path'] . '/templates/web'; + + $app['twig.loader.filesystem']->setPaths($paths); + $twig->addGlobal('current_date', new \DateTime()); $twig->addExtension(new \Twig_Extension_Core()); diff --git a/lib/Alchemy/Phrasea/Controller/Lightbox.php b/lib/Alchemy/Phrasea/Controller/Lightbox.php index 2fd0708efd..0e2a3d487c 100644 --- a/lib/Alchemy/Phrasea/Controller/Lightbox.php +++ b/lib/Alchemy/Phrasea/Controller/Lightbox.php @@ -278,7 +278,7 @@ class Lightbox implements ControllerProviderInterface $app['EM']->flush(); } - if ($basket->getValidation() && $basket->getValidation()->getParticipant($app['authentication']->getUser())->getIsAware() === false) { + if ($basket->getValidation() && $basket->getValidation()->getParticipant($app['authentication']->getUser(), $app)->getIsAware() === false) { $basket = $app['EM']->merge($basket); $basket->getValidation()->getParticipant($app['authentication']->getUser(), $app)->setIsAware(true); $app['EM']->flush(); diff --git a/lib/classes/eventsmanager/notify/validate.php b/lib/classes/eventsmanager/notify/validate.php index 7cf1abb7a1..c209d2003d 100644 --- a/lib/classes/eventsmanager/notify/validate.php +++ b/lib/classes/eventsmanager/notify/validate.php @@ -113,6 +113,7 @@ class eventsmanager_notify_validate extends eventsmanager_notifyAbstract $mail = MailInfoValidationRequest::create($this->app, $receiver, $emitter, $params['message']); $mail->setButtonUrl($params['url']); $mail->setTitle($title); + $mail->setUser($user_from); $this->app['notification.deliverer']->deliver($mail, $params['accuse']); $mailed = true; diff --git a/lib/classes/eventsmanager/notify/validationdone.php b/lib/classes/eventsmanager/notify/validationdone.php index fa54d95873..f4096351f4 100644 --- a/lib/classes/eventsmanager/notify/validationdone.php +++ b/lib/classes/eventsmanager/notify/validationdone.php @@ -108,6 +108,7 @@ class eventsmanager_notify_validationdone extends eventsmanager_notifyAbstract $mail = MailInfoValidationDone::create($this->app, $receiver, $emitter); $mail->setButtonUrl($params['url']); $mail->setTitle($title); + $mail->setUser($user_from); $this->app['notification.deliverer']->deliver($mail); $mailed = true; diff --git a/templates/mobile/common/index.html.twig b/templates/mobile/common/index.html.twig index 0e580698ba..e1dd51535b 100644 --- a/templates/mobile/common/index.html.twig +++ b/templates/mobile/common/index.html.twig @@ -5,12 +5,12 @@ {{ app['phraseanet.registry'].get('GV_homeTitle') }} - {{ module_name }} - + + {% block stylesheet %}{% endblock %} {% block icon %}{% endblock %} {% block javascript %}{% endblock %} - {% block content %}{% endblock %} diff --git a/templates/mobile/lightbox/validate.html.twig b/templates/mobile/lightbox/validate.html.twig index 0ad8ba09da..ec8eb861aa 100644 --- a/templates/mobile/lightbox/validate.html.twig +++ b/templates/mobile/lightbox/validate.html.twig @@ -2,6 +2,11 @@ {% extends "common/index.html.twig" %} {% block javascript %} + {% endblock %} @@ -17,6 +22,7 @@ {% trans 'Home' %}
+

{% set basket_length = basket.getElements().count() %} {% trans %}{{basket_length}} documents{% endtrans %} @@ -37,7 +43,12 @@

- + {% if basket.getValidation() and basket.getValidation().getParticipant(app['authentication'].getUser(), app).getCanAgree() %} + + {% endif %}
{% endblock %} diff --git a/templates/mobile/login/index.html.twig b/templates/mobile/login/index.html.twig deleted file mode 100644 index 11a8bbbe43..0000000000 --- a/templates/mobile/login/index.html.twig +++ /dev/null @@ -1,60 +0,0 @@ -{% extends "common/index.html.twig" %} - -{% block javascript %} - -{% endblock %} - -{% block stylesheet %} -{% endblock %} - -{% block content %} -
-
-

{{ app['phraseanet.registry'].get('GV_homeTitle') }}

-
-
-
- - {% if app['phraseanet.registry'].get('GV_metaDescription') != '' %} -
{{ app['phraseanet.registry'].get('GV_metaDescription') }}
- {% endif %} -
-
-
- - -
- - -
- -
-
-
-
- -
-
-
- -
-{% endblock %} diff --git a/templates/web/Mustache/Prod/Feedback-SendForm.Mustache.html b/templates/web/Mustache/Prod/Feedback-SendForm.Mustache.html index 7cd8f1cc52..68c4d00f27 100644 --- a/templates/web/Mustache/Prod/Feedback-SendForm.Mustache.html +++ b/templates/web/Mustache/Prod/Feedback-SendForm.Mustache.html @@ -1,7 +1,7 @@
- +
- +