diff --git a/.gitattributes b/.gitattributes index c9f37e33cad957c167876eaa7a5a14796887ab68..1082ec766697d145888e8e4c4992eeddec99ddfc 100644 --- a/.gitattributes +++ b/.gitattributes @@ -642,6 +642,7 @@ application/modules/telephone/controllers/ErrorController.php -text application/modules/telephone/controllers/IndexController.php -text application/modules/telephone/controllers/RechercheController.php -text application/modules/telephone/views/scripts/abonne/fiche.phtml -text +application/modules/telephone/views/scripts/abonne/identity.phtml -text application/modules/telephone/views/scripts/abonne/prets.phtml -text application/modules/telephone/views/scripts/abonne/reservations.phtml -text application/modules/telephone/views/scripts/auth/boitelogin.phtml -text diff --git a/application/modules/opac/controllers/AbonneController.php b/application/modules/opac/controllers/AbonneController.php index 2446f8d3889c231a5301f9c708d1ac9325a33129..a2f35b0cd4c15ea3703fc22fa74cb3f8c97945b5 100644 --- a/application/modules/opac/controllers/AbonneController.php +++ b/application/modules/opac/controllers/AbonneController.php @@ -34,7 +34,7 @@ class AbonneController extends Zend_Controller_Action return; if (!$this->_user = Class_Users::getLoader()->getIdentity()) { - $this->_redirect('opac/auth/login'); + $this->_redirect('auth/login'); return; } @@ -397,6 +397,7 @@ class AbonneController extends Zend_Controller_Action //------------------------------------------------------------------------------------------------------ function pretsAction() { $this->view->fiche = $this->_user->getFicheSigb(); + $this->view->user = $this->_user; } @@ -428,6 +429,7 @@ class AbonneController extends Zend_Controller_Action } $this->view->fiche = $this->_user->getFicheSigb(); + $this->view->user = $this->_user; } diff --git a/application/modules/telephone/controllers/AbonneController.php b/application/modules/telephone/controllers/AbonneController.php index 53c51625ea29983376f720d8f3693f81b0088766..cc8ab162cf368b133343a2b96d63a54e0c6e451d 100644 --- a/application/modules/telephone/controllers/AbonneController.php +++ b/application/modules/telephone/controllers/AbonneController.php @@ -22,7 +22,7 @@ require_once ROOT_PATH.'application/modules/opac/controllers/AbonneController.php'; class Telephone_AbonneController extends AbonneController { - + } ?> \ No newline at end of file diff --git a/application/modules/telephone/controllers/AuthController.php b/application/modules/telephone/controllers/AuthController.php index ee63a0ea1e5dfd0708b0fbbd135d188e95cf347a..29306f4d7c272bfcf7596791c5b52bc1d09d2cc3 100644 --- a/application/modules/telephone/controllers/AuthController.php +++ b/application/modules/telephone/controllers/AuthController.php @@ -34,16 +34,29 @@ class Telephone_AuthController extends AuthController { } + public function loginAction() { + $this->_loginCommon('/abonne'); + $this->render('login-reservation'); + } + + public function loginReservationAction() { + $this->_loginCommon('/recherche/reservation'); + $this->view->id_notice = $this->_getParam('id'); + } + + + + protected function _loginCommon($redirectUrl) { if (Class_Users::getLoader()->hasIdentity()) { - $this->_redirect('/recherche/reservation'); + $this->_redirect($redirectUrl); return; } $form = $this->_getForm(); if ($this->_request->isPost()) { if (!($error = $this->_authenticate())) { - $this->_redirect('/recherche/reservation'); + $this->_redirect($redirectUrl); return; } @@ -52,17 +65,30 @@ class Telephone_AuthController extends AuthController { } $this->view->error = $this->_flashMessenger->getMessages(); - $this->view->id_notice = $this->_getParam('id'); $this->view->form = $form; } protected function _getForm() { $form = new ZendAfi_Form_Login(); - $form->setAction($this->view->url()); - $form->getElement('username')->setAttrib('placeholder', $this->view->_('Identifiant')); - $form->getElement('password')->setAttrib('placeholder', $this->view->_('Mot de passe')); - $form->getElement('login')->setLabel($this->view->_('Se connecter')); + $form->setAction($this->view->url()) + ->setAttrib('class', 'ui-grid-b'); + + $form->getElement('username') + ->setAttrib('placeholder', $this->view->_('Identifiant')) + ->setAttrib('data-mini', 'true') + ->addDecorator('HtmlTag', array('tag' => 'div', 'class' => 'ui-block-a')); + + $form->getElement('password') + ->setAttrib('placeholder', $this->view->_('Mot de passe')) + ->setAttrib('data-mini', 'true') + ->addDecorator('HtmlTag', array('tag' => 'div', 'class' => 'ui-block-b')); + + $form->getElement('login') + ->setLabel($this->view->_('Se connecter')) + ->setAttrib('data-mini', 'true') + ->addDecorator('HtmlTag', array('tag' => 'div', 'class' => 'ui-block-c')); + return $form; } } diff --git a/application/modules/telephone/views/scripts/abonne/fiche.phtml b/application/modules/telephone/views/scripts/abonne/fiche.phtml index 0a405fc76a46478ea46aac6b0d97f7c4a7e6b1a1..5eb83f4c04a5e5df434d3d8e1eee688fa84aca7e 100644 --- a/application/modules/telephone/views/scripts/abonne/fiche.phtml +++ b/application/modules/telephone/views/scripts/abonne/fiche.phtml @@ -1,31 +1,17 @@ -<?php echo $this->toolbar($this->_('Fiche abonné'), $this->url(array(), null, true) ,false); ?> - -<div class="liste"> -<ul> +<?php echo $this->toolbar($this->_('Fiche abonné')); ?> +<?php echo $this->partial('abonne/identity.phtml', array('user' => $this->user));?> +<ul data-role="listview"> <?php + if ($this->abonnement) + echo '<li>' . $this->abonnement . '</li>'; -if($this->abonnement) - echo '<li>'.$this->abonnement.'</li>'; - -if($this->nb_prets) - echo sprintf('<li class="lien">%s</li>', $this->nb_prets); - -if($this->nb_resas) - echo '<li class="lien">'.$this->nb_resas.'</li>'; + if ($this->nb_prets) + echo sprintf('<li>%s</li>', $this->nb_prets); + + if ($this->nb_resas) + echo '<li>' . $this->nb_resas.'</li>'; ?> </ul> -</div> - - -<div class="pave"> -<?php -echo $this->tagAnchor(array('controller' => 'auth', 'action' => 'logout'), - $this->tagImg(URL_IMG.'systeme/exit.png', - array('alt' => $this->_('Déconnexion'), - 'class' => 'right')).$this->_('Se déconnecter')); -?> -</div> - diff --git a/application/modules/telephone/views/scripts/abonne/identity.phtml b/application/modules/telephone/views/scripts/abonne/identity.phtml new file mode 100644 index 0000000000000000000000000000000000000000..444f9456ceaf6172f6ad2d36036522f43275eef4 --- /dev/null +++ b/application/modules/telephone/views/scripts/abonne/identity.phtml @@ -0,0 +1,6 @@ +<div data-position="fixed" data-role="footer" data-theme="c" style="text-align:right;"> + <div style="float:left;padding-top:8px"><?php echo $this->escape($this->user->getNomAff());?></div> + <a href="<?php echo $this->url(array('controller' => 'auth', 'action' => 'logout'));?>" + data-role="button" data-icon="back" data-iconpos="right" data-mini="true" + data-ajax="false" ><?php echo $this->_('Se déconnecter'); ?></a> +</div> \ No newline at end of file diff --git a/application/modules/telephone/views/scripts/abonne/prets.phtml b/application/modules/telephone/views/scripts/abonne/prets.phtml index c5e93eddae6a362ffb45f2a88f2c9934b591906c..c7677ee8b24a0b70c1a13965939e4f7ded2816d3 100644 --- a/application/modules/telephone/views/scripts/abonne/prets.phtml +++ b/application/modules/telephone/views/scripts/abonne/prets.phtml @@ -1,22 +1,11 @@ +<?php echo $this->toolbar($this->_('Prêts'));?> +<?php echo $this->partial('abonne/identity.phtml', array('user' => $this->user));?> +<ul data-role="listview" data-inset="true"> <?php -echo $this->toolbar($this->_('Prêts'), - $this->url(array('controller' => 'abonne', - 'action' => 'fiche'), - null, - true), - false); -?> - -<div class="liste"> -<ul> - -<?php - -foreach($this->fiche["fiche"]->getEmprunts() as $emprunt) { +foreach ($this->fiche["fiche"]->getEmprunts() as $emprunt) { echo sprintf('<li>%s</li>', $emprunt->getTitre()); } ?> - </ul> \ No newline at end of file diff --git a/application/modules/telephone/views/scripts/abonne/reservations.phtml b/application/modules/telephone/views/scripts/abonne/reservations.phtml index ec7d2eb45b6389c8172b67006cf171e877c8f8cb..15535d55891158fa8876f2056d60cbb2e752e846 100644 --- a/application/modules/telephone/views/scripts/abonne/reservations.phtml +++ b/application/modules/telephone/views/scripts/abonne/reservations.phtml @@ -1,22 +1,10 @@ +<?php echo $this->toolbar($this->_('Réservations'));?> +<?php echo $this->partial('abonne/identity.phtml', array('user' => $this->user));?> +<ul data-role="listview" data-inset="true"> <?php -echo $this->toolbar($this->_('Réservations'), - $this->url(array('controller' => 'abonne', - 'action' => 'fiche'), - null, - true), - false); -?> - -<div class="liste"> -<ul> - -<?php - -foreach($this->fiche["fiche"]->getReservations() as $reservation) { +foreach ($this->fiche["fiche"]->getReservations() as $reservation) { echo sprintf('<li>%s</li>', $reservation->getTitre()); } - ?> - </ul> \ No newline at end of file diff --git a/application/modules/telephone/views/scripts/auth/login-reservation.phtml b/application/modules/telephone/views/scripts/auth/login-reservation.phtml index 18afb89ffa0148803726fb77c9152832e42d6275..5d796369a873083d78746b36e31918b12fc951ed 100644 --- a/application/modules/telephone/views/scripts/auth/login-reservation.phtml +++ b/application/modules/telephone/views/scripts/auth/login-reservation.phtml @@ -1,13 +1,5 @@ -<?php -echo $this->toolbar($this->_("Identification"), - array('controller' => 'recherche', - 'action' => 'exemplaires', - 'id' => $this->id_notice), - false); -?> -<div class="pave"> -<?php -echo $this->form; -?> -<?php if (0 < count($this->error)) echo '<strong style="color:red">' . $this->error[0] . '</strong>';?> +<?php echo $this->toolbar($this->_("Identification"));?> +<div data-role="content"> + <?php echo $this->form;?> + <?php if (0 < count($this->error)) echo '<strong style="color:red">' . $this->error[0] . '</strong>';?> </div> \ No newline at end of file diff --git a/library/ZendAfi/View/Helper/Telephone/Tags/Toolbar.php b/library/ZendAfi/View/Helper/Telephone/Tags/Toolbar.php index d48d542ad3d0af979577dd96d315202b1bc3978d..305aa93de161f462157c46e55248c80fc0e949a0 100644 --- a/library/ZendAfi/View/Helper/Telephone/Tags/Toolbar.php +++ b/library/ZendAfi/View/Helper/Telephone/Tags/Toolbar.php @@ -22,22 +22,21 @@ class ZendAfi_View_Helper_Telephone_Tags_ToolBar extends ZendAfi_View_Helper_BaseHelper { public function ToolBar($titre,$url_retour=false,$accueil=true) { - $html='<div data-theme="c" data-role="header" data-id="main-toolbar" class="toolbar">'; - if(is_array($url_retour)) - $url_retour = $this->view->url($url_retour); + $html = '<div data-theme="c" data-role="header" data-id="main-toolbar" class="toolbar">'; - if($url_retour) - $html.=sprintf('<a href="%s" data-rel="back" data-icon="back" data-iconpos="notext">%s</a>', - $url_retour, - $this->view->_('Retour')); + if (Class_AdminVar::isPackMobileEnabled()) + $html .= sprintf('<a href="%s" data-icon="star" data-iconpos="notext" data-ajax="false">%s</a>', + $this->view->url(array('controller' => 'abonne'), null, true), + $this->view->_('Mon compte')); - $html.='<h1>'.$titre.'</h1>'; + $html .= '<h1>' . $titre . '</h1>'; + + if ($accueil) + $html .= sprintf('<a href="%s" data-icon="home" rel="external" data-ajax="false" data-iconpos="notext">%s</a>', + $this->view->url(array(), null, true), + $this->view->_('Accueil')); + $html .= '</div>'; - if($accueil) - $html.=sprintf('<a href="%s" data-icon="home" rel="external" data-ajax="false" data-iconpos="notext">%s</a>', - $this->view->url(array(), null, true), - $this->view->_('Accueil')); - $html.='</div>'; return $html; } } \ No newline at end of file diff --git a/public/telephone/skins/original/css/global.css b/public/telephone/skins/original/css/global.css index 7ce0d89b8cb124c232a893f3fe288e1ddef4659d..265792dc8c59bce45795a8a8590e576899ff0b65 100644 --- a/public/telephone/skins/original/css/global.css +++ b/public/telephone/skins/original/css/global.css @@ -7,7 +7,6 @@ body.iphone { } - div.iphone_container { background: transparent url(../images/systeme/iphone_container.jpg) no-repeat; margin:0 auto; @@ -269,11 +268,10 @@ tr.calendar_title { } -.ui-btn { +form .ui-btn { margin: 0.2em 10px; } - .ui-content { padding: 0px; }