diff --git a/VERSIONS b/VERSIONS index 8dc8d1fa9eb0a27e6cdafeaca5826932839da4f4..255630b0e7f3a76e5dc58d9a76fc766bf7af1bc9 100644 --- a/VERSIONS +++ b/VERSIONS @@ -1,3 +1,13 @@ +15/06/2020 - v8.0.64 + +- ticket #111976 : Vue notice : Amélioration de la prise en charge des entités HTML présentes dans des champs unimarc + +- ticket #112284 : Identification : Correction d'un probléme pouvant survenir pour des comptes inscrits à une activité + +- ticket #79470 : Ressource numériques : Mise à jour du lien SSO pour le connecteur Bibiondemand + + + 08/06/2020 - v8.0.63 - ticket #111125 : Drive : compatibilité avec les SIGB: Orphée, V-Smart et Pergame diff --git a/application/modules/opac/controllers/AbonneController.php b/application/modules/opac/controllers/AbonneController.php index f498a5d03baf68a7a465ace6bc9b1dcca4952a7f..d374a85f306ad6bd0ed3630f0ce574cf5a2ddc0c 100644 --- a/application/modules/opac/controllers/AbonneController.php +++ b/application/modules/opac/controllers/AbonneController.php @@ -105,6 +105,9 @@ class AbonneController extends ZendAfi_Controller_Action { || $session->isInscriptionClosed()) return $this->_helper->notify($this->_('L\'inscription à cette session est fermée')); + if (!$this->_user->hasRightSuivreActivity()) + return $this->_helper->notify($this->_('Vous n\'avez pas les droits suffisants pour suivre une activité')); + if ($session->hasStagiaire($this->_user)) return $this->_helper->notify($this->_('Vous êtes déjà inscrit à cette session')); diff --git a/library/Class/CompareUrl.php b/library/Class/CompareUrl.php index 4df34560771d6a11353ffbc237f4b0895d6ed625..f3b311f0ec9356e2f0abaabb26fbb24426041b18 100644 --- a/library/Class/CompareUrl.php +++ b/library/Class/CompareUrl.php @@ -89,7 +89,7 @@ class Class_CompareUrl { protected function _extractProfileIdFormUrl($url) { $url = Class_Url::absolute($url); - if (false === strpos($url, BASE_URL)) + if (false === strpos($url, Class_Url::baseUrl())) return null; if ( ! $url_request = new Zend_Controller_Request_Http($url)) diff --git a/library/Class/Notice/Xsl.php b/library/Class/Notice/Xsl.php index 9f6e9d9c3210f9235d7761ee074c9c83ce96ab1e..dcfdd5384aa08b3c275c85377790f15b6de1f832 100644 --- a/library/Class/Notice/Xsl.php +++ b/library/Class/Notice/Xsl.php @@ -21,7 +21,7 @@ class Class_Notice_Xsl { - use Trait_StaticPhpCommand, Trait_Yaz; + use Trait_StaticPhpCommand, Trait_Yaz, Trait_Translator; const KEY = 'xslt'; @@ -145,6 +145,32 @@ class Class_Notice_Xsl { } + public function transform() { + if (!$this->isActivated()) + return new Class_Notice_XslError($this->_('L\'extension PHP XSL n\'est pas installée. Merci de contacter votre hébergeur')); + + if(!$xsl_file = $this->getXslFile()) + return new Class_Notice_XslError($this->_('Le fichier xsl n\'a pas pu être chargé : %s', $this->getXslFileUrl())); + + if(!$marc_xml = $this->getMarcXmlFile()) + return new Class_Notice_XslError($this->_('Le fichier marc-xml n\'a pas pu être généré')); + + $xslt = $this->importStylesheet($xsl_file->getRealpath()); + + $response = $this->transformToXml($marc_xml); + $this->unlink($marc_xml); + + if ($errors = $this->getErrors()) + return new Class_Notice_XslError($this->_('Erreurs lors de la transformation xml : %s', + implode(", ",array_map(function ($element){return $element->message;},$errors)))); + + if (!$response) + return new Class_Notice_XslError($this->_('La transformation a produit un résultat vide.')); + + return new Class_Notice_XslSuccess($response); + } + + public function importStylesheet($path) { $xsl = $this->getDomDocument(); $xsl->load($path); @@ -186,4 +212,42 @@ class Class_Notice_Xsl { public static function setDomDocument($dom_document) { static::$_dom_document = $dom_document; } +} + + + + +abstract class Class_Notice_XslResult { + protected $_content; + + + public function __construct($content) { + $this->_content = $content; + } + + + public function content() { + return $this->_content; + } + + + abstract public function isSuccess(); +} + + + + +class Class_Notice_XslSuccess extends Class_Notice_XslResult { + public function isSuccess() { + return true; + } +} + + + + +class Class_Notice_XslError extends Class_Notice_XslResult { + public function isSuccess() { + return false; + } } \ No newline at end of file diff --git a/library/Class/Systeme/Widget/Abstract.php b/library/Class/Systeme/Widget/Abstract.php index 2b2664250e78d33d5d03a86355333c9093c358f6..557f3f1dbf9327d3c8eed6b385a22462144858b6 100644 --- a/library/Class/Systeme/Widget/Abstract.php +++ b/library/Class/Systeme/Widget/Abstract.php @@ -93,7 +93,15 @@ abstract class Class_Systeme_Widget_Abstract extends Class_Entity { $preferences = isset($settings['preferences']) ? $settings['preferences'] : []; - return array_merge($preferences, $settings, $this->toArray()); + + $for_form = array_merge($preferences, $settings, $this->toArray()); + + if (isset($for_form['type_module'])) + $for_form ['type_module'] = str_replace(Class_Systeme_ModulesMenu::MODULE_ACCUEIL_PREFIX, + '', + $for_form['type_module']); + + return $for_form; } diff --git a/library/Class/Testing/Yaz.php b/library/Class/Testing/Yaz.php index 63b209a608b035f4b9b567fa59c396d18d859f94..9ea17981317adb4cb58a249daf8689b2002c8486 100644 --- a/library/Class/Testing/Yaz.php +++ b/library/Class/Testing/Yaz.php @@ -35,21 +35,9 @@ class Class_Testing_Yaz { static::getFileSystem()->unlink($filename); - return $this->_sanitizeXmlData($cmd->getOutput()); + return $cmd->getOutput(); } - - protected function _sanitizeXmlData($marc_xml_array){ - return array_map(function($line) - { - return str_replace(['&','& '], - ['&','& '], - $line ); - }, - $marc_xml_array); - } - - protected function _writeUnimarcInFile($unimarc) { return $this->_writeContentInTempFolder($unimarc, 'marc'); } diff --git a/library/Class/Users.php b/library/Class/Users.php index 4627a8434259cc33862e5d61b7b9353b94272278..83a9052155fdd60bb45db67a26f9019083c88646 100644 --- a/library/Class/Users.php +++ b/library/Class/Users.php @@ -1082,12 +1082,6 @@ class Class_Users extends Storm_Model_Abstract { if ($this->getRoleLevel()==ZendAfi_Acl_AdminControllerRoles::ABONNE_SIGB) $this->checkAttribute('idabon',$this->getIdabon(),$this->_("Le numéro de carte est obligatoire pour les abonnés identifiés dans un sigb.")); - $this->check($this->hasRightSuivreActivity() or (count($this->getSessionActivities()) === 0), - $this->_('Vous n\'avez pas les droits suffisants pour suivre une activité')); - - $this->check($this->hasRightDirigerActivity() or (count($this->getSessionInterventions()) === 0), - $this->_('Vous n\'avez pas les droits suffisants pour diriger une activité')); - $this->checkAttribute('mail',($this->getMail() || !$this->getIsContactMail()), $this->_('Vous devez fournir une adresse mail valide')); diff --git a/library/ZendAfi/View/Helper/Notice/Xsl.php b/library/ZendAfi/View/Helper/Notice/Xsl.php index b59fd7623055f11a288cf7d3c96eb7d866887093..1cddf1228e37758a92b79450f13669f6b2957b1f 100644 --- a/library/ZendAfi/View/Helper/Notice/Xsl.php +++ b/library/ZendAfi/View/Helper/Notice/Xsl.php @@ -22,54 +22,18 @@ class ZendAfi_View_Helper_Notice_Xsl extends ZendAfi_View_Helper_BaseHelper { public function Notice_Xsl($xsl) { - if(!$xsl->isActivated()) - return $this->_tag('p', $this->_('L\'extension PHP XSL n\'est pas installée. Merci de contacter votre hébergeur'), ['class' => 'error']); + $result = $xsl->transform(); - if(!$xsl_file = $xsl->getXslFile()) - return $this->_tag('p', - $this->_('Le fichier xsl n\'a pas pu être chargé : %s', $xsl->getXslFileUrl()), - ['class' => 'error']); - - if(!$marc_xml = $xsl->getMarcXmlFile()) - return $this->_tag('p', - $this->_('Le fichier marc-xml n\'a pas pu être généré'), - ['class' => 'error']); - - $xslt = $xsl->importStylesheet($xsl_file->getRealpath()); - $response = $xsl->transformToXml($marc_xml); - - if(($errors = $xsl->getErrors())) - return $this->_errorMessage($this->_('n\'a pas fonctionné.'), $marc_xml, $xsl_file) - . $this->_renderXsltErrors($errors); - - if (!$response) - return $this->_errorMessage($this->_('a produit un résultat vide.'), $marc_xml, $xsl_file); - - $xsl->unlink($marc_xml); - return $response; + return $result->isSuccess() + ? $this->_sanitize($result->content()) + : $this->_tag('p', $result->content(), + ['class' => 'error']); } - - protected function _errorMessage($message, $marc_xml, $xsl_file) { - return $this->_tag('p', $this->_('La transformation du %s en HTML par le fichier %s %s', - $this->view->tagAnchor(Class_Url::absolute($marc_xml), - $this->_('marc-xml'), - ['target' => 'blank']), - $this->view->tagAnchor(Class_Url::absolute($xsl_file->getPath()), - $this->_('xsl'), - ['target' => 'blank']), - $message), - ['class' => 'error']); - } - - - protected function _renderXsltErrors($errors) { - $html = []; - foreach ($errors as $error) - $html [] = $this->_tag('li', $this->_('Erreur levée par Libxml: %s', $error->message)); - - return $this->_tag('ul', - implode($html)); + protected function _sanitize($bloc) { + return str_replace(['&','& '], + ['&','& '], + $bloc); } } \ No newline at end of file diff --git a/library/digital_resources/Bibliondemand/Config.php b/library/digital_resources/Bibliondemand/Config.php index f9c65ce68c2461fa3e21fc97d8fd4bc4f7d1059b..244645286c4e966c9b93fe808c651e45f548e457 100644 --- a/library/digital_resources/Bibliondemand/Config.php +++ b/library/digital_resources/Bibliondemand/Config.php @@ -61,7 +61,7 @@ class Bibliondemand_Config extends Class_DigitalResource_Config { $url = Class_AdminVar::getValueOrDefault($this->withNameSpace('SSO_URL')); return ($record_url = (new Class_Notice_Sso($record))->getFirstPrivateUrl()) - ? $url . '&' . http_build_query(['returnUrl' => $record_url]) + ? $url . '&' . http_build_query(['returnUrl' => '/sarasvati/ws/secure/redirect.ashx?url=' . $record_url]) : $url; } diff --git a/library/digital_resources/Bibliondemand/tests/BibliondemandTest.php b/library/digital_resources/Bibliondemand/tests/BibliondemandTest.php index c970a01648a23e819dd0459bf0bee2f6851f6e5d..1d2cb993a2feabb95cfc3125e5197839c00c5442 100644 --- a/library/digital_resources/Bibliondemand/tests/BibliondemandTest.php +++ b/library/digital_resources/Bibliondemand/tests/BibliondemandTest.php @@ -172,7 +172,8 @@ class ModulesControllerBibliondemandSsoTest extends AbstractControllerTestCase { /** @test */ public function record21ShouldRedirectToBibliondemandSso() { $this->dispatch('/modules/sso/id/21', true); - $this->assertXPathContentContains('//script', 'document.location.href="http://numerique-pasdecalais.bibliondemand.com/logon.aspx?provider=SsoCas&sso-id=cg62-saintomer&returnUrl='. urlencode('http://music.1dtouch.com/users/auth/assa?dest=albums/137962&bibid=CG62').'"', $this->_response->getBody()); + $this->assertXPathContentContains('//script', 'document.location.href="http://numerique-pasdecalais.bibliondemand.com/logon.aspx?provider=SsoCas&sso-id=cg62-saintomer&returnUrl='. urlencode('/sarasvati/ws/secure/redirect.ashx?url=http://music.1dtouch.com/users/auth/assa?dest=albums/137962&bibid=CG62').'"', + $this->_response->getBody()); } } diff --git a/library/startup.php b/library/startup.php index 49b75e5cca0c17d1570a7ac716896b5d993b79fe..446cfa0cc6f4be826b2cb3480404bc9e2d98ed45 100644 --- a/library/startup.php +++ b/library/startup.php @@ -81,7 +81,7 @@ class Bokeh_Engine { function setupConstants() { defineConstant('BOKEH_MAJOR_VERSION','8.0'); - defineConstant('BOKEH_RELEASE_NUMBER', BOKEH_MAJOR_VERSION . '.63'); + defineConstant('BOKEH_RELEASE_NUMBER', BOKEH_MAJOR_VERSION . '.64'); defineConstant('BOKEH_REMOTE_FILES', 'https://git.afi-sa.net/afi/opacce/'); diff --git a/library/templates/Intonation/Assets/css/intonation.css b/library/templates/Intonation/Assets/css/intonation.css index 33f068f6efd6b30b1dc065a6936a9f96b72f1b1d..535ecece06411af8d8edae55e1d99fcf50228fa2 100644 --- a/library/templates/Intonation/Assets/css/intonation.css +++ b/library/templates/Intonation/Assets/css/intonation.css @@ -630,6 +630,7 @@ dl.row { right: 0 !important; } +.card_grid > .card, .card-deck > .card, .card-columns > .card { overflow: hidden; @@ -711,12 +712,54 @@ dl.row { color: var(--front-text); } +.masonry { + display: grid; + grid-gap: 1em; + grid-template-columns: repeat( auto-fill, minmax(200px, 1fr) ); + grid-auto-rows: 0; +} + +.masonry_grid .masonry-brick { + grid-row-end: unset !important; +} + +.masonry-brick { + visibility: hidden; +} + +.card-img-top > .masonry, +.img-thumbnail > .masonry { + grid-gap: 3px; + grid-template-columns: repeat(3, 30%); +} + +.card-img-top > .masonry .card-img-overlay div, +.img-thumbnail > .masonry .card-img-overlay div { + display: none; + visibility: hidden; +} + +.card_grid { + display: grid; + gap: 15px 10px; + grid-template-columns: repeat(2, auto); +} + +.masonry_grid { + gap: 0 10px; + grid-template-rows: repeat(10, auto); +} + @media (min-width: 576px) { .auto_col .card-columns { -webkit-column-count: 2; -moz-column-count: 2; column-count: 2; } + + .card_grid { + grid-template-columns: repeat(2, auto); + } } @media (min-width: 778px) { @@ -725,6 +768,10 @@ dl.row { -moz-column-count: 3; column-count: 3; } + + .card_grid { + grid-template-columns: repeat(3, auto); + } } @media (min-width: 992px) { @@ -733,6 +780,10 @@ dl.row { -moz-column-count: 4; column-count: 4; } + + .card_grid { + grid-template-columns: repeat(4, auto); + } } @media (min-width: 1200px) { @@ -741,6 +792,10 @@ dl.row { -moz-column-count: 5; column-count: 5; } + + .card_grid { + grid-template-columns: repeat(5, auto); + } } .navbar-nav.flex-column .dropdown-menu { diff --git a/library/templates/Intonation/Library/Settings.php b/library/templates/Intonation/Library/Settings.php index fb460674acb69d5f752fb07c124d97d551b91e56..5fdb9ceaa0bcfb25558c15619f12018986336ca4 100644 --- a/library/templates/Intonation/Library/Settings.php +++ b/library/templates/Intonation/Library/Settings.php @@ -186,7 +186,7 @@ class Intonation_Library_Settings extends Intonation_System_Abstract { 'div class wrapper_zendafi_form_login_password' => 'col-12 order-2', 'input id login' => 'order-3 my-3', 'div class wrapper_zendafi_form_login_lostpass' => 'col-12 order-4', - 'div class wrapper_zendafi_form_login_pre_registration_link' => 'col-12 order-5 my-3', + 'div class wrapper_zendafi_form_login_preregistrationlink' => 'col-12 order-5 my-3', 'div class wrapper_zendafi_form_custommultifacetsdoctype' => 'order-1', 'div class wrapper_zendafi_form_custommultifacetsdomains' => 'order-2', diff --git a/library/templates/Intonation/Library/View/Wrapper/Article.php b/library/templates/Intonation/Library/View/Wrapper/Article.php index 768d476bf69ff4deda05273e015d569c60e24139..3ac221b8f4696057fee53b77a826346494ded770 100644 --- a/library/templates/Intonation/Library/View/Wrapper/Article.php +++ b/library/templates/Intonation/Library/View/Wrapper/Article.php @@ -208,7 +208,7 @@ class Intonation_Library_View_Wrapper_Article extends Intonation_Library_View_Wr ->setStrategy('Article_List'))) $actions [] = $this->_view->div(['class' => 'print'], $print_link); - $actions [] = $this->_view->reseauxSociaux($this->_model); + $actions = array_merge($actions, $this->_view->socialNetworksActions($this->_model)); if (Class_Users::isCurrentUserCanAccesBackend()) $actions [] = new Intonation_Library_Link(['Url' => $this->_view->url(['module' => 'admin', diff --git a/library/templates/Intonation/Library/View/Wrapper/Record.php b/library/templates/Intonation/Library/View/Wrapper/Record.php index 49034e04d64b564a378c40b7cac41ea3c771cd59..7b874aac0ca61e17b1058629c19adfe64ea8958b 100644 --- a/library/templates/Intonation/Library/View/Wrapper/Record.php +++ b/library/templates/Intonation/Library/View/Wrapper/Record.php @@ -179,6 +179,7 @@ class Intonation_Library_View_Wrapper_Record extends Intonation_Library_View_Wra $this->_model->getAnnee()))); $badges [] = ((new Intonation_Library_Badge) + ->setTag('a') ->setClass('secondary record_novelty') ->setImage(($this->_model->isNouveaute() ? (Class_Template::current() @@ -186,6 +187,10 @@ class Intonation_Library_View_Wrapper_Record extends Intonation_Library_View_Wra 'novelty', 'library')) : '')) + ->setUrl($this->_view->url(['controller' => 'recherche', + 'action' => 'simple', + 'nouveaute' => 1, + 'page' => null])) ->setText($this->_model->isNouveaute() ? $this->_('Nouveauté') : '') ->setTitle($this->_('Le document %s est nouveau dans votre bibliothèque', $this->_model->getTitrePrincipal(' ')))); diff --git a/library/templates/Intonation/Library/Widget/Carousel/Agenda/Form.php b/library/templates/Intonation/Library/Widget/Carousel/Agenda/Form.php index a380150e90c994f49100d77461e690e37bdde1a4..d6c4198aa6e16d1aff5da00a77b1c8ca9f020583 100644 --- a/library/templates/Intonation/Library/Widget/Carousel/Agenda/Form.php +++ b/library/templates/Intonation/Library/Widget/Carousel/Agenda/Form.php @@ -26,7 +26,7 @@ class Intonation_Library_Widget_Carousel_Agenda_Form extends Intonation_Library_ parent::init(); Class_ScriptLoader::getInstance() - ->addJQueryReady('formSelectToggleVisibilityForElement("#layout", $("#rendering, #order, #enabled_filters, #size").closest("tr"), ["' . Intonation_Library_Widget_Carousel_Definition::CAROUSEL . '", "' . Intonation_Library_Widget_Carousel_Definition::MULTIPLE_CAROUSEL . '", "' . Intonation_Library_Widget_Carousel_Definition::HORIZONTAL_LISTING . '", "' . Intonation_Library_Widget_Carousel_Definition::LISTING . '", "' . Intonation_Library_Widget_Carousel_Definition::LISTING_WITH_OPTIONS . '", "' . Intonation_Library_Widget_Carousel_Definition::WALL . '"]);'); + ->addJQueryReady('formSelectToggleVisibilityForElement("#layout", $("#rendering, #order, #enabled_filters, #size").closest("tr"), ["' . Intonation_Library_Widget_Carousel_Definition::CAROUSEL . '", "' . Intonation_Library_Widget_Carousel_Definition::MULTIPLE_CAROUSEL . '", "' . Intonation_Library_Widget_Carousel_Definition::MULTIPLE_CAROUSEL_PLUS . '", "' . Intonation_Library_Widget_Carousel_Definition::GRID . '", "' . Intonation_Library_Widget_Carousel_Definition::HORIZONTAL_LISTING . '", "' . Intonation_Library_Widget_Carousel_Definition::LISTING . '", "' . Intonation_Library_Widget_Carousel_Definition::LISTING_WITH_OPTIONS . '", "' . Intonation_Library_Widget_Carousel_Definition::WALL . '"]);'); $this ->addElement('treeSelect', diff --git a/library/templates/Intonation/Library/Widget/Carousel/Definition.php b/library/templates/Intonation/Library/Widget/Carousel/Definition.php index 1503fda448e252ee64605a2332d7d3865301fd12..69d9fe8cd58bbb4c331d82c57bc892edee214551 100644 --- a/library/templates/Intonation/Library/Widget/Carousel/Definition.php +++ b/library/templates/Intonation/Library/Widget/Carousel/Definition.php @@ -25,10 +25,12 @@ class Intonation_Library_Widget_Carousel_Definition extends Class_Systeme_Module const WALL = 'wall', CAROUSEL = 'carousel', + GRID = 'grid', HORIZONTAL_LISTING = 'horizontal_list', LISTING = 'list', LISTING_WITH_OPTIONS = 'list_with_options', MULTIPLE_CAROUSEL = 'multiple_carousel', + MULTIPLE_CAROUSEL_PLUS = 'multiple_carousel_plus', CARD_OVERLAY = 'card-overlay', CARD_DESCRIPTION = 'card-description', diff --git a/library/templates/Intonation/Library/Widget/Carousel/Form.php b/library/templates/Intonation/Library/Widget/Carousel/Form.php index 97451fb33aaf36cee8ec586dbc9c1abad7f20977..55dadab169f03b6d3ee38a085ac4ab3b577bb1bd 100644 --- a/library/templates/Intonation/Library/Widget/Carousel/Form.php +++ b/library/templates/Intonation/Library/Widget/Carousel/Form.php @@ -132,7 +132,9 @@ class Intonation_Library_Widget_Carousel_Form extends ZendAfi_Form_Configuration public function getLayouts() { return [Intonation_Library_Widget_Carousel_Definition::CAROUSEL => $this->_('Carousel'), - Intonation_Library_Widget_Carousel_Definition::MULTIPLE_CAROUSEL => $this->_('Carousel à colonnes'), + Intonation_Library_Widget_Carousel_Definition::MULTIPLE_CAROUSEL => $this->_('Carousel à 3 colonnes'), + Intonation_Library_Widget_Carousel_Definition::MULTIPLE_CAROUSEL_PLUS => $this->_('Carousel à 5 colonnes'), + Intonation_Library_Widget_Carousel_Definition::GRID => $this->_('Grille'), Intonation_Library_Widget_Carousel_Definition::HORIZONTAL_LISTING => $this->_('Liste horizontale'), Intonation_Library_Widget_Carousel_Definition::LISTING => $this->_('Liste verticale'), Intonation_Library_Widget_Carousel_Definition::LISTING_WITH_OPTIONS => $this->_('Liste verticale à interactions'), diff --git a/library/templates/Intonation/Library/Widget/Carousel/View.php b/library/templates/Intonation/Library/Widget/Carousel/View.php index 60670ec72e02ac2c188d1e62983e0b8da3b30793..170c8333db2abad5a2f7f42b4716922f6ef806e0 100644 --- a/library/templates/Intonation/Library/Widget/Carousel/View.php +++ b/library/templates/Intonation/Library/Widget/Carousel/View.php @@ -203,6 +203,12 @@ abstract class Intonation_Library_Widget_Carousel_View extends Zendafi_View_Help if (Intonation_Library_Widget_Carousel_Definition::HORIZONTAL_LISTING == $layout) return $this->view->renderHorizontalList($elements, $content_callback); + if (Intonation_Library_Widget_Carousel_Definition::MULTIPLE_CAROUSEL_PLUS == $layout) + return $this->view->renderMultipleCarousel($elements, $content_callback, 5); + + if (Intonation_Library_Widget_Carousel_Definition::GRID == $layout) + return $this->view->renderWallGrid($elements, $content_callback); + return $this->view->renderMultipleCarousel($elements, $content_callback); } @@ -246,6 +252,7 @@ abstract class Intonation_Library_Widget_Carousel_View extends Zendafi_View_Help 'action' => 'simple', 'id_catalogue' => $this->_settings->getIdCatalogue(), 'id_panier' => $this->_settings->getIdPanier(), + 'tri' => $this->_settings->getOrder(), 'titre' => str_replace(['/', '%2F'], ' ', $this->_settings->getTitre())]), null, true); diff --git a/library/templates/Intonation/System/Section/Footer.php b/library/templates/Intonation/System/Section/Footer.php index 36bd9b03bc3c06d6ef452691588cb4ad447f611a..56f2c1c6a1e97b5783a069483f3c4f3ef2e266de 100644 --- a/library/templates/Intonation/System/Section/Footer.php +++ b/library/templates/Intonation/System/Section/Footer.php @@ -21,6 +21,19 @@ class Intonation_System_Section_Footer extends Intonation_System_Section { + public function __construct() { + $profile = Class_Template::current()->getProfile(); + + $profile_id = $profile->hasParentId() + ? $profile->getParentId() + : $profile->getId(); + + $this->setSettings($this->getSettingsInstance() + ->setProfileId($profile_id) + ->load()); + } + + public function getSettingsInstance() { return new Class_Systeme_Widget_Section_Footer; } diff --git a/library/templates/Intonation/System/Section/Header.php b/library/templates/Intonation/System/Section/Header.php index 902ba65fe125851d68b333212c90828c2d9698a6..c4b74e06224f01fc66ce155fe395fcc03821f53d 100644 --- a/library/templates/Intonation/System/Section/Header.php +++ b/library/templates/Intonation/System/Section/Header.php @@ -21,6 +21,19 @@ class Intonation_System_Section_Header extends Intonation_System_Section { + public function __construct() { + $profile = Class_Template::current()->getProfile(); + + $profile_id = $profile->hasParentId() + ? $profile->getParentId() + : $profile->getId(); + + $this->setSettings($this->getSettingsInstance() + ->setProfileId($profile_id) + ->load()); + } + + public function getSettingsInstance() { return new Class_Systeme_Widget_Section_Header; } diff --git a/library/templates/Intonation/View/Gridify.php b/library/templates/Intonation/View/Gridify.php index 055fdbe130686f7918522a65e3363b96eaf5a8b8..f844ed2376f995e63871fa37dd8ccd7eb92e7297 100644 --- a/library/templates/Intonation/View/Gridify.php +++ b/library/templates/Intonation/View/Gridify.php @@ -34,9 +34,19 @@ class Intonation_View_Gridify extends ZendAfi_View_Helper_BaseHelper { $rows [$i] = $this->_tag('div', implode($items), - ['class' => 3 == count($items) ? 'card-deck' : 'card-columns']); + ['class' => $this->_getWrapperClass($items, $columns)]); } return new Storm_Collection($rows); } + + + protected function _getWrapperClass($items, $columns) { + if ( 3 < $columns) + return 'card_grid'; + + return 3 == count($items) + ? 'card-deck' + : 'card-columns'; + } } \ No newline at end of file diff --git a/library/templates/Intonation/View/Permalink.php b/library/templates/Intonation/View/Permalink.php index ecd63d6a9df15275baf26b2859059c0fd2f058bb..46109c427c4f84eda567d238abb2300b8e216ee1 100644 --- a/library/templates/Intonation/View/Permalink.php +++ b/library/templates/Intonation/View/Permalink.php @@ -29,7 +29,7 @@ class Intonation_View_Permalink extends ZendAfi_View_Helper_BaseHelper { 'Image' => $image, 'Title' => $this->view->_('Voir le lien permanent suivant: %s', $url), 'Class' => 'permalink py-1 my-1', - 'attribs' => ['data-url' => $url, + 'Attribs' => ['data-url' => $url, 'data-helptext' => $this->view->_('Copiez le lien suivant'), 'onclick' => 'popupPermalink(this);']])); } diff --git a/library/templates/Intonation/View/RenderRecord/RenderItems.php b/library/templates/Intonation/View/RenderRecord/RenderItems.php index cffa3272638224ebaf3f6b52bbe6346501457fe8..59c57799e325a522237a55faf6ae45f07fa924bb 100644 --- a/library/templates/Intonation/View/RenderRecord/RenderItems.php +++ b/library/templates/Intonation/View/RenderRecord/RenderItems.php @@ -31,7 +31,6 @@ class Intonation_View_RenderRecord_RenderItems extends ZendAfi_View_Helper_BaseH ->setView($this->view) ->setModel($element); }, array_merge($items, $same_work)); - $html = []; if ($map = $this->view->osmMap($elements)) $html [] = $this->view->div(['class' => 'col-12 mb-3 items_map'], @@ -52,10 +51,64 @@ class Intonation_View_RenderRecord_RenderItems extends ZendAfi_View_Helper_BaseH protected function _getHtmlItems($items) { + $items = $this->_sortItems($items); + $callback = function ($element) { return $this->view->cardifyOnlyDescription($element); }; + $elements = array_map(function($element) + { + return (new Intonation_Library_View_Wrapper_Item) + ->setView($this->view) + ->setModel($element); + }, $items); + + return $this->view->renderWall(new Storm_Collection($elements), $callback); + } + + + protected function _sortItems($items) { + $profile = Class_Profil::getCurrentProfil(); + + $preferences = $profile->hasParentId() + ? $profile->getParentProfil()->getItemsSettings() + : $profile->getItemsSettings(); + + if ( ! isset($preferences['order_by'])) + return $this->_sortByAvailability($items); + + if ( ! $order = $preferences['order_by']) + return $this->_sortByAvailability($items); + + if ( ! isset($preferences['order_direction'])) + return $this->_sortByAvailability($items); + + $direction = $preferences['order_direction']; + + usort( + $items, + function($a, $b) use ($order, $direction) { + $aValue = strtolower((string) $a->getSubfield($order)); + $bValue = strtolower((string) $b->getSubfield($order)); + + $is_desc = 'DESC' == $direction; + + $result = strnatcmp($aValue, $bValue); + + if (0 === $result) + return 0; + + return $is_desc + ? -1 * $result + : $result; + }); + + return $items; + } + + + protected function _sortByAvailability($items) { usort($items, function($a, $b) { @@ -65,13 +118,6 @@ class Intonation_View_RenderRecord_RenderItems extends ZendAfi_View_Helper_BaseH return $a->isDisponible(true) ? -1 : 1; }); - $elements = array_map(function($element) - { - return (new Intonation_Library_View_Wrapper_Item) - ->setView($this->view) - ->setModel($element); - }, $items); - - return $this->view->renderWall(new Storm_Collection($elements), $callback); + return $items; } } diff --git a/library/templates/Intonation/View/RenderWall.php b/library/templates/Intonation/View/RenderWall.php index b91431df63becc2903532ab853dd6e295838b998..ef6a6fe3e3808cd56c6b101fd78fc7dafb950d6d 100644 --- a/library/templates/Intonation/View/RenderWall.php +++ b/library/templates/Intonation/View/RenderWall.php @@ -42,6 +42,11 @@ class Intonation_View_RenderWall extends ZendAfi_View_Helper_BaseHelper { return $html; })); + return $this->_renderHtml($html); + } + + + protected function _renderHtml($html) { return $this->_tag('div', implode($html), ['class' => 'masonry', diff --git a/library/templates/Intonation/View/RenderWallGrid.php b/library/templates/Intonation/View/RenderWallGrid.php new file mode 100644 index 0000000000000000000000000000000000000000..91a98d194e0641dc0bb955a8736cc039a1b894b6 --- /dev/null +++ b/library/templates/Intonation/View/RenderWallGrid.php @@ -0,0 +1,36 @@ +<?php +/** + * Copyright (c) 2012-2018, 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 Intonation_View_RenderWallGrid extends Intonation_View_RenderWall { + + public function renderWallGrid($collection, $callback) { + return parent::renderWall($collection, $callback); + } + + + protected function _renderHtml($html) { + return $this->_tag('div', + implode($html), + ['class' => 'masonry masonry_grid', + 'id' => $this->_masonry_id]); + } +} \ No newline at end of file diff --git a/library/templates/Intonation/View/SocialNetworksActions.php b/library/templates/Intonation/View/SocialNetworksActions.php index dd9e71cecf1f3e875c69b34fcddd9a287a4c0be3..c828d30f534e8ce0a79a26bf0c1a0ab5273b3f3c 100644 --- a/library/templates/Intonation/View/SocialNetworksActions.php +++ b/library/templates/Intonation/View/SocialNetworksActions.php @@ -45,4 +45,11 @@ class Intonation_View_SocialNetworksActions extends ZendAfi_View_Helper_ReseauxS return ''; } + + + public function links($info_to_share) { + $this->shareLinkHtmlHeader($info_to_share); + $this->_actions [] = $this->view->permalink($this->view->absoluteUrl($info_to_share['url_to_share'])); + return ''; + } } diff --git a/library/templates/TerreDuMilieu/Library/ProfilePatcher.php b/library/templates/TerreDuMilieu/Library/ProfilePatcher.php index 7b99f07d2639288355ecde71ebccc3a1214d1262..37e303e483277fcf8a94a32e068f9f42309f1159 100644 --- a/library/templates/TerreDuMilieu/Library/ProfilePatcher.php +++ b/library/templates/TerreDuMilieu/Library/ProfilePatcher.php @@ -148,7 +148,7 @@ class TerreDuMilieu_Library_ProfilePatcher extends Intonation_Library_ProfilePat 'url' => ''], ['type_menu' => 'MODULE_ACCUEIL_RECH_SIMPLE', - 'type_module' => 'RECH_SIMPLE', + 'type_module' => 'MODULE_ACCUEIL_RECH_SIMPLE', 'libelle' => $this->_('Rechercher'), 'preferences' => ['titre' => $this->_('Recherche'), 'boite' => ['no_border', 'no_border_radius', 'no_shadow', 'no_background', 'tdm_search_widget', 'm-auto'], diff --git a/public/opac/css/core.css b/public/opac/css/core.css index 228a07d36ea691ae6e6e17a5c3db4fea145b6b90..c5b4d238c6bbc4d0457aa4ce5e3476e970101a07 100644 --- a/public/opac/css/core.css +++ b/public/opac/css/core.css @@ -80,30 +80,6 @@ section { display: block !important; } -.masonry { - display: grid; - grid-gap: 1em; - grid-template-columns: repeat( auto-fill, minmax(200px, 1fr) ); - grid-auto-rows: 0; -} - -.masonry-brick { - visibility: hidden; -} - -.card-img-top > .masonry, -.img-thumbnail > .masonry { - grid-gap: 3px; - grid-template-columns: repeat(3, 30%); -} - -.card-img-top > .masonry .card-img-overlay div, -.img-thumbnail > .masonry .card-img-overlay div { - display: none; - visibility: hidden; -} - - .img-thumbnail[src=''] { display: none; } diff --git a/tests/application/modules/opac/controllers/AbonneControllerActivitiesTest.php b/tests/application/modules/opac/controllers/AbonneControllerActivitiesTest.php index ce7abcf4d0e4a5bd5b5c8b0c41aa010483f78b83..fb147219ade0442577b14bbe9cb017dbaeeaadd6 100644 --- a/tests/application/modules/opac/controllers/AbonneControllerActivitiesTest.php +++ b/tests/application/modules/opac/controllers/AbonneControllerActivitiesTest.php @@ -911,8 +911,8 @@ class AbonneControllerActivitiesInscritSessionWithoutRightSuivreActivityTest ext /** @test */ - public function amadouShouldNotBeValid() { - $this->assertFalse($this->_amadou->isValid()); + public function amadouShouldStayValid() { + $this->assertTrue($this->_amadou->isValid()); } } @@ -990,9 +990,7 @@ class AbonneControllerActivitiesAmadouDesinscritSessionJuilletPythonTest /** @test */ function inscriptionObjectShouldHaveBeenDeleted() { - $inscription = Class_SessionActivityInscription::find(1); - $this->assertEquals(121, $inscription->getSessionActivityId()); - $this->assertEquals(435, $inscription->getStagiaireId()); + $this->assertEmpty(Class_SessionActivityInscription::findAll()); } diff --git a/tests/scenarios/Templates/TemplatesTest.php b/tests/scenarios/Templates/TemplatesTest.php index 029e7ae3d0cdb93ed1be066dcd838e0eb7a66eba..e3743f4c4c197e6135b3220434c8f3cc18600840 100644 --- a/tests/scenarios/Templates/TemplatesTest.php +++ b/tests/scenarios/Templates/TemplatesTest.php @@ -2092,7 +2092,7 @@ class TemplatesViewRecordTest extends TemplatesIntonationTestCase { /** @test */ public function shouldBeANovelty() { - $this->assertXPathContentContains('//span', 'Nouveauté'); + $this->assertXPathContentContains('//a[contains(@href, "/nouveaute/1")]', 'Nouveauté'); } diff --git a/tests/scenarios/Xsl/XslTest.php b/tests/scenarios/Xsl/XslTest.php index dd44802ba575de1786b317ab6d99480d61970188..dec647e2b1a88b55c5bb0627dbedd70082fb0b1c 100644 --- a/tests/scenarios/Xsl/XslTest.php +++ b/tests/scenarios/Xsl/XslTest.php @@ -330,7 +330,7 @@ class XslNoticeajaxDetailDispatchWithoutXSLTest extends AbstractControllerTestCa /** @test */ public function plzInstallXSLErrorShouldBeDisplay() { - $this->assertXPathContentContains('//p', "L'extension PHP XSL"); + $this->assertXPathContentContains('//p', "L'extension PHP XSL", $this->_response->getBody()); } } @@ -567,31 +567,6 @@ class XslSearchResultDispatchTest extends AbstractControllerTestCase { -class XslMarcToXmlTest extends AbstractControllerTestCase { - protected $_storm_default_to_volatile = true; - protected $_output; - - public function setUp() { - parent::setUp(); - - $notice_unimarc = "02517nm40 22004331i 450 001000700000100004100007101000800048200002200056210000900078215001100087317000500098330072600103610001200829610002200841610001300863701002400876701002200900701002800922701002300950701002000973701002500993701002501018701002701043701002901070701002501099701002801124701002901152701002101181856005901202856009301261856009301354856009401447856009401541856009201635856009201727856009201819856009201911856008002003506625 a20200328a|||||||||||y0frey0103####ba0 afre1 aUn singe en hiver d20201 a105 mn a aEn juin 1944, Albert Quentin, ancien fusilier marin en Indochine, est propriétaire d'un hôtel dans un village normand. Un beau jour où, une fois de plus, il a un peu trop bu, il prend brutalement conscience qu'il n'est plus sur le pont de son navire, quelque part dans la mer de Chine, mais dans son établissement, sous un intense bombardement allié. Il fait le serment de ne plus boire s'il en réchappe. Promesse tenue depuis lors, au grand plaisir de madame Quentin. Un soir d'hiver, le jeune Gabriel Fouquet arrive à l'hôtel et se met à boire pour oublier son mariage malheureux. Albert se prend d'affection pour son hôte et finit par partager avec lui une monumentale beuverie...1 aCinéma1 aCulte & Classique1 aComédie1 aVerneuil Henri43001 aFlon Suzanne40051 aBelmondo Jean-Paul40051 aFrankeur Paul40051 aGabin Jean40051 aArnold Marcelle40051 aRoquevert Noël40051 aDorziat Gabrielle40051 aDieudonné Hélène40051 aDalibert André40051 aMargollé Sylviane40051 aCoffinet Anne-Marie40051 aPetri Hella4005 ahttp://bdp10.afi-sa.net/bib-numerique/notice/ido/156821 xposterahttps://medias.mednum.lab.arte.tv/59/d6/59d65c75-129a-11ea-ba43-3783b3d44f36.jpg1 xposterahttps://medias.mednum.lab.arte.tv/59/d6/59d65c75-129a-11ea-ba43-3783b3d44f36.jpg1 xtrailerahttps://medias.mednum.lab.arte.tv/51/d1/51d1de0f-3bd8-4057-a3c5-5143b512b645.mp41 xtrailerahttps://medias.mednum.lab.arte.tv/51/d1/51d1de0f-3bd8-4057-a3c5-5143b512b645.mp41 xphotoahttps://medias.mednum.lab.arte.tv/63/40/6340654a-129a-11ea-ba05-215aa6b24520.jpg1 xphotoahttps://medias.mednum.lab.arte.tv/66/fa/66fa5cca-129a-11ea-a60c-e94b466690d8.jpg1 xphotoahttps://medias.mednum.lab.arte.tv/5f/4b/5f4bb9f5-129a-11ea-99a7-11eda40fb68f.jpg1 xphotoahttps://medias.mednum.lab.arte.tv/ad/76/ad763020-cd01-49a3-913d-9395add44648.jpg1 xexternal_uriahttps://vod.mediatheque-numerique.com/films/un-singe-en-hiver"; - - $this->_output = (new Class_Testing_Yaz())->marcToMarcXml($notice_unimarc); - } - - - /** @test */ - public function marcxmlTransformedshouldDisplayMarcWithHTMLEntities() { - $this->assertContains(''', implode("\n",$this->_output)); - } - - - /** @test */ - public function marcXmlTransformshouldContainsCulteAndClassique() { - $this->assertContains('Culte & Classique', implode("\n",$this->_output)); - } -} - class XslSearchResultDispatchWithEmptyTransformTest extends AbstractControllerTestCase { @@ -669,6 +644,54 @@ class XslSearchResultDispatchWithEmptyTransformTest extends AbstractControllerTe /** @test */ public function pageShouldContainEmptyTransformMessage() { - $this->assertXPathContentContains('//p[@class="error"]', 'a produit un résultat vide'); + $this->assertXPathContentContains('//p[@class="error"]', 'a produit un résultat vide', $this->_response->getBody()); } -} \ No newline at end of file +} + + + + +class XslViewHelperWithHtmlEntitiesTest extends ViewHelperTestCase { + protected + $_storm_default_to_volatile = true, + $_html, + $_xml, + $_xsl_transforms; + + public function fileNamesToExert() { + return [['notice_with_entities.xml'], + ['notice_artevod_with_entities.xml']]; + } + + + /** + * @test + * @see http://forge.afi-sa.fr/issues/111976 + * @see http://forge.afi-sa.fr/issues/111887 + * + * @dataProvider fileNamesToExert + */ + public function htmlShouldNotContainsInvalidEntities($filename) { + $mock_elements = $this->_buildMocks($filename); + + $helper = (new ZendAfi_View_Helper_Notice_Xsl())->setView($this->view); + $this->_html = $helper->Notice_Xsl($mock_elements); + $matches = []; + preg_match_all('/(?:&)[a-z#0-9]+;/', $this->_html, $matches); + + $this->assertEquals(0, sizeof($matches[0]), 'Fail asserting document CONTAINS ONLY VALID entities'); + } + + + protected function _buildMocks($filename) { + $xml = file_get_contents(__DIR__ . '/' . $filename); + $inner_transform = $this->mock() + ->whencalled('isSuccess') + ->answers(true) + ->whenCalled('content') + ->answers($xml); + return $this->mock() + ->whenCalled('transform') + ->answers($inner_transform); + } +} diff --git a/tests/scenarios/Xsl/notice_artevod_with_entities.xml b/tests/scenarios/Xsl/notice_artevod_with_entities.xml new file mode 100644 index 0000000000000000000000000000000000000000..cea7c2b3fe8c0dcb7eab9f84c076346bef02a1d1 --- /dev/null +++ b/tests/scenarios/Xsl/notice_artevod_with_entities.xml @@ -0,0 +1,127 @@ +<collection xmlns="http://www.loc.gov/MARC21/slim"> +<record> + <leader>02517nm40a22004331i 450 </leader> + <controlfield tag="001">506625</controlfield> + <datafield tag="100" ind1=" " ind2=" "> + <subfield code="a">20200328a|||||||||||y0frey0103####ba</subfield> + </datafield> + <datafield tag="101" ind1="0" ind2=" "> + <subfield code="a">fre</subfield> + </datafield> + <datafield tag="200" ind1="1" ind2=" "> + <subfield code="a">Un singe en hiver</subfield> + </datafield> + <datafield tag="210" ind1=" " ind2=" "> + <subfield code="d">2020</subfield> + </datafield> + <datafield tag="215" ind1="1" ind2=" "> + <subfield code="a">105 mn</subfield> + </datafield> + <datafield tag="317" ind1=" " ind2=" "> + <subfield code="a"></subfield> + </datafield> + <datafield tag="330" ind1=" " ind2=" "> + <subfield code="a">En juin 1944, Albert Quentin, ancien fusilier marin en Indochine, est propriétaire d&#39;un hôtel dans un village normand. Un beau jour où, une fois de plus, il a un peu trop bu, il prend brutalement conscience qu&#39;il n&#39;est plus sur le pont de son navire, quelque part dans la mer de Chine, mais dans son établissement, sous un intense bombardement allié. Il fait le serment de ne plus boire s&#39;il en réchappe. Promesse tenue depuis lors, au grand plaisir de madame Quentin. Un soir d&#39;hiver, le jeune Gabriel Fouquet arrive à l&#39;hôtel et se met à boire pour oublier son mariage malheureux. Albert se prend d&#39;affection pour son hôte et finit par partager avec lui une monumentale beuverie...</subfield> + </datafield> + <datafield tag="610" ind1="1" ind2=" "> + <subfield code="a">Cinéma</subfield> + </datafield> + <datafield tag="610" ind1="1" ind2=" "> + <subfield code="a">Culte & Classique</subfield> + </datafield> + <datafield tag="610" ind1="1" ind2=" "> + <subfield code="a">Comédie</subfield> + </datafield> + <datafield tag="701" ind1="1" ind2=" "> + <subfield code="a">Verneuil Henri</subfield> + <subfield code="4">300</subfield> + </datafield> + <datafield tag="701" ind1="1" ind2=" "> + <subfield code="a">Flon Suzanne</subfield> + <subfield code="4">005</subfield> + </datafield> + <datafield tag="701" ind1="1" ind2=" "> + <subfield code="a">Belmondo Jean-Paul</subfield> + <subfield code="4">005</subfield> + </datafield> + <datafield tag="701" ind1="1" ind2=" "> + <subfield code="a">Frankeur Paul</subfield> + <subfield code="4">005</subfield> + </datafield> + <datafield tag="701" ind1="1" ind2=" "> + <subfield code="a">Gabin Jean</subfield> + <subfield code="4">005</subfield> + </datafield> + <datafield tag="701" ind1="1" ind2=" "> + <subfield code="a">Arnold Marcelle</subfield> + <subfield code="4">005</subfield> + </datafield> + <datafield tag="701" ind1="1" ind2=" "> + <subfield code="a">Roquevert Noël</subfield> + <subfield code="4">005</subfield> + </datafield> + <datafield tag="701" ind1="1" ind2=" "> + <subfield code="a">Dorziat Gabrielle</subfield> + <subfield code="4">005</subfield> + </datafield> + <datafield tag="701" ind1="1" ind2=" "> + <subfield code="a">Dieudonné Hélène</subfield> + <subfield code="4">005</subfield> + </datafield> + <datafield tag="701" ind1="1" ind2=" "> + <subfield code="a">Dalibert André</subfield> + <subfield code="4">005</subfield> + </datafield> + <datafield tag="701" ind1="1" ind2=" "> + <subfield code="a">Margollé Sylviane</subfield> + <subfield code="4">005</subfield> + </datafield> + <datafield tag="701" ind1="1" ind2=" "> + <subfield code="a">Coffinet Anne-Marie</subfield> + <subfield code="4">005</subfield> + </datafield> + <datafield tag="701" ind1="1" ind2=" "> + <subfield code="a">Petri Hella</subfield> + <subfield code="4">005</subfield> + </datafield> + <datafield tag="856" ind1=" " ind2=" "> + <subfield code="a">http://bdp10.afi-sa.net/bib-numerique/notice/ido/15682</subfield> + </datafield> + <datafield tag="856" ind1="1" ind2=" "> + <subfield code="x">poster</subfield> + <subfield code="a">https://medias.mednum.lab.arte.tv/59/d6/59d65c75-129a-11ea-ba43-3783b3d44f36.jpg</subfield> + </datafield> + <datafield tag="856" ind1="1" ind2=" "> + <subfield code="x">poster</subfield> + <subfield code="a">https://medias.mednum.lab.arte.tv/59/d6/59d65c75-129a-11ea-ba43-3783b3d44f36.jpg</subfield> + </datafield> + <datafield tag="856" ind1="1" ind2=" "> + <subfield code="x">trailer</subfield> + <subfield code="a">https://medias.mednum.lab.arte.tv/51/d1/51d1de0f-3bd8-4057-a3c5-5143b512b645.mp4</subfield> + </datafield> + <datafield tag="856" ind1="1" ind2=" "> + <subfield code="x">trailer</subfield> + <subfield code="a">https://medias.mednum.lab.arte.tv/51/d1/51d1de0f-3bd8-4057-a3c5-5143b512b645.mp4</subfield> + </datafield> + <datafield tag="856" ind1="1" ind2=" "> + <subfield code="x">photo</subfield> + <subfield code="a">https://medias.mednum.lab.arte.tv/63/40/6340654a-129a-11ea-ba05-215aa6b24520.jpg</subfield> + </datafield> + <datafield tag="856" ind1="1" ind2=" "> + <subfield code="x">photo</subfield> + <subfield code="a">https://medias.mednum.lab.arte.tv/66/fa/66fa5cca-129a-11ea-a60c-e94b466690d8.jpg</subfield> + </datafield> + <datafield tag="856" ind1="1" ind2=" "> + <subfield code="x">photo</subfield> + <subfield code="a">https://medias.mednum.lab.arte.tv/5f/4b/5f4bb9f5-129a-11ea-99a7-11eda40fb68f.jpg</subfield> + </datafield> + <datafield tag="856" ind1="1" ind2=" "> + <subfield code="x">photo</subfield> + <subfield code="a">https://medias.mednum.lab.arte.tv/ad/76/ad763020-cd01-49a3-913d-9395add44648.jpg</subfield> + </datafield> + <datafield tag="856" ind1="1" ind2=" "> + <subfield code="x">external_uri</subfield> + <subfield code="a">https://vod.mediatheque-numerique.com/films/un-singe-en-hiver</subfield> + </datafield> +</record> +</collection> diff --git a/tests/scenarios/Xsl/notice_with_entities.xml b/tests/scenarios/Xsl/notice_with_entities.xml new file mode 100644 index 0000000000000000000000000000000000000000..81383cbda22853698767002c765b8f35d5a47eae --- /dev/null +++ b/tests/scenarios/Xsl/notice_with_entities.xml @@ -0,0 +1,38 @@ +<collection xmlns="http://www.loc.gov/MARC21/slim"> +<record> + <leader>01493nm40a22001331i 450 </leader> + <controlfield tag="001">126103</controlfield> + <datafield tag="100" ind1=" " ind2=" "> + <subfield code="a">20200518a|||||||||||y0frey0103####ba</subfield> + </datafield> + <datafield tag="101" ind1="0" ind2=" "> + <subfield code="a">fre</subfield> + </datafield> + <datafield tag="200" ind1="1" ind2=" "> + <subfield code="e">Revues et ouvrages en sciences humaines et sociales</subfield> + </datafield> + <datafield tag="200" ind1="1" ind2=" "> + <subfield code="a">CAIRN</subfield> + </datafield> + <datafield tag="210" ind1=" " ind2=" "> + <subfield code="d"></subfield> + </datafield> + <datafield tag="317" ind1=" " ind2=" "> + <subfield code="a"></subfield> + </datafield> + <datafield tag="330" ind1=" " ind2=" "> + <subfield code="a">&middot;&nbsp; Cairn Que sais-je ? / Rep&egrave;res : Acc&egrave;s au texte int&eacute;gral des collections Que sais-je ? et Rep&egrave;res (plus de 1 565 livres). + +&middot;&nbsp; Cairn Magazines : Acc&egrave;s au texte int&eacute;gral de 9 magazines : Alternatives &eacute;conomiques, Alternatives internationales, Books, L&rsquo;Histoire, Le Magazine litt&eacute;raire, Mani&egrave;re de voir, Le Monde diplomatique, Sciences humaines, Les grands dossiers des sciences humaines. + +&middot;&nbsp; Cairn Ouvrages : Acc&egrave;s &agrave; plus de 10 152 livres en texte int&eacute;gral, &eacute;dit&eacute;s entre autre par La D&eacute;couverte, Presses de Sciences Po, De Boeck, Er&egrave;s, L&rsquo;Esprit du Temps et Autrement. + +&middot;&nbsp; Cairn Revues : Acc&egrave;s au texte int&eacute;gral des articles issus de plus de 516 revues scientifiques, depuis 2001. Il comprend par exemple : Critique internationale, Raisons politiques, Revue fran&ccedil;aise de science politique, Vingti&egrave;me si&egrave;cle, H&eacute;rodote, Revue d&rsquo;histoire moderne et contemporaine, Soci&eacute;t&eacute;s +</subfield> + </datafield> + <datafield tag="464" ind1=" " ind2=" "> + <subfield code="t">https://www.cairn.info/</subfield> + <subfield code="3">http://bibliotheque.sciencespo-grenoble.fr/bib-numerique/play-ressource/id/25.info</subfield> + </datafield> +</record> +</collection>