Skip to content
Snippets Groups Projects
Commit a46e18ab authored by Ghislain Loas's avatar Ghislain Loas
Browse files

dev #75882 fix failures du to same doctype resource definition name

parent fb760834
3 merge requests!2711Dev#75882 minsoc faire des filtres sur des facettes et des domaines au moment de la recherche s2,!2707Tessadoc lost pass,!2699Dev#75882 minsoc faire des filtres sur des facettes et des domaines au moment de la recherche s2
Pipeline #4394 passed with stage
in 34 minutes and 35 seconds
......@@ -22,6 +22,6 @@
class Admin_DoctypeBrowserController extends ZendAfi_Controller_Action {
public function getPlugins() {
return ['ZendAfi_Controller_Plugin_ResourceDefinition_Doctype'];
return ['ZendAfi_Controller_Plugin_ResourceDefinition_Codification_DocType'];
}
}
\ No newline at end of file
......@@ -20,22 +20,7 @@
*/
class ZendAfi_Controller_Plugin_ResourceDefinition_Doctype
extends ZendAfi_Controller_Plugin_ResourceDefinition_Abstract {
public function getDefinitions() {
return
['model' => ['class' => 'Class_TypeDoc',
'name' => 'doctype',
'order' => 'libelle'],
'listViewMode' => ['helper_method' => 'flatCodificationListViewMode',
'label' => $this->_('Type de documents'),
'controller' => 'doctype-browser'],
'actions' => ['index' => ['title' => $this->_('Parcourir les types de documents')]]];
}
class ZendAfi_Controller_Plugin_ResourceDefinition_Codification_Abstract extends ZendAfi_Controller_Plugin_ResourceDefinition_Abstract {
public function getActions($model) {
if(!$model)
......@@ -52,6 +37,6 @@ class ZendAfi_Controller_Plugin_ResourceDefinition_Doctype
'icon' => 'view',
'label' => $this->_('Voir les documents qui ont la facette "%s"',$model->getFacetCode()),
'anchorOptions' => ['target' => '_blank']
]];
]];
}
}
\ No newline at end of file
<?php
/**
* Copyright (c) 2012-2017, 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 ZendAfi_Controller_Plugin_ResourceDefinition_Codification_DocType
extends ZendAfi_Controller_Plugin_ResourceDefinition_Codification_Abstract {
public function getDefinitions() {
return
['model' => ['class' => 'Class_TypeDoc',
'name' => 'doctype',
'order' => 'libelle'],
'listViewMode' => ['helper_method' => 'flatCodificationListViewMode',
'label' => $this->_('Type de documents'),
'controller' => 'doctype-browser'],
'actions' => ['index' => ['title' => $this->_('Parcourir les types de documents')]]];
}
}
\ No newline at end of file
......@@ -68,13 +68,13 @@ class TypeDocsControllerIndexTest extends AbstractTypeDocsControllerTestCase {
/** @test */
public function tableShouldContainsLivresTypeDoc() {
$this->assertXPathContentContains('//tbody//tr[2]//td[1]', 'Livres',$this->_response->getBody());
$this->assertXPathContentContains('//tbody//tr//td', 'Livres',$this->_response->getBody());
}
/** @test */
public function tableShouldContainsFamilleLivreCodifTypeDoc() {
$this->assertXPathContentContains('//tbody//tr[2]//td[2]', 'Livre',$this->_response->getBody());
$this->assertXPathContentContains('//tbody//tr//td', 'Livre',$this->_response->getBody());
}
......
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