Skip to content
Snippets Groups Projects
Commit d8095ef6 authored by Ghislain Loas's avatar Ghislain Loas
Browse files

dev #64573 start implementing record nav

parent 59a94853
Branches
Tags
3 merge requests!3297WIP: Master,!3037Master,!2988Dev#64573 templates pour l interface publique libraire bootstrap
Pipeline #6277 passed with stage
in 33 minutes and 51 seconds
......@@ -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
......@@ -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',
......
......@@ -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,
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment