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

Affichage vignette en grand

parent 24cd5152
Branches
Tags
No related merge requests found
......@@ -33,4 +33,9 @@ class Telephone_RechercheController extends RechercheController {
$this->view->_('Ressources numériques') => array('action' => 'ressourcesnumeriques'),
);
}
public function grandeimageAction() {
$this->view->notice = Class_Notice::getLoader()->find($this->_getParam('id'));
}
}
\ No newline at end of file
<?php
echo $this->toolbar("Jaquette",$this->url_retour,true);
echo '<h1>'.$this->titre.'</h1>';
echo $this->toolbar($this->_("Jaquette"),
array('action' => 'viewnotice'),
true);
echo '<h1>'.$this->notice->getTitrePrincipal().'</h1>';
echo '<div class="pave" align="center">';
echo '<a href="'.$this->url_retour.'"><img class="grande_image" src="'.$this->url_image.'"></a>';
echo sprintf('<a href="%s"><img class="grande_image" src="%s"></a>',
$this->url(array('action' => 'viewnotice')),
$this->notice->getUrlVignette());
echo '</div>'.BR;
?>
<?php echo $this->toolbar("Recherche", $this->url(array('action' => 'simple')), false); ?>
<?php
echo $this->toolbar($this->_("Recherche"),
array('action' => 'simple'),
false); ?>
<div class="pave">
<div class="entete_notice">
......
......@@ -288,7 +288,7 @@ div.clear {
padding: 0px 5px;
}
.entete_notice img:first-child + img{
.entete_notice img:first-child + a{
float:right;
max-width: 40%;
}
\ No newline at end of file
......@@ -148,4 +148,32 @@ class Telephone_RechercheControllerHarryPotterViewNoticeTest extends Telephone_R
}
class Telephone_RechercheControllerHarryPotterGrandeImageTest extends Telephone_RechercheControllerHarryPotterTestCase {
public function setUp() {
parent::setUp();
$this->dispatch('/telephone/recherche/grandeimage/id/4', true);
}
/** @test */
public function pageShouldContainsUrlToViewNoticeInToolbar() {
$this->assertXPath('//div[@class="toolbar"]//a[contains(@href, "recherche/viewnotice/id/4")]');
}
/** @test */
public function titleShouldBeHarryPotter() {
$this->assertXPathContentContains('//h1', 'Harry Potter à l\'ecole des sorciers');
}
/** @test */
public function pageShouldContainsPotterJpg() {
$this->assertXPath('//a[contains(@href, "recherche/viewnotice/id/4")]//img[contains(@src, "potter.jpg")]');
}
}
?>
\ 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