Commit 8bca79a7 authored by Henri-Damien LAURENT's avatar Henri-Damien LAURENT
Browse files

Merge branch 'hotline#138162_probleme_avec_la_rubrique_prets_en_cours' into 'hotline'

hotline #138162 : fix bad link for current action config in historic template

See merge request afi/opacce!4132
parents 88995abc 7d586efe
- ticket #138162 : Administration : Correction du lien de configuration de la liste des prêts de l'espace abonné
\ No newline at end of file
......@@ -63,9 +63,11 @@ class AbonneController extends ZendAfi_Controller_Action {
return;
}
$this->view->_current_module['controller'] = 'abonne';
$this->view->_current_module['action'] = 'fiche';
$this->view->_current_module['action2'] = '';
if (!Class_Template::current()->isLegacy()) {
$this->view->_current_module['controller'] = 'abonne';
$this->view->_current_module['action'] = 'fiche';
$this->view->_current_module['action2'] = '';
}
}
......
......@@ -28,9 +28,11 @@ class AuthorController extends ZendAfi_Controller_Action {
if (!$this->_author = $this->view->author = $this->_findAuthor())
throw new Zend_Controller_Action_Exception($this->view->_('Désolé, cette page n\'existe pas'), 404);
$this->view->_current_module['controller'] = 'author';
$this->view->_current_module['action'] = 'view';
$this->view->_current_module['action2'] = '';
if (!Class_Template::current()->isLegacy()) {
$this->view->_current_module['controller'] = 'author';
$this->view->_current_module['action'] = 'view';
$this->view->_current_module['action2'] = '';
}
}
......
......@@ -25,9 +25,11 @@ class BibController extends ZendAfi_Controller_Action {
parent::preDispatch();
$this->_helper->librarySelection();
$this->view->_current_module['controller'] = 'bib';
$this->view->_current_module['action'] = 'en-lire-plus';
$this->view->_current_module['action2'] = '';
if (!Class_Template::current()->isLegacy()) {
$this->view->_current_module['controller'] = 'bib';
$this->view->_current_module['action'] = 'en-lire-plus';
$this->view->_current_module['action2'] = '';
}
}
......
<?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
*/
class AbonneControllerPretsAdminTest extends AbstractControllerTestCase {
protected $_storm_default_to_volatile = true;
/** @test */
public function historicPageShouldContainsLinkToEditLoansConfig() {
$this->dispatch('/abonne/prets');
$this->assertXPath('//a[contains(@href, "/admin/modules/abonne/config/site/type_module/abonne")]'
.'[contains(@href, "/action1/prets")]');
}
/** @test */
public function intonationPageShouldContainsLinkToEditAccountConfig() {
$this->_buildTemplateProfil(['id' => 200]);
$this->dispatch('/abonne/prets');
$this->assertXPath('//a[contains(@href, "/admin/widget/edit-action/id/abonne_fiche")]');
}
}
Markdown is supported
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