Commit 88995abc authored by Patrick Barroca's avatar Patrick Barroca 😁
Browse files

Merge branch...

Merge branch 'hotline#137828_supprimer_une_colonne_personnalisee_du_tableau_des_exemplaires_dans_la_conf_ne_supprime_pas_la_colonne' into 'hotline'

hotline #137828 : fix phantom item custom data column

See merge request afi/opacce!4123
parents 451c59a3 b3e9c7fc
- ticket #137828 : Notice : Suppression d'une colonne personnalisée vide restante après remise à 0 des colonnes personnalisées dans la configuration du tableau des exemplaires
\ No newline at end of file
......@@ -180,7 +180,10 @@ class ZendAfi_View_Helper_Notice_Exemplaires extends ZendAfi_View_Helper_BaseHel
}
$subfields = Class_Profil_ItemsSettings::current()->getIncludedSubfields();
foreach($subfields['datas_items_code'] as $key => $code) {
foreach($subfields['datas_items_code'] as $key => $code) {
if ('' === $code)
continue;
$renderer = (new ZendAfi_View_Helper_Notice_ExemplairesTable_CustomColumn())
->setView($this->view)
->setExemplaires($exemplaires)
......
......@@ -218,6 +218,29 @@ class NoticeAjaxControllerItemsWithoutOrderTest
/** @see https://forge.afi-sa.net/issues/137828 */
class NoticeAjaxControllerItemsWithEmptyDatasConfig extends NoticeAjaxControllerItemsTestCase {
protected function _prepareFixtures() {
$config = Class_Profil::getCurrentProfil()->getCfgNoticeAsArray();
$config['exemplaires']['grouper'] = '1';
$config['exemplaires']['datas_items_code'] = [''];
$config['exemplaires']['datas_items_label'] = [''];
Class_Profil::getCurrentProfil()->setCfgNotice($config);
}
/** @test */
public function itemsTableShouldNotContainsEmptySubfield() {
$this->assertNotXPath('//td[@class="subfield_"]');
}
}
class NoticeAjaxControllerItemsWithOrder995Dollar9AscTest
extends NoticeAjaxControllerItemsTestCase {
......
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