diff --git a/VERSIONS_HOTLINE/192556 b/VERSIONS_HOTLINE/192556 new file mode 100644 index 0000000000000000000000000000000000000000..39015105bb1eb19e7b51b02265a325f14402e1fd --- /dev/null +++ b/VERSIONS_HOTLINE/192556 @@ -0,0 +1 @@ + - correctif #192556 : Abonné : La suppression d'une notice d'un panier est maintenant effective. \ No newline at end of file diff --git a/library/templates/Intonation/Library/View/Wrapper/RecordInSelection.php b/library/templates/Intonation/Library/View/Wrapper/RecordInSelection.php index b11949ce9e6423c791ca1ca077192ad6dee3e8e6..39225907367d4d8c2c7e7a2cd92f18891e1f09d4 100644 --- a/library/templates/Intonation/Library/View/Wrapper/RecordInSelection.php +++ b/library/templates/Intonation/Library/View/Wrapper/RecordInSelection.php @@ -25,12 +25,13 @@ class Intonation_Library_View_Wrapper_RecordInSelection protected $_selection; - public function setSelection($selection) { $this->_selection = $selection; + return $this; } + public function getActions() : array { if ( ! $this->_selection) return []; @@ -39,7 +40,8 @@ class Intonation_Library_View_Wrapper_RecordInSelection ->setUrl($this->_view->url(['controller' => 'abonne', 'action' => 'supprimer-de-la-selection', 'selection_id' => $this->_selection->getId(), - 'record_id' => $this->_model->getId()])) + 'record_id' => $this->_model->getId(), + 'delete' => true])) ->setImage($this->getIco('delete', 'utils')) ->setText($this->_('Supprimer')) ->setTitle($this->_('Supprimer le document %s de la sélection %s', diff --git a/tests/scenarios/Templates/TemplatesAbonneSelectionsTest.php b/tests/scenarios/Templates/TemplatesAbonneSelectionsTest.php index 113f856ec617cad69222424e887b0a62007f5734..7ea0c222a263d5ffce60df1545a030be05409ee7 100644 --- a/tests/scenarios/Templates/TemplatesAbonneSelectionsTest.php +++ b/tests/scenarios/Templates/TemplatesAbonneSelectionsTest.php @@ -331,6 +331,16 @@ class TemplatesAbonneSelectionsAjouterLeDocumentALaSelectionTest $this->dispatch('/opac/abonne/ajouter-le-document-a-la-selection/selection_label/Déjà lu/id_profil/72/record_id/89/render/popup'); $this->assertXPathContentContains('//script', 'location.reload();'); } + + + /** + * @test + * @see : https://forge.afi-sa.net/issues/192556 + */ + public function removeRecordFromCardShouldExistsWithParamDelete() { + $this->dispatch('/opac/abonne/selection/id_profil/72/selection_id/2'); + $this->assertXPath('//div[contains(@class, "card_action")]/a[contains(@href, "abonne/supprimer-de-la-selection/id_profil/72/selection_id/2/record_id/456/delete/1")]'); + } }