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/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/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/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é'); }