Skip to content
Snippets Groups Projects
Commit 93ace733 authored by gloas's avatar gloas
Browse files

Mon compte: ajout class aux elements de la fiche

parent 1d0ccb4b
Branches
Tags
No related merge requests found
......@@ -24,9 +24,10 @@ abstract class ZendAfi_View_Helper_Abonne_Abstract extends Zend_View_Helper_Html
$html = $this->view->tagAnchor($url,
$this->view->tagImg(Class_Profil::getCurrentProfil()
->getUrlImage('/abonnes/'.$icone.'.png'),
['alt' => $icone]) . $html);
['alt' => $icone]) . $html,
['class' => $icone]);
}
return '<div class="abonneFiche">'.$html.'<div class="clear"></div></div>';
return '<div class="abonneFiche '.$icone.'">'.$html.'<div class="clear"></div></div>';
}
}
......
<?php
/**
* Copyright (c) 2012, 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
*/
require_once 'library/ZendAfi/View/Helper/ViewHelperTestCase.php';
class View_Helper_Abonne_AccesFicheTest extends ViewHelperTestCase {
/**
* @var ZendAfi_View_Helper_Abonne_Abonnement
*/
protected
$_helper,
$_html;
public function setUp() {
parent::setUp();
$this->_helper = new ZendAfi_View_Helper_Abonne_AccesFiche();
$this->_helper->setView(new ZendAfi_Controller_Action_Helper_View());
$this->_html = $this->_helper->abonne_accesfiche(Class_Users::newInstanceWithId(3)
->beAbonneSIGB());
}
/** @test */
public function accesFicheShouldReturnDivWithClassAceesFiche() {
$this->assertXPath($this->_html,'//div[@class="abonneTitre"]',$this->_html);
}
}
?>
\ No newline at end of file
<?php
/**
* Copyright (c) 2012, 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
*/
require_once 'library/ZendAfi/View/Helper/ViewHelperTestCase.php';
class View_Helper_Abonne_AvisTest extends ViewHelperTestCase {
/**
* @var ZendAfi_View_Helper_Abonne_Abonnement
*/
protected
$_helper,
$_html;
public function setUp() {
parent::setUp();
$this->_helper = new ZendAfi_View_Helper_Abonne_Avis();
$this->_helper->setView(new ZendAfi_Controller_Action_Helper_View());
$this->_html = $this->_helper->abonne_Avis(Class_Users::newInstanceWithId(3)
->beAbonneSIGB());
}
/** @test */
public function avisShouldReturnDivWithClassAvis() {
$this->assertXPath($this->_html,'//div[@class="abonneFiche avis"]',$this->_html);
}
}
?>
\ No newline at end of file
<?php
/**
* Copyright (c) 2012, 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
*/
require_once 'library/ZendAfi/View/Helper/ViewHelperTestCase.php';
class View_Helper_Abonne_FormationsTest extends ViewHelperTestCase {
/**
* @var ZendAfi_View_Helper_Abonne_Abonnement
*/
protected
$_helper,
$_html;
public function setUp() {
parent::setUp();
Class_AdminVar::set('FORMATIONS','1');
Class_Users::beVolatile();
Class_UserGroupMembership::beVolatile();
Class_UserGroup::beVolatile();
$this->_usergroup = Class_UserGroup::newInstanceWithId(23)
->setLibelle('Stagiaires')
->setRightsToken(0x01)
->setRoleLevel('user')
->setGroupType(Class_UserGroup::TYPE_MANUAL)
;
$this->_user = Class_Users::newInstanceWithId(1)
->setLogin('Go')
->setRoleLevel('user');
$this->_membership =
Class_UserGroupMembership::newInstanceWithId(123,
['user' => $this->_user,
'user_group'=> $this->_usergroup]);
$this->_membership->setUsers([$this->_user]);
$this->_user->setUserGroupMemberships([$this->_membership]);
$this->_helper = new ZendAfi_View_Helper_Abonne_Formations();
$this->_helper->setView(new ZendAfi_Controller_Action_Helper_View());
$this->_html = $this->_helper->abonne_formations($this->_user);
}
/** @test */
public function formationsShouldReturnDivWithClassFormations() {
$this->assertXPath($this->_html,'//div[@class="abonneFiche formations"]',$this->_html);
}
}
?>
\ No newline at end of file
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