diff --git a/lib/classes/Session/Handler.class.php b/lib/classes/Session/Handler.class.php index 6eebf2480d..653bca7422 100644 --- a/lib/classes/Session/Handler.class.php +++ b/lib/classes/Session/Handler.class.php @@ -594,6 +594,8 @@ class Session_Handler } $rs[$k]['session_id'] = (int) $rs[$k]['session_id']; $rs[$k]['ip_infos'] = $infos; + $rs[$k]['created_on'] = new \DateTime($row['created_on']);; + $rs[$k]['lastaccess'] = new \DateTime($row['lastaccess']); } return $rs; diff --git a/templates/web/login/head.twig b/templates/web/login/head.twig index 9b72cf7967..b06cd5bba2 100644 --- a/templates/web/login/head.twig +++ b/templates/web/login/head.twig @@ -12,5 +12,5 @@ {% endfor %} - + diff --git a/templates/web/user/account.html.twig b/templates/web/user/account.html.twig new file mode 100644 index 0000000000..e29e77dcde --- /dev/null +++ b/templates/web/user/account.html.twig @@ -0,0 +1,579 @@ + + + {{ registry.get('GV_homeTitle') }} {% trans 'login:: Mon compte'%} + + + + + + + + + + +
+
+ + + + + +
{{ registry.get('GV_homeTitle') }}{% trans 'login:: Mon compte' %} +
+
+
+
+
+ + +
+ + + + + +
+ {% if notice != '' %} +
{{ notice }}
+ {% endif %} +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {% for notification_group, nots in notifications%} + + + + {% for notification in nots %} + + + + + {% endfor %} + {% endfor %} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{% trans 'admin::compte-utilisateur changer mon mot de passe' %}
{{ user.get_login() }}
+ +
+ +
+ +
+
+ {{ user.get_email() }} {% trans 'login:: Changer mon adresse email' %} +
{% trans 'Notification par email' %}
{{ notification_group }}
+ +
+ +
+ +
+ +
+
+ +
+ +
+ +
+ +
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+
+
+
+ +
+
+
+
+ + +
+
+ {{ demandes['tab'] |raw }} + +
+
+ + +
+ + + + + + + + + + + + + + + + + {% for row in session.get_my_sessions() %} + + + + + + + + + + {% endfor %} + +
+ {% trans 'Mes sessions' %} +
+ + {% trans 'Date de connexion' %} + + {% trans 'Dernier access' %} + + {% trans 'IP' %} + + {% trans 'Browser' %} + + {% trans 'ecran' %} + + {% trans 'Session persistante' %} +
+ {% if session.get_ses_id() != row['session_id'] %} + + {% endif %} + + {{ row['created_on'] |getDate }} + + {{ row['lastaccess'] |getDate }} + + {{ row['ip'] }} + {{ row['ip_infos'] }} + + {{ row['browser'] }} {{ row['browser_version'] }} + + {{ row['screen'] }} + + {% if row['token'] %}oui{% endif %} +
+
+ + +
+ + +
+ +
+
+
© Copyright Alchemy 2005-{{ "now"|date("Y") }}
+
+
+ + diff --git a/www/login/account.php b/www/login/account.php index 876f4a3dd5..e7b2f043f3 100644 --- a/www/login/account.php +++ b/www/login/account.php @@ -81,6 +81,7 @@ if ($request->has_post_datas()) { } } } + if (count(array_diff($accountFields, array_keys($request->get_post_datas()))) == 0) { $defaultDatas = 0; @@ -123,6 +124,7 @@ if ($request->has_post_datas()) { } } } + if ($request->has_post_datas()) { $evt_mngr = eventsmanager_broker::getInstance($appbox, $Core); $notifications = $evt_mngr->list_notifications_available($appbox->get_session()->get_usr_id()); @@ -144,650 +146,42 @@ if ($request->has_post_datas()) { $user->setPrefs('notification_' . $k, $v); } } + $geonames = new geonames(); $user = User_Adapter::getInstance($appbox->get_session()->get_usr_id(), $appbox); + +$notice = ''; +if ( ! is_null($parm['notice'])) { + switch ($parm['notice']) { + case 'password-update-ok': + $notice = _('login::notification: Mise a jour du mot de passe avec succes'); + break; + case 'account-update-ok': + $notice = _('login::notification: Changements enregistres'); + break; + case 'account-update-bad': + $notice = _('forms::erreurs lors de l\'enregistrement des modifications'); + break; + case 'demand-ok': + $notice = _('login::notification: Vos demandes ont ete prises en compte'); + break; + } +} + +$demandes = giveMeBaseUsr($usr_id, $lng); +$evt_mngr = eventsmanager_broker::getInstance($appbox, $Core); +$notifications = $evt_mngr->list_notifications_available($appbox->get_session()->get_usr_id()); + +$parameters = array( + 'geonames' => $geonames, + 'user' => $user, + 'notice' => $notice, + 'demandes' => $demandes, + 'evt_mngr' => $evt_mngr, + 'notifications' => $notifications, +); + +$Core['Twig']->display('user/account.html.twig', $parameters); + +return; ?> - - - <?php echo $appbox->get_registry()->get('GV_homeTitle') ?> <?php echo _('login:: Mon compte') ?> - - - - - - - - - -
-
- - - - - -
get_registry()->get('GV_homeTitle') ?> - -
-
-
-
-
- -
    -
  • -
  • -
  • -
  • -
  • -
- -
- - - - - -
- - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - list_notifications_available($appbox->get_session()->get_usr_id()); - - foreach ($notifications as $notification_group => $nots) { - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
get_login() ?>
- -
- -
- -
-
- get_email() ?> -
- getPrefs('notification_' . $notification['id']) == '0' ? '' : 'checked'; ?> value="1"/> -
- -
- -
- -
-
- -
- -
- -
- -
- -
-
- get_activeftp() ? "checked" : "") ?> name="form_activeFTP" id="form_activeFTP"> -
-
;"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- -
- get_ftp_passif() == "1" ? "checked" : "") ?> name="form_passifFTP" id="form_passifFTP"/> -
- -
- get_defaultftpdatas() >> 2) & 1) == 1 ? "checked" : "") ?> name="form_defaultdataFTP[]" value="document" id="form_defaultSendDocument"> - get_defaultftpdatas() >> 1) & 1) == 1 ? "checked" : "") ?> name="form_defaultdataFTP[]" value="preview" id="form_defaultSendPreview"> - get_defaultftpdatas() & 1) == 1 ? "checked" : "") ?> name="form_defaultdataFTP[]" value="caption" id="form_defaultSendCaption"> -
-
-
-
- -
-
-
-
- - - -
- - -
- - -
- - -
- - - - -
- - - - - - - - - - - - - - - - - - get_session()->get_my_sessions() as $row) { - ?> - - - - - - - - - - - -
- -
- - - - - - - - - - - - - -
- get_session()->get_ses_id() != $row['session_id']) { - ?> - - - - - - - - - - - - - - - -
-
- - -
- - -
-
- - -
-
-
-
© Copyright Alchemy 2005-
-
-
- - - diff --git a/www/skins/login/css/main.css b/www/skins/login/css/main.css index 858609d8e5..4e0614b0c6 100644 --- a/www/skins/login/css/main.css +++ b/www/skins/login/css/main.css @@ -20,12 +20,18 @@ label { color: #ffffff; } /******* NAVBAR ***************************************************************/ -#tab-account-cat .ui-tabs-nav li a { +#tab-account-cat ul { + list-style: none; +} +#tab-account-cat ul li { + display: inline; +} +#tab-account-cat ul li a { color: #0088cc; text-decoration: none; font-size: 13px; } -#tab-account-cat .ui-tabs-nav li a:hover { +#tab-account-cat ul li a:hover { background-color: #0088cc; color: #ffffff; } diff --git a/www/skins/login/less/main.less b/www/skins/login/less/main.less index 61a0a26c17..022627b38a 100644 --- a/www/skins/login/less/main.less +++ b/www/skins/login/less/main.less @@ -53,14 +53,18 @@ label { /******* NAVBAR ***************************************************************/ #tab-account-cat { - .ui-tabs-nav li { - a { - .color(@blue); - text-decoration: none; - font-size: 13px; - &:hover { - .bg(@blue); - .color(@white); + ul { + list-style: none; + li { + display: inline; + a { + .color(@blue); + text-decoration: none; + font-size: 13px; + &:hover { + .bg(@blue); + .color(@white); + } } } }