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

Merge branch 'hotline#117184_dysfonctionnement_des_modeles_d_impression_' into 'hotline'

hotline #117184 : fix articles print link in widgets

See merge request !4046
parents 38f7e121 883d6dba
Branches
Tags
1 merge request!4046hotline #117184 : fix articles print link in widgets
Pipeline #13597 failed with stage
in 58 minutes and 35 seconds
- ticket #117184 : Articles : Correction du lien d'impression dans les boîtes articles
\ No newline at end of file
......@@ -50,6 +50,7 @@ class ZendAfi_View_Helper_Article_RenderFullContent extends ZendAfi_View_Helper_
public function renderPrintLink($article) {
return $this->view->tag('div',
$this->view->tagPrintLink((new Class_Entity())
->setController('cms')
->setModels([$article])
->setStrategy('Article_List')),
['class' => 'print']);
......
<?php
/**
* Copyright (c) 2012-2021, Agence Française Informatique (AFI). All rights reserved.
*
* BOKEH is free software; you can redistribute it and/or modify
* it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
* the Free Software Foundation.
*
* There are special exceptions to the terms and conditions of the AGPL as it
* is applied to this software (see README file).
*
* BOKEH is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/** @see http://forge.afi-sa.fr/issues/117184 */
class IndexControllerArticlesWidgetAccordionPrintTest extends AbstractControllerTestCase {
protected $_storm_default_to_volatile = true;
protected function _initProfilHook($profil) {
$profil->setBoiteOfTypeInDivision(1, Class_Systeme_ModulesAccueil_News::CODE,
['id_items' => 12,
'style_liste' => 'accordion_list']);
}
public function setUp() {
parent::setUp();
$this->fixture(Class_ModeleFusion::class,
['id' => 1,
'type' => Class_ModeleFusion::ARTICLES_TEMPLATE,
'contenu' => '']);
$this->onLoaderOfModel(Class_Article::class)
->whenCalled('getArticlesByPreferences')
->answers([$this->fixture(Class_Article::class,
['id' => 12,
'titre' => 'testing',
'contenu' => 'A content'])]);
$this->dispatch('/opac/index/index');
}
/** @test */
public function pageShouldContainsLinkToPrintArticle12InCmsController() {
$this->assertXPath('//a[contains(@href, "/cms/print/ids/12/strategy/Article_List")]');
}
}
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