Skip to content
Snippets Groups Projects
Commit 584074a8 authored by Patrick Barroca's avatar Patrick Barroca :grin:
Browse files

Merge branch...

Merge branch 'hotline#95882_boite_bibliotheque_dispo_mais_plante_dans_version_smartphone' into 'hotline'

hotline#95882 : fix display error on library box in smartphone version

See merge request !3261
parents 6e3dd620 67e73242
Branches
Tags
3 merge requests!3297WIP: Master,!3266Hotline,!3261hotline#95882 : fix display error on library box in smartphone version
Pipeline #8430 passed with stage
in 43 minutes and 48 seconds
- ticket #95882 : Boite bibliothèque : Correction affichage sans pagination dans la version smartphone
\ No newline at end of file
......@@ -19,4 +19,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class ZendAfi_View_Helper_Telephone_Library extends ZendAfi_View_Helper_Accueil_Library {
public function getHtml() {
$this->preferences['pagination'] = '';
$this->preferences['nb_aff'] = 100;
return parent::getHtml();
}
}
\ No newline at end of file
......@@ -25,10 +25,8 @@ class ZendAfi_View_Helper_Telephone_RenderLibrary extends ZendAfi_View_Helper_Ba
if (!$library)
return '';
$html = [$this->view->toolbar($this->_("Bib")),
$html = [
$this->_tag('h1', $this->view->escape($library->getLibelle())),
$this->_libraryInfo($library)
];
......
......@@ -673,4 +673,85 @@ class IndexControllerEmbedWithAccordionListWidgetTest extends AbstractIndexContr
public function ericTruffazArticleContentShouldBePresent() {
$this->assertXPathContentContains('//li[@data-role="collapsible"]//article', 'A Bonlieu <img src="truffaz.jpg"/>.');
}
}
\ No newline at end of file
}
class IndexControllerTelephoneLibraryDisplayTest extends TelephoneAbstractControllerTestCase {
protected
$_storm_default_to_volatile = true,
$_annecy,
$_meythet;
protected function _loginHook($account) {
$account->ROLE = "";
$account->ROLE_LEVEL = 0;
$account->ID_USER = "";
$account->PSEUDO = "";
}
public function setUp() {
parent::setUp();
$this->_annecy = $this->fixture('Class_Bib',
['id' => 1,
'libelle' => 'Annecy',
'ville' => 'Annecy',
'id_zone' => 1,
'ouvertures' => []]);
$this->_meythet = $this->fixture('Class_Bib',
['id' => 2,
'libelle' => 'Meythet',
'ville' => 'Meythet',
'closed_on_holidays' => true,
'ouvertures' => []]);
$cfg_accueil =
['modules' => ['1' => [ 'division' => '1',
'type_module' => 'LIBRARY',
'preferences' => ['osm_map' => 0,
'titre' => 'libraries',
'allow_link_on_title' => true,
'libraries' => '1;2',
'nb_aff' => 1,
'pagination' => Class_Systeme_ModulesAccueil_Library::PAGINATION_BOTH]]]];
Class_Profil::getCurrentProfil()
->setCfgAccueil($cfg_accueil)
;
$this->fixture('Class_Lieu',
['id' => 11,
'libelle' => 'Bibliotheque d\'Annecy',
'latitude' => '6.456789',
'longitude' => '0.123456']);
$this->fixture('Class_Lieu',
['id' => 12,
'libelle' => 'Bibliotheque de Meythet',
'latitude' => '6.996789',
'longitude' => '0.223456']);
$this->_annecy
->setIdLieu(11)
->assertSave();
$this->_meythet->setIdLieu(12)->assertSave();
$this->dispatch('/', true);
}
/** @test */
public function page1LinkShouldNotBePresent() {
$this->assertNotXPath('//div[@class="paginationControl"]');
}
/** @test */
public function bothBibShouldBePresent() {
$this->assertXPathContentContains('//h1', 'Meythet');
$this->assertXPathContentContains('//h1', 'Annecy',$this->_response->getBody());
}
}
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