Skip to content
Snippets Groups Projects
Commit c78647ad authored by efalcy's avatar efalcy
Browse files

Merge branch 'ft/R13039' into 'master'

Ft/R13039
parents 7129e00c b03a4ef7
Branches
Tags
2 merge requests!258Dev/13872 Orphee Allow Hold Available Items,!78Master
......@@ -11,9 +11,11 @@ echo $this->abonne_Newsletters($this->user);
echo $this->abonne_Formations($this->user);
echo $this->abonne_Multimedia($this->user);
echo $this->abonne_SuggestionAchat($this->user);
echo $this->abonne_Deconnexion($this->user);
if ($this->error)
echo sprintf('<div class="error">%s</div>', $this->error);
$this->closeBoite();
?>
<?php
/**
* Copyright (c) 2013, Agence Française Informatique (AFI). All rights reserved.
*
* AFI-OPAC 2.0 is free software; you can redistribute it and/or modify
* it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
* the Free Software Foundation.
*
* There are special exceptions to the terms and conditions of the AGPL as it
* is applied to this software (see README file).
*
* AFI-OPAC 2.0 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with AFI-OPAC 2.0; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class ZendAfi_View_Helper_Abonne_Deconnexion extends ZendAfi_View_Helper_Abonne_Abstract {
public function abonne_Deconnexion($user) {
$action_url = $this->view->url(['controller' => 'auth',
'action' => 'logout'], null, true);
return $this->tagFicheAbonne(sprintf('<a href=\'%s\'>%s</a>',
$action_url,
$this->view->_('Déconnexion')),
'deconnexion',
$action_url);
}
}
?>
\ No newline at end of file
public/opac/images/abonnes/deconnexion.png

3.64 KiB

......@@ -56,6 +56,11 @@ class AbonneControllerFicheAsAdminTest extends AbstractAbonneControllerFicheTest
public function linkToReservationsShouldNotBePresent() {
$this->assertNotXPath('//a[contains(@href, "/abonne/reservations")]');
}
/** @test */
public function linkToLogoutShouldBePresent() {
$this->assertXPath('//a[contains(@href, "/auth/logout")]');
}
}
......@@ -79,6 +84,11 @@ class AbonneControllerFicheAsAbonneTest extends AbstractAbonneControllerFicheTes
public function linkToReservationsShouldNotBePresent() {
$this->assertXPath('//a[contains(@href, "/abonne/reservations")]');
}
/** @test */
public function linkToLogoutShouldBePresent() {
$this->assertXPath('//a[contains(@href, "/auth/logout")]');
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment