diff --git a/library/templates/Intonation/Assets/css/intonation.css b/library/templates/Intonation/Assets/css/intonation.css index c655262a9aacdde8d0dda0b6f72e1dd0849543a1..a68e62bbf973abf3794c90b98c0d64db6e31f0ff 100644 --- a/library/templates/Intonation/Assets/css/intonation.css +++ b/library/templates/Intonation/Assets/css/intonation.css @@ -80,6 +80,7 @@ p > i { margin-right: 0.5em; } +.nav-link i:first-child, .carousel-control-prev i:first-child, .carousel-control-next i:first-child { margin-right: 0; @@ -392,3 +393,7 @@ label[for=note] ~ div label.multi-element-label + br { .badge .rating-ico { color: inherit; } + +.nav-link { + font-size: 2em; +} \ No newline at end of file diff --git a/library/templates/Intonation/Library/Settings.php b/library/templates/Intonation/Library/Settings.php index a2930c3b1ad68036a4b866a2c777f91930b6d68a..d793262a89e24fe182f3fb1f008caba59ad4f1b5 100644 --- a/library/templates/Intonation/Library/Settings.php +++ b/library/templates/Intonation/Library/Settings.php @@ -96,6 +96,8 @@ class Intonation_Library_Settings extends Intonation_System_Abstract { 'dt' => 'col-12 col-sm-3', 'dd' => 'col-12 col-sm-9', 'a' => 'btn-link', + 'a class active' => '', + 'a class nav-link' => '', 'a class card-link' => '', 'a class account-loans' => 'list-group-item-info', 'ul' => 'list-unstyled', @@ -122,7 +124,14 @@ class Intonation_Library_Settings extends Intonation_System_Abstract { 'return-date' => 'class fas fa-dolly', 'place' => 'class fas fa-map-signs', 'cote' => 'class fas fa-crosshairs', - 'hold' => 'class fas fa-thumbtack'], + 'hold' => 'class fas fa-thumbtack', + 'record' => 'class fas fa-home', + 'related' => 'class fas fa-clone', + 'description' => 'class fas fa-info', + 'resume' => 'class fab fa-readme', + 'reviews' => 'class fas fa-comments', + 'media' => 'class fas fa-images', + ], 'icons_map_utils' => ['image_place_holder' => '/library/templates/Intonation/Assets/images/image_place_holder.png', 'previous' => 'class fas fa-chevron-left', diff --git a/library/templates/Intonation/View/RenderRecord.php b/library/templates/Intonation/View/RenderRecord.php index c42108ba68edd4eaeaa238576a7f1ce9f550d9eb..a092468f922a2c77d5fa7d5775c4a65342f58015 100644 --- a/library/templates/Intonation/View/RenderRecord.php +++ b/library/templates/Intonation/View/RenderRecord.php @@ -124,7 +124,8 @@ class Intonation_View_RenderRecord extends ZendAfi_View_Helper_BaseHelper { $html = $this->_div(['class' => 'col-12 col-sm-6 col-md-4 col-lg-3 col-xl-2 offset-xl-1'], $this->_recordThumbnail()) . $this->_div(['class' => 'col-12 col-md-6 col-lg-7 col-xl-4'], $this->_recordMetaData()) - . $this->_div(['class' => 'mh-100 no-gutters col-12 col-md-10 col-xl-3'], $this->_recordItems()); + . $this->_div(['class' => 'mh-100 no-gutters col-12 col-md-10 col-xl-3'], $this->_recordItems()) + . $this->_div(['class' => 'col-12 col-md-10 col-xl-9 offset-xl-1'], $this->_nav()); return $this->_div(['class' => 'jumbotron jumbotron-fluid w-100 no_overflow'], $this->_grid($html, @@ -133,6 +134,75 @@ class Intonation_View_RenderRecord extends ZendAfi_View_Helper_BaseHelper { } + protected function _nav() { + $current_url = $this->view->url(); + + $template = Class_Template::current(); + + $id = $this->_record->getId(); + + $anchors = [$this->view->tagAnchor(['controller' => 'recherche', + 'action' => 'viewnotice', + 'id' => $id], + $template->getIco($this->view, 'record', 'library'), + ['title' => $this->_('Toutes les informations sur le document'), + 'class' => 'nav-link' . ((false !== strpos($current_url, 'recherche/viewnotice')) ? ' active' : '')]), + + $this->view->tagAnchor(['controller' => 'record', + 'action' => 'resume', + 'id' => $id], + $template->getIco($this->view, 'resume', 'library'), + ['title' => $this->_('Le résumé du document'), + 'class' => 'nav-link' . ((false !== strpos($current_url, 'record/resume')) ? ' active' : '')]), + + $this->view->tagAnchor(['controller' => 'record', + 'action' => 'media', + 'id' => $id], + $template->getIco($this->view, 'media', 'library'), + ['title' => $this->_('Les médias du document'), + 'class' => 'nav-link' . ((false !== strpos($current_url, 'record/media')) ? ' active' : '')]), + + $this->view->tagAnchor(['controller' => 'record', + 'action' => 'reviews', + 'id' => $id], + $template->getIco($this->view, 'reviews', 'library'), + ['title' => $this->_('Les avis du document'), + 'class' => 'nav-link' . ((false !== strpos($current_url, 'record/reviews')) ? ' active' : '')]), + + $this->view->tagAnchor(['controller' => 'record', + 'action' => 'description', + 'id' => $id], + $template->getIco($this->view, 'description', 'library'), + ['title' => $this->_('La description du document'), + 'class' => 'nav-link' . ((false !== strpos($current_url, 'record/description')) ? ' active' : '')]), + + $this->view->tagAnchor(['controller' => 'record', + 'action' => 'related', + 'id' => $id], + $template->getIco($this->view, 'related', 'library'), + ['title' => $this->_('Les documents reliés'), + 'class' => 'nav-link' . ((false !== strpos($current_url, 'record/related')) ? ' active' : '')]), + + $this->view->tagAnchor(['controller' => 'record', + 'action' => 'author', + 'id' => $id], + $template->getIco($this->view, 'author', 'library'), + ['title' => $this->_('L\'auteur principal du document'), + 'class' => 'nav-link' . ((false !== strpos($current_url, 'record/author')) ? ' active' : '')]) + + ]; + + $lis = array_map(function($anchor) + { + return $this->_tag('li', $anchor, ['class' => 'nav-item']); + }, $anchors); + + return $this->_tag('ul', + implode($lis), + ['class' => 'nav nav-tabs nav-fill']); + } + + protected function _recordThumbnail() { $image = $this->_wrapped->getPicture(); return $this->view->tagImg($image,