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/local/config/vufind/facets.ini b/local/config/vufind/facets.ini index 5b65a19047074cc381ded4d745ce479f540a9c15..b08f4716eb00fd23baad7f957835a9e830ad973b 100644 --- a/local/config/vufind/facets.ini +++ b/local/config/vufind/facets.ini @@ -162,7 +162,7 @@ delimiter = "{{{_:::_}}}" ; genericrange - just like daterange above, but for genericRange[] fields. ; illustrated - for the "illustrated/not illustrated" radio button limiter ; numericrange - just like daterange above, but for numericRange[] fields. -special_facets = "illustrated,daterange" +special_facets = "daterange" ; Any facets named in the list below will have their values run through the ; translation code; unlisted facets will displayed as-is without translation. For diff --git a/local/languages/de.ini b/local/languages/de.ini index 33b2bf08b837d996024c0eed35d1684c547ef0bc..a57297d82b60f5d95c2755404b078e15979252bb 100644 --- a/local/languages/de.ini +++ b/local/languages/de.ini @@ -2031,3 +2031,5 @@ record_from_cache = "Dieser Datensatz ist nicht mehr im Katalog vorhanden. Event search_cached_record = "Nach "%%title_full%%" suchen." search_cached_record_by_isn = "Per %%type%% suchen" search_cached_record = "Nach "%%title_full%%" suchen." + +BK = "BK-Notation" \ No newline at end of file diff --git a/local/languages/en.ini b/local/languages/en.ini index 2bb335bd894b27c953b63fc72515b61c5125260b..c9fa86188eebab7d9c228c1261c4aaf15b17d6d4 100644 --- a/local/languages/en.ini +++ b/local/languages/en.ini @@ -2106,4 +2106,6 @@ fine_date_short = "Fine Date" ; #9016, #17375 record_from_cache = "This record is no longer present in the catalogue. Probably it has been replaced by another record." -search_cached_record = "Search for "%%title_full%%."" \ No newline at end of file +search_cached_record = "Search for "%%title_full%%."" + +BK = "BK Notation" \ No newline at end of file diff --git a/module/finc/src/finc/Controller/MyResearchController.php b/module/finc/src/finc/Controller/MyResearchController.php index ff311d42b26feb415d8d54625b3d9da985717ae6..cb8dd23b4fceca9119f94d3a422e7b1ebd54690a 100644 --- a/module/finc/src/finc/Controller/MyResearchController.php +++ b/module/finc/src/finc/Controller/MyResearchController.php @@ -59,6 +59,7 @@ class MyResearchController extends \VuFind\Controller\MyResearchController imple public function onDispatch(MvcEvent $e) { if ($redirect = $this->getRequest()->getQuery()->get('redirect')) { + $redirect = urldecode($redirect); //if we have a "redirect" param, the user should be lead to the given url, //at least as long as his login is successful //we achieve that by forcing the follow-up url to be the redirect diff --git a/module/finc/src/finc/RecordDriver/FincMissing.php b/module/finc/src/finc/RecordDriver/FincMissing.php index 495b45d7907819e39180c6aa33617154b850299d..425ff41ef7a38d0bd3bbc41462db105f2583388b 100644 --- a/module/finc/src/finc/RecordDriver/FincMissing.php +++ b/module/finc/src/finc/RecordDriver/FincMissing.php @@ -72,17 +72,21 @@ class FincMissing extends \VuFind\RecordDriver\Missing */ public function setRawData($data) { - $table = $this->getDbTable('resource'); - // sets create to FALSE so Resource does not try to generate a DB row on fail - $resource = $table->findResource($data['id'], 'solr', FALSE); - if ($resource instanceof Resource) { - if (empty($resource->extra_metadata ?? '')) { - parent::setRawData($data); + if (isset($data['id']) && !empty($data['id'])) { + $table = $this->getDbTable('resource'); + // sets create to FALSE so Resource does not try to generate a DB row on fail + $resource = $table->findResource($data['id'], 'solr', FALSE); + if ($resource instanceof Resource) { + if (empty($resource->extra_metadata ?? '')) { + parent::setRawData($data); + } else { + $this->deserializeFromResourceTable($resource); + } } else { - $this->deserializeFromResourceTable($resource); + $this->fields['id'] = $data['id']; } - } elseif (isset($data['id'])) { - $this->fields['id'] = $data['id']; + } else { + $this->fields['id'] = ''; } } diff --git a/module/finc/src/finc/RecordDriver/SolrMarcFincTrait.php b/module/finc/src/finc/RecordDriver/SolrMarcFincTrait.php index 74fc5a99320981ccb6a500519b3107089b41296b..35f2975ed17a89f7e1fcbd10d7d4770091af2af4 100644 --- a/module/finc/src/finc/RecordDriver/SolrMarcFincTrait.php +++ b/module/finc/src/finc/RecordDriver/SolrMarcFincTrait.php @@ -1367,8 +1367,9 @@ trait SolrMarcFincTrait ? $line->getSubfield('d')->getData() : ''; $retval[$key]['relator'] = ($line->getSubfield('e')) ? $line->getSubfield('e')->getData() : ''; + $retval[$key]['role'] = ($line->getSubfield('4')) + ? $line->getSubfield('4')->getData() : ''; } - // echo "<pre>"; print_r($retval); echo "</pre>"; return $retval; } @@ -1480,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']); @@ -2153,22 +2156,45 @@ trait SolrMarcFincTrait { $array = []; - $bkl = $this->getMarcRecord()->getFields('084'); - // if not return void value - if (!$bkl) { - return $array; - } // end if - foreach ($bkl as $key => $line) { - // if subfield with bkl exists - if ($line->getSubfield('2') - && ($line->getSubfield('2')->getData() == 'bkl') - ) { - // get bkl - if ($line->getSubfield('a')) { - $array[] = $line->getSubfield('a')->getData(); - } // end if subfield a - } // end if subfield 2 - } // end foreach + // getting contens from marc 936 + $fields = $this->getMarcRecord()->getFields('936'); + if ($fields) { + foreach ($fields as $line) { + if ($line->getIndicator('1') == 'b' && + $line->getIndicator('2') == 'k') { + if ($bkl = $line->getSubfield('a')) { + $subarray = []; + // get bkl + $subarray['bk'] = $bkl->getData(); + // get bkl nomination + if ($names = $line->getSubfields('j')) { + foreach ($names as $i => $name) + $subarray['names'][] = $name->getData(); + } + $array[] = $subarray; + } + } + } + } + + // getting contens from marc 084 if array is still empty + if (empty($array)) { + $fields = $this->getMarcRecord()->getFields('084'); + if ($fields) { + foreach ($fields as $line) { + // if subfield with bkl exists + if ($line->getSubfield('2') + && ($line->getSubfield('2')->getData() == 'bkl') + ) { + // get bkl + if ($bkl = $line->getSubfield('a')) { + $array[]['bk'] = $bkl->getData(); + } + } + } + } + } + return $array; } @@ -2440,4 +2466,31 @@ trait SolrMarcFincTrait } return null; } -} + + /** + * Get credits of people involved in production of the item. + * Marc 508 |a + * @return array + */ + public function getProductionCredits() + { + return $this->getFieldArray('508', ['a']); + } + + /** + * Return performer note of marc 511 |a + * + * @return mixed + */ + public function getPerformerNote() + { + $field = $this->getMarcRecord()->getField('511'); + if($field){ + $subfield = $field->getSubfield('a'); + if($subfield) { + return $subfield->getData(); + } + } + return null; + } +} \ No newline at end of file diff --git a/module/finc/src/finc/View/Helper/Root/RecordDataFormatterFactory.php b/module/finc/src/finc/View/Helper/Root/RecordDataFormatterFactory.php index 295fa6477787528846016bd69fb48f959e3cc542..c959eec5b6ebd3e2d0daed02702937a51870d0b5 100644 --- a/module/finc/src/finc/View/Helper/Root/RecordDataFormatterFactory.php +++ b/module/finc/src/finc/View/Helper/Root/RecordDataFormatterFactory.php @@ -43,6 +43,9 @@ use VuFind\View\Helper\Root\RecordDataFormatter; */ class RecordDataFormatterFactory { + + use MultiDataFieldsTrait; + /** * Create the helper. * @@ -190,10 +193,9 @@ class RecordDataFormatterFactory ] ] ); - $spec->setTemplateLine( + $spec->setLine( 'Title', - 'getTitleDetails', - 'data-titleDetails.phtml' + 'getTitleDetails' ); $spec->setTemplateLine( 'Dates of publication', @@ -267,15 +269,10 @@ class RecordDataFormatterFactory 'getLanguages', 'data-transEscCommaSepLang.phtml' ); - $spec->setTemplateLine( + $spec->setMultiLine( 'Additionals', 'getAdditionals', - 'data-additionals.phtml', - [ - 'labelFunction' => function () { - return null; - } - ] + [$this,'additionals'] ); return $spec->getArray(); } @@ -364,10 +361,9 @@ class RecordDataFormatterFactory ] ] ); - $spec->setTemplateLine( + $spec->setLine( 'Title', - 'getTitleDetails', - 'data-titleDetails.phtml' + 'getTitleDetails' ); $spec->setTemplateLine( 'Title Uniform', @@ -428,27 +424,20 @@ class RecordDataFormatterFactory 'getAllRecordLinks', 'data-allRecordLinks.phtml' ); - $spec->setTemplateLine( + $spec->setMultiLine( 'Additionals', 'getAdditionals', - 'data-additionals.phtml', - [ - 'labelFunction' => function () { - return null; - } - ] + [$this,'additionals'] ); $spec->setTemplateLine( 'Source', 'getMegaCollection', 'data-escapeHtml.phtml' ); - $spec->setTemplateLine( - null, + $spec->setMultiLine( + "Other Relationship Entry", 'getOtherRelationshipEntry', - 'data-otherRelationshipEntry.phtml', - [ - ] + [$this,'otherRelationshipEntry'] ); $spec->setTemplateLine( 'Notes', @@ -750,15 +739,10 @@ class RecordDataFormatterFactory 'context' => ['class' => 'recordIdentifiers'] ] ); - $spec->setTemplateLine( + $spec->setMultiLine( 'Events', - true, - 'data-events.phtml', - [ - 'labelFunction' => function () { - return null; - } - ] + 'getEvents', + [$this,'events'] ); // , context: "recordEvents" $spec->setTemplateLine( @@ -852,10 +836,9 @@ class RecordDataFormatterFactory ] ] ); - $spec->setTemplateLine( + $spec->setLine( 'Title', - 'getTitleDetails', - 'data-titleDetails.phtml' + 'getTitleDetails' ); $spec->setTemplateLine( 'Title Uniform', @@ -914,6 +897,11 @@ class RecordDataFormatterFactory 'data-childRecords.phtml', ['allowZero' => false] ); + $spec->setMultiLine( + 'Additionals', + 'getAdditionals', + [$this,'additionals'] + ); /* finc: remove 'Online Access' in record-details #13770 - VE */ /* $spec->setTemplateLine('Online Access', true, 'data-onlineAccess.phtml'); */ $spec->setTemplateLine( @@ -936,15 +924,10 @@ class RecordDataFormatterFactory 'getMegaCollection', 'data-escapeHtml.phtml' ); - $spec->setTemplateLine( - 'OtherRelationshipEntry', + $spec->setMultiLine( + "Other Relationship Entry", 'getOtherRelationshipEntry', - 'data-otherRelationshipEntry.phtml', - [ - 'labelFunction' => function () { - return null; - } - ] + [$this,'otherRelationshipEntry'] ); $spec->setTemplateLine( 'Notes', diff --git a/module/finc/src/finc/View/Helper/Root/RecordLink.php b/module/finc/src/finc/View/Helper/Root/RecordLink.php index 402b732b9ad00dd63ae44d9f53f008257303a3c2..12e27d4066fc9d9758aaf9db0483ef1545e3031c 100644 --- a/module/finc/src/finc/View/Helper/Root/RecordLink.php +++ b/module/finc/src/finc/View/Helper/Root/RecordLink.php @@ -154,9 +154,10 @@ class RecordLink extends \VuFind\View\Helper\Root\RecordLink { try { return $this->getTabUrl($driver); + } catch (RecordMissingException $exception) { + // return default result on Missing Record + // throw all other Exceptions } - catch (RecordMissingException $exception) { - return ""; - } + return ""; } } 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-additionalAuthors.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-additionalAuthors.phtml new file mode 100644 index 0000000000000000000000000000000000000000..17ba1d06e62465f9c5e57c4dafaf26329d3fed73 --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-additionalAuthors.phtml @@ -0,0 +1,22 @@ +<!-- finc: RecordDriver - DefaultRecord - data-additionalAuthors --> +<?php if (!empty($data)): ?> + <?php if (is_array($data)): ?> + <?php foreach ($data as $author): ?> + <? if(isset($author['name'])): ?> + <a href="<?=$this->record($this->driver)->getLink('author', $author['name'])?>"> + <?= $author['name'] ?> + </a> + <? endif; ?> + <?php if(isset($author['dates'])): ?> + <?= $author['dates'] ?> + <?php endif; ?> + <?php if(isset($author['role'])): ?> + [<?= $this->transEsc("CreatorRoles::" . $author['role']) ?>] + <?php endif; ?> + <?php if(next($data)): ?> + • + <?php endif; ?> + <?php endforeach; ?> + <?php endif; ?> +<?php endif; ?> +<!-- finc: RecordDriver - DefaultRecord - data-additionalAuthors - END --> \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/data-bk.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-bk.phtml new file mode 100644 index 0000000000000000000000000000000000000000..d7b19e2baabb7bac815b1b162a44df6b6b7fbdac --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-bk.phtml @@ -0,0 +1,26 @@ +<!-- finc: RecordDriver - SolrMarc - data-bk --> +<? if (!(empty($data))): ?> +<? $i = 0; foreach ($data as $item): ?> + <?= ($i++ == 0) ? '' : '<br>'; ?> + <?php //ToDo: add link to embed bk notation search via search type on upcoming solr field + /* + <a title="<?=$this->escapeHtmlAttr($item["bk"])?>" href="<?=$this->record($this->driver)->getLink('bk', $item["bk"])?>" rel="nofollow"> + <?=trim($this->escapeHtml($item["bk"]))?> + </a> + */ ?> + <?php //ToDo: remove after adding search link ↑ ?> + <?=trim($this->escapeHtml($item["bk"]))?> + <?php + if (isset($item["names"])) { + $output = ''; + $j = 0; + foreach ($item["names"] as $name) { + $output .= ($j++ == 0) ? '' : ', '; + $output .= $this->escapeHtml($name); + } + echo $output; + } + ?> +<? endforeach; ?> +<? endif; ?> +<!-- finc: RecordDriver - SolrMarc - data-bk - END --> \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/data-corporateAuthors.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-corporateAuthors.phtml new file mode 100644 index 0000000000000000000000000000000000000000..b888d0f2191a5bb457b2356da20accad1f9c84cc --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-corporateAuthors.phtml @@ -0,0 +1,14 @@ +<!-- finc: RecordDriver - DefaultRecord - data-corporateAuthors --> +<?php if (!empty($data)): ?> + <?php if (is_array($data)): ?> + <?php foreach ($data as $author): ?> + <a href="<?=$this->record($this->driver)->getLink('author', $author)?>"> + <?= $author ?> + </a> + <?php if(next($data)): ?> + <br> + <?php endif; ?> + <?php endforeach; ?> + <?php endif; ?> +<?php endif; ?> +<!-- finc: RecordDriver - DefaultRecord - data-corporateAuthors - END --> \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/SolrMarc/data-linkViaFincId.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-linkViaFincId.phtml similarity index 86% rename from themes/finc/templates/RecordDriver/SolrMarc/data-linkViaFincId.phtml rename to themes/finc/templates/RecordDriver/DefaultRecord/data-linkViaFincId.phtml index cc59b8b824bd2b2c64c240855ea3249ecb5797a1..a43085bbc75af97c798dfcc5dd7cfe74ddd9b8cf 100644 --- a/themes/finc/templates/RecordDriver/SolrMarc/data-linkViaFincId.phtml +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-linkViaFincId.phtml @@ -1,7 +1,10 @@ <!-- finc: RecordDriver - solrMarc - data-linkviafincid --> <?php if (!empty($data)): ?> <?php foreach ($data as $field): ?> - <?php if (isset($field['id']) || isset($field['text'])): + <?php if ( + is_array($field) + && (isset($field['id']) || isset($field['text'])) + ): $url = isset($field['id']) ? $this->url('record') . $field['id'] : $this->record($this->driver)->getLink('title', $field['text']); diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/data-publicationDetails.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-publicationDetails.phtml index fdb11ee471b3fea90446159405b2c3c26d5a4558..430b5d6189669ed4d87b7fcc17b4b232e5486780 100644 --- a/themes/finc/templates/RecordDriver/DefaultRecord/data-publicationDetails.phtml +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-publicationDetails.phtml @@ -1,30 +1,34 @@ <!-- finc: RecordDriver - DefaultRecord - data-publicationDetails --> <?php if (!empty($data)): ?> <div itemscope itemtype="http://schema.org/publisher"> - <?php foreach ($data as $field): ?> - <span property="publisher" typeof="Organization"> - <?php $pubPlace = $field->getPlace(); - if (!empty($pubPlace)): ?> - <span property="location" typeof="Place"> - <span property="name"><?=$this->escapeHtml($pubPlace)?></span> - </span> + <?php if (is_array($data)): ?> + <?php foreach ($data as $field): ?> + <span property="publisher" typeof="Organization"> + <?php $pubPlace = $field->getPlace(); + if (!empty($pubPlace)): ?> + <span property="location" typeof="Place"> + <span property="name"><?=$this->escapeHtml($pubPlace)?></span> + </span> + <?php endif; ?> + <?php $pubName = $field->getName(); + if (!empty($pubName)): ?> + <span property="name"><?=$this->escapeHtml($pubName)?></span> + <?php endif; ?> + </span> + <span property="datePublished"> + <?php /* do not show solr publish date #13993 - GG */ ?> + <?php /*$pubDateSort = $this->driver->tryMethod('getPublishDateSort');*/ ?> + <?php $pubDate = $field->getDate(); + if (!empty($pubDate)): ?> + <?=$this->escapeHtml($pubDate)?> + <?php /*else: ?> + <?=$this->escapeHtml($pubDateSort)*/ ?> <?php endif; ?> - <?php $pubName = $field->getName(); - if (!empty($pubName)): ?> - <span property="name"><?=$this->escapeHtml($pubName)?></span> - <?php endif; ?> - </span> - <span property="datePublished"> - <?php /* do not show solr publish date #13993 - GG */ ?> - <?php /*$pubDateSort = $this->driver->tryMethod('getPublishDateSort');*/ ?> - <?php $pubDate = $field->getDate(); - if (!empty($pubDate)): ?> - <?=$this->escapeHtml($pubDate)?> - <?php /*else: ?> - <?=$this->escapeHtml($pubDateSort)*/ ?> - <?php endif; ?> - </span><br/> - <?php endforeach; ?> + </span><br/> + <?php endforeach; ?> + <?php else: ?> + <?=$this->escapeHtml($data)?> + <?php endif; ?> </div> <?php endif ?> <!-- finc: RecordDriver - DefaultRecord - data-publicationDetails - END --> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/data-rvkNotation.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-rvkNotation.phtml new file mode 100644 index 0000000000000000000000000000000000000000..59cc4551a62c002577faf3abef1dc7b0e74fb721 --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-rvkNotation.phtml @@ -0,0 +1,26 @@ +<!-- finc: RecordDriver - DefaultRecord - data-rvkNotation --> +<?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 ?> + + <span> + <a href="<?=$this->record($this->driver)->getLink('rvk', $item['rvk'])?>"> + <?=$item['rvk']?> + </a> + </span> + + <?php if(isset($item['name'])): ?> + <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/DefaultRecord/data-titleDetails.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-titleDetails.phtml index fd0c9ce8f43614a4e55f5ca7e2647e63ad7c006d..39deaefc9490311b1004ded4fcfe6b08bf19e821 100644 --- a/themes/finc/templates/RecordDriver/DefaultRecord/data-titleDetails.phtml +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-titleDetails.phtml @@ -1,3 +1,8 @@ +<?php +/** @deprecated since the else part is never active, this should be substituted by a + * simple SpecLine (giving escapeHtml with <br/>) in the RecordDataFormatterFactory + */ +?> <!-- finc: RecordDriver - DefaultRecord - data-titleDetails --> <?php if (!empty($data)): ?> <?php $i = 0; diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/link-bk.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/link-bk.phtml new file mode 100644 index 0000000000000000000000000000000000000000..178be2e908f78deadd08ec0aac0db0076d0cbd9d --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/link-bk.phtml @@ -0,0 +1 @@ +<?=$this->url('search-results')?>?lookfor=%22<?=urlencode($this->lookfor)?>%22&type=bk \ 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/advanced/ranges.phtml b/themes/finc/templates/search/advanced/ranges.phtml index d0fc25eb2eda414af9dcf93b0e7364338b2c195e..3c41b51dda92daf80d898a75add153796865aa68 100644 --- a/themes/finc/templates/search/advanced/ranges.phtml +++ b/themes/finc/templates/search/advanced/ranges.phtml @@ -3,7 +3,8 @@ <?php $params = $this->searchParams($this->searchClassId); $params->activateAllFacets(); ?> <?php foreach ($this->ranges as $current): $escField = $this->escapeHtmlAttr($current['field']); ?> <?php $extraInputAttribs = ($current['type'] == 'date') ? 'maxlength="4" ' : ''; ?> - <fieldset class="range"> + <?php /* #18306: alignment left to result - GG */ ?> + <fieldset class="range left"> <legend><?=$this->transEsc($params->getFacetLabel($current['field']))?></legend> <input type="hidden" name="<?=$this->escapeHtmlAttr($current['type'])?>range[]" value="<?=$escField?>"/> <div class="date-fields"> 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', ],