Commit 8dcd96eb authored by Ghislain Loas's avatar Ghislain Loas

dev #75742 remove old action updatethesaurus

parent 027efb7b
......@@ -158,46 +158,6 @@ class Admin_SystemeController extends Zend_Controller_Action {
}
public function updatethesaurusAction() {
$this->view->titre = $this->_('Mise à jour des thesauri');
$group=[];
$form = $this->view->newForm(['id' => 'updatethesaurus']);
foreach (Class_CodifThesaurus::getIndices('root',true) as $thesaurus) {
$form->addElement('text',
'libelle' . $thesaurus->getId(),
['label' => $thesaurus->getCode(),
'size' => 50,
'id' => $thesaurus->getId(),
'required' => true,
'allowEmpty' => false,
'value' => $thesaurus->getLibelleFacette()]);
$group[] = 'libelle' . $thesaurus->getId();
}
$form
->addDisplayGroup($group, 'thesaurus', ['legend' => 'Général'])
->addElement('submit', 'send', ['label' => 'Enregistrer']);
if ($this->_request->isPost()
&& $form->isValid($this->_request->getPost())) {
foreach (Class_CodifThesaurus::getIndices('root', true) as $thesaurus) {
if ($newlibelle=$this->_request->getPost("libelle" . $thesaurus->getId())) {
$thesaurus=Class_CodifThesaurus::find($thesaurus->getId());
$thesaurus->setLibelleFacette($newlibelle);
$thesaurus->save();
}
}
$this->view->message = $this->_('Les libellés ont été mis à jour');
}
$this->view->form = $form;
}
public function importthesaurusAction() {
$this->view->titre = $this->_('Importation d\'un thesaurus');
......
......@@ -168,8 +168,6 @@ class ZendAfi_View_Helper_Admin_ContentNav extends ZendAfi_View_Helper_BaseHelpe
["thesaurus_init", $this->_("Import Thesaurus"), "/admin/systeme/importthesaurus",
[], function($user) { return defined('DEVELOPMENT') && $user->isAdmin();}],
["thesaurus_edit",$this->_("Modification Thesaurus"), "/admin/systeme/updatethesaurus",
[], function($user) { return defined('DEVELOPMENT') && $user->isAdmin();}],
["thesaurus_edit",
$this->_("Parcourir les Thesaurus"), "/admin/thesauri/index",
[],
......
......@@ -321,32 +321,6 @@ class SystemeControllerImageCacheResetAllTest extends Admin_AbstractControllerTe
class Admin_SystemControllerTest extends Admin_AbstractControllerTestCase {
protected $_storm_default_to_volatile = true;
public function setUp() {
parent::setUp();
$parent = $this->fixture('Class_CodifThesaurus',
['id' => 'NNNN',
'id_thesaurus' => 'NNNN',
'code' => 'Nouveauté',
'libelle' => 'Nouveauté',
'libelle_facette' => 'nouveau']);
$this->dispatch('/admin/systeme/updatethesaurus', true);
}
/** @test */
public function libelleFacetteShouldBeNouveau() {
$this->assertXPath('//form//input[contains(@name, "NNNN")][@value="nouveau"]');
}
}
class Admin_SystemControllerStatusTest extends Admin_AbstractControllerTestCase {
protected $_storm_default_to_volatile = true;
......
......@@ -239,7 +239,7 @@ Trait MenuGaucheAdminRolesDefinition {
'custom-fields-report',
'type-docs',
'systeme/importthesaurus',
'systeme/updatethesaurus',
'thesauri/index',
'file-manager',
];
}
......@@ -287,7 +287,7 @@ Trait MenuGaucheAdminRolesDefinition {
'custom-fields-report',
'type-docs',
'systeme/importthesaurus',
'systeme/updatethesaurus',
'thesauri/index',
'file-manager'
] ],
......
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