diff --git a/themes/fid_adlr/scss/_customMixins.scss b/themes/fid_adlr/scss/_customMixins.scss index 10e3896d2bb7871b684f0081a68b9fac7f895e7a..71f226d1f26a27817e5123d235d29a61d8b4d968 100644 --- a/themes/fid_adlr/scss/_customMixins.scss +++ b/themes/fid_adlr/scss/_customMixins.scss @@ -1,16 +1,38 @@ // Custom Mixins for fid_adlr -- inherits from finc, which inherits from BS, which inherits from root -@mixin accordeon { +@mixin accordeon ($type) { @include result-list-border($midnight-medium); .active { background-color: transparent; color: $violet; } + [data-toggle="collapse"]::before { + content: '\e927'; + float: left; + font-family: icomoon, sans-serif; + @if $type == 'get-it' { + padding-left: 11px; + margin-left: -$get-it-button-offset-left; + } @else { + padding-right: 10px; + } + } [data-toggle="collapse"]::after { - content: '\2212'; + content: unset; + } + .collapsed::before { + content: '\e92F'; + float: left; + font-family: icomoon, sans-serif; + @if $type == 'get-it' { + padding-left: 11px; + margin-left: -$get-it-button-offset-left; + } @else { + padding-right: 10px; + } } .collapsed::after { - content: '\ff0b'; + content: unset; } .collapse, .collapsing, diff --git a/themes/fid_adlr/scss/_customVariables.scss b/themes/fid_adlr/scss/_customVariables.scss index 3cbbcd4af0bff6da0ec4bdb77536e7be0ce6cfe9..6abca9a2113b85d945baed08dfa272a8568efb57 100644 --- a/themes/fid_adlr/scss/_customVariables.scss +++ b/themes/fid_adlr/scss/_customVariables.scss @@ -338,6 +338,8 @@ $home-services-sub-headline-offset: 50px; //$breadcrumb-active-color: $btn-primary-color !default; //// Sidebar item hover effect (doesn't exist in VF out-of-the-box); active is for selected facets +$get-it-button-offset-left: 40px; +$get-it-link-offset-left: 28px; //$sidebar-item-hover-bg: transparentize($brand-secondary, .9) !default; //$sidebar-item-active-hover-bg: transparentize($brand-primary, .1) !default; diff --git a/themes/fid_adlr/scss/compiled.scss b/themes/fid_adlr/scss/compiled.scss index 81a72b8f733cbc5304c2890e15b1cb776a9e9707..024d601a5fc1d82c185d087351845aeae0da65dd 100644 --- a/themes/fid_adlr/scss/compiled.scss +++ b/themes/fid_adlr/scss/compiled.scss @@ -1577,7 +1577,7 @@ input.searchForm_lookfor { } } .facet-group { - @include accordeon; + @include accordeon(false); } // MyResearch Sidebar Menu - START @@ -1711,7 +1711,7 @@ input.searchForm_lookfor { } } .dbis_description { - @include accordeon; + @include accordeon(false); p { margin: 1em; } @@ -1839,7 +1839,10 @@ input.searchForm_lookfor { } } div[id^="side-panel-"] { - @include accordeon; + @include accordeon(false); +} +div[id^="side-panel-links"] { + @include accordeon('get-it'); } div[class$="-tab"] { .media-body { @@ -1852,11 +1855,22 @@ div[class$="-tab"] { } } +.record-tabs.detailview-box-yellow { + padding-left: 0; +} + +.container .sidebar.right.record { + padding-left: 0; +} + .getitbox { .getitbox-getit { background-color: $midnight; padding: 12px; margin-bottom: 3em; + button:focus { + outline: none; + } h4 { color: $white; } @@ -1866,11 +1880,24 @@ div[class$="-tab"] { padding: 12px; } #side-collapse-links-data { + margin-left: $get-it-link-offset-left; padding: 12px; a { color: $white; - &:hover { - color: inherit; + word-break: break-all; + word-wrap: break-word; + &:active, &:focus, &:hover { + color: $white; + text-decoration: none; + } + } + .icon { + display: inline; + margin-left: -$get-it-link-offset-left; + padding-right: 5px; + vertical-align: unset; + @media screen and (max-width: $screen-md-max) { + font-size: $font-size-base; } } } @@ -1882,6 +1909,7 @@ div[class$="-tab"] { button { background-color: $amber; color: $midnight; + padding-left: $get-it-button-offset-left; } } #side-panel-links-azure { @@ -1889,6 +1917,7 @@ div[class$="-tab"] { button { background-color: $azure; color: $midnight; + padding-left: $get-it-button-offset-left; } } } diff --git a/themes/fid_adlr/templates/RecordTab/acquisitionpda.phtml b/themes/fid_adlr/templates/RecordTab/acquisitionpda.phtml index aaacfcc360d55cd142f9ba43ec87a8349fd68d5e..528fa3856a8a3802fb243bc567e0ba8fb85f4a10 100644 --- a/themes/fid_adlr/templates/RecordTab/acquisitionpda.phtml +++ b/themes/fid_adlr/templates/RecordTab/acquisitionpda.phtml @@ -47,33 +47,14 @@ $this->headTitle($this->driver->getBreadcrumb()); <?php /* finc: add 'Online Access' in holdings-tab #13770 - VE */ ?> <?php if (!empty($urls) || $openUrlActive || $doiActive): ?> - <div class="facet-group" id="side-panel-links-<?=$getit->getAccordeonColor()?>"> - <button class="title collapsed" data-toggle="collapse" href="#side-collapse-links-data"> - <?=$getit->getAccordeonHeadline()?> - </button> - <div id="side-collapse-links-data" class="collapse in"> - <?php if (!empty($urls)): ?> - <?php foreach ($urls as $current): ?> - <a href="<?=$this->escapeHtmlAttr($this->proxyUrl($current['url']))?>" target="_blank"><i class="icon icon-external-link" aria-hidden="true"></i><?=$this->escapeHtml($current['desc'])?></a><br/> - <?php endforeach; ?> - <?php endif; ?> - <?php /* finc-specific snippet - #9274 - replaces if ($openUrlActive): ... - CK */ ?> - <?php if ($openUrlActive): ?> - <?php if (empty($urls)): ?> - <?php $fallbackUrls = $this->driver->tryMethod('getURLs'); - if (!empty($fallbackUrls)): ?> - <span id="urlsHideable" style="display: none"> - <?php foreach ($fallbackUrls as $current): ?> - <a href="<?=$this->escapeHtmlAttr($this->proxyUrl($current['url']))?>" target="_blank"><?=$this->escapeHtml($current['desc'])?></a><br/> - <?php endforeach; ?> - </span> - <?php endif; ?> - <?php endif; ?> - <?=$openUrl->renderTemplate()?> - <?php if ($doiActive): ?><?=$doi->renderTemplate()?><?php endif; ?> - <?php endif; ?> - </div> - </div> + <?php if ($getit->showLinks() && (!empty($urls) || $openUrlActive || $doiActive)): ?> + <?= $this->context($this)->renderInContext('get-it-box/side-panel-links.phtml', [ + 'getit' => $getit, + 'openUrl' => $openUrl, + 'openUrlActive' => $openUrlActive, + 'urls' => $urls, + ]); ?> + <?php endif; ?> <?php /* finc-specific snippet - #9274 - END */ ?> <?php endif; ?> </div> diff --git a/themes/fid_adlr/templates/RecordTab/holdingsils.phtml b/themes/fid_adlr/templates/RecordTab/holdingsils.phtml index 0c29c307683a6bfb89aa8a9dc4a74e39e6f2103f..aea115943346f7b13de043f78a214a183f5dcff7 100644 --- a/themes/fid_adlr/templates/RecordTab/holdingsils.phtml +++ b/themes/fid_adlr/templates/RecordTab/holdingsils.phtml @@ -54,34 +54,12 @@ <?php /* finc: add 'Online Access' in holdings-tab #13770 - VE */ ?> <?php if ($getit->showLinks() && (!empty($urls) || $openUrlActive || $doiActive)): ?> - <div class="facet-group" id="side-panel-links-<?=$getit->getAccordeonColor()?>"> - <button class="title collapsed" data-toggle="collapse" href="#side-collapse-links-data"> - <?=$getit->getAccordeonHeadline()?> - </button> - <div id="side-collapse-links-data" class="collapse in"> - <?php if (!empty($urls)): ?> - <?php foreach ($urls as $current): ?> - <a href="<?=$this->escapeHtmlAttr($this->proxyUrl($current['url']))?>" target="_blank"><i class="icon icon-external-link" aria-hidden="true"></i><?=$this->escapeHtml($current['desc'])?></a><br/> - <?php endforeach; ?> - <?php endif; ?> - <?php /* finc-specific snippet - #9274 - replaces if ($openUrlActive): ... - CK */ ?> - <?php if ($openUrlActive): ?> - <?php if (empty($urls)): ?> - <?php $fallbackUrls = $this->driver->tryMethod('getURLs'); - if (!empty($fallbackUrls)): ?> - <span id="urlsHideable" style="display: none"> - <?php foreach ($fallbackUrls as $current): ?> - <a href="<?=$this->escapeHtmlAttr($this->proxyUrl($current['url']))?>" target="_blank"><?=$this->escapeHtml($current['desc'])?></a><br/> - <?php endforeach; ?> - </span> - <?php endif; ?> - <?php endif; ?> - <?=$openUrl->renderTemplate()?> - <?php if ($doiActive): ?><?=$doi->renderTemplate()?><?php endif; ?> - <?php endif; ?> - </div> - </div> - <?php /* finc-specific snippet - #9274 - END */ ?> + <?= $this->context($this)->renderInContext('get-it-box/side-panel-links.phtml', [ + 'getit' => $getit, + 'openUrl' => $openUrl, + 'openUrlActive' => $openUrlActive, + 'urls' => $urls, + ]); ?> <?php endif; ?> </div> diff --git a/themes/fid_adlr/templates/get-it-box/side-panel-links.phtml b/themes/fid_adlr/templates/get-it-box/side-panel-links.phtml new file mode 100644 index 0000000000000000000000000000000000000000..5f91c2d62fc03458a1f34fd06b32e29a28bb88db --- /dev/null +++ b/themes/fid_adlr/templates/get-it-box/side-panel-links.phtml @@ -0,0 +1,46 @@ +<!-- fid_adlr: get-it-box - side-panel-links --> +<div class="facet-group" id="side-panel-links-<?= $getit->getAccordeonColor() ?>"> + <button class="title collapsed" id="get-it-button" data-toggle="collapse" href="#side-collapse-links-data"> + <?= $getit->getAccordeonHeadline() ?> + </button> + <div id="side-collapse-links-data" class="collapse"> + <?php $maxDisplayLength = 50; ?> + <?php if (!empty($urls)): ?> + <?php foreach ($urls as $current): ?> + <a href="<?= $this->escapeHtmlAttr($this->proxyUrl($current['url'])) ?>" target="_blank"><i + class="icon icon-external-link" aria-hidden="true"></i> + <?= $this->truncate($this->escapeHtml($current['desc']), $maxDisplayLength) ?> + </a><br/> + <?php endforeach; ?> + <?php endif; ?> + <?php /* finc-specific snippet - #9274 - replaces if ($openUrlActive): ... - CK */ ?> + <?php if ($openUrlActive): ?> + <?php if (empty($urls)): ?> + <?php $fallbackUrls = $this->driver->tryMethod('getURLs'); + if (!empty($fallbackUrls)): ?> + <span id="urlsHideable" style="display: none"> + <?php foreach ($fallbackUrls as $current): ?> + <a href="<?= $this->escapeHtmlAttr($this->proxyUrl($current['url'])) ?>" + target="_blank"><?= $this->truncate($this->escapeHtml($current['desc']), $maxDisplayLength) ?></a><br/> + <?php endforeach; ?> + </span> + <?php endif; ?> + <?php endif; ?> + <?= $openUrl->renderTemplate() ?> + <?php if ($doiActive): ?><?= $doi->renderTemplate() ?><?php endif; ?> + <?php endif; ?> + </div> +</div> + +<?php +$closeAccordeonOnMobile = <<<JS + $(document).ready(function() { + if( !$("#search-main-dropdown").is(":visible")) { + $('#get-it-button').click(); + } + }); +JS; +?> +<?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, $closeAccordeonOnMobile, 'SET');?> + +<!-- fid_adlr: get-it-box - side-panel-links - END --> \ No newline at end of file diff --git a/themes/fid_adlr/templates/record/view.phtml b/themes/fid_adlr/templates/record/view.phtml index e4fa875156316918aee544d13c4ad02daadd90ed..ec3ef6650f6754972293a6889be5d07836b45523 100644 --- a/themes/fid_adlr/templates/record/view.phtml +++ b/themes/fid_adlr/templates/record/view.phtml @@ -47,7 +47,7 @@ $this->layout()->title = $this->driver->getShortTitle(); </div> - <div class="<?=$this->layoutClass('sidebar')?>"> + <div class="<?=$this->layoutClass('sidebar')?> record"> <?php /* finc-specific: add toolbar to sidebar - CK */ ?> <?//=$this->record($this->driver)->getToolbar()?>