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

hotline #99313 : honor barre_nav conf

parent d8335c74
Branches
Tags
3 merge requests!3350Hotline,!3343WIP: dev#100249: ArteVOD : add a dashboard,!3340hotline #99313 : honor barre_nav conf
Pipeline #8983 passed with stage
in 45 minutes and 25 seconds
- ticket #99313 : Page critique : Respect de la configuration "texte du fil d'ariane"
\ No newline at end of file
......@@ -139,14 +139,9 @@ class BlogController extends ZendAfi_Controller_Action {
public function viewavisAction() {
$id_avis = $this->_getParam('id');
$avis = Class_AvisNotice::find($id_avis);
$this->view->avis = $avis;
$this->view->commentaires = [];
$this->view->modo_blog = $this->modo_blog;
$this->view->user_co = ($this->_user->ID_USER != '');
$this->view->user = $this->_user;
$cfg = Class_Profil::getCurrentProfil()->getConfigurationOf('blog','viewavis','');
$this->view->titre = $cfg['barre_nav'];
$this->view->avis = Class_AvisNotice::find((int)$this->_getParam('id'));
}
......
<?php
$user = Class_Users::getIdentity();
$class_user = new Class_Users();
$class_blog = new Class_Blog();
$this->openBoite('Critique');
<?php
$this->openBoite($this->titre);
echo $this->avis($this->avis);
$this->closeBoite();
?>
......
......@@ -265,7 +265,7 @@ class Class_Systeme_ModulesAppli_Default {
* @return array
*/
private function getDefautBlog() {
return ['barre_nav' => 'Critique',
return ['barre_nav' => $this->_('Critique'),
'nb_display' => 50];
}
......
......@@ -227,3 +227,53 @@ class BlogControllerHierarchicalTest extends AbstractControllerTestCase {
$this->_response->getBody()];
}
}
/** @see http://forge.afi-sa.fr/issues/99313 */
class BlogControllerViewavisTest extends AbstractControllerTestCase {
protected $_storm_default_to_volatile = true;
public function setUp() {
parent::setUp();
Class_Profil::getCurrentProfil()
->setCfgModules(['blog' => ['viewavis' => ['barre_nav' => 'Coups de coeur à partager']]]);
Class_AdminVar::set('AVIS_MIN_SAISIE', 0);
Class_AdminVar::set('AVIS_MAX_SAISIE', 1000);
$this->ksp = $this->fixture('Class_Notice',
['id' => 233134,
'titre_principal' => 'Kerbal Space Program',
'clef_oeuvre' => 'KERBALSPACEPROG-SQUAD-',
'clef_alpha' => 'KERBALSPACEPROG-SQUAD-']);
$this->fixture('Class_AvisNotice',
['id' => 1,
'id_notice' => 233134,
'note' => 5,
'entete' => 'Incroyable',
'id_notice' => $this->ksp->getId(),
'avis' => 'What a wonderful game',
'statut' => 1,
'date_avis' => '2015-05-18 00:00:00',
'id_user' => 3,
'source_author' => null,
'clef_oeuvre' => $this->ksp->getClefOeuvre()]);
$this->fixture('Class_Users',
['id' => 3,
'login' => 'Harlock',
'password' => 'arcadia']);
$this->dispatch('/blog/viewavis/id/1/retour_avis/10');
}
/** @test */
public function breadcrumbShouldContainsCoupsDeCoeurAPartager() {
$this->assertXPathContentContains('//div[@class="barre_nav"]//span',
'Coups de coeur à partager');
}
}
\ 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