diff --git a/VERSIONS_HOTLINE/52051 b/VERSIONS_HOTLINE/52051 new file mode 100644 index 0000000000000000000000000000000000000000..e7e932319fdb4ddfdf17715b41282cec1eff820b --- /dev/null +++ b/VERSIONS_HOTLINE/52051 @@ -0,0 +1 @@ + - ticket #52051 : boite calendrier : correction du sélecteur de catégories qui chargeait mal le contenu du calendrier \ No newline at end of file diff --git a/VERSIONS_HOTLINE/52240 b/VERSIONS_HOTLINE/52240 new file mode 100644 index 0000000000000000000000000000000000000000..02672069511b26faefc7a598b152d145792f3d8f --- /dev/null +++ b/VERSIONS_HOTLINE/52240 @@ -0,0 +1 @@ + - ticket #52240 : Les permaliens des albums ressources numeriques utilisent maintenant l'id de l'album \ No newline at end of file diff --git a/library/Class/Album.php b/library/Class/Album.php index c4d386488d00b0c1feb881eff7a6ea64ecdea871..da1bcef2ece2088e62d1e51164c32141bfa8079f 100644 --- a/library/Class/Album.php +++ b/library/Class/Album.php @@ -272,16 +272,10 @@ class Class_Album extends Storm_Model_Abstract { * @return array */ public function getPermalink() { - $permalink = ['module' => 'opac', 'controller' => 'bib-numerique', - 'action' => 'notice']; - - if ($this->hasIdOrigine()) - $permalink['ido'] = $this->getIdOrigine(); - else - $permalink['id'] = $this->getId(); - + 'action' => 'notice', + 'id' => $this->getId()]; return $permalink; } diff --git a/public/opac/js/calendrier.js b/public/opac/js/calendrier.js index a8b3a844a1a06a780290089013289797ccbc6149..9b66c7965c490dd639f02c46851f4c533ef732aa 100644 --- a/public/opac/js/calendrier.js +++ b/public/opac/js/calendrier.js @@ -39,7 +39,7 @@ var ajaxify_calendars = function () { $("form#calendar_select_categorie").change(function(event) { - var url = $(this).attr('action'); + var url = $(this).attr('action') + 'render/ajax'; $(this).closest(".calendar").load(url, {'select_id_categorie':$(this).children('select').val(), 'id_module':$(this).children('input').val()}, diff --git a/tests/application/modules/admin/controllers/AlbumControllerTest.php b/tests/application/modules/admin/controllers/AlbumControllerTest.php index b2c6495337ecdd5f3243782de92dc9be6d5eac35..d75649b0b71eb0a2222c36ae06bf85517b26cf1d 100644 --- a/tests/application/modules/admin/controllers/AlbumControllerTest.php +++ b/tests/application/modules/admin/controllers/AlbumControllerTest.php @@ -1282,7 +1282,7 @@ class Admin_AlbumControllerEditAlbumMesBDPostFrbrModifyTest extends Admin_AlbumC /** @test */ public function shouldHaveOnlyOneFrbrLink() { - $this->assertEquals(1, Class_FRBR_Link::countBy(['target' => ROOT_URL . BASE_URL .'/bib-numerique/notice/id/43/ido/DC023'])); + $this->assertEquals(1, Class_FRBR_Link::countBy(['target' => ROOT_URL . BASE_URL .'/bib-numerique/notice/id/43'])); } @@ -1322,13 +1322,13 @@ class Admin_AlbumControllerEditAlbumMesBDTest extends Admin_AlbumControllerEditA /** @test */ public function permalienShoulBeVisible() { - $this->assertXPath('//input[@value="http://localhost'.BASE_URL.'/bib-numerique/notice/ido/DC023"]'); + $this->assertXPath('//input[@value="http://localhost'.BASE_URL.'/bib-numerique/notice/id/43"]'); } /** @test */ public function permalienVignetteShoulBeVisible() { - $this->assertXPath('//input[@value="http://localhost'.BASE_URL.'/bib-numerique/notice-thumbnail/ido/DC023"]'); + $this->assertXPath('//input[@value="http://localhost'.BASE_URL.'/bib-numerique/notice-thumbnail/id/43"]'); } @@ -2192,11 +2192,13 @@ class Admin_AlbumControllerAlbumHarlockEditRessourceTwoActionTest extends Admin_ /** @test */ public function permalienShoulBeVisible() { - $this->assertXPath('//input[@value="http://localhost'.BASE_URL.'/bib-numerique/notice/ido/HL22/folio/4R"]'); + $this->assertXPath('//input[@value="http://localhost'.BASE_URL.'/bib-numerique/notice/id/999/folio/4R"]'); } } + + class Admin_AlbumControllerAlbumHarlockEditOtherRessourcesActionTest extends Admin_AlbumControllerAlbumHarlockTestCase { /** @test */ function ressourceTwoInputLinkToShouldBeEmpty() { diff --git a/tests/application/modules/opac/controllers/BibNumeriqueControllerTest.php b/tests/application/modules/opac/controllers/BibNumeriqueControllerTest.php index ad28cddf24e6def9c980fda186f6841e04d15488..062ee3c9d4cac6e00fb82c34d3be3873e6113c7e 100644 --- a/tests/application/modules/opac/controllers/BibNumeriqueControllerTest.php +++ b/tests/application/modules/opac/controllers/BibNumeriqueControllerTest.php @@ -781,7 +781,7 @@ class BibNumeriqueControllerAlbumMultiMediasRSSTest extends BibNumeriqueControll /** @test */ public function itunesImageShouldBeNoticeThumbnail() { $this->_xpath->assertXPath($this->_response->getBody(), - '//channel/itunes:image[@href="http://localhost'.BASE_URL.'/bib-numerique/notice-thumbnail/ido/A888"]'); + '//channel/itunes:image[@href="http://localhost'.BASE_URL.'/bib-numerique/notice-thumbnail/id/999"]'); } @@ -802,10 +802,10 @@ class BibNumeriqueControllerAlbumMultiMediasRSSTest extends BibNumeriqueControll /** @test */ - public function linkShouldBeBibNumeriqueNoticeIdoA888() { + public function linkShouldBeBibNumeriqueNoticeId999() { $this->_xpath->assertXPathContentContains($this->_response->getBody(), '//channel/link', - 'http://localhost'.BASE_URL.'/bib-numerique/notice/ido/A888'); + 'http://localhost'.BASE_URL.'/bib-numerique/notice/id/999'); } @@ -925,7 +925,7 @@ class BibNumeriqueControllerPlayRessourceTest extends BibNumeriqueControllerAlbu */ public function forRessourceFiveAnalyticsTrackerShouldHaveReceivedPlayEvent($client) { $this->assertEquals(['bib-numerique', - 'lecture', '"titre: Hunger Games","album: Plein de medias","auteur: Suzanne Collins","editeur: Gallimard","publication: 2001","piste: 3","droits: CC-BY-SA","source: http://localhost'.BASE_URL.'/bib-numerique/notice/id/5.mp3/ido/A888/folio/5"', + 'lecture', '"titre: Hunger Games","album: Plein de medias","auteur: Suzanne Collins","editeur: Gallimard","publication: 2001","piste: 3","droits: CC-BY-SA","source: http://localhost'.BASE_URL.'/bib-numerique/notice/id/999/folio/5"', 5], $client->getAttributesForLastCallOn('trackEvent')); } @@ -945,7 +945,7 @@ class BibNumeriqueControllerPlayRessourceTest extends BibNumeriqueControllerAlbu $this->dispatch('/opac/bib-numerique/play-ressource/id/8.mp3', true); $this->assertEquals(['bib-numerique', 'lecture', - '"titre: Iron Maiden: \"Moonchild\" live","album: Plein de medias","auteur: Suzanne Collins","editeur: Gallimard","publication: 2001","piste: 6","droits: CC-BY-SA","source: http://localhost'.BASE_URL.'/bib-numerique/notice/id/8.mp3/ido/A888/folio/moonchild"', + '"titre: Iron Maiden: \"Moonchild\" live","album: Plein de medias","auteur: Suzanne Collins","editeur: Gallimard","publication: 2001","piste: 6","droits: CC-BY-SA","source: http://localhost'.BASE_URL.'/bib-numerique/notice/id/999/folio/moonchild"', 8], $this->_web_analytics_client->getAttributesForLastCallOn('trackEvent')); } diff --git a/tests/library/Class/AlbumTest.php b/tests/library/Class/AlbumTest.php index 3458e178d1932304d34adabeceeceef3faa744b8..2e51b111cbed1b2112d2d604043b4d9d231f4570 100644 --- a/tests/library/Class/AlbumTest.php +++ b/tests/library/Class/AlbumTest.php @@ -107,12 +107,11 @@ class AlbumHarlockBasicTest extends AlbumHarlockTestCase { /** @test */ - public function withIdOrigine_05DC03_PermalinkShouldBeBibNumNoticeIDO_05DC03() { - $this->_album->setIdOrigine('05DC03'); + public function permalinkShouldBeBibNumNoticeID999() { $this->assertEquals(array('module' => 'opac', 'controller' => 'bib-numerique', 'action' => 'notice', - 'ido' => '05DC03'), + 'id' => 999), $this->_album->getPermalink()); }