Skip to content
Snippets Groups Projects
Commit bcec19fb authored by Henri-Damien LAURENT's avatar Henri-Damien LAURENT
Browse files

hotline#115309 : bootstrap : on homepage, reviews, link on thumbnail leads to...

hotline#115309 : bootstrap : on homepage, reviews, link on thumbnail leads to reviews and not record
parent dabbe451
Branches
Tags
2 merge requests!3623Hotline,!3616hotline#115309 : bootstrap : on homepage, reviews, link on thumbnail leads to…
Pipeline #10942 passed with stage
in 48 minutes and 4 seconds
- ticket #115309 : Magasin de themes: Liste des avis sur la page d'accueil Le lien sur l'image de la notice renvoie directemnt vers l'avis.
\ No newline at end of file
......@@ -25,4 +25,21 @@ class Intonation_Library_View_Wrapper_ReviewInRecord extends Intonation_Library_
public function getActions() {
return [];
}
public function getMainLink() {
return new Intonation_Library_Link(['Url' => array_merge($this->_context_params,
['controller' => 'record',
'action' => 'reviews',
'id' => $this->_model->getIdNotice()]),
'Image' => Class_Template::current()->getIco($this->_view,
'read-document',
'library'),
'Text' => $this->_('Voir'),
'Title' => $this->_('Voir le document %s de %s de type %s',
$this->getMainTitle(),
$this->getSecondaryTitle(),
$this->getDocTypeLabel())]);
;
}
}
\ No newline at end of file
<?php
V<?php
/**
* Copyright (c) 2012-2020, Agence Française Informatique (AFI). All rights reserved.
*
......@@ -125,7 +125,7 @@ class TemplatesReviewsWidgetTest extends TemplatesIntonationTestCase {
/** @test */
public function dispatchFrontShouldContainsLeRoi() {
public function dispatchFrontShouldContainsLeRoiWithLinkOnReview() {
$widget = ((new Class_Systeme_Widget_Widget)
->setId(19)
->setProfileId(72)
......@@ -157,6 +157,7 @@ class TemplatesReviewsWidgetTest extends TemplatesIntonationTestCase {
$this->dispatch('/opac/index/index/id_profil/72', true);
$this->assertXPathContentContains('//div[@id = "boite_19"]', 'Le Roi');
$this->assertXPath('//a[@href="/record/reviews/id_profil/72/id/2"]');
}
}
......
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