Skip to content
Snippets Groups Projects
Commit 675cb325 authored by llaffont's avatar llaffont
Browse files

La hauteur du kiosque en mode frise chrono est paramètrable

parent cfc2cb7d
Branches
Tags
No related merge requests found
......@@ -29,7 +29,7 @@ class Class_Systeme_ModulesAccueil_Kiosque extends Class_Systeme_ModulesAccueil_
protected $_action = 'kiosque';
/** @var int */
protected $_popupWidth = 600;
protected $_popupWidth = 700;
/** @var int */
protected $_popupHeight = 520;
......
......@@ -40,7 +40,7 @@ class ZendAfi_View_Helper_ListeNotices_Chrono extends ZendAfi_View_Helper_ListeN
'type' => 'timeline',
'embed_id' => $embed_id,
'width' => '100%',
'height' => 500,
'height' => (isset($preferences['op_hauteur']) ? $preferences['op_hauteur'] : 600),
'start_at_end' => true,
'start_zoom_adjust' => -4,
'source' => json_decode($this->view->MoteurRecherche_Resultat_TimelineJsonVisitor($resultat, $preferences)),
......
......@@ -43,8 +43,8 @@ class ZendAfi_View_Helper_TagObjetsImgProperties extends ZendAfi_View_Helper_Bas
// Valoriser les variables
$defauts = file($path . $fic_defaut);
$this->loadDefaults($defauts, $preferences);
$this->loadDefaults($defauts, $preferences);
// Inclure le html
$template = file_get_contents($path . $fic_html);
while (false !== ($pos = strpos($template, '<?php'))) {
......
......@@ -160,13 +160,20 @@ class ZendAfi_View_Helper_Accueil_KiosqueMurWithPanierAndTriTest extends ZendAfi
class ZendAfi_View_Helper_Accueil_KiosqueChronoWithCatalogueTest extends ZendAfi_View_Helper_Accueil_KiosqueMurTestCase {
public function getExtraPreferences() {
return ['id_catalogue' => 12,
'style_liste' => 'chrono'];
'style_liste' => 'chrono',
'op_hauteur' => 400];
}
/** @test */
public function pageShouldContainsDivListeChrono() {
$this->assertXPath($this->_html, '//div[@class="liste_chrono"][contains(@id,"liste_chrono_")]');
}
/** @test */
public function heightShouldBe400() {
$this->assertContains('"height":400', $this->_html);
}
}
......
......@@ -72,14 +72,15 @@ class ZendAfi_View_Helper_MoteurRecherche_Resultat_TimelineJsonVisitorTest exten
/** @test */
public function firstNoticeStartDateShouldBe2009_01_01() {
$this->assertEquals('2009,01,01', $this->_json->timeline->date[0]->startDate);
public function firstNoticeStartDateShouldBe2009() {
$this->assertEquals('2009', $this->_json->timeline->date[0]->startDate);
}
/** @test */
public function firstNoticeHeadlineShouldContainsHarryPotterPrisonnierAzkaban() {
$this->assertContains('Harry Potter et le prisonnier d\'Azkaban', $this->_json->timeline->date[0]->headline);
$this->assertContains('Harry Potter et le prisonnier d\'Azkaban',
$this->_json->timeline->date[0]->headline);
}
......@@ -90,8 +91,9 @@ class ZendAfi_View_Helper_MoteurRecherche_Resultat_TimelineJsonVisitorTest exten
/** @test */
public function firstNoticeTextShouldBeEmpty() {
$this->assertEquals('', $this->_json->timeline->date[0]->text);
public function firstNoticeTextShouldContainsLinkToNotice() {
$this->assertContains('/recherche/viewnotice/clef/POTTER/id/2',
$this->_json->timeline->date[0]->text);
}
......
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