diff --git a/library/ZendAfi/View/Helper/Abonne/Abstract.php b/library/ZendAfi/View/Helper/Abonne/Abstract.php index 414dc28eeb147636354ea3ccc513734ed71a1970..a1bd37f6c77923e6fd0a302b1e1bae0e0bd95f3b 100644 --- a/library/ZendAfi/View/Helper/Abonne/Abstract.php +++ b/library/ZendAfi/View/Helper/Abonne/Abstract.php @@ -19,9 +19,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ abstract class ZendAfi_View_Helper_Abonne_Abstract extends Zend_View_Helper_HtmlElement { - public function tagFicheAbonne($html, $icone='') { - if ($icone) - $html = $this->view->tagImg(URL_SHARED_IMG.'/abonnes/'.$icone.'.png', ['alt' => $icone]) . $html; + public function tagFicheAbonne($html, $icone, $url) { + $html = $this->view->tagAnchor($url, + $this->view->tagImg(URL_SHARED_IMG.'/abonnes/'.$icone.'.png', ['alt' => $icone]) . $html); return '<div class="abonneFiche">'.$html.'<div class="clear"></div></div>'; } } diff --git a/library/ZendAfi/View/Helper/Abonne/Formations.php b/library/ZendAfi/View/Helper/Abonne/Formations.php index b5d8aa3016205ce1b30858299bf307e53b592397..03bf4107cf7aa26d751c3dc1dfc3b1a2f60243d2 100644 --- a/library/ZendAfi/View/Helper/Abonne/Formations.php +++ b/library/ZendAfi/View/Helper/Abonne/Formations.php @@ -23,14 +23,18 @@ class ZendAfi_View_Helper_Abonne_Formations extends ZendAfi_View_Helper_Abonne_A if (!Class_AdminVar::isFormationEnabled() || !$user->hasRightSuivreFormation()) return ''; - $html = $this->view->tagAnchor($this->view->url(['controller' => 'abonne', - 'action' => 'formations'], - null, - true), + $action_url = $this->view->url(['controller' => 'abonne', + 'action' => 'formations'], + null, + true); + + $html = $this->view->tagAnchor($action_url, $this->view->_("S'inscrire à une formation")); $html .= '<ul>'; + + foreach ($user->getSessionFormations() as $session) { $html .= sprintf('<li><a href="%s">%s, %s</li>', $this->view->url(['controller' => 'abonne', @@ -45,7 +49,7 @@ class ZendAfi_View_Helper_Abonne_Formations extends ZendAfi_View_Helper_Abonne_A $html .= '</ul>'; - return $this->tagFicheAbonne($html, 'formations'); + return $this->tagFicheAbonne($html, 'formations', $action_url); } } diff --git a/library/ZendAfi/View/Helper/Abonne/Multimedia.php b/library/ZendAfi/View/Helper/Abonne/Multimedia.php index c418316b058b1c22df492d1da8d6fa68908ac863..5efb7af955a559ccb384ec371590aac1b70c1f6b 100644 --- a/library/ZendAfi/View/Helper/Abonne/Multimedia.php +++ b/library/ZendAfi/View/Helper/Abonne/Multimedia.php @@ -23,10 +23,11 @@ class ZendAfi_View_Helper_Abonne_Multimedia extends ZendAfi_View_Helper_Abonne_A if (!Class_AdminVar::isMultimediaEnabled()) return ''; - $html = $this->view->tagAnchor($this->view->url(['controller' => 'abonne', - 'action' => 'multimedia-hold-location'], - null, - true), + $action_url = $this->view->url(['controller' => 'abonne', + 'action' => 'multimedia-hold-location'], + null, true); + + $html = $this->view->tagAnchor($action_url, $this->view->_("Réserver un poste multimédia")); $html .= '<ul>'; foreach ($user->getFutureMultimediaHolds() as $hold) { @@ -45,7 +46,7 @@ class ZendAfi_View_Helper_Abonne_Multimedia extends ZendAfi_View_Helper_Abonne_A $html .= '</ul>'; - return $this->tagFicheAbonne($html, 'multimedia'); + return $this->tagFicheAbonne($html, 'multimedia', $action_url); } } diff --git a/library/ZendAfi/View/Helper/Abonne/Newsletters.php b/library/ZendAfi/View/Helper/Abonne/Newsletters.php index 6d0e69fcb7f28a2e6011ec9615612fa553dc18db..01d7f77b629608e15d0b0bbb6b2806e86a1c38b1 100644 --- a/library/ZendAfi/View/Helper/Abonne/Newsletters.php +++ b/library/ZendAfi/View/Helper/Abonne/Newsletters.php @@ -33,11 +33,13 @@ class ZendAfi_View_Helper_Abonne_Newsletters extends ZendAfi_View_Helper_Abonne_ $newsletter_info .= implode(', ', $titres); } + $action_url = $this->view->url(['controller' => 'abonne', 'action' => 'edit']); return $this->tagFicheAbonne( '<p>'.$newsletter_info.'</p>'. - $this->view->tagAnchor(['controller' => 'abonne', 'action' => 'edit'], + $this->view->tagAnchor($action_url, $this->view->_('Modifier mes abonnements')), - 'newsletter'); + 'newsletter', + $action_url); } } diff --git a/library/ZendAfi/View/Helper/Abonne/Paniers.php b/library/ZendAfi/View/Helper/Abonne/Paniers.php index 95428c061369a131686a744402fb3ef85af49266..4e2f0e98c77a274ebf33a5db3868a4f7b2c3b602 100644 --- a/library/ZendAfi/View/Helper/Abonne/Paniers.php +++ b/library/ZendAfi/View/Helper/Abonne/Paniers.php @@ -28,11 +28,12 @@ class ZendAfi_View_Helper_Abonne_Paniers extends ZendAfi_View_Helper_Abonne_Abst "Vous avez %d paniers de notices", $nb_paniers); + $action_url = $this->view->url(['controller' => 'panier', 'action' => 'index']); return $this->tagFicheAbonne(sprintf('<a href=\'%s\'>%s</a>', - $this->view->url(['controller' => 'panier', - 'action' => 'index']), + $action_url, $str_paniers), - 'panier'); + 'panier', + $action_url); } } diff --git a/library/ZendAfi/View/Helper/Abonne/Prets.php b/library/ZendAfi/View/Helper/Abonne/Prets.php index de55e5be9a79c3c425a623ae4d28bf9e04edea1e..b84a2d70a971c541c46878b8236c1bd22411a034 100644 --- a/library/ZendAfi/View/Helper/Abonne/Prets.php +++ b/library/ZendAfi/View/Helper/Abonne/Prets.php @@ -34,13 +34,14 @@ class ZendAfi_View_Helper_Abonne_Prets extends ZendAfi_View_Helper_Abonne_Abstra $nb_retards = $fiche_sigb["fiche"]->getNbPretsEnRetard(); $str_retards = $nb_retards ? $this->view->_('(%d en retard)', $nb_retards) : ''; - + $action_url = $this->view->url(['controller' => 'abonne', + 'action' => 'prets']); return $this->tagFicheAbonne(sprintf('<a href=\'%s\'>%s %s</a>', - $this->view->url(['controller' => 'abonne', - 'action' => 'prets']), + $action_url, $str_prets, $str_retards), - 'prets'); + 'prets', + $action_url); } } diff --git a/library/ZendAfi/View/Helper/Abonne/Reservations.php b/library/ZendAfi/View/Helper/Abonne/Reservations.php index 9b6f740037b36e4de38bba095791c3f9c2d596c6..061d1738cb778428160942922a0a475f5192cd18 100644 --- a/library/ZendAfi/View/Helper/Abonne/Reservations.php +++ b/library/ZendAfi/View/Helper/Abonne/Reservations.php @@ -31,11 +31,13 @@ class ZendAfi_View_Helper_Abonne_Reservations extends ZendAfi_View_Helper_Abonne "Vous avez %d réservations en cours", $nb_resas); + $action_url = $this->view->url(['controller' => 'abonne', + 'action' => 'reservations']); return $this->tagFicheAbonne(sprintf("<a href='%s'>%s</a>", - $this->view->url(['controller' => 'abonne', - 'action' => 'reservations']), + $action_url, $str_resas), - 'reservations'); + 'reservations', + $action_url); } } diff --git a/public/opac/css/global.css b/public/opac/css/global.css index d8e68ca5986375f2daf79e5f0d2bed2a68a078e1..3cac32e5c3445082db26fee9ca8752b2d149f815 100644 --- a/public/opac/css/global.css +++ b/public/opac/css/global.css @@ -1045,10 +1045,12 @@ body.abonne_multimedia-hold-view .actions a { .abonne_fiche .abonneFiche { - clear: both; padding-top: 10px; margin: 10px 10px 0px 10px; border-radius: 10px; + text-align: left; + float: left; + width: 45%; } .abonneTitre a img { @@ -1066,7 +1068,11 @@ body.abonne_multimedia-hold-view .actions a { .abonne_fiche .abonneFiche ul { - margin-left: 150px; + margin-left: 95px; +} + +.abonne_fiche .abonneFiche ul li { + list-style-type: disc; } diff --git a/tests/application/modules/opac/controllers/AbonneControllerNewslettersTest.php b/tests/application/modules/opac/controllers/AbonneControllerNewslettersTest.php index 5794e1c421331682aa9dad716f881d83f5641812..7fd8c9e8d221b8047aebf24489496c803e7281d4 100644 --- a/tests/application/modules/opac/controllers/AbonneControllerNewslettersTest.php +++ b/tests/application/modules/opac/controllers/AbonneControllerNewslettersTest.php @@ -142,7 +142,7 @@ class AbonneControllerFicheActionWithOneSubscriptionTest extends AbonneControlle public function testIconeNewsletterDisplayed () { - $this->assertXPath('//div[@class="abonneFiche"]//img[contains(@src, "abonnes/newsletter.png")]'); + $this->assertXPath('//div[@class="abonneFiche"]//a[contains(@href, "/abonne/edit")]//img[contains(@src, "abonnes/newsletter.png")]'); }