diff --git a/local/languages/de.ini b/local/languages/de.ini index 119743241f63d881e58cf86345bc7f194c5309dd..6ccede79bbadd7e71fe3d3af92a8cacbde920a62 100644 --- a/local/languages/de.ini +++ b/local/languages/de.ini @@ -2002,6 +2002,7 @@ Search type = "Suchtyp" License = "Lizenz" +<<<<<<< HEAD ; #17717 Skip to content = "Zum Inhalt" @@ -2025,3 +2026,9 @@ Next = "Nächste" Next Search Result = "Nächste" Previous = "Vorherige" Previous Search Result = "Vorherige" + +; #9016, #17375 +record_from_cache = "Dieser Datensatz ist nicht mehr im Katalog vorhanden. Eventuell wurde er durch einen anderen Datensatz ersetzt." +search_cached_record = "Nach "%%title_full%%" suchen." +search_cached_record_by_isn = "Per %%type%% suchen" +search_cached_record = "Nach "%%title_full%%" suchen." diff --git a/local/languages/en.ini b/local/languages/en.ini index 2ad618693ebf722109140a24f592ac07a9f6de01..67e9b0c1a6e40a47dbfa7ea4cb3390a5745ffbd5 100644 --- a/local/languages/en.ini +++ b/local/languages/en.ini @@ -2098,8 +2098,13 @@ Skip to search = "Skip to search" License = "License" +<<<<<<< HEAD ; #17717 ; only necessary in en.ini skip-to = "Skip to " -fine_date_short = "Fine Date" \ No newline at end of file +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 diff --git a/module/finc/config/module.config.php b/module/finc/config/module.config.php index 21b757fc5c18d35e6ba57da4bad3da5ba8961d3e..e4c87f8747a1047147f1bb86f943620debe10972 100644 --- a/module/finc/config/module.config.php +++ b/module/finc/config/module.config.php @@ -110,6 +110,7 @@ $config = [ 'finc\RecordDriver\SolrLido' => 'finc\RecordDriver\SolrLidoFactory', 'finc\RecordDriver\SolrLidoNdl' => 'finc\RecordDriver\SolrLidoFactory', 'finc\RecordDriver\SolrDico' => 'VuFind\RecordDriver\SolrDefaultWithoutSearchServiceFactory', + 'finc\RecordDriver\FincMissing' => 'VuFind\RecordDriver\AbstractBaseFactory', ], 'aliases' => [ 'VuFind\RecordDriver\SolrDefault' => 'finc\RecordDriver\SolrDefault', @@ -123,6 +124,7 @@ $config = [ 'solrlido' => 'finc\RecordDriver\SolrLido', 'solrlidondl' => 'finc\RecordDriver\SolrLidoNdl', 'solrdico' => 'finc\RecordDriver\SolrDico', + 'missing' => 'finc\RecordDriver\FincMissing' ], 'delegators' => [ 'finc\RecordDriver\SolrMarc' => [ diff --git a/module/finc/src/finc/RecordDriver/FincMissing.php b/module/finc/src/finc/RecordDriver/FincMissing.php new file mode 100644 index 0000000000000000000000000000000000000000..495b45d7907819e39180c6aa33617154b850299d --- /dev/null +++ b/module/finc/src/finc/RecordDriver/FincMissing.php @@ -0,0 +1,176 @@ +<?php +/** + * finc specific model for Solr records based on the stock + * VuFind\RecordDriver\SolrDefault + * + * PHP version 5 + * + * Copyright (C) Leipzig University Library 2015. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * @category VuFind + * @package RecordDrivers + * @author Dorian Merz <merz@ub.uni-leipzig.de> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org/wiki/development:plugins:record_drivers Wiki + */ + +namespace finc\RecordDriver; + +use VuFind\Db\Row\Resource; + +/** + * finc specific model for Missing records + * + * @category VuFind + * @package RecordDrivers + * @author Dorian Merz <merz@ub.uni-leipzig.de> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org/wiki/development:plugins:record_drivers Wiki + * + * @SuppressWarnings(PHPMD.ExcessivePublicCount) + */ +class FincMissing extends \VuFind\RecordDriver\Missing +{ + use FincRecordSerializationTrait; + + /** + * @var array $availableTitleFields list of title fields in exploration order + */ + protected $availableTitleFields = [ + 'title', + 'title_full', + 'title_short', + 'title_sort' + ]; + + /** + * @var string $displayTitle + */ + protected $displayTitle; + + /** + * @var string $shortTitle + */ + protected $shortTitle; + + /** + * Sets the raw data from the resource table. This is deserialized from the title field + * @param mixed $data + */ + 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); + } else { + $this->deserializeFromResourceTable($resource); + } + } elseif (isset($data['id'])) { + $this->fields['id'] = $data['id']; + } + } + + /** + * each FincMissing Record is from cache + * @return bool TRUE + */ + public function isCachedRecord() + { + return TRUE; + } + + /** + * {@inheritDoc} + * Overriden to enable the use of different title fields + * @return mixed|string + */ + public function determineMissingTitle() + { + if (!isset($this->displayTitle)) { + foreach ($this->availableTitleFields as $field) { + if (isset($this->fields[$field])) { + $this->displayTitle = $this->fields[$field]; + break; + } + } + if (!isset($this->displayTitle)) { + $this->displayTitle = parent::determineMissingTitle(); + } + } + return $this->displayTitle; + } + + /** + * {@inheritDoc} + * @return string + */ + public function getRecordType() + { + return 'missing'; + } + + /** + * {@inheritdoc} + * adds some short term caching + * @return mixed|string + */ + public function getShortTitle() + { + if (!isset($this->shortTitle)) { + if (isset($this->fields['title_short'])) { + $this->shortTitle = $this->fields['title_short']; + } else { + $title = $this->determineMissingTitle(); + $this->shortTitle = trim(preg_replace('/[^\w\s]/u', '', $title)); + } + } + return $this->shortTitle; + } + + /** + * {@inheritoc} + * @return array + */ + public function getPlacesOfPublication() + { + if (isset($this->fields['publishPlace'])) { + return (array)$this->fields['publishPlace']; + } + return []; + } + + /** + * {@inheritdoc} + * Casts output to array + * @return array + */ + public function getPublicationDates() + { + return (array)parent::getPublicationDates(); + } + + /** + * Returns the content of the additional_authors field + * @return array|mixed + */ + public function getAdditionalAuthors() + { + return $this->fields['additional_authors'] ?? []; + } +} diff --git a/module/finc/src/finc/RecordDriver/FincRecordSerializationTrait.php b/module/finc/src/finc/RecordDriver/FincRecordSerializationTrait.php new file mode 100644 index 0000000000000000000000000000000000000000..713702370a351da19f308fb29540809794ace5df --- /dev/null +++ b/module/finc/src/finc/RecordDriver/FincRecordSerializationTrait.php @@ -0,0 +1,146 @@ +<?php +/** + * finc specific model for Solr records based on the stock + * VuFind\RecordDriver\SolrDefault + * + * PHP version 5 + * + * Copyright (C) Leipzig University Library 2015. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * @category VuFind + * @package RecordDrivers + * @author Dorian Merz <merz@ub.uni-leipzig.de> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link http://vufind.org/wiki/vufind2:record_drivers Wiki + */ +namespace finc\RecordDriver; + +use VuFind\Db\Row\Resource; + +/** + * Bundles serialization functionality used to store records in resource table + * + * @category VuFind + * @package RecordDrivers + * @author Dorian Merz <merz@ub.uni-leipzig.de> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link http://vufind.org/wiki/vufind2:record_drivers Wiki + */ +trait FincRecordSerializationTrait +{ + /** + * @var array $serializationMapping List of functions whose return values + * are serialized to the resource table + */ + protected $serializationMapping = [ + 'title' => 'getTitle', + 'shortTitle' => 'getShortTitle', + 'publishPlace' => 'getPlacesOfPublication', + 'publisher' => 'getPublishers', + 'isbn' => 'getISBNs', + 'issn' => 'getISSNs', + 'DOI' => 'getCleanDOI', + 'description' => 'getSummary', + 'callnumber-raw' => 'getCallNumbers', + 'container_title' => 'getContainerTitle', + 'format' => 'getFormats', + 'author' => 'getPrimaryAuthors', + 'author2' => 'getSecondaryAuthors', + 'additional_authors' => 'getAdditionalAuthors', + ]; + + /** + * @var array $savedInSeperateFields List of fields to be store in the + * respective DB field. Schema 'local_field_name' => 'db_field_name' + */ + protected $savedInSeperateFields = [ + 'publishDate' => 'year', + 'author' => 'author', + 'id' => 'record_id' + ]; + + /** + * Serializes values from this record's field property to a json string that + * will be used as a substitute in the title field of VuFind's resource table + * + * @param bool $cropped true if only use single values from arrays shall be used + * @return false|string + * @throws FincRecordSerializationException + */ + public function serializeForResourceTable() + { + $output = new \stdClass(); + foreach ($this->serializationMapping as $key => $function) { + $retval = $this->tryMethod($function); + if (!empty($retval)) { + $output->$key = $retval; + } + } + return $output; + } + + /** + * Populates the fields property of the attached record + * with values from the resource table + * + * @param Resource $input row from the resource table, + * containing a title as serialized by + * \finc\RecordDriver\RecordSerializationTrait::serializeForResourceTable + */ + public function deserializeFromResourceTable(Resource $input) + { + foreach ($this->savedInSeperateFields as $local_key => $db_key) { + // populate fields from predefined DB table columns + if (isset($input->$db_key)) { + $this->fields[$local_key] = $input->$db_key; + } + } + if (isset($input->title)) { + $this->fields['title'] = ucfirst($input->title); + } + // populate others from serialized info in title field + $input = json_decode($input->extra_metadata, true); + // the json input is an associative array keyed with + // the exported field names, thus we can array_intersect + // the input here + $this->fields = array_merge( + $this->fields, + // beware the order here, we need $input's field values + array_intersect_key( + $input, + $this->serializationMapping + ) + ); + } + + /** + * @return false|string + * @throws FincRecordSerializationException + */ + public function getExtraResourceMetadata() + { + return $this->serializeForResourceTable(); + } +} + +/** + * thrown on serialization errors from this trait + * Class SerializationException + * @package finc\RecordDriver + */ +class FincRecordSerializationException extends \Exception +{ +} diff --git a/module/finc/src/finc/RecordDriver/SolrDefault.php b/module/finc/src/finc/RecordDriver/SolrDefault.php index d13c83c885ea0dbae76e6d384f2383aef1b27a19..52973753a733a52028ed6b58339628690adb12bf 100644 --- a/module/finc/src/finc/RecordDriver/SolrDefault.php +++ b/module/finc/src/finc/RecordDriver/SolrDefault.php @@ -53,6 +53,7 @@ class SolrDefault extends \VuFind\RecordDriver\SolrDefault implements { use \VuFind\Log\LoggerAwareTrait; use SolrDefaultFincTrait; + use FincRecordSerializationTrait; /** * Index extension used for dynamic fields @@ -61,6 +62,13 @@ class SolrDefault extends \VuFind\RecordDriver\SolrDefault implements */ protected $indexExtension = ''; + /** + * Marks this Record as retrieved from Cache + * + * @var bool + */ + protected $isCachedRecord = FALSE; + /** * Constructor * @@ -126,4 +134,12 @@ class SolrDefault extends \VuFind\RecordDriver\SolrDefault implements return $authorRolesArray; } + + public function setCachedRecord() { + $this->isCachedRecord = TRUE; + } + + public function isCachedRecord() { + return $this->isCachedRecord; + } } diff --git a/module/finc/src/finc/View/Helper/Root/Record.php b/module/finc/src/finc/View/Helper/Root/Record.php index 8a17f4c951f38ba8fcdcf30feef9d9ca3c31ebb0..df2d737400ed10d2d944ba7ed146c19003daf30b 100644 --- a/module/finc/src/finc/View/Helper/Root/Record.php +++ b/module/finc/src/finc/View/Helper/Root/Record.php @@ -85,7 +85,6 @@ class Record extends \VuFind\View\Helper\Root\Record * @param mixed $rewrite * @param mixed $resolverConfig * - * @access public */ public function __construct( $config, @@ -145,7 +144,6 @@ class Record extends \VuFind\View\Helper\Root\Record /** * Get external access links to other ILS defined by config setting. * - * @access public * @return array Associative array. * @throws Exception Value of source ids has to be numeric. * @deprecated Deprecated due to View Helper ExternalCatalogueLink->getLinks() @@ -196,7 +194,7 @@ class Record extends \VuFind\View\Helper\Root\Record && true === in_array($sourceID, $sids)) ? $replaceId : null; break; - }; + } } // institution filter @@ -291,7 +289,6 @@ class Record extends \VuFind\View\Helper\Root\Record * * @param array $links List with links schema [url] and [desc] for description. * - * @access protected * @return array $links Return processed links. */ protected function rewriteLinks($links = []) @@ -320,7 +317,6 @@ class Record extends \VuFind\View\Helper\Root\Record * * @param string $link Link to rewrite * - * @access protected * @return string $link Return processed link. * * @to-do resolve non consistently behaviour between method pattern and remove @@ -390,7 +386,6 @@ class Record extends \VuFind\View\Helper\Root\Record * * @param string $link Link to rewrite * - * @access protected * @return string $link Return processed link. */ protected function resolveEblLink($link) @@ -475,17 +470,16 @@ class Record extends \VuFind\View\Helper\Root\Record * Get online editions * * @return array - * @access public */ public function getOnlineEditions() { - $online_keys = array( + $online_keys = [ "Online-Ausg.", "Online-Ausg.:", "Digital. Ausg.", "Online-Ausg. u.d.T.", "Elektronische Reproduktion" - ); + ]; $onlineEditions = []; $recordLinkHelper = $this->getView()->plugin('recordLink'); foreach ($this->driver->tryMethod('getAdditionals') as $add) { @@ -502,4 +496,31 @@ class Record extends \VuFind\View\Helper\Root\Record } return $onlineEditions; } + + public function getAdvancedSearchQueryParams() + { + $queryParams = []; + if ($title = $this->driver->getShortTitle()) { + $queryParams['lookfor0'][] = $title; + $queryParams['type0'][] = 'Title'; + } + $isn = $this->driver->tryMethod('getCleanISBN'); + if (empty($isn)) { + $isn = $this->driver->tryMethod('getCleanISSN'); + } + if (!empty($isn)) { + $queryParams['lookfor0'][] = $isn; + $queryParams['type0'][] = 'ISN'; + } + if ($author = $this->driver->tryMethod('getPrimaryAuthors')) { + $queryParams['lookfor0'][] = is_array($author) ? current($author) : $author; + $queryParams['type0'][] = 'Author'; + } + if (!empty($queryParams)) { + // although this is a standard parameter + // we should only pass it if there is an actual query to perform + $queryParams['join'] = 'AND'; + } + return $queryParams; + } } diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/list-entry.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/list-entry.phtml index e7e0547d831891190a4ae3b784d0b9b8b5c397bc..0cbc0f4761033282ed3a6d41594aacaef19940fe 100644 --- a/themes/finc/templates/RecordDriver/DefaultRecord/list-entry.phtml +++ b/themes/finc/templates/RecordDriver/DefaultRecord/list-entry.phtml @@ -37,14 +37,24 @@ if ($cover): <div class="result-body"> <div class="resultItemLine1"> <?php $missing = $this->driver instanceof \VuFind\RecordDriver\Missing; ?> - <?php if (!$missing): ?><a href="<?=$this->recordLink()->getUrl($this->driver)?>" class="getFull" data-view="<?=$this->params->getOptions()->getListViewOption()?>"><?php endif; ?> - <span class="title"><?=$this->record($this->driver)->getTitleHtml()?></span> - <?php if (!$missing): ?></a><?php endif; ?> + <?php if ($missing && $this->driver->isCachedRecord()): ?> + <span class="title"><?=$this->record($this->driver)->getTitleHtml()?></span> + <div class="alert alert-info"> + <?= $this->translate('record_from_cache')?> + <?php if ($queryParams = $this->record($this->driver)->getAdvancedSearchQueryParams()): ?> + <br/><a href="<?=$this->url('search-results', [], ['query'=>$queryParams])?>"><?=$this->transEsc('search_cached_record', ['%%title_full%%' => $this->driver->getTitle()])?></a> + <?php endif; ?> + </div> + <?php elseif (!$missing): ?> + <a href="<?=$this->recordLink()->getUrl($this->driver)?>" class="getFull" data-view="<?=$this->params->getOptions()->getListViewOption() ?>"> + <span class="title"><?=$this->record($this->driver)->getTitleHtml()?></span> + </a> + <?php endif;?> </div> <div class="resultItemLine2"> <?php if ($this->driver->isCollection()): ?> - <?=implode('<br>', array_map(array($this, 'escapeHtml'), $this->driver->getSummary()));?> + <?=implode('<br>', array_map([$this, 'escapeHtml'], $this->driver->getSummary()));?> <?php else: ?> <?php $summAuthors = $this->driver->getPrimaryAuthors(); if (!empty($summAuthors)): ?> @@ -60,7 +70,7 @@ if ($cover): <?php if (!empty($journalTitle)): ?> <?=!empty($summAuthor) ? '<br/>' : ''?> <?=/* TODO: handle highlighting more elegantly here */ - $this->transEsc('Published in') . ' <a href="' . $this->record($this->driver)->getLink('journaltitle', str_replace(array('{{{{START_HILITE}}}}', '{{{{END_HILITE}}}}'), '', $journalTitle)) . '">' . $this->highlight($journalTitle) . '</a>';?> + $this->transEsc('Published in') . ' <a href="' . $this->record($this->driver)->getLink('journaltitle', str_replace(['{{{{START_HILITE}}}}', '{{{{END_HILITE}}}}'], '', $journalTitle)) . '">' . $this->highlight($journalTitle) . '</a>';?> <?=!empty($summDate) ? ' (' . $this->escapeHtml($summDate[0]) . ')' : ''?> <?php elseif (!empty($summDate)): ?> <?=!empty($summAuthor) ? '<br/>' : ''?> @@ -71,7 +81,7 @@ if ($cover): <?php foreach ($summInCollection as $collId => $collText): ?> <div> <b><?=$this->transEsc("in_collection_label")?></b> - <a class="collectionLinkText" href="<?=$this->url('collection', array('id' => $collId))?>?recordID=<?=urlencode($this->driver->getUniqueID())?>"> + <a class="collectionLinkText" href="<?=$this->url('collection', ['id' => $collId])?>?recordID=<?=urlencode($this->driver->getUniqueID())?>"> <?=$this->escapeHtml($collText)?> </a> </div> @@ -117,7 +127,7 @@ if ($cover): <strong><?=$this->transEsc('Saved in')?>:</strong> <?php $i = 0; foreach ($this->lists as $current): ?> - <a href="<?=$this->url('userList', array('id' => $current->id))?>"><?=$this->escapeHtml($current->title)?></a><?php if ($i++ < count($this->lists) - 1): ?>,<?php endif; ?> + <a href="<?=$this->url('userList', ['id' => $current->id])?>"><?=$this->escapeHtml($current->title)?></a><?php if ($i++ < count($this->lists) - 1): ?>,<?php endif; ?> <?php endforeach; ?> <br/> <?php endif; ?> diff --git a/themes/finc/templates/RecordDriver/FincMissing/record-icon.phtml b/themes/finc/templates/RecordDriver/FincMissing/record-icon.phtml new file mode 100644 index 0000000000000000000000000000000000000000..055372fe06c3cf3449c6a2b9527f84093de1a916 --- /dev/null +++ b/themes/finc/templates/RecordDriver/FincMissing/record-icon.phtml @@ -0,0 +1,4 @@ +<span class="access-icon hidden-print"> + <i class="fa fa-times-circle"></i> + <span class="hidden-xs"> <?=$this->transEsc("Missing Record")?></span> +</span> diff --git a/themes/finc/templates/RecordDriver/FincMissing/result-list.phtml b/themes/finc/templates/RecordDriver/FincMissing/result-list.phtml new file mode 100644 index 0000000000000000000000000000000000000000..c527c275c5fe2c5ec3d541562d4e395013f82f45 --- /dev/null +++ b/themes/finc/templates/RecordDriver/FincMissing/result-list.phtml @@ -0,0 +1,127 @@ +<!-- finc: recordDriver - FincMissing - result-list --> +<?php /* + this is mostly a copy of finc: recordDriver - DefaultRecord - result-list + it is only used for the print view of FincMissingRecords in bulk mode + */ +?> + +<?php +/* finc: compare SolrAI/result-list with this one during upgrades! - CK */ +$coverDetails = $this->record($this->driver)->getCoverDetails('result-list', 'medium', $this->recordLink()->getUrl($this->driver)); +$cover = $coverDetails['html']; +$thumbnail = false; +$thumbnailAlignment = $this->record($this->driver)->getThumbnailAlignment('result'); +if ($cover): + ob_start(); ?> + <div class="media-<?=$thumbnailAlignment?> <?=$this->escapeHtmlAttr($coverDetails['size'])?>"> + <?=$cover?> + </div> + <?php $thumbnail = ob_get_contents(); ?> + <?php ob_end_clean(); ?> + <?php /* Show finc style-based icons; */ ?> +<?php elseif ($this->record($this->driver)->showStyleBasedIcons()): ?> + <?php ob_start(); ?> + <div class="media-<?=$thumbnailAlignment?> record-icon"> + <?=$this->record($this->driver)->getRecordIcon()?> + </div> + <?php $thumbnail = ob_get_contents(); ?> + <?php ob_end_clean(); ?> + <?php /* Show finc style-based icons - END */ ?> +<?php endif; ?> + +<input type="hidden" value="<?=$this->escapeHtmlAttr($this->driver->getUniqueID())?>" class="hiddenId"/> +<input type="hidden" value="<?=$this->escapeHtmlAttr($this->driver->getSourceIdentifier())?>" class="hiddenSource"/> +<div class="media"> + <?php if ($thumbnail && $thumbnailAlignment == 'left'): ?> + <?=$thumbnail?> + <?php endif ?> + <div class="media-body"> + <div class="result-body"> + <div> + <a href="<?=$this->recordLink()->getUrl($this->driver)?>" class="title getFull" data-view="<?=$this->params->getOptions()->getListViewOption()?>"> + <?=$this->record($this->driver)->getTitleHtml()?> + </a> + </div> + + <div> + <?php $summAuthors = $this->driver->getPrimaryAuthors(); + if (!empty($summAuthors)): ?> + <?=$this->transEsc('by')?> + <?php $authorCount = count($summAuthors); + foreach ($summAuthors as $i => $summAuthor): ?> + <a href="<?=$this->record($this->driver)->getLink('author', $this->highlight($summAuthor, null, true, false))?>" class="author"><?=$this->highlight($summAuthor)?></a><?=$i + 1 < $authorCount ? ',' : ''?> + <?php endforeach; ?> + <?php endif; ?> + <?php + /* finc-specific from here, #8639, #7345 - CK */ + /* finc-specific: nxt line #8639 - CK */ ?> + <?php $journalTitle = $this->driver->getContainerTitle(); + $summDate = current($this->driver->getPublicationDates()); ?> + <?php if (!empty($journalTitle)): ?> + <?=!empty($summAuthor) ? '<br />' : ''?> + <?=$this->transEsc('Published in')?> + <?php $containerSource = $this->driver->getSourceIdentifier(); ?> + <?php $containerID = $this->driver->getContainerRecordID(); ?> + <?php /* TODO: handle highlighting more elegantly here: */ ?> + <a href="<?=($containerID ? $this->recordLink()->getUrl("$containerSource|$containerID") : $this->record($this->driver)->getLink('journaltitle', str_replace(['{{{{START_HILITE}}}}', '{{{{END_HILITE}}}}'], '', $journalTitle)))?>"><?=$this->highlight($journalTitle) ?></a> + <?php /* finc-specific: nxt line #8639 - CK */ ?> + <?=!empty($summDate) ? ' (' . $this->escapeHtml($summDate) . ')' : ''?> + <?php elseif (!empty($summDate)): ?> + <?=!empty($summAuthor) ? '<br />' : ''?> + <?php /* finc-specific: nxt line #8639 - CK */ ?> + <?=$this->transEsc('Published') . ' ' . $this->escapeHtml($summDate)?> + <?php endif; ?> + <?php $summInCollection = $this->driver->getContainingCollections(); + if (!empty($summInCollection)): ?> + <?php foreach ($summInCollection as $collId => $collText): ?> + <div> + <strong><?=$this->transEsc("in_collection_label")?></strong> + <a class="collectionLinkText" href="<?=$this->url('collection', ['id' => $collId])?>?recordID=<?=urlencode($this->driver->getUniqueID())?>"> + <?=$this->escapeHtml($collText)?> + </a> + </div> + <?php endforeach; ?> + <?php endif; ?> + </div> + + <?php $summCallNo = $this->driver->getCallNumber(); + if (!empty($summCallNo)): ?> + <div class="callnumAndLocation"> + <strong><?=$this->transEsc('Call Number')?>:</strong> <?=$this->escapeHtml($summCallNo)?> + </div> + <?php endif; ?> + + <div class="result-formats"> + <?=$this->record($this->driver)->getFormatList()?> + </div> + </div> + <div class="result-links hidden-print"> + <?php /* Display qrcode if appropriate: */ ?> + + <?php if ($this->cart()->isActiveInSearch() && $this->params->getOptions()->supportsCart() && $this->cart()->isActive()): ?> + <?=$this->render('record/cart-buttons.phtml', ['id' => $this->driver->getUniqueId(), 'source' => $this->driver->getSourceIdentifier()]);?><br/> + <?php endif; ?> + + <?php if ($this->userlist()->getMode() !== 'disabled'): ?> + <?php if ($this->permission()->allowDisplay('feature.Favorites')): ?> + <?php /* Add to favorites; finc: keep Icon inside link - CK */ ?> + <a href="<?=$this->recordLink()->getActionUrl($this->driver, 'Save')?>" data-lightbox class="save-record result-link-label" data-id="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>" title="<?=$this->transEsc('Add to favorites')?>"> + <i class="fa fa-fw fa-star" aria-hidden="true"></i> <span class="hidden-xs hidden-sm"><?=$this->transEsc('Add to favorites')?></span> + </a><br/> + <?php elseif ($block = $this->permission()->getAlternateContent('feature.Favorites')): ?> + <?=$block?> + <?php endif; ?> + <?php /* Saved lists */ ?> + <div class="savedLists alert alert-info hidden"> + <strong><?=$this->transEsc("Saved in")?>:</strong> + </div> + <?php endif; ?> + + <?=$this->driver->supportsCoinsOpenUrl() ? '<span class="Z3988" title="' . $this->escapeHtmlAttr($this->driver->getCoinsOpenUrl()) . '"></span>' : ''?> + </div> + </div> + <?php if ($thumbnail && $thumbnailAlignment == 'right'): ?> + <?=$thumbnail?> + <?php endif ?> +</div> +<!-- finc: recordDriver - FincMissing - result-list - END -->