Skip to content
Snippets Groups Projects
Commit 7c5bb9b9 authored by Laurent's avatar Laurent
Browse files

hotline #163472 fix recherche/viewnotice widget loading for serial articles

parent 3553d501
Branches
Tags
1 merge request!4596hotline #163472 fix recherche/viewnotice widget loading for serial articles
Pipeline #19157 passed with stage
in 29 minutes and 31 seconds
- correctif #163472 : Vue notice : correction de l'assignation d'un feuille XSLT pour les articles de périodique
  • Owner

    Proposition : Le choix d'une feuille de style XSLT spécifique aux articles de périodiques est possible.

  • Please register or sign in to reply
\ No newline at end of file
...@@ -93,8 +93,13 @@ class Class_Systeme_Widget_Action extends Class_Systeme_Widget_Abstract { ...@@ -93,8 +93,13 @@ class Class_Systeme_Widget_Action extends Class_Systeme_Widget_Abstract {
} }
protected function _getOptionFrom($id) { /*
$map = explode('_', $id); * @param id string in the form of recherche_viewnotice_1
* or recherche_viewnotice_per_art (more than 2 underscores)
* @answers option part, so 1 or per_art
*/
protected function _getOptionFrom(string $id) : string{
$map = explode('_', $id, 3);
return isset($map[2]) return isset($map[2])
? $map[2] ? $map[2]
: ''; : '';
...@@ -120,4 +125,4 @@ class Class_Systeme_Widget_Action extends Class_Systeme_Widget_Abstract { ...@@ -120,4 +125,4 @@ class Class_Systeme_Widget_Action extends Class_Systeme_Widget_Abstract {
public function getWidgets() { public function getWidgets() {
return []; return [];
} }
} }
\ No newline at end of file
...@@ -1240,6 +1240,29 @@ class TemplatesDispatchAdminWidgetEditActionRechercheViewNoticeTest extends Temp ...@@ -1240,6 +1240,29 @@ class TemplatesDispatchAdminWidgetEditActionRechercheViewNoticeTest extends Temp
class TemplatesDispatchAdminWidgetEditActionRechercheViewNoticePerArticleTest extends TemplatesIntonationTestCase {
public function setUp() {
parent::setUp();
(new Class_Profil_Preferences())
->setModulePref(Class_Profil::find(72),
(new Class_Profil_ModuleDefinition('recherche',
'viewnoticeper_art')),
['xslt' => '/skins/soft/my.xsl']);
$this->dispatch('/admin/widget/edit-action/id/recherche_viewnotice_per_art/id_profil/72');
}
/** @test */
public function inputXSLTShouldHaveValueSkinsSoftMyXSL() {
$this->assertXPath('//input[@name="xslt"][@value="/skins/soft/my.xsl"]');
}
}
class TemplatesDispatchAdminWidgetEditActionRechercheViewNoticeActivationTest extends TemplatesIntonationTestCase { class TemplatesDispatchAdminWidgetEditActionRechercheViewNoticeActivationTest extends TemplatesIntonationTestCase {
public function checkboxInputNames() { public function checkboxInputNames() {
......
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