mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
Address PR comments
This commit is contained in:
@@ -37,14 +37,10 @@ class JsFixtures extends Command
|
|||||||
|
|
||||||
copy($dbRefPath, '/tmp/db.sqlite');
|
copy($dbRefPath, '/tmp/db.sqlite');
|
||||||
|
|
||||||
try {
|
$sbasId = current($this->container['phraseanet.appbox']->get_databoxes())->get_sbas_id();
|
||||||
$sbasId = current($this->container['phraseanet.appbox']->get_databoxes())->get_sbas_id();
|
$this->writeResponse($output, 'GET', '/login/', '/home/login/index.html');
|
||||||
$this->writeResponse($output, 'GET', '/login/', '/home/login/index.html');
|
$this->writeResponse($output, 'GET', '/admin/fields/'.$sbasId , '/admin/fields/index.html', true);
|
||||||
$this->writeResponse($output, 'GET', '/admin/fields/'.$sbasId , '/admin/fields/index.html', true);
|
$this->writeResponse($output, 'GET', '/admin/task-manager/tasks', '/admin/task-manager/index.html', true);
|
||||||
$this->writeResponse($output, 'GET', '/admin/task-manager/tasks', '/admin/task-manager/index.html', true);
|
|
||||||
} catch (\Exception $e) {
|
|
||||||
throw $e;
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->copy($output, [
|
$this->copy($output, [
|
||||||
['source' => 'login/common/templates.html.twig', 'target' => 'home/login/templates.html'],
|
['source' => 'login/common/templates.html.twig', 'target' => 'home/login/templates.html'],
|
||||||
|
@@ -186,6 +186,7 @@ class RegenerateSqliteDb extends Command
|
|||||||
private function insertLazaretFiles(EntityManager $em, \Pimple $DI)
|
private function insertLazaretFiles(EntityManager $em, \Pimple $DI)
|
||||||
{
|
{
|
||||||
$session = new LazaretSession();
|
$session = new LazaretSession();
|
||||||
|
$session->setUser($DI['user']);
|
||||||
$em->persist($session);
|
$em->persist($session);
|
||||||
$em->flush();
|
$em->flush();
|
||||||
|
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
namespace Alchemy\Phrasea\Controller\Admin;
|
namespace Alchemy\Phrasea\Controller\Admin;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Exception\RuntimeException;
|
||||||
use Silex\Application;
|
use Silex\Application;
|
||||||
use Silex\ControllerProviderInterface;
|
use Silex\ControllerProviderInterface;
|
||||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||||
@@ -176,41 +177,45 @@ class Collection implements ControllerProviderInterface
|
|||||||
public function setOrderAdmins(Application $app, Request $request, $bas_id)
|
public function setOrderAdmins(Application $app, Request $request, $bas_id)
|
||||||
{
|
{
|
||||||
$success = false;
|
$success = false;
|
||||||
|
$admins = array_values($request->request->get('admins', []));
|
||||||
|
|
||||||
if (count($admins = $request->request->get('admins', [])) > 0) {
|
if (count($admins) === 0) {
|
||||||
$newAdmins = [];
|
$app->abort(400, 'No admins provided.');
|
||||||
|
}
|
||||||
|
if (!is_array($admins)) {
|
||||||
|
$app->abort(400, 'Admins must be an array.');
|
||||||
|
}
|
||||||
|
|
||||||
|
$admins = array_map(function ($usrId) use ($app) {
|
||||||
|
if (null === $user = $app['manipulator.user']->getRepository()->find($usrId)) {
|
||||||
|
throw new RuntimeException(sprintf('Invalid usrId %s provided.', $usrId));
|
||||||
|
}
|
||||||
|
|
||||||
|
return $user;
|
||||||
|
}, $admins);
|
||||||
|
|
||||||
|
$conn = $app['phraseanet.appbox']->get_connection();
|
||||||
|
$conn->beginTransaction();
|
||||||
|
|
||||||
|
try {
|
||||||
|
$userQuery = new \User_Query($app);
|
||||||
|
|
||||||
|
$result = $userQuery->on_base_ids([$bas_id])
|
||||||
|
->who_have_right(['order_master'])
|
||||||
|
->execute()->get_results();
|
||||||
|
|
||||||
|
foreach ($result as $user) {
|
||||||
|
$app['acl']->get($user)->update_rights_to_base($bas_id, ['order_master' => false]);
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($admins as $admin) {
|
foreach ($admins as $admin) {
|
||||||
$newAdmins[] = $admin;
|
$app['acl']->get($admin)->update_rights_to_base($bas_id, ['order_master' => true]);
|
||||||
}
|
|
||||||
|
|
||||||
if (count($newAdmins) > 0) {
|
|
||||||
$conn = $app['phraseanet.appbox']->get_connection();
|
|
||||||
$conn->beginTransaction();
|
|
||||||
|
|
||||||
try {
|
|
||||||
$userQuery = new \User_Query($app);
|
|
||||||
|
|
||||||
$result = $userQuery->on_base_ids([$bas_id])
|
|
||||||
->who_have_right(['order_master'])
|
|
||||||
->execute()->get_results();
|
|
||||||
|
|
||||||
foreach ($result as $user) {
|
|
||||||
$app['acl']->get($user)->update_rights_to_base($bas_id, ['order_master' => false]);
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (array_filter($newAdmins) as $admin) {
|
|
||||||
if (null !== $user = $app['manipulator.user']->getRepository()->find($admin)) {
|
|
||||||
$app['acl']->get($user)->update_rights_to_base($bas_id, ['order_master' => true]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$conn->commit();
|
|
||||||
|
|
||||||
$success = true;
|
|
||||||
} catch (\Exception $e) {
|
|
||||||
$conn->rollBack();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
$conn->commit();
|
||||||
|
$success = true;
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$conn->rollBack();
|
||||||
|
throw $e;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $app->redirectPath('admin_display_collection', [
|
return $app->redirectPath('admin_display_collection', [
|
||||||
|
@@ -14,6 +14,7 @@ namespace Alchemy\Phrasea\Controller\Admin;
|
|||||||
use Alchemy\Phrasea\Notification\Receiver;
|
use Alchemy\Phrasea\Notification\Receiver;
|
||||||
use Alchemy\Phrasea\Notification\Mail\MailTest;
|
use Alchemy\Phrasea\Notification\Mail\MailTest;
|
||||||
use Alchemy\Phrasea\Exception\InvalidArgumentException;
|
use Alchemy\Phrasea\Exception\InvalidArgumentException;
|
||||||
|
use Alchemy\Phrasea\Exception\RuntimeException;
|
||||||
use Silex\Application;
|
use Silex\Application;
|
||||||
use Silex\ControllerProviderInterface;
|
use Silex\ControllerProviderInterface;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
@@ -146,18 +147,24 @@ class Dashboard implements ControllerProviderInterface
|
|||||||
*/
|
*/
|
||||||
public function addAdmins(Application $app, Request $request)
|
public function addAdmins(Application $app, Request $request)
|
||||||
{
|
{
|
||||||
if (count($admins = $request->request->get('admins', [])) > 0) {
|
$admins = $request->request->get('admins', []);
|
||||||
if (!in_array($app['authentication']->getUser()->getId(), $admins)) {
|
if (count($admins) === 0 || !is_array($admins)) {
|
||||||
$admins[] = $app['authentication']->getUser()->getId();
|
$app->abort(400, '"admins" parameter must contains at least one value.');
|
||||||
|
}
|
||||||
|
if (!in_array($app['authentication']->getUser()->getId(), $admins)) {
|
||||||
|
$admins[] = $app['authentication']->getUser()->getId();
|
||||||
|
}
|
||||||
|
|
||||||
|
$admins = array_map(function ($usrId) use ($app) {
|
||||||
|
if (null === $user = $app['manipulator.user']->getRepository()->find($usrId)) {
|
||||||
|
throw new RuntimeException(sprintf('Invalid usrId %s provided.', $usrId));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($admins > 0) {
|
return $user;
|
||||||
$app['manipulator.user']->promote(array_filter(array_map(function ($id) use ($app) {
|
}, $admins);
|
||||||
return $app['manipulator.user']->getRepository()->find($id);
|
|
||||||
}, $admins)));
|
$app['manipulator.user']->promote($admins);
|
||||||
$app['manipulator.acl']->resetAdminRights($app['manipulator.user']->getRepository()->findAdmins());
|
$app['manipulator.acl']->resetAdminRights($admins);
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $app->redirectPath('admin_dashbord');
|
return $app->redirectPath('admin_dashbord');
|
||||||
}
|
}
|
||||||
|
@@ -243,7 +243,7 @@ class Users implements ControllerProviderInterface
|
|||||||
$datas[] = [
|
$datas[] = [
|
||||||
'email' => $user->getEmail() ? : '',
|
'email' => $user->getEmail() ? : '',
|
||||||
'login' => $user->getLogin() ? : '',
|
'login' => $user->getLogin() ? : '',
|
||||||
'name' => $user->getDisplayName($app['translator']) ? : '',
|
'name' => $user->getDisplayName(),
|
||||||
'id' => $user->getId(),
|
'id' => $user->getId(),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -366,7 +366,7 @@ class Users implements ControllerProviderInterface
|
|||||||
$currentUsr = null;
|
$currentUsr = null;
|
||||||
$table = ['users' => [], 'coll' => []];
|
$table = ['users' => [], 'coll' => []];
|
||||||
|
|
||||||
foreach ($app['phraseanet.native-query']->getUsersRegistrationDemand($basList) as $row) {
|
foreach ($app['EM.native-query']->getUsersRegistrationDemand($basList) as $row) {
|
||||||
$user = $row[0];
|
$user = $row[0];
|
||||||
|
|
||||||
if ($user->getId() !== $currentUsr) {
|
if ($user->getId() !== $currentUsr) {
|
||||||
@@ -693,7 +693,7 @@ class Users implements ControllerProviderInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
$basList = array_keys($app['acl']->get($app['authentication']->getUser())->get_granted_base(['manage']));
|
$basList = array_keys($app['acl']->get($app['authentication']->getUser())->get_granted_base(['manage']));
|
||||||
$models = $app['phraseanet.native-query']->getModelForUser($app['authentication']->getUser(), $basList);
|
$models = $app['EM.native-query']->getModelForUser($app['authentication']->getUser(), $basList);
|
||||||
|
|
||||||
return $app['twig']->render('/admin/user/import/view.html.twig', [
|
return $app['twig']->render('/admin/user/import/view.html.twig', [
|
||||||
'nb_user_to_add' => $nbUsrToAdd,
|
'nb_user_to_add' => $nbUsrToAdd,
|
||||||
|
@@ -180,7 +180,7 @@ class Baskets implements ControllerProviderInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
$basketCollections = $baskets->partition(function ($key, $basket) {
|
$basketCollections = $baskets->partition(function ($key, $basket) {
|
||||||
return (Boolean) $basket->getPusherId();
|
return null !== $basket->getPusher();
|
||||||
});
|
});
|
||||||
|
|
||||||
return $app['twig']->render('client/baskets.html.twig', [
|
return $app['twig']->render('client/baskets.html.twig', [
|
||||||
|
@@ -221,9 +221,9 @@ class Lightbox implements ControllerProviderInterface
|
|||||||
$app['EM']->flush();
|
$app['EM']->flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($basket->getValidation() && $basket->getValidation()->getParticipant($app['authentication']->getUser(), $app)->getIsAware() === false) {
|
if ($basket->getValidation() && $basket->getValidation()->getParticipant($app['authentication']->getUser())->getIsAware() === false) {
|
||||||
$basket = $app['EM']->merge($basket);
|
$basket = $app['EM']->merge($basket);
|
||||||
$basket->getValidation()->getParticipant($app['authentication']->getUser(), $app)->setIsAware(true);
|
$basket->getValidation()->getParticipant($app['authentication']->getUser())->setIsAware(true);
|
||||||
$app['EM']->flush();
|
$app['EM']->flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -268,9 +268,9 @@ class Lightbox implements ControllerProviderInterface
|
|||||||
$app['EM']->flush();
|
$app['EM']->flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($basket->getValidation() && $basket->getValidation()->getParticipant($app['authentication']->getUser(), $app)->getIsAware() === false) {
|
if ($basket->getValidation() && $basket->getValidation()->getParticipant($app['authentication']->getUser())->getIsAware() === false) {
|
||||||
$basket = $app['EM']->merge($basket);
|
$basket = $app['EM']->merge($basket);
|
||||||
$basket->getValidation()->getParticipant($app['authentication']->getUser(), $app)->setIsAware(true);
|
$basket->getValidation()->getParticipant($app['authentication']->getUser())->setIsAware(true);
|
||||||
$app['EM']->flush();
|
$app['EM']->flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -350,7 +350,7 @@ class Lightbox implements ControllerProviderInterface
|
|||||||
|
|
||||||
$basket_element = $repository->findUserElement($sselcont_id, $app['authentication']->getUser());
|
$basket_element = $repository->findUserElement($sselcont_id, $app['authentication']->getUser());
|
||||||
|
|
||||||
$validationDatas = $basket_element->getUserValidationDatas($app['authentication']->getUser(), $app);
|
$validationDatas = $basket_element->getUserValidationDatas($app['authentication']->getUser());
|
||||||
|
|
||||||
$validationDatas->setNote($note);
|
$validationDatas->setNote($note);
|
||||||
|
|
||||||
@@ -400,11 +400,11 @@ class Lightbox implements ControllerProviderInterface
|
|||||||
, $app['authentication']->getUser()
|
, $app['authentication']->getUser()
|
||||||
);
|
);
|
||||||
/* @var $basket_element BasketElement */
|
/* @var $basket_element BasketElement */
|
||||||
$validationDatas = $basket_element->getUserValidationDatas($app['authentication']->getUser(), $app);
|
$validationDatas = $basket_element->getUserValidationDatas($app['authentication']->getUser());
|
||||||
|
|
||||||
if (!$basket_element->getBasket()
|
if (!$basket_element->getBasket()
|
||||||
->getValidation()
|
->getValidation()
|
||||||
->getParticipant($app['authentication']->getUser(), $app)->getCanAgree()) {
|
->getParticipant($app['authentication']->getUser())->getCanAgree()) {
|
||||||
throw new ControllerException('You can not agree on this');
|
throw new ControllerException('You can not agree on this');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -412,7 +412,7 @@ class Lightbox implements ControllerProviderInterface
|
|||||||
|
|
||||||
$participant = $basket_element->getBasket()
|
$participant = $basket_element->getBasket()
|
||||||
->getValidation()
|
->getValidation()
|
||||||
->getParticipant($app['authentication']->getUser(), $app);
|
->getParticipant($app['authentication']->getUser());
|
||||||
|
|
||||||
$app['EM']->merge($basket_element);
|
$app['EM']->merge($basket_element);
|
||||||
|
|
||||||
@@ -446,14 +446,14 @@ class Lightbox implements ControllerProviderInterface
|
|||||||
throw new ControllerException('There is no validation session attached to this basket');
|
throw new ControllerException('There is no validation session attached to this basket');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$basket->getValidation()->getParticipant($app['authentication']->getUser(), $app)->getCanAgree()) {
|
if (!$basket->getValidation()->getParticipant($app['authentication']->getUser())->getCanAgree()) {
|
||||||
throw new ControllerException('You have not right to agree');
|
throw new ControllerException('You have not right to agree');
|
||||||
}
|
}
|
||||||
|
|
||||||
$agreed = false;
|
$agreed = false;
|
||||||
/* @var $basket Basket */
|
/* @var $basket Basket */
|
||||||
foreach ($basket->getElements() as $element) {
|
foreach ($basket->getElements() as $element) {
|
||||||
if (null !== $element->getUserValidationDatas($app['authentication']->getUser(), $app)->getAgreement()) {
|
if (null !== $element->getUserValidationDatas($app['authentication']->getUser())->getAgreement()) {
|
||||||
$agreed = true;
|
$agreed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -463,7 +463,7 @@ class Lightbox implements ControllerProviderInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* @var $basket Basket */
|
/* @var $basket Basket */
|
||||||
$participant = $basket->getValidation()->getParticipant($app['authentication']->getUser(), $app);
|
$participant = $basket->getValidation()->getParticipant($app['authentication']->getUser());
|
||||||
|
|
||||||
$expires = new \DateTime('+10 days');
|
$expires = new \DateTime('+10 days');
|
||||||
$url = $app->url('lightbox', ['LOG' => $app['tokens']->getUrlToken(
|
$url = $app->url('lightbox', ['LOG' => $app['tokens']->getUrlToken(
|
||||||
|
@@ -99,8 +99,8 @@ class BasketController implements ControllerProviderInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($basket->getValidation()) {
|
if ($basket->getValidation()) {
|
||||||
if ($basket->getValidation()->getParticipant($app['authentication']->getUser(), $app)->getIsAware() === false) {
|
if ($basket->getValidation()->getParticipant($app['authentication']->getUser())->getIsAware() === false) {
|
||||||
$basket->getValidation()->getParticipant($app['authentication']->getUser(), $app)->setIsAware(true);
|
$basket->getValidation()->getParticipant($app['authentication']->getUser())->setIsAware(true);
|
||||||
$app['EM']->flush();
|
$app['EM']->flush();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -232,7 +232,7 @@ class Export implements ControllerProviderInterface
|
|||||||
|
|
||||||
$url = $app->url('prepare_download', ['token' => $token, 'anonymous']);
|
$url = $app->url('prepare_download', ['token' => $token, 'anonymous']);
|
||||||
|
|
||||||
$emitter = new Emitter($app['authentication']->getUser()->getDisplayName($app['translator']), $app['authentication']->getUser()->getEmail());
|
$emitter = new Emitter($app['authentication']->getUser()->getDisplayName(), $app['authentication']->getUser()->getEmail());
|
||||||
|
|
||||||
foreach ($destMails as $key => $mail) {
|
foreach ($destMails as $key => $mail) {
|
||||||
try {
|
try {
|
||||||
|
@@ -263,7 +263,7 @@ class Order implements ControllerProviderInterface
|
|||||||
$basketElement->setRecord($record);
|
$basketElement->setRecord($record);
|
||||||
$basketElement->setBasket($basket);
|
$basketElement->setBasket($basket);
|
||||||
|
|
||||||
$orderElement->setOrderMasterId($app['authentication']->getUser()->getId());
|
$orderElement->setOrderMaster($app['authentication']->getUser());
|
||||||
$orderElement->setDeny(false);
|
$orderElement->setDeny(false);
|
||||||
$orderElement->getOrder()->setBasket($basket);
|
$orderElement->getOrder()->setBasket($basket);
|
||||||
|
|
||||||
@@ -329,7 +329,7 @@ class Order implements ControllerProviderInterface
|
|||||||
$elements = $request->request->get('elements', []);
|
$elements = $request->request->get('elements', []);
|
||||||
foreach ($order->getElements() as $orderElement) {
|
foreach ($order->getElements() as $orderElement) {
|
||||||
if (in_array($orderElement->getId(),$elements)) {
|
if (in_array($orderElement->getId(),$elements)) {
|
||||||
$orderElement->setOrderMasterId($app['authentication']->getUser()->getId());
|
$orderElement->setOrderMaster($app['authentication']->getUser());
|
||||||
$orderElement->setDeny(true);
|
$orderElement->setDeny(true);
|
||||||
|
|
||||||
$app['EM']->persist($orderElement);
|
$app['EM']->persist($orderElement);
|
||||||
|
@@ -40,7 +40,7 @@ class Push implements ControllerProviderInterface
|
|||||||
'firstname' => $user->getFirstName(),
|
'firstname' => $user->getFirstName(),
|
||||||
'lastname' => $user->getLastName(),
|
'lastname' => $user->getLastName(),
|
||||||
'email' => $user->getEmail(),
|
'email' => $user->getEmail(),
|
||||||
'display_name' => $user->getDisplayName($app['translator']),
|
'display_name' => $user->getDisplayName(),
|
||||||
'subtitle' => implode(', ', $subtitle),
|
'subtitle' => implode(', ', $subtitle),
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
@@ -162,7 +162,7 @@ class Push implements ControllerProviderInterface
|
|||||||
try {
|
try {
|
||||||
$pusher = new RecordHelper\Push($app, $app['request']);
|
$pusher = new RecordHelper\Push($app, $app['request']);
|
||||||
|
|
||||||
$push_name = $request->request->get('name', $app->trans('Push from %user%', ['%user%' => $app['authentication']->getUser()->getDisplayName($app['translator'])]));
|
$push_name = $request->request->get('name', $app->trans('Push from %user%', ['%user%' => $app['authentication']->getUser()->getDisplayName()]));
|
||||||
$push_description = $request->request->get('push_description');
|
$push_description = $request->request->get('push_description');
|
||||||
|
|
||||||
$receivers = $request->request->get('participants');
|
$receivers = $request->request->get('participants');
|
||||||
@@ -234,7 +234,7 @@ class Push implements ControllerProviderInterface
|
|||||||
'from_email' => $app['authentication']->getUser()->getEmail(),
|
'from_email' => $app['authentication']->getUser()->getEmail(),
|
||||||
'to' => $user_receiver->getId(),
|
'to' => $user_receiver->getId(),
|
||||||
'to_email' => $user_receiver->getEmail(),
|
'to_email' => $user_receiver->getEmail(),
|
||||||
'to_name' => $user_receiver->getDisplayName($app['translator']),
|
'to_name' => $user_receiver->getDisplayName(),
|
||||||
'url' => $url,
|
'url' => $url,
|
||||||
'accuse' => $receipt,
|
'accuse' => $receipt,
|
||||||
'message' => $request->request->get('message'),
|
'message' => $request->request->get('message'),
|
||||||
@@ -278,7 +278,7 @@ class Push implements ControllerProviderInterface
|
|||||||
try {
|
try {
|
||||||
$pusher = new RecordHelper\Push($app, $app['request']);
|
$pusher = new RecordHelper\Push($app, $app['request']);
|
||||||
|
|
||||||
$validation_name = $request->request->get('name', $app->trans('Validation from %user%', ['%user%' => $app['authentication']->getUser()->getDisplayName($app['translator'])]));
|
$validation_name = $request->request->get('name', $app->trans('Validation from %user%', ['%user%' => $app['authentication']->getUser()->getDisplayName()]));
|
||||||
$validation_description = $request->request->get('validation_description');
|
$validation_description = $request->request->get('validation_description');
|
||||||
|
|
||||||
$participants = $request->request->get('participants');
|
$participants = $request->request->get('participants');
|
||||||
@@ -364,7 +364,7 @@ class Push implements ControllerProviderInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$Participant = $Validation->getParticipant($participant_user, $app);
|
$Participant = $Validation->getParticipant($participant_user);
|
||||||
continue;
|
continue;
|
||||||
} catch (NotFoundHttpException $e) {
|
} catch (NotFoundHttpException $e) {
|
||||||
|
|
||||||
@@ -429,7 +429,7 @@ class Push implements ControllerProviderInterface
|
|||||||
'from_email' => $app['authentication']->getUser()->getEmail(),
|
'from_email' => $app['authentication']->getUser()->getEmail(),
|
||||||
'to' => $participant_user->getId(),
|
'to' => $participant_user->getId(),
|
||||||
'to_email' => $participant_user->getEmail(),
|
'to_email' => $participant_user->getEmail(),
|
||||||
'to_name' => $participant_user->getDisplayName($app['translator']),
|
'to_name' => $participant_user->getDisplayName(),
|
||||||
'url' => $url,
|
'url' => $url,
|
||||||
'accuse' => $receipt,
|
'accuse' => $receipt,
|
||||||
'message' => $request->request->get('message'),
|
'message' => $request->request->get('message'),
|
||||||
|
@@ -92,7 +92,7 @@ class UsrLists implements ControllerProviderInterface
|
|||||||
foreach ($list->getOwners() as $owner) {
|
foreach ($list->getOwners() as $owner) {
|
||||||
$owners[] = [
|
$owners[] = [
|
||||||
'usr_id' => $owner->getUser()->getId(),
|
'usr_id' => $owner->getUser()->getId(),
|
||||||
'display_name' => $owner->getUser()->getDisplayName($app['translator']),
|
'display_name' => $owner->getUser()->getDisplayName(),
|
||||||
'position' => $owner->getUser()->getActivity(),
|
'position' => $owner->getUser()->getActivity(),
|
||||||
'job' => $owner->getUser()->getJob(),
|
'job' => $owner->getUser()->getJob(),
|
||||||
'company' => $owner->getUser()->getCompany(),
|
'company' => $owner->getUser()->getCompany(),
|
||||||
@@ -104,7 +104,7 @@ class UsrLists implements ControllerProviderInterface
|
|||||||
foreach ($list->getEntries() as $entry) {
|
foreach ($list->getEntries() as $entry) {
|
||||||
$entries[] = [
|
$entries[] = [
|
||||||
'usr_id' => $entry->getUser()->getId(),
|
'usr_id' => $entry->getUser()->getId(),
|
||||||
'display_name' => $entry->getUser()->getDisplayName($app['translator']),
|
'display_name' => $entry->getUser()->getDisplayName(),
|
||||||
'position' => $entry->getUser()->getActivity(),
|
'position' => $entry->getUser()->getActivity(),
|
||||||
'job' => $entry->getUser()->getJob(),
|
'job' => $entry->getUser()->getJob(),
|
||||||
'company' => $entry->getUser()->getCompany(),
|
'company' => $entry->getUser()->getCompany(),
|
||||||
@@ -203,7 +203,7 @@ class UsrLists implements ControllerProviderInterface
|
|||||||
foreach ($list->getOwners() as $owner) {
|
foreach ($list->getOwners() as $owner) {
|
||||||
$owners[] = [
|
$owners[] = [
|
||||||
'usr_id' => $owner->getUser()->getId(),
|
'usr_id' => $owner->getUser()->getId(),
|
||||||
'display_name' => $owner->getUser()->getDisplayName($app['translator']),
|
'display_name' => $owner->getUser()->getDisplayName(),
|
||||||
'position' => $owner->getUser()->getActivity(),
|
'position' => $owner->getUser()->getActivity(),
|
||||||
'job' => $owner->getUser()->getJob(),
|
'job' => $owner->getUser()->getJob(),
|
||||||
'company' => $owner->getUser()->getCompany(),
|
'company' => $owner->getUser()->getCompany(),
|
||||||
@@ -215,7 +215,7 @@ class UsrLists implements ControllerProviderInterface
|
|||||||
foreach ($list->getEntries() as $entry) {
|
foreach ($list->getEntries() as $entry) {
|
||||||
$entries[] = [
|
$entries[] = [
|
||||||
'usr_id' => $entry->getUser()->getId(),
|
'usr_id' => $entry->getUser()->getId(),
|
||||||
'display_name' => $entry->getUser()->getDisplayName($app['translator']),
|
'display_name' => $entry->getUser()->getDisplayName(),
|
||||||
'position' => $entry->getUser()->getActivity(),
|
'position' => $entry->getUser()->getActivity(),
|
||||||
'job' => $entry->getUser()->getJob(),
|
'job' => $entry->getUser()->getJob(),
|
||||||
'company' => $entry->getUser()->getCompany(),
|
'company' => $entry->getUser()->getCompany(),
|
||||||
@@ -372,7 +372,7 @@ class UsrLists implements ControllerProviderInterface
|
|||||||
foreach ($request->request->get('usr_ids') as $usr_id) {
|
foreach ($request->request->get('usr_ids') as $usr_id) {
|
||||||
$user_entry = $app['manipulator.user']->getRepository()->find($usr_id);
|
$user_entry = $app['manipulator.user']->getRepository()->find($usr_id);
|
||||||
|
|
||||||
if ($list->has($user_entry, $app))
|
if ($list->has($user_entry))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
$entry = new UsrListEntry();
|
$entry = new UsrListEntry();
|
||||||
|
@@ -364,6 +364,10 @@ class Login implements ControllerProviderInterface
|
|||||||
|
|
||||||
$user = $app['manipulator.user']->createUser($data['login'], $data['password'], $data['email'], false);
|
$user = $app['manipulator.user']->createUser($data['login'], $data['password'], $data['email'], false);
|
||||||
|
|
||||||
|
if (isset($data['geonameid'])) {
|
||||||
|
$app['manipulator.user']->setGeonameId($user, $data['geonameid']);
|
||||||
|
}
|
||||||
|
|
||||||
foreach ([
|
foreach ([
|
||||||
'gender' => 'setGender',
|
'gender' => 'setGender',
|
||||||
'firstname' => 'setFirstName',
|
'firstname' => 'setFirstName',
|
||||||
@@ -375,13 +379,8 @@ class Login implements ControllerProviderInterface
|
|||||||
'job' => 'setJob',
|
'job' => 'setJob',
|
||||||
'company' => 'setCompany',
|
'company' => 'setCompany',
|
||||||
'position' => 'setActivity',
|
'position' => 'setActivity',
|
||||||
'geonameid' => 'setGeonameId',
|
|
||||||
] as $property => $method) {
|
] as $property => $method) {
|
||||||
if (isset($data[$property])) {
|
if (isset($data[$property])) {
|
||||||
if ($property === 'geonameid') {
|
|
||||||
$app['manipulator.user']->setGeonameId($user, $data[$property]);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
call_user_func([$user, $method], $data[$property]);
|
call_user_func([$user, $method], $data[$property]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -866,7 +865,7 @@ class Login implements ControllerProviderInterface
|
|||||||
$app['events-manager']->trigger('__VALIDATION_REMINDER__', [
|
$app['events-manager']->trigger('__VALIDATION_REMINDER__', [
|
||||||
'to' => $participantId,
|
'to' => $participantId,
|
||||||
'ssel_id' => $basketId,
|
'ssel_id' => $basketId,
|
||||||
'from' => $validationSession->getInitiatorId(),
|
'from' => $validationSession->getInitiator()->getId(),
|
||||||
'validate_id' => $validationSession->getId(),
|
'validate_id' => $validationSession->getId(),
|
||||||
'url' => $app->url('lightbox_validation', ['basket' => $basketId, 'LOG' => $token]),
|
'url' => $app->url('lightbox_validation', ['basket' => $basketId, 'LOG' => $token]),
|
||||||
]);
|
]);
|
||||||
|
@@ -13,6 +13,7 @@ namespace Alchemy\Phrasea\Core\Provider;
|
|||||||
|
|
||||||
use Alchemy\Phrasea\Exception\RuntimeException;
|
use Alchemy\Phrasea\Exception\RuntimeException;
|
||||||
use Alchemy\Phrasea\Model\MonologSQLLogger;
|
use Alchemy\Phrasea\Model\MonologSQLLogger;
|
||||||
|
use Alchemy\Phrasea\Model\NativeQueryProvider;
|
||||||
use Doctrine\Common\Annotations\AnnotationReader;
|
use Doctrine\Common\Annotations\AnnotationReader;
|
||||||
use Doctrine\Common\Annotations\AnnotationRegistry;
|
use Doctrine\Common\Annotations\AnnotationRegistry;
|
||||||
use Doctrine\Common\Annotations\FileCacheReader;
|
use Doctrine\Common\Annotations\FileCacheReader;
|
||||||
@@ -155,6 +156,10 @@ class ORMServiceProvider implements ServiceProviderInterface
|
|||||||
|
|
||||||
return $em;
|
return $em;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$app['EM.native-query'] = $app->share(function ($app) {
|
||||||
|
return new NativeQueryProvider($app['EM']);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public function boot(Application $app)
|
public function boot(Application $app)
|
||||||
|
@@ -12,7 +12,6 @@
|
|||||||
namespace Alchemy\Phrasea\Core\Provider;
|
namespace Alchemy\Phrasea\Core\Provider;
|
||||||
|
|
||||||
use Alchemy\Phrasea\Authentication\ACLProvider;
|
use Alchemy\Phrasea\Authentication\ACLProvider;
|
||||||
use Alchemy\Phrasea\Model\NativeQueryProvider;
|
|
||||||
use Alchemy\Phrasea\Security\Firewall;
|
use Alchemy\Phrasea\Security\Firewall;
|
||||||
use Silex\Application as SilexApplication;
|
use Silex\Application as SilexApplication;
|
||||||
use Silex\ServiceProviderInterface;
|
use Silex\ServiceProviderInterface;
|
||||||
@@ -40,10 +39,6 @@ class PhraseanetServiceProvider implements ServiceProviderInterface
|
|||||||
return new ACLProvider($app);
|
return new ACLProvider($app);
|
||||||
});
|
});
|
||||||
|
|
||||||
$app['phraseanet.native-query'] = $app->share(function ($app) {
|
|
||||||
return new NativeQueryProvider($app['EM']);
|
|
||||||
});
|
|
||||||
|
|
||||||
$app['phraseanet.appbox-register'] = $app->share(function ($app) {
|
$app['phraseanet.appbox-register'] = $app->share(function ($app) {
|
||||||
return new \appbox_register($app['phraseanet.appbox']);
|
return new \appbox_register($app['phraseanet.appbox']);
|
||||||
});
|
});
|
||||||
|
@@ -28,7 +28,7 @@ class AggregateToken
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\ManyToOne(targetEntity="User")
|
* @ORM\ManyToOne(targetEntity="User")
|
||||||
* @ORM\JoinColumn(name="user_id", referencedColumnName="id")
|
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false)
|
||||||
*
|
*
|
||||||
* @return User
|
* @return User
|
||||||
**/
|
**/
|
||||||
@@ -54,7 +54,7 @@ class AggregateToken
|
|||||||
*
|
*
|
||||||
* @return AggregateToken
|
* @return AggregateToken
|
||||||
*/
|
*/
|
||||||
public function setUser(User $user = null)
|
public function setUser(User $user)
|
||||||
{
|
{
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
|
|
||||||
@@ -91,5 +91,4 @@ class AggregateToken
|
|||||||
{
|
{
|
||||||
return $this->value;
|
return $this->value;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -44,7 +44,7 @@ class Basket
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\ManyToOne(targetEntity="User")
|
* @ORM\ManyToOne(targetEntity="User")
|
||||||
* @ORM\JoinColumn(name="user_id", referencedColumnName="id")
|
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false)
|
||||||
*
|
*
|
||||||
* @return User
|
* @return User
|
||||||
**/
|
**/
|
||||||
@@ -56,9 +56,12 @@ class Basket
|
|||||||
private $is_read = false;
|
private $is_read = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="integer", nullable=true)
|
* @ORM\ManyToOne(targetEntity="User")
|
||||||
*/
|
* @ORM\JoinColumn(name="pusher_id", referencedColumnName="id")
|
||||||
private $pusher_id;
|
*
|
||||||
|
* @return User
|
||||||
|
**/
|
||||||
|
private $pusher;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="boolean")
|
* @ORM\Column(type="boolean")
|
||||||
@@ -93,8 +96,6 @@ class Basket
|
|||||||
*/
|
*/
|
||||||
private $order;
|
private $order;
|
||||||
|
|
||||||
private $pusher;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*/
|
*/
|
||||||
@@ -164,7 +165,7 @@ class Basket
|
|||||||
*
|
*
|
||||||
* @return Basket
|
* @return Basket
|
||||||
*/
|
*/
|
||||||
public function setUser(User $user = null)
|
public function setUser(User $user)
|
||||||
{
|
{
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
|
|
||||||
@@ -203,39 +204,23 @@ class Basket
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set pusher_id
|
* @param User $user
|
||||||
*
|
*
|
||||||
* @param integer $pusherId
|
* @return $this
|
||||||
* @return Basket
|
|
||||||
*/
|
*/
|
||||||
public function setPusherId($pusherId)
|
public function setPusher(User $user = null)
|
||||||
{
|
{
|
||||||
$this->pusher_id = $pusherId;
|
$this->pusher = $user;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get pusher_id
|
* @return mixed
|
||||||
*
|
|
||||||
* @return integer
|
|
||||||
*/
|
*/
|
||||||
public function getPusherId()
|
public function getPusher()
|
||||||
{
|
{
|
||||||
return $this->pusher_id;
|
return $this->pusher;
|
||||||
}
|
|
||||||
|
|
||||||
public function setPusher(User $user)
|
|
||||||
{
|
|
||||||
$this->setPusherId($user->getId());
|
|
||||||
$this->pusher = $user;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getPusher(Application $app)
|
|
||||||
{
|
|
||||||
if ($this->getPusherId()) {
|
|
||||||
return $app['manipulator.user']->getRepository()->find($this->getPusherId());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -279,10 +279,10 @@ class BasketElement
|
|||||||
*
|
*
|
||||||
* @return ValidationData
|
* @return ValidationData
|
||||||
*/
|
*/
|
||||||
public function getUserValidationDatas(User $user, Application $app)
|
public function getUserValidationDatas(User $user)
|
||||||
{
|
{
|
||||||
foreach ($this->validation_datas as $validationData) {
|
foreach ($this->validation_datas as $validationData) {
|
||||||
if ($validationData->getParticipant($app)->getUser()->getId() == $user->getId()) {
|
if ($validationData->getParticipant()->getUser()->getId() == $user->getId()) {
|
||||||
return $validationData;
|
return $validationData;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -29,7 +29,7 @@ class FeedPublisher
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\ManyToOne(targetEntity="User")
|
* @ORM\ManyToOne(targetEntity="User")
|
||||||
* @ORM\JoinColumn(name="user_id", referencedColumnName="id")
|
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false)
|
||||||
*
|
*
|
||||||
* @return User
|
* @return User
|
||||||
**/
|
**/
|
||||||
@@ -67,7 +67,7 @@ class FeedPublisher
|
|||||||
*
|
*
|
||||||
* @return FeedPublisher
|
* @return FeedPublisher
|
||||||
*/
|
*/
|
||||||
public function setUser(User $user = null)
|
public function setUser(User $user)
|
||||||
{
|
{
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
|
|
||||||
|
@@ -28,7 +28,7 @@ class FeedToken
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\ManyToOne(targetEntity="User")
|
* @ORM\ManyToOne(targetEntity="User")
|
||||||
* @ORM\JoinColumn(name="user_id", referencedColumnName="id")
|
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false)
|
||||||
*
|
*
|
||||||
* @return User
|
* @return User
|
||||||
**/
|
**/
|
||||||
@@ -60,7 +60,7 @@ class FeedToken
|
|||||||
*
|
*
|
||||||
* @return FeedToken
|
* @return FeedToken
|
||||||
*/
|
*/
|
||||||
public function setUser(User $user = null)
|
public function setUser(User $user)
|
||||||
{
|
{
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
|
|
||||||
|
@@ -29,7 +29,7 @@ class FtpCredential
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\OneToOne(targetEntity="User", inversedBy="ftpCredential")
|
* @ORM\OneToOne(targetEntity="User", inversedBy="ftpCredential")
|
||||||
* @ORM\JoinColumn(name="user_id", referencedColumnName="id")
|
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false)
|
||||||
**/
|
**/
|
||||||
private $user;
|
private $user;
|
||||||
|
|
||||||
@@ -105,7 +105,7 @@ class FtpCredential
|
|||||||
*
|
*
|
||||||
* @return FtpCredential
|
* @return FtpCredential
|
||||||
*/
|
*/
|
||||||
public function setUser(User $user = null)
|
public function setUser(User $user)
|
||||||
{
|
{
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
|
|
||||||
|
@@ -90,7 +90,7 @@ class FtpExport
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\ManyToOne(targetEntity="User")
|
* @ORM\ManyToOne(targetEntity="User")
|
||||||
* @ORM\JoinColumn(name="user_id", referencedColumnName="id")
|
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false)
|
||||||
*
|
*
|
||||||
* @return User
|
* @return User
|
||||||
**/
|
**/
|
||||||
@@ -148,7 +148,7 @@ class FtpExport
|
|||||||
*
|
*
|
||||||
* @return FtpExport
|
* @return FtpExport
|
||||||
*/
|
*/
|
||||||
public function setUser(User $user = null)
|
public function setUser(User $user)
|
||||||
{
|
{
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
|
|
||||||
|
@@ -29,7 +29,7 @@ class LazaretSession
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\ManyToOne(targetEntity="User")
|
* @ORM\ManyToOne(targetEntity="User")
|
||||||
* @ORM\JoinColumn(name="user_id", referencedColumnName="id")
|
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false)
|
||||||
*
|
*
|
||||||
* @return User
|
* @return User
|
||||||
**/
|
**/
|
||||||
@@ -76,7 +76,7 @@ class LazaretSession
|
|||||||
*
|
*
|
||||||
* @return LazaretSession
|
* @return LazaretSession
|
||||||
*/
|
*/
|
||||||
public function setUser(User $user = null)
|
public function setUser(User $user)
|
||||||
{
|
{
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
|
|
||||||
|
@@ -29,7 +29,7 @@ class Order
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\ManyToOne(targetEntity="User")
|
* @ORM\ManyToOne(targetEntity="User")
|
||||||
* @ORM\JoinColumn(name="user_id", referencedColumnName="id")
|
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false)
|
||||||
*
|
*
|
||||||
* @return User
|
* @return User
|
||||||
**/
|
**/
|
||||||
@@ -89,7 +89,7 @@ class Order
|
|||||||
*
|
*
|
||||||
* @return Order
|
* @return Order
|
||||||
*/
|
*/
|
||||||
public function setUser(User $user = null)
|
public function setUser(User $user)
|
||||||
{
|
{
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
|
|
||||||
|
@@ -38,9 +38,12 @@ class OrderElement
|
|||||||
private $recordId;
|
private $recordId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="integer", nullable=true, name="order_master_id")
|
* @ORM\ManyToOne(targetEntity="User")
|
||||||
*/
|
* @ORM\JoinColumn(name="order_master", referencedColumnName="id")
|
||||||
private $orderMasterId;
|
*
|
||||||
|
* @return User
|
||||||
|
**/
|
||||||
|
private $orderMaster;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="boolean", nullable=true)
|
* @ORM\Column(type="boolean", nullable=true)
|
||||||
@@ -64,44 +67,23 @@ class OrderElement
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set order_master_id
|
* @param User $user
|
||||||
*
|
*
|
||||||
* @param integer $orderMasterId
|
* @return $this
|
||||||
* @return OrderElement
|
|
||||||
*/
|
*/
|
||||||
public function setOrderMasterId($orderMasterId)
|
public function setOrderMaster(User $user = null)
|
||||||
{
|
{
|
||||||
$this->orderMasterId = $orderMasterId;
|
$this->orderMaster = $user;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get order_master_id
|
* @return mixed
|
||||||
*
|
|
||||||
* @return integer
|
|
||||||
*/
|
*/
|
||||||
public function getOrderMasterId()
|
public function getOrderMaster()
|
||||||
{
|
{
|
||||||
return $this->orderMasterId;
|
return $this->orderMaster;
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* Returns the username matching to the order_master_id
|
|
||||||
*
|
|
||||||
* @param Application $app
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function getOrderMasterName(Application $app)
|
|
||||||
{
|
|
||||||
if (isset($this->orderMasterId) && null !== $this->orderMasterId) {
|
|
||||||
$user = $app['manipulator.user']->getRepository()->find($this->orderMasterId);
|
|
||||||
|
|
||||||
return $user->getFirstName();
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -15,7 +15,7 @@ use Doctrine\ORM\Mapping as ORM;
|
|||||||
use Gedmo\Mapping\Annotation as Gedmo;
|
use Gedmo\Mapping\Annotation as Gedmo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Table(name="Sessions")
|
* @ORM\Table(name="Sessions", indexes={@ORM\index(name="user_id", columns={"user_id"})})
|
||||||
* @ORM\Entity(repositoryClass="Alchemy\Phrasea\Model\Repositories\SessionRepository")
|
* @ORM\Entity(repositoryClass="Alchemy\Phrasea\Model\Repositories\SessionRepository")
|
||||||
*/
|
*/
|
||||||
class Session
|
class Session
|
||||||
@@ -29,7 +29,7 @@ class Session
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\ManyToOne(targetEntity="User")
|
* @ORM\ManyToOne(targetEntity="User")
|
||||||
* @ORM\JoinColumn(name="user_id", referencedColumnName="id")
|
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false)
|
||||||
*
|
*
|
||||||
* @return User
|
* @return User
|
||||||
**/
|
**/
|
||||||
@@ -121,7 +121,7 @@ class Session
|
|||||||
*
|
*
|
||||||
* @return Session
|
* @return Session
|
||||||
*/
|
*/
|
||||||
public function setUser(User $user = null)
|
public function setUser(User $user)
|
||||||
{
|
{
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
|
|
||||||
|
@@ -41,7 +41,7 @@ class StoryWZ
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\ManyToOne(targetEntity="User")
|
* @ORM\ManyToOne(targetEntity="User")
|
||||||
* @ORM\JoinColumn(name="user_id", referencedColumnName="id")
|
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false)
|
||||||
*
|
*
|
||||||
* @return User
|
* @return User
|
||||||
**/
|
**/
|
||||||
@@ -124,7 +124,7 @@ class StoryWZ
|
|||||||
*
|
*
|
||||||
* @return StoryWZ
|
* @return StoryWZ
|
||||||
*/
|
*/
|
||||||
public function setUser(User $user = null)
|
public function setUser(User $user)
|
||||||
{
|
{
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
|
|
||||||
|
@@ -27,6 +27,7 @@ use Symfony\Component\Translation\TranslatorInterface;
|
|||||||
* indexes={
|
* indexes={
|
||||||
* @ORM\index(name="login", columns={"login"}),
|
* @ORM\index(name="login", columns={"login"}),
|
||||||
* @ORM\index(name="mail", columns={"email"}),
|
* @ORM\index(name="mail", columns={"email"}),
|
||||||
|
* @ORM\index(name="model_of", columns={"model_of"}),
|
||||||
* @ORM\index(name="salted_password", columns={"salted_password"}),
|
* @ORM\index(name="salted_password", columns={"salted_password"}),
|
||||||
* @ORM\index(name="admin", columns={"admin"}),
|
* @ORM\index(name="admin", columns={"admin"}),
|
||||||
* @ORM\index(name="guest", columns={"guest"})
|
* @ORM\index(name="guest", columns={"guest"})
|
||||||
@@ -1030,7 +1031,7 @@ class User
|
|||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getDisplayName(TranslatorInterface $translator = null)
|
public function getDisplayName()
|
||||||
{
|
{
|
||||||
if ($this->isTemplate()) {
|
if ($this->isTemplate()) {
|
||||||
return $this->getLogin();
|
return $this->getLogin();
|
||||||
@@ -1044,6 +1045,10 @@ class User
|
|||||||
return $this->email;
|
return $this->email;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ('' !== trim($this->getLogin())) {
|
||||||
|
return $this->getLogin();
|
||||||
|
}
|
||||||
|
|
||||||
return 'Unnamed user';
|
return 'Unnamed user';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -33,7 +33,7 @@ class UserNotificationSetting
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\ManyToOne(targetEntity="User", inversedBy="notificationSettings")
|
* @ORM\ManyToOne(targetEntity="User", inversedBy="notificationSettings")
|
||||||
* @ORM\JoinColumn(name="user_id", referencedColumnName="id")
|
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false)
|
||||||
**/
|
**/
|
||||||
private $user;
|
private $user;
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@ class UserNotificationSetting
|
|||||||
*
|
*
|
||||||
* @return UserNotificationSetting
|
* @return UserNotificationSetting
|
||||||
*/
|
*/
|
||||||
public function setUser(User $user = null)
|
public function setUser(User $user)
|
||||||
{
|
{
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
|
|
||||||
|
@@ -29,7 +29,7 @@ class UserQuery
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\ManyToOne(targetEntity="User", inversedBy="queries")
|
* @ORM\ManyToOne(targetEntity="User", inversedBy="queries")
|
||||||
* @ORM\JoinColumn(name="user_id", referencedColumnName="id")
|
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false)
|
||||||
**/
|
**/
|
||||||
private $user;
|
private $user;
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ class UserQuery
|
|||||||
*
|
*
|
||||||
* @return UserQuery
|
* @return UserQuery
|
||||||
*/
|
*/
|
||||||
public function setUser(User $user = null)
|
public function setUser(User $user)
|
||||||
{
|
{
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
|
|
||||||
|
@@ -33,7 +33,7 @@ class UserSetting
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\ManyToOne(targetEntity="User", inversedBy="settings")
|
* @ORM\ManyToOne(targetEntity="User", inversedBy="settings")
|
||||||
* @ORM\JoinColumn(name="user_id", referencedColumnName="id")
|
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false)
|
||||||
**/
|
**/
|
||||||
private $user;
|
private $user;
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@ class UserSetting
|
|||||||
*
|
*
|
||||||
* @return UserSetting
|
* @return UserSetting
|
||||||
*/
|
*/
|
||||||
public function setUser(User $user = null)
|
public function setUser(User $user)
|
||||||
{
|
{
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
|
|
||||||
|
@@ -32,7 +32,7 @@ class UsrAuthProvider
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\ManyToOne(targetEntity="User")
|
* @ORM\ManyToOne(targetEntity="User")
|
||||||
* @ORM\JoinColumn(name="user_id", referencedColumnName="id")
|
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false)
|
||||||
*
|
*
|
||||||
* @return User
|
* @return User
|
||||||
**/
|
**/
|
||||||
@@ -75,7 +75,7 @@ class UsrAuthProvider
|
|||||||
*
|
*
|
||||||
* @return usrAuthprovider
|
* @return usrAuthprovider
|
||||||
*/
|
*/
|
||||||
public function setUser(User $user = null)
|
public function setUser(User $user)
|
||||||
{
|
{
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
|
|
||||||
|
@@ -242,10 +242,10 @@ class UsrList
|
|||||||
* @param User $user
|
* @param User $user
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function has(User $user, Application $app)
|
public function has(User $user)
|
||||||
{
|
{
|
||||||
return $this->entries->exists(
|
return $this->entries->exists(
|
||||||
function ($key, $entry) use ($user, $app) {
|
function ($key, $entry) use ($user) {
|
||||||
return $entry->getUser()->getId() === $user->getId();
|
return $entry->getUser()->getId() === $user->getId();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@@ -29,7 +29,7 @@ class UsrListEntry
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\ManyToOne(targetEntity="User")
|
* @ORM\ManyToOne(targetEntity="User")
|
||||||
* @ORM\JoinColumn(name="user_id", referencedColumnName="id")
|
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false)
|
||||||
*
|
*
|
||||||
* @return User
|
* @return User
|
||||||
**/
|
**/
|
||||||
@@ -68,7 +68,7 @@ class UsrListEntry
|
|||||||
*
|
*
|
||||||
* @return UsrListEntry
|
* @return UsrListEntry
|
||||||
*/
|
*/
|
||||||
public function setUser(User $user = null)
|
public function setUser(User $user)
|
||||||
{
|
{
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
|
|
||||||
|
@@ -33,7 +33,7 @@ class UsrListOwner
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\ManyToOne(targetEntity="User")
|
* @ORM\ManyToOne(targetEntity="User")
|
||||||
* @ORM\JoinColumn(name="user_id", referencedColumnName="id")
|
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false)
|
||||||
*
|
*
|
||||||
* @return User
|
* @return User
|
||||||
**/
|
**/
|
||||||
@@ -77,7 +77,7 @@ class UsrListOwner
|
|||||||
*
|
*
|
||||||
* @return UsrListowner
|
* @return UsrListowner
|
||||||
*/
|
*/
|
||||||
public function setUser(User $user = null)
|
public function setUser(User $user)
|
||||||
{
|
{
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
|
|
||||||
|
@@ -82,7 +82,7 @@ class ValidationParticipant
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\ManyToOne(targetEntity="User")
|
* @ORM\ManyToOne(targetEntity="User")
|
||||||
* @ORM\JoinColumn(name="user_id", referencedColumnName="id")
|
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false)
|
||||||
*
|
*
|
||||||
* @return User
|
* @return User
|
||||||
**/
|
**/
|
||||||
@@ -93,7 +93,7 @@ class ValidationParticipant
|
|||||||
*
|
*
|
||||||
* @return AggregateToken
|
* @return AggregateToken
|
||||||
*/
|
*/
|
||||||
public function setUser(User $user = null)
|
public function setUser(User $user)
|
||||||
{
|
{
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
|
|
||||||
|
@@ -30,9 +30,12 @@ class ValidationSession
|
|||||||
private $id;
|
private $id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="integer")
|
* @ORM\ManyToOne(targetEntity="User")
|
||||||
*/
|
* @ORM\JoinColumn(name="initiator_id", referencedColumnName="id", nullable=false)
|
||||||
private $initiator_id;
|
*
|
||||||
|
* @return User
|
||||||
|
**/
|
||||||
|
private $initiator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Gedmo\Timestampable(on="create")
|
* @Gedmo\Timestampable(on="create")
|
||||||
@@ -81,14 +84,13 @@ class ValidationSession
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set initiator_id
|
* @param User $user
|
||||||
*
|
*
|
||||||
* @param integer $initiatorId
|
* @return $this
|
||||||
* @return ValidationSession
|
|
||||||
*/
|
*/
|
||||||
public function setInitiatorId($initiatorId)
|
public function setInitiator(User $user)
|
||||||
{
|
{
|
||||||
$this->initiator_id = $initiatorId;
|
$this->initiator = $user;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
@@ -98,28 +100,19 @@ class ValidationSession
|
|||||||
*
|
*
|
||||||
* @return integer
|
* @return integer
|
||||||
*/
|
*/
|
||||||
public function getInitiatorId()
|
public function getInitiator()
|
||||||
{
|
{
|
||||||
return $this->initiator_id;
|
return $this->initiator_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param User $user
|
||||||
|
*
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
public function isInitiator(User $user)
|
public function isInitiator(User $user)
|
||||||
{
|
{
|
||||||
return $this->getInitiatorId() == $user->getId();
|
return $this->getInitiator()->getId() == $user->getId();
|
||||||
}
|
|
||||||
|
|
||||||
public function setInitiator(User $user)
|
|
||||||
{
|
|
||||||
$this->initiator_id = $user->getId();
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getInitiator(Application $app)
|
|
||||||
{
|
|
||||||
if ($this->initiator_id) {
|
|
||||||
return $app['manipulator.user']->getRepository()->find($this->initiator_id);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -267,10 +260,10 @@ class ValidationSession
|
|||||||
return $app->trans('Vous avez envoye cette demande a %n% utilisateurs', ['%n%' => count($this->getParticipants()) - 1]);
|
return $app->trans('Vous avez envoye cette demande a %n% utilisateurs', ['%n%' => count($this->getParticipants()) - 1]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ($this->getParticipant($user, $app)->getCanSeeOthers()) {
|
if ($this->getParticipant($user)->getCanSeeOthers()) {
|
||||||
return $app->trans('Processus de validation recu de %user% et concernant %n% utilisateurs', ['%user%' => $this->getInitiator($app)->getDisplayName($app['translator']), '%n%' => count($this->getParticipants()) - 1]);
|
return $app->trans('Processus de validation recu de %user% et concernant %n% utilisateurs', ['%user%' => $this->getInitiator($app)->getDisplayName(), '%n%' => count($this->getParticipants()) - 1]);
|
||||||
} else {
|
} else {
|
||||||
return $app->trans('Processus de validation recu de %user%', ['%user%' => $this->getInitiator($app)->getDisplayName($app['translator'])]);
|
return $app->trans('Processus de validation recu de %user%', ['%user%' => $this->getInitiator($app)->getDisplayName()]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -280,7 +273,7 @@ class ValidationSession
|
|||||||
*
|
*
|
||||||
* @return ValidationParticipant
|
* @return ValidationParticipant
|
||||||
*/
|
*/
|
||||||
public function getParticipant(User $user, Application $app)
|
public function getParticipant(User $user)
|
||||||
{
|
{
|
||||||
foreach ($this->getParticipants() as $participant) {
|
foreach ($this->getParticipants() as $participant) {
|
||||||
if ($participant->getUser()->getId() == $user->getId()) {
|
if ($participant->getUser()->getId() == $user->getId()) {
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Phraseanet
|
* This file is part of Phraseanet
|
||||||
*
|
*
|
||||||
* (c) 2005-2013 Alchemy
|
* (c) 2005-2014 Alchemy
|
||||||
*
|
*
|
||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
|
@@ -124,7 +124,7 @@ class BasketRepository extends EntityRepository
|
|||||||
* @param User $user
|
* @param User $user
|
||||||
* @return Basket
|
* @return Basket
|
||||||
*/
|
*/
|
||||||
public function findUserBasket(Application $app, $basket_id, User $user, $requireOwner)
|
public function findUserBasket($basket_id, User $user, $requireOwner)
|
||||||
{
|
{
|
||||||
$dql = 'SELECT b
|
$dql = 'SELECT b
|
||||||
FROM Alchemy\Phrasea\Model\Entities\Basket b
|
FROM Alchemy\Phrasea\Model\Entities\Basket b
|
||||||
@@ -146,7 +146,7 @@ class BasketRepository extends EntityRepository
|
|||||||
|
|
||||||
if ($basket->getValidation() && !$requireOwner) {
|
if ($basket->getValidation() && !$requireOwner) {
|
||||||
try {
|
try {
|
||||||
$basket->getValidation()->getParticipant($user, $app);
|
$basket->getValidation()->getParticipant($user);
|
||||||
$participant = true;
|
$participant = true;
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
|
||||||
|
@@ -46,7 +46,7 @@ class MailInfoNewOrder extends AbstractMail
|
|||||||
throw new LogicException('You must set a user before calling getMessage()');
|
throw new LogicException('You must set a user before calling getMessage()');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->app->trans('%user% has ordered documents', ['%user%' => $this->user->getDisplayName($this->app['translator'])]);
|
return $this->app->trans('%user% has ordered documents', ['%user%' => $this->user->getDisplayName()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -62,7 +62,7 @@ class MailInfoOrderCancelled extends AbstractMail
|
|||||||
}
|
}
|
||||||
|
|
||||||
return $this->app->trans('%user% a refuse %quantity% elements de votre commande', [
|
return $this->app->trans('%user% a refuse %quantity% elements de votre commande', [
|
||||||
'%user%' => $this->deliverer->getDisplayName($this->app['translator']),
|
'%user%' => $this->deliverer->getDisplayName(),
|
||||||
'%quantity%' => $this->quantity,
|
'%quantity%' => $this->quantity,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@@ -63,7 +63,7 @@ class MailInfoOrderDelivered extends AbstractMail
|
|||||||
throw new LogicException('You must set a deliverer before calling getMessage');
|
throw new LogicException('You must set a deliverer before calling getMessage');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->app->trans('%user% vous a delivre votre commande, consultez la en ligne a l\'adresse suivante', ['%user%' => $this->deliverer->getDisplayName($this->app['translator'])]);
|
return $this->app->trans('%user% vous a delivre votre commande, consultez la en ligne a l\'adresse suivante', ['%user%' => $this->deliverer->getDisplayName()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -62,7 +62,7 @@ class MailInfoPushReceived extends AbstractMailWithLink
|
|||||||
}
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
$this->app->trans('You just received a push containing %quantity% documents from %user%', ['%quantity%' => count($this->basket->getElements()), '%user%' => $this->pusher->getDisplayName($this->app['translator'])])
|
$this->app->trans('You just received a push containing %quantity% documents from %user%', ['%quantity%' => count($this->basket->getElements()), '%user%' => $this->pusher->getDisplayName()])
|
||||||
. "\n" . $this->message;
|
. "\n" . $this->message;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -54,7 +54,7 @@ class MailInfoValidationDone extends AbstractMailWithLink
|
|||||||
}
|
}
|
||||||
|
|
||||||
return $this->app->trans('push::mail:: Rapport de validation de %user% pour %title%', [
|
return $this->app->trans('push::mail:: Rapport de validation de %user% pour %title%', [
|
||||||
'%user%' => $this->user->getDisplayName($this->app['translator']),
|
'%user%' => $this->user->getDisplayName(),
|
||||||
'%title%' => $this->title,
|
'%title%' => $this->title,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@@ -69,7 +69,7 @@ class MailInfoValidationDone extends AbstractMailWithLink
|
|||||||
}
|
}
|
||||||
|
|
||||||
return $this->app->trans('%user% has just sent its validation report, you can now see it', [
|
return $this->app->trans('%user% has just sent its validation report, you can now see it', [
|
||||||
'%user%' => $this->user->getDisplayName($this->app['translator']),
|
'%user%' => $this->user->getDisplayName(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -60,7 +60,7 @@ class MailInfoValidationRequest extends AbstractMailWithLink
|
|||||||
throw new LogicException('You must set a title before calling getSubject');
|
throw new LogicException('You must set a title before calling getSubject');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->app->trans("Validation request from %user% for '%title%'", ['%user%' => $this->user->getDisplayName($this->app['translator']), '%title%' => $this->title]);
|
return $this->app->trans("Validation request from %user% for '%title%'", ['%user%' => $this->user->getDisplayName(), '%title%' => $this->title]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -1,5 +1,14 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2014 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
namespace Alchemy\Phrasea\Setup\DoctrineMigrations;
|
namespace Alchemy\Phrasea\Setup\DoctrineMigrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
@@ -1,5 +1,14 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2014 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
namespace Alchemy\Phrasea\Setup\DoctrineMigrations;
|
namespace Alchemy\Phrasea\Setup\DoctrineMigrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
@@ -1,5 +1,14 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2014 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
namespace Alchemy\Phrasea\Setup\DoctrineMigrations;
|
namespace Alchemy\Phrasea\Setup\DoctrineMigrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
@@ -1,5 +1,14 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2014 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
namespace Alchemy\Phrasea\Setup\DoctrineMigrations;
|
namespace Alchemy\Phrasea\Setup\DoctrineMigrations;
|
||||||
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Phraseanet
|
* This file is part of Phraseanet
|
||||||
*
|
*
|
||||||
* (c) 2005-2013 Alchemy
|
* (c) 2005-2014 Alchemy
|
||||||
*
|
*
|
||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Phraseanet
|
* This file is part of Phraseanet
|
||||||
*
|
*
|
||||||
* (c) 2005-2013 Alchemy
|
* (c) 2005-2014 Alchemy
|
||||||
*
|
*
|
||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Phraseanet
|
* This file is part of Phraseanet
|
||||||
*
|
*
|
||||||
* (c) 2005-2013 Alchemy
|
* (c) 2005-2014 Alchemy
|
||||||
*
|
*
|
||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
|
@@ -68,7 +68,7 @@ class UserProvider implements ControlProviderInterface
|
|||||||
|
|
||||||
foreach ($users as $user) {
|
foreach ($users as $user) {
|
||||||
$results->add(
|
$results->add(
|
||||||
new Term($user->getDisplayName($this->app['translator']), '', $this, $user->getId())
|
new Term($user->getDisplayName(), '', $this, $user->getId())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -98,7 +98,7 @@ class UserProvider implements ControlProviderInterface
|
|||||||
throw new \Exception('User unknown');
|
throw new \Exception('User unknown');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $user->getDisplayName($this->app['translator']);
|
return $user->getDisplayName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -1363,7 +1363,7 @@ class API_V1_adapter extends API_V1_Abstract
|
|||||||
$choices[] = [
|
$choices[] = [
|
||||||
'validation_user' => [
|
'validation_user' => [
|
||||||
'usr_id' => $user->getId(),
|
'usr_id' => $user->getId(),
|
||||||
'usr_name' => $user->getDisplayName($this->app['translator']),
|
'usr_name' => $user->getDisplayName(),
|
||||||
'confirmed' => $participant->getIsConfirmed(),
|
'confirmed' => $participant->getIsConfirmed(),
|
||||||
'can_agree' => $participant->getCanAgree(),
|
'can_agree' => $participant->getCanAgree(),
|
||||||
'can_see_others' => $participant->getCanSeeOthers(),
|
'can_see_others' => $participant->getCanSeeOthers(),
|
||||||
@@ -1778,7 +1778,7 @@ class API_V1_adapter extends API_V1_Abstract
|
|||||||
'created_on' => $basket->getCreated()->format(DATE_ATOM),
|
'created_on' => $basket->getCreated()->format(DATE_ATOM),
|
||||||
'description' => (string) $basket->getDescription(),
|
'description' => (string) $basket->getDescription(),
|
||||||
'name' => $basket->getName(),
|
'name' => $basket->getName(),
|
||||||
'pusher_usr_id' => $basket->getPusherId(),
|
'pusher_usr_id' => $basket->getPusher()->getId(),
|
||||||
'updated_on' => $basket->getUpdated()->format(DATE_ATOM),
|
'updated_on' => $basket->getUpdated()->format(DATE_ATOM),
|
||||||
'unread' => !$basket->getIsRead(),
|
'unread' => !$basket->getIsRead(),
|
||||||
'validation_basket' => !!$basket->getValidation()
|
'validation_basket' => !!$basket->getValidation()
|
||||||
@@ -1793,7 +1793,7 @@ class API_V1_adapter extends API_V1_Abstract
|
|||||||
|
|
||||||
$users[] = [
|
$users[] = [
|
||||||
'usr_id' => $user->getId(),
|
'usr_id' => $user->getId(),
|
||||||
'usr_name' => $user->getDisplayName($this->app['translator']),
|
'usr_name' => $user->getDisplayName(),
|
||||||
'confirmed' => $participant->getIsConfirmed(),
|
'confirmed' => $participant->getIsConfirmed(),
|
||||||
'can_agree' => $participant->getCanAgree(),
|
'can_agree' => $participant->getCanAgree(),
|
||||||
'can_see_others' => $participant->getCanSeeOthers(),
|
'can_see_others' => $participant->getCanSeeOthers(),
|
||||||
@@ -1812,7 +1812,7 @@ class API_V1_adapter extends API_V1_Abstract
|
|||||||
'validation_users' => $users,
|
'validation_users' => $users,
|
||||||
'expires_on' => $expires_on_atom,
|
'expires_on' => $expires_on_atom,
|
||||||
'validation_infos' => $basket->getValidation()->getValidationString($this->app, $this->app['authentication']->getUser()),
|
'validation_infos' => $basket->getValidation()->getValidationString($this->app, $this->app['authentication']->getUser()),
|
||||||
'validation_confirmed' => $basket->getValidation()->getParticipant($this->app['authentication']->getUser(), $this->app)->getIsConfirmed(),
|
'validation_confirmed' => $basket->getValidation()->getParticipant($this->app['authentication']->getUser())->getIsConfirmed(),
|
||||||
'validation_initiator' => $basket->getValidation()->isInitiator($this->app['authentication']->getUser()),
|
'validation_initiator' => $basket->getValidation()->isInitiator($this->app['authentication']->getUser()),
|
||||||
], $ret
|
], $ret
|
||||||
);
|
);
|
||||||
|
@@ -50,7 +50,7 @@ class eventsmanager_notify_autoregister extends eventsmanager_notifyAbstract
|
|||||||
$mailColl = [];
|
$mailColl = [];
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$rs = $this->app['phraseanet.native-query']->getAdminsOfBases(array_keys($base_ids));
|
$rs = $this->app['EM.native-query']->getAdminsOfBases(array_keys($base_ids));
|
||||||
|
|
||||||
foreach ($rs as $row) {
|
foreach ($rs as $row) {
|
||||||
$user = $row[0];
|
$user = $row[0];
|
||||||
@@ -129,7 +129,7 @@ class eventsmanager_notify_autoregister extends eventsmanager_notifyAbstract
|
|||||||
}
|
}
|
||||||
|
|
||||||
$ret = [
|
$ret = [
|
||||||
'text' => $this->app->trans('%user% s\'est enregistre sur une ou plusieurs %before_link% scollections %after_link%', ['%user%' => $user->getDisplayName($this->app['translator']), '%before_link%' => '<a href="/admin/?section=users" target="_blank">', '%after_link%' => '</a>'])
|
'text' => $this->app->trans('%user% s\'est enregistre sur une ou plusieurs %before_link% scollections %after_link%', ['%user%' => $user->getDisplayName(), '%before_link%' => '<a href="/admin/?section=users" target="_blank">', '%after_link%' => '</a>'])
|
||||||
, 'class' => ''
|
, 'class' => ''
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@@ -140,7 +140,7 @@ class eventsmanager_notify_order extends eventsmanager_notifyAbstract
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$sender = $user->getDisplayName($this->app['translator']);
|
$sender = $user->getDisplayName();
|
||||||
|
|
||||||
$ret = [
|
$ret = [
|
||||||
'text' => $this->app->trans('%user% a passe une %opening_link% commande %end_link%', [
|
'text' => $this->app->trans('%user% a passe une %opening_link% commande %end_link%', [
|
||||||
|
@@ -148,12 +148,12 @@ class eventsmanager_notify_orderdeliver extends eventsmanager_notifyAbstract
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$sender = $user->getDisplayName($this->app['translator']);
|
$sender = $user->getDisplayName();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$repository = $this->app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket');
|
$repository = $this->app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket');
|
||||||
|
|
||||||
$basket = $repository->findUserBasket($this->app, $ssel_id, $this->app['authentication']->getUser(), false);
|
$basket = $repository->findUserBasket($ssel_id, $this->app['authentication']->getUser(), false);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
@@ -111,7 +111,7 @@ class eventsmanager_notify_ordernotdelivered extends eventsmanager_notifyAbstrac
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$sender = $user->getDisplayName($this->app['translator']);
|
$sender = $user->getDisplayName();
|
||||||
|
|
||||||
$ret = [
|
$ret = [
|
||||||
'text' => $this->app->trans('%user% a refuse la livraison de %quantity% document(s) pour votre commande', ['%user%' => $sender, '%quantity%' => $n])
|
'text' => $this->app->trans('%user% a refuse la livraison de %quantity% document(s) pour votre commande', ['%user%' => $sender, '%quantity%' => $n])
|
||||||
|
@@ -123,7 +123,7 @@ class eventsmanager_notify_push extends eventsmanager_notifyAbstract
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$sender = $user->getDisplayName($this->app['translator']);
|
$sender = $user->getDisplayName();
|
||||||
|
|
||||||
$ret = [
|
$ret = [
|
||||||
'text' => $this->app->trans('%user% vous a envoye un %before_link% panier %after_link%', ['%user%' => $sender, '%before_link%' => '<a href="#" onclick="openPreview(\'BASK\',1,\''
|
'text' => $this->app->trans('%user% vous a envoye un %before_link% panier %after_link%', ['%user%' => $sender, '%before_link%' => '<a href="#" onclick="openPreview(\'BASK\',1,\''
|
||||||
|
@@ -53,7 +53,7 @@ class eventsmanager_notify_register extends eventsmanager_notifyAbstract
|
|||||||
$mailColl = [];
|
$mailColl = [];
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$rs = $this->app['phraseanet.native-query']->getAdminsOfBases(array_keys($base_ids));
|
$rs = $this->app['EM.native-query']->getAdminsOfBases(array_keys($base_ids));
|
||||||
|
|
||||||
foreach ($rs as $row) {
|
foreach ($rs as $row) {
|
||||||
$user = $row[0];
|
$user = $row[0];
|
||||||
@@ -141,7 +141,7 @@ class eventsmanager_notify_register extends eventsmanager_notifyAbstract
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$sender = $user->getDisplayName($this->app['translator']);
|
$sender = $user->getDisplayName();
|
||||||
|
|
||||||
$ret = [
|
$ret = [
|
||||||
'text' => $this->app->trans('%user% demande votre approbation sur une ou plusieurs %before_link% collections %after_link%', ['%user%' => $sender, '%before_link%' => '<a href="' . $this->app->url('admin', ['section' => 'registrations']) . '" target="_blank">', '%after_link%' => '</a>'])
|
'text' => $this->app->trans('%user% demande votre approbation sur une ou plusieurs %before_link% collections %after_link%', ['%user%' => $sender, '%before_link%' => '<a href="' . $this->app->url('admin', ['section' => 'registrations']) . '" target="_blank">', '%after_link%' => '</a>'])
|
||||||
|
@@ -74,7 +74,7 @@ class eventsmanager_notify_uploadquarantine extends eventsmanager_notifyAbstract
|
|||||||
//Sender
|
//Sender
|
||||||
if (null !== $user = $lazaretFile->getSession()->getUser()) {
|
if (null !== $user = $lazaretFile->getSession()->getUser()) {
|
||||||
$sender = $domXML->createElement('sender');
|
$sender = $domXML->createElement('sender');
|
||||||
$sender->appendChild($domXML->createTextNode($user->getDisplayName($this->app['translator'])));
|
$sender->appendChild($domXML->createTextNode($user->getDisplayName()));
|
||||||
$root->appendChild($sender);
|
$root->appendChild($sender);
|
||||||
|
|
||||||
$this->notifyUser($user, $datas);
|
$this->notifyUser($user, $datas);
|
||||||
|
@@ -141,7 +141,7 @@ class eventsmanager_notify_validate extends eventsmanager_notifyAbstract
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$sender = $user->getDisplayName($this->app['translator']);
|
$sender = $user->getDisplayName();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$basket = $this->app['converter.basket']->convert($ssel_id);
|
$basket = $this->app['converter.basket']->convert($ssel_id);
|
||||||
|
@@ -135,12 +135,12 @@ class eventsmanager_notify_validationdone extends eventsmanager_notifyAbstract
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$sender = $registered_user->getDisplayName($this->app['translator']);
|
$sender = $registered_user->getDisplayName();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$repository = $this->app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket');
|
$repository = $this->app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket');
|
||||||
|
|
||||||
$basket = $repository->findUserBasket($this->app, $ssel_id, $this->app['authentication']->getUser(), false);
|
$basket = $repository->findUserBasket($ssel_id, $this->app['authentication']->getUser(), false);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
@@ -140,7 +140,7 @@ class eventsmanager_notify_validationreminder extends eventsmanager_notifyAbstra
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$sender = $user->getDisplayName($this->app['translator']);
|
$sender = $user->getDisplayName();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$basket = $this->app['converter.basket']->convert($ssel_id);
|
$basket = $this->app['converter.basket']->convert($ssel_id);
|
||||||
|
@@ -50,7 +50,7 @@ class module_console_checkExtension extends Command
|
|||||||
$output->writeln(
|
$output->writeln(
|
||||||
sprintf(
|
sprintf(
|
||||||
"\nWill do the check with user <info>%s</info> (%s)\n"
|
"\nWill do the check with user <info>%s</info> (%s)\n"
|
||||||
, $TestUser->getDisplayName($this->container['translator'])
|
, $TestUser->getDisplayName()
|
||||||
, $TestUser->getEmail()
|
, $TestUser->getEmail()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@@ -295,7 +295,7 @@ class module_report_activity extends module_report
|
|||||||
$rs = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
$rs = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||||
$stmt->closeCursor();
|
$stmt->closeCursor();
|
||||||
|
|
||||||
$login = $this->app['manipulator.user']->getRepository()->find($usr)->getDisplayName($this->app['translator']);
|
$login = $this->app['manipulator.user']->getRepository()->find($usr)->getDisplayName();
|
||||||
|
|
||||||
$this->setChamp($rs);
|
$this->setChamp($rs);
|
||||||
|
|
||||||
|
@@ -78,7 +78,7 @@ class module_report_add extends module_report
|
|||||||
$caption = $value;
|
$caption = $value;
|
||||||
if ($field == "getter") {
|
if ($field == "getter") {
|
||||||
if (null !== $user = $this->app['manipulator.user']->getRepository()->find($value)) {
|
if (null !== $user = $this->app['manipulator.user']->getRepository()->find($value)) {
|
||||||
$caption = $user->getDisplayName($this->app['translator']);
|
$caption = $user->getDisplayName();
|
||||||
}
|
}
|
||||||
} elseif ($field == 'date')
|
} elseif ($field == 'date')
|
||||||
$caption = $this->app['date-formatter']->getPrettyString(new DateTime($value));
|
$caption = $this->app['date-formatter']->getPrettyString(new DateTime($value));
|
||||||
|
@@ -78,7 +78,7 @@ class module_report_edit extends module_report
|
|||||||
$caption = $value;
|
$caption = $value;
|
||||||
if ($field == "getter") {
|
if ($field == "getter") {
|
||||||
if (null !== $user = $this->app['manipulator.user']->getRepository()->find($value)) {
|
if (null !== $user = $this->app['manipulator.user']->getRepository()->find($value)) {
|
||||||
$caption = $user->getDisplayName($this->app['translator']);
|
$caption = $user->getDisplayName();
|
||||||
}
|
}
|
||||||
} elseif ($field == 'date') {
|
} elseif ($field == 'date') {
|
||||||
$caption = $this->app['date-formatter']->getPrettyString(new DateTime($value));
|
$caption = $this->app['date-formatter']->getPrettyString(new DateTime($value));
|
||||||
|
@@ -79,7 +79,7 @@ class module_report_push extends module_report
|
|||||||
$caption = $value;
|
$caption = $value;
|
||||||
if ($field == "getter") {
|
if ($field == "getter") {
|
||||||
if (null !== $user = $this->app['manipulator.user']->getRepository()->find($value)) {
|
if (null !== $user = $this->app['manipulator.user']->getRepository()->find($value)) {
|
||||||
$caption = $user->getDisplayName($this->app['translator']);
|
$caption = $user->getDisplayName();
|
||||||
}
|
}
|
||||||
} elseif ($field == 'date') {
|
} elseif ($field == 'date') {
|
||||||
$caption = $this->app['date-formatter']->getPrettyString(new DateTime($value));
|
$caption = $this->app['date-formatter']->getPrettyString(new DateTime($value));
|
||||||
|
@@ -79,7 +79,7 @@ class module_report_sent extends module_report
|
|||||||
$caption = $value;
|
$caption = $value;
|
||||||
if ($field == "getter") {
|
if ($field == "getter") {
|
||||||
if (null !== $user = $this->app['manipulator.user']->getRepository()->find($value)) {
|
if (null !== $user = $this->app['manipulator.user']->getRepository()->find($value)) {
|
||||||
$caption = $user->getDisplayName($this->app['translator']);
|
$caption = $user->getDisplayName();
|
||||||
}
|
}
|
||||||
} elseif ($field == 'date') {
|
} elseif ($field == 'date') {
|
||||||
$caption = $this->app['date-formatter']->getPrettyString(new DateTime($value));
|
$caption = $this->app['date-formatter']->getPrettyString(new DateTime($value));
|
||||||
|
@@ -79,7 +79,7 @@ class module_report_validate extends module_report
|
|||||||
$caption = $value;
|
$caption = $value;
|
||||||
if ($field == "getter") {
|
if ($field == "getter") {
|
||||||
if (null !== $user = $this->app['manipulator.user']->getRepository()->find($value)) {
|
if (null !== $user = $this->app['manipulator.user']->getRepository()->find($value)) {
|
||||||
$caption = $user->getDisplayName($this->app['translator']);
|
$caption = $user->getDisplayName();
|
||||||
}
|
}
|
||||||
} elseif ($field == 'date') {
|
} elseif ($field == 'date') {
|
||||||
$caption = $this->app['date-formatter']->getPrettyString(new DateTime($value));
|
$caption = $this->app['date-formatter']->getPrettyString(new DateTime($value));
|
||||||
|
@@ -99,7 +99,7 @@ class patch_320alpha4b implements patchInterface
|
|||||||
|
|
||||||
$entry = new FeedEntry();
|
$entry = new FeedEntry();
|
||||||
$entry->setAuthorEmail($user->getEmail());
|
$entry->setAuthorEmail($user->getEmail());
|
||||||
$entry->setAuthorName($user->getDisplayName($app['translator']));
|
$entry->setAuthorName($user->getDisplayName());
|
||||||
$entry->setFeed($feed);
|
$entry->setFeed($feed);
|
||||||
$entry->setPublisher($publishers->first());
|
$entry->setPublisher($publishers->first());
|
||||||
$entry->setTitle($row['name']);
|
$entry->setTitle($row['name']);
|
||||||
@@ -187,11 +187,11 @@ class patch_320alpha4b implements patchInterface
|
|||||||
|
|
||||||
if ( ! array_key_exists($user_key, self::$feeds) || ! isset(self::$feeds[$user_key][$feed_key])) {
|
if ( ! array_key_exists($user_key, self::$feeds) || ! isset(self::$feeds[$user_key][$feed_key])) {
|
||||||
if ($homelink == '1')
|
if ($homelink == '1')
|
||||||
$title = $user->getDisplayName($app['translator']) . ' - ' . 'homelink Feed';
|
$title = $user->getDisplayName() . ' - ' . 'homelink Feed';
|
||||||
elseif ($pub_restrict == '1')
|
elseif ($pub_restrict == '1')
|
||||||
$title = $user->getDisplayName($app['translator']) . ' - ' . 'private Feed';
|
$title = $user->getDisplayName() . ' - ' . 'private Feed';
|
||||||
else
|
else
|
||||||
$title = $user->getDisplayName($app['translator']) . ' - ' . 'public Feed';
|
$title = $user->getDisplayName() . ' - ' . 'public Feed';
|
||||||
|
|
||||||
$feed = new Feed();
|
$feed = new Feed();
|
||||||
$publisher = new FeedPublisher();
|
$publisher = new FeedPublisher();
|
||||||
|
@@ -54,7 +54,7 @@ class record_orderElement extends record_adapter
|
|||||||
if ($this->order_master_id) {
|
if ($this->order_master_id) {
|
||||||
$user = $this->app['manipulator.user']->getRepository()->find($this->order_master_id);
|
$user = $this->app['manipulator.user']->getRepository()->find($this->order_master_id);
|
||||||
|
|
||||||
return $user->getDisplayName($this->app['translator']);
|
return $user->getDisplayName();
|
||||||
}
|
}
|
||||||
|
|
||||||
return '';
|
return '';
|
||||||
|
@@ -57,7 +57,7 @@ class set_export extends set_abstract
|
|||||||
$repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket');
|
$repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket');
|
||||||
|
|
||||||
/* @var $repository Alchemy\Phrasea\Model\Repositories\BasketRepository */
|
/* @var $repository Alchemy\Phrasea\Model\Repositories\BasketRepository */
|
||||||
$Basket = $repository->findUserBasket($this->app, $sstid, $app['authentication']->getUser(), false);
|
$Basket = $repository->findUserBasket($sstid, $app['authentication']->getUser(), false);
|
||||||
$this->exportName = str_replace([' ', '\\', '/'], '_', $Basket->getName()) . "_" . date("Y-n-d");
|
$this->exportName = str_replace([' ', '\\', '/'], '_', $Basket->getName()) . "_" . date("Y-n-d");
|
||||||
|
|
||||||
foreach ($Basket->getElements() as $basket_element) {
|
foreach ($Basket->getElements() as $basket_element) {
|
||||||
|
@@ -39,7 +39,7 @@ class set_exportftp extends set_export
|
|||||||
|
|
||||||
$text_mail_receiver = "Bonjour,\n"
|
$text_mail_receiver = "Bonjour,\n"
|
||||||
. "L'utilisateur "
|
. "L'utilisateur "
|
||||||
. $this->app['authentication']->getUser()->getDisplayName($this->app['translator']) . " (login : " . $this->app['authentication']->getUser()->getLogin() . ") "
|
. $this->app['authentication']->getUser()->getDisplayName() . " (login : " . $this->app['authentication']->getUser()->getLogin() . ") "
|
||||||
. "a fait un transfert FTP sur le serveur ayant comme adresse \""
|
. "a fait un transfert FTP sur le serveur ayant comme adresse \""
|
||||||
. $host . "\" avec le login \"" . $login . "\" "
|
. $host . "\" avec le login \"" . $login . "\" "
|
||||||
. "et pour repertoire de destination \""
|
. "et pour repertoire de destination \""
|
||||||
|
@@ -55,7 +55,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
{% if app['authentication'].getUser() is not none %}
|
{% if app['authentication'].getUser() is not none %}
|
||||||
{% set username = '<b>' ~ app['authentication'].getUser().getDisplayName(app['translator']) ~ '</b>' %}
|
{% set username = '<b>' ~ app['authentication'].getUser().getDisplayName() ~ '</b>' %}
|
||||||
<div id="hello-box" class="span6 offset3">
|
<div id="hello-box" class="span6 offset3">
|
||||||
<p class="login_hello">
|
<p class="login_hello">
|
||||||
{% trans with {'%username%' : username} %}Hello %username%{% endtrans %}
|
{% trans with {'%username%' : username} %}Hello %username%{% endtrans %}
|
||||||
|
@@ -38,7 +38,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if app['authentication'].getUser() is not none %}
|
{% if app['authentication'].getUser() is not none %}
|
||||||
{% set username = '<b>' ~ app['authentication'].getUser().getDisplayName(app['translator']) ~ '</b>' %}
|
{% set username = '<b>' ~ app['authentication'].getUser().getDisplayName() ~ '</b>' %}
|
||||||
<div id="hello-box" class="span6 offset3">
|
<div id="hello-box" class="span6 offset3">
|
||||||
<p class="login_hello">
|
<p class="login_hello">
|
||||||
{% trans with {'%username%' : username} %}Hello %username%{% endtrans %}
|
{% trans with {'%username%' : username} %}Hello %username%{% endtrans %}
|
||||||
|
@@ -36,11 +36,11 @@
|
|||||||
<div id="content" data-role="content">
|
<div id="content" data-role="content">
|
||||||
{{ thumbnail.format100percent(record.get_preview()) }}
|
{{ thumbnail.format100percent(record.get_preview()) }}
|
||||||
{% if basket_element.getBasket().getValidation() %}
|
{% if basket_element.getBasket().getValidation() %}
|
||||||
{% if basket_element.getBasket().getValidation().getParticipant(app['authentication'].getUser(), app).getCanAgree() %}
|
{% if basket_element.getBasket().getValidation().getParticipant(app['authentication'].getUser()).getCanAgree() %}
|
||||||
<fieldset data-role="controlgroup" data-type="horizontal" style="text-align:center;">
|
<fieldset data-role="controlgroup" data-type="horizontal" style="text-align:center;">
|
||||||
<input {% if basket_element.getUserValidationDatas(app['authentication'].getUser(), app).getAgreement() == true%}checked="checked"{% endif %} type="radio" name="radio-view" id="radio-view-yes_{{basket_element.getId()}}" value="yes" />
|
<input {% if basket_element.getUserValidationDatas(app['authentication'].getUser()).getAgreement() == true%}checked="checked"{% endif %} type="radio" name="radio-view" id="radio-view-yes_{{basket_element.getId()}}" value="yes" />
|
||||||
<label class="agreement_radio" style="width:130px;text-align:center;" for="radio-view-yes_{{basket_element.getId()}}">{{ 'validation:: OUI' | trans }}</label>
|
<label class="agreement_radio" style="width:130px;text-align:center;" for="radio-view-yes_{{basket_element.getId()}}">{{ 'validation:: OUI' | trans }}</label>
|
||||||
<input {% if basket_element.getUserValidationDatas(app['authentication'].getUser(), app).getAgreement() == false and basket_element.getUserValidationDatas(app['authentication'].getUser(), app).getAgreement() is not null %}checked="checked"{% endif %} type="radio" name="radio-view" id="radio-view-no_{{basket_element.getId()}}" value="no" />
|
<input {% if basket_element.getUserValidationDatas(app['authentication'].getUser()).getAgreement() == false and basket_element.getUserValidationDatas(app['authentication'].getUser()).getAgreement() is not null %}checked="checked"{% endif %} type="radio" name="radio-view" id="radio-view-no_{{basket_element.getId()}}" value="no" />
|
||||||
<label class="agreement_radio" style="width:130px;text-align:center;" for="radio-view-no_{{basket_element.getId()}}">{{ 'validation:: NON' | trans }}</label>
|
<label class="agreement_radio" style="width:130px;text-align:center;" for="radio-view-no_{{basket_element.getId()}}">{{ 'validation:: NON' | trans }}</label>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
<form action="">
|
<form action="">
|
||||||
<textarea class="note_area"
|
<textarea class="note_area"
|
||||||
id="note_area_{{basket_element.getId()}}"
|
id="note_area_{{basket_element.getId()}}"
|
||||||
{% if basket_element.getUserValidationDatas(app['authentication'].getUser(), app).getNote() == '' %}placeholder="Note"{% endif %}>{{basket_element.getUserValidationDatas(app['authentication'].getUser(), app).getNote()}}</textarea>
|
{% if basket_element.getUserValidationDatas(app['authentication'].getUser()).getNote() == '' %}placeholder="Note"{% endif %}>{{basket_element.getUserValidationDatas(app['authentication'].getUser()).getNote()}}</textarea>
|
||||||
<button type="submit" class="note_area_validate">{{ 'boutton::valider' | trans }}</button>
|
<button type="submit" class="note_area_validate">{{ 'boutton::valider' | trans }}</button>
|
||||||
<input name="sselcont_id" value="{{basket_element.getId()}}" type="hidden"/>
|
<input name="sselcont_id" value="{{basket_element.getId()}}" type="hidden"/>
|
||||||
</form>
|
</form>
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
<img style="vertical-align:middle;"
|
<img style="vertical-align:middle;"
|
||||||
src="/skins/lightbox/{% if validationDatas.getAgreement() == true %}agree.png{% else %}disagree.png{% endif %}" />
|
src="/skins/lightbox/{% if validationDatas.getAgreement() == true %}agree.png{% else %}disagree.png{% endif %}" />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ validationDatas.getParticipant().getUser().getDisplayName(app['translator']) }}
|
{{ validationDatas.getParticipant().getUser().getDisplayName() }}
|
||||||
</h3>
|
</h3>
|
||||||
{% if validationDatas.getNote() != '' %}
|
{% if validationDatas.getNote() != '' %}
|
||||||
<p style="text-align:left;">{{ 'validation:: note' | trans }} : {{ validationDatas.getNote()|nl2br }}</p>
|
<p style="text-align:left;">{{ 'validation:: note' | trans }} : {{ validationDatas.getNote()|nl2br }}</p>
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
{% block javascript %}
|
{% block javascript %}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
{% if basket.getValidation() %}
|
{% if basket.getValidation() %}
|
||||||
var releasable = {% if basket.getValidation().getParticipant(app['authentication'].getUser(), app).isReleasable() %}"{{ 'Do you want to send your report ?' | trans }}"{% else %}false{% endif %}
|
var releasable = {% if basket.getValidation().getParticipant(app['authentication'].getUser()).isReleasable() %}"{{ 'Do you want to send your report ?' | trans }}"{% else %}false{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</script>
|
</script>
|
||||||
<script type="text/javascript" src="{{ path('minifier', { 'f' : 'skins/lightbox/jquery.validator.mobile.js' }) }}"></script>
|
<script type="text/javascript" src="{{ path('minifier', { 'f' : 'skins/lightbox/jquery.validator.mobile.js' }) }}"></script>
|
||||||
@@ -30,8 +30,8 @@
|
|||||||
<ul class="image_set">
|
<ul class="image_set">
|
||||||
{% for basket_element in basket.getElements() %}
|
{% for basket_element in basket.getElements() %}
|
||||||
<li class="image_box" id="sselcontid_{{basket_element.getId()}}">
|
<li class="image_box" id="sselcontid_{{basket_element.getId()}}">
|
||||||
{% if basket_element.getBasket().getValidation() and basket_element.getBasket().getValidation().getParticipant(app['authentication'].getUser(), app).getCanAgree() %}
|
{% if basket_element.getBasket().getValidation() and basket_element.getBasket().getValidation().getParticipant(app['authentication'].getUser()).getCanAgree() %}
|
||||||
<div class="valid_choice valid_choice_{{basket_element.getId()}} {% if basket_element.getUserValidationDatas(app['authentication'].getUser(), app).getAgreement() == true %}agree{% elseif basket_element.getUserValidationDatas(app['authentication'].getUser(), app).getAgreement() == false and basket_element.getUserValidationDatas(app['authentication'].getUser(), app).getAgreement() is not null %}disagree{% endif %}">
|
<div class="valid_choice valid_choice_{{basket_element.getId()}} {% if basket_element.getUserValidationDatas(app['authentication'].getUser()).getAgreement() == true %}agree{% elseif basket_element.getUserValidationDatas(app['authentication'].getUser()).getAgreement() == false and basket_element.getUserValidationDatas(app['authentication'].getUser()).getAgreement() is not null %}disagree{% endif %}">
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{{ path('lightbox_ajax_load_basketelement', { 'sselcont_id' : basket_element.getId() }) }}">
|
<a href="{{ path('lightbox_ajax_load_basketelement', { 'sselcont_id' : basket_element.getId() }) }}">
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div data-role="footer">
|
<div data-role="footer">
|
||||||
{% if basket.getValidation() and basket.getValidation().getParticipant(app['authentication'].getUser(), app).getCanAgree() %}
|
{% if basket.getValidation() and basket.getValidation().getParticipant(app['authentication'].getUser()).getCanAgree() %}
|
||||||
<button class="confirm_report" style="width:100%;" title="{{ 'validation::envoyer mon rapport' | trans }}">
|
<button class="confirm_report" style="width:100%;" title="{{ 'validation::envoyer mon rapport' | trans }}">
|
||||||
{{ 'validation::envoyer mon rapport' | trans }}
|
{{ 'validation::envoyer mon rapport' | trans }}
|
||||||
<img src="/skins/icons/loader1F1E1B.gif" style="visibility:hidden;" class="loader"/>
|
<img src="/skins/icons/loader1F1E1B.gif" style="visibility:hidden;" class="loader"/>
|
||||||
|
@@ -25,7 +25,7 @@
|
|||||||
</a>
|
</a>
|
||||||
{% if application.get_creator() is not none %}
|
{% if application.get_creator() is not none %}
|
||||||
<small>
|
<small>
|
||||||
{% set user_name = application.get_creator().getDisplayName(app['translator']) %}
|
{% set user_name = application.get_creator().getDisplayName() %}
|
||||||
{% trans with {'%user_name%' : user_name} %}par %user_name%{% endtrans %}
|
{% trans with {'%user_name%' : user_name} %}par %user_name%{% endtrans %}
|
||||||
</small>
|
</small>
|
||||||
{% endif%}
|
{% endif%}
|
||||||
|
@@ -44,7 +44,7 @@
|
|||||||
<li>
|
<li>
|
||||||
<label for="adm_{{ user.getId() }}" class="checkbox">
|
<label for="adm_{{ user.getId() }}" class="checkbox">
|
||||||
<input name="admins[]" type="checkbox" value="{{ user.getId() }}" id="adm_{{ user.getId() }}" checked />
|
<input name="admins[]" type="checkbox" value="{{ user.getId() }}" id="adm_{{ user.getId() }}" checked />
|
||||||
{{ user.getDisplayName(app['translator']) }}
|
{{ user.getDisplayName() }}
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
<td colspan="2" style="height: 10px;"></td>
|
<td colspan="2" style="height: 10px;"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"><strong>{{ 'admin::compte-utilisateur nom' | trans }} : </strong>{{ user.getDisplayName(app['translator']) }}</td>
|
<td colspan="2"><strong>{{ 'admin::compte-utilisateur nom' | trans }} : </strong>{{ user.getDisplayName() }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"><strong>{{ 'admin::compte-utilisateur societe' | trans }} : </strong>{{ user.getCompany() }}</td>
|
<td colspan="2"><strong>{{ 'admin::compte-utilisateur societe' | trans }} : </strong>{{ user.getCompany() }}</td>
|
||||||
@@ -102,9 +102,9 @@
|
|||||||
<tr title="{{ _self.tooltip_connected_users(row) | e }}" class="{% if loop.index is odd %}odd{% else %}even{% endif %} usrTips" id="TREXP_{{ row.getId()}}">
|
<tr title="{{ _self.tooltip_connected_users(row) | e }}" class="{% if loop.index is odd %}odd{% else %}even{% endif %} usrTips" id="TREXP_{{ row.getId()}}">
|
||||||
|
|
||||||
{% if row.getId() == app['session'].get('session_id') %}
|
{% if row.getId() == app['session'].get('session_id') %}
|
||||||
<td style="color:#ff0000"><i>{{ row.getUser().getDisplayName(app['translator']) }}</i></td>
|
<td style="color:#ff0000"><i>{{ row.getUser().getDisplayName() }}</i></td>
|
||||||
{% else %}
|
{% else %}
|
||||||
<td>{{ row.getUser().getDisplayName(app['translator']) }}</td>
|
<td>{{ row.getUser().getDisplayName() }}</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
|
@@ -118,7 +118,7 @@
|
|||||||
{{ 'Reglages:: reglages d inscitpition automatisee' | trans }}
|
{{ 'Reglages:: reglages d inscitpition automatisee' | trans }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% set display_name = main_user.getDisplayName(app['translator']) %}
|
{% set display_name = main_user.getDisplayName() %}
|
||||||
{% trans with {'%display_name%' : display_name} %}Edition des droits de %display_name%{% endtrans %}
|
{% trans with {'%display_name%' : display_name} %}Edition des droits de %display_name%{% endtrans %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
|
@@ -143,7 +143,7 @@
|
|||||||
{{ publisher.getUser().getId() }}
|
{{ publisher.getUser().getId() }}
|
||||||
</td>
|
</td>
|
||||||
<td valign="center" align="left">
|
<td valign="center" align="left">
|
||||||
{{ publisher.getUser().getDisplayName(app['translator']) }}
|
{{ publisher.getUser().getDisplayName() }}
|
||||||
</td>
|
</td>
|
||||||
<td valign="center" align="left">
|
<td valign="center" align="left">
|
||||||
{{ publisher.getUser().getEmail() }}
|
{{ publisher.getUser().getEmail() }}
|
||||||
|
@@ -55,7 +55,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
{% if user is not none %}
|
{% if user is not none %}
|
||||||
{% set username = '<b>' ~ app['authentication'].getUser().getDisplayName(app['translator']) ~ '</b>' %}
|
{% set username = '<b>' ~ app['authentication'].getUser().getDisplayName() ~ '</b>' %}
|
||||||
<div id="hello-box" class="span6 offset3">
|
<div id="hello-box" class="span6 offset3">
|
||||||
<p class="login_hello">
|
<p class="login_hello">
|
||||||
{% trans with {'%username%' : username} %}Hello %username%{% endtrans %}
|
{% trans with {'%username%' : username} %}Hello %username%{% endtrans %}
|
||||||
|
@@ -38,7 +38,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if user is not none %}
|
{% if user is not none %}
|
||||||
{% set username = '<b>' ~ app['authentication'].getUser().getDisplayName(app['translator']) ~ '</b>' %}
|
{% set username = '<b>' ~ app['authentication'].getUser().getDisplayName() ~ '</b>' %}
|
||||||
<div id="hello-box" class="span6 offset3">
|
<div id="hello-box" class="span6 offset3">
|
||||||
<p class="login_hello">
|
<p class="login_hello">
|
||||||
{% trans with {'%username%' : username} %}Hello %username%{% endtrans %}
|
{% trans with {'%username%' : username} %}Hello %username%{% endtrans %}
|
||||||
|
@@ -59,8 +59,8 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="divexterne" style="height:270px;overflow-x:hidden;overflow-y:auto;position:relative">
|
<div class="divexterne" style="height:270px;overflow-x:hidden;overflow-y:auto;position:relative">
|
||||||
{% if selected_basket is not none and selected_basket.getPusher(app) is not none %}
|
{% if selected_basket is not none and selected_basket.getPusher() is not none %}
|
||||||
{% set pusher_name = selected_basket.getPusher(app).getDisplayName(app['translator']) %}
|
{% set pusher_name = selected_basket.getPusher().getDisplayName() %}
|
||||||
<div class="txtPushClient">
|
<div class="txtPushClient">
|
||||||
{% trans with {'%pusher_name%' : pusher_name} %}paniers:: panier emis par %pusher_name%{% endtrans %}
|
{% trans with {'%pusher_name%' : pusher_name} %}paniers:: panier emis par %pusher_name%{% endtrans %}
|
||||||
</div>
|
</div>
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<ul style="margin:10px 0 0 20px;width:200px;">
|
<ul style="margin:10px 0 0 20px;width:200px;">
|
||||||
{% for validation_data in basket_element.getValidationDatas() %}
|
{% for validation_data in basket_element.getValidationDatas() %}
|
||||||
{% if basket.getValidation().getParticipant(app['authentication'].getUser(), app).getCanSeeOthers() or validation_data.getParticipant().getUser() == app['authentication'].getUser() %}
|
{% if basket.getValidation().getParticipant(app['authentication'].getUser()).getCanSeeOthers() or validation_data.getParticipant().getUser() == app['authentication'].getUser() %}
|
||||||
{% if validation_data.getAgreement() == true %}
|
{% if validation_data.getAgreement() == true %}
|
||||||
{% set classuser = 'agree' %}
|
{% set classuser = 'agree' %}
|
||||||
{% elseif validation_data.getAgreement() is null %}
|
{% elseif validation_data.getAgreement() is null %}
|
||||||
@@ -27,19 +27,19 @@
|
|||||||
{% set classuser = 'disagree' %}
|
{% set classuser = 'disagree' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% set participant = validation_data.getParticipant().getUser() %}
|
{% set participant = validation_data.getParticipant().getUser() %}
|
||||||
<li class="{% if participant.getId() == app['authentication'].getUser().getId() %}me{% endif %} {{classuser}} userchoice">{{participant.getDisplayName(app['translator'])}}</li>
|
<li class="{% if participant.getId() == app['authentication'].getUser().getId() %}me{% endif %} {{classuser}} userchoice">{{participant.getDisplayName()}}</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if basket_element and basket_element.getBasket().getValidation() and basket.getValidation().getParticipant(app['authentication'].getUser(), app).getCanAgree() %}
|
{% if basket_element and basket_element.getBasket().getValidation() and basket.getValidation().getParticipant(app['authentication'].getUser()).getCanAgree() %}
|
||||||
<div class="left choices">
|
<div class="left choices">
|
||||||
<div style="height:60px;margin-top:15px;">
|
<div style="height:60px;margin-top:15px;">
|
||||||
<table cellspacing="0" cellpadding="0" style="width:230px;">
|
<table cellspacing="0" cellpadding="0" style="width:230px;">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
{% set agreement = basket_element.getUserValidationDatas(app['authentication'].getUser(), app).getAgreement() %}
|
{% set agreement = basket_element.getUserValidationDatas(app['authentication'].getUser()).getAgreement() %}
|
||||||
<div style="width:70px;margin:0px auto 0;" class="ui-corner-all big_box agree_{{basket_element.getId()}} agree {% if agreement is null or agreement == false %}not_decided{% endif %}">
|
<div style="width:70px;margin:0px auto 0;" class="ui-corner-all big_box agree_{{basket_element.getId()}} agree {% if agreement is null or agreement == false %}not_decided{% endif %}">
|
||||||
<img src="/skins/lightbox/agree-bigie6.gif" style="vertical-align:middle;"/><span>{{ 'validation:: OUI' | trans }}</span>
|
<img src="/skins/lightbox/agree-bigie6.gif" style="vertical-align:middle;"/><span>{{ 'validation:: OUI' | trans }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
{% if basket.getValidation() and basket.getValidation().getParticipant(app['authentication'].getUser(), app).getCanAgree() %}
|
{% if basket.getValidation() and basket.getValidation().getParticipant(app['authentication'].getUser()).getCanAgree() %}
|
||||||
<button class="confirm_report" title="{{ 'validation::envoyer mon rapport' | trans }}">
|
<button class="confirm_report" title="{{ 'validation::envoyer mon rapport' | trans }}">
|
||||||
<img src="/skins/lightbox/envoyerie6.gif"/>
|
<img src="/skins/lightbox/envoyerie6.gif"/>
|
||||||
{{ 'validation::envoyer mon rapport' | trans }}
|
{{ 'validation::envoyer mon rapport' | trans }}
|
||||||
|
@@ -54,7 +54,7 @@
|
|||||||
</h2>
|
</h2>
|
||||||
{% if basket.getValidation().isFinished() %}
|
{% if basket.getValidation().isFinished() %}
|
||||||
{{ '(validation) session terminee' | trans }}
|
{{ '(validation) session terminee' | trans }}
|
||||||
{% elseif basket.getValidation().getParticipant(app['authentication'].getUser(), app).getIsConfirmed() %}
|
{% elseif basket.getValidation().getParticipant(app['authentication'].getUser()).getIsConfirmed() %}
|
||||||
{{ '(validation) envoyee' | trans }}
|
{{ '(validation) envoyee' | trans }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ '(validation) a envoyer' | trans }}
|
{{ '(validation) a envoyer' | trans }}
|
||||||
|
@@ -9,9 +9,9 @@
|
|||||||
{% if basket.getValidation() %}
|
{% if basket.getValidation() %}
|
||||||
<div class="agreement">
|
<div class="agreement">
|
||||||
<img src="/skins/lightbox/agree.png"
|
<img src="/skins/lightbox/agree.png"
|
||||||
class="agree_button {%if element.getUserValidationDatas(app['authentication'].getUser(), app).getAgreement() == false or element.getUserValidationDatas(app['authentication'].getUser(), app).getAgreement() is null %}not_decided{%endif%} agree_{{element.getId()}}" />
|
class="agree_button {%if element.getUserValidationDatas(app['authentication'].getUser()).getAgreement() == false or element.getUserValidationDatas(app['authentication'].getUser()).getAgreement() is null %}not_decided{%endif%} agree_{{element.getId()}}" />
|
||||||
<img src="/skins/lightbox/disagree.png"
|
<img src="/skins/lightbox/disagree.png"
|
||||||
class="disagree_button {%if element.getUserValidationDatas(app['authentication'].getUser(), app).getAgreement() == true or element.getUserValidationDatas(app['authentication'].getUser(), app).getAgreement() is null %}not_decided{%endif%} disagree_{{element.getId()}}" />
|
class="disagree_button {%if element.getUserValidationDatas(app['authentication'].getUser()).getAgreement() == true or element.getUserValidationDatas(app['authentication'].getUser()).getAgreement() is null %}not_decided{%endif%} disagree_{{element.getId()}}" />
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{thumbnail.format(element.getRecord(app).get_thumbnail,114,85, '', true, false)}}
|
{{thumbnail.format(element.getRecord(app).get_thumbnail,114,85, '', true, false)}}
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
<div>{{ basket.getValidation().getValidationString(app, app['authentication'].getUser()) }}</div>
|
<div>{{ basket.getValidation().getValidationString(app, app['authentication'].getUser()) }}</div>
|
||||||
<ul>
|
<ul>
|
||||||
{% for choice in basket_element.getValidationDatas() %}
|
{% for choice in basket_element.getValidationDatas() %}
|
||||||
{% if basket.getValidation().getParticipant(app['authentication'].getUser(), app).getCanSeeOthers() or choice.getParticipant().getUser() == app['authentication'].getUser() %}
|
{% if basket.getValidation().getParticipant(app['authentication'].getUser()).getCanSeeOthers() or choice.getParticipant().getUser() == app['authentication'].getUser() %}
|
||||||
{% if choice.getAgreement() == true %}
|
{% if choice.getAgreement() == true %}
|
||||||
{% set classuser = 'agree' %}
|
{% set classuser = 'agree' %}
|
||||||
{% elseif choice.getAgreement() is null %}
|
{% elseif choice.getAgreement() is null %}
|
||||||
@@ -25,17 +25,17 @@
|
|||||||
{% set classuser = 'disagree' %}
|
{% set classuser = 'disagree' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% set participant = choice.getParticipant().getUser() %}
|
{% set participant = choice.getParticipant().getUser() %}
|
||||||
<li class="{% if participant.getId() == app['authentication'].getUser().getId() %}me{% endif %} {{classuser}} userchoice">{{participant.getDisplayName(app['translator'])}}</li>
|
<li class="{% if participant.getId() == app['authentication'].getUser().getId() %}me{% endif %} {{classuser}} userchoice">{{participant.getDisplayName()}}</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="PNB user_infos">
|
<div class="PNB user_infos">
|
||||||
{% if basket_element and basket_element.getBasket().getValidation() and basket.getValidation().getParticipant(app['authentication'].getUser(), app).getCanAgree() %}
|
{% if basket_element and basket_element.getBasket().getValidation() and basket.getValidation().getParticipant(app['authentication'].getUser()).getCanAgree() %}
|
||||||
<div class="PNB choices">
|
<div class="PNB choices">
|
||||||
<div style="height:60px;">
|
<div style="height:60px;">
|
||||||
{% set agreement = basket_element.getUserValidationDatas(app['authentication'].getUser(), app).getAgreement() %}
|
{% set agreement = basket_element.getUserValidationDatas(app['authentication'].getUser()).getAgreement() %}
|
||||||
<div class="ui-corner-all big_box agree_{{basket_element.getId()}} agree {% if agreement is null or agreement == false %}not_decided{% endif %}">
|
<div class="ui-corner-all big_box agree_{{basket_element.getId()}} agree {% if agreement is null or agreement == false %}not_decided{% endif %}">
|
||||||
<img src="/skins/lightbox/agree-big.png"/><span class="title15">{{ 'validation:: OUI' | trans }}</span>
|
<img src="/skins/lightbox/agree-big.png"/><span class="title15">{{ 'validation:: OUI' | trans }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -33,7 +33,7 @@
|
|||||||
{% set imguser = '<img src="/skins/lightbox/disagree.png" />' %}
|
{% set imguser = '<img src="/skins/lightbox/disagree.png" />' %}
|
||||||
{% set styleuser = '' %}
|
{% set styleuser = '' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<b style="{{styleuser}}">{{imguser|raw}} {{validationDatas.getParticipant().getUser().getDisplayName(app['translator'])}}</b>
|
<b style="{{styleuser}}">{{imguser|raw}} {{validationDatas.getParticipant().getUser().getDisplayName()}}</b>
|
||||||
{% if validationDatas.getNote() != '' %}
|
{% if validationDatas.getNote() != '' %}
|
||||||
: {{validationDatas.getNote()|nl2br}}
|
: {{validationDatas.getNote()|nl2br}}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
{% if basket.getValidation() and basket.getValidation().getParticipant(app['authentication'].getUser(), app).getCanAgree() %}
|
{% if basket.getValidation() and basket.getValidation().getParticipant(app['authentication'].getUser()).getCanAgree() %}
|
||||||
<button class="confirm_report" style="width:100%;" title="{{ 'validation::envoyer mon rapport' | trans }}">
|
<button class="confirm_report" style="width:100%;" title="{{ 'validation::envoyer mon rapport' | trans }}">
|
||||||
<img src="/skins/lightbox/envoyer.png"/>
|
<img src="/skins/lightbox/envoyer.png"/>
|
||||||
{{ 'validation::envoyer mon rapport' | trans }}
|
{{ 'validation::envoyer mon rapport' | trans }}
|
||||||
|
@@ -55,7 +55,7 @@
|
|||||||
</h2>
|
</h2>
|
||||||
{% if basket.getValidation().isFinished() %}
|
{% if basket.getValidation().isFinished() %}
|
||||||
{{ '(validation) session terminee' | trans }}
|
{{ '(validation) session terminee' | trans }}
|
||||||
{% elseif basket.getValidation().getParticipant(app['authentication'].getUser(), app).getIsConfirmed() %}
|
{% elseif basket.getValidation().getParticipant(app['authentication'].getUser()).getIsConfirmed() %}
|
||||||
{{ '(validation) envoyee' | trans }}
|
{{ '(validation) envoyee' | trans }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ '(validation) a envoyer' | trans }}
|
{{ '(validation) a envoyer' | trans }}
|
||||||
|
@@ -10,9 +10,9 @@
|
|||||||
{% if basket.getValidation() %}
|
{% if basket.getValidation() %}
|
||||||
<div class="agreement">
|
<div class="agreement">
|
||||||
<img src="/skins/lightbox/agree.png"
|
<img src="/skins/lightbox/agree.png"
|
||||||
class="agree_button {%if element.getUserValidationDatas(app['authentication'].getUser(), app).getAgreement() == false or element.getUserValidationDatas(app['authentication'].getUser(), app).getAgreement() is null %}not_decided{%endif%} agree_{{element.getId()}}" />
|
class="agree_button {%if element.getUserValidationDatas(app['authentication'].getUser()).getAgreement() == false or element.getUserValidationDatas(app['authentication'].getUser()).getAgreement() is null %}not_decided{%endif%} agree_{{element.getId()}}" />
|
||||||
<img src="/skins/lightbox/disagree.png"
|
<img src="/skins/lightbox/disagree.png"
|
||||||
class="disagree_button {%if element.getUserValidationDatas(app['authentication'].getUser(), app).getAgreement() == true or element.getUserValidationDatas(app['authentication'].getUser(), app).getAgreement() is null %}not_decided{%endif%} disagree_{{element.getId()}}" />
|
class="disagree_button {%if element.getUserValidationDatas(app['authentication'].getUser()).getAgreement() == true or element.getUserValidationDatas(app['authentication'].getUser()).getAgreement() is null %}not_decided{%endif%} disagree_{{element.getId()}}" />
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{thumbnail.format(element.getRecord(app).get_thumbnail,114,85, '', true, false)}}
|
{{thumbnail.format(element.getRecord(app).get_thumbnail,114,85, '', true, false)}}
|
||||||
|
@@ -10,14 +10,14 @@
|
|||||||
{% if validationDatas.getNote() != '' %}
|
{% if validationDatas.getNote() != '' %}
|
||||||
<div class="note_wrapper ui-corner-all {% if validationDatas.getParticipant().getUser().getId() == app['authentication'].getUser().getId() %}my_note{% endif %} ">
|
<div class="note_wrapper ui-corner-all {% if validationDatas.getParticipant().getUser().getId() == app['authentication'].getUser().getId() %}my_note{% endif %} ">
|
||||||
<span class="note_author title15">
|
<span class="note_author title15">
|
||||||
{{validationDatas.getParticipant().getUser().getDisplayName(app['translator'])}}
|
{{validationDatas.getParticipant().getUser().getDisplayName()}}
|
||||||
</span> : {{ validationDatas.getNote()|nl2br }}
|
</span> : {{ validationDatas.getNote()|nl2br }}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
<form>
|
<form>
|
||||||
<textarea>{{basket_element.getUserValidationDatas(app['authentication'].getUser(), app).getNote()}}</textarea>
|
<textarea>{{basket_element.getUserValidationDatas(app['authentication'].getUser()).getNote()}}</textarea>
|
||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
<button class="note_closer ui-corner-all">
|
<button class="note_closer ui-corner-all">
|
||||||
{{ 'boutton::fermer' | trans }}
|
{{ 'boutton::fermer' | trans }}
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
{% if basket_element and basket_element.getBasket().getValidation() %}
|
{% if basket_element and basket_element.getBasket().getValidation() %}
|
||||||
<div class="agreement_selector" style="display:none;">
|
<div class="agreement_selector" style="display:none;">
|
||||||
<img src="/skins/lightbox/agree-big.png"
|
<img src="/skins/lightbox/agree-big.png"
|
||||||
class="{% if basket_element.getUserValidationDatas (app['authentication'].getUser(), app) != true %}not_decided{% endif %} agree_{{basket_element.getId()}}"/>
|
class="{% if basket_element.getUserValidationDatas (app['authentication'].getUser()) != true %}not_decided{% endif %} agree_{{basket_element.getId()}}"/>
|
||||||
<img src="/skins/lightbox/disagree-big.png"
|
<img src="/skins/lightbox/disagree-big.png"
|
||||||
class="{% if basket_element.getUserValidationDatas (app['authentication'].getUser(), app) != false %}not_decided{% endif %} disagree_{{basket_element.getId()}}" />
|
class="{% if basket_element.getUserValidationDatas (app['authentication'].getUser()) != false %}not_decided{% endif %} disagree_{{basket_element.getId()}}" />
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user