diff --git a/.gitattributes b/.gitattributes index 415bd4c9d52de3f6149b20297fcd7733671092a2..a811779988b12476b770d32562bb6a2ef454a4fd 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3006,6 +3006,14 @@ public/opac/css/global.css -text public/opac/css/noir_sur_blanc.css -text public/opac/css/print.css -text public/opac/fonts/Vera.ttf -text +public/opac/images/abonnes/formations.png -text svneol=unset#unset +public/opac/images/abonnes/modifiermafiche.png -text svneol=unset#unset +public/opac/images/abonnes/modifiermafiche16.png -text svneol=unset#unset +public/opac/images/abonnes/multimedia.png -text svneol=unset#unset +public/opac/images/abonnes/newsletter.png -text svneol=unset#unset +public/opac/images/abonnes/panier.png -text svneol=unset#unset +public/opac/images/abonnes/prets.png -text svneol=unset#unset +public/opac/images/abonnes/reservations.png -text svneol=unset#unset public/opac/images/accessibilite.png -text public/opac/images/accessibilite_hover.png -text public/opac/images/box/menu/separ.gif -text diff --git a/application/modules/opac/views/scripts/abonne/fiche.phtml b/application/modules/opac/views/scripts/abonne/fiche.phtml index 7712279548deb8cf14cad97c7575bceedcb37b71..f3890b5e358be7e60fbec20d3fb60a5521b6004b 100644 --- a/application/modules/opac/views/scripts/abonne/fiche.phtml +++ b/application/modules/opac/views/scripts/abonne/fiche.phtml @@ -13,6 +13,5 @@ echo $this->abonne_multimedia($this->user); if ($this->error) echo sprintf('<div class="error">%s</div>', $this->error); - $this->closeBoite(); ?> \ No newline at end of file diff --git a/library/ZendAfi/View/Helper/Abonne/Abstract.php b/library/ZendAfi/View/Helper/Abonne/Abstract.php index aa73c42f558dffe669c9c345802bc505026b07b9..414dc28eeb147636354ea3ccc513734ed71a1970 100644 --- a/library/ZendAfi/View/Helper/Abonne/Abstract.php +++ b/library/ZendAfi/View/Helper/Abonne/Abstract.php @@ -19,8 +19,10 @@ * 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) { - return '<div class="abonneFiche">'.$html.'</div>'; + public function tagFicheAbonne($html, $icone='') { + if ($icone) + $html = $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/AccesFiche.php b/library/ZendAfi/View/Helper/Abonne/AccesFiche.php index 9d5a3e8ccbceda7e54a2f96f5f82b05035805029..42d8d7142396e2167f6557c0e8760bc8d2380b2b 100644 --- a/library/ZendAfi/View/Helper/Abonne/AccesFiche.php +++ b/library/ZendAfi/View/Helper/Abonne/AccesFiche.php @@ -20,13 +20,16 @@ */ class ZendAfi_View_Helper_Abonne_AccesFiche extends Zend_View_Helper_HtmlElement { public function abonne_accesfiche($user) { + $html_modifier_ma_fiche = $this->view->tagImg(URL_SHARED_IMG.'abonnes/modifiermafiche16.png') + .$this->view->_(' Modifier ma fiche'); + $fiche_sigb = $user->getFicheSigb(); if (array_key_exists("fiche", $fiche_sigb)) { try { if ($popup_url = $fiche_sigb["fiche"]->getUserInformationsPopupUrl($user)) - return $this->divAbonneTitre(sprintf('<a onclick="openIFrameDialog(\'%s\');">%s</a>', + return $this->divAbonneTitre(sprintf('<a onclick="openIFrameDialog(\'%s\');">%s %s</a>', $popup_url, - $this->view->boutonIco("type=edit").$this->view->_(' Modifier ma fiche')), + $html_modifier_ma_fiche), $user); } catch (Exception $e) { @@ -37,7 +40,7 @@ class ZendAfi_View_Helper_Abonne_AccesFiche extends Zend_View_Helper_HtmlElement return $this->divAbonneTitre($this->view->tagAnchor(['controller' => 'abonne', 'action' => 'edit'], - $this->view->boutonIco("type=edit").$this->view->_(' Modifier ma fiche')), + $html_modifier_ma_fiche), $user); } diff --git a/library/ZendAfi/View/Helper/Abonne/Formations.php b/library/ZendAfi/View/Helper/Abonne/Formations.php index 53ff60ac1919926a7bc3dd9f5b38e28596914d7a..b5d8aa3016205ce1b30858299bf307e53b592397 100644 --- a/library/ZendAfi/View/Helper/Abonne/Formations.php +++ b/library/ZendAfi/View/Helper/Abonne/Formations.php @@ -45,7 +45,7 @@ class ZendAfi_View_Helper_Abonne_Formations extends ZendAfi_View_Helper_Abonne_A $html .= '</ul>'; - return $this->tagFicheAbonne($html); + return $this->tagFicheAbonne($html, 'formations'); } } diff --git a/library/ZendAfi/View/Helper/Abonne/Multimedia.php b/library/ZendAfi/View/Helper/Abonne/Multimedia.php index 2ff939e107190db8c635ab29de84ec9601f0138c..c418316b058b1c22df492d1da8d6fa68908ac863 100644 --- a/library/ZendAfi/View/Helper/Abonne/Multimedia.php +++ b/library/ZendAfi/View/Helper/Abonne/Multimedia.php @@ -45,7 +45,7 @@ class ZendAfi_View_Helper_Abonne_Multimedia extends ZendAfi_View_Helper_Abonne_A $html .= '</ul>'; - return $this->tagFicheAbonne($html); + return $this->tagFicheAbonne($html, 'multimedia'); } } diff --git a/library/ZendAfi/View/Helper/Abonne/Newsletters.php b/library/ZendAfi/View/Helper/Abonne/Newsletters.php index a0f4e3528b3a765c615ccd9771a6c5e2173093a1..6d0e69fcb7f28a2e6011ec9615612fa553dc18db 100644 --- a/library/ZendAfi/View/Helper/Abonne/Newsletters.php +++ b/library/ZendAfi/View/Helper/Abonne/Newsletters.php @@ -36,7 +36,8 @@ class ZendAfi_View_Helper_Abonne_Newsletters extends ZendAfi_View_Helper_Abonne_ return $this->tagFicheAbonne( '<p>'.$newsletter_info.'</p>'. $this->view->tagAnchor(['controller' => 'abonne', 'action' => 'edit'], - $this->view->_('Modifier mes abonnements'))); + $this->view->_('Modifier mes abonnements')), + 'newsletter'); } } diff --git a/library/ZendAfi/View/Helper/Abonne/Paniers.php b/library/ZendAfi/View/Helper/Abonne/Paniers.php index 581c1dc5ced8d9a8a1b3fd469e10ee2f50167495..95428c061369a131686a744402fb3ef85af49266 100644 --- a/library/ZendAfi/View/Helper/Abonne/Paniers.php +++ b/library/ZendAfi/View/Helper/Abonne/Paniers.php @@ -31,7 +31,8 @@ class ZendAfi_View_Helper_Abonne_Paniers extends ZendAfi_View_Helper_Abonne_Abst return $this->tagFicheAbonne(sprintf('<a href=\'%s\'>%s</a>', $this->view->url(['controller' => 'panier', 'action' => 'index']), - $str_paniers)); + $str_paniers), + 'panier'); } } diff --git a/library/ZendAfi/View/Helper/Abonne/Prets.php b/library/ZendAfi/View/Helper/Abonne/Prets.php index 95635210e863a72f1c544190c8a122fb73849283..de55e5be9a79c3c425a623ae4d28bf9e04edea1e 100644 --- a/library/ZendAfi/View/Helper/Abonne/Prets.php +++ b/library/ZendAfi/View/Helper/Abonne/Prets.php @@ -39,7 +39,8 @@ class ZendAfi_View_Helper_Abonne_Prets extends ZendAfi_View_Helper_Abonne_Abstra $this->view->url(['controller' => 'abonne', 'action' => 'prets']), $str_prets, - $str_retards)); + $str_retards), + 'prets'); } } diff --git a/library/ZendAfi/View/Helper/Abonne/Reservations.php b/library/ZendAfi/View/Helper/Abonne/Reservations.php index 6eafa928ca5c655eec20156bb777ecffbc2cdc03..9b6f740037b36e4de38bba095791c3f9c2d596c6 100644 --- a/library/ZendAfi/View/Helper/Abonne/Reservations.php +++ b/library/ZendAfi/View/Helper/Abonne/Reservations.php @@ -34,7 +34,8 @@ class ZendAfi_View_Helper_Abonne_Reservations extends ZendAfi_View_Helper_Abonne return $this->tagFicheAbonne(sprintf("<a href='%s'>%s</a>", $this->view->url(['controller' => 'abonne', 'action' => 'reservations']), - $str_resas)); + $str_resas), + 'reservations'); } } diff --git a/public/opac/css/global.css b/public/opac/css/global.css index 7179e5d7c36853618c91b8e61d8037e8ef199a0b..ad6bab969b3c5e4d2c65f1ceb26950488e8798ec 100644 --- a/public/opac/css/global.css +++ b/public/opac/css/global.css @@ -1034,4 +1034,37 @@ body.abonne_multimedia-hold-hours input[type="submit"] { body.abonne_multimedia-hold-view .actions a { margin: 0 20px; +} + + + + +.abonne_fiche .abonneFiche { + clear: both; + padding-top: 10px; + margin: 10px 10px 0px 10px; + border-radius: 10px; +} + +.abonneTitre a img { + vertical-align: top; +} + +.abonneFiche img:first-child { + float: left; + margin-top: -10px; +} + +.abonne_fiche .abonneFiche { + text-align: left; +} + + +.abonne_fiche .abonneFiche ul { + margin-left: 150px; +} + + +.abonne_fiche .abonneFiche:hover { + background-color: rgba(0,0,0,0.1); } \ No newline at end of file diff --git a/public/opac/images/abonnes/formations.png b/public/opac/images/abonnes/formations.png new file mode 100644 index 0000000000000000000000000000000000000000..548f8f7c9c084aa79ff4c60655bc55a9ff5fb551 Binary files /dev/null and b/public/opac/images/abonnes/formations.png differ diff --git a/public/opac/images/abonnes/modifiermafiche.png b/public/opac/images/abonnes/modifiermafiche.png new file mode 100644 index 0000000000000000000000000000000000000000..37ec9297a8915e50804d3c8ee3f1db2807e5f4fa Binary files /dev/null and b/public/opac/images/abonnes/modifiermafiche.png differ diff --git a/public/opac/images/abonnes/modifiermafiche16.png b/public/opac/images/abonnes/modifiermafiche16.png new file mode 100644 index 0000000000000000000000000000000000000000..475beb1926ebc286414dff14757e23d32d502aaa Binary files /dev/null and b/public/opac/images/abonnes/modifiermafiche16.png differ diff --git a/public/opac/images/abonnes/multimedia.png b/public/opac/images/abonnes/multimedia.png new file mode 100644 index 0000000000000000000000000000000000000000..1500c9571f609871b3a71a5e7c44a3e858157856 Binary files /dev/null and b/public/opac/images/abonnes/multimedia.png differ diff --git a/public/opac/images/abonnes/newsletter.png b/public/opac/images/abonnes/newsletter.png new file mode 100644 index 0000000000000000000000000000000000000000..2969ba37d6990d48d9e8bc1154162cb8683c7185 Binary files /dev/null and b/public/opac/images/abonnes/newsletter.png differ diff --git a/public/opac/images/abonnes/panier.png b/public/opac/images/abonnes/panier.png new file mode 100644 index 0000000000000000000000000000000000000000..235bfe9a8cf364abffb9f449711066c9ad3426a6 Binary files /dev/null and b/public/opac/images/abonnes/panier.png differ diff --git a/public/opac/images/abonnes/prets.png b/public/opac/images/abonnes/prets.png new file mode 100644 index 0000000000000000000000000000000000000000..3fe65b3bf433b85926465d827da6bb836f67e7cd Binary files /dev/null and b/public/opac/images/abonnes/prets.png differ diff --git a/public/opac/images/abonnes/reservations.png b/public/opac/images/abonnes/reservations.png new file mode 100644 index 0000000000000000000000000000000000000000..254003c3ebf6e29fc7411bebcb3cbc93428ed5fb Binary files /dev/null and b/public/opac/images/abonnes/reservations.png differ diff --git a/tests/application/modules/opac/controllers/AbonneControllerNewslettersTest.php b/tests/application/modules/opac/controllers/AbonneControllerNewslettersTest.php index 81e4b0ef53486c81e07e9314d6d9125f6a0753f5..5794e1c421331682aa9dad716f881d83f5641812 100644 --- a/tests/application/modules/opac/controllers/AbonneControllerNewslettersTest.php +++ b/tests/application/modules/opac/controllers/AbonneControllerNewslettersTest.php @@ -140,6 +140,12 @@ class AbonneControllerFicheActionWithOneSubscriptionTest extends AbonneControlle "Vous êtes abonné à la lettre d'information: Concerts"); } + + public function testIconeNewsletterDisplayed () { + $this->assertXPath('//div[@class="abonneFiche"]//img[contains(@src, "abonnes/newsletter.png")]'); + } + + public function testLinkToEditInformationsInfoAbonnements() { $this->assertXPathContentContains("//div[@class='abonneFiche']//a[@href='/abonne/edit']", 'Modifier mes abonnements');