diff --git a/.gitignore b/.gitignore index d5d2a71d033af5bfa0f1418bd16018f31f73e37f..156e4b34ca9eac5b9261e03bded0a0af1524b8f0 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,5 @@ import/solrmarc.log* /docker-compose.override.yml /docker-env.override.yml /.env +**/compiled.css +**/print.css \ No newline at end of file diff --git a/Gruntfile.js b/Gruntfile.js index 4e6e7c38cc4f14aefa1791010ad00fa52a102ba6..7b8ac2951f9ce5a38d30859c7e1886da4113a946 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -3,6 +3,10 @@ module.exports = function(grunt) { var fs = require('fs'); + /** + * @param {string} file + * @return {Array} retval - path to file as Array + */ function getLoadPaths(file) { var config; var parts = file.split('/'); @@ -201,9 +205,13 @@ module.exports = function(grunt) { var sassConfig = {}, path = require('path'), themeList = fs.readdirSync(path.resolve('themes')).filter(function (theme) { - return fs.existsSync(path.resolve('themes/' + theme + '/scss/compiled.scss')); + return fs.existsSync(path.resolve('themes/' + theme + '/scss/compiled.scss')) + || fs.existsSync(path.resolve('themes/' + theme + '/scss/print.scss')); }); + /** + * Define mapping of input (scss) to output files (css) for following sass task + */ for (var i in themeList) { var config = { options: { @@ -212,7 +220,7 @@ module.exports = function(grunt) { files: [{ expand: true, cwd: path.join('themes', themeList[i], 'scss'), - src: ['compiled.scss'], + src: ['compiled.scss', 'print.scss'], dest: path.join('themes', themeList[i], 'css'), ext: '.css' }] @@ -220,7 +228,14 @@ module.exports = function(grunt) { for (var key in this.data.options) { config.options[key] = this.data.options[key] + ''; } - config.options.includePaths = getLoadPaths('themes/' + themeList[i] + '/scss/compiled.scss'); + + /* get Array of unique input paths */ + config.options.includePaths = Array.from( + new Set( + getLoadPaths('themes/' + themeList[i] + '/scss/compiled.scss') + .concat(getLoadPaths('themes/' + themeList[i] + '/scss/print.scss')) + ) + ); sassConfig[themeList[i]] = config; } diff --git a/module/finc/src/finc/RecordDriver/SolrMarcFincTrait.php b/module/finc/src/finc/RecordDriver/SolrMarcFincTrait.php index f85b2edc14ffb42dc153d6d55ee73a3eacac782e..35f2975ed17a89f7e1fcbd10d7d4770091af2af4 100644 --- a/module/finc/src/finc/RecordDriver/SolrMarcFincTrait.php +++ b/module/finc/src/finc/RecordDriver/SolrMarcFincTrait.php @@ -1481,7 +1481,9 @@ trait SolrMarcFincTrait if ($field == '773' && $subfield == 'a') { if ($line->getIndicator(1) == 1) { $field245 = $this->getMarcRecord()->getField('245'); - if ($sub245a = $field245->getSubfield('a')) { + // in case we have an empty title check title first + // cf. #18096 + if ($field245 && $sub245a = $field245->getSubfield('a')) { $label[] = $text[] = $sub245a->getData(); } unset($subfields['t']); diff --git a/themes/de_15/scss/print.scss b/themes/de_15/scss/print.scss deleted file mode 100644 index 66025d0fb69eb3dd1577dea71902908537b30c89..0000000000000000000000000000000000000000 --- a/themes/de_15/scss/print.scss +++ /dev/null @@ -1,175 +0,0 @@ -@import '../../finc/scss/print'; - -.hidden-print, -.hidden-print *, -.hidden-print[class*=span], -.nav-tabs li:not(.active), -.recordTabs.tabs, -img.nocover, -img.recordcover { - display: none -} - -.main .container, -.main .container-fluid, -.nav-tabs, -.nav-tabs li.active, -.nav-tabs > li, -.nav-tabs > li.active > a, -.panel, .tab-content, -.table, -footer .container { - border: 0 -} - -#content, -.mainbody, body { - padding-top: 0 -} - - -.nav-tabs li.active { - font-size: 120%; - font-weight: 700 -} - -.tab-content > .tab-pane { - display: block; - float: none; - padding: 0 -} - -.row-fluid .span9 { - margin: auto; - width: 90% -} - -#content, -.container, -.footer { - width: 100% -} - -a { - pointer-events: none; - cursor: default -} - -a[href]:after { - content: '' -} - -.media-left, .pagination, .result-body .result-formats .label.SID48 { - display: none -} - -.container { - margin: 0 -} - -.mainbody { - width: auto -} - -.result .media-left { - min-width: auto -} - -.result .ajaxItem { - width: 100% -} - -.result .left { - width: 30% -} - -.result .middle { - width: 70% -} - -.result .right { - width: 0 -} - -.result-body { - width: auto !important -} - -.row.result:nth-of-type(2n) { - background: #fff -} - -.record img, -.result img { - overflow: hidden !important -} - -.record-tabs table { - width: auto -} - -.record-tabs .nav-tabs { - background-color: #fff -} - -.record-tabs .nav-tabs li.active > a { - border-top: 0; - padding-left: 8px -} - -.tab-content { - padding: 0 -} - -.record-tabs.collection .result { - padding-left: 0 -} - -.result .record-number { - color: #a9a9a9 !important; - font-size: 1em; - padding-top: 4px; - text-align: left -} - -.holding-info .collapse { - display: block !important -} - -.template-name-view h3:first-of-type { - margin-left: 10px -} - -.accordion-toggler { - border: 0; - padding-left: 8px -} - -.accordion-toggler[aria-expanded=false]::after, -.accordion-toggler[aria-expanded=true]::after { - display: none -} - -.table > tbody > tr > td, -.table > tbody > tr > th, -.table > tfoot > tr > td, -.table > tfoot > tr > th, -.table > thead > tr > td, -.table > thead > tr > th { - border-top: 0; - padding: 2px 8px -} - -.list-group-item.title, -.result.embedded .title.getFull.expanded, -.result.embedded .title.loading, -.result.embedded .title.getFull.expanded, -.result.embedded .title.loading, -.result:nth-of-type(2n), -.table > tbody > tr:nth-of-type(2n+1) { - background-color: #fff -} - -.status span span { - background-color: inherit -} \ No newline at end of file diff --git a/themes/finc/css/.gitignore b/themes/finc/css/.gitignore deleted file mode 100644 index ecd34d2f94d3375699b58fb65ea6fa5b0aba96d1..0000000000000000000000000000000000000000 --- a/themes/finc/css/.gitignore +++ /dev/null @@ -1 +0,0 @@ -compiled.css \ No newline at end of file diff --git a/themes/finc/scss/compiled.scss b/themes/finc/scss/compiled.scss index a4ce7deba76770df5f26405e51a8a788e4fd1c1f..0323215212f885ba21671fb3089b27dec369ceeb 100644 --- a/themes/finc/scss/compiled.scss +++ b/themes/finc/scss/compiled.scss @@ -582,6 +582,37 @@ select { // display: block; //} +//// Record View Toggler - show extended information on single item +a.toggle { + color: inherit; + text-decoration: inherit; + &:active, + &:focus, + &:hover { + text-decoration: inherit; + } + &::after { + font-family: 'FontAwesome'; + content: $fa-var-angle-down; + padding-left: 2px; + } +} + +span.notation ul { + padding-inline-start: 1.5em; + @media (max-width: $screen-md-min) { + padding-inline-start: 0; + } + li { + list-style-type: none; + } + li:before { + margin-right: 0.5em; + font-family: 'FontAwesome'; + content: $fa-var-level-down; + } +} + //// ALERTS ////// Light Text on Dark BG .alert { diff --git a/themes/finc/templates/Helpers/nestedList.phtml b/themes/finc/templates/Helpers/nestedList.phtml new file mode 100644 index 0000000000000000000000000000000000000000..acba95440d9cdd20b432fa9fb19e588d5e7a3f23 --- /dev/null +++ b/themes/finc/templates/Helpers/nestedList.phtml @@ -0,0 +1,8 @@ +<?php //Base case: an empty array produces no list ?> +<?php if (!empty($array)): ?> + <ul> + <li><?=array_shift($array)?></li> + <?php //Recursive Step: make a list with child lists ?> + <?= $this->render('Helpers/nestedList.phtml', ['array' => $array])?> + </ul> +<?php endif; ?> \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/data-rvkNotation.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-rvkNotation.phtml index ace98595279637ab3e06f0f0768ae97321f43132..59cc4551a62c002577faf3abef1dc7b0e74fb721 100644 --- a/themes/finc/templates/RecordDriver/DefaultRecord/data-rvkNotation.phtml +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-rvkNotation.phtml @@ -2,25 +2,25 @@ <?php /* partial copied from themes/finc/templates/RecordTab/topics.phtml */ ?> <?php $i = 0; foreach ($data as $item): ?> <?=($i>0?"<br />":"") //no linebreak after last item ?> - <?php if (isset($item['level']) ): ?> - <?php - $tooltip_content = "<ul class='no-bullet'>"; - if (isset($item['level']) && count($item['level'])) { - foreach ($item['level'] as $level) { - $tooltip_content .= "<li>" . $level . "</li>"; - } - } - $tooltip_content .= "</ul>"; - ?> - <?php endif; ?> - <span <?=(isset($tooltip_content) ? 'data-toggle="tooltip" data-html="true" title="' . $tooltip_content . '"' : "")?>> + + <span> <a href="<?=$this->record($this->driver)->getLink('rvk', $item['rvk'])?>"> <?=$item['rvk']?> </a> </span> + <?php if(isset($item['name'])): ?> - <span><?=$item['name']?></span> + <a class="toggle" role="button" data-toggle="collapse" href="#collapse_rvk_<?=$i?>" aria-expanded="false" aria-controls="collapse_rvk_<?=$i?>"> + <?=$item['name']?> + </a> + <?php endif; ?> + + <?php if(isset($item['level']) && is_array($item['level'])): ?> + <span id="collapse_rvk_<?=$i?>" class="collapse notation"> + <?= $this->render('Helpers/nestedList.phtml', ['array' => $item['level']]); ?> + </span> <?php endif; ?> + <?php $i++; ?> <?php endforeach; ?> <!-- finc: RecordDriver - DefaultRecord - data-rvkNotation - END --> \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/SolrMarc/data-allSubjectHeadingsWithExtended.phtml b/themes/finc/templates/RecordDriver/SolrMarc/data-allSubjectHeadingsWithExtended.phtml new file mode 100644 index 0000000000000000000000000000000000000000..29a5cdbf143a42f45143e60ce44bb0f90c988fb3 --- /dev/null +++ b/themes/finc/templates/RecordDriver/SolrMarc/data-allSubjectHeadingsWithExtended.phtml @@ -0,0 +1,18 @@ +<!-- finc: RecordDriver - solrMarc data-allSubjectHeadingsWithExtended --> +<?php if(!empty($data)): ?> + <?php foreach ($data as $field): ?> + <div class="subject-line" property="keywords"> + <?php $subject = ''; ?> + <?php if(count($field) == 1 && !isset($field['subject'])) $field = explode('--', $field[0]); ?> + <?php if(isset($field['subject'])): // extended topics ?> + <?php $field = $field['subject']; ?> + <?php endif; ?> + <?php $i = 0; foreach ($field as $subfield): ?> + <?=($i++ == 0) ? '' : ' > '?> + <?php $subject = trim($subject . ' ' . $subfield); ?> + <a title="<?=$this->escapeHtmlAttr($subject)?>" href="<?=$this->record($this->driver)->getLink('subject', $subject)?>" rel="nofollow"><?=trim($this->escapeHtml($subfield))?></a> + <?php endforeach; ?> + </div> + <?php endforeach; ?> +<?php endif; ?> +<!-- finc: RecordDriver - solrMarc data-allSubjectHeadingsWithExtended - END --> diff --git a/themes/finc/templates/search/results.phtml b/themes/finc/templates/search/results.phtml index 01364b6b21221c25ce69c8efefc9c0a70b36e3a4..d5c200b30de591ff488b6242b07328cdbeb46164 100644 --- a/themes/finc/templates/search/results.phtml +++ b/themes/finc/templates/search/results.phtml @@ -125,24 +125,6 @@ $this->headScript()->appendFile("check_save_statuses.js"); <?=$this->context($this)->renderInContext('search/bulk-action-buttons.phtml', ['idPrefix' => 'bottom_', 'formAttr' => 'search-cart-form'])?> <?=$this->paginationControl($this->results->getPaginator(), 'Sliding', 'search/pagination.phtml', ['results' => $this->results, 'options' => isset($this->paginationOptions) ? $this->paginationOptions : []])?> - <div class="searchtools hidden-print"> - <strong><?=$this->transEsc('Search Tools')?>:</strong> - <a href="<?=$this->results->getUrlQuery()->setViewParam('rss')?>"><i class="fa fa-bell" aria-hidden="true"></i> <?=$this->transEsc('Get RSS Feed')?></a> - <span class="hidden-xs hidden-sm">—</span> - <a href="<?=$this->url('search-email')?>" class="mailSearch" data-lightbox id="mailSearch<?=$this->escapeHtmlAttr($this->results->getSearchId())?>"> - <i class="fa fa-envelope" aria-hidden="true"></i> <?=$this->transEsc('Email this Search')?> - </a> - <?php if ($this->accountCapabilities()->getSavedSearchSetting() === 'enabled'): ?> - <span class="hidden-xs hidden-sm">—</span> - <?php if (is_numeric($this->results->getSearchId())): ?> - <?php if ($this->results->isSavedSearch()): ?> - <a href="<?=$this->url('myresearch-savesearch')?>?delete=<?=urlencode($this->results->getSearchId())?>"><i class="fa fa-remove" aria-hidden="true"></i> <?=$this->transEsc('save_search_remove')?></a> - <?php else: ?> - <a href="<?=$this->url('myresearch-savesearch')?>?save=<?=urlencode($this->results->getSearchId())?>"><i class="fa fa-save" aria-hidden="true"></i> <?=$this->transEsc('save_search')?></a> - <?php endif; ?> - <?php endif; ?> - <?php endif; ?> - </div> <?php endif; ?> </div> <?php /* End Main Listing */ ?> diff --git a/themes/finc/theme.config.php b/themes/finc/theme.config.php index 5674711edbfaf7418ba1140f70d5905fbb035c70..4b4e93f7ae4fc661cb1da8d5c0bb202a26c87dc3 100644 --- a/themes/finc/theme.config.php +++ b/themes/finc/theme.config.php @@ -2,7 +2,6 @@ return [ 'extends' => 'bootstrap3', 'js' => [ - 'openurl.js', 'check_item_statuses.js', 'lightbox_form_cache.js', ],