From e8358ddd2b5d20facbdf5e5c81872c77273ff826 Mon Sep 17 00:00:00 2001 From: gloas <gloas@afi-sa.fr> Date: Thu, 21 Feb 2019 17:19:43 +0100 Subject: [PATCH] dev #64573 wip on record view --- .../templates/Intonation/Assets/css/intonation.css | 6 ++++++ library/templates/Intonation/Library/Settings.php | 2 +- .../Intonation/View/Author/RenderWikipedia.php | 3 +++ library/templates/Intonation/View/Cardify.php | 7 +------ .../templates/Intonation/View/CardifyWithOverlay.php | 9 ++------- library/templates/Intonation/View/RenderRecord.php | 12 +++--------- 6 files changed, 16 insertions(+), 23 deletions(-) diff --git a/library/templates/Intonation/Assets/css/intonation.css b/library/templates/Intonation/Assets/css/intonation.css index 0563a9fc979..bbaacc5a7d1 100644 --- a/library/templates/Intonation/Assets/css/intonation.css +++ b/library/templates/Intonation/Assets/css/intonation.css @@ -407,4 +407,10 @@ label[for=note] ~ div label.multi-element-label + br { .badge { white-space: normal; +} + +main.col, +aside.col, +healer.col { + overflow: hidden; } \ No newline at end of file diff --git a/library/templates/Intonation/Library/Settings.php b/library/templates/Intonation/Library/Settings.php index fb591f41ebf..4b004dd611c 100644 --- a/library/templates/Intonation/Library/Settings.php +++ b/library/templates/Intonation/Library/Settings.php @@ -64,7 +64,7 @@ class Intonation_Library_Settings extends Intonation_System_Abstract { ], 'hydrating_mapping' => ['div id site_web_wrapper' => 'container align-self-center', - 'div id site_web_content_wrapper' => 'row justify-content-center', + 'div id site_web_content_wrapper' => 'row justify-content-center no-gutters', 'div class section_wrapper' => 'container-fluid', 'div class section_content_wrapper' => 'row no-gutters', 'div class widget' => 'card', diff --git a/library/templates/Intonation/View/Author/RenderWikipedia.php b/library/templates/Intonation/View/Author/RenderWikipedia.php index 2089d3bb0a1..5eab8289861 100644 --- a/library/templates/Intonation/View/Author/RenderWikipedia.php +++ b/library/templates/Intonation/View/Author/RenderWikipedia.php @@ -25,6 +25,9 @@ class Intonation_View_Author_RenderWikipedia extends ZendAfi_View_Helper_BaseHel if (!$bio = $author->renderWikipediaOn($this->view)) return ''; + $bio = $this->_tag('h2', $this->_tag('span', $this->_('Introduction'))) + . $bio; + $dom = new DOMDocument(); try { diff --git a/library/templates/Intonation/View/Cardify.php b/library/templates/Intonation/View/Cardify.php index ebd2a51c1b8..4e2fb568425 100644 --- a/library/templates/Intonation/View/Cardify.php +++ b/library/templates/Intonation/View/Cardify.php @@ -28,12 +28,7 @@ class Intonation_View_Cardify extends ZendAfi_View_Helper_BaseHelper { protected function _cardWithPicture($element) { $img = $this->view->tagImg($element->getPicture(), - ['class' => 'card-img-top', - 'alt' => ($element->getPicture() - ? $this->_('Aïe, aïe, aïe ! L\'image "%s" est brisée.', - $element->getPicture()) - : $this->_('Aïe, aïe, aïe ! Pas d\'image pour "%s".', - $element->getTitle()))]); + ['class' => 'card-img-top']); return $this->view->cardifyOnlyDescription($element, $img); } diff --git a/library/templates/Intonation/View/CardifyWithOverlay.php b/library/templates/Intonation/View/CardifyWithOverlay.php index ab18955504b..01cdf26e5e5 100644 --- a/library/templates/Intonation/View/CardifyWithOverlay.php +++ b/library/templates/Intonation/View/CardifyWithOverlay.php @@ -24,7 +24,7 @@ class Intonation_View_CardifyWithOverlay extends ZendAfi_View_Helper_BaseHelper public function cardifyWithOverlay($element) { return $this->_tag('div', $this->_cardWithPicture($element), - ['class' => 'card no_overflow']); + ['class' => 'card no_overflow text-center']); } @@ -63,12 +63,7 @@ class Intonation_View_CardifyWithOverlay extends ZendAfi_View_Helper_BaseHelper ['class' => 'card-block card-img-overlay rounded text-center']); $img = $this->view->tagImg($element->getPicture(), - ['class' => 'text-center img_as_background text-muted', - 'alt' => ($element->getPicture() - ? $this->_('Aïe, aïe, aïe ! L\'image "%s" est brisée.', - $element->getPicture()) - : $this->_('Aïe, aïe, aïe ! Pas d\'image pour "%s".', - $element->getTitle()))]); + ['class' => 'text-center img_as_background text-muted']); return $img . $overlay; } diff --git a/library/templates/Intonation/View/RenderRecord.php b/library/templates/Intonation/View/RenderRecord.php index b37cd1eb2e6..5e2aa1996f0 100644 --- a/library/templates/Intonation/View/RenderRecord.php +++ b/library/templates/Intonation/View/RenderRecord.php @@ -137,24 +137,19 @@ class Intonation_View_RenderRecord extends ZendAfi_View_Helper_BaseHelper { $html = []; if ($same_series = $this->_record->getNoticesMemeSeries()) - $html [] = $this->_div(['class' => 'col-12'], + $html [] = $this->_div(['class' => 'col-12 mt-3'], $this->_tag('h2', $this->_('Les documents de la même série')) . $this->view->renderMultipleCarousel(new Storm_Collection($same_series), $callback)); if ($like = $this->_record->getNoticesSimilaires()) - $html [] = $this->_div(['class' => 'col-12'], + $html [] = $this->_div(['class' => 'col-12 mt-3'], $this->_tag('h2', $this->_('Les similaires')) . $this->view->renderMultipleCarousel(new Storm_Collection($like), $callback)); - return $this->_renderBloc($this->_('Voir Aussi'), $this->_grid(implode($html))); - - $this->_renderAjaxBloc('series') - . $this->_renderAjaxBloc('frbr') - . $this->_renderAjaxBloc('similaires'); } @@ -257,8 +252,7 @@ class Intonation_View_RenderRecord extends ZendAfi_View_Helper_BaseHelper { 'alt' => ($image ? $this->_('Couverture de %s', $this->_getTitle()) - : $this->_('Aïe, aïe, aïe ! Pas d\'image pour "%s".', - $this->_wrapped->getTitle()))]); + : '')]); } -- GitLab