diff --git a/data/cache/.gitignore b/data/cache/.gitignore deleted file mode 100644 index c96a04f008ee21e260b28f7701595ed59e2839e3..0000000000000000000000000000000000000000 --- a/data/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore \ No newline at end of file diff --git a/local/alpha/config/vufind/Amsl.ini b/local/alpha/config/vufind/Amsl.ini deleted file mode 100644 index 63bb01b3c7baedc78ed8950aeb9fffb0e6b04144..0000000000000000000000000000000000000000 --- a/local/alpha/config/vufind/Amsl.ini +++ /dev/null @@ -1,22 +0,0 @@ -;#################################################################### -;##################### DO NOT DELETE THIS HEADER #################### -;################### Leipzig University Library © 2015 ############## -; -; This is the default ALPHA-INI-file and inherits -; all the settings from the INI-file defined in [Parent_Config] which -; points to the default INI-file located in the folder vufind2/local -; - -[Parent_Config] -relative_path = ../../../config/vufind/Amsl.ini - -; A comma-separated list of config sections from the parent which should be -; completely overwritten by the equivalent sections in this configuration; -; any sections not listed here will be merged on a section-by-section basis. -;override_full_sections = "Languages,AlphaBrowse_Types" - -; -; Add ALPHA-specific customization after this header. -; -;##################### DO NOT DELETE THIS HEADER #################### -;#################################################################### \ No newline at end of file diff --git a/local/alpha/config/vufind/DAIA.ini b/local/alpha/config/vufind/DAIA.ini deleted file mode 100644 index 5428ab9655e03e0235236617fc8fbc387e013950..0000000000000000000000000000000000000000 --- a/local/alpha/config/vufind/DAIA.ini +++ /dev/null @@ -1,22 +0,0 @@ -;#################################################################### -;##################### DO NOT DELETE THIS HEADER #################### -;################### Leipzig University Library © 2015 ############## -; -; This is the default ALPHA-INI-file and inherits -; all the settings from the INI-file defined in [Parent_Config] which -; points to the default INI-file located in the folder vufind2/local -; - -[Parent_Config] -relative_path = ../../../config/vufind/DAIA.ini - -; A comma-separated list of config sections from the parent which should be -; completely overwritten by the equivalent sections in this configuration; -; any sections not listed here will be merged on a section-by-section basis. -;override_full_sections = "Languages,AlphaBrowse_Types" - -; -; Add ALPHA-specific customization after this header. -; -;##################### DO NOT DELETE THIS HEADER #################### -;#################################################################### diff --git a/local/alpha/config/vufind/ExternalCatalogue.schema.json b/local/alpha/config/vufind/ExternalCatalogue.schema.json deleted file mode 100644 index 9ebddda25a4ad481798b704333d7a6068f5fbf7d..0000000000000000000000000000000000000000 --- a/local/alpha/config/vufind/ExternalCatalogue.schema.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "External Catalogue Links", - "description": "Define external catalogue links for VuFind and filter for SolrDefault criteria", - "type": "object", - "properties": { - "id": { - "patternProperties": { - "([A-Z0-9]*)-([a-zA-Z0-9]*)": { - "properties": { - "pattern": { - "description": "URL pattern for replacement with identifier", - "type": "string" - }, - "filter": { - "patternProperties": { - "[A-Z0-9]*": { - "description": "Filter rules", - "type": [ - "string", - "array" - ] - } - } - } - } - } - } - }, - "ppn": { - "patternProperties": { - "([A-Z0-9]*)-([a-zA-Z0-9]*)": { - "properties": { - "pattern": { - "description": "URL pattern for replacement with identifier", - "type": "string" - }, - "filter": { - "patternProperties": { - "[A-Z0-9]*": { - "description": "Filter rules", - "type": [ - "string", - "array" - ] - } - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/local/alpha/config/vufind/FincILS.ini b/local/alpha/config/vufind/FincILS.ini deleted file mode 100644 index 94a54c73cc9c9f929b8d9d3290b652b8e86aeca7..0000000000000000000000000000000000000000 --- a/local/alpha/config/vufind/FincILS.ini +++ /dev/null @@ -1,22 +0,0 @@ -;#################################################################### -;##################### DO NOT DELETE THIS HEADER #################### -;################### Leipzig University Library © 2015 ############## -; -; This is the default ALPHA-INI-file and inherits -; all the settings from the INI-file defined in [Parent_Config] which -; points to the default INI-file located in the folder vufind2/local -; - -[Parent_Config] -relative_path = ../../../config/vufind/FincILS.ini - -; A comma-separated list of config sections from the parent which should be -; completely overwritten by the equivalent sections in this configuration; -; any sections not listed here will be merged on a section-by-section basis. -;override_full_sections = "Languages,AlphaBrowse_Types" - -; -; Add ALPHA-specific customization after this header. -; -;##################### DO NOT DELETE THIS HEADER #################### -;#################################################################### \ No newline at end of file diff --git a/local/config/vufind/Amsl.ini b/local/config/vufind/Amsl.ini deleted file mode 100644 index 27d8d861fdfd74d1af6028cdb87ef4d57397f2f0..0000000000000000000000000000000000000000 --- a/local/config/vufind/Amsl.ini +++ /dev/null @@ -1,19 +0,0 @@ -; Configuration file for the amsl metadata resources - -; Define api endpoint for requests -[API] -url = "{url}" -response_type = 'application/json' - -; Contains label patterns for two layers of source hierarchy -; these will normally be source and collection represented by main_label and sub_label, resp. -; use array_keys in double percent signs to be rendered in the labels -; the main label MUST contain the main key and the main key SHOULD identify the source -; same for the sub key and label -[Mapping] -main_key = 'source_id' -main_label = '%%source_id%%: %%source_label%%' -default_main_label = 'untitled source' -sub_key = 'collection_label' -sub_label = '%%collection_label%%' -default_sub_label = 'untilted collection' \ No newline at end of file diff --git a/local/config/vufind/ExternalCatalogue.schema.json b/local/config/vufind/ExternalCatalogue.schema.json deleted file mode 100644 index a394325db8c3eb9eaea5797178b58d06a42e3161..0000000000000000000000000000000000000000 --- a/local/config/vufind/ExternalCatalogue.schema.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "External Catalogue Links", - "description": "Define external catalogue links for VuFind and filter for SolrDefault criteria", - "type": "object", - "properties": { - "id": { - "patternProperties": { - "([A-Z0-9]*)-([a-zA-Z0-9]*)": { - "properties": { - "pattern": { - "description": "URL pattern for replacement with identifier", - "type": "string" - }, - "filter": { - "patternProperties": { - "[A-Z0-9]*": { - "description": "Filter rules", - "type": [ - "string", - "array" - ] - } - } - } - } - } - } - }, - "record_id": { - "patternProperties": { - "([A-Z0-9]*)-([a-zA-Z0-9]*)": { - "properties": { - "pattern": { - "description": "URL pattern for replacement with identifier", - "type": "string" - }, - "filter": { - "patternProperties": { - "[A-Z0-9]*": { - "description": "Filter rules", - "type": [ - "string", - "array" - ] - } - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/local/languages/de.ini b/local/languages/de.ini index 862192b59842777b4b456810ae016a0dd7ef0ca8..8234c3a9c6b17a969df39f13fab0d1c95fe192eb 100644 --- a/local/languages/de.ini +++ b/local/languages/de.ini @@ -1937,4 +1937,7 @@ support_by_dfg = "Die Nationallizenzen wurden gefördert durch die" hierarchyTreeSelect = "Ãœbergeordnete Werke:" collection_hierarchy_tree_tab = "Sammlungskontext" -Collection Items = "Enthaltene Objekte" \ No newline at end of file +Collection Items = "Enthaltene Objekte" + +; VF5.1 Offcanvas-Toggler +offcanvas-toggler-record-view = "Eintrag weiter verarbeiten" \ No newline at end of file diff --git a/local/languages/en.ini b/local/languages/en.ini index 0d053d17aa75a61ad98d01185ea097a6b7d3c39d..5d77351298b74c26c0b9fbce74563f3fa757ad70 100644 --- a/local/languages/en.ini +++ b/local/languages/en.ini @@ -2043,4 +2043,7 @@ hierarchyTreeSelect = "Parent items:" collection_hierarchy_tree_tab = "Collection Context" DigitalCollection = Digital Collection -Digital Collection = Digital Collection \ No newline at end of file +Digital Collection = Digital Collection + +; VF5.1 Offcanvas-Toggler +offcanvas-toggler-record-view = "Further processing options" \ No newline at end of file diff --git a/module/finc/src/finc/RecordDriver/SolrDefaultFincTrait.php b/module/finc/src/finc/RecordDriver/SolrDefaultFincTrait.php index 31bdebc6a98e848dd4f926c6a5f923aef6aab883..e8ca518f5c0d28b69da61df95776fca70a8fb568 100644 --- a/module/finc/src/finc/RecordDriver/SolrDefaultFincTrait.php +++ b/module/finc/src/finc/RecordDriver/SolrDefaultFincTrait.php @@ -76,6 +76,18 @@ trait SolrDefaultFincTrait */ } + /** + * Has collection children + * + * @return bool + * @access public + * @link https://projekte.ub.uni-leipzig.de/issues/14742 + */ + public function hasChildren() + { + return parent::isCollection(); + } + /** * Get all call numbers associated with the record (empty string if none). * @@ -806,15 +818,23 @@ trait SolrDefaultFincTrait } /** - * After giving a record ids as e.g. ppn of the BSZ check if a record exists. - * This method can be used to indicate a direct link than to form a general - * look for query. + * After giving a record ids as e.g. ppn of the context check (KXP|BSZ) if a + * foreign record exists. This method can be used to indicate a direct link + * than to form a general look for query. * - * @param array $array Array of record ids to test. + * Please note: 1) This method can be simplified if it is necessary only to + * map record_id to id but you need the solr to check if the item really + * exists in the Solr infrastructure to maybe no displaying a false link later + * on. 2) There's legacy component to rewrite back real Solr record_id in + * return container. Can be useful if there are still any successive methods + * in action. * - * @return int mixed If success return at least one finc id otherwise null. + * @param array $array Array of record ids to test. + * @param string $context Context where to search related items. + * + * @return null|mixed If success return at least one finc id otherwise null. */ - protected function addFincIDToRecord($array) + protected function addFincIDToRecord($array, $context = 'kxp_id_str') { // record ids $rids = []; @@ -834,15 +854,18 @@ trait SolrDefaultFincTrait } } + // Solr query remains necessary if it is desired to check if solr + // infrastructure contains really the foreign items + // build the query: if (count($rids) == 1) { // single query: - $value = 'record_id:' . $rids[0]['rid'] + $value = $context . ':' . $rids[0]['rid'] . ' AND source_id:' . $rids[0]['sid']; } elseif (count($rids) > 1) { // multi query: foreach ($rids as $rid) { - $parts[] = '(record_id:' . $rid['rid'] + $parts[] = '('. $context .':' . $rid['rid'] . ' AND source_id:' . $rid['sid'] . ')'; } $value = '(' . implode(' OR ', $parts) . ')'; @@ -851,7 +874,7 @@ trait SolrDefaultFincTrait } $query = new \VuFindSearch\Query\Query($value); $bag = new ParamBag(); - $bag->set('fl', 'id,record_id'); + $bag->set('fl', 'id, record_id,' . $context); $records = $this->searchService ->search('Solr', $query, 0, count($rids), $bag); @@ -860,11 +883,10 @@ trait SolrDefaultFincTrait && !empty($records) ) { foreach ($records as $record) { - // we SHOULD use the immediate field values here since the - // above query yields record stubs of type VuFind\RecordDriver\SolrDefault - // which normally not allow for specialized functions e.g. SolrMarcFinc::getRID - // the specified fields, however, will always be set - $retval[$record->fields['record_id']] = $record->fields['id']; + $retval[$record->getField($context)]['id'] = + $record->getUniqueID(); + $retval[$record->getField($context)]['record_id'] = + $record->getRID(); } } @@ -872,7 +894,8 @@ trait SolrDefaultFincTrait foreach ($array as &$val) { if (isset($val['record_id'])) { if (isset($retval[($val['record_id'])])) { - $val['id'] = $retval[($val['record_id'])]; + $val['id'] = $retval[($val['record_id'])]['id']; + $val['record_id'] = $retval[($val['record_id'])]['record_id']; } } } diff --git a/module/finc/src/finc/RecordDriver/SolrMarcFinc.php b/module/finc/src/finc/RecordDriver/SolrMarcFinc.php index 299e373a232578a1b0a359ae735619628c13bc3d..b61f4049ddfca0de8cade087acb6f1f7e0da5775 100644 --- a/module/finc/src/finc/RecordDriver/SolrMarcFinc.php +++ b/module/finc/src/finc/RecordDriver/SolrMarcFinc.php @@ -44,9 +44,16 @@ class SolrMarcFinc extends SolrMarc /** * pattern to identify bsz + * + * @deprecated After k10plus transition maybe not longer in use. */ const BSZ_PATTERN = '/^(\(DE-576\))(\d+)(\w|)/'; + /** + * pattern to identify kxp + */ + const KXP_PATTERN = '/^(\(DE-627\))(\d+)(\w|)/'; + /** * List of isil of institution * diff --git a/module/finc/src/finc/RecordDriver/SolrMarcFincTrait.php b/module/finc/src/finc/RecordDriver/SolrMarcFincTrait.php index fdc2aacbcdbe257ad1feef74f656a5a1e53af21d..d795e123fbf4fa1b1a10be512798c41c74730671 100644 --- a/module/finc/src/finc/RecordDriver/SolrMarcFincTrait.php +++ b/module/finc/src/finc/RecordDriver/SolrMarcFincTrait.php @@ -331,7 +331,7 @@ trait SolrMarcFincTrait foreach ($linkFields as $current) { $text = $current->getData(); // Extract parenthetical prefixes: - if (preg_match(self::BSZ_PATTERN, $text, $matches)) { + if (preg_match(self::KXP_PATTERN, $text, $matches)) { //$id = $this->checkIfRecordExists($matches[2]); //if ($id != null) { $array[$key]['record_id'] = $matches[2].$matches[3]; @@ -1086,7 +1086,7 @@ trait SolrMarcFincTrait foreach ($linkFields as $current) { $text = $current->getData(); // Extract parenthetical prefixes: - if (preg_match(self::BSZ_PATTERN, $text, $matches)) { + if (preg_match(self::KXP_PATTERN, $text, $matches)) { $array[$key]['record_id'] = $matches[2] . $matches[3]; if (null != ($sid = $this->getSourceID())) { $array[$key]['source_id'] = $sid; @@ -1125,84 +1125,47 @@ trait SolrMarcFincTrait $retval = []; $defaultHeading = 'Note'; // container for collecting recordIDs to the result array #12941 - $tempIds = []; - $fields = $this->getMarcRecord()->getFields('787'); - if (!$fields) { + $entires = $this->getMarcRecord()->getFields('787'); + if (!$entires) { return null; } - foreach ($fields as $field) { + foreach ($entires as $key => $line) { // don't do anything unless we have something in $a - if ($a = $field->getSubfield('a')) { - // do we have a main entry heading? - if ($i = $field->getSubfield('i')) { - // build the text to be displayed from subfields $a and/or $t - $text = ($t = $field->getSubfield('t')) - ? $a->getData() . ': ' . $t->getData() - : $a->getData(); - - $linkFields = $field->getSubfields('w'); - foreach ($linkFields as $current) { - $ids = $current->getData(); - - // Extract parenthetical prefixes: - if (preg_match(self::BSZ_PATTERN, $ids, $matches)) { - // use the same key to set the record_id into the - // $retval array like it is used for the other - // content below - $tempIds[$i->getData()]['record_id'] - = $matches[2] . $matches[3]; + if ($a = $line->getSubfield('a')) { + $retval[$key]['subject'] = ($line->getSubfield('i')) + ? $line->getSubfield('i')->getData() : $defaultHeading; + // build the text to be displayed from subfields $a and/or $t + $retval[$key]['text'] = ($t = $line->getSubfield('t')) + ? $a->getData() . ': ' . $t->getData() + : $a->getData(); + $linkFields = $line->getSubfields('w'); + foreach ($linkFields as $current) { + $ids = $current->getData(); + + // Extract parenthetical prefixes: + if (preg_match(self::KXP_PATTERN, $ids, $matches)) { + // use the same key to set the record_id into the + // $retval array like it is used for the other + // content below + $retval[$key]['record_id'] + = $matches[2] . $matches[3]; + if (null != ($sid = $this->getSourceID())) { + $retval[$key]['source_id'] = $sid; } - } // end foreach - - // add ids already here to the temporary array - // instead of the end of the function with the return value - $tempIds = $this->addFincIDToRecord($tempIds); - - // does a linked record exist - $link = ($w = $field->getSubfield('w')) - ? $w->getData() : ''; - - // we expect the links to be ppns prefixed with an ISIL so - // strip the ISIL - $ppn = preg_replace( - "/^\(([A-z])+\-([A-z0-9])+\)\s?/", - "", - $link - ); - - $record_id = null; - if (!empty($tempIds[$i->getData()]['id'])) { - $record_id = $tempIds[$i->getData()]['record_id']; } - - $id = null; - if (!empty($tempIds[$i->getData()]['id'])) { - $id = $tempIds[$i->getData()]['id']; - } - - // let's use the main entry heading as associative key and - // push the gathered content into the retval array - // add recordIDs 'record_id' and 'id' to the result array - // cmp. #12941 - $retval[$i->getData()][] = [ - 'text' => $text, - 'link' => (!empty($ppn) ? $ppn : $link), - 'record_id' => $record_id, - 'id' => $id - ]; - } else { - // no main entry heading found, so push subfield a's content - // into retval using the defaultHeading - $retval[$defaultHeading][] = [ - 'text' => $a->getData(), - 'link' => '' - ]; } } } - - return $retval; + // add ids already here to the temporary array + // instead of the end of the function with the return value + $retval = $this->addFincIDToRecord($retval); + // rearrange return array to collect same subjects below on unique key + $array = []; + foreach ($retval as $item) { + $array[(sha1($item['subject']))][] = $item; + } + return $array; } /** @@ -1249,7 +1212,7 @@ trait SolrMarcFincTrait foreach ($linkFields as $current) { $text = $current->getData(); // Extract parenthetical prefixes: - if (preg_match(self::BSZ_PATTERN, $text, $matches)) { + if (preg_match(self::KXP_PATTERN, $text, $matches)) { $array[$key]['record_id'] = $matches[2].$matches[3]; if (null != ($sid = $this->getSourceID())) { $array[$key]['source_id'] = $sid; @@ -1295,7 +1258,7 @@ trait SolrMarcFincTrait foreach ($linkFields as $current) { $text = $current->getData(); // Extract parenthetical prefixes: - if (preg_match(self::BSZ_PATTERN, $text, $matches)) { + if (preg_match(self::KXP_PATTERN, $text, $matches)) { $array[$key]['record_id'] = $matches[2].$matches[3]; if (null != ($sid = $this->getSourceID())) { $array[$key]['source_id'] = $sid; @@ -1516,7 +1479,7 @@ trait SolrMarcFincTrait foreach ($linkFields as $current) { $text = $current->getData(); // Extract parenthetical prefixes: - if (preg_match(self::BSZ_PATTERN, $text, $matches)) { + if (preg_match(self::KXP_PATTERN, $text, $matches)) { $array[$i]['record_id'] = $matches[2] . $matches[3]; if (null != ($sid = $this->getSourceID())) { @@ -1620,7 +1583,7 @@ trait SolrMarcFincTrait foreach ($linkFields as $current) { $text = $current->getData(); // Extract parenthetical prefixes: - if (preg_match(self::BSZ_PATTERN, $text, $matches)) { + if (preg_match(self::KXP_PATTERN, $text, $matches)) { $array[$i]['record_id'] = $matches[2] . $matches[3]; if (null != ($sid = $this->getSourceID())) { @@ -1702,21 +1665,27 @@ trait SolrMarcFincTrait $idRetrieval = function ($value) { // use preg_match to get rid of the isil - preg_match("/^(\([A-z]*-[A-z0-9]*\))?\s*([A-z0-9]*)\s*$/", $value, $matches); + preg_match(self::KXP_PATTERN, $value, $matches); if (!empty($matches[2])) { - $query = 'record_id:' . $matches[2]; + $query = 'kxp_id_str:' . $matches[2]; if ($sid = $this->fields['source_id']) { $query .= ' AND source_id:'.$sid; } - $result = $this->searchService->search('Solr', new Query($query)); + $result = $this->searchService->search( + 'Solr', + new Query($query) + ); if (count($result) === 0) { - $this->debug('Could not retrieve id for record with ' . $query); + $this->debug( + 'Could not retrieve id for record with ' . $query + ); return null; } return current($result->getRecords())->getUniqueId(); } $this->debug( - 'Pregmatch pattern in getHierarchyParentID failed for ' . $value + 'Pregmatch pattern in getHierarchyParentID failed for ' + . $value ); return $value; }; diff --git a/themes/finc/js/check_item_statuses.js b/themes/finc/js/check_item_statuses.js index 8741775e9b40a808c20a1fe7c67f5fc2f18f00d8..50ac88dea84ba00615607a8bf73a1944eeacd43a 100644 --- a/themes/finc/js/check_item_statuses.js +++ b/themes/finc/js/check_item_statuses.js @@ -17,7 +17,17 @@ function displayItemStatus(result, $item) { $item.removeClass('js-item-pending'); $item.find('.status').empty().append(result.availability_message); $item.find('.ajax-availability').removeClass('ajax-availability hidden'); - if (typeof(result.full_status) != 'undefined' + if (typeof(result.error) != 'undefined' + && result.error.length > 0 + ) { + // Only show error message if we also have a status indicator active: + if ($item.find('.status').length > 0) { + $item.find('.callnumAndLocation').empty().addClass('text-danger').append(result.error); + } else { + $item.find('.callnumAndLocation').addClass('hidden'); + } + $item.find('.callnumber,.hideIfDetailed,.location').addClass('hidden'); + } else if (typeof(result.full_status) != 'undefined' && result.full_status.length > 0 && $item.find('.callnumAndLocation').length > 0 ) { @@ -57,7 +67,7 @@ function displayItemStatus(result, $item) { } $item.find('.locationDetails').removeClass('hidden'); $item.find('.locationDetails').html(locationListHTML); - // next three lines finc-specific, added in #5737, check functionality, CK + // next three lines finc-specific, added in #5737, check functionality, CK - Fixme 5.1 } else if (result.callnumber.length == 0 && result.location.length == 0) { // hide location and callnumber information if both are empty $item.find('.callnumAndLocation').addClass('hidden'); @@ -77,7 +87,8 @@ function itemStatusFail(response, textStatus) { return; } // display the error message on each of the ajax status place holder - $('.js-item-pending').addClass('text-danger').append(response.responseJSON.data); + $('.js-item-pending .callnumAndLocation').addClass('text-danger').empty().removeClass('hidden') + .append(typeof response.responseJSON.data === 'string' ? response.responseJSON.data : VuFind.translate('error_occurred')); } var itemStatusIds = []; @@ -100,9 +111,10 @@ function runItemAjaxForQueue() { data: {'id': itemStatusIds} }) .done(function checkItemStatusDone(response) { - for (var j = 0; j < response.data.length; j++) { - displayItemStatus(response.data[j], itemStatusEls[response.data[j].id]); - itemStatusIds.splice(itemStatusIds.indexOf(response.data[j].id), 1); + for (var j = 0; j < response.data.statuses.length; j++) { + var status = response.data.statuses[j]; + displayItemStatus(status, itemStatusEls[status.id]); + itemStatusIds.splice(itemStatusIds.indexOf(status.id), 1); } itemStatusRunning = false; }) @@ -121,6 +133,8 @@ function itemQueueAjax(id, el) { itemStatusEls[id] = el; itemStatusTimer = setTimeout(runItemAjaxForQueue, itemStatusDelay); el.addClass('js-item-pending').removeClass('hidden'); + el.find('.callnumAndLocation').removeClass('hidden'); + el.find('.callnumAndLocation .ajax-availability').removeClass('hidden'); el.find('.status').removeClass('hidden'); } @@ -133,10 +147,11 @@ function checkItemStatus(el) { itemQueueAjax(id + '', $item); } +var itemStatusObserver = null; function checkItemStatuses(_container) { - var container = _container instanceof Element - ? _container - : document.body; + var container = typeof _container === 'undefined' + ? document.body + : _container; var ajaxItems = $(container).find('.ajaxItem'); for (var i = 0; i < ajaxItems.length; i++) { @@ -148,8 +163,6 @@ function checkItemStatuses(_container) { itemStatusObserver.disconnect(); } } - -var itemStatusObserver = null; $(document).ready(function checkItemStatusReady() { if (typeof Hunt === 'undefined') { checkItemStatuses(); diff --git a/themes/finc/js/collection_record.js b/themes/finc/js/collection_record.js index 366be1cf3498f57e8fe23a75db7f6c3e06401148..5c085b9525facd53c22400ea0fecf4dca2a010d6 100644 --- a/themes/finc/js/collection_record.js +++ b/themes/finc/js/collection_record.js @@ -7,7 +7,7 @@ function showMoreInfoToggle() { if ($("#collectionInfo").find('tr').length < 1) { return; } - // finc: Keep Accordion OPEN on load + // finc-specific: Keep Accordion OPEN on load - CK // toggleCollectionInfo(); $("#moreInfoToggle").removeClass('hidden'); //$("#moreInfoToggle").click(function moreInfoToggleClick(e) { diff --git a/themes/finc/js/finc.js b/themes/finc/js/finc.js deleted file mode 100644 index 440877206e00b76e9ffda95037718e9ef5c3dd0a..0000000000000000000000000000000000000000 --- a/themes/finc/js/finc.js +++ /dev/null @@ -1,11 +0,0 @@ -// remove when fixed in BS, obsolete in VF5; also remove respective line in theme.config.php; CK - -// Remove/add aria-hidden + add modalTitle for screen-reader access, check of .focus() is necessary -$(document).on('shown.bs.modal', function () { - $('#modal').attr('aria-hidden', 'false').show().focus(); - $('#modal h2').attr('id', 'modalTitle'); -}); - -$(document).on('hidden.bs.modal', function () { - $('#modal').attr('aria-hidden', 'true').hide(); -}); diff --git a/themes/finc/js/hierarchyTree.js b/themes/finc/js/hierarchyTree.js index cc1ca90e4dcc9334b08c3777a8422f425cc8057d..d3db7ac718c594542dc9ee4c75afa837c372bc56 100644 --- a/themes/finc/js/hierarchyTree.js +++ b/themes/finc/js/hierarchyTree.js @@ -189,6 +189,7 @@ $(document).ready(function hierarchyTreeReady() { $("#hierarchyLoading").addClass('hide'); var tree = $("#hierarchyTree").jstree(true); tree.select_node(htmlID); + // finc-specific: opens full hierarchy tree by default #14067 - CK tree.open_all(); if (!inLightbox && hierarchyContext === "Collection") { @@ -237,7 +238,7 @@ $(document).ready(function hierarchyTreeReady() { }, types: { record: { - // remove file icon, insert via SCSS, CK + // finc-specific: remove file icon, insert via SCSS -- CK // icon: 'fa fa-file-o' }, collection: { diff --git a/themes/finc/js/openurl.js b/themes/finc/js/openurl.js index a103e375c61dc68a2ac4b7874a6f3b26e2197e24..32456f36e7c04290abecd394f11d02e837abd81a 100644 --- a/themes/finc/js/openurl.js +++ b/themes/finc/js/openurl.js @@ -14,7 +14,7 @@ VuFind.register('openurl', function OpenUrl() { url: url }) .done(function getResolverLinksDone(response) { - $target.removeClass('ajax_availability').empty().append(response.data); + $target.removeClass('ajax_availability').empty().append(response.data.html); }) .fail(function getResolverLinksFail(response, textStatus) { $target.removeClass('ajax_availability').addClass('text-danger').empty(); @@ -37,7 +37,7 @@ VuFind.register('openurl', function OpenUrl() { // Locate the target area for displaying the results: var target = controls.next('div.resolver'); - // finc-specific, #5334; To chose the right resolver we have to get the resolvertype: + // finc-specific, #5334; to chose the right resolver, we have to get the resolvertype: var resolvertype = element.children('span.resolvertype:first').attr('title'); // If the target is already visible, a previous click has populated it; diff --git a/themes/finc/js/sources-display.js b/themes/finc/js/sources-display.js index 10b718826607bae43807ac6e9c69fef9bfaae5de..7fe2902a9d273fb226f231ae235b93a57e1e9227 100644 --- a/themes/finc/js/sources-display.js +++ b/themes/finc/js/sources-display.js @@ -1,4 +1,5 @@ -// Collapse nearest element on clicl +// finc-specific file to list amsl resources on extra page etc, cf. #11004 - CK +// Collapse nearest element on click $('.collapse-toggler').click(function () { $(this).next().collapse('toggle'); }); diff --git a/themes/finc/scss/compiled.scss b/themes/finc/scss/compiled.scss index 1714fe728be812bab764d8c02c979079324d5ea6..b928d4071a2d4303f11698ad1ea972baa94d9d7e 100644 --- a/themes/finc/scss/compiled.scss +++ b/themes/finc/scss/compiled.scss @@ -187,21 +187,6 @@ form { label { font-weight: normal; } - - // For INLINE, left-floated 'hits per page' and 'sort by' selectors use - &.limit, - &.search-sort { - float: left; - } - - &.limit { - margin-right: ($grid-gutter-width / 2); - } - - // limit the width of the select field if necessary - more select details below - &.sort select { - max-width: 12em; - } } //// Set max-width to make sure boxes don't bleed over the edge on XS (e.g. acquisitionpda, source_id:3 @@ -285,7 +270,15 @@ input[type='text'] { padding: ($grid-gutter-width / 4); } -//// Select - for limit and sort-select widths see above +// red-bordered input field, when empty, requires "form" for specifity, CK +form { + textarea:invalid, + input:invalid { + margin-right: 2px; + } +} + +//// Select - for limit and sort-select widths see below ////// remove browser styles on select boxes and add custom styles (below) select, select.form-control { @@ -420,28 +413,8 @@ select { .text-danger { background-color: $brand-danger; - padding: ($grid-gutter-width / 8); -} - -//// Off-Canvas -@media only screen and (max-width: $screen-xs-max) { - body.offcanvas .offcanvas-toggle { - background: transparentize($brand-primary, .2); - color: $white; - display: block; - height: auto; - line-height: normal; - padding: 1.5rem 0; - position: fixed; - text-align: center; - top: 50%; - width: calc(2em - 1px); - z-index: 5; - } } -//// Off-Canvas - END - //// DATE-RANGE slider (CSS is included in bootstrap-slider.min.css - currently no SCSS version!) ////// Keep enough room for slider handles; PLS note: there are sliders in sidefacets and adv. search .slider-container { @@ -552,6 +525,13 @@ table.collapse.in { width: $thumbnail-width-small; } } + + // push COVER down on SM and XS + .media-left { + @media only screen and (max-width: $screen-sm-max) { + margin-top: 15px; + } + } } //// Sprites for Mediaicons @@ -1029,6 +1009,7 @@ header, } } } + // Searchbox see below // Set max height for xs devices @@ -1180,19 +1161,45 @@ header, @media only screen and (min-width: $screen-sm-min) and (max-width: 994px) { flex: 0 1 75%; } + + // Float "Find" button next to searchbox on XS and SM + @media only screen and (max-width: $screen-sm-max) { + padding-left: 0; + + .searchForm { + display: flex; + + input { + flex-grow: 2; + flex-shrink: 2; + } + + .navbar { + flex-grow: 1; + flex-shrink: 1; + } + + // take out of flexbox flow + .checkbox { + position: absolute; + top: 40px; + } + } + } + } //// this will get search box and buttons in line -.searchForm { - .navbar-left { - // push searchbox down on mobile + add border for better looks - @media only screen and (max-width: $screen-xs-max) { - border: 1px solid $border-color; - margin-bottom: ($grid-gutter-width / 4); - margin-top: 0; - } + +.navbar-left { + // push searchbox down on mobile + @media only screen and (max-width: $screen-xs-max) { + margin-bottom: ($grid-gutter-width / 4); + margin-top: 0; } +} +.searchForm { .list-unstyled li { float: left; @@ -1205,6 +1212,10 @@ header, } } + input { + float: left; + } + // Keep filters, shards etc; apply same styles to checkboxes on HOME and all other pages, // therefore use .searchForm as parent .checkbox { @@ -1214,6 +1225,8 @@ header, input { margin-left: 0; + margin-right: .25rem; + margin-top: 0; } } @@ -1326,6 +1339,11 @@ footer { background-color: $main-bg; border: 1px solid $border-color; padding-bottom: $grid-gutter-width / 1.5; + + @media print { + border: 0; + padding: 0; + } } footer { @@ -1338,6 +1356,10 @@ footer { .mainbody, .sidebar { padding-top: $content-top-padding; + + @media only screen and (max-width: $screen-sm-max) { + padding-top: 0; + } } ////// Bulk Action Toolbar @@ -1347,11 +1369,63 @@ footer { padding-top: ($grid-gutter-width / 2); } +// SEARCH-CONTROLS +// remove flex display +.search-header { + display: block; +} + +.search-stats { + flex-grow: unset; +} + +.hit-stats { + clear: both; + float: none; +} + //// Push hits count down to align with limit and sort select boxes .hits-count { padding-top: .5em; } +// For INLINE, left-floated 'hits per page' and 'sort by' selectors use +.limit, +.search-sort { + float: left; +} + +.limit { + margin-right: ($grid-gutter-width / 2); + + @media only screen and (max-width: $screen-xs-max) { + float: right; + margin-bottom: 7px; + margin-right: 0; + } +} + +// limit the width of the select field if necessary - for more select details, see FORMS section above +.sort select { + max-width: 12em; +} +//// Off-Canvas +@media only screen and (max-width: $screen-sm-max) { + // Define position of VF5.1 offcanvas toggler + .search-stats, + .search-controls { + clear: both; + } + + // Float this left for lefthand-side sidebar + .offcanvas-toogler { + float: right; + } +} + +//// Off-Canvas - END +// SEARCH CONTROLS - END + //// Search Results padding ////// pulled out via .search-results, use negative gutter-width divided by 2 ////// then add padding on results, to create normal column padding appearance @@ -1373,6 +1447,11 @@ footer { padding-bottom: ($grid-gutter-width / 2); width: 100%; // make full width, otherwise ugly look + // remove padding for print + @media print { + padding: 0; + } + // Alternating colors in search results &:nth-of-type(2n) { background-color: $brand-secondary; @@ -1402,7 +1481,8 @@ footer { .savedLists { &.alert { - color: $state-light-text-on-dark; } + color: $state-light-text-on-dark; + } ul { list-style: none; @@ -1460,6 +1540,10 @@ footer { .pagination, .searchtools { @include content-centered-display-as-table; + + @media print { + display: none; + } } //// Fix pagination on XS to display fewer items and remove first and last @@ -1469,7 +1553,7 @@ footer { // hide last and first page buttons &.first, &.last, - // select 7th to 11th child + // select 7th to 11th child &:nth-child(n+10):nth-child(-n+13) { display: none; } @@ -1553,7 +1637,7 @@ footer { font-size: 150%; margin-left: 0; margin-top: -5px; - min-width: 18px;// do not translate into em + min-width: 18px; // do not translate into em } li.jstree-facet, @@ -1609,7 +1693,6 @@ footer { } - ////// Hierarchy tree - END ////// Tabs - END @@ -1717,6 +1800,11 @@ footer { // MAIN CONTENT - END // SIDEBAR +@media only screen and (max-width: $screen-sm-max) { + .sidebar h4 { + text-align: center; + } +} //// pull content to right border for sidebar right .container .sidebar { &.right { @@ -1874,7 +1962,7 @@ footer { } .nav .btn-bookbag-toggle a { - padding-left: 2px; + padding-left: 8px; } //// Toolbar in Detailview - END diff --git a/themes/finc/templates/Auth/AbstractBase/resetpassword.phtml b/themes/finc/templates/Auth/AbstractBase/resetpassword.phtml index 064e2e0e1a6f771fc961997f680e184f03e180cb..184e6745915cf88cb2a9eae328ec5838607aa931 100644 --- a/themes/finc/templates/Auth/AbstractBase/resetpassword.phtml +++ b/themes/finc/templates/Auth/AbstractBase/resetpassword.phtml @@ -1,10 +1,10 @@ -<!-- finc: auth - abstractbase - resetpassword (custom finc template)--> -<? /* compare with BS login templates in Auth during updates */ ?> -<? +<!-- finc: auth - abstractbase - resetpassword (custom finc template) --> +<?php /* compare with BS login templates in Auth during updates */ ?> +<?php // Set page title. $this->headTitle($this->translate('Reset Password')); ?> -<h2><?=$this->transEsc('Reset Password') ?></h2> +<h2><?=$this->transEsc('Reset Password')?></h2> <form method="post" name="resetPasswordForm" action="<?=$this->url('myresearch-resetpassword')?>"> <?=$this->flashmessages()?> <p> @@ -13,23 +13,23 @@ $this->headTitle($this->translate('Reset Password')); <div class="form-group"> <label class="control-label"><?=$this->transEsc('First Name')?>:</label> - <input type="text" class="form-control" name="firstname" <?=isset($firstname) ? 'value="'.$firstname.'" ' : ''?>required /> - </div> + <input type="text" class="form-control" name="firstname" <?=isset($firstname) ? 'value="' . $firstname . '" ' : ''?>required/> + </div> <div class="form-group"> <label class="control-label"><?=$this->transEsc('Last Name')?>:</label> - <input type="text" class="form-control" name="lastname" <?=isset($lastname) ? 'value="'.$lastname.'" ' : ''?>required/> - </div> + <input type="text" class="form-control" name="lastname" <?=isset($lastname) ? 'value="' . $lastname . '" ' : ''?>required/> + </div> <div class="form-group"> <label class="control-label"><?=$this->transEsc('Username')?>:</label> - <input type="text" class="form-control" name="username" <?=isset($username) ? 'value="'.$username.'" ' : ''?>required/> - </div> + <input type="text" class="form-control" name="username" <?=isset($username) ? 'value="' . $username . '" ' : ''?>required/> + </div> <div class="form-group"> <label class="control-label"><?=$this->transEsc('Email')?>:</label> - <input type="email" class="form-control" name="email" <?=isset($email) ? 'value="'.$email.'" ' : ''?>required/> - </div> - <?=$this->recaptcha()->html($this->useRecaptcha) ?> + <input type="email" class="form-control" name="email" <?=isset($email) ? 'value="' . $email . '" ' : ''?>required/> + </div> + <?=$this->recaptcha()->html($this->useRecaptcha)?> <div class="form-group"> - <input class="btn btn-transparent" name="submit" type="submit" aria-label="submit form" value="<?=$this->transEsc('recovery_title') ?>"/> - </div> + <input class="btn btn-transparent" name="submit" type="submit" aria-label="submit form" value="<?=$this->transEsc('recovery_title')?>"/> + </div> </form> <!-- finc: auth - abstractbase - resetpassword - END --> diff --git a/themes/finc/templates/Citation/apa.phtml b/themes/finc/templates/Citation/apa.phtml index 6597ea147cd1ad37e0c5ef6915ced934d0da8b3f..1b40871412d5660f64424006e504abf2eee26a38 100644 --- a/themes/finc/templates/Citation/apa.phtml +++ b/themes/finc/templates/Citation/apa.phtml @@ -1,9 +1,9 @@ -<? if (!empty($this->authors)): ?><?=$this->escapeHtml($this->authors)?> -<? if (!empty($this->year)): ?><? if (!empty($this->authors)): ?> <? endif; ?>(<?=$this->escapeHtml($this->year)?>). <? endif; ?> -<? endif; ?> -<i><?=$this->escapeHtml($this->title)?></i><? if ($this->periodAfterTitle): ?>. <? endif ?> -<? if (empty($this->authors)): ?> -<? if (!empty($this->year)): ?> (<?=$this->escapeHtml($this->year)?>). <? endif; ?> -<? endif; ?> -<? if (!empty($this->edition)): ?>(<?=$this->escapeHtml($this->edition)?>). <? endif; ?> -<? if (!empty($this->publisher)): ?><?=$this->escapeHtml($this->publisher)?>.<? endif; ?> +<?php if (!empty($this->authors)): ?><?=$this->escapeHtml($this->authors)?> + <?php if (!empty($this->year)): ?><?php if (!empty($this->authors)): ?><?php endif; ?>(<?=$this->escapeHtml($this->year)?>). <?php endif; ?> +<?php endif; ?> +<i><?=$this->escapeHtml($this->title)?></i><?php if ($this->periodAfterTitle): ?>. <?php endif ?> +<?php if (empty($this->authors)): ?> + <?php if (!empty($this->year)): ?> (<?=$this->escapeHtml($this->year)?>). <?php endif; ?> +<?php endif; ?> +<?php if (!empty($this->edition)): ?>(<?=$this->escapeHtml($this->edition)?>). <?php endif; ?> +<?php if (!empty($this->publisher)): ?><?=$this->escapeHtml($this->publisher)?>.<?php endif; ?> diff --git a/themes/finc/templates/Citation/apaai-article.phtml b/themes/finc/templates/Citation/apaai-article.phtml index f97da1bee41b95c06a0c5f2fb70ffbe4eb3728d3..cd69639c7db79bdfedd39f817f280b8f610a277b 100644 --- a/themes/finc/templates/Citation/apaai-article.phtml +++ b/themes/finc/templates/Citation/apaai-article.phtml @@ -1,7 +1,7 @@ -<? if (!empty($this->authors)): ?><?=$this->escapeHtml($this->authors)?> <? endif; ?> -<? if (!empty($this->year)): ?>(<?=$this->escapeHtml($this->year)?>). <? endif; ?> -<?=$this->escapeHtml($this->title)?><? if ($this->periodAfterTitle): ?>. <? endif ?> -<i><?=$this->escapeHtml($this->journal)?><? if (!empty($this->volume) || !empty($this->issue) || !empty($this->pageRange)): ?>, <? endif; ?> -<? if (!empty($this->volume)): ?><?=$this->escapeHtml($this->volume)?><? endif; ?></i><? if (!empty($this->issue)): ?>(<?=$this->escapeHtml($this->issue)?>)<? endif; ?> -<? if (!empty($this->volume) || !empty($this->issue)): ?>, <? endif; ?> -<? if (!empty($this->pageRange)): ?><?=$this->escapeHtml($this->pageRange)?>. <? if (isset($this->doi)): ?>doi:<?=$this->escapeHtml($this->doi)?><? endif; ?><? endif; ?> +<?php if (!empty($this->authors)): ?><?=$this->escapeHtml($this->authors)?><?php endif; ?> +<?php if (!empty($this->year)): ?>(<?=$this->escapeHtml($this->year)?>). <?php endif; ?> +<?=$this->escapeHtml($this->title)?><?php if ($this->periodAfterTitle): ?>. <?php endif ?> +<i><?=$this->escapeHtml($this->journal)?><?php if (!empty($this->volume) || !empty($this->issue) || !empty($this->pageRange)): ?>, <?php endif; ?> + <?php if (!empty($this->volume)): ?><?=$this->escapeHtml($this->volume)?><?php endif; ?></i><?php if (!empty($this->issue)): ?>(<?=$this->escapeHtml($this->issue)?>)<?php endif; ?> +<?php if (!empty($this->volume) || !empty($this->issue)): ?>, <?php endif; ?> +<?php if (!empty($this->pageRange)): ?><?=$this->escapeHtml($this->pageRange)?>. <?php if (isset($this->doi)): ?>doi:<?=$this->escapeHtml($this->doi)?><?php endif; ?><?php endif; ?> diff --git a/themes/finc/templates/Citation/apaai.phtml b/themes/finc/templates/Citation/apaai.phtml index 9d5af544c6aa5b5e31d102e52655fbc3b46a2fee..376c740b2725448c6631cabfb6650dd547f7182e 100644 --- a/themes/finc/templates/Citation/apaai.phtml +++ b/themes/finc/templates/Citation/apaai.phtml @@ -1,9 +1,9 @@ -<? if (!empty($this->authors)): ?><?=$this->escapeHtml($this->authors)?> -<? if (!empty($this->year)): ?>(<?=$this->escapeHtml($this->year)?>). <? endif; ?> -<? endif; ?> -<i><?=$this->escapeHtml($this->title)?></i><? if ($this->periodAfterTitle): ?>. <? endif ?> -<? if (empty($this->authors)): ?> -<? if (!empty($this->year)): ?>(<?=$this->escapeHtml($this->year)?>). <? endif; ?> -<? endif; ?> -<? if (!empty($this->edition)): ?>(<?=$this->escapeHtml($this->edition)?>). <? endif; ?> -<? if (!empty($this->publisher)): ?><?=$this->escapeHtml($this->publisher)?>.<? endif; ?> +<?php if (!empty($this->authors)): ?><?=$this->escapeHtml($this->authors)?> + <?php if (!empty($this->year)): ?>(<?=$this->escapeHtml($this->year)?>). <?php endif; ?> +<?php endif; ?> +<i><?=$this->escapeHtml($this->title)?></i><?php if ($this->periodAfterTitle): ?>. <?php endif ?> +<?php if (empty($this->authors)): ?> + <?php if (!empty($this->year)): ?>(<?=$this->escapeHtml($this->year)?>). <?php endif; ?> +<?php endif; ?> +<?php if (!empty($this->edition)): ?>(<?=$this->escapeHtml($this->edition)?>). <?php endif; ?> +<?php if (!empty($this->publisher)): ?><?=$this->escapeHtml($this->publisher)?>.<?php endif; ?> diff --git a/themes/finc/templates/Citation/isbd-article.phtml b/themes/finc/templates/Citation/isbd-article.phtml index d48629a9faa5705ad90000670fd8e159822ed5a7..a82ff2fc4eb88ab0622f86892cdce5ae24b884fa 100644 --- a/themes/finc/templates/Citation/isbd-article.phtml +++ b/themes/finc/templates/Citation/isbd-article.phtml @@ -1,5 +1,5 @@ -<? if (!empty($this->authors)): ?><?=$this->escapeHtml($this->authors)?>. <? endif; ?> -"<?=$this->title?><? if ($this->periodAfterTitle): ?>.<? endif ?>" +<?php if (!empty($this->authors)): ?><?=$this->escapeHtml($this->authors)?>. <?php endif; ?> +"<?=$this->title?><?php if ($this->periodAfterTitle): ?>.<?php endif ?>" <i><?=$this->escapeHtml($this->journal)?></i> -<? if (!empty($this->numberAndDate)): ?><?=$this->escapeHtml($this->numberAndDate)?><? if (!empty($this->pageRange)): ?>: <? endif; ?><? endif; ?> -<? if (!empty($this->pageRange)): ?><?=$this->escapeHtml($this->pageRange)?><? endif; ?>. +<?php if (!empty($this->numberAndDate)): ?><?=$this->escapeHtml($this->numberAndDate)?><?php if (!empty($this->pageRange)): ?>: <?php endif; ?><?php endif; ?> +<?php if (!empty($this->pageRange)): ?><?=$this->escapeHtml($this->pageRange)?><?php endif; ?>. diff --git a/themes/finc/templates/Citation/isbd.phtml b/themes/finc/templates/Citation/isbd.phtml index ac0c8e5954542c56631b9109b99ef6cb0e913f63..650a8ba6b82066d4193a46f023817dd6a888e8e4 100644 --- a/themes/finc/templates/Citation/isbd.phtml +++ b/themes/finc/templates/Citation/isbd.phtml @@ -1,7 +1,7 @@ -<? if (!empty($this->authors)): ?><?=$this->escapeHtml($this->authors)?>:<br /><? endif; ?> +<?php if (!empty($this->authors)): ?><?=$this->escapeHtml($this->authors)?>:<br/><?php endif; ?> <span><i><?=$this->escapeHtml($this->title)?></i></span> -<? if (!empty($this->edition)): ?>. — <?=$this->escapeHtml($this->edition)?> <? endif; ?> -<? if (!empty($this->publisher)): ?>. — <?=$this->escapeHtml($this->publisher)?><? endif; ?> -<? if (!empty($this->physical)): ?>. — <?=$this->escapeHtml($this->physical)?><? endif; ?> -<? if (!empty($this->series)): ?>. — <?=$this->escapeHtml($this->series)?><? endif; ?> -<? if (!empty($this->isbn)): ?>. — ISBN <?=$this->escapeHtml($this->isbn)?><? endif; ?> +<?php if (!empty($this->edition)): ?>. — <?=$this->escapeHtml($this->edition)?><?php endif; ?> +<?php if (!empty($this->publisher)): ?>. — <?=$this->escapeHtml($this->publisher)?><?php endif; ?> +<?php if (!empty($this->physical)): ?>. — <?=$this->escapeHtml($this->physical)?><?php endif; ?> +<?php if (!empty($this->series)): ?>. — <?=$this->escapeHtml($this->series)?><?php endif; ?> +<?php if (!empty($this->isbn)): ?>. — ISBN <?=$this->escapeHtml($this->isbn)?><?php endif; ?> diff --git a/themes/finc/templates/Citation/mla-article.phtml b/themes/finc/templates/Citation/mla-article.phtml index 9d61df1bc537ae42d4f0425f4e704ca74d3d4192..c82aee5546ebd58de4321860de0c003cd31a83e1 100644 --- a/themes/finc/templates/Citation/mla-article.phtml +++ b/themes/finc/templates/Citation/mla-article.phtml @@ -1,6 +1,6 @@ -<? if (!empty($this->authors)): ?><?=$this->escapeHtml($this->authors)?>. <? endif; ?> -"<?=$this->title?><? if ($this->periodAfterTitle): ?>.<? endif ?>" +<?php if (!empty($this->authors)): ?><?=$this->escapeHtml($this->authors)?>. <?php endif; ?> +"<?=$this->title?><?php if ($this->periodAfterTitle): ?>.<?php endif ?>" <i><?=$this->escapeHtml($this->journal)?></i> -<? if (!empty($this->numberAndDate)): ?><?=$this->escapeHtml($this->numberAndDate)?><? if (!empty($this->pageRange)): ?>: <? endif; ?><? endif; ?> -<? if (!empty($this->pageRange)): ?><?=$this->escapeHtml($this->pageRange)?><? endif; ?>. -<? if (!empty($this->year)): ?><? if (!empty($this->publisher)): ?>, <? endif; ?>(<?=$this->escapeHtml($this->year)?>)<? endif; ?><? if (!empty($this->year) || !empty($this->publisher)): ?>.<? endif; ?> +<?php if (!empty($this->numberAndDate)): ?><?=$this->escapeHtml($this->numberAndDate)?><?php if (!empty($this->pageRange)): ?>: <?php endif; ?><?php endif; ?> +<?php if (!empty($this->pageRange)): ?><?=$this->escapeHtml($this->pageRange)?><?php endif; ?>. +<?php if (!empty($this->year)): ?><?php if (!empty($this->publisher)): ?>, <?php endif; ?>(<?=$this->escapeHtml($this->year)?>)<?php endif; ?><?php if (!empty($this->year) || !empty($this->publisher)): ?>.<?php endif; ?> diff --git a/themes/finc/templates/Citation/mla.phtml b/themes/finc/templates/Citation/mla.phtml index e748d275c6d225e27d7dcc08d4d4388b204b5995..8d991e6dd6e49903301fefa6a7efe5fb7291b218 100644 --- a/themes/finc/templates/Citation/mla.phtml +++ b/themes/finc/templates/Citation/mla.phtml @@ -1,5 +1,5 @@ -<? if (!empty($this->authors)): ?><?=$this->escapeHtml($this->authors)?>. <? endif; ?> -<i><?=$this->escapeHtml($this->title)?></i><? if ($this->periodAfterTitle): ?>.<? endif ?> -<? if (!empty($this->edition)): ?><?=$this->escapeHtml($this->edition)?> <? endif; ?> -<? if (!empty($this->publisher)): ?><?=$this->escapeHtml($this->publisher)?><? endif; ?> -<? if (!empty($this->year)): ?><? if (!empty($this->publisher)): ?>, <? endif; ?><?=$this->escapeHtml($this->year)?><? endif; ?><? if (!empty($this->year) || !empty($this->publisher)): ?>.<? endif; ?> +<?php if (!empty($this->authors)): ?><?=$this->escapeHtml($this->authors)?>. <?php endif; ?> +<i><?=$this->escapeHtml($this->title)?></i><?php if ($this->periodAfterTitle): ?>.<?php endif ?> +<?php if (!empty($this->edition)): ?><?=$this->escapeHtml($this->edition)?><?php endif; ?> +<?php if (!empty($this->publisher)): ?><?=$this->escapeHtml($this->publisher)?><?php endif; ?> +<?php if (!empty($this->year)): ?><?php if (!empty($this->publisher)): ?>, <?php endif; ?><?=$this->escapeHtml($this->year)?><?php endif; ?><?php if (!empty($this->year) || !empty($this->publisher)): ?>.<?php endif; ?> diff --git a/themes/finc/templates/Citation/mlaai-article.phtml b/themes/finc/templates/Citation/mlaai-article.phtml index 14955a3ff92e985f53f6fdb0a858bf8421c3ce84..161343cb748b16b3715c9ab35ca0f7ae5f0df05c 100644 --- a/themes/finc/templates/Citation/mlaai-article.phtml +++ b/themes/finc/templates/Citation/mlaai-article.phtml @@ -1,10 +1,10 @@ -<? if (!empty($this->authors)): ?><?=$this->escapeHtml($this->authors)?>. <? endif; ?> -"<?=$this->escapeHtml($this->title)?>"<? if ($this->periodAfterTitle): ?>.<? endif ?> <i><?=$this->escapeHtml($this->journal)?>, -<? if (!empty($this->volume)): ?> <?=$this->escapeHtml($this->volume)?><? endif; ?></i><? if (!empty($this->issue)): ?>.<?=$this->escapeHtml($this->issue)?><? endif; ?> -<? if (!empty($this->year)): ?> -<? if (!empty($this->volume) || !empty($this->issue)): ?> (<? endif; ?> -<?=$this->escapeHtml($this->year)?> -<? if (!empty($this->volume) || !empty($this->issue)): ?>)<? endif; ?> -<? endif; ?> -<? if (!empty($this->pageRange)): ?>: <?=$this->escapeHtml($this->pageRange)?>. <? endif; ?> -<? /*if (!empty($this->year)): ?><? if (!empty($this->publisher)): ?>, <? endif; ?>(<?=$this->escapeHtml($this->year)?>)<? endif;*/ ?><? if (!empty($this->year) && !empty($this->publisher)): ?>.<? endif; ?> +<?php if (!empty($this->authors)): ?><?=$this->escapeHtml($this->authors)?>. <?php endif; ?> +"<?=$this->escapeHtml($this->title)?>"<?php if ($this->periodAfterTitle): ?>.<?php endif ?> <i><?=$this->escapeHtml($this->journal)?>, + <?php if (!empty($this->volume)): ?> <?=$this->escapeHtml($this->volume)?><?php endif; ?></i><?php if (!empty($this->issue)): ?>.<?=$this->escapeHtml($this->issue)?><?php endif; ?> +<?php if (!empty($this->year)): ?> + <?php if (!empty($this->volume) || !empty($this->issue)): ?> (<?php endif; ?> + <?=$this->escapeHtml($this->year)?> + <?php if (!empty($this->volume) || !empty($this->issue)): ?>)<?php endif; ?> +<?php endif; ?> +<?php if (!empty($this->pageRange)): ?>: <?=$this->escapeHtml($this->pageRange)?>. <?php endif; ?> +<?php /*if (!empty($this->year)): ?><?php if (!empty($this->publisher)): ?>, <?php endif; ?>(<?=$this->escapeHtml($this->year)?>)<?php endif;*/ ?><?php if (!empty($this->year) && !empty($this->publisher)): ?>.<?php endif; ?> diff --git a/themes/finc/templates/Citation/mlaai.phtml b/themes/finc/templates/Citation/mlaai.phtml index 5828d63bc41f8a4866b2248662201b8578123ba8..397d6a1b900bc15a8c43a4a4f982adb666a248bd 100644 --- a/themes/finc/templates/Citation/mlaai.phtml +++ b/themes/finc/templates/Citation/mlaai.phtml @@ -1,5 +1,5 @@ -<? if (!empty($this->authors)): ?><?=$this->escapeHtml($this->authors)?>. <? endif; ?> -<i><?=$this->escapeHtml($this->title)?></i><? if ($this->periodAfterTitle): ?>.<? endif ?> -<? if (!empty($this->edition)): ?><?=$this->escapeHtml($this->edition)?> <? endif; ?> -<? if (!empty($this->publisher)): ?><?=$this->escapeHtml($this->publisher)?><? endif; ?> -<? if (!empty($this->year)): ?><? if (!empty($this->publisher)): ?>, <? endif; ?>(<?=$this->escapeHtml($this->year)?>)<? endif; ?><? if (!empty($this->year) || !empty($this->publisher)): ?>.<? endif; ?> +<?php if (!empty($this->authors)): ?><?=$this->escapeHtml($this->authors)?>. <?php endif; ?> +<i><?=$this->escapeHtml($this->title)?></i><?php if ($this->periodAfterTitle): ?>.<?php endif ?> +<?php if (!empty($this->edition)): ?><?=$this->escapeHtml($this->edition)?><?php endif; ?> +<?php if (!empty($this->publisher)): ?><?=$this->escapeHtml($this->publisher)?><?php endif; ?> +<?php if (!empty($this->year)): ?><?php if (!empty($this->publisher)): ?>, <?php endif; ?>(<?=$this->escapeHtml($this->year)?>)<?php endif; ?><?php if (!empty($this->year) || !empty($this->publisher)): ?>.<?php endif; ?> diff --git a/themes/finc/templates/Email/acquisition-html.phtml b/themes/finc/templates/Email/acquisition-html.phtml index 0aaf25f1133166c5ff164fa4d8ba5e447dc78580..894eea1e581654b9853e9aeabc4eec822a1c5480 100644 --- a/themes/finc/templates/Email/acquisition-html.phtml +++ b/themes/finc/templates/Email/acquisition-html.phtml @@ -1,38 +1,38 @@ <?=$this->doctype('HTML5')?> <html> <head> - <? /* <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> TEST IF THIS WORKS, fixme CK */ ?> - <title>Erwerbungsvorschlag</title> + <?php /* <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> TEST IF THIS WORKS, fixme CK */ ?> + <title>Erwerbungsvorschlag</title> </head> <body style="font-family: Arial, Verdana, sans-serif;"> <h2>Erwerbungsvorschlag</h2> <table> - <tr valign="top"> - <td> - Name: <strong><?=$lastname ?>, <?=$firstname ?></strong><br /> - Lesekarte-Nr.: <strong><?=$username ?></strong><br /> - E-mail: <a href="mailto:<?=$email ?>"><?=$email ?></a><br /> - <?=(isset($group) && !empty($group)) ? "Benutzergruppe: ". $group . "<br />" : ""?> - </td> - <td> </td> - <td> - hat folgenden Titel zur Erwerbung empfohlen:<br /> - <br /> - <strong><?=$proposal?></strong><br /> - <br /> - Begründung für Empfehlung: - <br /><br /> - <strong><?=$statement?></strong> - <br /><br /><br /> - für das Fachgebiet: <strong><?=$this->transEsc("PDA::fos_" . $field_of_study)?></strong><br /> - <br /> - </td> - </tr> - <tr valign="top"> - <td colspan="3"> - Zeitpunkt der Bestellung: <?=$timestamp ?> - </td> - </tr> + <tr valign="top"> + <td> + Name: <strong><?=$lastname?>, <?=$firstname?></strong><br/> + Lesekarte-Nr.: <strong><?=$username?></strong><br/> + E-mail: <a href="mailto:<?=$email?>"><?=$email?></a><br/> + <?=(isset($group) && !empty($group)) ? "Benutzergruppe: " . $group . "<br />" : ""?> + </td> + <td> </td> + <td> + hat folgenden Titel zur Erwerbung empfohlen:<br/> + <br/> + <strong><?=$proposal?></strong><br/> + <br/> + Begründung für Empfehlung: + <br/><br/> + <strong><?=$statement?></strong> + <br/><br/><br/> + für das Fachgebiet: <strong><?=$this->transEsc("PDA::fos_" . $field_of_study)?></strong><br/> + <br/> + </td> + </tr> + <tr valign="top"> + <td colspan="3"> + Zeitpunkt der Bestellung: <?=$timestamp?> + </td> + </tr> </table> </body> </html> diff --git a/themes/finc/templates/Email/acquisitionpda-html.phtml b/themes/finc/templates/Email/acquisitionpda-html.phtml index 7be6f2b1e4bac8c5c77bed7634948d4af0029b6d..1042882d2133e6030fc981baa01ddc50db554f48 100644 --- a/themes/finc/templates/Email/acquisitionpda-html.phtml +++ b/themes/finc/templates/Email/acquisitionpda-html.phtml @@ -1,147 +1,147 @@ <?=$this->doctype('HTML5')?> <html> <head> - <? /* <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> TEST IF THIS WORKS, fixme CK */ ?> - <title>Benutzergesteuerte Erwerbung</title> + <?php /* <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> TEST IF THIS WORKS, fixme CK */ ?> + <title>Benutzergesteuerte Erwerbung</title> </head> <body style="font-family: Arial, Verdana, sans-serif;"> <h2 style="padding:10px 0;">Benutzergesteuerte Erwerbung</h2> <table width="800" border="0"> - <tr valign="top"> - <td width="390"> - Name: <strong><?= $lastname ?>, <?= $firstname ?></strong><br/> - Lesekarte-Nr.: <strong><?= $username ?></strong><br/> - Email: <a href="mailto:<?= $email ?>"><?= $email ?></a><br/> - <?=(isset($group) && !empty($group)) ? "Benutzergruppe: ". $group . "<br/>" : ""?> - <br/> - <? if ($statement): ?> - Begründung des Benutzers: - <br/><br/> - <span style="font-size: 12px"><?= $statement ?></span> - <br/><br/> - <? endif; ?> - </td> - <td width="20"> </td> - <td width="390"> - hat folgenden Titel bestellt:<br/> - <br/> - <strong><?= $title ?></strong><br/> - <? if ($author): ?>von - <? foreach ($author as $auth): ?> - <?= $auth ?> - <? endforeach; ?> - <? endif; ?><br/> - <br/> - Link: <a href="<?=$this->serverUrl($this->recordLink()->getUrl($driver))?>" title="<?= $title ?>"><?=$this->serverUrl($this->recordLink()->getUrl($driver))?></a><br/> - Katalog-ID: <a href="<?= $this->serverUrl($this->recordLink()->getUrl($driver)) ?>" - title="<?= $title ?>"><?= $id ?></a><br/> - <br/> - für das Fachgebiet: <?= $this->transEsc('PDA::fos_' . $field_of_study) ?><br/> - <br/> - <table> - <? if ($price): ?> - <tr> - <td width="100" style="font-size: 11px">Preis:</td> - <td width="5"> </td> - <td style="font-size: 11px"> - <?= $this->safeMoneyFormat($price) ?> - </td> - </tr> - <? endif; ?> - <? if ($publisher): ?> - <tr> - <td style="font-size: 11px">Verlag:</td> - <td width="5"> </td> - <td style="font-size: 11px"> - <? foreach ($publisher as $pub): ?> - <?= $pub ?> - <? endforeach; ?> - </td> - </tr> - <? endif; ?> - <? if ($format): ?> - <tr> - <td style="font-size: 11px">Format:</td> - <td width="5"> </td> - <td style="font-size: 11px"> - <? foreach ($format as $for): ?> - <?= $this->transEsc($for) ?> - <? endforeach; ?> - </td> - </tr> - <? endif; ?> - <? if ($language): ?> - <tr> - <td style="font-size: 11px">Sprache:</td> - <td width="5"> </td> - <td style="font-size: 11px"> - <? foreach ($language as $lang): ?> - <?= $this->transEsc($lang) ?> - <? endforeach; ?> - </td> - </tr> - <? endif; ?> - <? if ($publishDate): ?> - <tr> - <td style="font-size: 11px">veröffentlicht:</td> - <td width="5"> </td> - <td style="font-size: 11px"> - <? foreach ($publishDate as $date): ?> - <?= $date ?> - <? endforeach; ?> - </td> - </tr> - <? endif; ?> - <? if ($isbn): ?> - <tr> - <td style="font-size: 11px">ISBN/ISN:</td> - <td width="5"> </td> - <td style="font-size: 11px"> - <? foreach ($isbn as $isn): ?> - <?= $isn ?> - <? endforeach; ?> - </td> - </tr> - <? endif; ?> - <? if ($physical): ?> - <tr> - <td style="font-size: 11px">Beschreibung:</td> - <td width="5"> </td> - <td style="font-size: 11px"> - <? foreach ($physical as $phys): ?> - <?= $phys ?> - <? endforeach; ?> - </td> - </tr> - <? endif; ?> - <? if ($footnote): ?> - <tr> - <td style="font-size: 11px">Fussnote:</td> - <td width="5"> </td> - <td style="font-size: 11px"> - <? foreach ($footnote as $foot): ?> - <?= $foot ?> - <? endforeach; ?> - </td> - </tr> - <? endif; ?> - <? if ($source_id): ?> - <tr> - <td style="font-size: 11px">Quelle:</td> - <td width="5"> </td> - <td style="font-size: 11px"> - <?= $this->transEsc('sid_' . $source_id) ?> - </td> - </tr> - <? endif; ?> - </table> - </td> - </tr> - <tr valign="top"> - <td width="800" colspan="3"> - Zeitpunkt der Bestellung: <?= $timestamp ?> - </td> - </tr> + <tr valign="top"> + <td width="390"> + Name: <strong><?=$lastname?>, <?=$firstname?></strong><br/> + Lesekarte-Nr.: <strong><?=$username?></strong><br/> + Email: <a href="mailto:<?=$email?>"><?=$email?></a><br/> + <?=(isset($group) && !empty($group)) ? "Benutzergruppe: " . $group . "<br/>" : ""?> + <br/> + <?php if ($statement): ?> + Begründung des Benutzers: + <br/><br/> + <span style="font-size: 12px"><?=$statement?></span> + <br/><br/> + <?php endif; ?> + </td> + <td width="20"> </td> + <td width="390"> + hat folgenden Titel bestellt:<br/> + <br/> + <strong><?=$title?></strong><br/> + <?php if ($author): ?>von + <?php foreach ($author as $auth): ?> + <?=$auth?> + <?php endforeach; ?> + <?php endif; ?><br/> + <br/> + Link: <a href="<?=$this->serverUrl($this->recordLink()->getUrl($driver))?>" title="<?=$title?>"><?=$this->serverUrl($this->recordLink()->getUrl($driver))?></a><br/> + Katalog-ID: <a href="<?=$this->serverUrl($this->recordLink()->getUrl($driver))?>" + title="<?=$title?>"><?=$id?></a><br/> + <br/> + für das Fachgebiet: <?=$this->transEsc('PDA::fos_' . $field_of_study)?><br/> + <br/> + <table> + <?php if ($price): ?> + <tr> + <td width="100" style="font-size: 11px">Preis:</td> + <td width="5"> </td> + <td style="font-size: 11px"> + <?=$this->safeMoneyFormat($price)?> + </td> + </tr> + <?php endif; ?> + <?php if ($publisher): ?> + <tr> + <td style="font-size: 11px">Verlag:</td> + <td width="5"> </td> + <td style="font-size: 11px"> + <?php foreach ($publisher as $pub): ?> + <?=$pub?> + <?php endforeach; ?> + </td> + </tr> + <?php endif; ?> + <?php if ($format): ?> + <tr> + <td style="font-size: 11px">Format:</td> + <td width="5"> </td> + <td style="font-size: 11px"> + <?php foreach ($format as $for): ?> + <?=$this->transEsc($for)?> + <?php endforeach; ?> + </td> + </tr> + <?php endif; ?> + <?php if ($language): ?> + <tr> + <td style="font-size: 11px">Sprache:</td> + <td width="5"> </td> + <td style="font-size: 11px"> + <?php foreach ($language as $lang): ?> + <?=$this->transEsc($lang)?> + <?php endforeach; ?> + </td> + </tr> + <?php endif; ?> + <?php if ($publishDate): ?> + <tr> + <td style="font-size: 11px">veröffentlicht:</td> + <td width="5"> </td> + <td style="font-size: 11px"> + <?php foreach ($publishDate as $date): ?> + <?=$date?> + <?php endforeach; ?> + </td> + </tr> + <?php endif; ?> + <?php if ($isbn): ?> + <tr> + <td style="font-size: 11px">ISBN/ISN:</td> + <td width="5"> </td> + <td style="font-size: 11px"> + <?php foreach ($isbn as $isn): ?> + <?=$isn?> + <?php endforeach; ?> + </td> + </tr> + <?php endif; ?> + <?php if ($physical): ?> + <tr> + <td style="font-size: 11px">Beschreibung:</td> + <td width="5"> </td> + <td style="font-size: 11px"> + <?php foreach ($physical as $phys): ?> + <?=$phys?> + <?php endforeach; ?> + </td> + </tr> + <?php endif; ?> + <?php if ($footnote): ?> + <tr> + <td style="font-size: 11px">Fussnote:</td> + <td width="5"> </td> + <td style="font-size: 11px"> + <?php foreach ($footnote as $foot): ?> + <?=$foot?> + <?php endforeach; ?> + </td> + </tr> + <?php endif; ?> + <?php if ($source_id): ?> + <tr> + <td style="font-size: 11px">Quelle:</td> + <td width="5"> </td> + <td style="font-size: 11px"> + <?=$this->transEsc('sid_' . $source_id)?> + </td> + </tr> + <?php endif; ?> + </table> + </td> + </tr> + <tr valign="top"> + <td width="800" colspan="3"> + Zeitpunkt der Bestellung: <?=$timestamp?> + </td> + </tr> </table> </body> </html> diff --git a/themes/finc/templates/Email/acquisitionpda-plain.phtml b/themes/finc/templates/Email/acquisitionpda-plain.phtml index 0fc6999aabcb14e807a3e4fc8e8f6e0a14523752..17c42d516f68a73ff866a3188921026ceb05cc66 100644 --- a/themes/finc/templates/Email/acquisitionpda-plain.phtml +++ b/themes/finc/templates/Email/acquisitionpda-plain.phtml @@ -12,9 +12,9 @@ hat folgenden Titel bestellt: <?= $title ?> -<? if ($author): ?> - von <? foreach ($author as $au): ?><?= $au ?> <? endforeach; ?> -<? endif; ?> +<?php if ($author): ?> + von <?php foreach ($author as $au): ?><?= $au ?> <?php endforeach; ?> +<?php endif; ?> Link: <?= $this->serverUrl($this->recordLink()->getUrl($driver)) ?> @@ -22,49 +22,49 @@ für das Fachgebiet: <?= $this->transEsc('PDA::fos_' . $field_of_study) ?> ------------------------------------------ -<? if ($statement): ?>Begründung des Benutzers: +<?php if ($statement): ?>Begründung des Benutzers: <?= $statement ?> -<? endif; ?> +<?php endif; ?> ------------------------------------------ -<? if ($price): ?> +<?php if ($price): ?> Preis: <?= $this->safeMoneyFormat($price) ?> -<? endif; ?> -<? if ($publisher): ?> - Verlag: <? foreach ($publisher as $pub): ?><?= $pub ?> <? endforeach; ?> +<?php endif; ?> +<?php if ($publisher): ?> + Verlag: <?php foreach ($publisher as $pub): ?><?= $pub ?> <?php endforeach; ?> -<? endif; ?> -<? if ($format): ?> - Format: <? foreach ($format as $form): ?><?= $this->transEsc($form) ?> <? endforeach; ?> +<?php endif; ?> +<?php if ($format): ?> + Format: <?php foreach ($format as $form): ?><?= $this->transEsc($form) ?> <?php endforeach; ?> -<? endif; ?> -<? if ($language): ?> - Sprache: <? foreach ($language as $lang): ?><?= $this->transEsc($lang) ?> <? endforeach; ?> +<?php endif; ?> +<?php if ($language): ?> + Sprache: <?php foreach ($language as $lang): ?><?= $this->transEsc($lang) ?> <?php endforeach; ?> -<? endif; ?> -<? if ($publishDate): ?> - veröffentlicht: <? foreach ($publishDate as $date): ?><?= $date ?> <? endforeach; ?> +<?php endif; ?> +<?php if ($publishDate): ?> + veröffentlicht: <?php foreach ($publishDate as $date): ?><?= $date ?> <?php endforeach; ?> -<? endif; ?> -<? if ($isbn): ?> - ISBN/ISN: <? foreach ($isbn as $isn): ?><?= $isn ?> <? endforeach; ?> +<?php endif; ?> +<?php if ($isbn): ?> + ISBN/ISN: <?php foreach ($isbn as $isn): ?><?= $isn ?> <?php endforeach; ?> -<? endif; ?> -<? if ($physical): ?> - Beschreibung: <? foreach ($physical as $desc): ?><?= $desc ?> <? endforeach; ?> +<?php endif; ?> +<?php if ($physical): ?> + Beschreibung: <?php foreach ($physical as $desc): ?><?= $desc ?> <?php endforeach; ?> -<? endif; ?> -<? if ($footnote): ?> - Fussnote: <? foreach ($footnote as $ftn): ?><?= $ftn ?> <? endforeach; ?> +<?php endif; ?> +<?php if ($footnote): ?> + Fussnote: <?php foreach ($footnote as $ftn): ?><?= $ftn ?> <?php endforeach; ?> -<? endif; ?> -<? if ($source_id): ?> +<?php endif; ?> +<?php if ($source_id): ?> Quelle: <?= $this->transEsc('sid_' . $source_id) ?> -<? endif; ?> +<?php endif; ?> ------------------------------------------ diff --git a/themes/finc/templates/Email/dds-html.phtml b/themes/finc/templates/Email/dds-html.phtml index 17126d8119cf4d256802a8f19cee35e82bb55368..5c6309ff470964a23af34c3cd16f15e8a1ae8f71 100644 --- a/themes/finc/templates/Email/dds-html.phtml +++ b/themes/finc/templates/Email/dds-html.phtml @@ -1,146 +1,146 @@ <?=$this->doctype('HTML5')?> <html> <head> - <? /* <meta http-equiv="content-type" content="text/html; charset=utf-8"> TEST IF THIS WORKS, fixme CK */ ?> - <title><?=$this->translate("Dokumentenlieferdienst")?></title> + <?php /* <meta http-equiv="content-type" content="text/html; charset=utf-8"> TEST IF THIS WORKS, fixme CK */ ?> + <title><?=$this->translate("Dokumentenlieferdienst")?></title> </head> <body style="font-family: Arial, Verdana, sans-serif;"> <p><strong>AUFTRAGGEBER:</strong></p> <table width="820" border="0"> - <tr valign="top"> - <td width="25%"><strong>Name:</strong></td> - <td width="75%"><?=$this->username?></td> - </tr> - <tr valign="top"> - <td width="25%"><strong>Telefon:</strong></td> - <td width="75%"><?=$this->phone?></td> - </tr> - <tr valign="top"> - <td width="25%"><strong>E-Mail:</strong></td> - <td width="75%"><?=$this->email?></td> - </tr> - <tr valign="top"> - <td width="25%"><strong>Lesekartennummer:</strong></td> - <td width="75%"><?=$this->userid?></td> - </tr> - <tr valign="top"> - <td width="25%"><strong>Einrichtung:</strong></td> - <td width="75%"><?=$this->department?></td> - </tr> - <? if (($this->group)): ?> - <tr valign="top"> - <td width="25%"><strong>Status:</strong></td> - <td width="75%"><?=$this->group?></td> - </tr> - <? endif; ?> + <tr valign="top"> + <td width="25%"><strong>Name:</strong></td> + <td width="75%"><?=$this->username?></td> + </tr> + <tr valign="top"> + <td width="25%"><strong>Telefon:</strong></td> + <td width="75%"><?=$this->phone?></td> + </tr> + <tr valign="top"> + <td width="25%"><strong>E-Mail:</strong></td> + <td width="75%"><?=$this->email?></td> + </tr> + <tr valign="top"> + <td width="25%"><strong>Lesekartennummer:</strong></td> + <td width="75%"><?=$this->userid?></td> + </tr> + <tr valign="top"> + <td width="25%"><strong>Einrichtung:</strong></td> + <td width="75%"><?=$this->department?></td> + </tr> + <?php if (($this->group)): ?> + <tr valign="top"> + <td width="25%"><strong>Status:</strong></td> + <td width="75%"><?=$this->group?></td> + </tr> + <?php endif; ?> </table> -<hr /> +<hr/> <p><strong>ANGABEN ZUM GEWÃœNSCHTEN ARTIKEL:<strong></p> <table width="820" border="0"> - <tr valign="top"> - <td width="25%"><strong>Autor:</strong></td> - <td width="75%"><?=$this->author?></td> - </tr> - <tr valign="top"> - <td width="25%"><strong>Aufsatztitel:</strong></td> - <td width="75%"><?=$this->article?></td> - </tr> - <tr valign="top"> - <td width="25%"><strong>Zeitschriftentitel:</strong></td> - <td width="75%"><?=$this->journal?></td> - </tr> - <tr valign="top"> - <td width="25%"><strong>ISSN:</strong></td> - <td width="75%"><?=$this->issn?></td> - </tr> - <tr valign="top"> - <td width="25%"><strong>Erscheinungsjahr:</strong></td> - <td width="75%"><?=$this->publishdate?></td> - </tr> - <tr valign="top"> - <td width="25%"><strong>Band/Heft:</strong></td> - <td width="75%"><?=$this->number?></td> - </tr> - <tr valign="top"> - <td width="25%"><strong>Seiten:</strong></td> - <td width="75%"><?=$this->pages?></td> - </tr> - <tr valign="top"> - <td width="25%"><strong>Bemerkungen:</strong></td> - <td width="75%"><?=$this->remarks?></td> - </tr> + <tr valign="top"> + <td width="25%"><strong>Autor:</strong></td> + <td width="75%"><?=$this->author?></td> + </tr> + <tr valign="top"> + <td width="25%"><strong>Aufsatztitel:</strong></td> + <td width="75%"><?=$this->article?></td> + </tr> + <tr valign="top"> + <td width="25%"><strong>Zeitschriftentitel:</strong></td> + <td width="75%"><?=$this->journal?></td> + </tr> + <tr valign="top"> + <td width="25%"><strong>ISSN:</strong></td> + <td width="75%"><?=$this->issn?></td> + </tr> + <tr valign="top"> + <td width="25%"><strong>Erscheinungsjahr:</strong></td> + <td width="75%"><?=$this->publishdate?></td> + </tr> + <tr valign="top"> + <td width="25%"><strong>Band/Heft:</strong></td> + <td width="75%"><?=$this->number?></td> + </tr> + <tr valign="top"> + <td width="25%"><strong>Seiten:</strong></td> + <td width="75%"><?=$this->pages?></td> + </tr> + <tr valign="top"> + <td width="25%"><strong>Bemerkungen:</strong></td> + <td width="75%"><?=$this->remarks?></td> + </tr> </table> -<p>Literaturbestellung / Dokumentenlieferdienst der UBL<br /> - Datum: <?=$this->time?></p> +<p>Literaturbestellung / Dokumentenlieferdienst der UBL<br/> + Datum: <?=$this->time?></p> -<hr /> +<hr/> <p><strong>BEARBEITUNGSVERMERKE DER BIBLIOTHEK:</strong></p> -<? if ($this->division == '15'): ?> -<table width="820" border="0"> +<?php if ($this->division == '15'): ?> + <table width="820" border="0"> <tr valign="top"> - <td width="25%"><strong>Signatur:</strong></td> - <td width="75%"> </td> + <td width="25%"><strong>Signatur:</strong></td> + <td width="75%"> </td> </tr> <tr valign="top"> - <td width="25%"><strong>Erledigt am:</strong></td> - <td width="75%"> </td> + <td width="25%"><strong>Erledigt am:</strong></td> + <td width="75%"> </td> </tr> <tr valign="top"> - <td width="25%"><strong>Lieferung an:</strong></td> - <td width="75%">zbmed.fernleihe@medizin.uni-leipzig.de oder Ordner X:\ubl-kopien\Medizin</td> + <td width="25%"><strong>Lieferung an:</strong></td> + <td width="75%">zbmed.fernleihe@medizin.uni-leipzig.de oder Ordner X:\ubl-kopien\Medizin</td> </tr> -</table> -<? else: ?> -<table width="820" border="0"> + </table> +<?php else: ?> + <table width="820" border="0"> <tr valign="top"> - <td colspan="3">A) WEITERLEITUNG INNERHALB DER UBL:</td> + <td colspan="3">A) WEITERLEITUNG INNERHALB DER UBL:</td> </tr> <tr valign="top"> - <td width="5%"> </td> - <td width="20%"><strong>Standort:</strong></td> - <td width="75%"> </td> + <td width="5%"> </td> + <td width="20%"><strong>Standort:</strong></td> + <td width="75%"> </td> </tr> <tr valign="top"> - <td width="5%"> </td> - <td width="20%"><strong>Signatur:</strong></td> - <td width="75%"> </td> + <td width="5%"> </td> + <td width="20%"><strong>Signatur:</strong></td> + <td width="75%"> </td> </tr> <tr valign="top"> - <td colspan="3">B) SUBITO-BESTELLUNG:</td> + <td colspan="3">B) SUBITO-BESTELLUNG:</td> </tr> <tr valign="top"> - <td width="5%"> </td> - <td width="20%"><strong>Bestellnummer:</strong></td> - <td width="75%"> </td> + <td width="5%"> </td> + <td width="20%"><strong>Bestellnummer:</strong></td> + <td width="75%"> </td> </tr> <tr valign="top"> - <td width="5%"> </td> - <td width="20%"><strong>Bestelldatum:</strong></td> - <td width="75%"> </td> + <td width="5%"> </td> + <td width="20%"><strong>Bestelldatum:</strong></td> + <td width="75%"> </td> </tr> <tr valign="top"> - <td width="5%"> </td> - <td width="20%"><strong>Lieferbibliothek:</strong></td> - <td width="75%"> </td> + <td width="5%"> </td> + <td width="20%"><strong>Lieferbibliothek:</strong></td> + <td width="75%"> </td> </tr> <tr valign="top"> - <td width="5%"> </td> - <td width="20%"><strong>Eingang des Artikels:</strong></td> - <td width="75%"> </td> + <td width="5%"> </td> + <td width="20%"><strong>Eingang des Artikels:</strong></td> + <td width="75%"> </td> </tr> <tr valign="top"> - <td width="5%"> </td> - <td width="20%"><strong>Eingang der Rechnung:</strong></td> - <td width="75%"> </td> + <td width="5%"> </td> + <td width="20%"><strong>Eingang der Rechnung:</strong></td> + <td width="75%"> </td> </tr> -</table> -<? endif; ?> -<? if (!empty($this->subito_url)): ?> -<p> + </table> +<?php endif; ?> +<?php if (!empty($this->subito_url)): ?> + <p> Bestelllink für Subito: <a href="<?=$this->subito_url?>"><?=$this->subito_url?></a> -</p> -<? endif; ?> + </p> +<?php endif; ?> </body> </html> diff --git a/themes/finc/templates/Email/dds-text.phtml b/themes/finc/templates/Email/dds-text.phtml index aca5f625b3300e16f7014ec0d867c6009258eac9..e31cbc3edf9f7f30f6a18e9dc2ecb5306fe33879 100644 --- a/themes/finc/templates/Email/dds-text.phtml +++ b/themes/finc/templates/Email/dds-text.phtml @@ -39,14 +39,14 @@ Datum: <?=$this->time?> ------------------------------------------------------------------- BEARBEITUNGSVERMERKE DER BIBLIOTHEK: -<? if ($this->division == '15') :?> +<?php if ($this->division == '15') :?> Signatur: Erledigt am: Lieferung an: zbmed.fernleihe@medizin.uni-leipzig.de oder Ordner X:\ubl-kopien\Medizin -<? else :?> +<?php else :?> A) WEITERLEITUNG INNERHALB DER UBL: Standort: @@ -64,6 +64,6 @@ Lieferbibliothek: Eingang des Artikels: Eingang der Rechnung: -<? endif; ?> +<?php endif; ?> <?=!empty($this->subito_url) ? 'Bestelllink für Subito: ' . $this->subito_url : ''?> \ No newline at end of file diff --git a/themes/finc/templates/Email/journalhold-html.phtml b/themes/finc/templates/Email/journalhold-html.phtml index d64dfa380ab541aa8d9428fcde332e6375825952..04bde33c945cf81ca4639135fac4f5c524a04fd0 100644 --- a/themes/finc/templates/Email/journalhold-html.phtml +++ b/themes/finc/templates/Email/journalhold-html.phtml @@ -1,70 +1,70 @@ <?=$this->doctype('HTML5')?> <html> <head> - <? /* <meta http-equiv="content-type" content="text/html; charset=utf-8"> TEST IF THIS WORKS, fixme CK */ ?> - <title><?=$this->translate("Zeitschriftenbestellung")?></title> + <?php /* <meta http-equiv="content-type" content="text/html; charset=utf-8"> TEST IF THIS WORKS, fixme CK */ ?> + <title><?=$this->translate("Zeitschriftenbestellung")?></title> </head> <body style="font-family: Arial, Verdana, sans-serif;"> <table width="820" border="0"> - <tr valign="top"> - <td width="275"> - <strong>Signatur:</strong><br /> - <?=$this->callnumber?> - </td> - <td width="275"> - <strong>Heft / Jahrgang / Band:</strong><br /> - <?=$this->year?> / <?=$this->issue?> / <?=$this->volume?> - </td> - <td width="50"> - - </td> - <td width="220" rowspan="3" align="center" valign="top"> - <strong><?=$this->callnumber?></strong><br /> - Jahrgang / Band / Heft:<br /> - <strong><?=$this->year?> / <?=$this->issue?> / <?=$this->volume?></strong><br /> - <strong><?=$this->record['title']?></strong><br /><br /> - </td> - </tr> - <tr> - <td colspan="3"> </td> - </tr> - <tr valign="top"> - <td colspan="2"> - <strong>Titel:</strong> <?=$this->record['title']?><br /> - <strong>Standort:</strong> <?=$this->pickUpLocation?><br /> - <? if (isset($this->itemStatus['item_notes'])): ?> - <strong>Anmerkungen zum Exemplar:</strong> - <ul> - <? foreach ($this->itemStatus['item_notes'] as $note): ?> - <li><?=$note?></li> - <? endforeach; ?> - </ul> - <? endif; ?> - </td> - <td> </td> - <td> </td> - </tr> - <tr valign="bottom"> - <td colspan="2"> - <?if (!empty($this->comment)): ?> - <p> - <strong>Kommentar des Benutzers:</strong><br /> - <?=$this->comment?> - </p> - <? endif; ?> - <p> - <strong>wurde bestellt von:</strong><br /> - <?/*<strong>Email:</strong> <?=$this->patron['email']?><br />*/?> - <strong>Name:</strong> <?=$this->patron['lastname']?>, <?=$this->patron['firstname']?><br /> - <strong>Benutzerkarte:</strong> <?=$this->patron['cat_username']?><br /> - </p> - </td> - <td> </td> - <td align="center" valign="top" style="font-size: 16px"> - <strong><?=$this->patron['lastname']?>, <?=$this->patron['firstname']?></strong><br /> - <strong><?=$this->patron['cat_username']?></strong> - </td> - </tr> + <tr valign="top"> + <td width="275"> + <strong>Signatur:</strong><br/> + <?=$this->callnumber?> + </td> + <td width="275"> + <strong>Heft / Jahrgang / Band:</strong><br/> + <?=$this->year?> / <?=$this->issue?> / <?=$this->volume?> + </td> + <td width="50"> + + </td> + <td width="220" rowspan="3" align="center" valign="top"> + <strong><?=$this->callnumber?></strong><br/> + Jahrgang / Band / Heft:<br/> + <strong><?=$this->year?> / <?=$this->issue?> / <?=$this->volume?></strong><br/> + <strong><?=$this->record['title']?></strong><br/><br/> + </td> + </tr> + <tr> + <td colspan="3"> </td> + </tr> + <tr valign="top"> + <td colspan="2"> + <strong>Titel:</strong> <?=$this->record['title']?><br/> + <strong>Standort:</strong> <?=$this->pickUpLocation?><br/> + <?php if (isset($this->itemStatus['item_notes'])): ?> + <strong>Anmerkungen zum Exemplar:</strong> + <ul> + <?php foreach ($this->itemStatus['item_notes'] as $note): ?> + <li><?=$note?></li> + <?php endforeach; ?> + </ul> + <?php endif; ?> + </td> + <td> </td> + <td> </td> + </tr> + <tr valign="bottom"> + <td colspan="2"> + <?php if (!empty($this->comment)): ?> + <p> + <strong>Kommentar des Benutzers:</strong><br/> + <?=$this->comment?> + </p> + <?php endif; ?> + <p> + <strong>wurde bestellt von:</strong><br/> + <?php /*<strong>Email:</strong> <?=$this->patron['email']?><br />*/ ?> + <strong>Name:</strong> <?=$this->patron['lastname']?>, <?=$this->patron['firstname']?><br/> + <strong>Benutzerkarte:</strong> <?=$this->patron['cat_username']?><br/> + </p> + </td> + <td> </td> + <td align="center" valign="top" style="font-size: 16px"> + <strong><?=$this->patron['lastname']?>, <?=$this->patron['firstname']?></strong><br/> + <strong><?=$this->patron['cat_username']?></strong> + </td> + </tr> </table> </body> </html> diff --git a/themes/finc/templates/Email/journalhold-plain.phtml b/themes/finc/templates/Email/journalhold-plain.phtml index 2b6cb7c434f86a41a935f1962aad55a39c9fcd16..a0a5d6996f994fb710acdbd59447c4f6bfcd4c40 100644 --- a/themes/finc/templates/Email/journalhold-plain.phtml +++ b/themes/finc/templates/Email/journalhold-plain.phtml @@ -26,10 +26,10 @@ Weitere Informationen: Standort: <?=$this->pickUpLocation?> Anmerkungen zum Exemplar: -<? if (isset($this->itemStatus['item_notes'])): foreach ($this->itemStatus['item_notes'] as $note): ?> +<?php if (isset($this->itemStatus['item_notes'])): foreach ($this->itemStatus['item_notes'] as $note): ?> * <?=$note?> -<? endforeach; endif; ?> +<?php endforeach; endif; ?> Kommentar des Benutzers: diff --git a/themes/finc/templates/Email/reporterrors-html.phtml b/themes/finc/templates/Email/reporterrors-html.phtml index 44dc103184033b5ebc49dfe85171af2aad91b327..0b828d9c9f5b440c540f4bade4d8833f7d9fccc4 100644 --- a/themes/finc/templates/Email/reporterrors-html.phtml +++ b/themes/finc/templates/Email/reporterrors-html.phtml @@ -1,55 +1,55 @@ <?=$this->doctype('HTML5')?> <html> <head> - <? /* <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> TEST IF THIS WORKS, fixme CK */ ?> - <title>Fehlermeldung durch Benutzer</title> + <?php /* <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> TEST IF THIS WORKS, fixme CK */ ?> + <title>Fehlermeldung durch Benutzer</title> </head> <body style="font-family: Arial, Verdana, sans-serif;"> <h2 style="padding:10px 0;">Fehlermeldung durch Benutzer</h2> <table width="800" border="0"> - <? if ($reply_requested): ?> - <? if (isset($lastname) && isset($firstname)): ?> - <tr> + <?php if ($reply_requested): ?> + <?php if (isset($lastname) && isset($firstname)): ?> + <tr> <td width="30%">Name:</td> <td width="70%"><strong><?=$lastname?>, <?=$firstname?></strong></td> - </tr> - <? endif; ?> - <? if (isset($email)): ?> - <tr> + </tr> + <?php endif; ?> + <?php if (isset($email)): ?> + <tr> <td width="30%">Email:</td> <td width="70%"><a href="mailto:<?=$email?>"><?=$email?></a></td> - </tr> - <tr> + </tr> + <tr> <td width="100%" colspan="2"><strong>Um Rückmeldung wird gebeten.</strong></td> - </tr> - <? endif; ?> - <? endif; ?> - <? if ($comment): ?> - <tr> - <td width="30%">Meldung des Benutzers::</td> - <td width="70%"><span style="font-size: 12px"><?= $comment ?></span></td> - </tr> - <? endif; ?> + </tr> + <?php endif; ?> + <?php endif; ?> + <?php if ($comment): ?> <tr> - <td width="30%">Gemeldeter Titel:</td> - <td width="70%"> - <strong><?= $title ?></strong><br/> - <? if ($author): ?>von - <? foreach ($author as $auth): ?> - <?= $auth ?> - <? endforeach; ?> - <? endif; ?><br/> - <br/> - Link: <a href="<?=$this->serverUrl($this->recordLink()->getUrl($driver))?>" title="<?= $title ?>"><?=$this->serverUrl($this->recordLink()->getUrl($driver))?></a><br/> - Katalog-ID: <a href="<?= $this->serverUrl($this->recordLink()->getUrl($driver)) ?>" - title="<?= $title ?>"><?= $id ?></a><br/> - </td> - </tr> - <tr valign="top"> - <td width="100%" colspan="2"> - Zeitpunkt der Meldung: <?= $timestamp ?> - </td> + <td width="30%">Meldung des Benutzers::</td> + <td width="70%"><span style="font-size: 12px"><?=$comment?></span></td> </tr> + <?php endif; ?> + <tr> + <td width="30%">Gemeldeter Titel:</td> + <td width="70%"> + <strong><?=$title?></strong><br/> + <?php if ($author): ?>von + <?php foreach ($author as $auth): ?> + <?=$auth?> + <?php endforeach; ?> + <?php endif; ?><br/> + <br/> + Link: <a href="<?=$this->serverUrl($this->recordLink()->getUrl($driver))?>" title="<?=$title?>"><?=$this->serverUrl($this->recordLink()->getUrl($driver))?></a><br/> + Katalog-ID: <a href="<?=$this->serverUrl($this->recordLink()->getUrl($driver))?>" + title="<?=$title?>"><?=$id?></a><br/> + </td> + </tr> + <tr valign="top"> + <td width="100%" colspan="2"> + Zeitpunkt der Meldung: <?=$timestamp?> + </td> + </tr> </table> </body> </html> diff --git a/themes/finc/templates/Email/reporterrors-plain.phtml b/themes/finc/templates/Email/reporterrors-plain.phtml index 3bd0a8c5acf58d77421209a0ac8bcabd1453c8e3..9b7ade0fb21149c10c3a034610eee443bcee5a4f 100644 --- a/themes/finc/templates/Email/reporterrors-plain.phtml +++ b/themes/finc/templates/Email/reporterrors-plain.phtml @@ -1,37 +1,37 @@ == Fehlermeldung durch Benutzer == -<? if ($reply_requested): ?> - <? if (isset($lastname) && isset($firstname)): ?> +<?php if ($reply_requested): ?> + <?php if (isset($lastname) && isset($firstname)): ?> Name: <?=$lastname?>, <?=$firstname?> - <? endif; ?> - <? if (isset($email)): ?> + <?php endif; ?> + <?php if (isset($email)): ?> Email: <?=$email?> Um Rückmeldung wird gebeten. - <? endif; ?> -<? endif; ?> + <?php endif; ?> +<?php endif; ?> Gemeldeter Titel: <?= $title ?> -<? if ($author): ?> - von <? foreach ($author as $au): ?><?= $au ?> <? endforeach; ?> -<? endif; ?> +<?php if ($author): ?> + von <?php foreach ($author as $au): ?><?= $au ?> <?php endforeach; ?> +<?php endif; ?> Link: <?= $this->serverUrl($this->recordLink()->getUrl($driver)) ?> ------------------------------------------ -<? if ($comment): ?> +<?php if ($comment): ?> Meldung des Benutzers: <?= $comment ?> -<? endif; ?> +<?php endif; ?> ------------------------------------------ diff --git a/themes/finc/templates/Email/resetpassword-html.phtml b/themes/finc/templates/Email/resetpassword-html.phtml index 0eb1ff22bd891dbbc479dd65563b7b4605169aa7..850461ff0e642ab68c69652aa949e7760c6fce0d 100644 --- a/themes/finc/templates/Email/resetpassword-html.phtml +++ b/themes/finc/templates/Email/resetpassword-html.phtml @@ -1,35 +1,35 @@ <?=$this->doctype('HTML5')?> <html> <head> - <? /* <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> TEST IF THIS WORKS, fixme CK */ ?> - <title>Zurücksetzen des Passwortes für Benutzer</title> + <?php /* <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> TEST IF THIS WORKS, fixme CK */ ?> + <title>Zurücksetzen des Passwortes für Benutzer</title> </head> <body style="font-family: Arial, Verdana, sans-serif;"> <h2 style="padding:10px 0;">Zurücksetzen des Passwortes für Benutzer</h2> <table width="800" border="0"> - <? if (isset($lastname) && isset($firstname)): ?> + <?php if (isset($lastname) && isset($firstname)): ?> <tr> - <td width="30%">Name:</td> - <td width="70%"><strong><?=$lastname?>, <?=$firstname?></strong></td> + <td width="30%">Name:</td> + <td width="70%"><strong><?=$lastname?>, <?=$firstname?></strong></td> </tr> - <? endif; ?> - <? if (isset($username)): ?> - <tr> - <td width="30%">Benutzernummer:</td> - <td width="70%"><strong><?=$username?></strong></td> - </tr> - <? endif; ?> - <? if (isset($email)): ?> + <?php endif; ?> + <?php if (isset($username)): ?> <tr> - <td width="30%">Email:</td> - <td width="70%"><a href="mailto:<?=$email?>"><?=$email?></a></td> + <td width="30%">Benutzernummer:</td> + <td width="70%"><strong><?=$username?></strong></td> </tr> - <? endif; ?> - <tr valign="top"> - <td width="100%" colspan="2"> - Zeitpunkt der Anfrage: <?= $timestamp ?> - </td> + <?php endif; ?> + <?php if (isset($email)): ?> + <tr> + <td width="30%">Email:</td> + <td width="70%"><a href="mailto:<?=$email?>"><?=$email?></a></td> </tr> + <?php endif; ?> + <tr valign="top"> + <td width="100%" colspan="2"> + Zeitpunkt der Anfrage: <?=$timestamp?> + </td> + </tr> </table> </body> </html> diff --git a/themes/finc/templates/Email/resetpassword-plain.phtml b/themes/finc/templates/Email/resetpassword-plain.phtml index 1eecd5711febc47f48cb31dfdf33227d3d8ff2a0..55796f06ab0462bd8c74e37ef0bea576a3fb2944 100644 --- a/themes/finc/templates/Email/resetpassword-plain.phtml +++ b/themes/finc/templates/Email/resetpassword-plain.phtml @@ -1,19 +1,19 @@ == Zurücksetzen des Passwortes für Benutzer == -<? if (isset($lastname) && isset($firstname)): ?> +<?php if (isset($lastname) && isset($firstname)): ?> Name: <?=$lastname?>, <?=$firstname?> -<? endif; ?> -<? if (isset($username)): ?> +<?php endif; ?> +<?php if (isset($username)): ?> Benutzernummer: <?=$username?> -<? endif; ?> -<? if (isset($email)): ?> +<?php endif; ?> +<?php if (isset($email)): ?> Email: <?=$email?> -<? endif; ?> +<?php endif; ?> Zeitpunkt der Anfrage: <?= $timestamp ?> \ No newline at end of file diff --git a/themes/finc/templates/Helpers/branchinfo.phtml b/themes/finc/templates/Helpers/branchinfo.phtml index 31c2ff1a60451fda41b5c77ea3b666ea767cf9e8..248ce1ff9088e8082342672edf7467d5f5cca618 100644 --- a/themes/finc/templates/Helpers/branchinfo.phtml +++ b/themes/finc/templates/Helpers/branchinfo.phtml @@ -1,78 +1,78 @@ <!-- helpers - branchinfo.phtml --> <tr class="holding-info"> <td colspan="4"> - <? /* Keep the accordion-toggler! It makes the link appear as an accordion header - CK */?> + <?php /* Keep the accordion-toggler! It makes the link appear as an accordion header - CK */ ?> <a href="#<?=$info['branchno']?>" class="accordion-toggler" data-toggle="collapse" aria-expanded="false"><?=$this->transEsc('Address-Contact-Hours')?></a> <div id="<?=$info['branchno']?>" class="collapse" aria-expanded="false"> <div class="branch-address col-xs-12 col-sm-6"> - <strong><?=$info['branch']?></strong><br/> + <strong><?=$info['branch']?></strong><br/> <?=$info['streetaddress']?><br/> <?=$info['postalcode']?> <?=$info['city']?> </div> <div class="branch-contact col-xs-12 col-sm-6"> - <? if (isset($info['tel'])): ?> - <? if (is_array($info['tel'])): ?> - <? foreach ($info['tel'] as $tel): ?> + <?php if (isset($info['tel'])): ?> + <?php if (is_array($info['tel'])): ?> + <?php foreach ($info['tel'] as $tel): ?> <?=$this->transEsc('Tel')?>: <?=$tel?><br/> - <? endforeach; ?> - <? else: ?> + <?php endforeach; ?> + <?php else: ?> <?=$this->transEsc('Tel')?>: <?=$info['tel']?><br/> - <? endif; ?> - <? endif; ?> - <? if (isset($info['fax'])): ?> + <?php endif; ?> + <?php endif; ?> + <?php if (isset($info['fax'])): ?> <?=$this->transEsc('Fax')?>: <?=$info['fax']?><br/> - <? endif; ?> - <? if ( + <?php endif; ?> + <?php if ( isset($info['email']) && is_array($info['email']) && count($info['email']) > 0 ): ?> - <? foreach ($info['email'] as $email): ?> + <?php foreach ($info['email'] as $email): ?> <?=$this->transEsc('Email')?>: <?=$email?><br/> - <? endforeach; ?> - <? else: ?> + <?php endforeach; ?> + <?php else: ?> <?=$this->transEsc('Email')?>: <?=$info['email']?><br/> - <? endif; ?> - <? if (isset($info['url'])): ?> + <?php endif; ?> + <?php if (isset($info['url'])): ?> <a href="<?=$info['url']?>" title="<?=$info['branch']?>"> - <? if (isset($info['branch'])): ?> + <?php if (isset($info['branch'])): ?> <?=$this->transEsc('Link to')?> - <? else: ?> + <?php else: ?> <?=$info['url']?> - <? endif; ?> + <?php endif; ?> </a> - <? endif; ?> + <?php endif; ?> </div> <div class="branch-hours col-xs-12"> - <? if ( + <?php if ( isset($info['openinghours']) && is_array($info['openinghours']) && count($info['openinghours']) > 0 ): ?> - <? if (isset($info['branchpart'])): ?> + <?php if (isset($info['branchpart'])): ?> <strong><?=$info['branchpart']?></strong> - <? endif; ?> - <? if ($info['branchno'] != 'zw02'): ?> - <?=$this->transEsc('Opening hours')?><br /> - <? endif; ?> - <? foreach ($info['openinghours'] as $line): ?> - <?=$line['days']?>: <?=$line['open']?> – <?=$line['close']?><br /> - <? endforeach; ?> - <? endif; ?> + <?php endif; ?> + <?php if ($info['branchno'] != 'zw02'): ?> + <?=$this->transEsc('Opening hours')?><br/> + <?php endif; ?> + <?php foreach ($info['openinghours'] as $line): ?> + <?=$line['days']?>: <?=$line['open']?> – <?=$line['close']?><br/> + <?php endforeach; ?> + <?php endif; ?> </div> </div> <div class="row"> - <? if (isset($info['note'])): ?> + <?php if (isset($info['note'])): ?> <div class="branch-note alert alert-info"> - <? if (is_array($info['note'])): ?> - <? foreach ($info['note'] as $notes): ?> + <?php if (is_array($info['note'])): ?> + <?php foreach ($info['note'] as $notes): ?> <?=$notes?> - <? endforeach; ?> - <? else: ?> + <?php endforeach; ?> + <?php else: ?> <?=$info['note']?> - <? endif; ?> + <?php endif; ?> </div> - <? endif; ?> + <?php endif; ?> </div> </td> </tr> diff --git a/themes/finc/templates/Helpers/openurl.phtml b/themes/finc/templates/Helpers/openurl.phtml index 5f9fb847f699ebd971e3db330415c9b4e8d52e8d..0fedae7aa319e5c596a8264bab58bc27296078d5 100644 --- a/themes/finc/templates/Helpers/openurl.phtml +++ b/themes/finc/templates/Helpers/openurl.phtml @@ -1,5 +1,5 @@ <!-- finc: helpers - openurl --> -<? +<?php echo $this->inlineScript(\Zend\View\Helper\HeadScript::FILE, 'openurl.js', 'SET'); $classes = ''; if ($this->openUrlEmbed) { @@ -15,16 +15,16 @@ } ?> -<span class="openUrlControls<? if ($this->openUrlEmbed): ?> openUrlEmbed<? if ($this->openUrlEmbedAutoLoad): ?> openUrlEmbedAutoLoad<? endif; ?><? endif; ?>"> - <? if (!$this->openUrlImageBasedSrc || $this->openUrlImageBasedMode == 'both'): ?> +<span class="openUrlControls<?php if ($this->openUrlEmbed): ?> openUrlEmbed<?php if ($this->openUrlEmbedAutoLoad): ?> openUrlEmbedAutoLoad<?php endif; ?><?php endif; ?>"> + <?php if (!$this->openUrlImageBasedSrc || $this->openUrlImageBasedMode == 'both'): ?> <a href="<?=$this->escapeHtmlAttr($this->resolverUrl)?>"<?=$class?> data-search-class-id="<?=$this->escapeHtmlAttr($this->searchClassId) ?>"> - <? /* put the openUrl here in a span (COinS almost) so we can retrieve it later */ ?> + <?php /* put the openUrl here in a span (COinS almost) so we can retrieve it later */ ?> <span title="<?=$this->escapeHtmlAttr($this->openUrl)?>" class="openUrl"></span> - <? /* Custom finc, in #5334 (support for multiple resolver drivers) - CK */ ?> + <?php /* Custom finc, in #5334 (support for multiple resolver drivers) - CK */ ?> <span title="<?=$this->escapeHtmlAttr($this->resolvertype)?>" class="resolvertype"></span> - <? /* Custom finc, in #5334 (support for multiple resolver drivers) - END */ ?> - <? if ($this->openUrlGraphic): ?> - <? + <?php /* Custom finc, in #5334 (support for multiple resolver drivers) - END */ ?> + <?php if ($this->openUrlGraphic): ?> + <?php $style = ''; if ($this->openUrlGraphicWidth) { $style .= 'width:' . $this->escapeHtmlAttr($this->openUrlGraphicWidth) . 'px;'; @@ -34,22 +34,22 @@ } ?> <img src="<?=$this->escapeHtmlAttr($this->openUrlGraphic)?>" alt="<?=$this->transEsc('Get full text')?>" style="<?=$style?>" /> - <? else: ?> + <?php else: ?> <?=$this->transEsc('Get full text')?> - <? endif; ?> + <?php endif; ?> </a> - <? endif; ?> + <?php endif; ?> - <? if ($this->openUrlImageBasedSrc): ?> - <? $ibOpenUrl = $this->openUrlImageBasedOverride ? $this->openUrlImageBasedOverride : $this->openUrl; ?> + <?php if ($this->openUrlImageBasedSrc): ?> + <?php $ibOpenUrl = $this->openUrlImageBasedOverride ? $this->openUrlImageBasedOverride : $this->openUrl; ?> <a href="<?=$this->escapeHtmlAttr($this->openUrlBase . '?' . $ibOpenUrl)?>"<?=$class_ib?>> <span title="<?=$this->escapeHtmlAttr($ibOpenUrl)?>" class="openUrl"></span> <img data-recordid="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>" src="<?=$this->escapeHtmlAttr($this->openUrlImageBasedSrc)?>" alt="<?=$this->transEsc('Get full text')?>" /> </a> - <? endif; ?> + <?php endif; ?> </span> -<? if ($this->openUrlEmbed): ?> +<?php if ($this->openUrlEmbed): ?> <div class="resolver hidden"><?=$this->transEsc('Loading')?> ...</div> -<? endif; ?> +<?php endif; ?> <!-- finc: helpers - openurl - END --> diff --git a/themes/finc/templates/Recommend/CollectionSideFacets.phtml b/themes/finc/templates/Recommend/CollectionSideFacets.phtml index 50cacf72e2a5d55dd7348d214e7ee4961d8c582f..1bce266a5e1fc4c4351c72987b18c994b4b5ae5b 100644 --- a/themes/finc/templates/Recommend/CollectionSideFacets.phtml +++ b/themes/finc/templates/Recommend/CollectionSideFacets.phtml @@ -1,9 +1,9 @@ <!-- finc: recommend - collectionSideFacets --> -<? +<?php $this->overrideSideFacetCaption = 'In This Collection'; ?> -<? if ($this->recommend->keywordFilterEnabled()): ?> - <? +<?php if ($this->recommend->keywordFilterEnabled()): ?> + <?php $keywordFilter = $this->recommend->getKeywordFilter(); if (!empty($keywordFilter)) { $this->extraSideFacetFilters = [ @@ -18,7 +18,7 @@ ]; } ?> - <? ob_start() ?> + <?php ob_start() ?> <div class="panel panel-default"> <div class="panel-heading"> <h4 class="panel-title"> @@ -26,19 +26,20 @@ </h4> </div> <div class="panel-body"> - <form class="form-inline" method="get" name="keywordFilterForm" id="keywordFilterForm"> - <input id="keywordFilter_lookfor" type="text" name="lookfor" value="<?=$this->escapeHtmlAttr($keywordFilter)?>" class="form-control w-100" /> - <? foreach ($this->recommend->getResults()->getParams()->getFilterList(true) as $field => $filters): ?> - <? foreach ($filters as $filter): ?> + <form class="form-inline" role="form" method="get" name="keywordFilterForm" id="keywordFilterForm"> + <input id="keywordFilter_lookfor" type="text" name="lookfor" value="<?=$this->escapeHtmlAttr($keywordFilter)?>" class="form-control"/> + <?php foreach ($this->recommend->getResults()->getParams()->getFilterList(true) as $field => $filters): ?> + <?php foreach ($filters as $filter): ?> <input type="hidden" name="filter[]" value="<?=$this->escapeHtmlAttr($filter['field'])?>:"<?=$this->escapeHtmlAttr($filter['value'])?>"" /> - <? endforeach; ?> - <? endforeach; ?> + <?php endforeach; ?> + <?php endforeach; ?> <input class="btn btn-transparent" type="submit" name="submit" value="<?=$this->transEsc('Set')?>"/> </form> </div> </div> - <? $this->sideFacetExtraControls = ob_get_contents(); ?> - <? ob_end_clean(); ?> -<? endif; ?> + <?php $this->sideFacetExtraControls = ob_get_contents(); ?> + <?php ob_end_clean(); ?> +<?php endif; ?> +<?php $this->baseUriExtra = $this->recommend->getResults()->getParams()->getCollectionId(); ?> <?=$this->render('Recommend/SideFacets.phtml')?> <!-- finc: recommend - collectionSideFacets - END --> diff --git a/themes/finc/templates/Recommend/EbscoResults.phtml b/themes/finc/templates/Recommend/EbscoResults.phtml index fdff9d5961d7a40175b026377ebe1eb1e4d0119a..2801644566d2ab48ed2af231dea8c7941f3daf61 100644 --- a/themes/finc/templates/Recommend/EbscoResults.phtml +++ b/themes/finc/templates/Recommend/EbscoResults.phtml @@ -1,14 +1,14 @@ -<? /* finc: recommend - ebscoresults */ ?> -<? +<!-- finc: recommend - ebscoresults --> +<?php $data = $this->recommend->getResult(); if (is_array($data['results']) && count($data['results']) > 0): ?> - <? /* Design should follow structure of recommend - sidefacets - CK */ ?> + <?php /* Design should follow structure of recommend - sidefacets - CK */ ?> <div id="side-panel-ebsco" class="facet-group"> <div class="facet title" data-toggle="collapse" href="#side-collapse-ebsco"> <?= $this->transEsc('Ebsco::title_hits_databases') ?> </div> <div id="side-collapse-ebsco" class="collapse in"> - <? foreach ($data['results'] as $result): ?> + <?php foreach ($data['results'] as $result): ?> <div class="facet"> <span class="badge"> <?= $this->escapeHtml($result['hits']) ?> @@ -17,13 +17,13 @@ if (is_array($data['results']) && count($data['results']) > 0): ?> <?= $this->escapeHtml($this->truncate($this->transEsc('Ebsco::'.$result['database']), 90)) ?> </a> </div> - <? endforeach; ?> + <?php endforeach; ?> <a class="facet narrow-toggle" href="<?=$this->escapeHtmlAttr($data['hits_total_url'])?>" target="_blank" rel="nofollow"> <?=$this->transEsc('more')?> ... </a> </div> </div> -<? endif; ?> -<? /* finc: recommend - ebscoresults - END */ ?> +<?php endif; ?> +<!-- finc: recommend - ebscoresults - END --> diff --git a/themes/finc/templates/Recommend/SideFacets.phtml b/themes/finc/templates/Recommend/SideFacets.phtml index bb506bc67b67191ef79aea64e775be8bac5281ba..3b9a1c2cd0eb073d43241aebaa7a043ded86a9d3 100644 --- a/themes/finc/templates/Recommend/SideFacets.phtml +++ b/themes/finc/templates/Recommend/SideFacets.phtml @@ -1,17 +1,25 @@ <!-- finc: recommend - sidefacets --> -<? +<?php $this->headScript()->appendFile('facets.js'); // Save results/options to $this so they are available to sub-templates: $this->results = $results = $this->recommend->getResults(); -$this->options = $options = $this->searchOptions($this->searchClassId); + $this->options = $options = $results->getOptions(); + +$hierarchicalFacets = $this->recommend->getHierarchicalFacets(); +if ($hierarchicalFacets) { + // jstree.min.js used to be injected by hierarchical-facet.js, but with deferred + // processing it's called too late to append anything to the headers. + $this->headScript()->appendFile('vendor/jsTree/jstree.min.js'); +} ?> -<? if ($results->getResultTotal() > 0): ?> +<button class="close-offcanvas btn btn-link" data-toggle="offcanvas"><?=$this->transEsc('navigate_back') ?></button> +<?php if ($results->getResultTotal() > 0): ?> <h4><?=$this->transEsc(isset($this->overrideSideFacetCaption) ? $this->overrideSideFacetCaption : 'Narrow Search')?></h4> -<? endif; ?> -<? $checkboxFilters = $results->getParams()->getCheckboxFacets(); ?> -<? $checkboxesShown = false; ?> -<? if (count($checkboxFilters) > 0): +<?php endif; ?> +<?php $checkboxFilters = $results->getParams()->getCheckboxFacets(); ?> +<?php $checkboxesShown = false; ?> +<?php if (count($checkboxFilters) > 0): foreach ($checkboxFilters as $current) { if ($results->getResultTotal() > 0 || $current['selected'] || $current['alwaysVisible']) { $checkboxesShown = true; @@ -19,63 +27,47 @@ $this->options = $options = $this->searchOptions($this->searchClassId); } } ?> - <? if ($checkboxesShown):?> + <?php if ($checkboxesShown):?> <div class="checkboxFilter"> <?=$this->context($this)->renderInContext('Recommend/SideFacets/checkbox-filters.phtml', ['checkboxFilters' => $checkboxFilters, 'results' => $results]);?> </div> -<? endif; ?> -<? endif; ?> -<? $extraFilters = isset($this->extraSideFacetFilters) ? $this->extraSideFacetFilters : []; ?> -<? $collapsedFacets = $this->recommend->getCollapsedFacets() ?> -<? $filterList = array_merge($results->getParams()->getFilterList(true), $extraFilters); ?> -<? if (!empty($filterList)): ?> +<?php endif; ?> +<?php endif; ?> +<?php $extraFilters = isset($this->extraSideFacetFilters) ? $this->extraSideFacetFilters : []; ?> +<?php $collapsedFacets = $this->recommend->getCollapsedFacets() ?> +<?php $filterList = array_merge($results->getParams()->getFilterList(true), $extraFilters); ?> +<?php if (!empty($filterList)): ?> <?=$this->context($this)->renderInContext('Recommend/SideFacets/filter-list.phtml', [ 'collapsedFacets' => $collapsedFacets, 'extraFilters' => $extraFilters, 'filterList' => $filterList, ]);?> -<? endif; ?> +<?php endif; ?> <?=isset($this->sideFacetExtraControls) ? $this->sideFacetExtraControls : ''?> -<? /* finc-specific line: sidefacet()->displayAllowedFacetValues ..., #7624 - CK */ /* Original line was: *//* -<? $sideFacetSet = $this->recommend->getFacetSet(); $rangeFacets = $this->recommend->getAllRangeFacets(); ?> - */ ?> -<? $sideFacetSet = $this->sideFacet()->displayAllowedFacetValues($this->recommend->getFacetSet()); $rangeFacets = $this->recommend->getAllRangeFacets(); ?> -<? $hierarchicalFacets = $this->recommend->getHierarchicalFacets() ?> -<? $hierarchicalFacetSortOptions = $this->recommend->getHierarchicalFacetSortOptions() ?> -<? if (!empty($sideFacetSet) && $results->getResultTotal() > 0): ?> - <? foreach ($sideFacetSet as $title => $cluster): ?> +<?php +/* finc-specific line to show allowed facet values only: sidefacet()->displayAllowedFacetValues ..., #7624 - CK */ /* Original line is: +<?php $sideFacetSet = $this->recommend->getFacetSet(); ?> + */ +?> +<?php $sideFacetSet = $this->sideFacet()->displayAllowedFacetValues($this->recommend->getFacetSet()); ?> +<?php $hierarchicalFacets = $this->recommend->getHierarchicalFacets() ?> +<?php $hierarchicalFacetSortOptions = $this->recommend->getHierarchicalFacetSortOptions() ?> +<?php if (!empty($sideFacetSet) && $results->getResultTotal() > 0): ?> + <?php foreach ($sideFacetSet as $title => $cluster): ?> <div class="facet-group" id="side-panel-<?=$this->escapeHtmlAttr($title)?>"> - <? /* use 'a' instead of 'div' below! Fix this in all instance branches to avoid validation error 'href not allowed on div'; #9416, CK */ ?> - <a class="title<? if (in_array($title, $collapsedFacets)): ?> collapsed<? endif ?>" data-toggle="collapse" href="#side-collapse-<?=$this->escapeHtmlAttr($title)?>"> + <button class="title<?php if(in_array($title, $collapsedFacets)): ?> collapsed<?php endif ?>" data-toggle="collapse" href="#side-collapse-<?=$this->escapeHtmlAttr($title) ?>" > <?=$this->transEsc($cluster['label'])?> - </a> - <div id="side-collapse-<?=$this->escapeHtmlAttr($title)?>" class="collapse<? if (!in_array($title, $collapsedFacets)): ?> in<? endif ?>"> - <? if (isset($rangeFacets[$title])): ?> - <?=$this->context($this)->renderInContext('Recommend/SideFacets/range-slider.phtml', ['title' => $title, 'facet' => $rangeFacets[$title]]);?> - <? else: ?> - <? $contextVars = [ - 'allowExclude' => $this->recommend->excludeAllowed($title), - 'title' => $title, - 'sortOptions' => isset($hierarchicalFacetSortOptions[$title]) ? $hierarchicalFacetSortOptions[$title] : '', - 'collapsedFacets' => $collapsedFacets - ]; ?> - <? if (in_array($title, $hierarchicalFacets)): ?> - <?=$this->context($this)->renderInContext('Recommend/SideFacets/hierarchical-facet.phtml', $contextVars);?> - <noscript> - <? endif; ?> - <? $contextVars = [ - 'options' => $options, - 'allowExclude' => $this->recommend->excludeAllowed($title), - 'facets_before_more' => $this->recommend->getShowMoreSetting($title), - 'showMoreInLightbox' => $this->recommend->getShowInLightboxSetting($title) - ]; ?> - <?=$this->context($this)->renderInContext('Recommend/SideFacets/cluster-list.phtml', array_merge($contextVars, ['title' => $title, 'cluster' => $cluster]));?> - <? if (in_array($title, $hierarchicalFacets)): ?> - </noscript> - <? endif; ?> - <? endif; ?> + </button> + <div id="side-collapse-<?=$this->escapeHtmlAttr($title)?>" class="collapse<?php if (!in_array($title, $collapsedFacets)): ?> in<?php endif ?>"> + <?=$this->context($this)->renderInContext( + 'Recommend/SideFacets/facet.phtml', + [ + 'facet' => $title, + 'cluster' => $cluster, + 'collapsedFacets' => $collapsedFacets ] + ); ?> </div> </div> - <? endforeach; ?> -<? endif; ?> + <?php endforeach; ?> +<?php endif; ?> <!-- finc: recommend - sidefacets - END --> diff --git a/themes/finc/templates/RecordDriver/AbstractBase/export-bibtex.phtml b/themes/finc/templates/RecordDriver/AbstractBase/export-bibtex.phtml index f00d5b61c142a468e2daf0143f063a4288d2f32a..03029631f40cbfb4ac0ad3eb09b5a686ea53cb27 100644 --- a/themes/finc/templates/RecordDriver/AbstractBase/export-bibtex.phtml +++ b/themes/finc/templates/RecordDriver/AbstractBase/export-bibtex.phtml @@ -1,24 +1,24 @@ -<? +<?php // TODO: fold this logic into record driver methods at some point: $marc = $this->driver->tryMethod('getMarcRecord'); if (is_object($marc)) { - $marcPhdField = $marc->getField('502'); - $marcProceedingsField = $marc->getField('711'); + $marcPhdField = $marc->getField('502'); + $marcProceedingsField = $marc->getField('711'); } else { - $marcPhdField = $marcProceedingsField = false; + $marcPhdField = $marcProceedingsField = false; } $journalTitle = $this->driver->tryMethod('getContainerTitle'); $formats = $this->driver->tryMethod('getFormats'); if ($marcProceedingsField) { - $format = 'proceedings'; + $format = 'proceedings'; } else if ($marcPhdField) { - $format = 'phdthesis'; + $format = 'phdthesis'; } else if (!empty($journalTitle) || (is_array($formats) && in_array('Article', $formats))) { - $format = 'article'; + $format = 'article'; } else if (is_array($formats) && in_array('Journal', $formats)) { - $format = 'misc'; + $format = 'misc'; } else { - $format = 'book'; + $format = 'book'; } // Open format tag: @@ -32,15 +32,15 @@ $title = rtrim($this->driver->getTitle(), " /"); echo "title = {{$title}},\n"; if (!empty($journalTitle)) { - echo "journal = {{$journalTitle}},\n"; - $volume = $this->driver->tryMethod('getContainerVolume'); - if (!empty($volume)) { - echo "volume = {{$volume}},\n"; - } - $number = $this->driver->tryMethod('getContainerIssue'); - if (!empty($number)) { - echo "number = {{$number}},\n"; - }/* + echo "journal = {{$journalTitle}},\n"; + $volume = $this->driver->tryMethod('getContainerVolume'); + if (!empty($volume)) { + echo "volume = {{$volume}},\n"; + } + $number = $this->driver->tryMethod('getContainerIssue'); + if (!empty($number)) { + echo "number = {{$number}},\n"; + }/* $start = $this->driver->tryMethod('getContainerStartPage'); $end = $this->driver->tryMethod('getContainerEndPage'); if (!empty($start)) { @@ -52,152 +52,152 @@ if (!empty($journalTitle)) { echo "pages = {{$start}},\n"; } }*/ - $pages = $this->driver->tryMethod('getPages'); + $pages = $this->driver->tryMethod('getPages'); + if (!empty($pages)) { + // use page range if possible if (!empty($pages)) { - // use page range if possible - if (!empty($pages)) { - echo "pages = {{$pages}},\n"; - } + echo "pages = {{$pages}},\n"; } + } } $series = $this->driver->tryMethod('getSeries'); if (is_array($series)) { - foreach ($series as $current) { - echo "series = {" . (is_array($current) ? $current['name'] : $current) . "},\n"; - } + foreach ($series as $current) { + echo "series = {" . (is_array($current) ? $current['name'] : $current) . "},\n"; + } } $authors = []; $primaryAuthor = $this->driver->tryMethod('getPrimaryAuthor'); if (!empty($primaryAuthor)) { - $authors[] = $primaryAuthor; + $authors[] = $primaryAuthor; } $additionalAuthors = $this->driver->tryMethod('getAdditionalAuthors'); if (!empty($additionalAuthors)) { - $authors[] = $additionalAuthors; + $authors[] = $additionalAuthors; } if (!empty($authors)) { - $arr = []; - foreach ($authors as $author) { - if (is_array($author)) { - foreach ($author as $au) { - if (!in_array($au['name'], $arr)) { - $arr[] = $au['name']; - } - } - } else { - if (!in_array($author, $arr)) { - $arr[] = $author; - } + $arr = []; + foreach ($authors as $author) { + if (is_array($author)) { + foreach ($author as $au) { + if (!in_array($au['name'], $arr)) { + $arr[] = $au['name']; } + } + } else { + if (!in_array($author, $arr)) { + $arr[] = $author; + } } - $author = implode(' and ', $arr); - echo "author = {{$author}},\n"; + } + $author = implode(' and ', $arr); + echo "author = {{$author}},\n"; } $secondaryAuthors = $this->driver->tryMethod('getSecondaryAuthors'); if (is_array($secondaryAuthors)) { - foreach ($secondaryAuthors as $current) { - echo "editor = {{$current}},\n"; - } + foreach ($secondaryAuthors as $current) { + echo "editor = {{$current}},\n"; + } } $pubPlaces = $this->driver->tryMethod('getPlacesOfPublication'); $pubDates = $this->driver->tryMethod('getPublicationDates'); $pubNames = $this->driver->tryMethod('getPublishers'); if (is_array($pubPlaces) && is_array($pubDates) && is_array($pubNames)) { - $total = min(count($pubPlaces), count($pubDates), count($pubNames)); - // if we have pub dates but no other details, we still want to export the year: - if ($total == 0 && count($pubDates) > 0) { - $total = 1; + $total = min(count($pubPlaces), count($pubDates), count($pubNames)); + // if we have pub dates but no other details, we still want to export the year: + if ($total == 0 && count($pubDates) > 0) { + $total = 1; + } + for ($i = 0; $i < $total; $i++) { + if (isset($pubPlaces[$i])) { + echo "address = {" . rtrim(str_replace(array('[', ']'), '', $pubPlaces[$i]), ': ') . "},\n"; } - for ($i = 0; $i < $total; $i++) { - if (isset($pubPlaces[$i])) { - echo "address = {" . rtrim(str_replace(array('[', ']'), '', $pubPlaces[$i]), ': ') . "},\n"; - } - if (isset($pubNames[$i])) { - echo "publisher = {" . rtrim($pubNames[$i], ", ") . "},\n"; - } - /*$date = trim($pubDates[$i], '[]. '); - if (strlen($date) > 4) { - $date = $this->dateTime()->extractYear($date); - } - if ($date) { - echo "year = {{$date}},\n"; - }*/ + if (isset($pubNames[$i])) { + echo "publisher = {" . rtrim($pubNames[$i], ", ") . "},\n"; } + /*$date = trim($pubDates[$i], '[]. '); + if (strlen($date) > 4) { + $date = $this->dateTime()->extractYear($date); + } + if ($date) { + echo "year = {{$date}},\n"; + }*/ + } } $data = $this->driver->tryMethod('getPublishedIn'); if (isset($data['date'])) { - $date = $data['date']; - echo "year = {{$date}},\n"; + $date = $data['date']; + echo "year = {{$date}},\n"; } if (empty($data)) { - $date = $this->driver->tryMethod('getPublishDateSort'); - if (!empty($date)) { - echo "year = {{$date}},\n"; - } + $date = $this->driver->tryMethod('getPublishDateSort'); + if (!empty($date)) { + echo "year = {{$date}},\n"; + } } $edition = $this->driver->tryMethod('getEdition'); if (!empty($edition)) { - echo "edition = {{$edition}},\n"; + echo "edition = {{$edition}},\n"; } if ($marcPhdField && $subfield = $marcPhdField->getSubfield('a')) { - echo "school = {" . $subfield->getData() . "},\n"; + echo "school = {" . $subfield->getData() . "},\n"; } // Try to find a page count in the physical description: $physical = $this->driver->tryMethod('getPhysicalDescriptions'); if (is_array($physical)) { - foreach ($physical as $current) { - if (preg_match('/([0-9]+)\s*p/', $current, $matches)) { - echo "pages = {{$matches[1]}},\n"; - break; - } + foreach ($physical as $current) { + if (preg_match('/([0-9]+)\s*p/', $current, $matches)) { + echo "pages = {{$matches[1]}},\n"; + break; } + } } $isbns = $this->driver->tryMethod('getISBNs'); if (is_array($isbns)) { - foreach ($isbns as $isbn) { - echo "isbn = {{$isbn}},\n"; - } + foreach ($isbns as $isbn) { + echo "isbn = {{$isbn}},\n"; + } } $issns = $this->driver->tryMethod('getISSNs'); if (is_array($issns)) { - foreach ($issns as $issn) { - echo "issn = {{$issn}},\n"; - } + foreach ($issns as $issn) { + echo "issn = {{$issn}},\n"; + } } $languages = $this->driver->tryMethod('getLanguages'); if (is_array($languages)) { - foreach ($languages as $language) { - echo "language = {{$language}},\n"; - } + foreach ($languages as $language) { + echo "language = {{$language}},\n"; + } } $notes = $this->driver->tryMethod('getGeneralNotes'); if (is_array($notes)) { - foreach ($notes as $note) { - echo "note = {{$note}},\n"; - } + foreach ($notes as $note) { + echo "note = {{$note}},\n"; + } } foreach ($this->record($this->driver)->getUrlList() as $doi) { - echo "url = {{$doi}},\n"; + echo "url = {{$doi}},\n"; } $baseUrl = $this->export()->getMainConfig()->Site->url; $url = $baseUrl . $this->recordLink()->getUrl($this->driver->getUniqueId()); if (!empty($url)) { - echo "url = {{$url}}\n"; + echo "url = {{$url}}\n"; } // Record separator: diff --git a/themes/finc/templates/RecordDriver/AbstractBase/export-endnote.phtml b/themes/finc/templates/RecordDriver/AbstractBase/export-endnote.phtml index f0f927eb9de6a617e02385a2ab98c112cb14d9ea..4bc065654b6eea3fe015c19fe8ea3c9a43b340aa 100644 --- a/themes/finc/templates/RecordDriver/AbstractBase/export-endnote.phtml +++ b/themes/finc/templates/RecordDriver/AbstractBase/export-endnote.phtml @@ -1,15 +1,15 @@ -<? +<?php $filter = new Zend\Filter\Word\CamelCaseToSeparator(); // A driver-specific template may pass in format overrides; check for these before going to the driver itself: $formats = isset($this->overrideFormats) ? $this->overrideFormats : $this->driver->tryMethod('getFormats'); if (is_array($formats) && !empty($formats)) { - foreach ($formats as $format) { - $format = $filter->filter($format); - echo "%0 $format\n"; - } + foreach ($formats as $format) { + $format = $filter->filter($format); + echo "%0 $format\n"; + } } else { - // Assume book if no format found (otherwise data may be considered invalid): - echo "%0 Book\n"; + // Assume book if no format found (otherwise data may be considered invalid): + echo "%0 Book\n"; } /*$author = $this->driver->tryMethod('getPrimaryAuthor'); if (!empty($author)) { @@ -28,116 +28,116 @@ if (!empty($authors)) { $authors = []; $primaryAuthor = $this->driver->tryMethod('getPrimaryAuthor'); if (!empty($primaryAuthor)) { - $authors[] = $primaryAuthor; + $authors[] = $primaryAuthor; } $additionalAuthors = $this->driver->tryMethod('getAdditionalAuthors'); if (!empty($additionalAuthors)) { - $authors[] = $additionalAuthors; + $authors[] = $additionalAuthors; } if (!empty($authors)) { - $arr = []; - foreach ($authors as $author) { - if (is_array($author)) { - foreach ($author as $au) { - if (!in_array($au['name'], $arr)) { - $arr[] = $au['name']; - } - } - } else { - if (!in_array($author, $arr)) { - $arr[] = $author; - } + $arr = []; + foreach ($authors as $author) { + if (is_array($author)) { + foreach ($author as $au) { + if (!in_array($au['name'], $arr)) { + $arr[] = $au['name']; } + } + } else { + if (!in_array($author, $arr)) { + $arr[] = $author; + } } - $author = implode(' and ', $arr); - echo "%A {$author}\n"; + } + $author = implode(' and ', $arr); + echo "%A {$author}\n"; } $secondaryAuthors = $this->driver->tryMethod('getSecondaryAuthors'); if (is_array($secondaryAuthors)) { - foreach ($secondaryAuthors as $current) { - echo "%E $current\n"; - } + foreach ($secondaryAuthors as $current) { + echo "%E $current\n"; + } } $pubPlaces = $this->driver->tryMethod('getPlacesOfPublication'); $pubDates = $this->driver->tryMethod('getPublicationDates'); $pubNames = $this->driver->tryMethod('getPublishers'); if (is_array($pubPlaces) && is_array($pubDates) && is_array($pubNames)) { - $total = min(count($pubPlaces), count($pubDates), count($pubNames)); - // if we have pub dates but no other details, we still want to export the year: - if ($total == 0 && ( + $total = min(count($pubPlaces), count($pubDates), count($pubNames)); + // if we have pub dates but no other details, we still want to export the year: + if ($total == 0 && ( (count($pubDates) > 0) || (count($pubNames) > 0) || (count($pubPlaces) > 0) - )) { - $total = 1; + )) { + $total = 1; + } + for ($i = 0; $i < $total; $i++) { + if (isset($pubNames[$i])) { + echo "%I " . rtrim($pubNames[$i], ", ") . "\n"; } - for ($i = 0; $i < $total; $i++) { - if (isset($pubNames[$i])) { - echo "%I " . rtrim($pubNames[$i], ", ") . "\n"; - } - if (isset($pubDates[$i])) { - $date = trim($pubDates[$i], '[]. '); - if (strlen($date) > 4) { - $date = $this->dateTime()->extractYear($date); - } - if ($date) { - echo "%D $date\n"; - } - } - if (isset($pubPlaces[$i])) { - echo "%C " . rtrim(str_replace(array('[', ']'), '', $pubPlaces[$i]), ': '). "\n"; - } + if (isset($pubDates[$i])) { + $date = trim($pubDates[$i], '[]. '); + if (strlen($date) > 4) { + $date = $this->dateTime()->extractYear($date); + } + if ($date) { + echo "%D $date\n"; + } } + if (isset($pubPlaces[$i])) { + echo "%C " . rtrim(str_replace(array('[', ']'), '', $pubPlaces[$i]), ': ') . "\n"; + } + } } // echo "%C ?\n"; $data = $this->driver->tryMethod('getPublishedIn'); if (isset($data['date'])) { - $date = $data['date']; - echo "%D {$date}\n"; + $date = $data['date']; + echo "%D {$date}\n"; } if (empty($data)) { - $date = $this->driver->tryMethod('getPublishDateSort'); - if (!empty($date)) { - echo "%D {$date}}\n"; - } + $date = $this->driver->tryMethod('getPublishDateSort'); + if (!empty($date)) { + echo "%D {$date}}\n"; + } } $languages = $this->driver->tryMethod('getLanguages'); if (is_array($languages)) { - foreach ($languages as $lang) { - echo "%G $lang\n"; - } + foreach ($languages as $lang) { + echo "%G $lang\n"; + } } $series = $this->driver->tryMethod('getSeries'); if (is_array($series)) { - foreach ($series as $current) { - echo '%B ' . (is_array($current) ? $current['name'] : $current) . "\n"; - } + foreach ($series as $current) { + echo '%B ' . (is_array($current) ? $current['name'] : $current) . "\n"; + } } $isbns = $this->driver->tryMethod('getISBNs'); if (is_array($isbns)) { - foreach ($isbns as $isbn) { - echo "%@ $isbn\n"; - } + foreach ($isbns as $isbn) { + echo "%@ $isbn\n"; + } } $issns = $this->driver->tryMethod('getISSNs'); if (is_array($issns)) { - foreach ($issns as $issn) { - echo "%@ $issn\n"; - } + foreach ($issns as $issn) { + echo "%@ $issn\n"; + } } $library = $this->export()->getMainConfig()->Site->title; if (!empty($library)) { - echo "%~ {$library}\n"; + echo "%~ {$library}\n"; } $title = rtrim($this->driver->getTitle(), " /"); @@ -145,62 +145,62 @@ echo "%T $title\n"; $volume = $this->driver->tryMethod('getVolume'); if (!empty($volume)) { - $volume = str_replace(',', '', $volume); - echo "%V $volume\n"; + $volume = str_replace(',', '', $volume); + echo "%V $volume\n"; } $journalTitle = $this->driver->tryMethod('getContainerTitle'); if (!empty($journalTitle)) { - echo "%J $journalTitle\n"; - $volume = $this->driver->tryMethod('getContainerVolume'); - if (!empty($volume)) { - echo "%V $volume\n"; - } - $number = $this->driver->tryMethod('getContainerIssue'); - if (!empty($number)) { - echo "%N $number\n"; - } - /*$page = $this->driver->tryMethod('getContainerStartPage'); - if (!empty($page)) { - $end = $this->driver->tryMethod('getContainerEndPage'); - if (!empty($end) && $end != $page) { - $page .= '-' . $end; - } - echo "%P $page\n"; - }*/ - $pages = $this->driver->tryMethod('getPages'); + echo "%J $journalTitle\n"; + $volume = $this->driver->tryMethod('getContainerVolume'); + if (!empty($volume)) { + echo "%V $volume\n"; + } + $number = $this->driver->tryMethod('getContainerIssue'); + if (!empty($number)) { + echo "%N $number\n"; + } + /*$page = $this->driver->tryMethod('getContainerStartPage'); + if (!empty($page)) { + $end = $this->driver->tryMethod('getContainerEndPage'); + if (!empty($end) && $end != $page) { + $page .= '-' . $end; + } + echo "%P $page\n"; + }*/ + $pages = $this->driver->tryMethod('getPages'); + if (!empty($pages)) { + // use page range if possible if (!empty($pages)) { - // use page range if possible - if (!empty($pages)) { - echo "%P {$pages}\n"; - } + echo "%P {$pages}\n"; } + } } foreach ($this->record($this->driver)->getUrlList() as $doi) { - echo "%U $doi\n"; + echo "%U $doi\n"; } $edition = $this->driver->tryMethod('getEdition'); if (!empty($edition)) { - echo "%7 $edition\n"; + echo "%7 $edition\n"; } $summary = $this->driver->tryMethod('getSummary'); if (!empty($summary)) { - echo "%X {$summary[0]}\n"; + echo "%X {$summary[0]}\n"; } $baseUrl = $this->export()->getMainConfig()->Site->url; $url = $baseUrl . $this->recordLink()->getUrl($this->driver->getUniqueId()); if (!empty($url)) { - echo "%Z {$url}\n"; + echo "%Z {$url}\n"; } $baseUrl = $this->export()->getMainConfig()->Site->url; $url = $baseUrl . $this->recordLink()->getUrl($this->driver->getUniqueId()); if (!empty($url)) { - echo "%U {$url}\n"; + echo "%U {$url}\n"; } // Record separator: diff --git a/themes/finc/templates/RecordDriver/AbstractBase/export-ris.phtml b/themes/finc/templates/RecordDriver/AbstractBase/export-ris.phtml index 58da759de075e735cf589e4374b946d8e4f3c85e..06440fddf74f9a4120b10a429bb4437227ef44db 100644 --- a/themes/finc/templates/RecordDriver/AbstractBase/export-ris.phtml +++ b/themes/finc/templates/RecordDriver/AbstractBase/export-ris.phtml @@ -1,24 +1,24 @@ -<? +<?php // TODO: fold this logic into record driver methods at some point: $marc = $this->driver->tryMethod('getMarcRecord'); if (is_object($marc)) { - $marcPhdField = $marc->getField('502'); - $marcProceedingsField = $marc->getField('711'); + $marcPhdField = $marc->getField('502'); + $marcProceedingsField = $marc->getField('711'); } else { - $marcPhdField = $marcProceedingsField = false; + $marcPhdField = $marcProceedingsField = false; } $journalTitle = $this->driver->tryMethod('getContainerTitle'); $formats = $this->driver->tryMethod('getFormats'); if ($marcProceedingsField) { - $format = 'CONF'; + $format = 'CONF'; } else if ($marcPhdField) { - $format = 'THES'; + $format = 'THES'; } else if (!empty($journalTitle) || (is_array($formats) && in_array('Article', $formats))) { - $format = 'JOUR'; + $format = 'JOUR'; } else if (is_array($formats) && in_array('Journal', $formats)) { - $format = 'JFULL'; + $format = 'JFULL'; } else { - $format = 'BOOK'; + $format = 'BOOK'; } // Type @@ -26,53 +26,53 @@ echo 'TY - ' . $format . "\r\n"; $title = rtrim($this->driver->getTitle(), " /"); if (!empty($title)) { - echo 'TI - ' . "$title\r\n"; + echo 'TI - ' . "$title\r\n"; } if (!empty($journalTitle)) { - if (empty($title)) { - echo 'TI - ' . "$journalTitle\r\n"; - } else { - echo 'T2 - ' . "$journalTitle\r\n"; - } - $volume = $this->driver->tryMethod('getContainerVolume'); - if (!empty($volume)) { - echo 'VL - ' . "$volume\r\n"; - } - $number = $this->driver->tryMethod('getContainerIssue'); - if (!empty($number)) { - echo 'IS - ' . "$number\r\n"; - } - $start = $this->driver->tryMethod('getContainerStartPage'); - $end = $this->driver->tryMethod('getContainerEndPage'); - /*if (!empty($start)) { - // use page range if possible - if (!empty($end)) { - echo 'EP - ' . "$end\r\n"; - } else { - // use only start page - echo 'SP - ' . "$start\r\n"; - } - }*/ - $pages = $this->driver->tryMethod('getPages'); - if (!empty($pages)) { - $data = explode('-', $pages); - // use page range if possible - if (isset($data[0]) && !empty($data[0])) { - echo 'SP - ' . trim($data[0]) . "\r\n"; - } - if (isset($data[1]) && !empty($data[1])) { - // use only start page - echo 'EP - ' . trim($data[1]) . "\r\n"; - } - } + if (empty($title)) { + echo 'TI - ' . "$journalTitle\r\n"; + } else { + echo 'T2 - ' . "$journalTitle\r\n"; + } + $volume = $this->driver->tryMethod('getContainerVolume'); + if (!empty($volume)) { + echo 'VL - ' . "$volume\r\n"; + } + $number = $this->driver->tryMethod('getContainerIssue'); + if (!empty($number)) { + echo 'IS - ' . "$number\r\n"; + } + $start = $this->driver->tryMethod('getContainerStartPage'); + $end = $this->driver->tryMethod('getContainerEndPage'); + /*if (!empty($start)) { + // use page range if possible + if (!empty($end)) { + echo 'EP - ' . "$end\r\n"; + } else { + // use only start page + echo 'SP - ' . "$start\r\n"; + } + }*/ + $pages = $this->driver->tryMethod('getPages'); + if (!empty($pages)) { + $data = explode('-', $pages); + // use page range if possible + if (isset($data[0]) && !empty($data[0])) { + echo 'SP - ' . trim($data[0]) . "\r\n"; + } + if (isset($data[1]) && !empty($data[1])) { + // use only start page + echo 'EP - ' . trim($data[1]) . "\r\n"; + } + } } $series = $this->driver->tryMethod('getSeries'); if (is_array($series)) { - foreach ($series as $current) { - echo 'T3 - ' . (is_array($current) ? $current['name'] : $current) . "\r\n"; - } + foreach ($series as $current) { + echo 'T3 - ' . (is_array($current) ? $current['name'] : $current) . "\r\n"; + } } /*$author = $this->driver->tryMethod('getPrimaryAuthor'); @@ -93,109 +93,111 @@ if (!empty($authors)) { $authors = []; $primaryAuthor = $this->driver->tryMethod('getPrimaryAuthor'); if (!empty($primaryAuthor)) { - $authors[] = $primaryAuthor; + $authors[] = $primaryAuthor; } $additionalAuthors = $this->driver->tryMethod('getAdditionalAuthors'); if (!empty($additionalAuthors)) { - $authors[] = $additionalAuthors; + $authors[] = $additionalAuthors; } if (!empty($authors)) { - $arr = []; - foreach ($authors as $author) { - if (is_array($author)) { - foreach ($author as $au) { - if (!in_array($au['name'], $arr)) { - $arr[] = $au['name']; - } - } - } else { - if (!in_array($author, $arr)) { - $arr[] = $author; - } + $arr = []; + foreach ($authors as $author) { + if (is_array($author)) { + foreach ($author as $au) { + if (!in_array($au['name'], $arr)) { + $arr[] = $au['name']; } + } + } else { + if (!in_array($author, $arr)) { + $arr[] = $author; + } } - $author = implode(' and ', $arr); - echo 'AU - ' . "{$author}\r\n"; + } + $author = implode(' and ', $arr); + echo 'AU - ' . "{$author}\r\n"; } $secondaryAuthors = $this->driver->tryMethod('getSecondaryAuthors'); if (is_array($secondaryAuthors)) { - foreach ($secondaryAuthors as $current) { - echo "editor = {{$current}},\n"; - } + foreach ($secondaryAuthors as $current) { + echo "editor = {{$current}},\n"; + } } $secondaryAuthors = $this->driver->tryMethod('getSecondaryAuthors'); if (is_array($secondaryAuthors)) { - foreach ($secondaryAuthors as $current) { - echo 'A2 - ' . "$current\r\n"; - } + foreach ($secondaryAuthors as $current) { + echo 'A2 - ' . "$current\r\n"; + } } $pubPlaces = $this->driver->tryMethod('getPlacesOfPublication'); $pubDates = $this->driver->tryMethod('getPublicationDates'); $pubNames = $this->driver->tryMethod('getPublishers'); if (is_array($pubPlaces) && is_array($pubDates) && is_array($pubNames)) { - $total = min(count($pubPlaces), count($pubDates), count($pubNames)); - // if we have pub dates but no other details, we still want to export the year: - if ($total == 0 && count($pubDates) > 0) { - $total = 1; + $total = min(count($pubPlaces), count($pubDates), count($pubNames)); + // if we have pub dates but no other details, we still want to export the year: + if ($total == 0 && count($pubDates) > 0) { + $total = 1; + } + for ($i = 0; $i < $total; $i++) { + if (isset($pubPlaces[$i])) { + echo "CY - " . rtrim(str_replace(array('[', ']'), '', $pubPlaces[$i]), ': ') . "\r\n"; } - for ($i = 0; $i < $total; $i++) { - if (isset($pubPlaces[$i])) { - echo "CY - " . rtrim(str_replace(array('[', ']'), '', $pubPlaces[$i]), ': '). "\r\n"; - } - if (isset($pubNames[$i])) { - echo "PB - " . rtrim($pubNames[$i], ", ") . "\r\n"; - } - $date = trim($pubDates[$i], '[]. '); - if (strlen($date) > 4) { - $date = $this->dateTime()->extractYear($date); - } - if ($date) { - echo 'PY - ' . "$date\r\n"; - } + if (isset($pubNames[$i])) { + echo "PB - " . rtrim($pubNames[$i], ", ") . "\r\n"; } + $date = trim($pubDates[$i], '[]. '); + if (strlen($date) > 4) { + $date = $this->dateTime()->extractYear($date); + } + if ($date) { + echo 'PY - ' . "$date\r\n"; + } + } } $data = $this->driver->tryMethod('getPublishedIn'); if (isset($data['date'])) { - $date = $data['date']; - echo 'PY - ' . "$date\r\n"; + $date = $data['date']; + echo 'PY - ' . "$date\r\n"; } if (empty($data)) { - $date = $this->driver->tryMethod('getPublishDateSort'); - if (!empty($date)) { - echo 'PY - ' . "$date\r\n"; - } + $date = $this->driver->tryMethod('getPublishDateSort'); + if (!empty($date)) { + echo 'PY - ' . "$date\r\n"; + } } $languages = $this->driver->tryMethod('getLanguages'); if (is_array($languages)) { - foreach ($languages as $lang) { - echo 'LA - ' . "$lang\r\n"; - } + foreach ($languages as $lang) { + echo 'LA - ' . "$lang\r\n"; + } } -$genres = $this->driver->tryMethod('getGenres'); +$genres = $this->driver->tryMethod('getGenres'); if (is_array($genres)) { - foreach ($genres as $genre) { - echo 'M3 - ' . "$genre\r\n"; - } + foreach ($genres as $genre) { + echo 'M3 - ' . "$genre\r\n"; + } } -$topics = $this->driver->tryMethod('getTopics'); +$topics = $this->driver->tryMethod('getTopics'); $flatten = function (array $array) { - $return = []; - array_walk_recursive($array, function($a) use (&$return) { $return[] = $a; }); - return $return; - }; + $return = []; + array_walk_recursive($array, function ($a) use (&$return) { + $return[] = $a; + }); + return $return; +}; if (is_array($topics)) { - $topics = $flatten($topics); - foreach ($topics as $topic) { - echo 'KW - ' . "$topic\r\n"; - } + $topics = $flatten($topics); + foreach ($topics as $topic) { + echo 'KW - ' . "$topic\r\n"; + } } /*$start_page = $this->driver->tryMethod('getContainerStartPage'); @@ -205,38 +207,38 @@ if (!empty($start_page)) { $isbns = $this->driver->tryMethod('getISBNs'); if (is_array($isbns)) { - foreach ($isbns as $isbn) { - echo 'SN - ' . "$isbn\r\n"; - } + foreach ($isbns as $isbn) { + echo 'SN - ' . "$isbn\r\n"; + } } $issns = $this->driver->tryMethod('getISSNs'); if (is_array($issns)) { - foreach ($issns as $issn) { - echo 'SN - ' . "$issn\r\n"; - } + foreach ($issns as $issn) { + echo 'SN - ' . "$issn\r\n"; + } } $edition = $this->driver->tryMethod('getEdition'); if (!empty($edition)) { - echo 'ET - ' . "$edition\r\n"; + echo 'ET - ' . "$edition\r\n"; } $notes = $this->driver->tryMethod('getGeneralNotes'); if (is_array($notes)) { - foreach ($notes as $note) { - echo 'N1 - ' . "$note\r\n"; - } + foreach ($notes as $note) { + echo 'N1 - ' . "$note\r\n"; + } } foreach ($this->record($this->driver)->getUrlList() as $doi) { - echo 'UR - ' . "$doi\r\n"; + echo 'UR - ' . "$doi\r\n"; } $baseUrl = $this->export()->getMainConfig()->Site->url; $url = $baseUrl . $this->recordLink()->getUrl($this->driver->getUniqueId()); if (!empty($url)) { - echo 'UR - ' . "$url\r\n"; + echo 'UR - ' . "$url\r\n"; } // End of Record: diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/collection-info.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/collection-info.phtml new file mode 100644 index 0000000000000000000000000000000000000000..5af52c580f7141244543f1392c575993680f954b --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/collection-info.phtml @@ -0,0 +1,63 @@ +<!-- finc: recordDriver - DefaultRecord - collection-info --> +<?php $this->headScript()->appendFile('collection_record.js'); ?> +<div class="media"> + <?php $QRCode = $this->record($this->driver)->getQRCode("core"); + $coverDetails = $this->record($this->driver)->getCoverDetails('collection-info', 'medium', $this->record($this->driver)->getThumbnail('large')); + $cover = $coverDetails['html']; + $preview = $this->record($this->driver)->getPreviews(); ?> + <?php if ($QRCode || $cover || $preview): ?> + <div class="media-left <?=$this->escapeHtmlAttr($coverDetails['size'])?>"> + <?php /* Display thumbnail if appropriate: */ ?> + <?php if ($cover): ?> + <?=$cover?> + <?php endif; ?> + + <?php /* Display qrcode if appropriate: */ ?> + <?php if ($QRCode): ?> + <span class="hidden-xs"> + <br/><img alt="<?=$this->transEsc('QR Code')?>" class="qrcode" src="<?=$this->escapeHtmlAttr($QRCode);?>"/> + </span> + <?php endif; ?> + + <?php if ($preview): ?><?=$preview?><?php endif; ?> + </div> + <?php endif; ?> + <div class="media-body"> + + <?php /* finc: we want to get rid of trailing special chars in the title and limit its length to 100 chars */ ?> + <h2><?=$this->escapeHtml(preg_replace('/(\s[\/\.:]\s*)*$/', '', $this->truncate($this->driver->getShortTitle() . ' ' . $this->driver->getSubtitle() . ' ' . $this->driver->getTitleSection(), 100)))?></h2> + + <?php $summary = $this->driver->getSummary(); + $summary = $summary[0] ?? false; ?> + <?php if ($summary): ?> + <p><?=$this->escapeHtml($summary)?></p> + <?php endif; ?> + + <?php /* Display the lists that this record is saved to */ ?> + <div class="savedLists hidden alert alert-info" id="savedLists"> + <strong><?=$this->transEsc("Saved in")?>:</strong> + </div> + + <?php /* finc-specific snippet - Begin - CK */ + /* Do not set to 'hidden', make table below collapse in; adapt collection_record.js to keep accordion open - CK */ ?> + <a id="moreInfoToggle" href="#" class="accordion-toggler collapsed hidden" data-toggle="collapse" data-target="#collectionInfo" aria-expanded="true"> + <?=$this->transEsc('Description')?> + </a> + <?php /* Display Main Details */ ?> + <?php + $formatter = $this->recordDataFormatter(); + $fields = $formatter->getData($driver, $formatter->getDefaults('collection-info')); + ?> + <?php if (!empty($fields)): ?> + <?php /* finc: we use 'collapse in' to initially hide the content, CK */ ?> + <table id="collectionInfo" class="table table-striped collapse in"> + <caption class="sr-only"><?=$this->transEsc('Bibliographic Details')?></caption> + <?php foreach ($fields as $current): ?> + <tr><th><?=$this->transEsc($current['label'])?>:</th><td><?=$current['value']?></td></tr> + <?php endforeach; ?> + </table> + <?php endif; ?> + <?php /* End Main Details */ ?> + </div> +</div> +<!-- finc: recordDriver - DefaultRecord - collection-info - END --> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/core.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/core.phtml new file mode 100644 index 0000000000000000000000000000000000000000..2e2cb843e9b726d15f3697186489e08395135865 --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/core.phtml @@ -0,0 +1,85 @@ +<!-- finc: RecordDriver - DefaultRecord - core --> +<div class="media" vocab="http://schema.org/" resource="#record" typeof="<?=$this->driver->getSchemaOrgFormats()?> Product"> + <?php /* finc: use VF5.1 offcanvas toggler here as well if you have a custom sidebar - CK */ ?> + <?=$this->render('RecordDriver/DefaultRecord/offcanvas-toggler'); ?> + <?php + $QRCode = $this->record($this->driver)->getQRCode("core"); + $coverDetails = $this->record($this->driver)->getCoverDetails('core', 'medium', $this->record($this->driver)->getThumbnail('large')); + $cover = $coverDetails['html']; + $preview = $this->record($this->driver)->getPreviews(); + ?> + <?php if ($QRCode || $cover || $preview): ?> + <div class="media-left <?=$this->escapeHtmlAttr($coverDetails['size'])?> img-col"> + <?php /* Display thumbnail if appropriate: */ ?> + <?php if ($cover): ?> + <?=$cover?> + <?php /* BOF - finc-specific StyleBasedIcons */ ?> + <?php elseif ($this->record($this->driver)->showStyleBasedIcons()): ?> + <?=$this->record($this->driver)->getFormatIcon()?> + <?php /* EOF - finc-specific StyleBasedIcons */ ?> + <?php endif; ?> + + <?php /* Display qrcode if appropriate: */ ?> + <?php if ($QRCode): ?> + <span class="hidden-xs"> + <br/><img alt="<?=$this->transEsc('QR Code')?>" class="qrcode" src="<?=$this->escapeHtmlAttr($QRCode);?>"/> + </span> + <?php endif; ?> + + <?php // if you have a preview tab but want to move or remove the preview link + // from this area of the record view, this can be split into + // getPreviewData() (should stay here) and + // getPreviewLink() (can go in your desired tab) ?> + <?php if ($preview): ?> + <div class="record-previews"> + <?=$preview?> + </div> + <?php endif; ?> + </div> + <?php endif; ?> + <div class="media-body"> + + <?php /* finc: We want to get rid of trailing special chars in the title and limit its length to 100 chars; + in finc: keep schema name tag here!! #13861 - CK + */ + ?> + <?php /* finc: add schema tags for title #13850 - VE */ ?> + <h3 property="name"><?=$this->escapeHtml(preg_replace('/(\s[\/\.:]\s*)*$/', '', $this->truncate($this->driver->getShortTitle() . ' ' . $this->driver->getSubtitle() . ' ' . $this->driver->getTitleSection(), 100)))?></h3> + + <?php $summary = $this->driver->getSummary(); + $summary = isset($summary[0]) ? $this->escapeHtml($summary[0]) : false; ?> + <?php if ($summary): ?> + <p><?=$this->truncate($summary, 300)?></p> + + <?php if (strlen($summary) > 300): ?> + <p class="hidden-print"><a href='<?=$this->recordLink()->getTabUrl($this->driver, 'Description')?>#tabnav'><?=$this->transEsc('Full description')?></a></p> + <?php endif; ?> + <?php endif; ?> + + <?php if ($this->userlist()->getMode() !== 'disabled'): ?> + <?php /* Display the lists that this record is saved to */ ?> + <div class="savedLists hidden alert alert-info"> + <strong><?=$this->transEsc("Saved in")?>:</strong> + </div> + <?php endif; ?> + + <?php /* Display Main Details */ ?> + <?php + $formatter = $this->recordDataFormatter(); + $coreFields = $formatter->getData($driver, $formatter->getDefaults('core')); + ?> + <?php if (!empty($coreFields)): ?> + <table class="table table-striped"> + <caption class="sr-only"><?=$this->transEsc('Bibliographic Details')?></caption> + <?php foreach ($coreFields as $current): ?> + <tr> + <th><?=$this->transEsc($current['label'])?>:</th> + <td><?=$current['value']?></td> + </tr> + <?php endforeach; ?> + </table> + <?php endif; ?> + <?php /* End Main Details */ ?> + </div> +</div> +<!-- finc: RecordDriver - DefaultRecord - core - END --> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/data-additionals.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-additionals.phtml new file mode 100644 index 0000000000000000000000000000000000000000..8f4e33a84cd862ecaf2c748786236b2de10224e3 --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-additionals.phtml @@ -0,0 +1,20 @@ +<!-- finc: RecordDriver - DefaultRecord - data-additionals --> +<?php if (!empty($data) && is_array($data)): ?> + <?php foreach ($data as $additional) : ?> + <?php if (isset($additional['identifier'])): ?> + <tr> + <th> + <?=$this->transEsc($additional['identifier'])?>: + </th> + <td> + <?php if (isset($additional['id'])): ?> + <a href="<?=$this->recordLink()->getUrl($additional['id'])?>"><?=$this->escapeHtml($additional['text'])?></a> + <?php else: ?> + <?=$this->escapeHtml($additional['text'])?> + <?php endif; ?> + </td> + </tr> + <?php endif; ?> + <?php endforeach; ?> +<?php endif; ?> +<!-- finc: RecordDriver - DefaultRecord - data-additionals - END --> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/data-authors.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-authors.phtml new file mode 100644 index 0000000000000000000000000000000000000000..7330dda85d6df9363ac774cb7b8047301bc1cea9 --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-authors.phtml @@ -0,0 +1,57 @@ +<!-- finc: RecordDriver - DefaultRecord - data-authors --> +<?php +$formatProperty = function ($datafield, $name, $label) { + if (count($datafield) == 0) { + return ''; + } + $that = $this; + $translate = function ($str) use ($that, $label) { + return $that->transEsc($label . $str); + }; + return '<span class="author-property-' . $name . '">(' . implode(', ', array_unique(array_map($translate, $datafield))) . ')</span>'; +}; +$formattedAuthors = []; +$types = [ + 'main' => 'author', + 'secondary' => 'contributor', + 'corporate' => 'creator', + 'corporate_secondary' => 'contributor' +]; +?> +<?php foreach ($types as $type => $schemaLabel): ?> + <?php if (!empty($data[$type])): ?> + <?php foreach ($data[$type] as $author => $roles): ?> + <?php ob_start(); ?> + <span class="author-data" property="<?=$this->escapeHtml($schemaLabel)?>" typeof="Person"> + <span property="name"> + <a href="<?=$this->record($this->driver)->getLink('author', $author)?>"> + <?=$this->escapeHtml($author)?> + </a> + </span> + <?php + // Display additional data using the appropriate translation prefix + // (for example, to render author roles correctly): + if (!empty($requiredDataFields)) { + foreach ($requiredDataFields as $field) { + $name = $field['name']; + $prefix = $field['prefix'] ?? ''; + // deprecated due to more flexible solution at core + // to-do: revision of indexing and finc specific treatment + // of roles in RecordDriver + if (count($roles) > 0 && $name == 'role') { + echo $formatProperty($roles, $name, $prefix); + } + } + } + ?> + </span> + <?php +// Strip whitespace before close tags to avoid spaces in front of commas: + $formattedAuthors[] = trim(preg_replace('/\s+<\//', '</', ob_get_contents())); + ob_end_clean(); + ?> + <?php endforeach; ?> + <?php endif; ?> +<?php endforeach; ?> +<?=implode(', ', $formattedAuthors)?> +<!-- finc: RecordDriver - DefaultRecord - data-authors - END --> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/data-dissertationNote.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-dissertationNote.phtml new file mode 100644 index 0000000000000000000000000000000000000000..c23ae1ed9902f1cd95b97ef8ebcd35c8d348d7cb --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-dissertationNote.phtml @@ -0,0 +1,9 @@ +<!-- finc: RecordDriver - DefaultRecord - data-dissertationNote - END --> +<?php if (!empty($data)): ?> + <?php if (isset($data['g'])) { + $dissertationMisc = $data['g']; + unset($data['g']); + } ?> + <?=implode(', ', array_map([$this, 'escapeHtml'], $data));?><?php if (isset($dissertationMisc)): ?> (<?=$dissertationMisc?>)<?php endif; ?> +<?php endif; ?> +<!-- finc: RecordDriver - DefaultRecord - data-dissertationNote - END --> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/data-escapeHtml.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-escapeHtml.phtml new file mode 100644 index 0000000000000000000000000000000000000000..2cf79df5dbd61162fe388d18b48e9eadfca53621 --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-escapeHtml.phtml @@ -0,0 +1,8 @@ +<?php // Don't add START and END comments ?> +<?php if (!empty($data)): ?> + <?php if (is_array($data)): ?> + <?=implode('<br/>', array_map(array($this, 'escapeHtml'), $data))?> + <?php else: ?> + <?=$this->escapeHtml($data)?> + <?php endif; ?> +<?php endif; ?> \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/data-escapeHtmlCommaSep.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-escapeHtmlCommaSep.phtml new file mode 100644 index 0000000000000000000000000000000000000000..f1c711c47a800f75d5094f5f1ad8a29b615e8bd3 --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-escapeHtmlCommaSep.phtml @@ -0,0 +1,9 @@ +<!-- finc: RecordDriver - DefaultRecord - data-escapeHtmlCommaSep --> +<?php if (!empty($data)): ?> + <?php if (is_array($data)): ?> + <?=implode(', ', array_map(array($this, 'escapeHtml'), $data));?> + <?php else: ?> + <?=$this->escapeHtml($data)?> + <?php endif; ?> +<?php endif; ?> +<!-- finc: RecordDriver - DefaultRecord - data-escapeHtmlCommaSep - END --> \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/data-hierarchyParentTitle.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-hierarchyParentTitle.phtml new file mode 100644 index 0000000000000000000000000000000000000000..fc59049c3a471ef7e8c71d4c15009f7c394c15b1 --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-hierarchyParentTitle.phtml @@ -0,0 +1,13 @@ +<!-- finc: RecordDriver - DefaultRecord - data-hierarchyParentTitle --> +<?php if (!empty($data)): ?> + <?php $hierarchyParentId = $this->driver->tryMethod('getHierarchyParentID'); ?> + <?php foreach ($data as $key => $title): ?> + <?php if (isset($hierarchyParentId[$key])): ?> + <a href="<?=$this->recordLink()->getUrl($hierarchyParentId[$key]);?>"><?=$this->escapeHtml($title)?></a> + <?php else: ?> + <?=$this->escapeHtml($title)?> + <?php endif; ?> + <br/> + <?php endforeach; ?> +<?php endif; ?> +<!-- finc: RecordDriver - DefaultRecord - data-hierarchyParentTitle - END --> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/data-isbn.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-isbn.phtml new file mode 100644 index 0000000000000000000000000000000000000000..6a4d145761e65041dddfbcf8133e645fe768715d --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-isbn.phtml @@ -0,0 +1,11 @@ +<!-- finc: RecordDriver - DefaultRecord - data-isbn --> +<?php if (!empty($data)): ?> + <?php if (is_array($data)): ?> + <span property="isbn"> + <?=implode('<br/>', array_map(array($this, 'escapeHtml'), $data))?> + </span> + <?php else: ?> + <?=$this->escapeHtml($data)?> + <?php endif; ?> +<?php endif; ?> +<!-- finc: RecordDriver - DefaultRecord - data-isbn - END --> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/data-issn.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-issn.phtml new file mode 100644 index 0000000000000000000000000000000000000000..76987741ac8fbb876374f43a5dd91a4b59b842d3 --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-issn.phtml @@ -0,0 +1,11 @@ +<!-- finc: RecordDriver - DefaultRecord - data-issn --> +<?php if (!empty($data)): ?> + <?php if (is_array($data)): ?> + <span property="issn"> + <?=implode('<br/>', array_map(array($this, 'escapeHtml'), $data))?> + </span> + <?php else: ?> + <?=$this->escapeHtml($data)?> + <?php endif; ?> +<?php endif; ?> +<!-- finc: RecordDriver - DefaultRecord - data-issn - END --> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/data-link.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-link.phtml new file mode 100644 index 0000000000000000000000000000000000000000..b3773632048735674672c02218e68ed616e35ddf --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-link.phtml @@ -0,0 +1,7 @@ +<!-- finc: RecordDriver - DefaultRecord - data-link --> +<?php if (is_array($data)): ?> + <a href="<?=$data['url']?>"><?=$data['text']?></a> +<?php else: ?> + <a href="<?=$data?>"><?=$data?></a> +<?php endif; ?> +<!-- finc: RecordDriver - DefaultRecord - data-link - END --> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/data-localSignature.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-localSignature.phtml new file mode 100644 index 0000000000000000000000000000000000000000..d5d29e0639d8c4178a76b337f9b70012d10b9cbc --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-localSignature.phtml @@ -0,0 +1,11 @@ +<!-- finc: RecordDriver - DefaultRecord - data-localSignature --> +<?php if (!empty($data)): ?> + <?php foreach ($data as $field): ?> + <?php if (!empty($field)): ?> + <?php foreach ($field as $subfield): ?> + <?=trim($this->escapeHtml($subfield))?> + <?php endforeach; ?> + <?php endif; ?> + <?php endforeach; ?> +<?php endif; ?> +<!-- finc: RecordDriver - DefaultRecord - data-localSignature - END --> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/data-otherRelationshipEntry.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-otherRelationshipEntry.phtml new file mode 100644 index 0000000000000000000000000000000000000000..c3d92f9e1ff9fa6b324563f77b9e4ee395ac2fe3 --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-otherRelationshipEntry.phtml @@ -0,0 +1,19 @@ +<!-- finc: RecordDriver - DefaultRecord - data-otherRelationshipEntry --> +<? if (!empty($data)): ?> + <? foreach ($data as $subject => $values): ?> + <tr> + <th><?=$this->transEsc($values[0]['subject'])?>: </th> + <td> + <? foreach ($values as $v): ?> + <? if (isset($v['id'])): ?> + <a href="<?=$this->recordLink()->getUrl($v['id'])?>"><?=$this->escapeHtml($v['text'])?></a> + <? else: ?> + <?=$this->escapeHtml($v['text'])?> + <? endif; ?> + <br/> + <? endforeach; ?> + </td> + </tr> + <? endforeach; ?> +<? endif; ?> +<!-- finc: RecordDriver - DefaultRecord - data-otherRelationshipEntry - END --> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/data-publicationDetails.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-publicationDetails.phtml new file mode 100644 index 0000000000000000000000000000000000000000..fdb11ee471b3fea90446159405b2c3c26d5a4558 --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-publicationDetails.phtml @@ -0,0 +1,30 @@ +<!-- 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 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; ?> + </div> +<?php endif ?> +<!-- finc: RecordDriver - DefaultRecord - data-publicationDetails - END --> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/data-titleDetails.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-titleDetails.phtml new file mode 100644 index 0000000000000000000000000000000000000000..fd0c9ce8f43614a4e55f5ca7e2647e63ad7c006d --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-titleDetails.phtml @@ -0,0 +1,16 @@ +<!-- finc: RecordDriver - DefaultRecord - data-titleDetails --> +<?php if (!empty($data)): ?> + <?php $i = 0; + foreach ($data as $title): ?> + <?=($i > 0 ? '<br />' : '')?><?=$this->escapeHtml($title)?><?php $i++; ?> + <?php endforeach; ?> +<?php else: ?> + <?=$this->escapeHtml( + $this->driver->getShortTitle() . ' ' + . $this->driver->getSubtitle() . ' ' + . $this->driver->getTitleSection()) + . ($this->driver->getTitleStatement() ? ' / ' . $this->driver->getTitleStatement() : '')?> + <br/><?=($this->driver->tryMethod('getTitleOrig') && $this->driver->getTitleOrig() != '' ? $this->escapeHtml($this->driver->getTitleOrig()) : '') + ?> +<?php endif; ?> +<!-- finc: RecordDriver - DefaultRecord - data-titleDetails - END --> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/data-titleUniform.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-titleUniform.phtml new file mode 100644 index 0000000000000000000000000000000000000000..8d6c539de0240749218b717fe7a95c8391f791ab --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-titleUniform.phtml @@ -0,0 +1,19 @@ +<!-- finc: RecordDriver - DefaultRecord - data-titleUniform --> +<?php if (!empty($data)): ?> + <tr> + <th> + <?=$this->driver->isRDA() + ? $this->transEsc('rda_original_title') + : $this->transEsc('non_rda_original_title')?>: + </th> + <td property="title"> + <?php if (is_array($data)): ?> + <a + href="<?=$this->record($this->driver)->getLink('title', $data['title'])?>"><?=$this->escapeHtml($data['title'])?></a><?php if (isset($data['lang'])): ?> ⟨<?=$this->escapeHtml($data['lang'])?>⟩<?php endif; ?> + <?php else: ?> + <a href="<?=$this->record($this->driver)->getLink('title', $data)?>"><?=$this->escapeHtml($data)?></a> + <?php endif; ?> + </td> + </tr> +<?php endif; ?> +<!-- finc: RecordDriver - DefaultRecord - data-titleUniform - END --> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/data-transEsc.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-transEsc.phtml new file mode 100644 index 0000000000000000000000000000000000000000..efe6e050f56ae85d0e8df74a40c27e9d448c5fa1 --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-transEsc.phtml @@ -0,0 +1,8 @@ +<?php // Don't add START and END comments ?> +<?php if (!empty($data)): ?> + <?php if (is_array($data)): ?> + <?=implode('<br/>', array_map(array($this, 'transEsc'), $data))?> + <?php else: ?> + <?=$this->transEsc($data)?> + <?php endif; ?> +<?php endif; ?> \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/data-transEscCommaSep.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-transEscCommaSep.phtml new file mode 100644 index 0000000000000000000000000000000000000000..61fd836915c8f4d2070f3e0852caca91fdd9961c --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-transEscCommaSep.phtml @@ -0,0 +1,7 @@ +<?php if (!empty($data)): ?> + <?php if (is_array($data)): ?> + <?=implode(', ', array_map(array($this, 'transEsc'), $data));?> + <?php else: ?> + <?=$this->transEsc($data)?> + <?php endif; ?> +<?php endif; ?> \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/data-transEscCommaSepLang.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-transEscCommaSepLang.phtml new file mode 100644 index 0000000000000000000000000000000000000000..6a7ad4457838b650205d78c9ac619bd2c3b6ed2c --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-transEscCommaSepLang.phtml @@ -0,0 +1,12 @@ +<!-- finc: RecordDriver - DefaultRecord - data-transEscCommaSepLang --> +<?php if (!empty($data)): ?> + <?php if (is_array($data)): ?> + <?php /* finc: add schema tags for language #13850 - VE */ ?> + <span property="inLanguage"> + <?=implode('</span>, <span property="inLanguage">', array_map(array($this, 'transEsc'), $data));?> + </span> + <?php else: ?> + <?=$this->transEsc($data)?> + <?php endif; ?> +<?php endif; ?> +<!-- finc: RecordDriver - DefaultRecord - data-transEscCommaSepLang - END --> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/format-list.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/format-list.phtml new file mode 100644 index 0000000000000000000000000000000000000000..6ad5245ee5917c53d98f7e91df7b59607bc4716b --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/format-list.phtml @@ -0,0 +1,22 @@ +<?php $formats = $this->driver->getFormats(); +$translated_formats = []; +foreach ($formats as $format): ?> + <?php $translated_formats[] = $translated_format = $this->transEsc($format); ?> + <span class="format <?=$this->record($this->driver)->getFormatClass($format)?>"><?=$translated_format?></span> +<?php endforeach; ?> +<?php /* New genre string to display nxt to format in RESULT LIST and RECORD/Detail View, #11703, limit to SID 0 CK */ ?> +<?php /* Removes (uncommented) new genre string to display with k10plus index in RESULT LIST and RECORD/Detail View, #14912 FM */ ?> +<?php /* $sourceID = $this->driver->tryMethod('getSourceID'); ?> +<?php if ($sourceID == "0"): ?> + <?php $genres = $this->driver->tryMethod('getGenreFacet'); ?> + <?php if (!empty($genres)): ?> + <?php foreach ($genres as $genre): ?> + <?php $translated_genre = $this->transEsc($genre); + //deduplicate output + if (!in_array($translated_genre, $translated_formats)): + ?> + <span class="format"><?=$translated_genre?></span> + <?php endif; ?> + <? endforeach; ?> + <?php endif; ?> +<?php endif; */ ?> diff --git a/themes/finc/templates/RecordDriver/SolrDefault/link-rvk.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/link-rvk.phtml similarity index 100% rename from themes/finc/templates/RecordDriver/SolrDefault/link-rvk.phtml rename to themes/finc/templates/RecordDriver/DefaultRecord/link-rvk.phtml diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/list-entry.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/list-entry.phtml new file mode 100644 index 0000000000000000000000000000000000000000..1be6a201320de332338b969cb3f10e60892fa7d6 --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/list-entry.phtml @@ -0,0 +1,225 @@ +<!-- finc: RecordDriver - DefaultRecord - list-entry --> +<?php +// Set up some convenience variables: +$id = $this->driver->getUniqueId(); +$source = $this->driver->getSourceIdentifier(); +if (isset($this->list) && is_object($this->list)) { + $list_id = $this->list->id; + $user_id = $this->list->user_id; +} else { + $list_id = null; + $user_id = $this->user ? $this->user->id : null; +} +// finc: next line finc-specific; required to display public favorites lists, #12052, see also below - CK +$isEditable = $this->user && $this->user->id === $user_id; +// Thumbnail +$coverDetails = $this->record($this->driver)->getCoverDetails('list-entry', 'medium', $this->recordLink()->getUrl($this->driver)); +$cover = $coverDetails['html']; +$thumbnail = false; +$thumbnailAlignment = $this->record($this->driver)->getThumbnailAlignment('list'); +if ($cover): + ob_start(); ?> + <div class="media-<?=$thumbnailAlignment?> <?=$this->escapeHtmlAttr($coverDetails['size'])?>"> + <?=$cover?> + </div> + <?php $thumbnail = ob_get_contents(); ?> + <?php ob_end_clean(); ?> +<?php endif; ?> +<div class="result<?php if ($this->driver->supportsAjaxStatus()): ?> ajaxItem<?php endif ?>"> + <input type="hidden" value="<?=$this->escapeHtmlAttr($id)?>" class="hiddenId"/> + <input type="hidden" value="<?=$this->escapeHtmlAttr($source)?>" class="hiddenSource"/> + <?=$this->record($this->driver)->getCheckbox()?> + <div class="media"> + <?php if ($thumbnail && $thumbnailAlignment == 'left'): ?> + <?=$thumbnail?> + <?php endif; ?> + <div class="media-body"> + <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; ?> + </div> + + <div class="resultItemLine2"> + <?php if ($this->driver->isCollection()): ?> + <?=implode('<br>', array_map(array($this, 'escapeHtml'), $this->driver->getSummary()));?> + <?php else: ?> + <?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', $summAuthor)?>"><?=$this->escapeHtml($summAuthor)?></a><?=($i + 1 < $authorCount ? ';' : '')?> + <?php endforeach; ?> + <?php endif; ?> + + <?php $journalTitle = $this->driver->getContainerTitle(); + $summDate = $this->driver->getPublicationDates(); ?> + <?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>';?> + <?=!empty($summDate) ? ' (' . $this->escapeHtml($summDate[0]) . ')' : ''?> + <?php elseif (!empty($summDate)): ?> + <?=!empty($summAuthor) ? '<br/>' : ''?> + <?=$this->transEsc('Published') . ' ' . $this->escapeHtml($summDate[0])?> + <?php endif; ?> + <?php $summInCollection = $this->driver->getContainingCollections(); + if (false && !empty($summInCollection)): ?> + <?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())?>"> + <?=$this->escapeHtml($collText)?> + </a> + </div> + <?php endforeach; ?> + <?php endif; ?> + <?php endif; ?> + </div> + + <div class="last"> + <?php if (!$this->driver->isCollection()) { + if ($snippet = $this->driver->getHighlightedSnippet()) { + if (!empty($snippet['caption'])) { + echo '<strong>' . $this->transEsc($snippet['caption']) . ':</strong> '; + } + if (!empty($snippet['snippet'])) { + echo '<span class="quotestart">“</span>...' . $this->highlight($snippet['snippet']) . '...<span class="quoteend">”</span><br/>'; + } + } + } ?> + + <?php $listTags = ($this->usertags()->getMode() !== 'disabled') ? $this->driver->getTags( + null === $list_id ? true : $list_id, // get tags for all lists if no single list is selected + $user_id, 'tag' + ) : array(); + ?> + <?php if (count($listTags) > 0): ?> + <strong><?=$this->transEsc('Your Tags')?>:</strong> + <?php foreach ($listTags as $tag): ?> + <a href="<?=$this->currentPath() . $results->getUrlQuery()->addFacet('tags', $tag->tag)?>"><?=$this->escapeHtml($tag->tag)?></a> + <?php endforeach; ?> + <br/> + <?php endif; ?> + <?php $listNotes = $this->driver->getListNotes($list_id, $user_id); ?> + <?php if (count($listNotes) > 0): ?> + <strong><?=$this->transEsc('Notes')?>:</strong> + <?php if (count($listNotes) > 1): ?><br/><?php endif; ?> + <?php foreach ($listNotes as $note): ?> + <?=$this->escapeHtml($note)?><br/> + <?php endforeach; ?> + <?php endif; ?> + + <?php if (count($this->lists) > 0): ?> + <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; ?> + <?php endforeach; ?> + <br/> + <?php endif; ?> + + <div class="callnumAndLocation ajax-availability hidden"> + <?php if ($this->driver->supportsAjaxStatus()): ?> + <strong class="hideIfDetailed"><?=$this->transEsc('Call Number')?>:</strong> + <span class="callnumber ajax-availability hidden"> + <?=$this->transEsc('Loading')?>...<br/> + </span> + <strong><?=$this->transEsc('Located')?>:</strong> + <span class="location ajax-availability hidden"> + <?=$this->transEsc('Loading')?>... + </span> + <div class="locationDetails"></div> + <?php else: ?> + <?php $summCallNo = $this->driver->getCallNumber(); + if (!empty($summCallNo)): ?> + <strong><?=$this->transEsc('Call Number')?>:</strong> <?=$this->escapeHtml($summCallNo)?> + <?php endif; ?> + <?php endif; ?> + </div> + + <?php /* We need to find out if we're supposed to display an OpenURL link ($openUrlActive), + but even if we don't plan to display the link, we still want to get the $openUrl + value for use in generating a COinS (Z3988) tag -- see bottom of file. + */ + $openUrl = $this->openUrl($this->driver, 'results'); + $openUrlActive = $openUrl->isActive(); + $doi = $this->doi($this->driver, 'results'); + $doiActive = $doi->isActive(); + // Account for replace_other_urls setting + $urls = $this->record($this->driver)->getLinkDetails($openUrlActive); + + if ($openUrlActive || $doiActive || !empty($urls)): + ?> + <?php if ($openUrlActive): ?> + <br/> + <?=$openUrl->renderTemplate()?> + <?php endif; ?> + + <?php if ($doiActive): ?> + <br/> + <?=$doi->renderTemplate()?> + <?php endif; ?> + + <?php if (!is_array($urls)) { + $urls = []; + } + if (!$this->driver->isCollection()): + foreach ($urls as $current): ?> + <a href="<?=$this->escapeHtmlAttr($this->proxyUrl($current['url']))?>" class="fulltext" target="new"><i class="fa fa-external-link" + aria-hidden="true"></i> <?=($current['url'] == $current['desc']) ? $this->transEsc('Get full text') : $this->escapeHtml($current['desc'])?> + </a> + <?php endforeach; ?> + <?php endif; ?> + <?php endif; ?> + <br/> + + <?=$this->record($this->driver)->getFormatList()?> + + <?php if (!$openUrlActive && empty($urls) && $this->driver->supportsAjaxStatus()): ?> + <span class="status ajax-availability hidden"><?=$this->transEsc('Loading')?>...</span> + <br/><br/> + <?php endif; ?> + <?=$this->record($this->driver)->getPreviews()?> + </div> + </div> + + <div class="result-links hidden-print"> + <?php /* finc: next line finc-specific; required to display public favorites lists, #12052, see also above - CK */ ?> + <?php if ($isEditable): ?> + <i class="fa fa-fw fa-edit" aria-hidden="true"></i> <a + href="<?=$this->url('myresearch-edit')?>?id=<?=urlencode($id)?>&source=<?=urlencode($source)?><?php if (null !== $list_id): ?>&list_id=<?=urlencode($list_id)?><?php endif; ?>" + class="edit tool"><?=$this->transEsc('Edit')?></a><br/> + <?php /* Use a different delete URL if we're removing from a specific list or the overall favorites: */ + $deleteUrl = null === $list_id + ? $this->url('myresearch-favorites') + : $this->url('userList', ['id' => $list_id]); + $deleteUrlGet = $deleteUrl . '?delete=' . urlencode($id) . '&source=' . urlencode($source); + + $dLabel = 'delete-label-' . preg_replace('[\W]', '-', $id); + ?> + <div class="dropdown"> + <i class="fa fa-fw fa-trash-o" aria-hidden="true"></i> <a class="dropdown-toggle" id="<?=$dLabel?>" role="button" data-toggle="dropdown" href="<?=$deleteUrlGet?>"> + <?=$this->transEsc('Delete')?> + </a> + <ul class="dropdown-menu" role="menu" aria-labelledby="<?=$dLabel?>"> + <li><a onClick="$.post('<?=$deleteUrl?>', {'delete':'<?=$this->escapeJs($id)?>','source':'<?=$this->escapeJs($source)?>','confirm':true},function(){location.reload(true)})" + title="<?=$this->transEsc('confirm_delete_brief')?>"><?=$this->transEsc('confirm_dialog_yes')?></a></li> + <li><a><?=$this->transEsc('confirm_dialog_no')?></a></li> + </ul> + </div> + + <?=$this->driver->supportsCoinsOpenUrl() ? '<span class="Z3988" title="' . $this->escapeHtmlAttr($this->driver->getCoinsOpenUrl()) . '"></span>' : ''?> + <?php endif; ?> + </div> + </div> + + <?php if ($thumbnail && $thumbnailAlignment == 'right'): ?> + <?=$thumbnail?> + <?php endif; ?> + </div> +</div> +<!-- finc: RecordDriver - DefaultRecord - list-entry - END --> \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/offcanvas-toggler.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/offcanvas-toggler.phtml new file mode 100644 index 0000000000000000000000000000000000000000..a56f446a03445e70a2a4572f0a9a84b3169e4278 --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/offcanvas-toggler.phtml @@ -0,0 +1,7 @@ +<!-- finc: RecordDriver - DefaultRecord - offcanvas-toogler --> +<?php ?> +<span class="offcanvas-toogler"> + <button class="search-filter-toggle btn btn-primary visible-xs" href="#search-sidebar" data-toggle="offcanvas" title="<?=$this->transEsc('sidebar_expand')?>"> + <?=$this->transEsc('offcanvas-toggler-record-view')?> + </button> +</span> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/record-icon-class.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/record-icon-class.phtml new file mode 100644 index 0000000000000000000000000000000000000000..122de489bb7bf3cfc3f78a65a069969c14450dfd --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/record-icon-class.phtml @@ -0,0 +1,23 @@ +<?php +$normalizedValue = preg_replace('/[^a-z0-9]/', '', strtolower($this->value)); + +// Convert normalizedValue to styles +// finc: same list of states for icons like in de_15 #13704 - VE +switch ($normalizedValue) { + case 'marcfincpda': + echo 'fa-home passive'; + break; + case 'object': + echo 'fa-home object'; + break; + case 'localholdings': + echo 'fa-home'; + break; + case 'electronicresources': + echo 'fa-globe'; + break; + default: + echo 'fa-book'; + break; +} +?> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/record-icon-sprite-class.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/record-icon-sprite-class.phtml new file mode 100644 index 0000000000000000000000000000000000000000..118bd36bdfb8b84448a4f98e89813fa6bb9594ab --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/record-icon-sprite-class.phtml @@ -0,0 +1,176 @@ +<?php +$normalizedValue = preg_replace('/[^a-z0-9]/', '', strtolower($this->value)); +// Convert normalizedValue to styles +switch ($normalizedValue) { + + //block book + case 'book': + case 'articles': + echo 'book'; + break; + //block general audio + case 'audio': + case 'musicrecording': + case 'record': + case 'soundrecordingmedium': + case 'electronicsoundrecordingmedium': + case 'soundrecording': + echo 'audio'; + break; + //block tape audio + case 'audiotape': + case 'cassette': + case 'soundcassette': + echo 'audiotape'; + break; + //block braille + case 'braille': + echo 'braille'; + break; + //block digital audio + case 'cd': + case 'dvdaudio': + case 'sounddisc': + echo 'cd'; + break; + //block digital video + case 'dvd': + case 'blueraydisc': + case 'dvdvideo': + case 'videodisc': + echo 'dvd'; + break; + //block ebook + case 'ebook': + echo 'ebook'; + break; + //block digital non-book + case 'electronicnewspaper': + case 'newspaperarticle': + case 'newspaper': + case 'textresource': + echo 'newspaper'; + break; + //block manuscripts + case 'manuscript': + case 'nachlass': + echo 'manuscript'; + break; + //block articles + case 'article': + case 'articlearticle': + case 'electronic': + case 'electronicarticle': + case 'electronicresourcedatacarrier': + case 'electronicresourceremoteaccess': + echo 'electronic'; + break; + //block globe + case 'globe': + echo 'globe'; + break; + //block kit + case 'kit': + echo 'kit'; + break; + //block journal + case 'journal': + case 'journalnewspaper': + case 'serial': + echo 'journal'; + break; + //block ejournal + case 'electronicjournal': + case 'electronicserial': + echo 'electronicjournal'; + break; + //block map + case 'map': + case 'atlas': + echo 'map'; + break; + //block microfilm + case 'microfilm': + case 'microfiche': + case 'microform': + echo 'microfilm'; + break; + //block musical score + case 'musicalscore': + case 'notatedmusic': + case 'electronicmusicalscore': + echo 'musicalscore'; + break; + //block images + case 'photo': + case 'artprint': + case 'collage': + case 'drawing': + case 'flashcard': + case 'painting': + case 'photonegative': + case 'placard': + case 'print': + case 'sensorimage': + case 'transparency': + echo 'image'; + break; + //block physical object + case 'physicalobject': + echo 'physicalobject'; + break; + //block othe rimages + case 'sensorimage': + case 'chart': + echo 'chart'; + break; + //block sets + case 'sets': + echo 'sets'; + break; + //block slide + case 'slide': + echo 'slide'; + break; + //block software + case 'software': + case 'cdrom': + case 'chipcartridge': + case 'disccartridge': + case 'dvdrom': + case 'floppydisk': + case 'tapecartridge': + case 'tapecassette': + case 'tapereel': + echo 'software'; + break; + //block thesis + case 'thesis': + case 'electronicthesis': + echo 'thesis'; + break; + + //block unknown + case 'unknown': + echo 'unknown'; + break; + //block analog video + case 'vhs': + case 'video': + case 'videotape': + case 'videocartridge': + case 'videocassette': + echo 'video'; + break; + //block film + case 'audiovisualmedia': + case 'filmstrip': + case 'motionpicture': + case 'videoreel': + echo 'film'; + break; + //default + default: + echo 'unknown'; + break; +} \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/record-icon-sprite.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/record-icon-sprite.phtml new file mode 100644 index 0000000000000000000000000000000000000000..279b1a67b82f98758a2450897594c432a7d017d8 --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/record-icon-sprite.phtml @@ -0,0 +1,11 @@ +<?php +$formats = []; +foreach ($this->driver->getFormats() as $format) { + $formats[] = $this->record($this->driver)->getRecordIconClass( + $format, 'record-icon-sprite-class' + ); +} +$formats = array_unique($formats); +asort($formats); +?> +<span class="sprite-media-icon <?=array_pop($formats)?>"></span> \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/SolrDefault/record-icon.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/record-icon.phtml similarity index 99% rename from themes/finc/templates/RecordDriver/SolrDefault/record-icon.phtml rename to themes/finc/templates/RecordDriver/DefaultRecord/record-icon.phtml index b6152471e658380b8fa4232dca315c18d665cc40..dd76b4d0b0cbc947e146f4253368536161ca525e 100644 --- a/themes/finc/templates/RecordDriver/SolrDefault/record-icon.phtml +++ b/themes/finc/templates/RecordDriver/DefaultRecord/record-icon.phtml @@ -1,4 +1,4 @@ -<? +<?php /* finc: template is identical with de_15 #13704 - VE */ /*$formats = []; diff --git a/themes/finc/templates/RecordDriver/SolrDefault/result-list.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/result-list.phtml similarity index 53% rename from themes/finc/templates/RecordDriver/SolrDefault/result-list.phtml rename to themes/finc/templates/RecordDriver/DefaultRecord/result-list.phtml index 8182d828c95fda565347ea6f5ff9cf96b3f0afee..eee160743c41d6208d14a8a62ce7440bd7b72e18 100644 --- a/themes/finc/templates/RecordDriver/SolrDefault/result-list.phtml +++ b/themes/finc/templates/RecordDriver/DefaultRecord/result-list.phtml @@ -1,6 +1,6 @@ -<!-- finc: recordDriver - solrDefault - result-list --> -<? /* finc: compare solrAi - result-list with this one during upgrades! - CK */ ?> -<? +<!-- finc: recordDriver - DefaultRecord - result-list --> +<?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; @@ -10,25 +10,25 @@ if ($cover): <div class="media-<?=$thumbnailAlignment?> <?=$this->escapeHtmlAttr($coverDetails['size'])?>"> <?=$cover?> </div> - <? $thumbnail = ob_get_contents(); ?> - <? ob_end_clean(); ?> - <? /* Show finc style-based icons; */ ?> -<? elseif ($this->record($this->driver)->showStyleBasedIcons()): ?> - <? ob_start(); ?> + <?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> - <? $thumbnail = ob_get_contents(); ?> - <? ob_end_clean(); ?> - <? /* Show finc style-based icons - END */ ?> -<? endif; ?> + <?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"> - <? if ($thumbnail && $thumbnailAlignment == 'left'): ?> + <?php if ($thumbnail && $thumbnailAlignment == 'left'): ?> <?=$thumbnail?> - <? endif ?> + <?php endif ?> <div class="media-body"> <div class="result-body"> <div> @@ -38,88 +38,87 @@ if ($cover): </div> <div> - <? if ($this->driver->isCollection()): ?> - <?=implode('<br>', array_map(array($this, 'escapeHtml'), $this->driver->getSummary()));?> - <? else: ?> - <? $summAuthors = $this->driver->getPrimaryAuthorsWithHighlighting(); + <?php if ($this->driver->isCollection()): ?> + <?=implode('<br>', array_map([$this, 'escapeHtml'], $this->driver->getSummary())); ?> + <?php else: ?> + <?php $summAuthors = $this->driver->getPrimaryAuthorsWithHighlighting(); if (!empty($summAuthors)): ?> <?=$this->transEsc('by')?> - <? $authorCount = count($summAuthors); + <?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 ? ',' : ''?> - <? endforeach; ?> - <? endif; ?> - <? /* finc-specific from here, #8639, #7345 - CK */ ?> - <? /* finc-specific: nxt line #8639 - CK */ ?> - <? $journalTitle = $this->driver->getContainerTitle(); + <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 = $this->driver->getPublishDateSort(); ?> - <? if (!empty($journalTitle)): ?> + <?php if (!empty($journalTitle)): ?> <?=!empty($summAuthor) ? '<br />' : ''?> <?=$this->transEsc('Published in')?> - <? $containerSource = $this->driver->getSourceIdentifier(); ?> - <? $containerID = $this->driver->getContainerRecordID(); ?> - <? /* TODO: handle highlighting more elegantly here: */ ?> - <a - href="<?=($containerID ? $this->recordLink()->getUrl("$containerSource|$containerID") : $this->record($this->driver)->getLink('journaltitle', str_replace(array('{{{{START_HILITE}}}}', '{{{{END_HILITE}}}}'), '', $journalTitle)))?>"><?=$this->highlight($journalTitle)?></a> - <? /* finc-specific: nxt line #8639 - CK */ ?> + <?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) . ')' : ''?> - <? elseif (!empty($summDate)): ?> + <?php elseif (!empty($summDate)): ?> <?=!empty($summAuthor) ? '<br />' : ''?> - <? /* finc-specific: nxt line #8639 - CK */ ?> + <?php /* finc-specific: nxt line #8639 - CK */ ?> <?=$this->transEsc('Published') . ' ' . $this->escapeHtml($summDate)?> - <? endif; ?> - <? $summInCollection = $this->driver->getContainingCollections(); + <?php endif; ?> + <?php $summInCollection = $this->driver->getContainingCollections(); if (!empty($summInCollection)): ?> - <? foreach ($summInCollection as $collId => $collText): ?> + <?php foreach ($summInCollection as $collId => $collText): ?> <div> <strong><?=$this->transEsc("in_collection_label")?></strong> - <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> - <? endforeach; ?> - <? endif; ?> - <? endif; ?> + <?php endforeach; ?> + <?php endif; ?> + <?php endif; ?> </div> - <? if (!$this->driver->isCollection()): ?> - <? if ($snippet = $this->driver->getHighlightedSnippet()): ?> - <? if (!empty($snippet['caption'])): ?> + <?php if (!$this->driver->isCollection()): ?> + <?php if ($snippet = $this->driver->getHighlightedSnippet()): ?> + <?php if (!empty($snippet['caption'])): ?> <strong><?=$this->transEsc($snippet['caption'])?>:</strong> - <? endif; ?> - <? if (!empty($snippet['snippet'])): ?> + <?php endif; ?> + <?php if (!empty($snippet['snippet'])): ?> <span class="quotestart">“</span>...<?=$this->highlight($snippet['snippet'])?>...<span class="quoteend">”</span><br/> - <? endif; ?> - <? endif; ?> - <? endif; ?> + <?php endif; ?> + <?php endif; ?> + <?php endif; ?> - <? - /* Display information on duplicate records if available */ + <?php +/* Display information on duplicate records if available */ if ($dedupData = $this->driver->getDedupData()): ?> <div class="dedupInformation"> - <? - $i = 0; + <?php +$i = 0; foreach ($dedupData as $source => $current) { if (++$i == 1) { - ?><span class="currentSource"><a href="<?=$this->recordLink()->getUrl($this->driver)?>"><?=$this->transEsc("source_$source", array(), $source)?></a></span><? + ?><span class="currentSource"><a href="<?=$this->recordLink()->getUrl($this->driver)?>"><?=$this->transEsc("source_$source", [], $source)?></a></span><?php } else { if ($i == 2) { - ?> <span class="otherSources">(<?=$this->transEsc('Other Sources')?>: <? + ?> <span class="otherSources">(<?=$this->transEsc('Other Sources')?>: <?php } else { - ?>, <? + ?>, <?php } - ?><a href="<?=$this->recordLink()->getUrl($current['id'])?>"><?=$this->transEsc("source_$source", array(), $source)?></a><? + ?><a href="<?=$this->recordLink()->getUrl($current['id'])?>"><?=$this->transEsc("source_$source", [], $source)?></a><?php } } if ($i > 1) { - ?>)</span><? + ?>)</span><?php } ?> </div> - <? endif; ?> + <?php endif; ?> <div class="callnumAndLocation ajax-availability hidden"> - <? if ($this->driver->supportsAjaxStatus()): ?> + <?php if ($this->driver->supportsAjaxStatus()): ?> <strong class="hideIfDetailed"><?=$this->transEsc('Call Number')?>:</strong> <span class="callnumber ajax-availability hidden"> <?=$this->transEsc('Loading')?> ...<br/> @@ -129,29 +128,35 @@ if ($cover): <?=$this->transEsc('Loading')?> ... </span> <div class="locationDetails"></div> - <? else: ?> - <? $summCallNo = $this->driver->getCallNumber(); + <?php else: ?> + <?php $summCallNo = $this->driver->getCallNumber(); if (!empty($summCallNo)): ?> <strong><?=$this->transEsc('Call Number')?>:</strong> <?=$this->escapeHtml($summCallNo)?> - <? endif; ?> - <? endif; ?> + <?php endif; ?> + <?php endif; ?> </div> - <? /* We need to find out if we're supposed to display an OpenURL link ($openUrlActive), + <?php /* We need to find out if we're supposed to display an OpenURL link ($openUrlActive), but even if we don't plan to display the link, we still want to get the $openUrl value for use in generating a COinS (Z3988) tag -- see bottom of file. */ $openUrl = $this->openUrl($this->driver, 'results'); $openUrlActive = $openUrl->isActive(); + $doi = $this->doi($this->driver, 'results'); + $doiActive = $doi->isActive(); // Account for replace_other_urls setting $urls = $this->record($this->driver)->getLinkDetails($openUrlActive); - if ($openUrlActive || !empty($urls)): ?> - <? if ($openUrlActive): ?> + if ($openUrlActive || $doiActive || !empty($urls)): ?> + <?php if ($openUrlActive): ?> <br/> <?=$openUrl->renderTemplate()?> - <? endif; ?> - <? if (!is_array($urls)) $urls = array(); + <?php endif; ?> + <?php if ($doiActive): ?> + <br/> + <?=$doi->renderTemplate()?> + <?php endif; ?> + <?php if (!is_array($urls)) $urls = []; if (!$this->driver->isCollection()): foreach ($urls as $current): ?> <a href="<?=$this->escapeHtmlAttr($this->proxyUrl($current['url']))?>" class="fulltext" target="new"> @@ -159,19 +164,19 @@ if ($cover): <?=($current['url'] == $current['desc']) ? $this->transEsc('Get full text') : $this->escapeHtml($current['desc'])?> </a> <br/> - <? endforeach; ?> - <? endif; ?> - <? endif; ?> + <?php endforeach; ?> + <?php endif; ?> + <?php endif; ?> <div class="result-formats"> <?=$this->record($this->driver)->getFormatList()?> - <? /* nxt line finc-specific: #5737 removed '(!$openUrlActive && empty($urls) &&' - CK */ ?> - <? if ($this->driver->supportsAjaxStatus()): ?> + <?php /* nxt line finc-specific: #5737 removed '(!$openUrlActive && empty($urls) &&' - CK */ ?> + <?php if ($this->driver->supportsAjaxStatus()): ?> <span class="status ajax-availability hidden"> <span class="label label-default"><?=$this->transEsc('Loading')?> ...</span> </span> - <? endif; ?> + <?php endif; ?> </div> <div class="result-previews"> @@ -179,11 +184,11 @@ if ($cover): </div> </div> <div class="result-links hidden-print"> - <? /* Display qrcode if appropriate: */ ?> - <? if ($QRCode = $this->record($this->driver)->getQRCode("results")): ?> - <? - // Add JS Variables for QrCode - $this->jsTranslations()->addStrings(array('qrcode_hide' => 'qrcode_hide', 'qrcode_show' => 'qrcode_show')); + <?php /* Display qrcode if appropriate: */ ?> + <?php if ($QRCode = $this->record($this->driver)->getQRCode("results")): ?> + <?php +// Add JS Variables for QrCode + $this->jsTranslations()->addStrings(['qrcode_hide' => 'qrcode_hide', 'qrcode_show' => 'qrcode_show']); ?> <span class="hidden-xs"> <i class="fa fa-fw fa-qrcode" aria-hidden="true"></i> <a href="<?=$this->escapeHtmlAttr($QRCode);?>" class="qrcodeLink"><?=$this->transEsc('qrcode_show')?></a> @@ -194,49 +199,46 @@ if ($cover): </div> <br/> </span> - <? endif; ?> + <?php endif; ?> - <? if ($this->cart()->isActiveInSearch() && $this->params->getOptions()->supportsCart() && $this->cart()->isActive()): ?> + <?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/> - <? endif; ?> + <?php endif; ?> - <? if ($this->userlist()->getMode() !== 'disabled'): ?> - <? if ($this->permission()->allowDisplay('feature.Favorites')): ?> - <? /* 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')?>"> + <?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/> - <? elseif ($block = $this->permission()->getAlternateContent('feature.Favorites')): ?> + <?php elseif ($block = $this->permission()->getAlternateContent('feature.Favorites')): ?> <?=$block?> - <? endif; ?> - <? /* Saved lists */ ?> + <?php endif; ?> + <?php /* Saved lists */ ?> <div class="savedLists alert alert-info hidden"> <strong><?=$this->transEsc("Saved in")?>:</strong> </div> - <? endif; ?> + <?php endif; ?> - <? /* Hierarchy tree link; finc: keep Icon inside link - CK */ ?> - <? $trees = $this->driver->tryMethod('getHierarchyTrees'); + <?php /* Hierarchy tree link; finc: keep Icon inside link - CK */ ?> + <?php $trees = $this->driver->tryMethod('getHierarchyTrees'); if (!empty($trees)): ?> - <? foreach ($trees as $hierarchyID => $hierarchyTitle): ?> + <?php foreach ($trees as $hierarchyID => $hierarchyTitle): ?> <div class="hierarchyTreeLink"> <input type="hidden" value="<?=$this->escapeHtmlAttr($hierarchyID)?>" class="hiddenHierarchyId"/> - <a class="hierarchyTreeLinkText result-link-label" data-lightbox href="<?=$this->recordLink()->getTabUrl($this->driver, 'HierarchyTree')?>?hierarchy=<?=urlencode($hierarchyID)?>#tabnav" - title="<?=$this->transEsc('hierarchy_tree')?>" data-lightbox-href="<?=$this->recordLink()->getTabUrl($this->driver, 'AjaxTab')?>?hierarchy=<?=urlencode($hierarchyID)?>" - data-lightbox-post="tab=hierarchytree"> + <a class="hierarchyTreeLinkText result-link-label" data-lightbox href="<?=$this->recordLink()->getTabUrl($this->driver, 'HierarchyTree')?>?hierarchy=<?=urlencode($hierarchyID)?>#tabnav" title="<?=$this->transEsc('hierarchy_tree')?>" data-lightbox-href="<?=$this->recordLink()->getTabUrl($this->driver, 'AjaxTab')?>?hierarchy=<?=urlencode($hierarchyID)?>" data-lightbox-post="tab=hierarchytree"> <i class="result-link-icon fa fa-fw fa-sitemap" aria-hidden="true"></i> - <span><?=$this->transEsc('hierarchy_view_context')?></span><? if (count($trees) > 1): ?>: <?=$this->escapeHtml($hierarchyTitle)?><? endif; ?> + <span><?=$this->transEsc('hierarchy_view_context')?></span><?php if (count($trees) > 1): ?>: <?=$this->escapeHtml($hierarchyTitle)?><?php endif; ?> </a> </div> - <? endforeach; ?> - <? endif; ?> + <?php endforeach; ?> + <?php endif; ?> <?=$this->driver->supportsCoinsOpenUrl() ? '<span class="Z3988" title="' . $this->escapeHtmlAttr($this->driver->getCoinsOpenUrl()) . '"></span>' : ''?> </div> </div> - <? if ($thumbnail && $thumbnailAlignment == 'right'): ?> + <?php if ($thumbnail && $thumbnailAlignment == 'right'): ?> <?=$thumbnail?> - <? endif ?> + <?php endif ?> </div> -<!-- finc: recordDriver - solrDefault - result-list - END --> +<!-- finc: recordDriver - DefaultRecord - result-list - END --> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/toolbar.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/toolbar.phtml new file mode 100644 index 0000000000000000000000000000000000000000..7b3bf640bf5ac2430f54b08641421735044a958a --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/toolbar.phtml @@ -0,0 +1,69 @@ +<!-- finc: recordDriver - DefaultRecord - toolbar --> +<?php +$addThis = $this->addThis(); +if (!empty($addThis)) { + $this->headScript()->appendFile('https://s7.addthis.com/js/250/addthis_widget.js?pub=' . urlencode($addThis)); +} + +// Set up some variables for convenience: +$cart = $this->cart(); +$cartId = $this->driver->getSourceIdentifier() . '|' . $this->driver->getUniqueId(); +?> + +<?php /* finc: we use nav-stacked for display in sidebar, CK */ ?> +<ul class="record-nav nav nav-pills nav-stacked hidden-print"> + <?php /* finc: we use the sr-only description, CK */ ?> + <li class="sr-only"><?=$this->transEsc('Toolbar')?></li> + <?php if (count($this->driver->getCitationFormats()) > 0): ?> + <li> + <a class="cite-record" data-lightbox href="<?=$this->recordLink()->getActionUrl($this->driver, 'Cite')?>" rel="nofollow"><i class="fa fa-asterisk" aria-hidden="true"></i> <?=$this->transEsc('Cite this')?></a> + </li> + <?php endif; ?> + <?php /* finc: we don't use sms, CK */ + /* + <?php if ($this->accountCapabilities()->getSmsSetting() !== 'disabled'): ?> + <li><a class="sms-record" data-lightbox href="<?=$this->recordLink()->getActionUrl($this->driver, 'SMS')?>" rel="nofollow"><i class="fa fa-mobile" aria-hidden="true"></i> <?=$this->transEsc('Text this')?></a></li> + <?php endif; ?> + */ ?> + <li> + <a class="mail-record" data-lightbox href="<?=$this->recordLink()->getActionUrl($this->driver, 'Email')?>" rel="nofollow"><i class="fa fa-envelope" aria-hidden="true"></i> <?=$this->transEsc('Email this')?></a> + </li> + + <?php $exportFormats = $this->export()->getFormatsForRecord($this->driver); ?> + <?php if (count($exportFormats) > 0): ?> + <li class="dropdown"> + <a class="export-toggle dropdown-toggle" data-toggle="dropdown" href="<?=$this->recordLink()->getActionUrl($this->driver, 'Export')?>" rel="nofollow"><i class="fa fa-list-alt" aria-hidden="true"></i> <?=$this->transEsc('Export Record')?> + </a> + <ul class="dropdown-menu" role="menu"> + <?php foreach ($exportFormats as $exportFormat): ?> + <li> + <a <?php if ($this->export()->needsRedirect($exportFormat)): ?>target="<?=$this->escapeHtmlAttr($exportFormat)?>Main" + <?php endif; ?>href="<?=$this->recordLink()->getActionUrl($this->driver, 'Export')?>?style=<?=$this->escapeHtmlAttr($exportFormat)?>" + rel="nofollow"><?=$this->transEsc('Export to')?><?=$this->transEsc($this->export()->getLabelForFormat($exportFormat))?></a> + </li> + <?php endforeach; ?> + </ul> + </li> + <?php endif; ?> + + <?php if ($this->userlist()->getMode() !== 'disabled'): ?> + <?php /* finc: we use title=... in link below, CK */ ?> + <li> + <?php if ($this->permission()->allowDisplay('feature.Favorites')): ?> + <a class="save-record" data-lightbox href="<?=$this->recordLink()->getActionUrl($this->driver, 'Save')?>" title="<?=$this->transEsc('Add to favorites')?>" rel="nofollow"><i class="fa fa-star" aria-hidden="true"></i> <?=$this->transEsc('Add to favorites')?> + </a> + <?php elseif ($block = $this->permission()->getAlternateContent('feature.Favorites')): ?> + <?=$block?> + <?php endif; ?> + </li> + <?php endif; ?> + <?php if (!empty($addThis)): ?> + <li> + <a class="addThis addthis_button" href="https://www.addthis.com/bookmark.php?v=250&pub=<?=urlencode($addThis)?>"><i class="fa fa-bookmark" aria-hidden="true"></i> <?=$this->transEsc('Bookmark')?></a> + </li> + <?php endif; ?> + <li class="bookbag-menu"> + <?=$this->render('record/cart-buttons.phtml', ['id' => $this->driver->getUniqueId(), 'source' => $this->driver->getSourceIdentifier()]);?> + </li> +</ul> +<!-- finc: recordDriver - DefaultRecord - toolbar - END --> diff --git a/themes/finc/templates/RecordDriver/SolrAI/core.phtml b/themes/finc/templates/RecordDriver/SolrAI/core.phtml index 4aac3ccd4bbfdd8e63f3aa87a5eac8d2f4b5d1ac..e545a6a49cf8716793663f70db97decd77fb5132 100644 --- a/themes/finc/templates/RecordDriver/SolrAI/core.phtml +++ b/themes/finc/templates/RecordDriver/SolrAI/core.phtml @@ -1,85 +1,86 @@ -<!-- finc: recordDriver - solrAI - CORE --> -<? /* Created in 4826, based on SolrDefault - core, compare with SolrDefault - core during updates! */ ?> +<!-- finc: recordDriver - SolrAI - core --> +<?php /* Created in 4826, based on DefaultRecord/core, compare with DefaultRecord/core during updates! */ ?> <div class="media" vocab="http://schema.org/" resource="#record" typeof="<?=$this->driver->getSchemaOrgFormats()?> Product"> - <? + <?php /* finc: use VF5.1 offcanvas toggler here as well if you have a custom sidebar - CK */ ?> + <?=$this->render('RecordDriver/DefaultRecord/offcanvas-toggler'); ?> + <?php $QRCode = $this->record($this->driver)->getQRCode("core"); $coverDetails = $this->record($this->driver)->getCoverDetails('core', 'medium', $this->record($this->driver)->getThumbnail('large')); $cover = $coverDetails['html']; $preview = $this->record($this->driver)->getPreviews(); ?> - <? if ($QRCode || $cover || $preview): ?> + <?php if ($QRCode || $cover || $preview): ?> <div class="media-left <?=$this->escapeHtmlAttr($coverDetails['size'])?> img-col"> - <? /* Display thumbnail if appropriate: */ ?> - <? if($cover): ?> + <?php /* Display thumbnail if appropriate: */ ?> + <?php if($cover): ?> <?=$cover?> - <? /* BOF - finc-specific StyleBasedIcons */ ?> - <? elseif ($this->record($this->driver)->showStyleBasedIcons()): ?> + <?php /* BOF - finc-specific StyleBasedIcons */ ?> + <?php elseif ($this->record($this->driver)->showStyleBasedIcons()): ?> <?=$this->record($this->driver)->getFormatIcon()?> - <? /* EOF - finc-specific StyleBasedIcons */ ?> - <? endif; ?> + <?php /* EOF - finc-specific StyleBasedIcons */ ?> + <?php endif; ?> - <? /* Display qrcode if appropriate: */ ?> - <? if($QRCode): ?> + <?php /* Display qrcode if appropriate: */ ?> + <?php if($QRCode): ?> <span class="hidden-xs"> <br/><img alt="<?=$this->transEsc('QR Code')?>" class="qrcode" src="<?=$this->escapeHtmlAttr($QRCode);?>"/> </span> - <? endif; ?> + <?php endif; ?> - <? // if you have a preview tab but want to move or remove the preview link + <?php // if you have a preview tab but want to move or remove the preview link // from this area of the record view, this can be split into // getPreviewData() (should stay here) and // getPreviewLink() (can go in your desired tab) ?> - <? if ($preview): ?> + <?php if ($preview): ?> <div class="record-previews"> <?=$preview?> </div> - <? endif; ?> + <?php endif; ?> </div> - <? endif; ?> + <?php endif; ?> <div class="media-body"> - <? /* finc: We want to get rid of trailing special chars in the title and limit its length to 100 chars; + <?php /* finc: We want to get rid of trailing special chars in the title and limit its length to 100 chars; remove schema name tag here but keep in description, CK */ ?> - <? /* finc: add schema tags for title #13850 - VE */ ?> + <?php /* finc: add schema tags for title #13850 - VE */ ?> <h3 property="name"><?=$this->escapeHtml(preg_replace('/(\s[\/\.:]\s*)*$/', '', $this->truncate($this->driver->getShortTitle() . ' ' . $this->driver->getSubtitle() . ' ' . $this->driver->getTitleSection(), 100)))?></h3> - <? $summary = $this->driver->getSummary(); $summary = isset($summary[0]) ? $this->escapeHtml($summary[0]) : false; ?> - <? if ($summary): ?> + <?php $summary = $this->driver->getSummary(); $summary = isset($summary[0]) ? $this->escapeHtml($summary[0]) : false; ?> + <?php if ($summary): ?> <p><?=$this->truncate($summary, 300)?></p> - <? if(strlen($summary) > 300): ?> + <?php if(strlen($summary) > 300): ?> <p class="hidden-print"><a href='<?=$this->recordLink()->getTabUrl($this->driver, 'Description')?>#tabnav'><?=$this->transEsc('Full description')?></a></p> - <? endif; ?> - <? endif; ?> + <?php endif; ?> + <?php endif; ?> - <? if ($this->userlist()->getMode() !== 'disabled'): ?> - <? /* Display the lists that this record is saved to */ ?> + <?php if ($this->userlist()->getMode() !== 'disabled'): ?> + <?php /* Display the lists that this record is saved to */ ?> <div class="savedLists hidden alert alert-info"> <strong><?=$this->transEsc("Saved in")?>:</strong> </div> - <? endif; ?> + <?php endif; ?> - <?/* Display Main Details */?> - <? + <?php /* Display Main Details */?> + <?php $formatter = $this->recordDataFormatter(); $coreFields = $formatter->getData($driver, $formatter->getDefaults('core-ai')); ?> - <? if (!empty($coreFields)): ?> + <?php if (!empty($coreFields)): ?> <table class="table table-striped"> - <? /* Table summary not supported in html 5, finc-specific solution, CK */ ?> <caption class="sr-only"><?=$this->transEsc('Bibliographic Details')?></caption> - <? foreach ($coreFields as $current): ?> - <? if ($current['label'] == null): ?> + <?php foreach ($coreFields as $current): ?> + <?php if ($current['label'] == null): ?> <?=$current['value']?> - <? else: ?> + <?php else: ?> <tr><th><?=$this->transEsc($current['label'])?>:</th><td><?=$current['value']?></td></tr> - <? endif; ?> - <? endforeach; ?> + <?php endif; ?> + <?php endforeach; ?> </table> - <? endif; ?> - <?/* End Main Details */?> + <?php endif; ?> + <?php /* End Main Details */?> </div> </div> <!-- recordDriver - solrAI - CORE - END --> diff --git a/themes/finc/templates/RecordDriver/SolrAI/data-containerTitle.phtml b/themes/finc/templates/RecordDriver/SolrAI/data-containerTitle.phtml index 3bb6c33903eac85a0b4a112f4bf292d14b084ffb..f271e5a385495cb2d1c8592155256cb7ae5171b2 100644 --- a/themes/finc/templates/RecordDriver/SolrAI/data-containerTitle.phtml +++ b/themes/finc/templates/RecordDriver/SolrAI/data-containerTitle.phtml @@ -1,30 +1,28 @@ -<!-- finc: RecordDriver - SolrAi - data-containerTitle --> -<? if (!(empty($data))): ?> - <? - $containerSource = $this->driver->tryMethod('getSourceIdentifier'); - $containerID = $this->driver->tryMethod('getContainerRecordID'); +<!-- finc: RecordDriver - SolrAI - data-containerTitle --> +<?php if (!(empty($data))): ?> + <?php + $containerSource = $this->driver->tryMethod('getSourceIdentifier'); + $containerID = $this->driver->tryMethod('getContainerRecordID'); - // finc specific journalLink generation - $issns = $this->driver->tryMethod('getISSNs'); - $journalLink = ''; + // finc specific journalLink generation + $issns = $this->driver->tryMethod('getISSNs'); + $journalLink = ''; - // try container id as link - VuFind native behaviour - if ($containerID) { - $journalLink = $this->recordLink()->getUrl("$containerSource|$containerID"); - } - // try to link via issn - finc adapted behaviour - elseif (!empty($issns)) { - $journalLink = $this->record($this->driver)->getLink('isn', $issns); - } - // default take the journal title as link - VuFind native behaviur - else { - $journalLink = $this->record($this->driver)->getLink('journaltitle', $data); - } - ?> - <a href="<?=$journalLink?>"><?=$this->escapeHtml($data)?></a> - <? $ref = $this->driver->tryMethod('getContainerReference'); ?> - <? if (!empty($ref)): ?> - <?= $this->escapeHtml($ref) ?> - <? endif; ?> -<? endif; ?> -<!-- finc: RecordDriver - SolrAi - data-containerTitle - END --> \ No newline at end of file + // try container id as link - VuFind native behaviour + if ($containerID) { + $journalLink = $this->recordLink()->getUrl("$containerSource|$containerID"); + } // try to link via issn - finc adapted behaviour + elseif (!empty($issns)) { + $journalLink = $this->record($this->driver)->getLink('isn', $issns); + } // default take the journal title as link - VuFind native behaviur + else { + $journalLink = $this->record($this->driver)->getLink('journaltitle', $data); + } + ?> + <a href="<?=$journalLink?>"><?=$this->escapeHtml($data)?></a> + <?php $ref = $this->driver->tryMethod('getContainerReference'); ?> + <?php if (!empty($ref)): ?> + <?=$this->escapeHtml($ref)?> + <?php endif; ?> +<?php endif; ?> +<!-- finc: RecordDriver - SolrAi - data-containerTitle - END --> diff --git a/themes/finc/templates/RecordDriver/SolrAI/data-jTitle.phtml b/themes/finc/templates/RecordDriver/SolrAI/data-jTitle.phtml index f11fe9a36717fc89b40b229d63eb1b5821a5cffd..3d22ec4d5be98a477657be64e84d2a39267f2184 100644 --- a/themes/finc/templates/RecordDriver/SolrAI/data-jTitle.phtml +++ b/themes/finc/templates/RecordDriver/SolrAI/data-jTitle.phtml @@ -1,35 +1,35 @@ -<!-- finc: RecordDriver - SolrAi - data-jTitle --> -<? $jtitle = []; ?> -<? if (!(empty($data))): ?> -<? $issns = $this->driver->tryMethod('getISSNs'); ?> - <? ob_start(); ?> - <? if (!empty($issns)): ?> - <a href="<?=$this->record($this->driver)->getLink('isn', $issns)?>"> - <?=$this->escapeHtml($data)?> - </a> - <? else: ?> - <?=$this->escapeHtml($data)?> - <? endif; ?> - <? - $jtitle[] = trim(preg_replace('/\s+<\//', '</', ob_get_contents())); - ob_end_clean(); - ?> -<? endif; ?> -<? - // please note: direction of iteration will be displayed - $methods = ['getVolume', 'getPublishDateSort', 'getIssues', 'getPages']; - foreach ($methods as $method) { - if (!(empty($retval = $this->driver->tryMethod($method)))) { - $jtitle[] = ($method == 'getPages') - ? $this->transEsc('p.') .' '. $this->escapeHtml($retval) - : $this->escapeHtml($retval); - } - } +<!-- finc: RecordDriver - SolrAI - data-jTitle --> +<?php $jtitle = []; ?> +<?php if (!(empty($data))): ?> + <?php $issns = $this->driver->tryMethod('getISSNs'); ?> + <?php ob_start(); ?> + <?php if (!empty($issns)): ?> + <a href="<?=$this->record($this->driver)->getLink('isn', $issns)?>"> + <?=$this->escapeHtml($data)?> + </a> + <?php else: ?> + <?=$this->escapeHtml($data)?> + <?php endif; ?> + <?php + $jtitle[] = trim(preg_replace('/\s+<\//', '</', ob_get_contents())); + ob_end_clean(); + ?> +<?php endif; ?> +<?php +// please note: direction of iteration will be displayed +$methods = ['getVolume', 'getPublishDateSort', 'getIssues', 'getPages']; +foreach ($methods as $method) { + if (!(empty($retval = $this->driver->tryMethod($method)))) { + $jtitle[] = ($method == 'getPages') + ? $this->transEsc('p.') . ' ' . $this->escapeHtml($retval) + : $this->escapeHtml($retval); + } +} ?> -<? /* finc: add schema tags for parent publication #13850 - VE */ ?> +<?php /* finc: add schema tags for parent publication #13850 - VE */ ?> <span property="isPartOf" typeof="Periodical" resource="#periodical"> <span property="name"> <?=implode(', ', $jtitle)?> </span> </span> -<!-- finc: RecordDriver - SolrAi - data-jTitle - END --> \ No newline at end of file +<!-- finc: RecordDriver - SolrAi - data-jTitle - END --> diff --git a/themes/finc/templates/RecordDriver/SolrAI/link-isn.phtml b/themes/finc/templates/RecordDriver/SolrAI/link-isn.phtml index 9bf46207e3b2169520908194d7c32f9341041c8f..77bed61f58f3b6a7a2cfc3113ec6a2fbb194be64 100644 --- a/themes/finc/templates/RecordDriver/SolrAI/link-isn.phtml +++ b/themes/finc/templates/RecordDriver/SolrAI/link-isn.phtml @@ -1,14 +1,14 @@ -<? - /* use advanced search if we have multiple issns */ - if (is_array($this->lookfor) && count($this->lookfor) > 1) { - $query = '?join=AND&bool0[]=OR'; - foreach ($this->lookfor as $issn) { - $query .= '&lookfor0[]=' . urlencode($issn) . '&type0[]=ISN'; - } - } elseif (count($this->lookfor) == 1) { - $query = '?lookfor=%22' . urlencode($this->lookfor[0]) . '%22&type=ISN'; - } else { - $query = '?lookfor=%22' . urlencode($this->lookfor) . '%22&type=ISN'; +<?php +/* use advanced search if we have multiple issns */ +if (is_array($this->lookfor) && count($this->lookfor) > 1) { + $query = '?join=AND&bool0[]=OR'; + foreach ($this->lookfor as $issn) { + $query .= '&lookfor0[]=' . urlencode($issn) . '&type0[]=ISN'; } +} elseif (count($this->lookfor) == 1) { + $query = '?lookfor=%22' . urlencode($this->lookfor[0]) . '%22&type=ISN'; +} else { + $query = '?lookfor=%22' . urlencode($this->lookfor) . '%22&type=ISN'; +} ?> <?=$this->url('search-results') . $query?> diff --git a/themes/finc/templates/RecordDriver/SolrAI/result-list.phtml b/themes/finc/templates/RecordDriver/SolrAI/result-list.phtml index 284352c9705174d63f7904fa98009ab38422b962..29d6247448ab5853ccc82ef11c49f8e271a2a680 100644 --- a/themes/finc/templates/RecordDriver/SolrAI/result-list.phtml +++ b/themes/finc/templates/RecordDriver/SolrAI/result-list.phtml @@ -1,6 +1,5 @@ -<!-- finc: recordDriver - solrAI - result-list --> -<? /* compare with solrDefault - result-list during upgrades! - CK */ ?> -<? +<!-- finc: recordDriver - SolrAI - result-list --> +<?php /* compare with DefaultRecord/result-list during upgrades! - CK */ $coverDetails = $this->record($this->driver)->getCoverDetails('result-list', 'medium', $this->recordLink()->getUrl($this->driver)); $cover = $coverDetails['html']; $thumbnail = false; @@ -10,198 +9,204 @@ if ($cover): <div class="media-<?=$thumbnailAlignment?> <?=$this->escapeHtmlAttr($coverDetails['size'])?>"> <?=$cover?> </div> - <? $thumbnail = ob_get_contents(); ?> - <? ob_end_clean(); ?> - <? /* Show finc style-based icons; */ ?> -<? elseif ($this->record($this->driver)->showStyleBasedIcons()): ?> - <? ob_start(); ?> + <?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> - <? $thumbnail = ob_get_contents(); ?> - <? ob_end_clean(); ?> - <? /* Show finc style-based icons - END */ ?> -<? endif; ?> + <?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"> - <? if ($thumbnail && $thumbnailAlignment == 'left'): ?> + <?php if ($thumbnail && $thumbnailAlignment == 'left'): ?> <?=$thumbnail?> - <? endif ?> + <?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> - <? if ($this->driver->isCollection()): ?> - <?=implode('<br>', array_map(array($this, 'escapeHtml'), $this->driver->getSummary()));?> - <? else: ?> - <? $summAuthors = $this->driver->getPrimaryAuthorsWithHighlighting(); - if (!empty($summAuthors)): ?> - <?=$this->transEsc('by')?> - <? $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 ? ',' : ''?> - <? endforeach; ?> - <? endif; ?> - <? /* finc-specific from here - 04.16 - CK */ ?> - <? $journalTitle = $this->driver->getContainerTitle(); - $summDate = $this->driver->getPublishDateSort(); ?> - <? if (!empty($journalTitle)): ?> - <?=!empty($summAuthor) ? '<br />' : ''?> - <?=$this->transEsc('Published in')?> - <? $containerSource = $this->driver->getSourceIdentifier(); - $containerID = $this->driver->getContainerRecordID(); - // finc-specific journalLink generation - $journalLink = ''; - $issns = $this->driver->getISSNs(); + <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 if ($this->driver->isCollection()): ?> + <?=implode('<br>', array_map([$this, 'escapeHtml'], $this->driver->getSummary())); ?> + <?php else: ?> + <?php $summAuthors = $this->driver->getPrimaryAuthorsWithHighlighting(); + 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 - 04.16 - CK */ ?> + <?php $journalTitle = $this->driver->getContainerTitle(); + $summDate = $this->driver->getPublishDateSort(); ?> + <?php if (!empty($journalTitle)): ?> + <?=!empty($summAuthor) ? '<br />' : ''?> + <?=$this->transEsc('Published in')?> + <?php $containerSource = $this->driver->getSourceIdentifier(); + $containerID = $this->driver->getContainerRecordID(); + // finc-specific journalLink generation + $journalLink = ''; + $issns = $this->driver->getISSNs(); - // first try to link to container id (VuFind stock-behaviour) - if ($containerID) { - $journalLink = $this->recordLink()->getUrl("$containerSource|$containerID"); - } // second try to search issn (finc specific) - elseif (!empty($issns)) { - $journalLink = $this->record($this->driver)->getLink('isn', $issns); - } // third search for journal title (VuFind stock-behaviour) - else { - $journalLink = $this->record($this->driver)->getLink('journaltitle', str_replace(array('{{{{START_HILITE}}}}', '{{{{END_HILITE}}}}'), '', $journalTitle)); - } - ?> - <? /* TODO: handle highlighting more elegantly here: */ ?> - <a href="<?=$journalLink?>"><?=$this->highlight($journalTitle)?></a> - <? /* finc-specific -END - 04.16 - CK */ ?> - <?=!empty($summDate) ? ' (' . $this->escapeHtml($summDate) . ')' : ''?> - <? elseif (!empty($summDate)): ?> - <?=!empty($summAuthor) ? '<br />' : ''?> - <? /* finc-specific: nxt line #8639 - CK */ ?> - <?=$this->transEsc('Published') . ' ' . $this->escapeHtml($summDate)?> - <? endif; ?> - <? $summInCollection = $this->driver->getContainingCollections(); - if (!empty($summInCollection)): ?> - <? foreach ($summInCollection as $collId => $collText): ?> - <div> - <strong><?=$this->transEsc("in_collection_label")?></strong> - <a class="collectionLinkText" href="<?=$this->url('collection', array('id' => $collId))?>?recordID=<?=urlencode($this->driver->getUniqueID())?>"> - <?=$this->escapeHtml($collText)?> - </a> - </div> - <? endforeach; ?> - <? endif; ?> - <? endif; ?> - </div> + // first try to link to container id (VuFind stock-behaviour) + if ($containerID) { + $journalLink = $this->recordLink()->getUrl("$containerSource|$containerID"); + } // second try to search issn (finc specific) + elseif (!empty($issns)) { + $journalLink = $this->record($this->driver)->getLink('isn', $issns); + } // third search for journal title (VuFind stock-behaviour) + else { + $journalLink = $this->record($this->driver)->getLink('journaltitle', str_replace(array('{{{{START_HILITE}}}}', '{{{{END_HILITE}}}}'), '', $journalTitle)); + } + ?> + <?php /* TODO: handle highlighting more elegantly here: */ ?> + <a href="<?=$journalLink?>"><?=$this->highlight($journalTitle)?></a> + <?php /* finc-specific -END - 04.16 - 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; ?> + <?php endif; ?> + </div> - <? if (!$this->driver->isCollection()): ?> - <? if ($snippet = $this->driver->getHighlightedSnippet()): ?> - <? if (!empty($snippet['caption'])): ?> - <strong><?=$this->transEsc($snippet['caption'])?>:</strong> '; - <? endif; ?> - <? if (!empty($snippet['snippet'])): ?> - <span class="quotestart">“</span>...<?=$this->highlight($snippet['snippet'])?>...<span class="quoteend">”</span><br/> - <? endif; ?> - <? endif; ?> - <? endif; ?> + <?php if (!$this->driver->isCollection()): ?> + <?php if ($snippet = $this->driver->getHighlightedSnippet()): ?> + <?php if (!empty($snippet['caption'])): ?> + <strong><?=$this->transEsc($snippet['caption'])?>:</strong> '; + <?php endif; ?> + <?php if (!empty($snippet['snippet'])): ?> + <span class="quotestart">“</span>...<?=$this->highlight($snippet['snippet'])?>...<span class="quoteend">”</span><br/> + <?php endif; ?> + <?php endif; ?> + <?php endif; ?> - <? - /* Display information on duplicate records if available */ - if ($dedupData = $this->driver->getDedupData()): ?> - <div class="dedupInformation"> - <? - $i = 0; - foreach ($dedupData as $source => $current) { - if (++$i == 1) { - ?><span class="currentSource"><a href="<?=$this->recordLink()->getUrl($this->driver)?>"><?=$this->transEsc("source_$source", array(), $source)?></a></span><? + <?php + /* Display information on duplicate records if available */ + if ($dedupData = $this->driver->getDedupData()): ?> + <div class="dedupInformation"> + <?php + $i = 0; + foreach ($dedupData as $source => $current) { + if (++$i == 1) { + ?><span class="currentSource"><a href="<?=$this->recordLink()->getUrl($this->driver)?>"><?=$this->transEsc("source_$source", [], $source)?></a></span><?php + } else { + if ($i == 2) { + ?> <span class="otherSources">(<?=$this->transEsc('Other Sources')?>: <?php } else { - if ($i == 2) { - ?> <span class="otherSources">(<?=$this->transEsc('Other Sources')?>: <? - } else { - ?>, <? - } - ?><a href="<?=$this->recordLink()->getUrl($current['id'])?>"><?=$this->transEsc("source_$source", array(), $source)?></a><? - } - } - if ($i > 1) { - ?>)</span><? - } ?> - </div> - <? endif; ?> + ?>, <?php + } + ?><a href="<?=$this->recordLink()->getUrl($current['id'])?>"><?=$this->transEsc("source_$source", [], $source)?></a><?php + } + } + if ($i > 1) { + ?>)</span><?php + } ?> + </div> + <?php endif; ?> - <div class="callnumAndLocation ajax-availability hidden"> - <? if ($this->driver->supportsAjaxStatus()): ?> - <strong class="hideIfDetailed"><?=$this->transEsc('Call Number')?>:</strong> - <span class="callnumber ajax-availability hidden"> + <div class="callnumAndLocation ajax-availability hidden"> + <?php if ($this->driver->supportsAjaxStatus()): ?> + <strong class="hideIfDetailed"><?=$this->transEsc('Call Number')?>:</strong> + <span class="callnumber ajax-availability hidden"> <?=$this->transEsc('Loading')?> ...<br/> </span> - <strong><?=$this->transEsc('Located')?>:</strong> - <span class="location ajax-availability hidden"> + <strong><?=$this->transEsc('Located')?>:</strong> + <span class="location ajax-availability hidden"> <?=$this->transEsc('Loading')?> ... </span> - <div class="locationDetails"></div> - <? else: ?> - <? $summCallNo = $this->driver->getCallNumber(); - if (!empty($summCallNo)): ?> - <strong><?=$this->transEsc('Call Number')?>:</strong> <?=$this->escapeHtml($summCallNo)?> - <? endif; ?> - <? endif; ?> - </div> + <div class="locationDetails"></div> + <?php else: ?> + <?php $summCallNo = $this->driver->getCallNumber(); + if (!empty($summCallNo)): ?> + <strong><?=$this->transEsc('Call Number')?>:</strong> <?=$this->escapeHtml($summCallNo)?> + <?php endif; ?> + <?php endif; ?> + </div> - <? /* We need to find out if we're supposed to display an OpenURL link ($openUrlActive), + <?php /* We need to find out if we're supposed to display an OpenURL link ($openUrlActive), but even if we don't plan to display the link, we still want to get the $openUrl value for use in generating a COinS (Z3988) tag -- see bottom of file. */ - $openUrl = $this->openUrl($this->driver, 'results'); - $openUrlActive = $openUrl->isActive(); - // Account for replace_other_urls setting - $urls = $this->record($this->driver)->getLinkDetails($openUrlActive); + $openUrl = $this->openUrl($this->driver, 'results'); + $openUrlActive = $openUrl->isActive(); + $doi = $this->doi($this->driver, 'results'); + $doiActive = $doi->isActive(); + // Account for replace_other_urls setting + $urls = $this->record($this->driver)->getLinkDetails($openUrlActive); - if ($openUrlActive || !empty($urls)): ?> - <? if ($openUrlActive): ?> + if ($openUrlActive || $doiActive || !empty($urls)): ?> + <?php if ($openUrlActive): ?> + <br/> + <?=$openUrl->renderTemplate()?> + <?php endif; ?> + <?php if ($doiActive): ?> + <br/> + <?=$doi->renderTemplate()?> + <?php endif; ?> + <?php if (!is_array($urls)) $urls = []; + if (!$this->driver->isCollection()): + foreach ($urls as $current): ?> + <a href="<?=$this->escapeHtmlAttr($this->proxyUrl($current['url']))?>" class="fulltext" target="new"> + <i class="fa fa-external-link" aria-hidden="true"></i> + <?=($current['url'] == $current['desc']) ? $this->transEsc('Get full text') : $this->escapeHtml($current['desc'])?> + </a> <br/> - <?=$openUrl->renderTemplate()?> - <? endif; ?> - <? if (!is_array($urls)) $urls = array(); - if (!$this->driver->isCollection()): - foreach ($urls as $current): ?> - <a href="<?=$this->escapeHtmlAttr($this->proxyUrl($current['url']))?>" class="fulltext" target="new"> - <i class="fa fa-external-link" aria-hidden="true"></i> - <?=($current['url'] == $current['desc']) ? $this->transEsc('Get full text') : $this->escapeHtml($current['desc'])?> - </a> - <br/> - <? endforeach; ?> - <? endif; ?> - <? endif; ?> + <?php endforeach; ?> + <?php endif; ?> + <?php endif; ?> <div class="result-formats"> <?=$this->record($this->driver)->getFormatList()?> - <? /* WISO Label - finc-specific - CK */ ?> - <? $sourceID = $this->driver->getSourceID(); ?> + <?php /* WISO Label - finc-specific - CK */ ?> + <?php $sourceID = $this->driver->getSourceID(); ?> <span class="branding label SID<?=($sourceID)?>" title="<?=$this->transEsc("SID$sourceID")?>"></span> - <? /* WISO Label - END */ ?> + <?php /* WISO Label - END */ ?> - <? /* nxt line finc-specific: #5737 removed '(!$openUrlActive && empty($urls) &&' - CK */ ?> - <? if ($this->driver->supportsAjaxStatus()): ?> + <?php /* nxt line finc-specific: #5737 removed '(!$openUrlActive && empty($urls) &&' - CK */ ?> + <?php if ($this->driver->supportsAjaxStatus()): ?> <span class="status ajax-availability hidden"> <span class="label label-default"><?=$this->transEsc('Loading')?> ...</span> </span> - <? endif; ?> + <?php endif; ?> </div> <div class="result-previews"> <?=$this->record($this->driver)->getPreviews()?> </div> </div> - <div class="result-links hidden-print"> - <? /* Display qrcode if appropriate: */ ?> - <? if ($QRCode = $this->record($this->driver)->getQRCode("results")): ?> - <? - // Add JS Variables for QrCode - $this->jsTranslations()->addStrings(array('qrcode_hide' => 'qrcode_hide', 'qrcode_show' => 'qrcode_show')); - ?> - <span class="hidden-xs"> + <div class="result-links hidden-print"> + <?php /* Display qrcode if appropriate: */ ?> + <?php if ($QRCode = $this->record($this->driver)->getQRCode("results")): ?> + <?php +// Add JS Variables for QrCode + $this->jsTranslations()->addStrings(['qrcode_hide' => 'qrcode_hide', 'qrcode_show' => 'qrcode_show']); + ?> + <span class="hidden-xs"> <i class="fa fa-fw fa-qrcode" aria-hidden="true"></i> <a href="<?=$this->escapeHtmlAttr($QRCode);?>" class="qrcodeLink"><?=$this->transEsc('qrcode_show')?></a> <div class="qrcode hidden"> <script type="text/template" class="qrCodeImgTag"> @@ -210,45 +215,46 @@ if ($cover): </div> <br/> </span> - <? endif; ?> + <?php endif; ?> - <? 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/> - <? endif; ?> + <?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; ?> - <? if ($this->userlist()->getMode() !== 'disabled'): ?> - <?/* if ($this->permission()->allowDisplay('feature.Favorites')): */?> - <? /* 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="result-link-icon fa fa-fw fa-star" aria-hidden="true"></i> <?=$this->transEsc('Add to favorites')?> - </a><br/> - <? elseif ($block = $this->permission()->getAlternateContent('feature.Favorites')): ?> - <?=$block?> - <? endif; ?> - <? /* Saved lists */ ?> - <div class="savedLists alert alert-info hidden"> - <strong><?=$this->transEsc("Saved in")?>:</strong> - </div> - <? /* 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="result-link-icon fa fa-fw fa-star" aria-hidden="true"></i> <?=$this->transEsc('Add to favorites')?> + </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; */ ?> - <? /* Hierarchy tree link; finc: keep Icon inside link - CK */ ?> - <? $trees = $this->driver->tryMethod('getHierarchyTrees'); - if (!empty($trees)): ?> - <? foreach ($trees as $hierarchyID => $hierarchyTitle): ?> - <div class="hierarchyTreeLink"> - <input type="hidden" value="<?=$this->escapeHtmlAttr($hierarchyID)?>" class="hiddenHierarchyId"/> - <a class="hierarchyTreeLinkText result-link-label" data-lightbox href="<?=$this->recordLink()->getTabUrl($this->driver, 'HierarchyTree')?>?hierarchy=<?=urlencode($hierarchyID)?>#tabnav" title="<?=$this->transEsc('hierarchy_tree')?>" data-lightbox-href="<?=$this->recordLink()->getTabUrl($this->driver, 'AjaxTab')?>?hierarchy=<?=urlencode($hierarchyID)?>" data-lightbox-post="tab=hierarchytree"> - <i class="result-link-icon fa fa-fw fa-sitemap" aria-hidden="true"></i> <span class="hidden-xs hidden-sm"><?=$this->transEsc('hierarchy_view_context')?></span><? if (count($trees) > 1): ?>: <?=$this->escapeHtml($hierarchyTitle)?><? endif; ?> - </a> - </div> - <? endforeach; ?> - <? endif; ?> + <?php /* Hierarchy tree link; finc: keep Icon inside link - CK */ ?> + <?php $trees = $this->driver->tryMethod('getHierarchyTrees'); + if (!empty($trees)): ?> + <?php foreach ($trees as $hierarchyID => $hierarchyTitle): ?> + <div class="hierarchyTreeLink"> + <input type="hidden" value="<?=$this->escapeHtmlAttr($hierarchyID)?>" class="hiddenHierarchyId"/> + <a class="hierarchyTreeLinkText result-link-label" data-lightbox href="<?=$this->recordLink()->getTabUrl($this->driver, 'HierarchyTree')?>?hierarchy=<?=urlencode($hierarchyID)?>#tabnav" title="<?=$this->transEsc('hierarchy_tree')?>" data-lightbox-href="<?=$this->recordLink()->getTabUrl($this->driver, 'AjaxTab')?>?hierarchy=<?=urlencode($hierarchyID)?>" data-lightbox-post="tab=hierarchytree"> + <i class="result-link-icon fa fa-fw fa-sitemap" aria-hidden="true"></i> <span class="hidden-xs hidden-sm"><?=$this->transEsc('hierarchy_view_context')?></span><?php if (count($trees) > 1): ?>: <?=$this->escapeHtml($hierarchyTitle)?><?php endif; ?> + </a> + </div> + <?php endforeach; ?> + <?php endif; ?> - <?=$this->driver->supportsCoinsOpenUrl() ? '<span class="Z3988" title="' . $this->escapeHtmlAttr($this->driver->getCoinsOpenUrl()) . '"></span>' : ''?> - </div> + <?=$this->driver->supportsCoinsOpenUrl() ? '<span class="Z3988" title="' . $this->escapeHtmlAttr($this->driver->getCoinsOpenUrl()) . '"></span>' : ''?> </div> - <? if ($thumbnail && $thumbnailAlignment == 'right'): ?> + </div> + <?php if ($thumbnail && $thumbnailAlignment == 'right'): ?> <?=$thumbnail?> - <? endif ?> + <?php endif ?> </div> -<!-- finc: recordDriver - solrAI - result-list - END --> +<!-- finc: recordDriver - SolrAI - result-list - END --> diff --git a/themes/finc/templates/RecordDriver/SolrDefault/collection-info.phtml b/themes/finc/templates/RecordDriver/SolrDefault/collection-info.phtml deleted file mode 100644 index ac949052fe5dbdfc14eedf4d47677a84b18c204d..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/collection-info.phtml +++ /dev/null @@ -1,67 +0,0 @@ -<!-- finc: recordDriver - solrDefault - collection-info --> -<? $this->headScript()->appendFile('collection_record.js'); ?> -<div class="media"> - <? $QRCode = $this->record($this->driver)->getQRCode("core"); - $coverDetails = $this->record($this->driver)->getCoverDetails('collection-info', 'medium', $this->record($this->driver)->getThumbnail('large')); - $cover = $coverDetails['html']; - $preview = $this->record($this->driver)->getPreviews(); ?> - <? if ($QRCode || $cover || $preview): ?> - <div class="media-left <?=$this->escapeHtmlAttr($coverDetails['size'])?>"> - <? /* Display thumbnail if appropriate: */ ?> - <? if($cover): ?> - <?=$cover?> - <? endif; ?> - - <? /* Display qrcode if appropriate: */ ?> - <? if($QRCode): ?> - <span class="hidden-xs"> - <br/><img alt="<?=$this->transEsc('QR Code')?>" class="qrcode" src="<?=$this->escapeHtmlAttr($QRCode);?>"/> - </span> - <? endif; ?> - - <? if ($preview): ?><?=$preview?><? endif; ?> - </div> - <? endif; ?> - <div class="media-body"> - - <? /* finc: we want to get rid of trailing special chars in the title and limit its length to 100 chars */ ?> - <h2><?=$this->escapeHtml(preg_replace('/(\s[\/\.:]\s*)*$/', '', $this->truncate($this->driver->getShortTitle() . ' ' . $this->driver->getSubtitle() . ' ' . $this->driver->getTitleSection(), 100)))?></h2> - - <? $summary = $this->driver->getSummary(); $summary = isset($summary[0]) ? $summary[0] : false; ?> - <? if ($summary): ?> - <p><?=$this->escapeHtml($summary)?></p> - <? endif; ?> - - <? /* Display the lists that this record is saved to */ ?> - <div class="savedLists hidden alert alert-info" id="savedLists"> - <strong><?=$this->transEsc("Saved in")?>:</strong> - </div> - - <? /* finc-specific snippet - Begin - CK */ ?> - <? /* Do not set to 'hidden', make table below collapse in; adapt collection_record.js to keep accordion open - CK */ ?> - <a id="moreInfoToggle" href="#" class="accordion-toggler collapsed hidden" data-toggle="collapse" data-target="#collectionInfo" aria-expanded="true"> - <?=$this->transEsc('Description')?> - </a> - <?/* Display Main Details */?> - <? - $formatter = $this->recordDataFormatter(); - $fields = $formatter->getData($driver, $formatter->getDefaults('collection-info')); - ?> - <? if (!empty($fields)): ?> - <?/* finc: we use 'collapse in' to initially hide the content, CK */?> - <table id="collectionInfo" class="table table-striped collapse in"> - <? /* Table summary not supported in html 5, finc-specific solution, CK */ ?> - <caption class="sr-only"><?=$this->transEsc('Bibliographic Details')?></caption> - <? foreach ($fields as $key => $current): ?> - <? if ($key == null): ?> - <?=$current['value']?> - <? else: ?> - <tr><th><?=$this->transEsc($key)?>:</th><td><?=$current['value']?></td></tr> - <? endif; ?> - <? endforeach; ?> - </table> - <? endif; ?> - <?/* End Main Details */?> - </div> -</div> -<!-- finc: recordDriver - solrDefault - collection-info - END --> diff --git a/themes/finc/templates/RecordDriver/SolrDefault/collection-record.phtml b/themes/finc/templates/RecordDriver/SolrDefault/collection-record.phtml deleted file mode 100644 index e15e4cd91790919e4088b1aaca4008f6fdc3ec1f..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/collection-record.phtml +++ /dev/null @@ -1,24 +0,0 @@ -<!-- finc: recordDriver - solrDefault - collection-record --> -<h2> - <?=$this->escapeHtml($this->driver->getShortTitle() . ' ' . $this->driver->getSubtitle() . ' ' . $this->driver->getTitleSection())?> -</h2> -<a href="<?=$this->recordLink()->getUrl($this->driver)?>"><?=$this->transEsc('View Full ' . ($this->driver->isCollection() ? 'Collection' : 'Record'))?></a> - -<? -$formatter = $this->recordDataFormatter(); -$fields = $formatter->getData($driver, $formatter->getDefaults('collection-record')); -?> -<? if (!empty($fields)): ?> -<table class="table table-striped"> - <? /* Table summary not supported in html 5, finc-specific solution, CK */ ?> - <caption class="sr-only"><?=$this->transEsc('Bibliographic Details')?></caption> - <? foreach ($fields as $key => $current): ?> - <? if ($key == null): ?> - <?=$current['value']?> - <? else: ?> - <tr><th><?=$this->transEsc($key)?>:</th><td><?=$current['value']?></td></tr> - <? endif; ?> - <? endforeach; ?> -</table> -<? endif; ?> -<!-- finc: recordDriver - solrDefault - collection-record - END --> diff --git a/themes/finc/templates/RecordDriver/SolrDefault/core.phtml b/themes/finc/templates/RecordDriver/SolrDefault/core.phtml deleted file mode 100644 index ffbad0efec016fe21a2898fca09807e1f5576437..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/core.phtml +++ /dev/null @@ -1,80 +0,0 @@ -<!-- finc: RecordDriver - solrDefault - core --> -<div class="media" vocab="http://schema.org/" resource="#record" typeof="<?=$this->driver->getSchemaOrgFormats()?> Product"> - <? - $QRCode = $this->record($this->driver)->getQRCode("core"); - $coverDetails = $this->record($this->driver)->getCoverDetails('core', 'medium', $this->record($this->driver)->getThumbnail('large')); - $cover = $coverDetails['html']; - $preview = $this->record($this->driver)->getPreviews(); - ?> - <? if ($QRCode || $cover || $preview): ?> - <div class="media-left <?=$this->escapeHtmlAttr($coverDetails['size'])?> img-col"> - <? /* Display thumbnail if appropriate: */ ?> - <? if($cover): ?> - <?=$cover?> - <? /* BOF - finc-specific StyleBasedIcons */ ?> - <? elseif ($this->record($this->driver)->showStyleBasedIcons()): ?> - <?=$this->record($this->driver)->getFormatIcon()?> - <? /* EOF - finc-specific StyleBasedIcons */ ?> - <? endif; ?> - - <? /* Display qrcode if appropriate: */ ?> - <? if($QRCode): ?> - <span class="hidden-xs"> - <br/><img alt="<?=$this->transEsc('QR Code')?>" class="qrcode" src="<?=$this->escapeHtmlAttr($QRCode);?>"/> - </span> - <? endif; ?> - - <? // if you have a preview tab but want to move or remove the preview link - // from this area of the record view, this can be split into - // getPreviewData() (should stay here) and - // getPreviewLink() (can go in your desired tab) ?> - <? if ($preview): ?> - <div class="record-previews"> - <?=$preview?> - </div> - <? endif; ?> - </div> - <? endif; ?> - <div class="media-body"> - - <? /* finc: We want to get rid of trailing special chars in the title and limit its length to 100 chars - remove schema name tag here but keept in description, CK - */ - ?> - <? /* finc: add schema tags for title #13850 - VE */ ?> - <h3 property="name"><?=$this->escapeHtml(preg_replace('/(\s[\/\.:]\s*)*$/', '', $this->truncate($this->driver->getShortTitle() . ' ' . $this->driver->getSubtitle() . ' ' . $this->driver->getTitleSection(), 100)))?></h3> - - <? $summary = $this->driver->getSummary(); $summary = isset($summary[0]) ? $this->escapeHtml($summary[0]) : false; ?> - <? if ($summary): ?> - <p><?=$this->truncate($summary, 300)?></p> - - <? if(strlen($summary) > 300): ?> - <p class="hidden-print"><a href='<?=$this->recordLink()->getTabUrl($this->driver, 'Description')?>#tabnav'><?=$this->transEsc('Full description')?></a></p> - <? endif; ?> - <? endif; ?> - - <? if ($this->userlist()->getMode() !== 'disabled'): ?> - <? /* Display the lists that this record is saved to */ ?> - <div class="savedLists hidden alert alert-info"> - <strong><?=$this->transEsc("Saved in")?>:</strong> - </div> - <? endif; ?> - - <?/* Display Main Details */?> - <? - $formatter = $this->recordDataFormatter(); - $coreFields = $formatter->getData($driver, $formatter->getDefaults('core')); - ?> - <? if (!empty($coreFields)): ?> - <table class="table table-striped"> - <? /* Table summary not supported in html 5, finc-specific solution, CK */ ?> - <caption class="sr-only"><?=$this->transEsc('Bibliographic Details')?></caption> - <? foreach ($coreFields as $current): ?> - <tr><th><?=$this->transEsc($current['label'])?>:</th><td><?=$current['value']?></td></tr> - <? endforeach; ?> - </table> - <? endif; ?> - <?/* End Main Details */?> - </div> -</div> -<!-- finc: RecordDriver - solrDefault - core - END --> diff --git a/themes/finc/templates/RecordDriver/SolrDefault/data-additionals.phtml b/themes/finc/templates/RecordDriver/SolrDefault/data-additionals.phtml deleted file mode 100644 index 1e9a782ea13583e9be935c8b2cb3dc47a8628e07..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/data-additionals.phtml +++ /dev/null @@ -1,20 +0,0 @@ -<!-- finc: RecordDriver - solrDefault - data-additionals --> -<? if (!empty($data) && is_array($data)): ?> - <? foreach($data as $additional) :?> - <? if (isset($additional['identifier'])): ?> - <tr> - <th> - <?=$this->transEsc($additional['identifier'])?>: - </th> - <td> - <? if(isset($additional['id'])): ?> - <a href="<?=$this->recordLink()->getUrl($additional['id'])?>"><?=$this->escapeHtml($additional['text'])?></a> - <? else: ?> - <?=$this->escapeHtml($additional['text'])?> - <? endif; ?> - </td> - </tr> - <? endif; ?> - <? endforeach; ?> -<? endif; ?> -<!-- finc: RecordDriver - solrDefault - data-additionals - END --> diff --git a/themes/finc/templates/RecordDriver/SolrDefault/data-authors.phtml b/themes/finc/templates/RecordDriver/SolrDefault/data-authors.phtml deleted file mode 100644 index 31cad9b7eaa5e00ad87de2501f81a1fa630f7576..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/data-authors.phtml +++ /dev/null @@ -1,57 +0,0 @@ -<!-- finc: RecordDriver - solrDefault - data-authors --> -<? -$formatProperty = function ($datafield, $name, $label) { -if (count($datafield) == 0) { -return ''; -} -$that = $this; -$translate = function ($str) use ($that, $label) { -return $that->transEsc($label . $str); -}; -return '<span class="author-property-' . $name . '">(' . implode(', ', array_unique(array_map($translate, $datafield))) . ')</span>'; -}; -$formattedAuthors = []; -$types = [ - 'main' => 'author', - 'secondary' => 'contributor', - 'corporate' => 'creator', - 'corporate_secondary' => 'contributor' -]; -?> -<? foreach ($types as $type => $schemaLabel): ?> - <? if (!empty($data[$type])): ?> - <? foreach ($data[$type] as $author => $roles): ?> - <? ob_start(); ?> - <span class="author-data" property="<?=$this->escapeHtml($schemaLabel)?>" typeof="Person"> - <span property="name"> - <a href="<?=$this->record($this->driver)->getLink('author', $author)?>"> - <?=$this->escapeHtml($author)?> - </a> - </span> - <? - // Display additional data using the appropriate translation prefix - // (for example, to render author roles correctly): - if (!empty($requiredDataFields)) { - foreach ($requiredDataFields as $field) { - $name = $field['name']; - $prefix = isset($field['prefix']) ? $field['prefix'] : ''; - // deprecated due to more flexible solution at core - // to-do: revision of indexing and finc specific treatment - // of roles in RecordDriver - if (count($roles) > 0 && $name == 'role') { - echo $formatProperty($roles, $name, $prefix); - } - } - } - ?> - </span> - <? - // Strip whitespace before close tags to avoid spaces in front of commas: - $formattedAuthors[] = trim(preg_replace('/\s+<\//', '</', ob_get_contents())); - ob_end_clean(); - ?> - <? endforeach; ?> - <? endif; ?> -<? endforeach; ?> -<?=implode(', ', $formattedAuthors)?> -<!-- finc: RecordDriver - solrDefault - data-authors - END --> diff --git a/themes/finc/templates/RecordDriver/SolrDefault/data-dissertationNote.phtml b/themes/finc/templates/RecordDriver/SolrDefault/data-dissertationNote.phtml deleted file mode 100644 index 36fb26b93a4e6abb67305980e8c58727617deb6a..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/data-dissertationNote.phtml +++ /dev/null @@ -1,7 +0,0 @@ -<? if (!empty($data)): ?> - <? if (isset($data['g'])) { - $dissertationMisc = $data['g']; - unset($data['g']); - } ?> - <?=implode(', ', array_map([$this, 'escapeHtml'], $data)); ?><? if (isset($dissertationMisc)): ?> (<?=$dissertationMisc?>)<? endif;?> -<? endif; ?> \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/SolrDefault/data-escapeHtml.phtml b/themes/finc/templates/RecordDriver/SolrDefault/data-escapeHtml.phtml deleted file mode 100644 index a92016aee7c71419e36da3aa492d3e9a1c94177b..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/data-escapeHtml.phtml +++ /dev/null @@ -1,8 +0,0 @@ -<? // Don't add START and END comments ?> -<?if (!empty($data)): ?> - <? if (is_array($data)): ?> - <?= implode('<br/>', array_map(array($this, 'escapeHtml'), $data)) ?> - <? else: ?> - <?= $this->escapeHtml($data) ?> - <? endif; ?> -<? endif; ?> \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/SolrDefault/data-escapeHtmlCommaSep.phtml b/themes/finc/templates/RecordDriver/SolrDefault/data-escapeHtmlCommaSep.phtml deleted file mode 100644 index 5015acbff85c15eebc2f578b7ca77ae4c0c28a3b..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/data-escapeHtmlCommaSep.phtml +++ /dev/null @@ -1,9 +0,0 @@ -<!-- finc: RecordDriver - solrDefault - data-escapeHtmlCommaSep --> -<? if (!empty($data)): ?> - <? if (is_array($data)): ?> - <?=implode(', ', array_map(array($this, 'escapeHtml'), $data)); ?> - <? else: ?> - <?= $this->escapeHtml($data) ?> - <? endif; ?> -<? endif; ?> -<!-- finc: RecordDriver - solrDefault - data-escapeHtmlCommaSep - END --> \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/SolrDefault/data-hierarchyParentTitle.phtml b/themes/finc/templates/RecordDriver/SolrDefault/data-hierarchyParentTitle.phtml deleted file mode 100644 index d4da82d34b8ff8eb2d47f23987ae46224ba0395a..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/data-hierarchyParentTitle.phtml +++ /dev/null @@ -1,13 +0,0 @@ -<!-- finc: RecordDriver - solrDefault - data-hierarchyParentTitle --> -<? if (!empty($data)): ?> - <? $hierarchyParentId = $this->driver->tryMethod('getHierarchyParentID'); ?> - <? foreach ($data as $key => $title): ?> - <? if(isset($hierarchyParentId[$key])): ?> - <a href="<?=$this->recordLink()->getUrl($hierarchyParentId[$key]); ?>"><?=$this->escapeHtml($title)?></a> - <? else: ?> - <?=$this->escapeHtml($title)?> - <? endif; ?> - <br/> - <? endforeach; ?> -<? endif; ?> -<!-- finc: RecordDriver - solrDefault - data-hierarchyParentTitle - END --> diff --git a/themes/finc/templates/RecordDriver/SolrDefault/data-isbn.phtml b/themes/finc/templates/RecordDriver/SolrDefault/data-isbn.phtml deleted file mode 100644 index ea31c702f8fa2433a122d82d56ad7dbab05914c7..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/data-isbn.phtml +++ /dev/null @@ -1,11 +0,0 @@ -<!-- finc: RecordDriver - SolrDefault - data-isbn --> -<? if (!empty($data)): ?> -<? if (is_array($data)): ?> - <span property="isbn"> - <?=implode('<br/>', array_map(array($this, 'escapeHtml'), $data))?> - </span> -<? else: ?> -<?=$this->escapeHtml($data)?> -<? endif; ?> -<? endif; ?> -<!-- finc: RecordDriver - SolrDefault - data-isbn - END --> diff --git a/themes/finc/templates/RecordDriver/SolrDefault/data-issn.phtml b/themes/finc/templates/RecordDriver/SolrDefault/data-issn.phtml deleted file mode 100644 index 9c83fd7b91e51f936f89a0f608e3a10ac880b231..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/data-issn.phtml +++ /dev/null @@ -1,11 +0,0 @@ -<!-- finc: RecordDriver - SolrDefault - data-issn --> -<? if (!empty($data)): ?> -<? if (is_array($data)): ?> - <span property="issn"> - <?=implode('<br/>', array_map(array($this, 'escapeHtml'), $data))?> - </span> -<? else: ?> -<?=$this->escapeHtml($data)?> -<? endif; ?> -<? endif; ?> -<!-- finc: RecordDriver - SolrDefault - data-issn - END --> diff --git a/themes/finc/templates/RecordDriver/SolrDefault/data-link.phtml b/themes/finc/templates/RecordDriver/SolrDefault/data-link.phtml deleted file mode 100644 index 707c5ad5556ef67263fa015ec53e44e4fb5cb3d7..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/data-link.phtml +++ /dev/null @@ -1,7 +0,0 @@ -<!-- finc: RecordDriver - solrDefault - data-link --> -<? if (is_array($data)): ?> - <a href="<?=$data['url']?>"><?=$data['text']?></a> -<? else: ?> - <a href="<?=$data?>"><?=$data?></a> -<? endif; ?> -<!-- finc: RecordDriver - solrDefault - data-link - END --> diff --git a/themes/finc/templates/RecordDriver/SolrDefault/data-localSignature.phtml b/themes/finc/templates/RecordDriver/SolrDefault/data-localSignature.phtml deleted file mode 100644 index aecdb6d3c11bc3ef11908a62ac9dc43b30bf1950..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/data-localSignature.phtml +++ /dev/null @@ -1,11 +0,0 @@ -<!-- finc: RecordDriver - solrDefault - data-localSignature --> -<? if (!empty($data)): ?> - <? foreach ($data as $field): ?> - <? if (!empty($field)): ?> - <? foreach ($field as $subfield): ?> - <?=trim($this->escapeHtml($subfield))?> - <? endforeach; ?> - <? endif; ?> - <? endforeach; ?> -<? endif; ?> -<!-- finc: RecordDriver - solrDefault - data-localSignature - END --> diff --git a/themes/finc/templates/RecordDriver/SolrDefault/data-otherRelationshipEntry.phtml b/themes/finc/templates/RecordDriver/SolrDefault/data-otherRelationshipEntry.phtml deleted file mode 100644 index d9a9c6f7714e1f6c69fb91b0229746af23fe1985..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/data-otherRelationshipEntry.phtml +++ /dev/null @@ -1,19 +0,0 @@ -<!-- finc: RecordDriver - solrDefault - data-otherRelationshipEntry --> -<? if (!empty($data)): ?> - <? foreach ($data as $subject => $values): ?> - <tr> - <th><?=$this->transEsc($subject)?>: </th> - <td> - <? foreach ($values as $value): ?> - <? if (!empty($value['link']) && $recordLink = $this->RecordLink()->getRecordLink($value['link'], 'record_id')): ?> - <a href="<?=$recordLink?>"><?=$this->escapeHtml($value['text'])?></a> - <? else: ?> - <?=$this->escapeHtml($value['text'])?> - <? endif; ?> - <br/> - <? endforeach; ?> - </td> - </tr> - <? endforeach; ?> -<? endif; ?> -<!-- finc: RecordDriver - solrDefault - data-otherRelationshipEntry - END --> diff --git a/themes/finc/templates/RecordDriver/SolrDefault/data-publicationDetails.phtml b/themes/finc/templates/RecordDriver/SolrDefault/data-publicationDetails.phtml deleted file mode 100644 index 6943a188bdd8d99daa61fd418ac41f499589bfb2..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/data-publicationDetails.phtml +++ /dev/null @@ -1,27 +0,0 @@ -<!-- finc: RecordDriver - solrDefault - data-publicationDetails --> -<? if (!empty($data)): ?> -<div itemscope itemtype="http://schema.org/publisher"> - <? foreach ($data as $field): ?> - <span property="publisher" typeof="Organization"> - <? $pubPlace = $field->getPlace(); if (!empty($pubPlace)): ?> - <span property="location" typeof="Place"> - <span property="name"><?=$this->escapeHtml($pubPlace)?></span> - </span> - <? endif; ?> - <? $pubName = $field->getName(); if (!empty($pubName)): ?> - <span property="name"><?=$this->escapeHtml($pubName)?></span> - <? endif; ?> - </span> - <span property="datePublished"> - <? /* do not show solr publish date #13993 - GG */ ?> - <? /*$pubDateSort = $this->driver->tryMethod('getPublishDateSort');*/ ?> - <? $pubDate = $field->getDate(); if (!empty($pubDate)): ?> - <?=$this->escapeHtml($pubDate)?> - <? /*else: ?> - <?=$this->escapeHtml($pubDateSort)*/?></span> - <? endif; ?> - </span><br/> - <? endforeach; ?> -</div> -<? endif ?> -<!-- finc: RecordDriver - solrDefault - data-publicationDetails - END --> diff --git a/themes/finc/templates/RecordDriver/SolrDefault/data-titleDetails.phtml b/themes/finc/templates/RecordDriver/SolrDefault/data-titleDetails.phtml deleted file mode 100644 index fc6b44e32028396be96662c9529079bff87adae0..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/data-titleDetails.phtml +++ /dev/null @@ -1,14 +0,0 @@ -<!-- finc: RecordDriver - solrDefault - data-titleDetails --> -<? if (!empty($data)): ?> - <? $i = 0; foreach ($data as $title): ?> - <?=($i > 0 ? '<br />':'')?><?=$this->escapeHtml($title)?><? $i++ ;?> - <? endforeach; ?> -<? else: ?> - <?=$this->escapeHtml( - $this->driver->getShortTitle() . ' ' - . $this->driver->getSubtitle() . ' ' - . $this->driver->getTitleSection()) - . ($this->driver->getTitleStatement() ? ' / ' . $this->driver->getTitleStatement() : '')?><br /><?=($this->driver->tryMethod('getTitleOrig') && $this->driver->getTitleOrig() != '' ? $this->escapeHtml($this->driver->getTitleOrig()) : '') - ?> -<? endif; ?> -<!-- finc: RecordDriver - solrDefault - data-titleDetails - END --> diff --git a/themes/finc/templates/RecordDriver/SolrDefault/data-titleUniform.phtml b/themes/finc/templates/RecordDriver/SolrDefault/data-titleUniform.phtml deleted file mode 100644 index 24d30005581c88024d0cc7a39a4471bd36005e22..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/data-titleUniform.phtml +++ /dev/null @@ -1,18 +0,0 @@ -<!-- finc: RecordDriver - solrDefault - data-titleUniform --> -<? if (!empty($data)): ?> - <tr> - <th> - <?=$this->driver->isRDA() - ? $this->transEsc('rda_original_title') - : $this->transEsc('non_rda_original_title')?>: - </th> - <td property="title"> - <?if (is_array($data)): ?> - <a href="<?=$this->record($this->driver)->getLink('title', $data['title'])?>"><?=$this->escapeHtml($data['title'])?></a><? if (isset($data['lang'])): ?> ⟨<?=$this->escapeHtml($data['lang'])?>⟩<? endif;?> - <? else: ?> - <a href="<?=$this->record($this->driver)->getLink('title', $data)?>"><?=$this->escapeHtml($data)?></a> - <? endif; ?> - </td> - </tr> -<? endif; ?> -<!-- finc: RecordDriver - solrDefault - data-titleUniform - END --> diff --git a/themes/finc/templates/RecordDriver/SolrDefault/data-transEsc.phtml b/themes/finc/templates/RecordDriver/SolrDefault/data-transEsc.phtml deleted file mode 100644 index e0a5c810ff41c3f28729c09cbfef268301b3fe29..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/data-transEsc.phtml +++ /dev/null @@ -1,8 +0,0 @@ -<? // Don't add START and END comments ?> -<?if (!empty($data)): ?> - <? if(is_array($data)): ?> - <?= implode('<br/>', array_map(array($this, 'transEsc'), $data)) ?> - <? else: ?> - <?=$this->transEsc($data)?> - <? endif; ?> -<? endif; ?> \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/SolrDefault/data-transEscCommaSep.phtml b/themes/finc/templates/RecordDriver/SolrDefault/data-transEscCommaSep.phtml deleted file mode 100644 index 4e9dd72fe3e55b0268f899157a2029951783ad54..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/data-transEscCommaSep.phtml +++ /dev/null @@ -1,7 +0,0 @@ -<?if (!empty($data)): ?> - <? if(is_array($data)): ?> - <?=implode(', ', array_map(array($this, 'transEsc'), $data)); ?> - <? else: ?> - <?= $this->transEsc($data) ?> - <? endif; ?> -<? endif; ?> \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/SolrDefault/data-transEscCommaSepLang.phtml b/themes/finc/templates/RecordDriver/SolrDefault/data-transEscCommaSepLang.phtml deleted file mode 100644 index ce46d2e8a4622ac10b090048ef33d59bb688a68a..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/data-transEscCommaSepLang.phtml +++ /dev/null @@ -1,12 +0,0 @@ -<!-- finc: RecordDriver - solrDefault - data-transEscCommaSepLang --> -<?if (!empty($data)): ?> - <? if(is_array($data)): ?> - <? /* finc: add schema tags for language #13850 - VE */ ?> - <span property="inLanguage"> - <?=implode('</span>, <span property="inLanguage">', array_map(array($this, 'transEsc'), $data)); ?> - </span> - <? else: ?> - <?= $this->transEsc($data) ?> - <? endif; ?> -<? endif; ?> -<!-- finc: RecordDriver - solrDefault - data-transEscCommaSepLang - END --> diff --git a/themes/finc/templates/RecordDriver/SolrDefault/format-list.phtml b/themes/finc/templates/RecordDriver/SolrDefault/format-list.phtml deleted file mode 100644 index 7dde4a7dca4750e745e38889cfc165610004893b..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/format-list.phtml +++ /dev/null @@ -1,22 +0,0 @@ -<? $formats = $this->driver->getFormats(); - $translated_formats = []; - foreach ($formats as $format): ?> - <? $translated_formats[] = $translated_format = $this->transEsc($format); ?> - <span class="format <?=$this->record($this->driver)->getFormatClass($format) ?>"><?=$translated_format ?></span> -<? endforeach; ?> -<? /* New genre string to display nxt to format in RESULT LIST and RECORD/Detail View, #11703, limit to SID 0 CK */ ?> -<? /* Removes (uncommented) new genre string to display with k10plus index in RESULT LIST and RECORD/Detail View, #14912 FM */ ?> -<? /* $sourceID = $this->driver->tryMethod('getSourceID'); ?> -<? if ($sourceID == "0"): ?> -<? $genres = $this->driver->tryMethod('getGenreFacet');?> -<? if (!empty($genres)): ?> - <? foreach($genres as $genre): ?> - <? $translated_genre = $this->transEsc($genre); - //deduplicate output - if (!in_array($translated_genre,$translated_formats)): - ?> - <span class="format"><?=$translated_genre?></span> - <? endif; ?> - <?endforeach;?> -<?endif;?> -<? endif; */ ?> \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/SolrDefault/list-entry.phtml b/themes/finc/templates/RecordDriver/SolrDefault/list-entry.phtml deleted file mode 100644 index a0a9d82f06ca58c66d78326b7637929a920a1355..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/list-entry.phtml +++ /dev/null @@ -1,204 +0,0 @@ -<!-- finc: RecordDriver - SolrDefault - mylist --> -<? - // Set up some convenience variables: - $id = $this->driver->getUniqueId(); - $source = $this->driver->getSourceIdentifier(); - if (isset($this->list) && is_object($this->list)) { - $list_id = $this->list->id; - $user_id = $this->list->user_id; - } else { - $list_id = null; - $user_id = $this->user ? $this->user->id : null; - } - // finc: next line finc-specific; required to display public favorites lists, #12052, see also below - CK - $isEditable = $this->user && $this->user->id === $user_id; - // Thumbnail - $coverDetails = $this->record($this->driver)->getCoverDetails('list-entry', 'medium', $this->recordLink()->getUrl($this->driver)); - $cover = $coverDetails['html']; - $thumbnail = false; - $thumbnailAlignment = $this->record($this->driver)->getThumbnailAlignment('list'); - if ($cover): - ob_start(); ?> - <div class="media-<?=$thumbnailAlignment ?> <?=$this->escapeHtmlAttr($coverDetails['size'])?>"> - <?=$cover ?> - </div> - <? $thumbnail = ob_get_contents(); ?> - <? ob_end_clean(); ?> -<? endif; ?> -<div class="result<? if($this->driver->supportsAjaxStatus()): ?> ajaxItem<? endif ?>"> - <input type="hidden" value="<?=$this->escapeHtmlAttr($id) ?>" class="hiddenId"/> - <input type="hidden" value="<?=$this->escapeHtmlAttr($source) ?>" class="hiddenSource"/> - <?=$this->record($this->driver)->getCheckbox()?> - <div class="media"> - <? if ($thumbnail && $thumbnailAlignment == 'left'): ?> - <?=$thumbnail ?> - <? endif; ?> - <div class="media-body"> - <div class="result-body"> - <div class="resultItemLine1"> - <? $missing = $this->driver instanceof \VuFind\RecordDriver\Missing; ?> - <? if (!$missing): ?><a href="<?=$this->recordLink()->getUrl($this->driver)?>" class="getFull" data-view="<?=$this->params->getOptions()->getListViewOption() ?>"><? endif; ?> - <span class="title"><?=$this->record($this->driver)->getTitleHtml()?></span> - <? if (!$missing): ?></a><? endif; ?> - </div> - - <div class="resultItemLine2"> - <? if($this->driver->isCollection()): ?> - <?=implode('<br>', array_map(array($this, 'escapeHtml'), $this->driver->getSummary())); ?> - <? else: ?> - <? $summAuthors = $this->driver->getPrimaryAuthors(); if (!empty($summAuthors)): ?> - <?=$this->transEsc('by')?> - <? $authorCount = count($summAuthors); foreach ($summAuthors as $i => $summAuthor): ?> - <a href="<?=$this->record($this->driver)->getLink('author', $summAuthor)?>"><?=$this->escapeHtml($summAuthor)?></a><?=($i + 1 < $authorCount ? ';' : '') ?> - <? endforeach; ?> - <? endif; ?> - - <? $journalTitle = $this->driver->getContainerTitle(); $summDate = $this->driver->getPublicationDates(); ?> - <? 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>';?> - <?=!empty($summDate) ? ' (' . $this->escapeHtml($summDate[0]) . ')' : ''?> - <? elseif (!empty($summDate)): ?> - <?=!empty($summAuthor) ? '<br/>' : ''?> - <?=$this->transEsc('Published') . ' ' . $this->escapeHtml($summDate[0])?> - <? endif; ?> - <? $summInCollection = $this->driver->getContainingCollections(); if (false && !empty($summInCollection)): ?> - <? 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())?>"> - <?=$this->escapeHtml($collText)?> - </a> - </div> - <? endforeach; ?> - <? endif; ?> - <? endif; ?> - </div> - - <div class="last"> - <? if(!$this->driver->isCollection()) { - if ($snippet = $this->driver->getHighlightedSnippet()) { - if (!empty($snippet['caption'])) { - echo '<strong>' . $this->transEsc($snippet['caption']) . ':</strong> '; - } - if (!empty($snippet['snippet'])) { - echo '<span class="quotestart">“</span>...' . $this->highlight($snippet['snippet']) . '...<span class="quoteend">”</span><br/>'; - } - } - } ?> - - <? $listTags = ($this->usertags()->getMode() !== 'disabled') ? $this->driver->getTags( - null === $list_id ? true : $list_id, // get tags for all lists if no single list is selected - $user_id, 'tag' - ) : array(); - ?> - <? if (count($listTags) > 0): ?> - <strong><?=$this->transEsc('Your Tags')?>:</strong> - <? foreach ($listTags as $tag): ?> - <a href="<?=$this->currentPath() . $results->getUrlQuery()->addFacet('tags', $tag->tag)?>"><?=$this->escapeHtml($tag->tag)?></a> - <? endforeach; ?> - <br/> - <? endif; ?> - <? $listNotes = $this->driver->getListNotes($list_id, $user_id); ?> - <? if (count($listNotes) > 0): ?> - <strong><?=$this->transEsc('Notes')?>:</strong> - <? if (count($listNotes) > 1): ?><br/><? endif; ?> - <? foreach ($listNotes as $note): ?> - <?=$this->escapeHtml($note)?><br/> - <? endforeach; ?> - <? endif; ?> - - <? if (count($this->lists) > 0): ?> - <strong><?=$this->transEsc('Saved in')?>:</strong> - <? $i=0;foreach($this->lists as $current): ?> - <a href="<?=$this->url('userList', array('id' => $current->id))?>"><?=$this->escapeHtml($current->title)?></a><? if($i++ < count($this->lists)-1): ?>,<? endif; ?> - <? endforeach; ?> - <br/> - <? endif; ?> - - <div class="callnumAndLocation ajax-availability hidden"> - <? if ($this->driver->supportsAjaxStatus()): ?> - <strong class="hideIfDetailed"><?=$this->transEsc('Call Number')?>:</strong> - <span class="callnumber ajax-availability hidden"> - <?=$this->transEsc('Loading')?>...<br/> - </span> - <strong><?=$this->transEsc('Located')?>:</strong> - <span class="location ajax-availability hidden"> - <?=$this->transEsc('Loading')?>... - </span> - <div class="locationDetails"></div> - <? else: ?> - <? $summCallNo = $this->driver->getCallNumber(); if (!empty($summCallNo)): ?> - <strong><?=$this->transEsc('Call Number')?>:</strong> <?=$this->escapeHtml($summCallNo)?> - <? endif; ?> - <? endif; ?> - </div> - - <? /* We need to find out if we're supposed to display an OpenURL link ($openUrlActive), - but even if we don't plan to display the link, we still want to get the $openUrl - value for use in generating a COinS (Z3988) tag -- see bottom of file. - */ - $openUrl = $this->openUrl($this->driver, 'results'); - $openUrlActive = $openUrl->isActive(); - // Account for replace_other_urls setting - $urls = $this->record($this->driver)->getLinkDetails($openUrlActive); - - if ($openUrlActive || !empty($urls)): - ?> - <? if ($openUrlActive): ?> - <br/> - <?=$openUrl->renderTemplate()?> - <? endif;?> - - <? if (!is_array($urls)) { $urls = array(); } - if(!$this->driver->isCollection()): - foreach ($urls as $current): ?> - <a href="<?=$this->escapeHtmlAttr($this->proxyUrl($current['url']))?>" class="fulltext" target="new"><i class="fa fa-external-link" aria-hidden="true"></i> <?=($current['url'] == $current['desc']) ? $this->transEsc('Get full text') : $this->escapeHtml($current['desc'])?></a> - <? endforeach; ?> - <? endif; ?> - <? endif; ?> - <br/> - - <?=$this->record($this->driver)->getFormatList() ?> - - <? if (!$openUrlActive && empty($urls) && $this->driver->supportsAjaxStatus()): ?> - <span class="status ajax-availability hidden"><?=$this->transEsc('Loading')?>...</span> - <br/><br/> - <? endif; ?> - <?=$this->record($this->driver)->getPreviews()?> - </div> - </div> - - <div class="result-links hidden-print"> - <? /* finc: next line finc-specific; required to display public favorites lists, #12052, see also above - CK */ ?> - <? if ($isEditable): ?> - <i class="fa fa-fw fa-edit" aria-hidden="true"></i> <a href="<?=$this->url('myresearch-edit')?>?id=<?=urlencode($id)?>&source=<?=urlencode($source)?><? if (!is_null($list_id)):?>&list_id=<?=urlencode($list_id)?><? endif; ?>" class="edit tool"><?=$this->transEsc('Edit')?></a><br/> - <? /* Use a different delete URL if we're removing from a specific list or the overall favorites: */ - $deleteUrl = null === $list_id - ? $this->url('myresearch-favorites') - : $this->url('userList', array('id' => $list_id)); - $deleteUrlGet = $deleteUrl . '?delete=' . urlencode($id) . '&source=' . urlencode($source); - - $dLabel = 'delete-label-' . preg_replace('[\W]','-',$id); - ?> - <div class="dropdown"> - <i class="fa fa-fw fa-trash-o" aria-hidden="true"></i> <a class="dropdown-toggle" id="<?=$dLabel ?>" role="button" data-toggle="dropdown" href="<?=$deleteUrlGet ?>"> - <?=$this->transEsc('Delete') ?> - </a> - <ul class="dropdown-menu" role="menu" aria-labelledby="<?=$dLabel ?>"> - <li><a onClick="$.post('<?=$deleteUrl?>', {'delete':'<?=$this->escapeJs($id) ?>','source':'<?=$this->escapeJs($source) ?>','confirm':true},function(){location.reload(true)})" title="<?=$this->transEsc('confirm_delete_brief')?>"><?=$this->transEsc('confirm_dialog_yes')?></a></li> - <li><a><?=$this->transEsc('confirm_dialog_no')?></a></li> - </ul> - </div> - - <?=$this->driver->supportsCoinsOpenUrl()?'<span class="Z3988" title="'.$this->escapeHtmlAttr($this->driver->getCoinsOpenUrl()).'"></span>':''?> - <? endif; ?> - </div> - </div> - - <? if ($thumbnail && $thumbnailAlignment == 'right'): ?> - <?=$thumbnail ?> - <? endif; ?> - </div> -</div> -<!-- finc: RecordDriver - SolrDefault - mylist - END --> \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/SolrDefault/record-icon-class.phtml b/themes/finc/templates/RecordDriver/SolrDefault/record-icon-class.phtml deleted file mode 100644 index da29dd33594a563f87e436951b89301ec996e68b..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/record-icon-class.phtml +++ /dev/null @@ -1,23 +0,0 @@ -<? -$normalizedValue = preg_replace('/[^a-z0-9]/', '', strtolower($this->value)); - -// Convert normalizedValue to styles -// finc: same list of states for icons like in de_15 #13704 - VE -switch ($normalizedValue) { - case 'marcfincpda': - echo 'fa-home passive'; - break; - case 'object': - echo 'fa-home object'; - break; - case 'localholdings': - echo 'fa-home'; - break; - case 'electronicresources': - echo 'fa-globe'; - break; - default: - echo 'fa-book'; - break; -} -?> diff --git a/themes/finc/templates/RecordDriver/SolrDefault/record-icon-sprite-class.phtml b/themes/finc/templates/RecordDriver/SolrDefault/record-icon-sprite-class.phtml deleted file mode 100644 index c6ddbd281c929a9613d51bd9a39b64409a194587..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/record-icon-sprite-class.phtml +++ /dev/null @@ -1,176 +0,0 @@ -<? -$normalizedValue = preg_replace('/[^a-z0-9]/', '', strtolower($this->value)); -// Convert normalizedValue to styles -switch ($normalizedValue) { - - //block book - case 'book': - case 'articles': - echo 'book'; - break; - //block general audio - case 'audio': - case 'musicrecording': - case 'record': - case 'soundrecordingmedium': - case 'electronicsoundrecordingmedium': - case 'soundrecording': - echo 'audio'; - break; - //block tape audio - case 'audiotape': - case 'cassette': - case 'soundcassette': - echo 'audiotape'; - break; - //block braille - case 'braille': - echo 'braille'; - break; - //block digital audio - case 'cd': - case 'dvdaudio': - case 'sounddisc': - echo 'cd'; - break; - //block digital video - case 'dvd': - case 'blueraydisc': - case 'dvdvideo': - case 'videodisc': - echo 'dvd'; - break; - //block ebook - case 'ebook': - echo 'ebook'; - break; - //block digital non-book - case 'electronicnewspaper': - case 'newspaperarticle': - case 'newspaper': - case 'textresource': - echo 'newspaper'; - break; - //block manuscripts - case 'manuscript': - case 'nachlass': - echo 'manuscript'; - break; - //block articles - case 'article': - case 'articlearticle': - case 'electronic': - case 'electronicarticle': - case 'electronicresourcedatacarrier': - case 'electronicresourceremoteaccess': - echo 'electronic'; - break; - //block globe - case 'globe': - echo 'globe'; - break; - //block kit - case 'kit': - echo 'kit'; - break; - //block journal - case 'journal': - case 'journalnewspaper': - case 'serial': - echo 'journal'; - break; - //block ejournal - case 'electronicjournal': - case 'electronicserial': - echo 'electronicjournal'; - break; - //block map - case 'map': - case 'atlas': - echo 'map'; - break; - //block microfilm - case 'microfilm': - case 'microfiche': - case 'microform': - echo 'microfilm'; - break; - //block musical score - case 'musicalscore': - case 'notatedmusic': - case 'electronicmusicalscore': - echo 'musicalscore'; - break; - //block images - case 'photo': - case 'artprint': - case 'collage': - case 'drawing': - case 'flashcard': - case 'painting': - case 'photonegative': - case 'placard': - case 'print': - case 'sensorimage': - case 'transparency': - echo 'image'; - break; - //block physical object - case 'physicalobject': - echo 'physicalobject'; - break; - //block othe rimages - case 'sensorimage': - case 'chart': - echo 'chart'; - break; - //block sets - case 'sets': - echo 'sets'; - break; - //block slide - case 'slide': - echo 'slide'; - break; - //block software - case 'software': - case 'cdrom': - case 'chipcartridge': - case 'disccartridge': - case 'dvdrom': - case 'floppydisk': - case 'tapecartridge': - case 'tapecassette': - case 'tapereel': - echo 'software'; - break; - //block thesis - case 'thesis': - case 'electronicthesis': - echo 'thesis'; - break; - - //block unknown - case 'unknown': - echo 'unknown'; - break; - //block analog video - case 'vhs': - case 'video': - case 'videotape': - case 'videocartridge': - case 'videocassette': - echo 'video'; - break; - //block film - case 'audiovisualmedia': - case 'filmstrip': - case 'motionpicture': - case 'videoreel': - echo 'film'; - break; - //default - default: - echo 'unknown'; - break; -} \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/SolrDefault/record-icon-sprite.phtml b/themes/finc/templates/RecordDriver/SolrDefault/record-icon-sprite.phtml deleted file mode 100644 index d50cbfc5586e22b2c1f5d3f0d613235bcf0254c5..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/record-icon-sprite.phtml +++ /dev/null @@ -1,11 +0,0 @@ -<? -$formats = []; -foreach ($this->driver->getFormats() as $format) { - $formats[] = $this->record($this->driver)->getRecordIconClass( - $format, 'record-icon-sprite-class' - ); -} -$formats = array_unique($formats); -asort($formats); -?> -<span class="sprite-media-icon <?= array_pop($formats) ?>"></span> \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/SolrDefault/toolbar.phtml b/themes/finc/templates/RecordDriver/SolrDefault/toolbar.phtml deleted file mode 100644 index 2b7c8f1383429432f4e52feafe485d62c3f84ce2..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/SolrDefault/toolbar.phtml +++ /dev/null @@ -1,69 +0,0 @@ -<!-- finc: recordDriver - solrDefault - toolbar --> -<? - $addThis = $this->addThis(); - if (!empty($addThis)) { - $this->headScript()->appendFile('https://s7.addthis.com/js/250/addthis_widget.js?pub=' . urlencode($addThis)); - } - -// Set up some variables for convenience: -$cart = $this->cart(); -$cartId = $this->driver->getSourceIdentifier() . '|' . $this->driver->getUniqueId(); -?> - -<? /* finc: we use nav-stacked to display in sidebar, CK */ ?> -<ul class="record-nav nav nav-pills nav-stacked hidden-print"> - <? /* finc: we use the sr-only description, CK */ ?> - <li class="sr-only"><?=$this->transEsc('Toolbar')?></li> - <? if (count($this->driver->getCitationFormats()) > 0): ?> - <li> - <a class="cite-record" data-lightbox href="<?=$this->recordLink()->getActionUrl($this->driver, 'Cite')?>" rel="nofollow"><i class="fa fa-asterisk" aria-hidden="true"></i> <?=$this->transEsc('Cite this')?></a> - </li> - <? endif; ?> - <? /* finc: we don't use sms, CK */ ?> - <? /* - <? if ($this->accountCapabilities()->getSmsSetting() !== 'disabled'): ?> - <li><a class="sms-record" data-lightbox href="<?=$this->recordLink()->getActionUrl($this->driver, 'SMS')?>" rel="nofollow"><i class="fa fa-mobile" aria-hidden="true"></i> <?=$this->transEsc('Text this')?></a></li> - <? endif; ?> - */ ?> - <li> - <a class="mail-record" data-lightbox href="<?=$this->recordLink()->getActionUrl($this->driver, 'Email')?>" rel="nofollow"><i class="fa fa-envelope" aria-hidden="true"></i> <?=$this->transEsc('Email this')?></a> - </li> - - <? $exportFormats = $this->export()->getFormatsForRecord($this->driver); ?> - <? if (count($exportFormats) > 0): ?> - <li class="dropdown"> - <a class="export-toggle dropdown-toggle" data-toggle="dropdown" href="<?=$this->recordLink()->getActionUrl($this->driver, 'Export')?>" rel="nofollow"><i class="fa fa-list-alt" aria-hidden="true"></i> <?=$this->transEsc('Export Record')?> - </a> - <ul class="dropdown-menu" role="menu"> - <? foreach ($exportFormats as $exportFormat): ?> - <li> - <a <? if ($this->export()->needsRedirect($exportFormat)): ?>target="<?=$this->escapeHtmlAttr($exportFormat)?>Main" - <? endif; ?>href="<?=$this->recordLink()->getActionUrl($this->driver, 'Export')?>?style=<?=$this->escapeHtmlAttr($exportFormat)?>" - rel="nofollow"><?=$this->transEsc('Export to')?><?=$this->transEsc($this->export()->getLabelForFormat($exportFormat))?></a> - </li> - <? endforeach; ?> - </ul> - </li> - <? endif; ?> - - <? if ($this->userlist()->getMode() !== 'disabled'): ?> - <? /* finc: we use title, CK */ ?> - <li> - <?if ($this->permission()->allowDisplay('feature.Favorites')): ?> - <a class="save-record" data-lightbox href="<?=$this->recordLink()->getActionUrl($this->driver, 'Save')?>" title="<?=$this->transEsc('Add to favorites')?>" rel="nofollow"><i class="fa fa-star" aria-hidden="true"></i> <?=$this->transEsc('Add to favorites')?> - </a> - <? elseif ($block = $this->permission()->getAlternateContent('feature.Favorites')): ?> - <?=$block?> - <? endif; ?> - </li> - <? endif; ?> - <? if (!empty($addThis)): ?> - <li> - <a class="addThis addthis_button" href="https://www.addthis.com/bookmark.php?v=250&pub=<?=urlencode($addThis)?>"><i class="fa fa-bookmark" aria-hidden="true"></i> <?=$this->transEsc('Bookmark')?></a> - </li> - <? endif; ?> - <li class="bookbag-menu"> - <?=$this->render('record/cart-buttons.phtml', ['id' => $this->driver->getUniqueId(), 'source' => $this->driver->getSourceIdentifier()]); ?> - </li> -</ul> -<!-- finc: recordDriver - solrDefault - toolbar - END --> diff --git a/themes/finc/templates/RecordDriver/SolrLido/core.phtml b/themes/finc/templates/RecordDriver/SolrLido/core.phtml index 23cc0c870ba248f7e65b8196590a08474442fad5..35ccb759c817bfc1ee636dc9fe9ed62b1c40488e 100644 --- a/themes/finc/templates/RecordDriver/SolrLido/core.phtml +++ b/themes/finc/templates/RecordDriver/SolrLido/core.phtml @@ -1,13 +1,17 @@ <!-- finc: RecordDriver - solrLido - core --> -<? /* keep schema tagging here in finc - CK, #13861 */ ?> +<?php +/* based on DefaultRecord/core, compare with DefaultRecord/core during updates! +// keep schema tagging here in finc - CK, #13861 */ ?> <div class="media" vocab="http://schema.org/" resource="#record" typeof="<?=$this->driver->getSchemaOrgFormats()?> Product"> - <? - if ($loggedin = $this->auth()->isLoggedIn()) { - $user_id = $loggedin->id; - $loggedin = true; - } else { - $user_id = false; - } + <?php /* finc: use VF5.1 offcanvas toggler here as well if you have a custom sidebar - CK */ ?> + <?=$this->render('RecordDriver/DefaultRecord/offcanvas-toggler'); ?> + <?php + if ($loggedin = $this->auth()->isLoggedIn()) { + $user_id = $loggedin->id; + $loggedin = true; + } else { + $user_id = false; + } $formatRoles = function ($roles) { if (count($roles) == 0) { return ''; @@ -19,84 +23,87 @@ return ' (' . implode(', ', array_unique(array_map($translate, $roles))) . ')'; }; ?> - <? - $QRCode = $this->record($this->driver)->getQRCode("core"); - $coverDetails = $this->record($this->driver)->getCoverDetails('core', 'medium', $this->record($this->driver)->getThumbnail('large')); - $cover = $coverDetails['html']; - $preview = $this->record($this->driver)->getPreviews(); + <?php + $QRCode = $this->record($this->driver)->getQRCode("core"); + $coverDetails = $this->record($this->driver)->getCoverDetails('core', 'medium', $this->record($this->driver)->getThumbnail('large')); + $cover = $coverDetails['html']; + $preview = $this->record($this->driver)->getPreviews(); ?> - <? if ($QRCode || $cover || $preview): ?> - <div class="media-left <?=$this->escapeHtmlAttr($coverDetails['size'])?> img-col"> - <? /* Display thumbnail if appropriate: */ ?> - <? if($cover): ?> - <?=$cover?> - <? /* BOF - finc-specific StyleBasedIcons */ ?> - <? elseif ($this->record($this->driver)->showStyleBasedIcons()): ?> + <?php if ($QRCode || $cover || $preview): ?> + <div class="media-left <?=$this->escapeHtmlAttr($coverDetails['size'])?> img-col"> + <?php /* Display thumbnail if appropriate: */ ?> + <?php if ($cover): ?> + <?=$cover?> + <?php /* BOF - finc-specific StyleBasedIcons */ ?> + <?php elseif ($this->record($this->driver)->showStyleBasedIcons()): ?> <?=$this->record($this->driver)->getFormatIcon()?> - <? /* EOF - finc-specific StyleBasedIcons */ ?> - <? endif; ?> + <?php /* EOF - finc-specific StyleBasedIcons */ ?> + <?php endif; ?> - <? /* Display qrcode if appropriate: */ ?> - <? if($QRCode): ?> - <span class="hidden-xs"> + <?php /* Display qrcode if appropriate: */ ?> + <?php if ($QRCode): ?> + <span class="hidden-xs"> <br/><img alt="<?=$this->transEsc('QR Code')?>" class="qrcode" src="<?=$this->escapeHtmlAttr($QRCode);?>"/> </span> - <? endif; ?> + <?php endif; ?> - <? // if you have a preview tab but want to move or remove the preview link - // from this area of the record view, this can be split into - // getPreviewData() (should stay here) and - // getPreviewLink() (can go in your desired tab) ?> - <? if ($preview): ?> + <?php // if you have a preview tab but want to move or remove the preview link + // from this area of the record view, this can be split into + // getPreviewData() (should stay here) and + // getPreviewLink() (can go in your desired tab) ?> + <?php if ($preview): ?> <div class="record-previews"> <?=$preview?> </div> - <? endif; ?> + <?php endif; ?> </div> - <? endif; ?> + <?php endif; ?> <div class="media-body"> - <? /* finc: We want to get rid of trailing special chars in the title and limit its length to 100 chars + <?php /* finc: We want to get rid of trailing special chars in the title and limit its length to 100 chars; in finc: keep schema name tag here!! #13861 CK */ ?> <h3 property="name"><?=$this->escapeHtml(preg_replace('/(\s[\/\.:]\s*)*$/', '', $this->truncate($this->driver->getShortTitle() . ' ' . $this->driver->getSubtitle() . ' ' . $this->driver->getTitleSection(), 100)))?></h3> - <? $summary = $this->driver->getSummary(); $summary = isset($summary[0]) ? $this->escapeHtml($summary[0]) : false; ?> - <? if ($summary): ?> + <?php $summary = $this->driver->getSummary(); + $summary = isset($summary[0]) ? $this->escapeHtml($summary[0]) : false; ?> + <?php if ($summary): ?> <p><?=$this->truncate($summary, 300)?></p> - <? if(strlen($summary) > 300): ?> + <?php if (strlen($summary) > 300): ?> <p class="hidden-print"><a href='<?=$this->recordLink()->getTabUrl($this->driver, 'Description')?>#tabnav'><?=$this->transEsc('Full description')?></a></p> - <? endif; ?> - <? endif; ?> + <?php endif; ?> + <?php endif; ?> - <? if ($this->userlist()->getMode() !== 'disabled'): ?> - <? /* Display the lists that this record is saved to */ ?> + <?php if ($this->userlist()->getMode() !== 'disabled'): ?> + <?php /* Display the lists that this record is saved to */ ?> <div class="savedLists hidden alert alert-info"> <strong><?=$this->transEsc("Saved in")?>:</strong> </div> - <? endif; ?> + <?php endif; ?> - <?/* Display Main Details */?> - <? - $formatter = $this->recordDataFormatter(); - $coreFields = $formatter->getData($driver, $formatter->getDefaults('core-lido')); + <?php /* Display Main Details */ ?> + <?php + $formatter = $this->recordDataFormatter(); + $coreFields = $formatter->getData($driver, $formatter->getDefaults('core-lido')); ?> - <? if (!empty($coreFields)): ?> + <?php if (!empty($coreFields)): ?> <table class="table table-striped"> - <? /* Table summary not supported in html 5, finc-specific solution, CK */ ?> <caption class="sr-only"><?=$this->transEsc('Bibliographic Details')?></caption> - <? foreach ($coreFields as $current): ?> - <? if ($current['label'] == null): ?> - <?=$current['value']?> - <? else: ?> - <tr><th><?=$this->transEsc($current['label'])?>:</th><td><?=$current['value']?></td></tr> - <? endif; ?> - <? endforeach; ?> + <?php foreach ($coreFields as $current): ?> + <?php if ($current['label'] == null): ?> + <?=$current['value']?> + <?php else: ?> + <tr> + <th><?=$this->transEsc($current['label'])?>:</th> + <td><?=$current['value']?></td> + </tr> + <?php endif; ?> + <?php endforeach; ?> </table> - <? endif; ?> - <?/* End Main Details */?> + <?php endif; ?> + <?php /* End Main Details */ ?> </div> </div> <!-- finc: RecordDriver - solrLido - core - END --> \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/SolrLido/data-accessNote.phtml b/themes/finc/templates/RecordDriver/SolrLido/data-accessNote.phtml index 6f7af7a7dfb7b58fc88cd5c4360a492616bea31a..74a93069618fdbb558a78b57652ae2e8f868a15e 100644 --- a/themes/finc/templates/RecordDriver/SolrLido/data-accessNote.phtml +++ b/themes/finc/templates/RecordDriver/SolrLido/data-accessNote.phtml @@ -1,4 +1,4 @@ -<? foreach ($data as $field): ?> - <? if (!empty($field['uri'])): ?><a href="<?= $this->escapeHtmlAttr($field['uri']) ?>"><?= $this->escapeHtml($field['term']) ?><? endif; ?><? if (!empty($field['uri'])): ?></a><? endif; ?> - <br/> -<? endforeach; ?> \ No newline at end of file +<?php foreach ($data as $field): ?> + <?php if (!empty($field['uri'])): ?><a href="<?=$this->escapeHtmlAttr($field['uri'])?>"><?=$this->escapeHtml($field['term'])?><?php endif; ?><?php if (!empty($field['uri'])): ?></a><?php endif; ?> + <br/> +<?php endforeach; ?> \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/SolrLido/data-authors.phtml b/themes/finc/templates/RecordDriver/SolrLido/data-authors.phtml index 0adb2a0e98e622339e7de48309e728781ce64ba1..8aec1d27c043d5db4879fbe9e5e17cac929b3ae7 100644 --- a/themes/finc/templates/RecordDriver/SolrLido/data-authors.phtml +++ b/themes/finc/templates/RecordDriver/SolrLido/data-authors.phtml @@ -1,47 +1,47 @@ -<? +<?php $formatProperty = function ($datafield, $name, $label) { - if (count($datafield) == 0) { - return ''; - } - $that = $this; - $translate = function ($str) use ($that, $label) { - return $that->transEsc($label . $str); - }; - return '<span class="author-property-' . $name . '">(' . implode(', ', array_unique(array_map($translate, $datafield))) . ')</span>'; + if (count($datafield) == 0) { + return ''; + } + $that = $this; + $translate = function ($str) use ($that, $label) { + return $that->transEsc($label . $str); + }; + return '<span class="author-property-' . $name . '">(' . implode(', ', array_unique(array_map($translate, $datafield))) . ')</span>'; }; $formattedAuthors = []; ?> -<? if (!empty($data[$type])): ?> - <? foreach ($data[$type] as $author => $roles): ?> - <? ob_start(); ?> - <span class="author-data" property="<?=$this->escapeHtml($schemaLabel)?>" typeof="Person"> +<?php if (!empty($data[$type])): ?> + <?php foreach ($data[$type] as $author => $roles): ?> + <?php ob_start(); ?> + <span class="author-data" property="<?=$this->escapeHtml($schemaLabel)?>" typeof="Person"> <span property="name"> - <a href="<?=$this->record($this->driver)->getLink('author', $author)?>"> - <?=$this->escapeHtml($author)?> - </a> + <a href="<?=$this->record($this->driver)->getLink('author', $author)?>"> + <?=$this->escapeHtml($author)?> + </a> </span> - <? - // Display additional data using the appropriate translation prefix - // (for example, to render author roles correctly): - if (!empty($requiredDataFields)) { - foreach ($requiredDataFields as $field) { - $name = $field['name']; - $prefix = isset($field['prefix']) ? $field['prefix'] : ''; - // deprecated due to more flexible solution at core - // to-do: revision of indexing and finc specific treatment - // of roles in RecordDriver - if (count($roles) > 0 && $name == 'role') { - echo $formatProperty($roles, $name, $prefix); - } - } + <?php + // Display additional data using the appropriate translation prefix + // (for example, to render author roles correctly): + if (!empty($requiredDataFields)) { + foreach ($requiredDataFields as $field) { + $name = $field['name']; + $prefix = isset($field['prefix']) ? $field['prefix'] : ''; + // deprecated due to more flexible solution at core + // to-do: revision of indexing and finc specific treatment + // of roles in RecordDriver + if (count($roles) > 0 && $name == 'role') { + echo $formatProperty($roles, $name, $prefix); } - ?> + } + } + ?> </span> - <? - // Strip whitespace before close tags to avoid spaces in front of commas: - $formattedAuthors[] = trim(preg_replace('/\s+<\//', '</', ob_get_contents())); - ob_end_clean(); - ?> - <? endforeach; ?> -<? endif; ?> + <?php + // Strip whitespace before close tags to avoid spaces in front of commas: + $formattedAuthors[] = trim(preg_replace('/\s+<\//', '</', ob_get_contents())); + ob_end_clean(); + ?> + <?php endforeach; ?> +<?php endif; ?> <?=implode(', ', $formattedAuthors)?> \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/SolrLido/data-events.phtml b/themes/finc/templates/RecordDriver/SolrLido/data-events.phtml index c11f1fcafbf98b5c83efd22a4d4dd4a2e13219d1..8030e6f371c7e39bc1798efa91466c96d07d19bb 100644 --- a/themes/finc/templates/RecordDriver/SolrLido/data-events.phtml +++ b/themes/finc/templates/RecordDriver/SolrLido/data-events.phtml @@ -1,42 +1,42 @@ -<? $publicationIsSet = false; ?> -<? if (count($event = $this->driver->getEvents()) > 0): ?> - <? foreach ($event as $eventType => $events): ?> - <tr class="recordEvents"> - <th> - <? if ($eventType == 'production'): ?> - <?= $this->transEsc('expression creation') ?>: - <? elseif ($eventType == 'publication'): ?> - <?= $this->transEsc('Time of origin') ?>: - <? $publicationIsSet = true; ?> - <? else: ?> - <?= $this->transEsc($eventType) ?>: - <? endif; ?> - </th> - <td> - <div class="truncate-field"> - <? foreach ($events as $event): ?> - <? if ($event != $events[0]): ?><br/><? endif; ?> - <? if (!empty($event['name'])): ?><?= $this->escapeHtml($event['name']) ?><br/><? endif; ?> - <? if (!empty($event['actors'])): ?> - <? foreach ($event['actors'] as $actor): ?> - <?= $this->escapeHtml($actor['name']) ?><? if (!empty($actor['role'])): ?> (<?= $this->escapeHtml($actor['role']) ?>)<? endif; ?> - <? endforeach; ?> - <br/> - <? endif; ?> - <? if (!empty($event['date'])): ?> - <?= $this->escapeHtml($event['date']) ?><br/> - <? else: ?> - <?= $this->transEsc('undated') ?><br/> - <? endif; ?> - <? if (!empty($event['method'])): ?><?= $this->escapeHtml($event['method']) ?><br/><? endif; ?> - <? if (!empty($event['materials'])): ?><?= implode('<br/>', array_map(array($this, 'escapeHtml'), $event['materials'])) ?><br/><? endif; ?> - <? if (!empty($event['places'])): ?><?= implode('<br/>', array_map(array($this, 'escapeHtml'), $event['places'])) ?><br/><? endif; ?> - <? if (!empty($event['culture'])): ?><?= $this->escapeHtml($event['culture']) ?><br/><? endif; ?> +<?php $publicationIsSet = false; ?> +<?php if (count($event = $this->driver->getEvents()) > 0): ?> + <?php foreach ($event as $eventType => $events): ?> + <tr class="recordEvents"> + <th> + <?php if ($eventType == 'production'): ?> + <?=$this->transEsc('expression creation')?>: + <?php elseif ($eventType == 'publication'): ?> + <?=$this->transEsc('Time of origin')?>: + <?php $publicationIsSet = true; ?> + <?php else: ?> + <?=$this->transEsc($eventType)?>: + <?php endif; ?> + </th> + <td> + <div class="truncate-field"> + <?php foreach ($events as $event): ?> + <?php if ($event != $events[0]): ?><br/><?php endif; ?> + <?php if (!empty($event['name'])): ?><?=$this->escapeHtml($event['name'])?><br/><?php endif; ?> + <?php if (!empty($event['actors'])): ?> + <?php foreach ($event['actors'] as $actor): ?> + <?=$this->escapeHtml($actor['name'])?><?php if (!empty($actor['role'])): ?> (<?=$this->escapeHtml($actor['role'])?>)<?php endif; ?> + <?php endforeach; ?> + <br/> + <?php endif; ?> + <?php if (!empty($event['date'])): ?> + <?=$this->escapeHtml($event['date'])?><br/> + <?php else: ?> + <?=$this->transEsc('undated')?><br/> + <?php endif; ?> + <?php if (!empty($event['method'])): ?><?=$this->escapeHtml($event['method'])?><br/><?php endif; ?> + <?php if (!empty($event['materials'])): ?><?=implode('<br/>', array_map(array($this, 'escapeHtml'), $event['materials']))?><br/><?php endif; ?> + <?php if (!empty($event['places'])): ?><?=implode('<br/>', array_map(array($this, 'escapeHtml'), $event['places']))?><br/><?php endif; ?> + <?php if (!empty($event['culture'])): ?><?=$this->escapeHtml($event['culture'])?><br/><?php endif; ?> - <? if (!empty($event['description'])): ?><?= $this->escapeHtml($event['description']) ?><br/><? endif; ?> - <? endforeach; ?> - </div> - </td> - </tr> - <? endforeach; ?> -<? endif; ?> + <?php if (!empty($event['description'])): ?><?=$this->escapeHtml($event['description'])?><br/><?php endif; ?> + <?php endforeach; ?> + </div> + </td> + </tr> + <?php endforeach; ?> +<?php endif; ?> diff --git a/themes/finc/templates/RecordDriver/SolrLido/data-institutions.phtml b/themes/finc/templates/RecordDriver/SolrLido/data-institutions.phtml index f2c1b0cd57c3816ba0ec83d94f45e73d4e3693b0..ce6e0b6fe437e795969775ee9d8a283e53b7eaeb 100644 --- a/themes/finc/templates/RecordDriver/SolrLido/data-institutions.phtml +++ b/themes/finc/templates/RecordDriver/SolrLido/data-institutions.phtml @@ -1,3 +1,3 @@ -<? foreach ($data as $index => $institution): ?> - <?= ($index > 0 ? '<br/>' : '') ?><?= $this->transEsc("source_$institution", array(), $this->translate($institution)) ?> -<? endforeach; ?> \ No newline at end of file +<?php foreach ($data as $index => $institution): ?> + <?=($index > 0 ? '<br/>' : '')?><?=$this->transEsc("source_$institution", array(), $this->translate($institution))?> +<?php endforeach; ?> \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/SolrMarc/core.phtml b/themes/finc/templates/RecordDriver/SolrMarc/core.phtml index 60814dd2ba4cae4c50470550dc5eda09afe2c1a2..c3fec0f6a70c645ce6de01d1e870b98882bc683c 100644 --- a/themes/finc/templates/RecordDriver/SolrMarc/core.phtml +++ b/themes/finc/templates/RecordDriver/SolrMarc/core.phtml @@ -1,84 +1,89 @@ <!-- finc: RecordDriver - solrMarc - core --> +<?php /* based on DefaultRecord/core, compare with DefaultRecord/core during updates! */ ?> <div class="media" vocab="http://schema.org/" resource="#record" typeof="<?=$this->driver->getSchemaOrgFormats()?> Product"> - <? + <?php /* finc: use VF5.1 offcanvas toggler here as well if you have a custom sidebar - CK */ ?> + <?=$this->render('RecordDriver/DefaultRecord/offcanvas-toggler'); ?> + <?php $QRCode = $this->record($this->driver)->getQRCode("core"); $coverDetails = $this->record($this->driver)->getCoverDetails('core', 'medium', $this->record($this->driver)->getThumbnail('large')); $cover = $coverDetails['html']; $preview = $this->record($this->driver)->getPreviews(); ?> - <? if ($QRCode || $cover || $preview): ?> + <?php if ($QRCode || $cover || $preview): ?> <div class="media-left <?=$this->escapeHtmlAttr($coverDetails['size'])?> img-col"> - <? /* Display thumbnail if appropriate: */ ?> - <? if($cover): ?> + <?php /* Display thumbnail if appropriate: */ ?> + <?php if($cover): ?> <?=$cover?> - <? /* BOF - finc-specific StyleBasedIcons */ ?> - <? elseif ($this->record($this->driver)->showStyleBasedIcons()): ?> + <?php /* BOF - finc-specific StyleBasedIcons */ ?> + <?php elseif ($this->record($this->driver)->showStyleBasedIcons()): ?> <?=$this->record($this->driver)->getFormatIcon()?> - <? /* EOF - finc-specific StyleBasedIcons */ ?> - <? endif; ?> + <?php /* EOF - finc-specific StyleBasedIcons */ ?> + <?php endif; ?> - <? /* Display qrcode if appropriate: */ ?> - <? if($QRCode): ?> + <?php /* Display qrcode if appropriate: */ ?> + <?php if($QRCode): ?> <span class="hidden-xs"> <br/><img alt="<?=$this->transEsc('QR Code')?>" class="qrcode" src="<?=$this->escapeHtmlAttr($QRCode);?>"/> </span> - <? endif; ?> + <?php endif; ?> - <? // if you have a preview tab but want to move or remove the preview link + <?php // if you have a preview tab but want to move or remove the preview link // from this area of the record view, this can be split into // getPreviewData() (should stay here) and // getPreviewLink() (can go in your desired tab) ?> - <? if ($preview): ?> + <?php if ($preview): ?> <div class="record-previews"> <?=$preview?> </div> - <? endif; ?> + <?php endif; ?> </div> - <? endif; ?> + <?php endif; ?> <div class="media-body"> - <? /* finc: We want to get rid of trailing special chars in the title and limit its length to 100 chars - remove schema name tag here but keept in description, CK + <?php /* finc: We want to get rid of trailing special chars in the title and limit its length to 100 chars; + in finc: keep schema name tag here!! #13861 - CK */ ?> - <? /* finc: add schema tags for title #13850 - VE */ ?> + <?php /* finc: add schema tags for title #13850 - VE */ ?> <h3 property="name"><?=$this->escapeHtml(preg_replace('/(\s[\/\.:]\s*)*$/', '', $this->truncate($this->driver->getShortTitle() . ' ' . $this->driver->getSubtitle() . ' ' . $this->driver->getTitleSection(), 100)))?></h3> - <? $summary = $this->driver->getSummary(); $summary = isset($summary[0]) ? $this->escapeHtml($summary[0]) : false; ?> - <? if ($summary): ?> + <?php $summary = $this->driver->getSummary(); $summary = isset($summary[0]) ? $this->escapeHtml($summary[0]) : false; ?> + <?php if ($summary): ?> <p><?=$this->truncate($summary, 300)?></p> - <? if(strlen($summary) > 300): ?> + <?php if(strlen($summary) > 300): ?> <p class="hidden-print"><a href='<?=$this->recordLink()->getTabUrl($this->driver, 'Description')?>#tabnav'><?=$this->transEsc('Full description')?></a></p> - <? endif; ?> - <? endif; ?> + <?php endif; ?> + <?php endif; ?> - <? if ($this->userlist()->getMode() !== 'disabled'): ?> - <? /* Display the lists that this record is saved to */ ?> + <?php if ($this->userlist()->getMode() !== 'disabled'): ?> + <?php /* Display the lists that this record is saved to */ ?> <div class="savedLists hidden alert alert-info"> <strong><?=$this->transEsc("Saved in")?>:</strong> </div> - <? endif; ?> + <?php endif; ?> - <?/* Display Main Details */?> - <? + <?php /* Display Main Details */?> + <?php $formatter = $this->recordDataFormatter(); $coreFields = $formatter->getData($driver, $formatter->getDefaults('core-marc')); ?> - <? if (!empty($coreFields)): ?> + <?php if (!empty($coreFields)): ?> <table class="table table-striped"> - <? /* Table summary not supported in html 5, finc-specific solution, CK */ ?> <caption class="sr-only"><?=$this->transEsc('Bibliographic Details')?></caption> - <? foreach ($coreFields as $current): ?> - <? if ($current['label'] == null): ?> + <?php foreach ($coreFields as $current): ?> + <?php if ($current['label'] == null): ?> <?=$current['value']?> - <? else: ?> - <tr><th><?=$this->transEsc($current['label'])?>:</th><td><?=$current['value']?></td></tr> - <? endif; ?> - <? endforeach; ?> + <?php else: ?> + <tr> + <th><?=$this->transEsc($current['label'])?>:</th> + <td><?=$current['value']?></td> + </tr> + <?php endif; ?> + <?php endforeach; ?> </table> - <? endif; ?> - <?/* End Main Details */?> + <?php endif; ?> + <?php /* End Main Details */?> </div> </div> <!-- finc: RecordDriver - solrMarc - core - END --> diff --git a/themes/finc/templates/RecordDriver/SolrMarc/data-indexOfGermanPrints.phtml b/themes/finc/templates/RecordDriver/SolrMarc/data-indexOfGermanPrints.phtml index b12529e11094ccbd4db551e7bc4320341bde3dee..0d95440bb9ce40e0ab94c862b4e02fdba73470a7 100644 --- a/themes/finc/templates/RecordDriver/SolrMarc/data-indexOfGermanPrints.phtml +++ b/themes/finc/templates/RecordDriver/SolrMarc/data-indexOfGermanPrints.phtml @@ -1,8 +1,8 @@ <!-- finc: RecordDriver - solrMarc data-indexOfGermanPrints --> -<? /* Originally introduced in #9557 - CK */ ?> -<? if (!empty($data)): ?> - <span property="germanPrintsIndexNumber"> - <?=$this->escapeHtml($data[0])?> - </span> -<? endif; ?> +<?php /* Originally introduced in #9557 - CK */ ?> +<?php if (!empty($data)): ?> + <span property="germanPrintsIndexNumber"> + <?=$this->escapeHtml($data[0])?> + </span> +<?php endif; ?> <!-- finc: RecordDriver - solrMarc data-indexOfGermanPrints - END --> diff --git a/themes/finc/templates/RecordDriver/SolrMarc/data-linkViaFincId.phtml b/themes/finc/templates/RecordDriver/SolrMarc/data-linkViaFincId.phtml index 64de315b4d81ead48e0585857fec8ea5b5354e36..cc59b8b824bd2b2c64c240855ea3249ecb5797a1 100644 --- a/themes/finc/templates/RecordDriver/SolrMarc/data-linkViaFincId.phtml +++ b/themes/finc/templates/RecordDriver/SolrMarc/data-linkViaFincId.phtml @@ -1,18 +1,18 @@ <!-- finc: RecordDriver - solrMarc - data-linkviafincid --> -<? if (!empty($data)): ?> -<? foreach($data as $field): ?> - <? if (isset($field['id']) || isset($field['text'])): - $url = isset($field['id']) - ? $this->url('record').$field['id'] - : $this->record($this->driver)->getLink('title', $field['text']); - ?> - <? if (isset($field['pretext']) && !empty($field['pretext'])): ?> - <?=$this->escapeHtml($field['pretext'])?>: - <? endif; ?> - <a href="<?=$url?>"><?=$this->escapeHtml($field['text'])?></a><br/> - <? else: ?> - <a href="<?=$this->record($this->driver)->getLink('title', $field)?>"><?=$this->escapeHtml($field)?></a><br/> - <? endif; ?> -<? endforeach; ?> -<? endif; ?> +<?php if (!empty($data)): ?> + <?php foreach ($data as $field): ?> + <?php if (isset($field['id']) || isset($field['text'])): + $url = isset($field['id']) + ? $this->url('record') . $field['id'] + : $this->record($this->driver)->getLink('title', $field['text']); + ?> + <?php if (isset($field['pretext']) && !empty($field['pretext'])): ?> + <?=$this->escapeHtml($field['pretext'])?>: + <?php endif; ?> + <a href="<?=$url?>"><?=$this->escapeHtml($field['text'])?></a><br/> + <?php else: ?> + <a href="<?=$this->record($this->driver)->getLink('title', $field)?>"><?=$this->escapeHtml($field)?></a><br/> + <?php endif; ?> + <?php endforeach; ?> +<?php endif; ?> <!-- finc: RecordDriver - solrMarc - data-linkviafincid - END --> diff --git a/themes/finc/templates/RecordDriver/SolrMarc/data-localSubjects.phtml b/themes/finc/templates/RecordDriver/SolrMarc/data-localSubjects.phtml index 9844fee84e8f9bbdca9a354254547eb40fa0283c..ee4a6c64f0af9f3224c9128666bf87f12ef74f93 100644 --- a/themes/finc/templates/RecordDriver/SolrMarc/data-localSubjects.phtml +++ b/themes/finc/templates/RecordDriver/SolrMarc/data-localSubjects.phtml @@ -1,10 +1,11 @@ <!-- finc: RecordDriver - solrMarc - data-localSubjects --> -<? if (!(empty($data))): ?> -<? $i = 0; foreach ($data as $subject): ?> - <?= ($i++ == 0) ? '' : ', '; ?> +<?php if (!(empty($data))): ?> + <?php $i = 0; + foreach ($data as $subject): ?> + <?=($i++ == 0) ? '' : ', ';?> <a title="<?=$this->escapeHtmlAttr($subject)?>" href="<?=$this->record($this->driver)->getLink('subject', $subject)?>" rel="nofollow"> - <?=trim($this->escapeHtml($subject))?> + <?=trim($this->escapeHtml($subject))?> </a> -<? endforeach; ?> -<? endif; ?> + <?php endforeach; ?> +<?php endif; ?> <!-- finc: RecordDriver - solrMarc - data-localSubjects - END --> diff --git a/themes/finc/templates/RecordTab/acquisitionpda.phtml b/themes/finc/templates/RecordTab/acquisitionpda.phtml index 681897d19423052716f52e750d5caf7f468ac846..91296ba15fa006a007013d4545a6cbfcb675aa6f 100644 --- a/themes/finc/templates/RecordTab/acquisitionpda.phtml +++ b/themes/finc/templates/RecordTab/acquisitionpda.phtml @@ -1,25 +1,25 @@ <!-- finc - recordtab - acquistionpda --> -<? +<?php // Set page title. $this->headTitle( - $this->translate('PDA::Acquisition') . ': ' . - $this->driver->getBreadcrumb() + $this->translate('PDA::Acquisition') . ': ' . + $this->driver->getBreadcrumb() ); - // Get some variables - $id = $this->driver->getUniqueId(); - // $controllerClass = 'controller:' . $this->record($this->driver)->getController(); - $controllerClass = 'controller:SolrMarcFincPDA'; +// Get some variables +$id = $this->driver->getUniqueId(); +// $controllerClass = 'controller:' . $this->record($this->driver)->getController(); +$controllerClass = 'controller:SolrMarcFincPDA'; ?> - <h2><?= $this->transEsc('PDA::Acquisition') ?></h2> - <p><?= $this->transEsc('PDA::pda_initial_text') ?></p> - <p class="alert alert-info"><?= $this->transEsc('PDA::pda_restriction_text') ?></p> - <div class="btn-group"> - <? /* Leave title in here - it is used for the tooltip! - CK */ ?> - <a class="btn btn-primary" data-toggle="tooltip" title="<?= $this->transEsc('PDA::pda_open_new_window')?>" href="<?= $this->interlibraryloan()->getSwbLink($this->driver) ?>" target="_blank"> - <?= $this->transEsc('PDA::pda_tab_interlibrary_button') ?> - </a> - <a class="btn btn-primary pda-button <?= $controllerClass ?>" data-lightbox href="<?= $this->url('record-pda', array('id' => $id)) ?>" rel="nofollow"> - <?= $this->transEsc('PDA::pda_tab_order_button') ?> - </a> - </div> +<h2><?=$this->transEsc('PDA::Acquisition')?></h2> +<p><?=$this->transEsc('PDA::pda_initial_text')?></p> +<p class="alert alert-info"><?=$this->transEsc('PDA::pda_restriction_text')?></p> +<div class="btn-group"> + <?php /* Leave title in here - it is used for the tooltip! - CK */ ?> + <a class="btn btn-primary" data-toggle="tooltip" title="<?=$this->transEsc('PDA::pda_open_new_window')?>" href="<?=$this->interlibraryloan()->getSwbLink($this->driver)?>" target="_blank"> + <?=$this->transEsc('PDA::pda_tab_interlibrary_button')?> + </a> + <a class="btn btn-primary pda-button <?=$controllerClass?>" data-lightbox href="<?=$this->url('record-pda', array('id' => $id))?>" rel="nofollow"> + <?=$this->transEsc('PDA::pda_tab_order_button')?> + </a> +</div> <!-- finc - recordtab - acquistionpda - END --> diff --git a/themes/finc/templates/RecordTab/description.phtml b/themes/finc/templates/RecordTab/description.phtml index eb3825ffd47bb2b75eafa145607fb5d5330a94a5..d8f9f722d31ab463f7d099e3da67908b952f6957 100644 --- a/themes/finc/templates/RecordTab/description.phtml +++ b/themes/finc/templates/RecordTab/description.phtml @@ -1,29 +1,22 @@ <!-- finc: recordtab - description --> -<? +<?php // Set page title. $this->headTitle($this->translate('Description') . ': ' . $this->driver->getBreadcrumb()); $formatter = $this->recordDataFormatter(); $mainFields = $formatter->getData($driver, $formatter->getDefaults('description')); ?> -<? /* finc: remove schema tag here but keep in core,*/ ?> +<?php /* finc: remove schema tag here but keep in core,*/ ?> <table class="table table-striped"> - <? /* finc: table summary not supported in html 5, finc-specific solution, CK */ + <?php /* Table gets filled via recordDriver/.../data-... templates as referenced in RecordDataFormatterFactory */ ?> <caption class="sr-only"><?=$this->transEsc('Description')?></caption> - <? if (!empty($mainFields)): ?> - <? foreach ($mainFields as $key => $current): ?> - <? if ($key == null): ?> - <?=$current['value']?> - <? else: ?> - <tr> - <th><?=$this->transEsc($current['label'])?>:</th> - <td><?=$current['value']?></td> - </tr> - <? endif; ?> - <? endforeach; ?> - <? else: ?> + <?php if (!empty($mainFields)): ?> + <?php foreach ($mainFields as $current): ?> + <tr><th><?=$this->transEsc($current['label'])?>:</th><td><?=$current['value']?></td></tr> + <?php endforeach; ?> + <?php else: ?> <tr><td><?=$this->transEsc('no_description')?></td></tr> - <? endif; ?> + <?php endif; ?> </table> <!-- finc: recordtab - description - END --> diff --git a/themes/finc/templates/RecordTab/descriptionlido.phtml b/themes/finc/templates/RecordTab/descriptionlido.phtml index c2d5cd8e15698e39092d0656d2eaf07f8aa1226c..c6dd3bdeb2dea1f4d901dccd55563a61b47b2116 100644 --- a/themes/finc/templates/RecordTab/descriptionlido.phtml +++ b/themes/finc/templates/RecordTab/descriptionlido.phtml @@ -1,24 +1,23 @@ <!-- finc: recordtab - descriptionlido --> -<? +<?php // Set page title. $this->headTitle($this->translate('Description') . ': ' . $this->driver->getBreadcrumb()); $formatter = $this->recordDataFormatter(); $mainFields = $formatter->getData($driver, $formatter->getDefaults('description-lido')); ?> -<? /* - This next table originally in table "Display Main Details" in solrDefault - core templates, compare with core and with description.phtml! CK +<?php /* + This next table originally in table "Display Main Details" in DefaultRecord/core templates, compare with core and with description.phtml! CK /* finc: remove schema tag here but keep in core,*/ ?> <table class="table table-striped"> - <? /* Table summary not supported in html 5, finc-specific solution, CK */ ?> <caption class="sr-only"><?= $this->transEsc('Description') ?></caption> - <? if (!empty($mainFields)): ?> - <? foreach ($mainFields as $key => $current): ?> + <?php if (!empty($mainFields)): ?> + <?php foreach ($mainFields as $current): ?> <tr><th><?=$this->transEsc($current['label'])?>:</th><td><?=$current['value']?></td></tr> - <? endforeach; ?> - <? else: ?> + <?php endforeach; ?> + <?php else: ?> <tr><td><?=$this->transEsc('no_description')?></td></tr> - <? endif; ?> + <?php endif; ?> </table> <!-- finc: recordtab - descriptionlido - END --> \ No newline at end of file diff --git a/themes/finc/templates/RecordTab/hierarchytree.phtml b/themes/finc/templates/RecordTab/hierarchytree.phtml index 5550db12e45a5887e1b34c468bdced4232bd5fab..92eed2720a749b8b8060a87e46c6edf7f182837a 100644 --- a/themes/finc/templates/RecordTab/hierarchytree.phtml +++ b/themes/finc/templates/RecordTab/hierarchytree.phtml @@ -1,5 +1,5 @@ -<? /* finc: record-tab - hierarchytree */ ?> -<? +<!-- finc: record-tab - hierarchytree --> +<?php // Set page title. $this->headTitle($this->translate('hierarchy_tree') . ': ' . $this->driver->getBreadcrumb()); $hierarchyTreeList = $this->tab->getTreeList(); @@ -10,37 +10,38 @@ "var hierarchySettings = {\n" . " lightboxMode: " . ($this->layout()->getTemplate() == 'layout/lightbox' ? 'true' : 'false') . ",\n" . " fullHierarchy: " . ($this->tab->isFullHierarchyVisible() ? 'true' : 'false') . "\n" - . "};\n", + . "};\n" + . "VuFind.addTranslations({\n" + . " 'showTree': '" . $this->transEsc('hierarchy_show_tree') . "',\n" + . " 'hideTree': '" . $this->transEsc('hierarchy_hide_tree') . "'}\n" + . ");\n", 'SET' ); - $this->jsTranslations()->addStrings( - ['showTree' => 'hierarchy_show_tree', 'hideTree' => 'hierarchy_hide_tree'] - ); $this->inlineScript(\Zend\View\Helper\HeadScript::FILE, 'vendor/jsTree/jstree.min.js'); $this->inlineScript(\Zend\View\Helper\HeadScript::FILE, 'hierarchyTree.js'); echo $this->inlineScript(); ?> -<? if (count($hierarchyTreeList) > 1): ?> +<?php if (count($hierarchyTreeList) > 1): ?> <div id="treeSelector"> <strong><?=$this->transEsc('hierarchyTreeSelect')?></strong><br> - <? foreach ($hierarchyTreeList as $hierarchy => $hierarchyTitle): ?> - <? if($activeTree == $hierarchy): ?> + <?php foreach ($hierarchyTreeList as $hierarchy => $hierarchyTitle): ?> + <?php if($activeTree == $hierarchy): ?> <span class="item"> <i class="fa fa-sitemap text-muted" aria-hidden="true"></i> <?=$this->escapeHtml($hierarchyTitle)?> </span> - <? else: ?> + <?php else: ?> <span class="item"> <i class="fa fa-sitemap" aria-hidden="true"></i> <a href="<?=$this->recordLink()->getTabUrl($this->driver, 'HierarchyTree')?>?hierarchy=<?=urlencode($hierarchy)?>"><?=$this->escapeHtml($hierarchyTitle)?></a> </span> - <? endif; ?> - <? endforeach; ?> + <?php endif; ?> + <?php endforeach; ?> </div> -<? endif; ?> -<? if ($activeTree): ?> +<?php endif; ?> +<?php if ($activeTree): ?> <div id="hierarchyTreeHolder"> - <? if ($this->tab->searchActive()): ?> + <?php if ($this->tab->searchActive()): ?> <div id="treeSearch" class="form-inline hidden"> <input type="text" id="treeSearchText" class="form-control search-query" value=""> <select class="form-control" id="treeSearchType" name="type"> @@ -52,20 +53,24 @@ </div> <div id="treeSearchNoResults" class="alert alert-danger hidden"><?=$this->translate('nohit_heading')?></div> <div id="treeSearchLimitReached" class="alert alert-danger hidden"><?=$this->translate('tree_search_limit_reached_html', ['%%url%%' => $this->url('search-results'), '%%limit%%' => $this->tab->getSearchLimit()])?></div> - <? endif; ?> + <?php endif; ?> <div id="hierarchyLoading" class="hide"><i class="fa fa-spinner fa-spin" aria-hidden="true"></i> <?=$this->transEsc("Loading")?>...</div> <div id="hierarchyTree" class="hierarchy-tree"> <input type="hidden" value="<?=$this->escapeHtml($this->driver->getUniqueId())?>" class="hiddenRecordId" /> <input type="hidden" value="<?=$this->escapeHtml($activeTree)?>" class="hiddenHierarchyId" /> <input type="hidden" value="<?=isset($this->treeContext) ? $this->treeContext : 'Record'?>" class="hiddenContext" /> - <? if ($this->layout()->getTemplate() != 'layout/lightbox'): ?> + <?php if ($this->layout()->getTemplate() != 'layout/lightbox'): ?> <noscript> + <?php if ($this->config()->nonJavascriptSupportEnabled()): ?> <ul class="fa-ul"> <?=$this->tab->renderTree($this->url('home'))?> </ul> + <?php else: ?> + <?=$this->transEsc('Please enable JavaScript.')?> + <?php endif; ?> </noscript> - <? endif; ?> + <?php endif; ?> </div> </div> -<? endif; ?> -<? /* finc: record-tab - hierarchytree - END */ ?> +<?php endif; ?> +<!-- finc: record-tab - hierarchytree - END --> diff --git a/themes/finc/templates/RecordTab/holdingsils.phtml b/themes/finc/templates/RecordTab/holdingsils.phtml index ad759fc87b9e5e1fa99e76ac922c2324bbd4dab5..f596f0d2f1a9fbeb916a0f04dc7d98ae434b485f 100644 --- a/themes/finc/templates/RecordTab/holdingsils.phtml +++ b/themes/finc/templates/RecordTab/holdingsils.phtml @@ -1,10 +1,12 @@ <!-- finc: recordTab - holdingsils --> -<? +<?php // Set up convenience variables: $account = $this->auth()->getManager(); $user = $account->isLoggedIn(); $openUrl = $this->openUrl($this->driver, 'holdings'); $openUrlActive = $openUrl->isActive(); + $doi = $this->doi($this->driver, 'holdings'); + $doiActive = $doi->isActive(); // Account for replace_other_urls setting $urls = $this->record($this->driver)->getLinkDetails($openUrlActive); // finc-specific: externalCatalogueLink @@ -27,231 +29,167 @@ $this->headTitle($this->translate('Holdings') . ': ' . $this->driver->getBreadcrumb()); ?> -<? /* finc-specific: nxt line - #7841@56988450 - CK */ ?> -<? $holdingsEmpty = true; ?> +<?php /* finc-specific: nxt line - #7841@56988450 - CK */ ?> +<?php $holdingsEmpty = true; ?> -<?=$this->context($this)->renderInContext('librarycards/selectcard.phtml', ['user' => $this->auth()->isLoggedIn()]); ?> +<?=$this->context($this)->renderInContext('librarycards/selectcard.phtml', ['user' => $this->auth()->isLoggedIn()]);?> -<? if (!empty($holdings['blocks'])):?> +<?php if (!empty($holdings['blocks'])): ?> <div id="account-block-msg" class="alert alert-danger"> - <?=$this->transEsc('account_block_options_missing', ['%%details%%' => implode('; ', $holdings['blocks'])]) ?> + <?=$this->transEsc('account_block_options_missing', ['%%details%%' => implode('; ', $holdings['blocks'])])?> </div> -<? endif; ?> +<?php endif; ?> <?=($offlineMode == "ils-offline") ? $this->render('Helpers/ils-offline.phtml', ['offlineModeMsg' => 'ils_offline_holdings_message']) : ''?> -<? if (($this->ils()->getHoldsMode() == 'driver' && !empty($holdings['holdings'])) || $this->ils()->getTitleHoldsMode() == 'driver'): ?> - <? if ($account->loginEnabled() && $offlineMode != 'ils-offline'): ?> - <? if (!$user): ?> +<?php if (($this->ils()->getHoldsMode() == 'driver' && !empty($holdings['holdings'])) || $this->ils()->getTitleHoldsMode() == 'driver'): ?> + <?php if ($account->loginEnabled() && $offlineMode != 'ils-offline'): ?> + <?php if (!$user): ?> <div class="alert alert-info"> <a href="<?=$this->recordLink()->getTabUrl($this->driver, 'Holdings')?>?login=true&catalogLogin=true" data-lightbox><?=$this->transEsc("hold_login")?></a> </div> - <? elseif (!$user->cat_username): ?> + <?php elseif (!$user->cat_username): ?> <div class="alert alert-info"> <?=$this->translate("hold_profile_html", ['%%url%%' => $this->recordLink()->getTabUrl($this->driver, 'Holdings') . '?catalogLogin=true'])?> </div> - <? endif; ?> - <? endif; ?> -<? endif; ?> -<? $holdingTitleHold = $this->driver->tryMethod('getRealTimeTitleHold'); + <?php endif; ?> + <?php endif; ?> +<?php endif; ?> +<?php $holdingTitleHold = $this->driver->tryMethod('getRealTimeTitleHold'); if (!empty($holdingTitleHold)): ?> <a class="placehold" data-lightbox title="<?=$this->transEsc('request_place_text')?>" href="<?=$this->recordLink()->getRequestUrl($holdingTitleHold)?>"><i class="fa fa-flag" aria-hidden="true"></i> <?=$this->transEsc('title_hold_place')?> </a> -<? endif; ?> +<?php endif; ?> -<? /* finc: add 'Online Access' in holdings-tab #13770 - VE */ ?> -<? if (!empty($urls) || $openUrlActive): ?> +<?php /* finc: add 'Online Access' in holdings-tab #13770 - VE */ ?> +<?php if (!empty($urls) || $openUrlActive || $doiActive): ?> <h3><?=$this->transEsc("Internet")?></h3> - <? if (!empty($urls)): ?> - <? foreach ($urls as $current): ?> + <?php if (!empty($urls)): ?> + <?php foreach ($urls as $current): ?> <a href="<?=$this->escapeHtmlAttr($this->proxyUrl($current['url']))?>"><?=$this->escapeHtml($current['desc'])?></a><br/> - <? endforeach; ?> - <? endif; ?> - <? /* finc-specific snippet - #9274 - replaces if ($openUrlActive): - CK */ ?> - <? if ($openUrlActive): ?> - <? if (empty($urls)): ?> - <? $fallbackUrls = $this->driver->tryMethod('getURLs'); + <?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"> - <? foreach ($fallbackUrls as $current): ?> + <?php foreach ($fallbackUrls as $current): ?> <a href="<?=$this->escapeHtmlAttr($this->proxyUrl($current['url']))?>" target="_blank"><?=$this->escapeHtml($current['desc'])?></a><br/> - <? endforeach; ?> + <?php endforeach; ?> </span> - <? endif; ?> - <? endif; ?> + <?php endif; ?> + <?php endif; ?> <?=$openUrl->renderTemplate()?> - <? endif; ?> - <? /* finc-specific snippet - #9274 - END */ ?> -<? endif; ?> + <?php if ($doiActive): ?><?=$doi->renderTemplate()?><?php endif; ?> + <?php endif; ?> + <?php /* finc-specific snippet - #9274 - END */ ?> +<?php endif; ?> -<? foreach ($holdings['holdings'] as $holding): ?> - <? /* nxt line = finc-specific - #7841@56988450 - CK */ ?> - <? $holdingsEmpty = false; ?> - <? /* this next line produces an empty h3 heading in some cases - should be solved more elegantly - Fixme - CK*/ ?> +<?php foreach ($holdings['holdings'] ?? [] as $holding): ?> + <?php /* nxt line = finc-specific - #7841@56988450 - CK */ ?> + <?php $holdingsEmpty = false; ?> + <?php /* this next line produces an empty h3 heading in some cases - should be solved more elegantly - Fixme - CK */ ?> <h3> - <? $locationText = $this->transEsc('location_' . $holding['location'], [], $holding['location']); ?> - <? if (isset($holding['locationhref']) && $holding['locationhref']): ?> + <?php $locationText = $this->transEsc('location_' . $holding['location'], [], $holding['location']); ?> + <?php if (isset($holding['locationhref']) && $holding['locationhref']): ?> <a href="<?=$holding['locationhref']?>" target="_blank"><?=$locationText?></a> - <? else: ?> + <?php else: ?> <?=$locationText?> - <? endif; ?> + <?php endif; ?> </h3> - <? /* finc: this next section produces an empty table in some cases - the table borders collapse, producing a thick line - should be solved more elegantly - Fixme - CK*/ ?> - <? /* nxt line = finc-specific - branch info - CK */ ?> - <? if (isset($holding['locationid'])): ?> + <?php /* nxt line = finc-specific - branch info - CK */ ?> + <?php if (isset($holding['locationid'])): ?> <?=$this->branchInfo($this->driver)->getBranchInfo($holding['locationid']);?> - <? endif; ?> + <?php endif; ?> + <?php /* finc: this next section produces an empty table in some cases - the table borders collapse, producing a thick line - should be solved more elegantly - Fixme - CK*/ ?> <table class="table table-striped"> - <? /* Table summary not supported in html 5, finc-specific solution, CK */ ?> - <caption class="sr-only"><?=$this->transEsc('holdings_details_from', ['%%location%%' => $this->transEsc($holding['location'])]) ?></caption> - <? /* finc: change order and structure of table #13606 - VE */ ?> - <? foreach ($holding['items'] as $row): ?> - <? - // AJAX Check record? - $check = isset($row['check']) && $row['check']; - $checkStorageRetrievalRequest = isset($row['checkStorageRetrievalRequest']) && $row['checkStorageRetrievalRequest']; - $checkILLRequest = isset($row['checkILLRequest']) && $row['checkILLRequest']; - + <caption class="sr-only"><?=$this->transEsc('holdings_details_from', ['%%location%%' => $this->transEsc($holding['location'])])?></caption> + <?php /* finc: change order and structure of table #13606 - VE */ ?> + <?php foreach ($holding['items'] as $row): ?> + <?php // finc: nxt line - emailholds #6096 - CK - $checkEmailHold = (isset($row['checkEmailHold']) && $row['checkEmailHold']); + $checkEmailHold = (isset($holding['checkEmailHold']) && $holding['checkEmailHold']); + try { + echo $this->context($this)->renderInContext( + 'RecordTab/holdingsils/' . $this->tab->getTemplate() . '.phtml', + ['holding' => $row] + ); + } catch (Exception $e) { + echo $this->context($this)->renderInContext( + 'RecordTab/holdingsils/standard.phtml', + ['holding' => $row] + ); + } ?> - <? if (isset($row['barcode']) && $row['barcode'] != ""): ?> - <tr vocab="http://schema.org/" typeof="Offer"> - <? /* finc: remove transEsc("Copy") with number #13606 - VE */ ?> - <td class="availability-column"> - <? if ($row['reserve'] == "Y"): ?> - <link property="availability" href="http://schema.org/InStoreOnly"/> - <?=$this->transEsc("On Reserve - Ask at Circulation Desk")?><br/> - <? endif; ?> - <? if (isset($row['use_unknown_message']) && $row['use_unknown_message']): ?> - <span class="text-muted"><?=$this->transEsc("status_unknown_message")?></span> - <? else: ?> - </td> - <td> - <? if ($row['availability']): ?> - <? /* Begin Available Items (Holds) */ ?> - <span class="text-success"><?=$this->transEsc("Available")?> - <link property="availability" href="http://schema.org/InStock"/></span> - <? if (isset($row['link']) && $row['link']): ?> - <? /* finc: add class .hidden-print + add title, CK */ ?> - <a class="<?=$check ? 'checkRequest ' : ''?>placehold hidden-print" <? if (!empty($row['linkLightbox'])): ?>data-lightbox <? endif; ?>href="<?=$this->recordLink()->getRequestUrl($row['link'])?>" title="<?=$this->transEsc($check ? "Check Hold" : "Place a Hold")?>"><i class="fa fa-flag" aria-hidden="true"></i> <?=$this->transEsc($check ? "Check Hold" : "Place a Hold")?></a> - <? endif; ?> - <? if (isset($row['storageRetrievalRequestLink']) && $row['storageRetrievalRequestLink']): ?> - <a class="<?=$checkStorageRetrievalRequest ? 'checkStorageRetrievalRequest ' : ''?> placeStorageRetrievalRequest" data-lightbox href="<?=$this->recordLink()->getRequestUrl($row['storageRetrievalRequestLink'])?>"><i class="fa fa-flag" aria-hidden="true"></i> <?=$this->transEsc($checkStorageRetrievalRequest ? "storage_retrieval_request_check_text" : "storage_retrieval_request_place_text")?></a> - <? endif; ?> - <? /* finc-specific additional insert - #6096 - CK */ ?> - <? if (isset($row['emailHoldLink']) && $row['emailHoldLink']): ?> - <a class="<?=$checkEmailHold ? 'checkEmailHold ' : ''?>placeEmailHold " data-lightbox href="<?=$this->recordLink()->getRequestUrl($row['emailHoldLink'])?>" title="<?=$this->transEsc($checkEmailHold ? "EmailHold::email_hold_check_text" : "EmailHold::email_hold_place_text")?>"><i class="fa fa-flag"></i> <?=$this->transEsc($checkEmailHold ? "EmailHold::email_hold_check_text" : "EmailHold::email_hold_place_text")?></a> - <? endif; ?> - <? /* finc-specific insert - #6096 - END */ ?> - <? else: ?> - <? /* Begin Unavailable Items (Recalls) */ ?> - <? /* finc: use empty row status and transEsc 'Unavailable', CK */ ?> - <span class="text-danger"><?=empty($row['status']) ? $this->transEsc("Unavailable") : $this->transEsc($row['status'])?> - <link property="availability" href="http://schema.org/OutOfStock"/></span> - <? if (isset($row['returnDate']) && $row['returnDate']): ?>– <span><?=$this->escapeHtml($row['returnDate'])?></span><? endif; ?> - <? if (isset($row['duedate']) && $row['duedate']): ?> - <? /* finc: keep nbsp + ndash or due date text will bump into alert, CK */ ?> - – <span><?=$this->transEsc("Due")?>: <?=$this->escapeHtml($row['duedate'])?></span> - <? endif; ?> - <? if (isset($row['requests_placed']) && $row['requests_placed'] > 0): ?> - <span><?=$this->transEsc("Requests")?>: <?=$this->escapeHtml($row['requests_placed'])?></span> - <? endif; ?> - <? if (isset($row['link']) && $row['link']): ?> - <a class="<?=$check ? 'checkRequest' : ''?> placehold" <? if (!empty($row['linkLightbox'])): ?>data-lightbox <? endif; ?>href="<?=$this->recordLink()->getRequestUrl($row['link'])?>"><i class="fa fa-flag" aria-hidden="true"></i> <?=$this->transEsc($check ? "Check Recall" : "Recall This")?></a> - <? endif; ?> - <? endif; ?> - <? /* finc: use && empty row item notes - CK */ ?> - <? if (isset($row['item_notes']) && !empty($row['item_notes'])): ?> - <div class="item-notes"> - <strong><?=$this->transEsc("Item Notes")?>:</strong> - <ul> - <? foreach ($row['item_notes'] as $item_note): ?> - <li><?=$this->escapeHtml($item_note)?></li> - <? endforeach; ?> - </ul> - </div> - <? endif; ?> - <? endif; ?> - <? /* Embed item structured data: library, barcode, call number */ ?> - <? if ($row['location']): ?> - <meta property="offeredBy" content="<?=$this->escapeHtmlAttr($row['location'])?>"/> - <? endif; ?> - <? if ($row['barcode']): ?> - <meta property="serialNumber" content="<?=$this->escapeHtmlAttr($row['barcode'])?>"/> - <? endif; ?> - <? if ($row['callnumber']): ?> - <meta property="sku" content="<?=$this->escapeHtmlAttr($row['callnumber'])?>"/> - <? endif; ?> - <? /* Declare that the item is to be borrowed, not for sale */ ?> - <link property="itemOffered" href="#record"/> - <!-- finc: price tags can be anywhere but seem to be required for product --> - <meta property="price" content="0"> - <meta property="priceCurrency" content="€"> - </td> - - <? /* finc: change separate <tr>-element to <td> with including <span> #13606 - VE */ ?> - <td> - <? $callNos = $this->tab->getUniqueCallNumbers($holding['items']); - if (!empty($callNos)): ?> - <span> - <? /* finc: no links back to alphabrows here - CK */ ?> - <? foreach ($callNos as $callNo): ?> - <?=$this->transEsc("Call Number")?>: <?=$this->escapeHtml($callNo)?><br/> - <? endforeach; ?> - </span> - <? endif; ?> - <? if (isset($holding['textfields'])): foreach ($holding['textfields'] as $textFieldName => $textFields): ?> - <span> - <? foreach ($textFields as $current): ?> - <?=$textFieldName == 'summary' ? $this->transEsc("Volume Holdings") : $this->transEsc(ucfirst($textFieldName))?>: <?=$this->escapeHtml($current)?><br/> - <? endforeach; ?> - </span> - <? endforeach; endif; ?> - </td> - </tr> - <? endif; ?> - <? endforeach; ?> - - <? if (!empty($holding['purchase_history'])): ?> + <?php endforeach; ?> + <? /* finc: we use call numbers in the table after "Notes" + We don't use the links to alphabrowse - CK */ ?> + <?php $callNos = $this->tab->getUniqueCallNumbers($holding['items']); if (!empty($callNos)): ?> + <tr> + <th> + <?=$this->transEsc("Call Number")?>: + </th> + <td> + <?php foreach ($callNos as $callNo): ?> + <?=$this->escapeHtml($callNo)?> + <br /> + <?php endforeach; ?> + </td> + </tr> + <?php endif; ?> + <?php if (isset($holding['textfields'])): foreach ($holding['textfields'] as $textFieldName => $textFields): ?> + <tr> + <?php // Translation for summary is a special case for backwards-compatibility ?> + <th><?=$textFieldName == 'summary' ? $this->transEsc("Volume Holdings") : $this->transEsc(ucfirst($textFieldName))?>:</th> + <td> + <?php foreach ($textFields as $current): ?> + <?=$this->escapeHtml($current)?><br/> + <?php endforeach; ?> + </td> + </tr> + <?php endforeach; endif; ?> + <? /* finc: we use call numbers after "Notes" - END */ ?> + <?php if (!empty($holding['purchase_history'])): ?> <tr> <th><?=$this->transEsc("Most Recent Received Issues")?>:</th> <td> - <? foreach ($holding['purchase_history'] as $current): ?> + <?php foreach ($holding['purchase_history'] as $current): ?> <?=$this->escapeHtml($current['issue'])?><br/> - <? endforeach; ?> + <?php endforeach; ?> </td> </tr> - <? endif; ?> + <?php endif; ?> </table> -<? endforeach; ?> +<?php endforeach; ?> -<? /* finc-specific: nxt 3 lines - #7841@56988450 - CK */ ?> -<? if ($holdingsEmpty && $this->driver->tryMethod('getLocalOrderInformation') == 'e'): ?> +<?php /* finc-specific: nxt 3 lines - #7841@56988450 - CK */ ?> +<?php if ($holdingsEmpty && $this->driver->tryMethod('getLocalOrderInformation') == 'e'): ?> <h3><?=$this->transEsc("title_ordered_by_library")?></h3> -<? endif; ?> +<?php endif; ?> -<? /* finc-specific - external access - #9245 - CK */ ?> -<? if (!empty($extUrls)): ?> +<?php /* finc-specific - external access - #9245 - CK */ ?> +<?php if (!empty($extUrls)): ?> <h3><?=$this->transEsc("external_access")?></h3> - <? if (!empty($extUrls)): ?> - <? foreach ($extUrls as $current): ?> + <?php if (!empty($extUrls)): ?> + <?php foreach ($extUrls as $current): ?> <a href="<?=$this->escapeHtmlAttr($this->proxyUrl($current['url']))?>"><?=$this->escapeHtml($this->transEsc($current['desc']))?></a> <br/> - <? endforeach; ?> - <? endif; ?> -<? endif; ?> -<? /* finc-specific - external access - END */ ?> + <?php endforeach; ?> + <?php endif; ?> +<?php endif; ?> +<?php /* finc-specific - external access - END */ ?> -<? $history = $this->driver->getRealTimeHistory(); ?> -<? if (is_array($history) && !empty($history)): ?> +<?php $history = $this->driver->getRealTimeHistory(); ?> +<?php if (is_array($history) && !empty($history)): ?> <h3><?=$this->transEsc("Most Recent Received Issues")?></h3> <table class="table table-striped"> - <? foreach ($history as $row): ?> + <?php foreach ($history as $row): ?> <tr> <td><?=$this->escapeHtml($row['issue'])?></td> </tr> - <? endforeach; ?> + <?php endforeach; ?> </table> -<? endif; ?> +<?php endif; ?> <!-- finc: recordTab - holdingsils - END --> diff --git a/themes/finc/templates/RecordTab/holdingsils/standard.phtml b/themes/finc/templates/RecordTab/holdingsils/standard.phtml new file mode 100644 index 0000000000000000000000000000000000000000..91e177f3400c5d609f63ce87aa6bd6ef0104a9f8 --- /dev/null +++ b/themes/finc/templates/RecordTab/holdingsils/standard.phtml @@ -0,0 +1,110 @@ +<!-- finc - recordtab - holdingsils - standard --> +<?php /* This is a new file introduced in VF5 -- it originated from the old holdingsils file, for history, check there, CK */ ?> +<?php if (strlen($holding['barcode'] ?? '') > 0): ?> +<?php + $check = $holding['check'] ?? false; + $checkStorageRetrievalRequest = $holding['checkStorageRetrievalRequest'] ?? false; + $checkILLRequest = $holding['checkILLRequest'] ?? false; + // finc: nxt line - emailholds #6096 - CK + $checkEmailHold = (isset($holding['checkEmailHold']) && $holding['checkEmailHold']); +?> +<tr vocab="http://schema.org/" typeof="Offer"> + <?php /* finc: remove transEsc("Copy") and number from TH, #13606 - VE */ /* + <th class="copy-number"><?=$this->transEsc("Copy")?> <?=$this->escapeHtml($holding['number'])?> + <?php if ($holding['enumchron'] ?? false): ?> + <span class="enumchron">(<?=$this->escapeHtml($holding['enumchron'])?>)</span> + <?php endif; ?> + </th> + */ ?> + <td class="availability-column"> + <?php if ($holding['reserve'] == "Y"): ?> + <link property="availability" href="http://schema.org/InStoreOnly"/> + <?=$this->transEsc("On Reserve - Ask at Circulation Desk")?><br/> + <?php endif; ?> + <?php if ($holding['use_unknown_message'] ?? false): ?> + <span class="text-muted"><?=$this->transEsc("status_unknown_message")?></span> + <?php else: ?> + <?php if ($holding['availability'] ?? false): ?> + <?php /* Begin Available Items (Holds) */ ?> + <span class="text-success"><?=$this->transEsc("Available")?> + <link property="availability" href="http://schema.org/InStock"/> + </span> + <?php if ($holding['link'] ?? false): ?> + <?php /* finc: add class .hidden-print + add title, CK */ ?> + <a class="<?=$check ? 'checkRequest ' : ''?>placehold hidden-print" <?php if (!empty($holding['linkLightbox'])): ?>data-lightbox <?php endif; ?>href="<?=$this->recordLink()->getRequestUrl($holding['link'])?>" title="<?=$this->transEsc($check ? "Check Hold" : "Place a Hold")?>"><i class="fa fa-flag" aria-hidden="true"></i> <?=$this->transEsc($check ? "Check Hold" : "Place a Hold")?> + </a> + <?php endif; ?> + <?php if ($holding['storageRetrievalRequestLink'] ?? false): ?> + <a class="<?=$checkStorageRetrievalRequest ? 'checkStorageRetrievalRequest ' : ''?> placeStorageRetrievalRequest" data-lightbox href="<?=$this->recordLink()->getRequestUrl($holding['storageRetrievalRequestLink'])?>"><i class="fa fa-flag" aria-hidden="true"></i> <?=$this->transEsc($checkStorageRetrievalRequest ? "storage_retrieval_request_check_text" : "storage_retrieval_request_place_text")?> + </a> + <?php endif; ?> + <?php if ($holding['ILLRequestLink'] ?? false): ?> + <a class="<?=$checkILLRequest ? 'checkILLRequest ' : ''?>placeILLRequest" data-lightbox href="<?=$this->recordLink()->getRequestUrl($holding['ILLRequestLink'])?>"><i class="fa fa-flag" aria-hidden="true"></i> <?=$this->transEsc($checkILLRequest ? "ill_request_check_text" : "ill_request_place_text")?> + </a> + <?php endif; ?> + <?php /* finc-specific additional insert, newspaper orders via mail - #6096 - CK */ ?> + <?php if (isset($holding['emailHoldLink']) && $holding['emailHoldLink']): ?> + <a class="<?=$checkEmailHold ? 'checkEmailHold ' : ''?>placeEmailHold " data-lightbox href="<?=$this->recordLink()->getRequestUrl($holding['emailHoldLink'])?>" title="<?=$this->transEsc($checkEmailHold ? "EmailHold::email_hold_check_text" : "EmailHold::email_hold_place_text")?>"><i class="fa fa-flag"></i> <?=$this->transEsc($checkEmailHold ? "EmailHold::email_hold_check_text" : "EmailHold::email_hold_place_text")?></a> + <?php endif; ?> + <? /* finc-specific insert - #6096 - END */ ?> + <?php else: ?> + <?php /* Begin Unavailable Items (Recalls) */ ?> + <?php /* finc: use empty status and transEsc 'Unavailable', CK */ ?> + <span class="text-danger"><?=empty($holding['status']) ? $this->transEsc("Unavailable") : $this->transEsc($holding['status'])?> <link property="availability" href="http://schema.org/OutOfStock"/> + </span> + <?php if ($holding['returnDate'] ?? false): ?>– <span><?=$this->escapeHtml($holding['returnDate'])?></span><?php endif; ?> + <?php if ($holding['duedate'] ?? false): ?> + <?php /* finc: keep nbsp + ndash or due date text will bump into alert, CK */ ?> + – <span><?=$this->transEsc("Due")?>: <?=$this->escapeHtml($holding['duedate'])?></span> + <?php endif; ?> + <?php if (($holding['requests_placed'] ?? 0) > 0): ?> + <span><?=$this->transEsc("Requests")?>: <?=$this->escapeHtml($holding['requests_placed'])?></span> + <?php endif; ?> + <?php if ($holding['link'] ?? false): ?> + <a class="<?=$check ? 'checkRequest' : ''?> placehold" <?php if (!empty($holding['linkLightbox'])): ?>data-lightbox + <?php endif; ?>href="<?=$this->recordLink()->getRequestUrl($holding['link'])?>"><i class="fa fa-flag" + aria-hidden="true"></i> <?=$this->transEsc($check ? "Check Recall" : "Recall This")?></a> + <?php endif; ?> + <?=$this->relais()->renderButtonIfActive($this->driver ?? null)?> + <?php endif; ?> + </td> + <td class="notes"> + <?php if (isset($holding['item_notes'])): ?> + <div class="item-notes"> + <strong><?=$this->transEsc("Item Notes")?>:</strong> + <ul> + <?php foreach ($holding['item_notes'] as $item_note): ?> + <li><?=$this->escapeHtml($item_note)?></li> + <?php endforeach; ?> + </ul> + </div> + <?php endif; ?> + <?php endif; ?> + <?php /* Embed item structured data: library, barcode, call number */ ?> + <?php if ($holding['location'] ?? false): ?> + <meta property="offeredBy" content="<?=$this->escapeHtmlAttr($holding['location'])?>"/> + <?php endif; ?> + <?php if ($holding['barcode'] ?? false): ?> + <meta property="serialNumber" content="<?=$this->escapeHtmlAttr($holding['barcode'])?>"/> + <?php endif; ?> + <?php if ($holding['callnumber'] ?? false): ?> + <meta property="sku" content="<?=$this->escapeHtmlAttr($holding['callnumber'])?>"/> + <?php endif; ?> + <?php /* Declare that the item is to be borrowed, not for sale */ ?> + <link property="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut"/> + <link property="itemOffered" href="#record"/> + <?php /* finc: price tags can be anywhere but seem to be required for product */ ?> + <meta property="price" content="0"> + <meta property="priceCurrency" content="€"> + + <?php if (isset($holding['textfields'])): foreach ($holding['textfields'] as $textFieldName => $textFields): ?> + <span> + <?php foreach ($textFields as $current): ?> + <?=$textFieldName == 'summary' ? $this->transEsc("Volume Holdings") : $this->transEsc(ucfirst($textFieldName))?>: <?=$this->escapeHtml($current)?><br/> + <?php endforeach; ?> + </span> + <?php endforeach; endif; ?> + </td> +</tr> +<?php endif; ?> +<!-- finc - recordtab - holdingsils - standard - END --> diff --git a/themes/finc/templates/RecordTab/serviceebl.phtml b/themes/finc/templates/RecordTab/serviceebl.phtml index d5a7df56b07f935182aa18dfb91d65b3a7953696..edb3e1171bcbc3daeae2214b6fe827fb5b0105e2 100644 --- a/themes/finc/templates/RecordTab/serviceebl.phtml +++ b/themes/finc/templates/RecordTab/serviceebl.phtml @@ -1,4 +1,4 @@ -<? +<?php // Set page title. $this->headTitle($this->translate('EBL') . ': ' . $this->driver->getBreadcrumb()); @@ -6,7 +6,7 @@ $this->headTitle($this->translate('EBL') . ': ' . $this->driver->getBreadcrumb() $link = $this->tab->getLinkEBL(); ?> - <h4>EBL</h4> -<? foreach ($link as $href): ?> - <a href="<?= $href['url'] ?>"><?= $href['desc'] ?></a> -<? endforeach; ?> +<h4>EBL</h4> +<?php foreach ($link as $href): ?> + <a href="<?=$href['url']?>"><?=$href['desc']?></a> +<?php endforeach; ?> diff --git a/themes/finc/templates/RecordTab/staffviewai.phtml b/themes/finc/templates/RecordTab/staffviewai.phtml index ae15dacd5a3d6f6be004d8932dd55c6c45ac4ba7..ed6fb81a856bebf4df1646634a51927bcbfb9aa4 100644 --- a/themes/finc/templates/RecordTab/staffviewai.phtml +++ b/themes/finc/templates/RecordTab/staffviewai.phtml @@ -1,37 +1,45 @@ <!-- finc: recordtab - staffviewai --> -<? +<?php // Set page title. $this->headTitle($this->translate('Staff View') . ': ' . $this->driver->getBreadcrumb()); ?> <table class="citation table table-striped"> - <? foreach ($this->driver->getAIRecord() as $field => $values): ?> + <?php foreach ($this->driver->getAIRecord() as $field => $values): ?> + <tr> + <th><?=$this->escapeHtml($field)?></th> + <td> + <?php if (!is_array($values)) { + $values = array($values); + } ?> + <?php foreach ($values as $value): ?> + <?=$this->escapeHtml(is_array($value) ? print_r($value, true) : $value)?><br/> + <?php endforeach; ?> + </td> + </tr> + <?php endforeach; ?> + <?php /* the following introduced in 9934*/ ?> + <?php if ($openURL = $this->driver->getOpenUrl()): ?> + <tr> + <th><?=$this->escapeHtml('openURL')?></th> + <td> + <?=$this->escapeHtml($openURL)?><br/> + </td> + </tr> + <?php endif; ?> + <?php $fields = $this->driver->getRawData(); + if (!empty($fields)): ?> + <tr> + <th><?=$this->translate('SOLR')?></th> + <td></td> + </tr> + <?php ksort($fields); + foreach ($fields as $key => $values): ?> + <?php if ($key === 'fullrecord') continue; ?> <tr> - <th><?=$this->escapeHtml($field)?></th> - <td> - <? if (!is_array($values)) { $values = array($values); } ?> - <? foreach ($values as $value): ?> - <?=$this->escapeHtml(is_array($value) ? print_r($value, true) : $value)?><br /> - <? endforeach; ?> - </td> + <th><?=$this->escapeHtml($key)?></th> + <td><?=$this->escapeHtml(is_array($values) ? implode(', ', $values) : $values)?></td> </tr> - <? endforeach; ?> - <? /* the following introduced in 9934*/ ?> - <? if ($openURL = $this->driver->getOpenUrl()): ?> - <tr> - <th><?=$this->escapeHtml('openURL')?></th> - <td> - <?=$this->escapeHtml($openURL)?><br /> - </td> - </tr> - <? endif; ?> - <? $fields = $this->driver->getRawData(); - if (!empty($fields)): ?> - <tr><th><?=$this->translate('SOLR')?></th><td></td></tr> - <? ksort($fields); - foreach($fields as $key => $values): ?> - <? if ($key === 'fullrecord') continue;?> - <tr><th><?=$this->escapeHtml($key)?></th><td><?= $this->escapeHtml(is_array($values) ? implode(', ',$values) : $values)?></td></tr> - <? endforeach ?> - <? endif; ?> + <?php endforeach ?> + <?php endif; ?> </table> <!-- finc: recordtab - staffviewai - END --> diff --git a/themes/finc/templates/RecordTab/staffviewmarc.phtml b/themes/finc/templates/RecordTab/staffviewmarc.phtml index a2901909510ffda6c7306425847bc6ee347d42ee..81a43575747ce1735c9fa4effa6df2023a71bd08 100644 --- a/themes/finc/templates/RecordTab/staffviewmarc.phtml +++ b/themes/finc/templates/RecordTab/staffviewmarc.phtml @@ -1,27 +1,30 @@ <!-- finc: recordtab - staffviewmarc --> -<? - // Set page title. - $this->headTitle($this->translate('Staff View') . ': ' . $this->driver->getBreadcrumb()); +<?php +// Set page title. +$this->headTitle($this->translate('Staff View') . ': ' . $this->driver->getBreadcrumb()); ?> <?=\VuFind\XSLT\Processor::process('record-marc.xsl', $this->driver->getXML('marc21'))?> -<? /* the following introduced in 9934*/ ?> -<? if ($openURL = $this->driver->getOpenUrl()): ?> - <tr> - <th><?=$this->escapeHtml('openURL')?></th> - <td> - <?=$this->escapeHtml($openURL)?><br /> - </td> - </tr> -<? endif; ?> -<? $fields = $this->driver->getRawData(); +<?php /* the following introduced in 9934*/ ?> +<?php if ($openURL = $this->driver->getOpenUrl()): ?> + <tr> + <th><?=$this->escapeHtml('openURL')?></th> + <td> + <?=$this->escapeHtml($openURL)?><br/> + </td> + </tr> +<?php endif; ?> +<?php $fields = $this->driver->getRawData(); if (!empty($fields)): ?> - <table class="citation table table-striped"> - <caption><?=$this->translate('SOLR')?></caption> - <? ksort($fields); - foreach($fields as $key => $values): ?> - <? if ($key === 'fullrecord') continue;?> - <tr><th><?=$this->escapeHtml($key)?></th><td><?= $this->escapeHtml(is_array($values) ? implode(', ',$values) : $values)?></td></tr> - <? endforeach ?> - </table> -<? endif; ?> + <table class="citation table table-striped"> + <caption><?=$this->translate('SOLR')?></caption> + <?php ksort($fields); + foreach ($fields as $key => $values): ?> + <?php if ($key === 'fullrecord') continue; ?> + <tr> + <th><?=$this->escapeHtml($key)?></th> + <td><?=$this->escapeHtml(is_array($values) ? implode(', ', $values) : $values)?></td> + </tr> + <?php endforeach ?> + </table> +<?php endif; ?> <!-- finc: recordtab - staffviewmarc - END --> diff --git a/themes/finc/templates/RecordTab/topics.phtml b/themes/finc/templates/RecordTab/topics.phtml index a483e1e9caf3279e11b30636eea121066b22b9cd..d2792298ec0e604b1c1aa76c288ab5cbf9527bbe 100644 --- a/themes/finc/templates/RecordTab/topics.phtml +++ b/themes/finc/templates/RecordTab/topics.phtml @@ -1,67 +1,66 @@ <!-- finc: recordtab - topics --> -<? +<?php // Set page title. $this->headTitle($this->translate('Topics') . ': ' . $this->driver->getBreadcrumb()); ?> <table class="table table-striped"> - <? /* Table summary not supported in html 5, finc-specific solution, CK */ ?> <caption class="sr-only"> <?=$this->transEsc('Topics')?> </caption> -<? if ($rvk = $this->driver->tryMethod('getRvkWithMetadata')): ?> - <? $contentDisplayed = true; ?> +<?php if ($rvk = $this->driver->tryMethod('getRvkWithMetadata')): ?> + <?php $contentDisplayed = true; ?> <tr> <th><?=$this->transEsc('RVK')?>:</th> <td> - <? $i = 0; foreach ($rvk as $item): ?> + <?php $i = 0; foreach ($rvk as $item): ?> <?=($i>0?"<br />":"") //no linebreak after last item ?> <?=$item['rvk']?> - <? if (isset($item['level']) || isset($item['name'])): ?> - <? + <?php if (isset($item['level']) || isset($item['name'])): ?> + <?php $tooltip_content = "<ul class='no-bullet'>" . (isset($item['name']) ? "<li><strong>" . $item['name'] . "</strong></li>" : ""); if (isset($item['level']) && count($item['level'])) { - foreach ($item['level'] as $level) { - $tooltip_content .= "<li>" . $level . "</li>"; - } + foreach ($item['level'] as $level) { + $tooltip_content .= "<li>" . $level . "</li>"; + } } $tooltip_content .= "</ul>"; ?> - <? endif; ?> + <?php endif; ?> <span <?=(isset($tooltip_content) ? 'data-toggle="tooltip" data-html="true" title="' . $tooltip_content . '"' : "")?>> <a href="<?=$this->record($this->driver)->getLink('rvk', $item['rvk'])?>"> <i class="fa fa-search" aria-hidden="true"></i> <?=$this->transEsc('Find Similar Items');?></a> </span> - <? $i++; ?> - <? endforeach; ?> + <?php $i++; ?> + <?php endforeach; ?> </td> </tr> -<? endif; ?> +<?php endif; ?> -<? $topics = $this->driver->getTopics(); if (!empty($topics) && is_array($topics)): ?> - <? $contentDisplayed = true; ?> +<?php $topics = $this->driver->getTopics(); if (!empty($topics) && is_array($topics)): ?> + <?php $contentDisplayed = true; ?> <tr> <th><?=$this->transEsc('Subjects')?>: </th> <td> - <? foreach ($topics as $field): ?> + <?php foreach ($topics as $field): ?> <div class="subject-line" property="keywords"> - <? $subject = ''; ?> - <? if(count($field) == 1 && !isset($field['subject'])) $field = explode('--', $field[0]); ?> - <? if(isset($field['subject'])): // extended topics ?> - <? $field = $field['subject']; ?> - <? endif; ?> - <? $i = 0; foreach ($field as $subfield): ?> + <?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) ? '' : ' > '?> - <? $subject = trim($subject . ' ' . $subfield); ?> + <?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> - <? endforeach; ?> + <?php endforeach; ?> </div> - <? endforeach; ?> + <?php endforeach; ?> </td> </tr> -<? endif; ?> +<?php endif; ?> -<? if (!isset($contentDisplayed) || !$contentDisplayed): // Avoid errors if there were no rows above ?> +<?php if (!isset($contentDisplayed) || !$contentDisplayed): // Avoid errors if there were no rows above ?> <tr><td><?=$this->transEsc('Topics unavailable')?></td></tr> -<? endif; ?> +<?php endif; ?> </table> <!-- finc: recordtab - topics - END --> diff --git a/themes/finc/templates/ajax/resolverLinks.phtml b/themes/finc/templates/ajax/resolverLinks.phtml index 8c82f05cd26c4763d70d97d954902c4462cffff8..9b46024cabfd134f762343dc09fb45b715ec86fe 100644 --- a/themes/finc/templates/ajax/resolverLinks.phtml +++ b/themes/finc/templates/ajax/resolverLinks.phtml @@ -1,78 +1,78 @@ <!-- finc: ajax - resolverlinks --> <div> - <? /* finc-specific change #8447 - CK */ ?> - <? $noResolverContent = true; ?> - <? if (!empty($this->electronic)): ?> - <? $noResolverContent = false; ?> - <? /* finc-specific change #8447 - END */ ?> + <?php /* finc-specific change #8447 - CK */ ?> + <?php $noResolverContent = true; ?> + <?php if (!empty($this->electronic)): ?> + <?php $noResolverContent = false; ?> + <?php /* finc-specific change #8447 - END */ ?> <div class="openurls"> - <? /* + <?php /* <strong><?=$this->transEsc('Electronic')?></strong> */ ?> <ul> - <? foreach ($this->electronic as $link): ?> + <?php foreach ($this->electronic as $link): ?> <li> - <? if (!empty($link['href'])): ?> - <? /* finc-specific change #7986 - CK - traffic light */ ?> - <div <? if(!empty($link['access'])): ?> data-toggle="tooltip" title="<?=$this->transEsc('resolver_link_access_'.$link['access'])?>" class="traffic-light access-<?=$link['access']?>"<? endif;?>> + <?php if (!empty($link['href'])): ?> + <?php /* finc-specific change #7986 - CK - traffic light */ ?> + <div <?php if(!empty($link['access'])): ?> data-toggle="tooltip" title="<?=$this->transEsc('resolver_link_access_'.$link['access'])?>" class="traffic-light access-<?=$link['access']?>"<?php endif;?>> <span class="first"></span> <span class="second"></span> <span class="last"></span> </div> - <? /* finc-specific change #7986 - END */ ?> + <?php /* finc-specific change #7986 - END */ ?> <a href="<?=$this->escapeHtmlAttr($link['href'])?>" title="<?=isset($link['service_type'])?$this->escapeHtmlAttr($link['service_type']):''?>"<?=!empty($link['access'])?' class="access-'.$link['access'].'"':''?>><?=isset($link['title'])?$this->escapeHtml($link['title']):''?></a> <br /> - <? /* finc-specific change #5334 - CK */ ?> + <?php /* finc-specific change #5334 - CK */ ?> <small><?=isset($link['coverage'])?$this->escapeHtml($link['coverage']):''?><?=isset($link['coverageHref'])?' <a href="'.$link['coverageHref'].'" target="_blank">'.$this->translate('Readme').'</a>':''?></small> - <? /* finc-specific change #5334 - END */ ?> - <? else: ?> + <?php /* finc-specific change #5334 - END */ ?> + <?php else: ?> <?=isset($link['title'])?$this->escapeHtml($link['title']):''?> <?=isset($link['coverage'])?$this->escapeHtml($link['coverage']):''?> - <? endif; ?> + <?php endif; ?> </li> - <? endforeach; ?> + <?php endforeach; ?> </ul> </div> - <? endif; ?> - <? /* finc-specific change - commented out in #7643 - hide info on print issues - CK */ ?> - <? /* - <? if (!empty($this->print)): ?> - <? $noResolverContent = false; ?> + <?php endif; ?> + <?php /* finc-specific change - commented out in #7643 - hide info on print issues - CK */ ?> + <?php /* + <?php if (!empty($this->print)): ?> + <?php $noResolverContent = false; ?> <div class="openurls"> <strong><?=$this->transEsc('Holdings')?></strong> <ul> - <? foreach ($this->print as $link): ?> + <?php foreach ($this->print as $link): ?> <li> - <? if (!empty($link['href'])): ?> + <?php if (!empty($link['href'])): ?> <a href="<?=$this->escapeHtmlAttr($link['href'])?>" title="<?=isset($link['service_type'])?$this->escapeHtmlAttr($link['service_type']):''?>"<?=!empty($link['access'])?' class="access-'.$link['access'].'"':''?>><?=isset($link['title'])?$this->escapeHtml($link['title']):''?></a> <?=isset($link['coverage'])?$this->escapeHtml($link['coverage']):''?> - <? else: ?> + <?php else: ?> <?=isset($link['title'])?$this->escapeHtml($link['title']):''?> <?=isset($link['coverage'])?$this->escapeHtml($link['coverage']):''?> - <? endif; ?> + <?php endif; ?> </li> - <? endforeach; ?> + <?php endforeach; ?> </ul> </div> - <? endif; ?> + <?php endif; ?> <div class="openurls"> - <? if (!empty($this->moreOptionsLink)): ?><strong><a href="<?=$this->escapeHtmlAttr($this->moreOptionsLink)?>"><?=$this->transEsc('More options')?></a></strong><?endif; ?> - <? if (!empty($this->services)): ?> + <?php if (!empty($this->moreOptionsLink)): ?><strong><a href="<?=$this->escapeHtmlAttr($this->moreOptionsLink)?>"><?=$this->transEsc('More options')?></a></strong><?php endif; ?> + <?php if (!empty($this->services)): ?> <ul> - <? foreach ($this->services as $link): ?> - <? if (!empty($link['href'])): ?> + <?php foreach ($this->services as $link): ?> + <?php if (!empty($link['href'])): ?> <li> <a href="<?=$this->escapeHtmlAttr($link['href'])?>" title="<?=isset($link['service_type'])?$this->escapeHtmlAttr($link['service_type']):''?>"<?=!empty($link['access'])?' class="access-'.$link['access'].'"':''?>><?=isset($link['title'])?$this->escapeHtml($link['title']):''?></a> </li> - <? endif; ?> - <? endforeach; ?> + <?php endif; ?> + <?php endforeach; ?> </ul> - <? endif; ?> + <?php endif; ?> </div> */ ?> - <? /* finc-specific change - commented out in #7643 - END */ ?> + <?php /* finc-specific change - commented out in #7643 - END */ ?> - <? /* finc-specific change #9274 - CK */ ?> - <? if ($noResolverContent): // no content to show, so tell the user ?> + <?php /* finc-specific change #9274 - CK */ ?> + <?php if ($noResolverContent): // no content to show, so tell the user ?> <span id="noResolverContentMessage" class="hidden"><?=$this->resolver . ': ' . $this->translate('no_resolver_links')?></span> <script>if ($('#urlsHideable').length) { $('#urlsHideable').show(); } else { $('#noResolverContentMessage').show(); }</script> - <? endif; ?> - <? /* finc-specific change #9274 - END */ ?> + <?php endif; ?> + <?php /* finc-specific change #9274 - END */ ?> </div> <!-- finc: ajax - resolverlinks - END --> diff --git a/themes/finc/templates/ajax/status-unavailable-services.phtml b/themes/finc/templates/ajax/status-unavailable-services.phtml index 065abbf1e1ae5fe2e3da1eb147a7772b3387fc1d..cf6c13247f4a15f5cb6213d061368f94f1dc4c02 100644 --- a/themes/finc/templates/ajax/status-unavailable-services.phtml +++ b/themes/finc/templates/ajax/status-unavailable-services.phtml @@ -1,13 +1,13 @@ <!-- finc: ajax - status-unavailable-services --> -<? +<?php // defaultServiceStatusMessage for multiple status and as fallback for missing translations $defaultServiceStatusMessage = 'HoldingStatus::services_available_html'; // generate serviceStatusMessage $serviceStatusMessage = - count($services) == 1 - ? $this->transEsc('HoldingStatus::service_available_' . $services[0], [], $defaultServiceStatusMessage) - : $defaultServiceStatusMessage ; + count($services) == 1 + ? $this->transEsc('HoldingStatus::service_available_' . $services[0], [], $defaultServiceStatusMessage) + : $defaultServiceStatusMessage; // build the translated serviceList for usage in defaultServiceStatusMessage $that = $this; @@ -19,8 +19,7 @@ $serviceList = implode('', array_map($translator, $services)); ?> <span class="label label-danger services-<?=implode('-', $services)?>"> <?=$serviceStatusMessage === $defaultServiceStatusMessage - ? $this->translate($serviceStatusMessage, ['%%list%%' => $serviceList]) - : '<span class="service_' . $services[0] . '">' . $serviceStatusMessage . '</span>' ?> + ? $this->translate($serviceStatusMessage, ['%%list%%' => $serviceList]) + : '<span class="service_' . $services[0] . '">' . $serviceStatusMessage . '</span>'?> </span> <!-- finc: ajax - status-unavailable-services - END --> - diff --git a/themes/finc/templates/amsl/sources-list.phtml b/themes/finc/templates/amsl/sources-list.phtml index 088665028ffce9c10c67656ab8667dd3134b978f..86a14df32c045634634cbf45add7826d2d1586d2 100644 --- a/themes/finc/templates/amsl/sources-list.phtml +++ b/themes/finc/templates/amsl/sources-list.phtml @@ -1,5 +1,5 @@ <!-- finc: amsl/sources-list - home --> -<? +<?php // Set up page title: $this->headTitle($this->translate('List of available Sources')); @@ -11,48 +11,48 @@ $this->layout()->breadcrumbs .= '</li> <li class="active">' . $this->transEsc('L <?=$this->flashmessages()?> -<? if (isset($this->sources)): ?> -<p><?=$this->transEsc('sources_explanatory_line');?></p> -<form> - <div class="form-group"> - <label for="sources-filter"><?=$this->transEsc('Filter list')?></label> - <input type="text" id="sources-filter" class="form-control" placeholder="<?=$this->transEsc('Please enter filter term')?>"> +<?php if (isset($this->sources)): ?> + <p><?=$this->transEsc('sources_explanatory_line');?></p> + <form> + <div class="form-group"> + <label for="sources-filter"><?=$this->transEsc('Filter list')?></label> + <input type="text" id="sources-filter" class="form-control" placeholder="<?=$this->transEsc('Please enter filter term')?>"> + </div> + </form> + + <p> + <button data-toggle="collapse" class="btn btn-default collapse-all-toggler" href="javascript:void(0)"><?=$this->transEsc('Expand all')?></button> + </p> + + <ul id="sources-list"> + <?php foreach ($this->sources as $label => $source): ?> + <?php if (!empty($source)): ?> + <li> + <a data-toggle="collapse" class="collapse-toggler" href="javascript:void(0)"> + <?=$label?> + <i class="fa fa-chevron-down" aria-hidden="true"></i> + <span class="sr-only"><?=$this->transEsc('Expand')?></span> + </a> + <ul class="panel-collapse collapse" aria-expanded="false"> + <?php foreach ($source as $sub_label => $collection): ?> + <li><?=$sub_label?></li> + <?php endforeach; ?> + </ul> + </li> + <?php endif; ?> + <?php endforeach; ?> + </ul> + + <div class="panel panel-primary"> + <div class="panel-body"><?=$this->transEsc('support_by_dfg');?> + <a href='http://www.dfg.de' target='_blank'> + <img src='<?=$this->imageLink('dfg_logo_text.png')?>' alt='Deutsche Forschungsgemeinschaft, DFG'> + </a> + </div> </div> -</form> - -<p> - <button data-toggle="collapse" class="btn btn-default collapse-all-toggler" href="javascript:void(0)"><?=$this->transEsc('Expand all')?></button> -</p> - -<ul id="sources-list"> - <? foreach ($this->sources as $label => $source): ?> - <? if (!empty($source)): ?> - <li> - <a data-toggle="collapse" class="collapse-toggler" href="javascript:void(0)"> - <?=$label?> - <i class="fa fa-chevron-down" aria-hidden="true"></i> - <span class="sr-only"><?=$this->transEsc('Expand')?></span> - </a> - <ul class="panel-collapse collapse" aria-expanded="false"> - <? foreach ($source as $sub_label => $collection): ?> - <li><?=$sub_label?></li> - <? endforeach; ?> - </ul> - </li> - <? endif; ?> - <? endforeach; ?> -</ul> - -<div class="panel panel-primary"> - <div class="panel-body"><?=$this->transEsc('support_by_dfg'); ?> - <a href='http://www.dfg.de' target='_blank'> - <img src='<?=$this->imageLink('dfg_logo_text.png')?>' alt='Deutsche Forschungsgemeinschaft, DFG'> - </a> - </div> -</div> -<? endif; ?> +<?php endif; ?> -<? /* run collapse togglers + introduce a case-insensitive filter that is capable of filtering multiple filtering terms */ - echo $this->inlineScript(\Zend\View\Helper\HeadScript::FILE, 'sources-display.js', 'SET'); +<?php /* run collapse togglers + introduce a case-insensitive filter that is capable of filtering multiple filtering terms */ +echo $this->inlineScript(\Zend\View\Helper\HeadScript::FILE, 'sources-display.js', 'SET'); ?> <!-- finc: amsl/sources-list - home - END --> diff --git a/themes/finc/templates/cart/cart.phtml b/themes/finc/templates/cart/cart.phtml index 89d8847254b36cd25890b495d75edb0a672e196e..2382df0601bdc2615db958f948be96b90e5f2ae6 100644 --- a/themes/finc/templates/cart/cart.phtml +++ b/themes/finc/templates/cart/cart.phtml @@ -1,5 +1,5 @@ <!-- finc: cart - cart --> -<? +<?php // Set page title. $this->headTitle($this->translate('Book Bag')); @@ -8,10 +8,10 @@ ?> <h2><?=$this->transEsc('Book Bag') ?></h2> <?=$this->flashmessages()?> -<? /* finc: use .cart class to style content below */ ?> +<?php /* finc: use .cart class to style content below */ ?> <form class="form-inline cart" action="<?=$this->url('cart-processor')?>" method="post" name="cartForm" data-lightbox-onsubmit="cartFormHandler"> <input type="hidden" id="dropdown_value"/> - <? if (!$this->cart()->isEmpty()): ?> + <?php if (!$this->cart()->isEmpty()): ?> <div class="cart-controls clearfix"> <div class="checkbox pull-left flip w-100"> <label> @@ -19,24 +19,24 @@ <?=$this->transEsc('select_page')?> </label> </div> - <? if ($this->userlist()->getMode() !== 'disabled'): ?> + <?php if ($this->userlist()->getMode() !== 'disabled'): ?> <button type="submit" class="btn btn-transparent" name="saveCart" title="<?=$this->transEsc('bookbag_save')?>" value="1"> <i class="fa fa-save" aria-hidden="true"></i> <?=$this->transEsc('Save')?> </button> - <? endif; ?> + <?php endif; ?> <button type="submit" class="btn btn-transparent" name="email" title="<?=$this->transEsc('bookbag_email')?>" value="1"> <i class="fa fa-envelope-o" aria-hidden="true"></i> <?=$this->transEsc('Email')?> </button> - <? $exportOptions = $this->export()->getActiveFormats('bulk'); if (count($exportOptions) > 0): ?> + <?php $exportOptions = $this->export()->getActiveFormats('bulk'); if (count($exportOptions) > 0): ?> <button type="submit" class="btn btn-transparent" name="export" title="<?=$this->transEsc('bookbag_export')?>" value="1"> <i class="fa fa-list-alt" aria-hidden="true"></i> <?=$this->transEsc('Export')?> </button> - <? endif; ?> + <?php endif; ?> <button type="submit" class="btn btn-transparent dropdown-toggle" name="print" title="<?=$this->transEsc('print_selected')?>" value="1"> - <i class="fa fa-print" aria-hidden="true"></i> + <i class="fa fa-printer" aria-hidden="true"></i> <?=$this->transEsc('Print')?> </button> <div class="btn-group" id="cartDelete"> @@ -60,11 +60,11 @@ </ul> </div> </div> - <? endif; ?> + <?php endif; ?> <?=$this->render('cart/contents.phtml')?> </form> -<? +<?php $script = <<<JS function submitFormWithButton(link, name) { $('#dropdown_value').attr('name', name).val(1); diff --git a/themes/finc/templates/cart/contents.phtml b/themes/finc/templates/cart/contents.phtml index 8087e8d57773599838e1a758c6492408933aefc2..2ececda64d0cd0f05fe5eecaf9328bb71a357bbf 100644 --- a/themes/finc/templates/cart/contents.phtml +++ b/themes/finc/templates/cart/contents.phtml @@ -1,28 +1,29 @@ -<? $records = $this->cart()->getRecordDetails(); +<?php $records = $this->cart()->getRecordDetails(); if (!empty($records)): ?> <hr/> <ul class="list-unstyled"> - <? foreach ($records as $i => $record): ?> + <?php foreach ($records as $i => $record): ?> <li> <div class="checkbox"> + <label> <?=$this->record($record)->getCheckbox('cart')?> - <a title="<?=$this->transEsc('View Record')?>" href="<?=$this->recordLink()->getUrl($record)?>" data-lightbox-ignore> - <? - // Collect citation data: + <a title="<?=$this->transEsc('View Record')?>" href="<?=$this->recordLink()->getUrl($record)?>" data-lightbox-ignore><?=$this->escapeHtml($record->getBreadcrumb())?> + <?php + // finc-specific: Collect citation data: $helper = $this->citation($record); $recordtype = $record->getRecordType(); ?> - <? if ($recordtype == 'ai'): ?> + <?php if ($recordtype == 'ai'): ?> <?=$helper->getCitation('APAAI')?> - <? else: ?> + <?php else: ?> <?=$helper->getCitation('APA')?> - <? endif; ?> + <?php endif; ?> </a> - + </label> </div> </li> - <? endforeach; ?> + <?php endforeach; ?> </ul> -<? else: ?> +<?php else: ?> <p class="alert alert-info"><?=$this->transEsc('bookbag_is_empty')?>.</p> -<? endif; ?> \ No newline at end of file +<?php endif; ?> \ No newline at end of file diff --git a/themes/finc/templates/collection/view.phtml b/themes/finc/templates/collection/view.phtml index 1cc948abcd590993346a6389498c4a1f49a64142..9bf735648959ae619108283cb44eabf60e0703e5 100644 --- a/themes/finc/templates/collection/view.phtml +++ b/themes/finc/templates/collection/view.phtml @@ -1,5 +1,5 @@ <!-- finc: collection - view --> -<? +<?php // Set up standard record scripts: $this->headScript()->appendFile("record.js"); $this->headScript()->appendFile("check_save_statuses.js"); @@ -25,65 +25,65 @@ $this->layout()->breadcrumbs .= '<li><a href="' . $this->url('collections-home') . '<li class="active">' . $this->recordLink()->getBreadcrumb($this->driver) . '</li>'; ?> -<? if (isset($this->scrollData) && ($this->scrollData['previousRecord'] || $this->scrollData['nextRecord'])): ?> - <? /* Pager is identical to pager in record - view! - CK */ ?> +<?php if (isset($this->scrollData) && ($this->scrollData['previousRecord'] || $this->scrollData['nextRecord'])): ?> + <?php /* Pager is identical to pager in record - view! - CK */ ?> <ul class="pager hidden-print"> - <? if ($this->scrollData['previousRecord']): ?> - <? if ($this->scrollData['firstRecord']): ?> + <?php if ($this->scrollData['previousRecord']): ?> + <?php if ($this->scrollData['firstRecord']): ?> <li class="left"> <a href="<?=$this->recordLink()->getUrl($this->scrollData['firstRecord'])?>" title="<?=$this->transEsc('First Search Result')?>" rel="nofollow">« <?=$this->transEsc('First')?></a> </li> - <? endif; ?> + <?php endif; ?> <li class="left"> <a href="<?=$this->recordLink()->getUrl($this->scrollData['previousRecord'])?>" title="<?=$this->transEsc('Previous Search Result')?>" rel="nofollow">« <?=$this->transEsc('Prev')?></a> </li> - <? else: ?> - <? if ($this->scrollData['firstRecord']): ?> + <?php else: ?> + <?php if ($this->scrollData['firstRecord']): ?> <li class="disabled left"><a href="#">« <?=$this->transEsc('First')?></a></li> - <? endif; ?> + <?php endif; ?> <li class="disabled left"><a href="#">« <?=$this->transEsc('Prev')?></a></li> - <? endif; ?> - <? /* finc-specific: li + hidden-xs, and li right below CK */ ?> + <?php endif; ?> + <?php /* finc-specific: li + hidden-xs, and li right below CK */ ?> <li class="hidden-xs"> <?=$this->transEsc('of_num_results', [ '%%position%%' => $this->localizedNumber($this->scrollData['currentPosition']), '%%total%%' => $this->localizedNumber($this->scrollData['resultTotal']) ]) ?> </li> - <? if ($this->scrollData['nextRecord']): ?> + <?php if ($this->scrollData['nextRecord']): ?> <li class="right"> <a href="<?=$this->recordLink()->getUrl($this->scrollData['nextRecord'])?>" title="<?=$this->transEsc('Next Search Result')?>" rel="nofollow"><?=$this->transEsc('Next')?> »</a> </li> - <? if ($this->scrollData['lastRecord']): ?> + <?php if ($this->scrollData['lastRecord']): ?> <li class="right"> <a href="<?=$this->recordLink()->getUrl($this->scrollData['lastRecord'])?>" title="<?=$this->transEsc('Last Search Result')?>" rel="nofollow"><?=$this->transEsc('Last')?> »</a> </li> - <? endif; ?> - <? else: ?> + <?php endif; ?> + <?php else: ?> <li class="disabled right"><a href="#"><?=$this->transEsc('Next')?> »</a></li> - <? if ($this->scrollData['lastRecord']): ?> + <?php if ($this->scrollData['lastRecord']): ?> <li class="disabled right"><a href="#"><?=$this->transEsc('Last')?> »</a></li> - <? endif; ?> - <? endif; ?> + <?php endif; ?> + <?php endif; ?> </ul> -<? endif; ?> +<?php endif; ?> -<? /* DON'T pull the toolbar in here but below, finc-specific, CK */ ?> +<?php /* DON'T pull the toolbar in here but below, finc-specific, CK */ ?> <div class="record"> - <div<? if (!$tree): /* in tree mode, do not constrain width with a class */ ?> class="<?=$this->layoutClass('mainbody') ?>"<? endif; ?>> + <div<?php if (!$tree): /* in tree mode, do not constrain width with a class */ ?> class="<?=$this->layoutClass('mainbody') ?>"<?php endif; ?>> <input type="hidden" value="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>" class="hiddenId" id="record_id"/> <input type="hidden" value="<?=$this->escapeHtmlAttr($this->driver->getSourceIdentifier())?>" class="hiddenSource"/> <?=$this->flashmessages()?> <?=$this->record($this->driver)->getCollectionMetadata()?> - <? if (count($this->tabs) > 0): ?> + <?php if (count($this->tabs) > 0): ?> <a name="tabnav"></a> <div class="record-tabs"> <ul class="nav nav-tabs"> - <? foreach ($this->tabs as $tab => $obj): ?> - <? // add current tab to breadcrumbs if applicable: + <?php foreach ($this->tabs as $tab => $obj): ?> + <?php // add current tab to breadcrumbs if applicable: $desc = $obj->getDescription(); $tab_classes = []; if (0 === strcasecmp($this->activeTab, $tab)) { @@ -102,35 +102,35 @@ $this->layout()->breadcrumbs .= '<li><a href="' . $this->url('collections-home') } ?> <li<?=count($tab_classes) > 0 ? ' class="' . implode(' ', $tab_classes) . '"' : ''?>> - <a class="<?=strtolower($tab)?>" href="<?=$this->recordLink()->getTabUrl($this->driver, $tab)?>#tabnav"<? if ($obj->supportsAjax() && in_array($tab, $this->backgroundTabs)): ?> data-background<? endif ?>><?=$this->transEsc($desc)?></a> + <a class="<?=strtolower($tab)?>" href="<?=$this->recordLink()->getTabUrl($this->driver, $tab)?>#tabnav"<?php if ($obj->supportsAjax() && in_array($tab, $this->backgroundTabs)): ?> data-background<?php endif ?>><?=$this->transEsc($desc)?></a> </li> - <? endforeach; ?> + <?php endforeach; ?> </ul> <div class="tab-content collectionDetails<?=$tree ? 'Tree' : ''?>"> - <? if (!$this->loadInitialTabWithAjax || !isset($activeTabObj) || !$activeTabObj->supportsAjax()): ?> + <?php if (!$this->loadInitialTabWithAjax || !isset($activeTabObj) || !$activeTabObj->supportsAjax()): ?> <div class="tab-pane active <?=$this->activeTab?>-tab"> <?=isset($activeTabObj) ? $this->record($this->driver)->getTab($activeTabObj) : ''?> </div> - <? endif; ?> + <?php endif; ?> </div> </div> - <? endif; ?> + <?php endif; ?> <?=$this->driver->supportsCoinsOpenURL() ? '<span class="Z3988" title="' . $this->escapeHtmlAttr($this->driver->getCoinsOpenURL()) . '"></span>' : ''?> </div> - <? if (isset($activeTabObj) && is_callable([$activeTabObj, 'getSideRecommendations'])): ?> + <?php if (isset($activeTabObj) && is_callable([$activeTabObj, 'getSideRecommendations'])): ?> <div class="<?=$this->layoutClass('sidebar')?>"> - <? /* Get the toolbar here, finc-specific, CK */ ?> + <?php /* pull the toolbar here, finc-specific, CK */ ?> <?=$this->record($this->driver)->getToolbar()?> - <? foreach ($activeTabObj->getSideRecommendations() as $current): ?> + <?php foreach ($activeTabObj->getSideRecommendations() as $current): ?> <?=$this->recommend($current)?> - <? endforeach; ?> + <?php endforeach; ?> </div> - <? endif; ?> + <?php endif; ?> </div> <?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, '$(document).ready(recordDocReady);', 'SET');?> diff --git a/themes/finc/templates/documentdeliveryservice/form.phtml b/themes/finc/templates/documentdeliveryservice/form.phtml index b22ad14920c8f358b77331db824e8ca16d0c8f37..a1f975f2ddbe87694de02945ef708ee61d13e249 100644 --- a/themes/finc/templates/documentdeliveryservice/form.phtml +++ b/themes/finc/templates/documentdeliveryservice/form.phtml @@ -1,222 +1,221 @@ <!-- finc - documentdeliveryservice - form --> +<div class="<?=$this->layoutClass('mainbody')?>"> + <h2><?=$this->transEsc('DDS::dds_form_headline')?></h2> + <?=$this->flashmessages()?> + <form method="post" action="<?=$this->url('dds-email')?>" name="docdelisForm"> + <?php if ($this->department): ?> + <input type="hidden" name="subito[hdepartment]" value="<?=$this->department?>"/> + <?php endif; ?> + <legend><?=$this->transEsc("DDS::dds_form_delivery_data")?>:</legend> + <!-- name --> + <div class="form-group"> + <label for="sname" class="control-label"><?=$this->transEsc("Name")?>:*</label> + <?php if (isset($this->error->username)): ?> + <div class="error-field"> + <?=$this->error->username;?> + </div> + <?php endif; ?> - <div class="<?=$this->layoutClass('mainbody')?>"> - <h2><?=$this->transEsc('DDS::dds_form_headline')?></h2> - <?=$this->flashmessages()?> - <form method="post" action="<?=$this->url('dds-email')?>" name="docdelisForm"> - <? if ($this->department): ?> - <input type="hidden" name="subito[hdepartment]" value="<?=$this->department?>"/> - <? endif; ?> - <legend><?=$this->transEsc("DDS::dds_form_delivery_data")?>:</legend> - <!-- name --> - <div class="form-group"> - <label for="sname" class="control-label"><?=$this->transEsc("Name")?>:*</label> - <? if (isset($this->error->username)): ?> - <div class="error-field"> - <?=$this->error->username;?> - </div> - <? endif; ?> - - <input type="text" id="sname" name="subito[username]" class="form-control" <?=(!empty($this->username) ? 'value="' . $this->username . '"' : '')?>/> + <input type="text" id="sname" name="subito[username]" class="form-control" <?=(!empty($this->username) ? 'value="' . $this->username . '"' : '')?>/> + </div> + <!-- phone --> + <div class="form-group"> + <label class="inline control-label" for="sphone"><?=$this->transEsc("DDS::form_field_phone")?>:</label> + <?php if (isset($this->error->phone)): ?> + <div class="error-field"> + <?=$this->error->phone;?> </div> - <!-- phone --> - <div class="form-group"> - <label class="inline control-label" for="sphone"><?=$this->transEsc("DDS::form_field_phone")?>:</label> - <? if (isset($this->error->phone)): ?> - <div class="error-field"> - <?=$this->error->phone;?> - </div> - <? endif; ?> - <input type="text" id="sphone" name="subito[phone]" class="form-control" <?=(!empty($this->phone) ? 'value="' . $this->phone . '"' : '')?>/> - </div> - <!-- email --> - <div class="form-group"> - <label class="inline control-label" for="semail"><?=$this->transEsc("DDS::form_field_email")?>:*</label> - <? if (isset($this->error->email)): ?> - <div class="error-field"> - <?=$this->error->email;?> - </div> - <? endif; ?> - <input type="text" id="semail" name="subito[email]" class="form-control" <?=(!empty($this->email) ? 'value="' . $this->email . '"' : '')?>/> - </div> - <!-- user id --> - <div class="form-group"> - <label class="inline control-label" for="suserid"><?=$this->transEsc("DDS::form_field_library_id")?>:*</label> - <? if (isset($this->error->userid)): ?> - <div class="error-field"> - <?=$this->error->userid;?> - </div> - <? endif; ?> - <input type="text" id="suserid" name="subito[userid]" class="form-control" <?=(!empty($this->userid) ? 'value="' . $this->userid . '"' : '')?>/> + <?php endif; ?> + <input type="text" id="sphone" name="subito[phone]" class="form-control" <?=(!empty($this->phone) ? 'value="' . $this->phone . '"' : '')?>/> + </div> + <!-- email --> + <div class="form-group"> + <label class="inline control-label" for="semail"><?=$this->transEsc("DDS::form_field_email")?>:*</label> + <?php if (isset($this->error->email)): ?> + <div class="error-field"> + <?=$this->error->email;?> </div> - <!-- division --> - <div class="form-group"> - <label class="inline control-label" for="sdivision"><?=$this->transEsc("DDS::form_field_division")?>:*</label> - <? if (isset($this->error->division)): ?> - <div class="error-field"> - <?=$this->error->division;?> - </div> - <? endif; ?> - <select id="sdivision" name="subito[division]" size="1" class="form-control"/> - <option value=""></option> - <? foreach ($this->divisions as $cat => $division): ?> - <option value="<?=$cat?>" <?=($this->division == $cat) ? 'selected="selected"' : ''?>><?=$division?></option> - <? endforeach; ?> - </select> + <?php endif; ?> + <input type="text" id="semail" name="subito[email]" class="form-control" <?=(!empty($this->email) ? 'value="' . $this->email . '"' : '')?>/> + </div> + <!-- user id --> + <div class="form-group"> + <label class="inline control-label" for="suserid"><?=$this->transEsc("DDS::form_field_library_id")?>:*</label> + <?php if (isset($this->error->userid)): ?> + <div class="error-field"> + <?=$this->error->userid;?> </div> - <!-- department --> - <div class="form-group input-sdepartment"> - <label class="inline control-label" for="sdepartment"><?=$this->transEsc("DDS::form_field_department")?>:*</label> - <? if (isset($this->error->department)): ?> - <div class="error-field"> - <?=$this->error->department;?> - </div> - <? endif; ?> - <select id="sdepartment" name="subito[department]" size="1" class="form-control"/> - <option value=""></option> - </select> + <?php endif; ?> + <input type="text" id="suserid" name="subito[userid]" class="form-control" <?=(!empty($this->userid) ? 'value="' . $this->userid . '"' : '')?>/> + </div> + <!-- division --> + <div class="form-group"> + <label class="inline control-label" for="sdivision"><?=$this->transEsc("DDS::form_field_division")?>:*</label> + <?php if (isset($this->error->division)): ?> + <div class="error-field"> + <?=$this->error->division;?> </div> - <!-- department medicine --> - <div class="form-group input-department"> - <label class="inline control-label" for="smdepartment"><?=$this->transEsc("DDS::form_field_department")?>:*</label> - <input type="text" id="smdepartment" name="subito[inputdepartment]" class="form-control" <?=(!empty($this->inputdepartment) ? 'value="' . $this->inputdepartment . '"' : '')?>/> + <?php endif; ?> + <select id="sdivision" name="subito[division]" size="1" class="form-control"/> + <option value=""></option> + <?php foreach ($this->divisions as $cat => $division): ?> + <option value="<?=$cat?>" <?=($this->division == $cat) ? 'selected="selected"' : ''?>><?=$division?></option> + <?php endforeach; ?> + </select> + </div> + <!-- department --> + <div class="form-group input-sdepartment"> + <label class="inline control-label" for="sdepartment"><?=$this->transEsc("DDS::form_field_department")?>:*</label> + <?php if (isset($this->error->department)): ?> + <div class="error-field"> + <?=$this->error->department;?> </div> + <?php endif; ?> + <select id="sdepartment" name="subito[department]" size="1" class="form-control"/> + <option value=""></option> + </select> + </div> + <!-- department medicine --> + <div class="form-group input-department"> + <label class="inline control-label" for="smdepartment"><?=$this->transEsc("DDS::form_field_department")?>:*</label> + <input type="text" id="smdepartment" name="subito[inputdepartment]" class="form-control" <?=(!empty($this->inputdepartment) ? 'value="' . $this->inputdepartment . '"' : '')?>/> + </div> - <legend><?=$this->transEsc("DDS::dds_form_details_ordered_title")?>:</legend> - <!-- author --> - <div class="form-group"> - <label class="inline control-label" for="sauthor"><?=$this->transEsc("DDS::form_field_author")?>:*</label> - <? if (isset($this->error->author)): ?> - <div class="error-field"> - <?=$this->error->author;?> - </div> - <? endif; ?> - <input type="text" id="sauthor" name="subito[author]" class="form-control" <?=(!empty($this->author) ? 'value="' . $this->author . '"' : '')?>/> + <legend><?=$this->transEsc("DDS::dds_form_details_ordered_title")?>:</legend> + <!-- author --> + <div class="form-group"> + <label class="inline control-label" for="sauthor"><?=$this->transEsc("DDS::form_field_author")?>:*</label> + <?php if (isset($this->error->author)): ?> + <div class="error-field"> + <?=$this->error->author;?> </div> - <!-- title of issue --> - <div class="form-group"> - <label class="inline control-label" for="sarticle"><?=$this->transEsc("DDS::form_field_title")?>:</label> - <? if (isset($this->error->article)): ?> - <div class="error-field"> - <?=$this->error->article;?> - </div> - <? endif; ?> - <input type="text" id="sarticle" name="subito[article]" class="form-control" <?=(!empty($this->article) ? 'value="' . $this->article . '"' : '')?>/> + <?php endif; ?> + <input type="text" id="sauthor" name="subito[author]" class="form-control" <?=(!empty($this->author) ? 'value="' . $this->author . '"' : '')?>/> + </div> + <!-- title of issue --> + <div class="form-group"> + <label class="inline control-label" for="sarticle"><?=$this->transEsc("DDS::form_field_title")?>:</label> + <?php if (isset($this->error->article)): ?> + <div class="error-field"> + <?=$this->error->article;?> </div> - <!-- title of journal --> - <div class="form-group"> - <label class="inline control-label" for="sjournal"><?=$this->transEsc("DDS::form_field_journal")?>:*</label> - <? if (isset($this->error->journal)): ?> - <div class="error-field"> - <?=$this->error->journal;?> - </div> - <? endif; ?> - <input type="text" id="sjournal" name="subito[journal]" class="form-control" <?=(!empty($this->journal) ? 'value="' . $this->journal . '"' : '')?>/> + <?php endif; ?> + <input type="text" id="sarticle" name="subito[article]" class="form-control" <?=(!empty($this->article) ? 'value="' . $this->article . '"' : '')?>/> + </div> + <!-- title of journal --> + <div class="form-group"> + <label class="inline control-label" for="sjournal"><?=$this->transEsc("DDS::form_field_journal")?>:*</label> + <?php if (isset($this->error->journal)): ?> + <div class="error-field"> + <?=$this->error->journal;?> </div> - <!-- issn --> - <div class="form-group"> - <label class="inline control-label" for="sjournal"><?=$this->transEsc("ISSN")?>:</label> - <? if (isset($this->error->issn)): ?> - <div class="error-field"> - <?=$this->error->issn;?> - </div> - <? endif; ?> - <input type="text" id="sissn" name="subito[issn]" class="form-control" <?=(!empty($this->issn) ? 'value="' . $this->issn . '"' : '')?>/> + <?php endif; ?> + <input type="text" id="sjournal" name="subito[journal]" class="form-control" <?=(!empty($this->journal) ? 'value="' . $this->journal . '"' : '')?>/> + </div> + <!-- issn --> + <div class="form-group"> + <label class="inline control-label" for="sjournal"><?=$this->transEsc("ISSN")?>:</label> + <?php if (isset($this->error->issn)): ?> + <div class="error-field"> + <?=$this->error->issn;?> </div> - <!-- publish date --> - <div class="form-group"> - <label class="inline control-label" for="spublishdate"><?=$this->transEsc("DDS::form_field_publishing_date")?>:*</label> - <? if (isset($this->error->publishdate)): ?> - <div class="error-field"> - <?=$this->error->publishdate;?> - </div> - <? endif; ?> - <input type="text" id="spublishdate" name="subito[publishdate]" class="form-control" <?=(!empty($this->publishdate) ? 'value="' . $this->publishdate . '"' : '')?>/> + <?php endif; ?> + <input type="text" id="sissn" name="subito[issn]" class="form-control" <?=(!empty($this->issn) ? 'value="' . $this->issn . '"' : '')?>/> + </div> + <!-- publish date --> + <div class="form-group"> + <label class="inline control-label" for="spublishdate"><?=$this->transEsc("DDS::form_field_publishing_date")?>:*</label> + <?php if (isset($this->error->publishdate)): ?> + <div class="error-field"> + <?=$this->error->publishdate;?> </div> - <!-- journal number --> - <div class="form-group"> - <label class="inline control-label" for="snumber"><?=$this->transEsc("DDS::form_field_volume")?>:*</label> - <? if (isset($this->error->number)): ?> - <div class="error-field"> - <?=$this->error->number;?> - </div> - <? endif; ?> - <input type="text" id="snumber" name="subito[number]" class="form-control" <?=(!empty($this->number) ? 'value="' . $this->number . '"' : '')?>/> + <?php endif; ?> + <input type="text" id="spublishdate" name="subito[publishdate]" class="form-control" <?=(!empty($this->publishdate) ? 'value="' . $this->publishdate . '"' : '')?>/> + </div> + <!-- journal number --> + <div class="form-group"> + <label class="inline control-label" for="snumber"><?=$this->transEsc("DDS::form_field_volume")?>:*</label> + <?php if (isset($this->error->number)): ?> + <div class="error-field"> + <?=$this->error->number;?> </div> - <!-- pages --> - <div class="form-group"> - <label class="inline control-label" for="spages"><?=$this->transEsc("DDS::form_field_pages")?>:*</label> - <? if (isset($this->error->pages)): ?> - <div class="error-field"> - <?=$this->error->pages;?> - </div> - <? endif; ?> - <input type="text" id="spages" name="subito[pages]" class="form-control" <?=(!empty($this->pages) ? 'value="' . $this->pages . '"' : '')?>/> + <?php endif; ?> + <input type="text" id="snumber" name="subito[number]" class="form-control" <?=(!empty($this->number) ? 'value="' . $this->number . '"' : '')?>/> + </div> + <!-- pages --> + <div class="form-group"> + <label class="inline control-label" for="spages"><?=$this->transEsc("DDS::form_field_pages")?>:*</label> + <?php if (isset($this->error->pages)): ?> + <div class="error-field"> + <?=$this->error->pages;?> </div> - <!-- remarks --> - <div class="form-group"> - <label class="inline control-label" for="sremarks"><?=$this->transEsc("DDS::form_fields_remarks")?>:</label> - <? if (isset($this->error->remarks)): ?> - <div class="error-field"> - <?=$this->error->remarks;?> - </div> - <? endif; ?> - <textarea id="sremarks" name="subito[remarks]" class="form-control"><?=(!empty($this->remarks) ? $this->remarks : '')?></textarea> + <?php endif; ?> + <input type="text" id="spages" name="subito[pages]" class="form-control" <?=(!empty($this->pages) ? 'value="' . $this->pages . '"' : '')?>/> + </div> + <!-- remarks --> + <div class="form-group"> + <label class="inline control-label" for="sremarks"><?=$this->transEsc("DDS::form_fields_remarks")?>:</label> + <?php if (isset($this->error->remarks)): ?> + <div class="error-field"> + <?=$this->error->remarks;?> </div> + <?php endif; ?> + <textarea id="sremarks" name="subito[remarks]" class="form-control"><?=(!empty($this->remarks) ? $this->remarks : '')?></textarea> + </div> <input role="button" type="submit" class="btn btn-primary" value="<?=$this->transEsc("DDS::form_button_submit")?>"/> - </form> + </form> <div class="subito-pg margin-t"> - <?=$this->transEsc("DDS::dds_text_questions")?> - <a href="mailto:info@ub.uni-leipzig.de?subject=<?=$this->transEsc("Dokumentenlieferdienst")?>">info@ub.uni-leipzig.de</a> - </div> + <?=$this->transEsc("DDS::dds_text_questions")?> + <a href="mailto:info@ub.uni-leipzig.de?subject=<?=$this->transEsc("Dokumentenlieferdienst")?>">info@ub.uni-leipzig.de</a> + </div> - <div class="input-department subito-pg"> - <div><?=$this->transEsc("Bei eventuellen Rückfragen wenden Sie sich bitte an die Abteilung Fernleihe der Medizin")?>:</div> - <div><?=$this->transEsc("Phone")?>: +49 (0)341 - 97 14014</div> - <div><?=$this->transEsc("Email")?>: <a href="mailto:zbmed.fernleihe@medizin.uni-leipzig.de?subject=<?=$this->transEsc("Dokumentenlieferdienst")?>">zbmed.fernleihe@medizin.uni-leipzig.de</a> - </div> - </div> - <div class="subito-pg"> - <p class="required"> - * <?=$this->transEsc("DDS::dds_text_mandatory_fields")?></p> + <div class="input-department subito-pg"> + <div><?=$this->transEsc("Bei eventuellen Rückfragen wenden Sie sich bitte an die Abteilung Fernleihe der Medizin")?>:</div> + <div><?=$this->transEsc("Phone")?>: +49 (0)341 - 97 14014</div> + <div><?=$this->transEsc("Email")?>: <a href="mailto:zbmed.fernleihe@medizin.uni-leipzig.de?subject=<?=$this->transEsc("Dokumentenlieferdienst")?>">zbmed.fernleihe@medizin.uni-leipzig.de</a> </div> </div> + <div class="subito-pg"> + <p class="required"> + * <?=$this->transEsc("DDS::dds_text_mandatory_fields")?></p> + </div> +</div> -<? +<?php $this->inlineScript()->captureStart(); echo <<<JS $(document).ready(function(){ - // if department already selected and post request failed then - // rebuild select menu - if ( $('input:hidden[name="subito\\[hdepartment\\]"]').val() != 'undefined') { - department.addDepartmentSelect( - $('input[name="subito\\[hdepartment\\]"]').val(), - $('select[name="subito\\[division\\]"]').val() - ); - } - $('select[name="subito\\[division\\]"]').change(function() { - department.init($(this).val()); - }); - $('.form-group input').focus(function() { - $(this).parent().prev('.error-field').hide(200); - }); - $('.form-group select').focus(function() { - $(this).parent().prev('.error-field').hide(200); - }); - /*if ( $('#loginOptions a.login').length ) { - var loginUrl = { - followup: true, - followupModule: 'Subito', - followupAction: 'Subito' - }; - $('#loginOptions a.login').attr('href', function ( index, value ) { - return value + '?' + $.param( loginUrl ); - }); - // console.log($('#loginOptions a.login').attr('href')); - }*/ + // if department already selected and post request failed then + // rebuild select menu + if ( $('input:hidden[name="subito\\[hdepartment\\]"]').val() != 'undefined') { + department.addDepartmentSelect( + $('input[name="subito\\[hdepartment\\]"]').val(), + $('select[name="subito\\[division\\]"]').val() + ); + } + $('select[name="subito\\[division\\]"]').change(function() { + department.init($(this).val()); + }); + $('.form-group input').focus(function() { + $(this).parent().prev('.error-field').hide(200); }); + $('.form-group select').focus(function() { + $(this).parent().prev('.error-field').hide(200); + }); + /*if ( $('#loginOptions a.login').length ) { + var loginUrl = { + followup: true, + followupModule: 'Subito', + followupAction: 'Subito' + }; + $('#loginOptions a.login').attr('href', function ( index, value ) { + return value + '?' + $.param( loginUrl ); + }); + // console.log($('#loginOptions a.login').attr('href')); + }*/ + }); /** * Show & hide of subito form elements regarding select menu status. * Add options for department select menu @@ -226,74 +225,74 @@ echo <<<JS **/ var department = { - init: function ( divisionid ) { - addOptions = false; - var elements = []; - if ( divisionid == '15') { - elements = { - "department":"show", - "costcentre":"show", - "sdepartment":"hide" - } - } else if (divisionid == '') { - elements = { - "department":"hide", - "costcentre":"hide", - "sdepartment":"hide" - } - } else { - elements = { - "department":"hide", - "costcentre":"hide", - "sdepartment":"show" - } - var addOptions = true; - } - department.showHideElements(elements); - if (addOptions == true) { - department.addDepartmentOptions( divisionid ); + init: function ( divisionid ) { + addOptions = false; + var elements = []; + if ( divisionid == '15') { + elements = { + "department":"show", + "costcentre":"show", + "sdepartment":"hide" + } + } else if (divisionid == '') { + elements = { + "department":"hide", + "costcentre":"hide", + "sdepartment":"hide" + } + } else { + elements = { + "department":"hide", + "costcentre":"hide", + "sdepartment":"show" } + var addOptions = true; + } + department.showHideElements(elements); + if (addOptions == true) { + department.addDepartmentOptions( divisionid ); + } }, addDepartmentOptions: function ( divisionid ) { - $('select[name="subito\\[department\\]"]').empty(); - var departments = $this->departments; - department.addOptionElement('',''); - $.each(departments[divisionid], function (index, value) { - department.addOptionElement(value,index); - }); + $('select[name="subito\\[department\\]"]').empty(); + var departments = $this->departments; + department.addOptionElement('',''); + $.each(departments[divisionid], function (index, value) { + department.addOptionElement(value,index); + }); }, addDepartmentSelect: function (departmentid, divisionid) { - department.init ( divisionid ); - department.addSelectElement ( departmentid ); + department.init ( divisionid ); + department.addSelectElement ( departmentid ); }, addOptionElement: function ( text, value ) { - jQuery('<option/>', { - text: department.htmlEntitiesDecode(text), - value: value - }).appendTo('select[name="subito\\[department\\]"]'); + jQuery('<option/>', { + text: department.htmlEntitiesDecode(text), + value: value + }).appendTo('select[name="subito\\[department\\]"]'); }, addSelectElement: function ( departmentid ) { - $('select[name="subito\\[department\\]"] option').filter(function () { - //console.log($(this).val() + ' == ' + departmentid); - return $(this).val() == departmentid; - }).prop('selected', true); + $('select[name="subito\\[department\\]"] option').filter(function () { + //console.log($(this).val() + ' == ' + departmentid); + return $(this).val() == departmentid; + }).prop('selected', true); }, htmlEntitiesDecode: function ( value ) { - if (value) { - return jQuery('<div/>').html(value).text(); - } - return value; + if (value) { + return jQuery('<div/>').html(value).text(); + } + return value; }, showHideElements: function ( elements ) { - $.each(elements, function (index, value) { - if (value == 'show') { - $('.input-' + index).show(200); - } - if (value == 'hide') { - $('.input-' + index).hide(200); - } - }); - } + $.each(elements, function (index, value) { + if (value == 'show') { + $('.input-' + index).show(200); + } + if (value == 'hide') { + $('.input-' + index).hide(200); + } + }); + } } JS; $this->inlineScript()->captureEnd(); diff --git a/themes/finc/templates/documentdeliveryservice/home.phtml b/themes/finc/templates/documentdeliveryservice/home.phtml index 92b84315790241f535cbb47cc51ed3d7a8d837c6..bf92244c324628580b2de650cfcbc63263264e5a 100644 --- a/themes/finc/templates/documentdeliveryservice/home.phtml +++ b/themes/finc/templates/documentdeliveryservice/home.phtml @@ -1,4 +1,4 @@ -<? +<?php // Set up page title: $this->headTitle($this->translate('Delivery service for documents')); diff --git a/themes/finc/templates/footer.phtml b/themes/finc/templates/footer.phtml index 029e561e92ee56b68b4f1d77bfefac4276eb8a57..510e299722e1ed2d092515a79b5617cf8f493840 100644 --- a/themes/finc/templates/footer.phtml +++ b/themes/finc/templates/footer.phtml @@ -17,7 +17,7 @@ <li><a href="<?=$this->url('channels-home')?>"><?=$this->transEsc('channel_explore')?></a></li> <li><a href="<?=$this->url('search-reserves')?>"><?=$this->transEsc('Course Reserves')?></a></li> <li><a href="<?=$this->url('search-newitem')?>"><?=$this->transEsc('New Items')?></a></li> - <? /* Custom finc - CK */ ?> + <?php /* finc-specific - CK */ ?> <li><a href="<?=$this->url('myresearch-acquisition')?>"><?=$this->transEsc('Suggestions for acquisition')?></a></li> </ul> </div> @@ -31,7 +31,7 @@ </div> </div> - <? /* finc branding footer */ ?> + <?php /* finc branding footer */ ?> <hr> <div class="footer-container powered-by"> <div class="footer-column"> diff --git a/themes/finc/templates/header.phtml b/themes/finc/templates/header.phtml index e7553bf02fb721e5e9cc91082d60d100265bc3bf..0fe1e26791a4053f41f65d4dece610b0ab45b1ba 100644 --- a/themes/finc/templates/header.phtml +++ b/themes/finc/templates/header.phtml @@ -1,15 +1,15 @@ <!-- finc: header --> -<? $account = $this->auth()->getManager(); ?> -<? /* This navbar is the sticky element in the header - CK; you can use 'affix' as an alternative to 'navbar-fixed-top' like so: +<?php $account = $this->auth()->getManager(); ?> +<?php /* This navbar is the sticky element in the header - CK; you can use 'affix' as an alternative to 'navbar-fixed-top' like so: <div data-spy="affix" data-offset-top="1" class="navbar"> Do not use 'navbar-fixed-top' and 'affix' at the same time. When using 'affix', set the variables for '$navbar-height', '$navbar-height-xs' and '$navbar-height-sm' in _customVariables.scss to '=0' or set the paddings-top under 'body' in compiled.scss to '=0' */ ?> <div class="banner container navbar navbar-fixed-top"> - <? /* This element only holds the mobile toggler and the navbar-brand/library name - CK */ ?> + <?php /* This element only holds the mobile toggler and the navbar-brand/library name - CK */ ?> <div class="navbar-header"> - <? /* mobile navigation toggler - CK */ ?> + <?php /* mobile navigation toggler - CK */ ?> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#header-collapse"> <span class="sr-only">Toggle navigation</span> <i class="fa fa-bars" aria-hidden="true"></i> @@ -17,30 +17,30 @@ <h1> <a class="navbar-brand lang-<?=$this->layout()->userLang?>" href="<?=$this->url('home')?>"> - <? /* Custom finc header - CK*/ ?> + <?php /* Custom finc header - CK*/ ?> <span class="hidden-sm hidden-md hidden-lg"><?=$this->transEsc("LibraryName")?></span> <img src="<?=$this->imageLink('headerlogo.png')?>" class="hidden-xs" alt="Logo <?=$this->transEsc("LibraryName")?>" title="<?=$this->transEsc("LibraryName")?>"> - <? /* Custom finc header - END */ ?> + <?php /* Custom finc header - END */ ?> </a> </h1> </div> <div class="flex-container"> - <? if (!isset($this->layout()->renderingError)): ?> + <?php if (!isset($this->layout()->renderingError)): ?> <div class="collapse navbar-collapse right" id="header-collapse"> - <? /* finc: right-hand navbar section - see flex-container in SCSS: + <?php /* finc: right-hand navbar section - see flex-container in SCSS: we need this order on XS: navbar-right searchbox but reverse it on anything but mobile */ ?> <nav> <ul class="nav navbar-nav navbar-right flip"> - <? if ($this->feedback()->tabEnabled()): ?> + <?php if ($this->feedback()->tabEnabled()): ?> <li> <a id="feedbackLink" data-lightbox class="btn" href="<?=$this->url('feedback-home')?>"> <i class="fa fa-envelope" aria-hidden="true"></i> <span class="hidden-sm"><?=$this->transEsc("Feedback")?></span> </a> </li> - <? endif; ?> - <? $cart = $this->cart(); + <?php endif; ?> + <?php $cart = $this->cart(); if ($cart->isActive()): ?> <li id="cartSummary"> <a id="cartItems" class="btn" data-lightbox title="<?=$this->transEsc('View Book Bag')?>" href="<?=$this->url('cart-home')?>"> @@ -48,38 +48,45 @@ <span class="hidden-sm full<?=!$cart->isFull() ? ' hidden' : ''?>">(<?=$this->transEsc('bookbag_full')?>)</span> </a> </li> - <? endif; ?> - <? if (is_object($account) && $account->loginEnabled()): // hide login/logout if unavailable ?> - <li class="logoutOptions<? if (!$account->isLoggedIn()): ?> hidden<? endif ?>"> - <a class="btn" href="<?=$this->url('myresearch-home', array(), array('query' => array('redirect' => 0)))?>"> - <i class="fa fa-home" aria-hidden="true"></i> + <?php endif; ?> + <?php if (is_object($account) && $account->loginEnabled()): // hide login/logout if unavailable ?> + <li class="logoutOptions<?php if($account->dropdownEnabled()): ?> with-dropdown<?php endif ?><?php if(!$account->isLoggedIn()): ?> hidden<?php endif ?>"> + <a class="btn" href="<?=$this->url('myresearch-home', [], ['query' => ['redirect' => 0]])?>"> + <i id="account-icon" class="fa fa-home" aria-hidden="true"></i> <span class="hidden-sm"><?=$this->transEsc("Your Account")?></span> </a> </li> - - <li class="logoutOptions<? if (!$account->isLoggedIn()): ?> hidden<? endif ?>"> + <?php if($account->dropdownEnabled()): ?> + <li id="login-dropdown" class="dropdown<?php if(!$account->isLoggedIn()): ?> hidden<?php endif ?>"> + <a href="#" data-toggle="dropdown"><i class="fa fa-caret-down"></i></a> + <div class="dropdown-menu"> + <?=$this->render('myresearch/menu'); ?> + </div> + </li> + <?php endif; ?> + <li class="logoutOptions<?php if (!$account->isLoggedIn()): ?> hidden<?php endif ?>"> <a href="<?=$this->url('myresearch-logout')?>" class="logout btn" title="<?=$this->transEsc("Log Out")?>"> <i class="fa fa-sign-out" aria-hidden="true"></i> <span class="hidden-sm"><?=$this->transEsc("Log Out")?></span> </a> </li> - <li id="loginOptions"<? if ($account->isLoggedIn()): ?> class="hidden"<? endif ?>> - <? if ($account->getSessionInitiator($this->serverUrl($this->url('myresearch-home')))): ?> + <li id="loginOptions"<?php if ($account->isLoggedIn()): ?> class="hidden"<?php endif ?>> + <?php if ($account->getSessionInitiator($this->serverUrl($this->url('myresearch-home')))): ?> <a class="btn" href="<?=$this->url('myresearch-userlogin')?>"> <i class="fa fa-sign-in" aria-hidden="true"></i> <span class="hidden-sm"><?=$this->transEsc("Institutional Login")?></span> </a> - <? else: ?> + <?php else: ?> <a class="btn" href="<?=$this->url('myresearch-userlogin')?>" data-lightbox> <i class="fa fa-sign-in" aria-hidden="true"></i> <span class="hidden-sm"><?=$this->transEsc("Login")?></span> </a> - <? endif; ?> + <?php endif; ?> </li> - <? endif; ?> + <?php endif; ?> - <? if (isset($this->layout()->themeOptions) && count($this->layout()->themeOptions) > 1): ?> + <?php if (isset($this->layout()->themeOptions) && count($this->layout()->themeOptions) > 1): ?> <li class="theme dropdown"> <form method="post" name="themeForm" id="themeForm"> <input type="hidden" name="ui"/> @@ -87,16 +94,16 @@ <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?=$this->transEsc("Theme")?> <strong class="caret"></strong></a> <ul class="dropdown-menu"> - <? foreach ($this->layout()->themeOptions as $current): ?> + <?php foreach ($this->layout()->themeOptions as $current): ?> <li<?=$current['selected'] ? ' class="active"' : ''?>> <a href="#" onClick="document.themeForm.ui.value='<?=$this->escapeHtmlAttr($current['name'])?>';document.themeForm.submit()"><?=$this->transEsc($current['desc'])?></a> </li> - <? endforeach; ?> + <?php endforeach; ?> </ul> </li> - <? endif; ?> + <?php endif; ?> - <? if (isset($this->layout()->allLangs) && count($this->layout()->allLangs) > 1): ?> + <?php if (isset($this->layout()->allLangs) && count($this->layout()->allLangs) > 1): ?> <li class="language dropdown"> <form method="post" name="langForm" id="langForm"> <input type="hidden" name="mylang"/> @@ -105,29 +112,29 @@ <?=$this->transEsc("Language")?> <strong class="caret"></strong> </a> <ul id="langmenu" class="dropdown-menu"> - <? foreach ($this->layout()->allLangs as $langCode => $langName): ?> + <?php foreach ($this->layout()->allLangs as $langCode => $langName): ?> <li<?=$this->layout()->userLang == $langCode ? ' class="active"' : ''?>> <a class="btn" href="#" onClick="document.langForm.mylang.value='<?=$langCode?>';document.langForm.submit()"><?=$this->displayLanguageOption($langName)?></a> </li> - <? endforeach; ?> + <?php endforeach; ?> </ul> </li> - <? endif; ?> + <?php endif; ?> </ul> </nav> </div> - <? endif; ?> - <? /* finc searchbox: we use searchbox here so it becomes part of the sticky header, + <?php endif; ?> + <?php /* finc searchbox: we use searchbox here so it becomes part of the sticky header, we need to place this after the navbar-right for anything but mobile - see flex-container in SCSS:*/ ?> - <? if ($this->layout()->searchbox !== false): ?> + <?php if ($this->layout()->searchbox !== false): ?> <div class="search container left"> <nav class="nav searchbox hidden-print"> <?=$this->layout()->searchbox?> </nav> </div> - <? endif; ?> - <? /* finc searchbox - END */ ?> + <?php endif; ?> + <?php /* finc searchbox - END */ ?> </div> </div> -<? /* If you want to use searchbox in a separate row, insert it here as in bootstrap theme - CK */ ?> +<?php /* If you want to use searchbox in a separate row, insert it here as in bootstrap theme - CK */ ?> <!-- finc: header - END --> diff --git a/themes/finc/templates/layout/layout.phtml b/themes/finc/templates/layout/layout.phtml index c6049cff8a89d68a114fc6160dd763609360ea7e..b57ca8214570a9b4487a682fc05945b8343dbc8a 100644 --- a/themes/finc/templates/layout/layout.phtml +++ b/themes/finc/templates/layout/layout.phtml @@ -1,15 +1,15 @@ <?=$this->doctype('HTML5')?> -<html lang="<?=$this->layout()->userLang?>"> +<html lang="<?=$this->layout()->userLang?>"<?php if ($this->layout()->rtl): ?> dir="rtl"<?php endif; ?>> <head> - <? $this->headThemeResources() ?> - <? /* remove meta because of W3C Validator error - CK */ + <?php $this->headThemeResources(); ?> + <?php /* remove meta because of W3C Validator error - CK */ /* <meta charset="utf-8"> */ ?> <meta http-equiv="X-UA-Compatible" content="IE=edge"/> <meta name="viewport" content="width=device-width,initial-scale=1.0"/> <?=$this->headMeta()?> <?=$this->headTitle()?> - <? + <?php // Set up OpenSearch link: $this->headLink( [ @@ -21,12 +21,12 @@ ); ?> <!-- RTL styling --> - <? if ($this->layout()->rtl) { + <?php if ($this->layout()->rtl) { $this->headLink()->appendStylesheet('vendor/bootstrap-rtl.min.css'); } ?> <?=$this->headLink()?> <?=$this->headStyle()?> - <? + <?php if (!isset($this->renderingError)) { // Add translation strings // PDA (BELOW) is a custom finc string - CK @@ -41,6 +41,7 @@ 'collection_empty' => 'collection_empty', 'error_occurred' => 'An error has occurred', 'go_to_list' => 'go_to_list', + 'hold_available' => 'hold_available', 'libphonenumber_invalid' => 'libphonenumber_invalid', 'libphonenumber_invalidcountry' => 'libphonenumber_invalidcountry', 'libphonenumber_invalidregion' => 'libphonenumber_invalidregion', @@ -51,7 +52,7 @@ 'loading' => 'Loading', 'more' => 'more', 'number_thousands_separator' => [ - 'number_thousands_separator', null, ',' + 'number_thousands_separator', null, ',' ], 'sms_success' => 'sms_success' ] @@ -100,7 +101,7 @@ ] ); } - $this->headScript()->appendScript( + $this->headScript()->prependScript( 'var userIsLoggedIn = ' . ($this->auth()->isLoggedIn() ? 'true' : 'false') . ';' ); } @@ -111,8 +112,24 @@ . $this->keepAlive()); $this->headScript()->appendFile("keep_alive.js"); } - ?> - <? + + // If account ajax is active, load script and add language strings + $account = $this->auth()->getManager(); + if ($account->ajaxEnabled()) { + $this->headScript()->appendFile("account_ajax.js"); + $this->jsTranslations()->addStrings( + [ + 'account_has_alerts' => 'account_has_alerts', + 'Checked Out Items' => 'Checked Out Items', + 'ill_request_available' => 'ill_request_available', + 'renew_item_due_tooltip' => 'renew_item_due_tooltip', + 'renew_item_overdue_tooltip' => 'renew_item_overdue_tooltip', + 'request_in_transit' => 'request_in_transit', + 'storage_retrieval_request_available' => 'storage_retrieval_request_available' + ] + ); + } + $root = rtrim($this->url('home'), '/'); $translations = $this->jsTranslations()->getJSON(); $dsb = DEFAULT_SEARCH_BACKEND; @@ -125,8 +142,8 @@ JS; ?> <?=$this->headScript()?> </head> -<body class="template-dir-<?=$this->templateDir?> template-name-<?=$this->templateName?> <?=$this->layoutClass('offcanvas-row')?><? if ($this->layout()->rtl): ?> rtl<? endif; ?>"> -<? // Set up the search box -- there are three possible cases: +<body class="template-dir-<?=$this->templateDir?> template-name-<?=$this->templateName?> <?=$this->layoutClass('offcanvas-row')?><?php if ($this->layout()->rtl): ?> rtl<?php endif; ?>"> +<?php // Set up the search box -- there are three possible cases: // 1. No search box was set; we should default to the normal box // 2. It was set to false; we should display nothing // 3. It is set to a custom string; we should display the provided version @@ -136,41 +153,41 @@ if (!isset($this->layout()->searchbox)) { $this->layout()->searchbox = $this->render('search/searchbox.phtml'); } ?> -<? if (isset($this->layout()->srmessage)): // message for benefit of screen-reader users ?> - <span class="sr-only"><?=$this->layout()->srmessage?></span> -<? endif; ?> +<?php if (isset($this->layout()->srmessage)): // message for benefit of screen-reader users ?> + <span class="sr-only" role="heading" aria-level="1"><?=$this->layout()->srmessage?></span> +<?php endif; ?> <a class="sr-only" href="#searchslots"><?=$this->transEsc('Skip to search')?></a> <a class="sr-only" href="#content"><?=$this->transEsc('Skip to content')?></a> -<? /* Start header here, not above, custom finc, CK */ ?> +<?php /* Start header here, not above, custom finc, CK */ ?> <header class="hidden-print"> <?=$this->render('header.phtml')?> </header> <nav class="breadcrumbs"> - <? /* finc: Don't use .container here or the breadcrumbs will get a left+right padding - CK */ ?> - <? if ((!isset($this->layout()->showBreadcrumbs) || $this->layout()->showBreadcrumbs == true) + <?php /* finc: DON'T use .container here or the breadcrumbs will get a left+right padding - CK */ ?> + <?php if ((!isset($this->layout()->showBreadcrumbs) || $this->layout()->showBreadcrumbs == true) && !empty($this->layout()->breadcrumbs) && $this->layout()->breadcrumbs !== false ): ?> <ul class="breadcrumb large-centered hidden-xs hidden-print"> - <? if (is_array($this->layout()->breadcrumbs)): ?> - <? if (count($this->layout()->breadcrumbs) > 1): ?> + <?php if (is_array($this->layout()->breadcrumbs)): ?> + <?php if (count($this->layout()->breadcrumbs) > 1): ?> <?=$this->render('breadcrumbs/multi.phtml', [ 'parents' => $this->layout()->breadcrumbs, 'title' => $this->layout()->title, 'from' => $this->layout()->from ])?> - <? else: ?> + <?php else: ?> <?=$this->render('breadcrumbs/default.phtml', [ 'parents' => $this->layout()->breadcrumbs, 'title' => $this->layout()->title ])?> - <? endif; ?> - <? else: ?> + <?php endif; ?> + <?php else: ?> <?=$this->layout()->breadcrumbs?> - <? endif; ?> + <?php endif; ?> </ul> - <? endif; ?> + <?php endif; ?> </nav> <div role="main" class="main"> <div id="content" class="container"> @@ -182,7 +199,7 @@ if (!isset($this->layout()->searchbox)) { <!-- MODAL IN CASE WE NEED ONE --> -<? /* remove aria-hidden attr via JS, move X button to logical pos. in structure + make accessible via tab */ ?> +<?php /* move X button to logical pos. in structure + make accessible via tab - CK */ ?> <div id="modal" class="modal fade hidden-print" tabindex="-1" role="dialog" aria-modal="true" aria-labelledby="modalTitle" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> @@ -194,19 +211,13 @@ if (!isset($this->layout()->searchbox)) { </div> </div> </div> - -<div class="offcanvas-toggle" data-toggle="offcanvas" tabindex="0"> - <i class="fa" title="<?=$this->transEsc('sidebar_expand')?>"></i> - <span class="sr-only"><?=$this->transEsc('sidebar_expand')?></span> -</div> - <div class="offcanvas-overlay" data-toggle="offcanvas"></div> <?=$this->googleanalytics()?> <?=$this->piwik()?> -<? if ($this->recaptcha()->active()): ?> +<?php if ($this->recaptcha()->active()): ?> <?=$this->inlineScript(\Zend\View\Helper\HeadScript::FILE, "https://www.google.com/recaptcha/api.js?onload=recaptchaOnLoad&render=explicit&hl=" . $this->layout()->userLang, 'SET')?> -<? endif; ?> -<? /* Enable Tooltips, finc-specific, CK */ ?> +<?php endif; ?> +<?php /* Enable Tooltips, finc-specific, CK */ ?> <script type="text/javascript"> $(document).ready(function () { $("body").tooltip({selector: '[data-toggle=tooltip]'}); diff --git a/themes/finc/templates/librarycards/home.phtml b/themes/finc/templates/librarycards/home.phtml index 7e91e653ec6593d1f230297a8986120847ab933a..2222c350f3208df6d2a77cc98fefc88ee86bb355 100644 --- a/themes/finc/templates/librarycards/home.phtml +++ b/themes/finc/templates/librarycards/home.phtml @@ -1,5 +1,5 @@ <!-- find: librarycards - home --> -<? +<?php // Set up page title: $this->headTitle($this->translate('Library Cards')); @@ -11,32 +11,31 @@ <?=$this->flashmessages()?> <h2><?=$this->transEsc('Library Cards')?></h2> - <? if ($this->libraryCards->count() == 0): ?> + <?php if ($this->libraryCards->count() == 0): ?> <div><?=$this->transEsc('You do not have any library cards')?></div> - <? else: ?> + <?php else: ?> <table class="table table-striped"> - <? /* Table summary not supported in html5, custom-finc solution, CK */?> <caption class="sr-only"> <?=$this->transEsc('Library Cards')?> </caption> <tr> <th><?=$this->transEsc('Library Card Name')?></th> - <? if ($this->multipleTargets): ?> + <?php if ($this->multipleTargets): ?> <th><?=$this->transEsc('login_target')?></th> - <? endif; ?> + <?php endif; ?> <th><?=$this->transEsc('Username')?></th> <th> </th> </tr> - <? foreach ($this->libraryCards as $record): ?> + <?php foreach ($this->libraryCards as $record): ?> <tr> <td><?=$this->escapeHtml($record['card_name'])?></td> - <? $username = $record['cat_username']; if ($this->multipleTargets): ?> - <? $target = ''; ?> - <? if (strstr($username, '.')): ?> - <? list($target, $username) = explode('.', $username, 2); ?> - <? endif; ?> + <?php $username = $record['cat_username']; if ($this->multipleTargets): ?> + <?php $target = ''; ?> + <?php if (strstr($username, '.')): ?> + <?php list($target, $username) = explode('.', $username, 2); ?> + <?php endif; ?> <td><?=$target ? $this->transEsc("source_$target", null, $target) : ' ' ?></td> - <? endif; ?> + <?php endif; ?> <td><?=$this->escapeHtml($username)?></td> <td> <div class="btn-group"> @@ -51,9 +50,9 @@ </div> </td> </tr> - <? endforeach; ?> + <?php endforeach; ?> </table> - <? endif; ?> + <?php endif; ?> <div class="btn-group"> <a href="<?=$this->url('editLibraryCard') ?>NEW" class="btn btn-link"><i class="fa fa-edit" aria-hidden="true"></i> <?=$this->transEsc('Add a Library Card')?></a> diff --git a/themes/finc/templates/myresearch/acquisition.phtml b/themes/finc/templates/myresearch/acquisition.phtml index 397ad8a0f7c8b886e32972774885b8ffcac89f75..4df9804f49bc335983f09aa2bef790c3546b288c 100644 --- a/themes/finc/templates/myresearch/acquisition.phtml +++ b/themes/finc/templates/myresearch/acquisition.phtml @@ -1,5 +1,5 @@ <!-- finc: myresearch - acquisition --> -<? +<?php // Set up page title: $this->headTitle($this->translate('PDA::pda_form_title')); @@ -11,25 +11,24 @@ $this->layout()->breadcrumbs = '<li><a href="' . $this->url('myresearch-home') . <h2><?=$this->transEsc('PDA::pda_form_subtitle')?></h2> <?=$this->flashmessages()?> <form method="post" action="" name="acquisitionForm"> - <h6><?=$this->transEsc('PDA::pda_form_suggestions_limit')?></h6> + <h3><?=$this->transEsc('PDA::pda_form_suggestions_limit')?></h3> <div class="form-group"> <label class="control-label" for="subject"><?=$this->transEsc('PDA::pda_form_field_of_study_label')?><span class="required">*</span></label> <select name="field_of_study" class="form-control" id="subject"> - <option value="-1"><?=$this->transEsc('PDA::pda_form_field_of_study_text')?></option> - <? if (isset($fieldOfStudyList) && is_array($fieldOfStudyList)): ?> - <? foreach ($fieldOfStudyList as $fieldOfStudy): ?> - <option - value="<?=$fieldOfStudy?>" <? if (isset($acquisitionFieldOfStudy) && ($acquisitionFieldOfStudy != '-1') && ($acquisitionFieldOfStudy == $fieldOfStudy)): ?> selected="selected"<? endif; ?>><?=$this->transEsc('PDA::fos_' . $fieldOfStudy)?></option> - <? endforeach; ?> - <? endif; ?> - </select> - </div> + <option value="-1"><?=$this->transEsc('PDA::pda_form_field_of_study_text')?></option> + <?php if (isset($fieldOfStudyList) && is_array($fieldOfStudyList)): ?> + <?php foreach ($fieldOfStudyList as $fieldOfStudy): ?> + <option value="<?=$fieldOfStudy?>" <?php if (isset($acquisitionFieldOfStudy) && ($acquisitionFieldOfStudy != '-1') && ($acquisitionFieldOfStudy == $fieldOfStudy)): ?> selected="selected"<?php endif; ?>><?=$this->transEsc('PDA::fos_' . $fieldOfStudy)?></option> + <?php endforeach; ?> + <?php endif; ?> + </select> + </div> <div class="form-group"> <label class="control-label" for="acquistion_reasons"><?=$this->transEsc('PDA::pda_form_statement_label')?><span class="required">*</span></label> <textarea id="acquisition_reasons" type="text" cols="50" rows="5" name="reasons" class="form-control"><?=(isset($acquisitionStatement) && !empty($acquisitionStatement)) ? $acquisitionStatement : ''?></textarea> - </div> + </div> <div class="form-group"> <label class="control-label" for="acquistion_proposal"><?=$this->transEsc('PDA::pda_form_proposal_label')?><span class="required">*</span></label> @@ -37,12 +36,12 @@ $this->layout()->breadcrumbs = '<li><a href="' . $this->url('myresearch-home') . </div> <div class="form-group"> - <input class="btn btn-primary" type="submit" name="submit" value="<?=$this->transEsc('Submit')?>"/> - </div> + <input class="btn btn-primary" type="submit" name="submit" value="<?=$this->transEsc('Submit')?>"/> + </div> <div class="form-group"> - <?=$this->transEsc('PDA::note_mandatory_fields')?> - </div> + <?=$this->transEsc('PDA::note_mandatory_fields')?> + </div> </form> </div> <div class="<?=$this->layoutClass('sidebar')?>"> diff --git a/themes/finc/templates/myresearch/bulk-action-buttons.phtml b/themes/finc/templates/myresearch/bulk-action-buttons.phtml index 5bf9036d6199c0b524bc131862cfb1e2677ba0e2..2fbc71203667d4549ef23e775b7f9cd8fcf04794 100644 --- a/themes/finc/templates/myresearch/bulk-action-buttons.phtml +++ b/themes/finc/templates/myresearch/bulk-action-buttons.phtml @@ -1,29 +1,29 @@ <!-- finc: myresearch - bulkactionbuttons --> -<? if (isset($locations)): ?> - <input type="hidden" name="listID" value="<?=$this->escapeHtmlAttr($locations->id)?>"/> - <input type="hidden" name="listName" value="<?=$this->escapeHtmlAttr($locations->title)?>"/> -<? endif; ?> -<? $user = $this->auth()->isLoggedIn(); ?> +<?php if (isset($list)): ?> + <input type="hidden" name="listID" value="<?=$this->escapeHtmlAttr($list->id)?>"/> + <input type="hidden" name="listName" value="<?=$this->escapeHtmlAttr($list->title)?>"/> +<?php endif; ?> +<?php $user = $this->auth()->isLoggedIn(); ?> <div class="bulkActionButtons hidden-print"> <div class="bulk-checkbox"> <input type="checkbox" name="selectAll" class="checkbox-select-all" id="myresearchCheckAll"/> <label for="myresearchCheckAll"><?=$this->transEsc('select_page')?> | <?=$this->transEsc('with_selected')?>:</label> </div> - <? /* Keep bulk-action-buttons class, finc-specific SCSS, CK */ ?> + <?php /* Keep bulk-action-buttons class, finc-specific SCSS, CK */ ?> <div class="btn-group bulk-action-buttons hidden-print"> <input class="btn btn-transparent" type="submit" name="email" value="<?=$this->transEsc('Email')?>" title="<?=$this->transEsc('email_selected')?>"/> - <? if ((!is_null($this->list) && $this->list->editAllowed($user)) || is_null($this->list) && $user): ?> + <?php if ((null !== $this->list && $this->list->editAllowed($user)) || null === $this->list && $user): ?> <input class="btn btn-transparent" id="<?=$this->idPrefix?>delete_list_items_<?=!is_null($this->list) ? $this->escapeHtmlAttr($this->list->id) : ''?>" type="submit" name="delete" value="<?=$this->transEsc('Delete')?>" title="<?=$this->transEsc('delete_selected')?>"/> - <? endif; ?> - <? $exportOptions = $this->export()->getActiveFormats('bulk'); + <?php endif; ?> + <?php $exportOptions = $this->export()->getActiveFormats('bulk'); if (count($exportOptions) > 0): ?> <input class="btn btn-transparent" type="submit" name="export" value="<?=$this->transEsc('Export')?>" title="<?=$this->transEsc('export_selected')?>"/> - <? endif; ?> + <?php endif; ?> <input class="btn btn-transparent" type="submit" name="print" value="<?=$this->transEsc('Print')?>" title="<?=$this->transEsc('print_selected')?>" data-lightbox-ignore/> - <? if ($this->cart()->isActive()): ?> + <?php if ($this->cart()->isActive()): ?> <input class="btn btn-transparent" id="<?=$this->idPrefix?>updateCart" type="submit" name="add" value="<?=$this->transEsc('Add to Book Bag')?>"/> - <? endif; ?> + <?php endif; ?> </div> </div> <!-- finc: myresearch - bulkactionbuttons - END --> diff --git a/themes/finc/templates/myresearch/editlist.phtml b/themes/finc/templates/myresearch/editlist.phtml deleted file mode 100644 index 368287f0b11e61c21e811bb77df939eee4af2251..0000000000000000000000000000000000000000 --- a/themes/finc/templates/myresearch/editlist.phtml +++ /dev/null @@ -1,49 +0,0 @@ -<!-- finc: myresearch - editlist --> -<? - // Set up page title: - $pageTitle = empty($this->list->id) ? 'Create a List' : "edit_list"; - $this->headTitle($this->translate($pageTitle)); - - // Set up breadcrumbs: - $this->layout()->breadcrumbs = '<li><a href="' . $this->url('myresearch-home') . '">' . $this->transEsc('Your Account') . '</a></li>' - . '<li>' . $this->transEsc($pageTitle) . '</li>'; -?> - -<?=$this->flashmessages()?> - -<h2><?=$this->transEsc($pageTitle); ?></h2> - -<form class="form-edit-list" method="post" name="<?=empty($this->list->id) ? 'newList' : 'editListForm'?>"> - <input type="hidden" name="id" value="<?=empty($this->list->id) ? 'NEW' : $this->list->id ?>"/> - <div class="form-group"> - <label class="control-label" for="list_title"><?=$this->transEsc('List'); ?>:</label> - <input id="list_title" class="form-control" type="text" name="title" value="<?=isset($this->list['title']) ? $this->escapeHtml($this->list['title']) : ''?>"/> - </div> - <div class="form-group"> - <label class="control-label" for="list_desc"><?=$this->transEsc('Description') ?></label> - <textarea id="list_desc" class="form-control" name="desc" rows="3"><?=isset($this->list['description']) ? $this->escapeHtml($this->list['description']) : ''?></textarea> - </div> - <? if ($this->userlist()->getMode() === 'public_only'): ?> - <input type="hidden" name="public" value="1" /> - <? elseif ($this->userlist()->getMode() === 'private_only'): ?> - <input type="hidden" name="public" value="0" /> - <? else: ?> - <div class="form-group"> - <label class="control-label"><?=$this->transEsc('Access') ?></label> - <div class="radio"> - <label class="control-label"> - <input id="list_public_1" type="radio" name="public" value="1"<? if ($this->list->isPublic()): ?> checked="checked"<? endif; ?>/> <?=$this->transEsc('Public') ?> - </label> - </div> - <div class="radio"> - <label class="control-label"> - <input id="list_public_0" type="radio" name="public" value="0"<? if (!$this->list->isPublic()): ?> checked="checked"<? endif; ?>/> <?=$this->transEsc('Private') ?> - </label> - </div> - </div> - <? endif; ?> - <div class="form-group"> - <input class="btn btn-primary" type="submit" name="submit" value="<?=$this->transEsc('Save') ?>"/> - </div> -</form> -<!-- finc: myresearch - editlist - END --> diff --git a/themes/finc/templates/myresearch/fines.phtml b/themes/finc/templates/myresearch/fines.phtml deleted file mode 100644 index d400c1d69e47e2defbaf0c8c68d7728f7d998aa6..0000000000000000000000000000000000000000 --- a/themes/finc/templates/myresearch/fines.phtml +++ /dev/null @@ -1,59 +0,0 @@ -<!-- finc: myresearch - fines --> -<? - // Set up page title: - $this->headTitle($this->translate('My Fines')); - - // Set up breadcrumbs: - $this->layout()->breadcrumbs = '<li><a href="' . $this->url('myresearch-home') . '">' . $this->transEsc('Your Account') . '</a></li> <li class="active">' . $this->transEsc('Fines') . '</li>'; -?> -<div class="<?=$this->layoutClass('mainbody')?>"> - <h2><?=$this->transEsc('Your Fines')?></h2> - <?=$this->flashmessages()?> - - <?=$this->context($this)->renderInContext('librarycards/selectcard.phtml', ['user' => $this->auth()->isLoggedIn()]); ?> - - <? if (empty($this->fines)): ?> - <?=$this->transEsc('You do not have any fines')?> - <? else: ?> - <table class="table table-striped"> - <? /* Table summary not supported in html 5, finc-specific solution, CK */ ?> - <caption class="sr-only"> - <?=$this->transEsc('Your Fines')?> - </caption> - <tr> - <th><?=$this->transEsc('Title')?></th> - <th><?=$this->transEsc('Checked Out')?></th> - <th><?=$this->transEsc('Due Date')?></th> - <th><?=$this->transEsc('Fine')?></th> - <th><?=$this->transEsc('Fee')?></th> - <th><?=$this->transEsc('Balance')?></th> - </tr> - <? $totalDue = 0; ?> - <? foreach ($this->fines as $record): ?> - <tr> - <td> - <? if (empty($record['title'])): ?> - <?=$this->transEsc('not_applicable')?> - <? elseif (!isset($record['driver']) || !is_object($record['driver'])): ?> - <?=$this->escapeHtml(trim($record['title'], '/:'))?> - <? else: ?> - <a href="<?=$this->recordLink()->getUrl($record['driver'])?>"><?=$this->escapeHtml(trim($record['title'], '/:'))?></a> - <? endif; ?> - </td> - <td><?=isset($record['checkout']) ? $this->escapeHtml($record['checkout']) : ''?></td> - <td><?=isset($record['duedate']) ? $this->escapeHtml($record['duedate']) : ''?></td> - <td><?=isset($record['fine']) ? $this->escapeHtml($record['fine']) : ''?></td> - <td><?=isset($record['amount']) ? $this->safeMoneyFormat($record['amount']/100.00) : ''?></td> - <td><?=isset($record['balance']) ? $this->safeMoneyFormat($record['balance']/100.00) : ''?></td> - </tr> - <? $totalDue += $record['balance']; ?> - <? endforeach; ?> - <tr style="font-weight:bold"><td colspan="5"><?=$this->transEsc('Total Balance Due')?></td><td><?=$this->safeMoneyFormat($totalDue/100.00) ?></td></tr> - </table> - <? endif; ?> -</div> - -<div class="<?=$this->layoutClass('sidebar')?>"> - <?=$this->context($this)->renderInContext("myresearch/menu.phtml", ['active' => 'fines'])?> -</div> -<!-- finc: myresearch - fines - END --> diff --git a/themes/finc/templates/myresearch/menu.phtml b/themes/finc/templates/myresearch/menu.phtml index 5834d440699950351f210403205992d26f0b9407..540876002894e0f2b6aa196e9d63c7c8027e8d54 100644 --- a/themes/finc/templates/myresearch/menu.phtml +++ b/themes/finc/templates/myresearch/menu.phtml @@ -1,121 +1,122 @@ <!-- finc: myresearch - menu --> +<?php +$user = $this->auth()->isLoggedIn(); +$patron = $user ? $this->auth()->getILSPatron() : false; +$capabilityParams = $patron ? ['patron' => $patron] : []; +?> <h4><?=$this->transEsc('Your Account')?></h4> -<? /* finc needs to add .facet-group class and classes on sub items for borders - CK */ ?> -<div class="myresearch-menu facet-group"> - <? if ($this->userlist()->getMode() !== 'disabled'): ?> - - <a href="<?=$this->url('myresearch-favorites')?>"<?=$this->active == 'favorites' ? ' class="active"' : ''?>> - <i class="fa fa-fw fa-star" aria-hidden="true"></i> <?=$this->transEsc('Favorites')?> - </a> - - <? endif; ?> - <? if ('ils-none' !== $this->ils()->getOfflineMode()): ?> - <? if ($this->ils()->checkCapability('getMyTransactions')): ?> - - <a href="<?=$this->url('myresearch-checkedout')?>"<?=$this->active == 'checkedout' ? ' class="active"' : ''?>> - <i class="fa fa-fw fa-book" aria-hidden="true"></i> <?=$this->transEsc('Checked Out Items')?> - <? /* nxt line finc specific - CK */ ?> - <span id="getMyTransactions" class="itemCount pull-right no-padding"></span> - </a> - <? endif; ?> - <? if ($this->ils()->checkCapability('getMyHolds')): ?> - - <a href="<?=$this->url('myresearch-holds')?>"<?=$this->active == 'holds' ? ' class="active"' : ''?>> - <i class="fa fa-fw fa-flag" aria-hidden="true"></i> <?=$this->transEsc('Holds and Recalls')?> - <? /* nxt line finc specific - CK */ ?> - <span id="getMyHolds" class="itemCount pull-right no-padding"></span> - </a> - - <? endif; ?> - <? if ($this->ils()->checkFunction('StorageRetrievalRequests')): ?> - - <a href="<?=$this->url('myresearch-storageretrievalrequests')?>"<?=$this->active == 'storageRetrievalRequests' ? ' class="active"' : ''?>> - <i class="fa fa-fw fa-archive" aria-hidden="true"></i> <?=$this->transEsc('Storage Retrieval Requests')?> - <? /* nxt line finc specific - CK */ ?> - <span id="getMyStorageRetrievalRequests" class="itemCount pull-right no-padding"></span> - </a> - - <? endif; ?> - <? if ($this->ils()->checkFunction('ILLRequests')): ?> +<?php /* finc needs to add .facet-group class and classes on sub items for borders - CK */ ?> +<div class="myresearch-menu account-menu facet-group"> + <?php if ($this->userlist()->getMode() !== 'disabled'): ?> - <a href="<?=$this->url('myresearch-illrequests')?>"<?=$this->active == 'ILLRequests' ? ' class="active"' : ''?>> - <i class="fa fa-fw fa-exchange" aria-hidden="true"></i> <?=$this->transEsc('Interlibrary Loan Requests')?> - <? /* nxt line finc specific - CK */ ?> - <span id="getMyILLRequests" class="itemCount pull-right no-padding"></span> - </a> - - <? endif; ?> - <? if ($this->ils()->checkCapability('getMyFines')): ?> - - <a href="<?=$this->url('myresearch-fines')?>"<?=$this->active == 'fines' ? ' class="active"' : ''?>> - <i class="fa fa-fw fa-usd" aria-hidden="true"></i> <?=$this->transEsc('Fines')?> - </a> - - <? endif; ?> - <? if ($this->ils()->checkCapability('getMyProfile')): ?> - - <a href="<?=$this->url('myresearch-profile')?>"<?=$this->active == 'profile' ? ' class="active"' : ''?>> - <i class="fa fa-fw fa-user" aria-hidden="true"></i> <?=$this->transEsc('Profile')?> - </a> - - <? endif; ?> - <? $user = $this->auth()->isLoggedIn(); - if ($user && $user->libraryCardsEnabled()): ?> - - <a href="<?=$this->url('librarycards-home')?>"<?=$this->active == 'librarycards' ? ' class="active"' : ''?>> - <i class="fa fa-fw fa-barcode" aria-hidden="true"></i> <?=$this->transEsc('Library Cards')?> - </a> + <a href="<?=$this->url('myresearch-favorites')?>"<?=$this->active == 'favorites' ? ' class="active"' : ''?>> + <i class="fa fa-fw fa-star" aria-hidden="true"></i> <?=$this->transEsc('Favorites')?> + </a> - <? endif; ?> - <? endif; ?> - <? if ($this->accountCapabilities()->getSavedSearchSetting() === 'enabled'): ?> + <?php endif; ?> + <?php if ('ils-none' !== $this->ils()->getOfflineMode()): ?> + <?php if ($this->ils()->checkCapability('getMyTransactions', $capabilityParams)): ?> - <a href="<?=$this->url('search-history')?>?require_login"<?=$this->active == 'history' ? ' class="active"' : ''?>> - <i class="fa fa-fw fa-search" aria-hidden="true"></i> <?=$this->transEsc('history_saved_searches')?> + <a href="<?=$this->url('myresearch-checkedout')?>" class="flex checkedout<?=$this->active == 'checkedout' ? ' active' : ''?>"> + <span class="flex-col"><i class="fa fa-fw fa-book" aria-hidden="true"></i> <?=$this->transEsc('Checked Out Items')?></span> + <span class="checkedout-status status hidden"><i class="fa fa-spin fa-spinner" aria-hidden="true"></i></span> + <?php /* nxt line finc specific - CK */ ?> + <span id="getMyTransactions" class="itemCount pull-right no-padding"></span> + </a> + <?php endif; ?> + <?php if ($this->ils()->checkFunction('getMyTransactionHistory', $capabilityParams)): ?> + <a href="<?=$this->url('myresearch-historicloans')?>"<?=$this->active == 'historicloans' ? ' class="active"' : ''?>> + <i class="fa fa-fw fa-history" aria-hidden="true"></i> <?=$this->transEsc('Loan History')?> + </a> + <?php endif; ?> + <?php if ($this->ils()->checkCapability('getMyHolds', $capabilityParams)): ?> + + <a href="<?=$this->url('myresearch-holds')?>" class="flex<?=$this->active == 'holds' ? ' active' : ''?>"> + <span class="flex-col"><i class="fa fa-fw fa-flag" aria-hidden="true"></i> <?=$this->transEsc('Holds and Recalls')?></span> + <span class="holds-status status hidden"><i class="fa fa-spin fa-spinner" aria-hidden="true"></i></span> + <?php /* nxt line finc specific - CK */ ?> + <span id="getMyHolds" class="itemCount pull-right no-padding"></span> + </a> + <?php endif; ?> + <?php if ($this->ils()->checkFunction('StorageRetrievalRequests', $capabilityParams)): ?> + + <a href="<?=$this->url('myresearch-storageretrievalrequests')?>" class="flex<?=$this->active == 'storageRetrievalRequests' ? ' active' : ''?>"> + <span class="flex-col"><i class="fa fa-fw fa-archive" aria-hidden="true"></i> <?=$this->transEsc('Storage Retrieval Requests')?></span> + <span class="storageretrievalrequests-status status hidden"><i class="fa fa-spin fa-spinner" aria-hidden="true"></i></span> + <?php /* nxt line finc specific - CK */ ?> + <span id="getMyStorageRetrievalRequests" class="itemCount pull-right no-padding"></span> + </a> + <?php endif; ?> + <?php if ($this->ils()->checkFunction('ILLRequests', $capabilityParams)): ?> + + <a href="<?=$this->url('myresearch-illrequests')?>" class="flex<?=$this->active == 'ILLRequests' ? ' active' : ''?>"> + <span class="flex-col"><i class="fa fa-fw fa-exchange" aria-hidden="true"></i> <?=$this->transEsc('Interlibrary Loan Requests')?></span> + <span class="illrequests-status status hidden"><i class="fa fa-spin fa-spinner" aria-hidden="true"></i></span> + <?php /* nxt line finc specific - CK */ ?> + <span id="getMyILLRequests" class="itemCount pull-right no-padding"></span> </a> - <? endif; ?> - <? if ($user = $this->auth()->isLoggedIn()): ?> + <?php endif; ?> + <?php if ($this->ils()->checkCapability('getMyFines', $capabilityParams)): ?> + <a href="<?=$this->url('myresearch-fines')?>" class="flex<?=$this->active == 'fines' ? ' active' : ''?>"> + <span class="flex-col"><i class="fa fa-fw fa-usd" aria-hidden="true"></i> <?=$this->transEsc('Fines')?></span> + <span class="fines-status status hidden"><i class="fa fa-spin fa-spinner" aria-hidden="true"></i></span> + </a> + <?php endif; ?> + <a href="<?=$this->url('myresearch-profile')?>"<?=$this->active == 'profile' ? ' class="active"' : ''?>> + <i class="fa fa-fw fa-user" aria-hidden="true"></i> <?=$this->transEsc('Profile')?> + </a> + <?php if ($user && $user->libraryCardsEnabled()): ?> + <a href="<?=$this->url('librarycards-home')?>"<?=$this->active == 'librarycards' ? ' class="active"' : ''?>> + <i class="fa fa-fw fa-barcode" aria-hidden="true"></i> <?=$this->transEsc('Library Cards')?> + </a> + <?php endif; ?> + <?php endif; ?> + <?php if ($this->accountCapabilities()->getSavedSearchSetting() === 'enabled'): ?> + <a href="<?=$this->url('search-history')?>?require_login"<?=$this->active == 'history' ? ' class="active"' : ''?>> + <i class="fa fa-fw fa-search" aria-hidden="true"></i> <?=$this->transEsc('history_saved_searches')?> + </a> + <?php endif; ?> + <?php if ($user): ?> <a href="<?=$this->url('myresearch-logout')?>"> <i class="fa fa-fw fa-sign-out" aria-hidden="true"></i> <?=$this->transEsc("Log Out")?> </a> - <? endif; ?> + <?php endif; ?> </div> -<? if ($this->auth()->isLoggedIn() && $this->auth()->getManager()->supportsPasswordChange()): ?> + +<?php if ($this->auth()->isLoggedIn() && $this->auth()->getManager()->supportsPasswordChange()): ?> <h4><?=$this->transEsc('Preferences')?></h4> <div class="myresearch-menu facet-group"> - <a href="<?=$this->url('myresearch-changepassword')?>"<?=$this->active == 'newpassword' ? ' class="active"' : ''?>> <i class="fa fa-fw fa-lock" aria-hidden="true"></i> <?=$this->transEsc('Change Password')?> </a> - </div> -<? endif; ?> -<? if ($this->userlist()->getMode() !== 'disabled' && $user = $this->auth()->isLoggedIn()): ?> +<?php endif; ?> + +<?php if ($user && $this->userlist()->getMode() !== 'disabled'): ?> <h4><?=$this->transEsc('Your Lists')?></h4> <div class="myresearch-menu facet-group"> - <a href="<?=$this->url('myresearch-favorites')?>"<?=$this->active == 'favorites' ? ' class="active"' : ''?>> <i class="fa fa-fw fa-star" aria-hidden="true"></i> <?=$this->transEsc('Your Favorites')?> </a> - <? $lists = $user->getLists() ?> - <? foreach ($lists as $list): ?> - <? /* finc: keep icon inside + keep braces in badge!; CK*/ ?> + <?php $lists = $user->getLists() ?> + <?php foreach ($lists as $list): ?> + <?php /* finc: keep icon inside + keep braces in badge!; CK*/ ?> <a href="<?=$this->url('userList', ['id' => $list['id']])?>"<?=$this->active == 'list' . $list['id'] ? ' class="active"' : ''?>> <i class="fa fa-fw fa-star-o" aria-hidden="true"></i> <?=$this->escapeHtml($list['title'])?> <span class="badge">(<?=$list->cnt?>)</span> </a> - <? endforeach; ?> + <?php endforeach; ?> <a href="<?=$this->url('editList', ['id' => 'NEW'])?>"> <i class="fa fa-fw fa-plus" aria-hidden="true"></i> <?=$this->transEsc('Create a List')?> </a> </div> -<? endif ?> -<? /* finc: This script is finc-specific - CK */ ?> -<? $script = <<<JS +<?php endif ?> +<?php /* finc: This script is finc-specific - CK */ ?> +<?php $script = <<<JS $(document).ready(function () { countables = new Array; $('.itemCount').each(function() { diff --git a/themes/finc/templates/myresearch/mylist.phtml b/themes/finc/templates/myresearch/mylist.phtml index e6b0196374561eea865038fa427ca26a535709f3..16a97100b770982188891fe6cea499a17f8c2f56 100644 --- a/themes/finc/templates/myresearch/mylist.phtml +++ b/themes/finc/templates/myresearch/mylist.phtml @@ -1,5 +1,5 @@ <!-- finc: myresearch - mylist --> -<? +<?php // Grab list object from search results (if applicable): $list = $this->results->getListObject(); @@ -32,8 +32,8 @@ $user = $this->auth()->isLoggedIn(); <h2><?=$list ? $this->escapeHtml($list->title) : $this->transEsc("Your Favorites")?></h2> <nav class="search-header hidden-print"> <div class="search-stats"> - <? if ($recordTotal > 0): ?> - <? + <?php if ($recordTotal > 0): ?> + <?php $transParams = [ '%%start%%' => $this->localizedNumber($this->results->getStartRecord()), '%%end%%' => $this->localizedNumber($this->results->getEndRecord()), @@ -41,11 +41,11 @@ $user = $this->auth()->isLoggedIn(); ]; ?> <?=$this->translate('showing_items_of_html', $transParams);?> - <? endif; ?> + <?php endif; ?> </div> <div class="search-controls"> - <? if (isset($list)): ?> - <? if ($list->editAllowed($account->isLoggedIn())): ?> + <?php if (isset($list)): ?> + <?php if ($list->editAllowed($account->isLoggedIn())): ?> <a href="<?=$this->url('editList', ['id' => $list->id])?>" class="btn btn-link"><i class="fa fa-edit" aria-hidden="true"></i> <?=$this->transEsc("edit_list")?></a> <div class="btn-group"> <a class="btn btn-link dropdown-toggle" data-toggle="dropdown" href="<?=$this->url('myresearch-deletelist')?>?listID=<?=urlencode($list->id)?>"> @@ -56,38 +56,38 @@ $user = $this->auth()->isLoggedIn(); <li><a href="#"><?=$this->transEsc('confirm_dialog_no')?></a></li> </ul> </div> - <? endif; ?> - <? endif; ?> - <? if ($recordTotal > 0): ?> + <?php endif; ?> + <?php endif; ?> + <?php if ($recordTotal > 0): ?> <?=$this->render('search/controls/limit.phtml')?> <?=$this->render('search/controls/sort.phtml')?> - <? endif; ?> + <?php endif; ?> </div> </nav> - <? if ($list && !empty($list->description)): ?> + <?php if ($list && !empty($list->description)): ?> <p><?=$this->escapeHtml($list->description)?></p> - <? endif; ?> - <? if ($recordTotal > 0): ?> + <?php endif; ?> + <?php if ($recordTotal > 0): ?> <form class="form-inline" method="post" name="bulkActionForm" action="<?=$this->url('cart-myresearchbulk')?>" data-lightbox data-lightbox-onsubmit="bulkFormHandler"> - <?=$this->context($this)->renderInContext('myresearch/bulk-action-buttons.phtml', ['idPrefix' => '', 'list' => isset($list) ? $list : null, 'account' => $this->account])?> - <? foreach ($this->results->getResults() as $i => $current): ?> + <?=$this->context($this)->renderInContext('myresearch/bulk-action-buttons.phtml', ['idPrefix' => '', 'list' => $list ?? null, 'account' => $this->account])?> + <?php foreach ($this->results->getResults() as $i => $current): ?> <?=$this->record($current)->getListEntry($list, $user)?> - <? endforeach; ?> + <?php endforeach; ?> </form> <?=$this->paginationControl($this->results->getPaginator(), 'Sliding', 'search/pagination.phtml', ['results' => $this->results])?> - <? else: ?> + <?php else: ?> <p><?=$this->transEsc('You do not have any saved resources')?></p> - <? endif; ?> + <?php endif; ?> </div> <div class="<?=$this->layoutClass('sidebar')?>"> - <? /* nxt-line and related endif are finc-specific #12053, CK*/ ?> - <? if ($user): ?> + <?php /* nxt-line and related endif are finc-specific #12053, CK*/ ?> + <?php if ($user): ?> <?=$this->context($this)->renderInContext("myresearch/menu.phtml", ['active' => isset($list) ? 'list' . $list['id'] : 'favorites'])?> - <? endif; ?> - <? foreach ($this->results->getRecommendations('side') as $current): ?> + <?php endif; ?> + <?php foreach ($this->results->getRecommendations('side') as $current): ?> <?=$this->recommend($current)?> - <? endforeach; ?> + <?php endforeach; ?> </div> <!-- finc: myresearch - mylist - END --> \ No newline at end of file diff --git a/themes/finc/templates/myresearch/profile.phtml b/themes/finc/templates/myresearch/profile.phtml index 64e929fd9cb28f4dd68fd37997eb662a9c020f51..23a563176f250ea6d5eb7e388fe4089b3a036762 100644 --- a/themes/finc/templates/myresearch/profile.phtml +++ b/themes/finc/templates/myresearch/profile.phtml @@ -1,14 +1,11 @@ <!-- finc: myresearch - profile --> -<? +<?php // Set up page title: $this->headTitle($this->translate('My Profile')); // Set up breadcrumbs: $this->layout()->breadcrumbs = '<li><a href="' . $this->url('myresearch-home') . '">' . $this->transEsc('Your Account') . '</a></li> <li class="active">' . $this->transEsc('Profile') . '</li>'; -// Only display home library form if we have multiple pickup locations: -$showHomeLibForm = (isset($this->pickup) && count($this->pickup) > 1); - // Template for use by the renderArray helper: $arrTemplate = '<tr><th>%%LABEL%%:</th><td> %%VALUE%%</td></tr>'; ?> @@ -17,54 +14,78 @@ $arrTemplate = '<tr><th>%%LABEL%%:</th><td> %%VALUE%%</td></tr>'; <h2><?=$this->transEsc('Your Profile')?></h2> <?=$this->flashmessages();?> - <?=$this->context($this)->renderInContext('librarycards/selectcard.phtml', ['user' => $this->auth()->isLoggedIn()]); ?> - <table class="table table-striped"> - <? - echo $this->renderArray( - $arrTemplate, $this->profile, + <?=$this->renderArray( + $arrTemplate, $this->user, [ $this->transEsc('First Name') => 'firstname', - $this->transEsc('Last Name') => 'lastname' + $this->transEsc('Last Name') => 'lastname', + // finc: show e-mail in table below + // $this->transEsc('Email') => 'email', ] - ); - ?> - <? if ($showHomeLibForm): ?> - <tr> - <th><?=$this->transEsc('Preferred Library')?>:</th> - <? - $selected = (isset($this->profile['home_library']) && $this->profile['home_library'] != "") + )?> + <?php if (count($this->pickup ?? []) > 1): // Skip form if only one location: ?> + <tr><th><?=$this->transEsc('Preferred Library')?>:</th> + <?php + $selected = (strlen($this->profile['home_library'] ?? '') > 0) ? $this->profile['home_library'] : $this->defaultPickupLocation ?> <td> <form id="profile_form" class="form-inline" method="post"> <select id="home_library" name="home_library" class="form-control"> - <? foreach ($this->pickup as $lib): ?> + <?php foreach ($this->pickup as $lib): ?> <option value="<?=$this->escapeHtmlAttr($lib['locationID'])?>"<?=($selected == $lib['locationID']) ? ' selected="selected"' : ''?>><?=$this->transEsc('location_' . $lib['locationDisplay'], null, $lib['locationDisplay'])?></option> - <? endforeach; ?> + <?php endforeach; ?> </select> <input class="btn btn-default" type="submit" value="<?=$this->transEsc('Save')?>"/> </form> </td> - <? endif; ?> - <? - echo $this->renderArray( + <?php endif; ?> + </table> + + <div id="account-actions"> + <?php if ($this->auth()->getManager()->supportsPasswordChange()): ?> + <a class="btn btn-default" href="<?=$this->url('myresearch-changepassword') ?>"> + <i class="fa fa-fw fa-lock" aria-hidden="true"></i> <?=$this->transEsc('Change Password') ?> + </a> + <?php endif; ?> + + <?php if ($this->accountDeletion): ?> + <a class="btn btn-default" href="<?=$this->url('myresearch-deleteaccount') ?>" data-lightbox> + <i class="fa fa-times"></i> <?=$this->transEsc('delete_account_title') ?> + </a> + <?php endif; ?> + </div> + + <?php if (is_array($this->profile)): ?> + <h3><?=$this->transEsc('Library Catalog Profile')?></h3> + <p> + <?=$this->context($this)->renderInContext('librarycards/selectcard.phtml', ['user' => $this->user]); ?> + </p> + <table class="table table-striped"> + <?=$this->renderArray( $arrTemplate, $this->profile, [ + $this->transEsc('First Name') => 'firstname', + $this->transEsc('Last Name') => 'lastname', $this->transEsc('Address') . ' 1' => 'address1', $this->transEsc('Address') . ' 2' => 'address2', $this->transEsc('Zip') => 'zip', $this->transEsc('City') => 'city', $this->transEsc('Country') => 'country', + // finc: show e-mail here $this->transEsc('Email') => 'email', $this->transEsc('Phone Number') => 'phone', + $this->transEsc('Mobile Number') => 'mobile_phone', $this->transEsc('Group') => 'group', $this->transEsc('Expires') => 'expiration_date' ] - ); - ?> + )?> </table> + <?php elseif ('ils-none' !== $this->ils()->getOfflineMode() && $this->patronLoginView && !empty($this->patronLoginView->getTemplate())): ?> + <?=$this->partial($this->patronLoginView);?> + <?php endif; ?> </div> <div class="<?=$this->layoutClass('sidebar')?>"> diff --git a/themes/finc/templates/record/cart-buttons.phtml b/themes/finc/templates/record/cart-buttons.phtml index a2ceeb19af873a5bfd184e78c9d1e6845da1dae3..02c225d8ec57e3515b55551c2e3bd9df57d94568 100644 --- a/themes/finc/templates/record/cart-buttons.phtml +++ b/themes/finc/templates/record/cart-buttons.phtml @@ -1,26 +1,26 @@ <!-- finc: record - cart-buttons --> -<? $cart = $this->cart(); ?> -<? if ($cart->isActive()): ?> +<?php $cart = $this->cart(); ?> +<?php if ($cart->isActive()): ?> - <? $cartId = $this->source . '|' . $this->id; ?> + <?php $cartId = $this->source . '|' . $this->id; ?> <span class="btn-bookbag-toggle" data-cart-id="<?=$this->escapeHtmlAttr($this->id)?>" data-cart-source="<?=$this->escapeHtmlAttr($this->source)?>"> - <a class="cart-add hidden<? if (!$cart->contains($cartId)): ?> correct<? endif ?>"> + <a class="cart-add hidden<?php if (!$cart->contains($cartId)): ?> correct<?php endif ?>"> <i class="cart-link-icon fa fa-plus" aria-hidden="true" title="<?=$this->transEsc('Add to Book Bag')?>"></i><span class="cart-link-label"><?=$this->transEsc('Add to Book Bag')?></span> </a> - <a class="cart-remove hidden<? if ($cart->contains($cartId)): ?> correct<? endif ?>"> + <a class="cart-remove hidden<?php if ($cart->contains($cartId)): ?> correct<?php endif ?>"> <i class="cart-link-icon fa fa-minus-circle" aria-hidden="true" title="<?=$this->transEsc('Remove from Book Bag')?>"></i> <span class="cart-link-label"><?=$this->transEsc('Remove from Book Bag')?></span> </a> <noscript> <form method="post" name="addForm" action="<?=$this->url('cart-processor')?>"> <input type="hidden" name="ids[]" value="<?=$this->escapeHtmlAttr($cartId)?>"/> - <? if ($cart->contains($cartId)): ?> + <?php if ($cart->contains($cartId)): ?> <input class="btn btn-default" type="submit" name="delete" value="<?=$this->transEsc('Remove from Book Bag')?>"/> - <? else: ?> + <?php else: ?> <input class="btn btn-default" type="submit" name="add" value="<?=$this->transEsc('Add to Book Bag')?>"/> - <? endif; ?> + <?php endif; ?> </form> </noscript> </span> -<? endif; ?> +<?php endif; ?> <!-- finc: record - cart-buttons END --> diff --git a/themes/finc/templates/record/cover.phtml b/themes/finc/templates/record/cover.phtml index c87ba27f09dc86142fc76ff254cb082d61fe1df8..db8796d6d737ccb540f2e6992dbbe5a008a163dd 100644 --- a/themes/finc/templates/record/cover.phtml +++ b/themes/finc/templates/record/cover.phtml @@ -1,12 +1,12 @@ <!-- finc: record - cover --> -<? /* Display thumbnail if appropriate: */ ?> -<? /* If we want to load covers in lightbox use .recordcover; +<?php /* Display thumbnail if appropriate: */ ?> +<?php /* If you want to load covers in lightbox use .recordcover; the class .nocover prevents nocover images from loading in lightbox or can be used to hide the images */ ?> -<? if ($cover): ?> - <? if ($this->link): ?><a href="<?=$this->escapeHtmlAttr($this->link)?>"><? endif; ?> - <img alt="<?=$this->transEsc('Cover Image')?>" <? if ($linkPreview): ?>data-linkpreview="true" <? endif; ?>class="recordcover" src="<?=$this->escapeHtmlAttr($cover); ?>"/> - <? if ($this->link): ?></a><? endif; ?> -<? else: ?> - <img src="<?=$this->url('cover-unavailable')?>" <? if ($linkPreview): ?>data-linkpreview="true" <? endif; ?>class="nocover" alt="<?=$this->transEsc('No Cover Image')?>"/> -<? endif; ?> +<?php if ($cover): ?> + <?php if ($this->link): ?><a href="<?=$this->escapeHtmlAttr($this->link)?>" data-lightbox-image><?php endif; ?> + <img alt="<?=$this->transEsc('Cover Image')?>" <?php if ($linkPreview): ?>data-linkpreview="true" <?php endif; ?>class="recordcover" src="<?=$this->escapeHtmlAttr($cover); ?>"/> + <?php if ($this->link): ?></a><?php endif; ?> +<?php else: ?> + <img src="<?=$this->url('cover-unavailable')?>" <?php if ($linkPreview): ?>data-linkpreview="true" <?php endif; ?>class="nocover" alt="<?=$this->transEsc('No Cover Image')?>"/> +<?php endif; ?> <!-- finc: record - cover - END --> diff --git a/themes/finc/templates/record/emailhold.phtml b/themes/finc/templates/record/emailhold.phtml index 8e0597b8c4d710a065738d4f56abcc3d50def439..c036a4a88af99110a148f8f832b61e6653e41a51 100644 --- a/themes/finc/templates/record/emailhold.phtml +++ b/themes/finc/templates/record/emailhold.phtml @@ -1,23 +1,23 @@ <!-- finc: record - emailhold --> -<? - // Set page title. - $this->headTitle($this->translate('EmailHold::email_hold_place_text') . ': ' . $this->driver->getBreadcrumb()); +<?php +// Set page title. +$this->headTitle($this->translate('EmailHold::email_hold_place_text') . ': ' . $this->driver->getBreadcrumb()); - // Set up breadcrumbs: - $this->layout()->breadcrumbs = '<li>' . $this->searchMemory()->getLastSearchLink($this->transEsc('Search'), '', '</li>') - . '<li>' . $this->recordLink()->getBreadcrumb($this->driver) . '</li>' - . '<li class="active">' . $this->transEsc('EmailHold::email_hold_place_text') . '</li>'; +// Set up breadcrumbs: +$this->layout()->breadcrumbs = '<li>' . $this->searchMemory()->getLastSearchLink($this->transEsc('Search'), '', '</li>') + . '<li>' . $this->recordLink()->getBreadcrumb($this->driver) . '</li>' + . '<li class="active">' . $this->transEsc('EmailHold::email_hold_place_text') . '</li>'; ?> <h2><?=$this->transEsc('EmailHold::email_hold_place_text')?></h2> -<? if ($this->helpText): ?> -<p class="helptext"><?=$this->helpText?></p> -<? endif; ?> +<?php if ($this->helpText): ?> + <p class="helptext"><?=$this->helpText?></p> +<?php endif; ?> <?=$this->flashmessages()?> <div class="email-hold-form"> <form name="placeEmailHold" method="post"> - <? if (in_array("item-issue", $this->extraFields)): ?> - <div id="emailHoldReference" class="emailHoldReference"> + <?php if (in_array("item-issue", $this->extraFields)): ?> + <div id="emailHoldReference" class="emailHoldReference"> <label class="control-label" for="volume"><?=$this->transEsc('EmailHold::email_hold_volume')?>:</label> <input type="text" name="gatheredDetails[volume]" value="<?=isset($this->gatheredDetails['volume']) ? $this->escapeHtmlAttr($this->gatheredDetails['volume']) : ''?>" id="volume" class="form-control"/><br/> @@ -27,52 +27,53 @@ <label class="control-label" for="year"><?=$this->transEsc('EmailHold::email_hold_year')?>:</label> <input type="text" name="gatheredDetails[year]" value="<?=isset($this->gatheredDetails['year']) ? $this->escapeHtmlAttr($this->gatheredDetails['year']) : ''?>" id="year" class="form-control"/><br/> </div> - <? endif; ?> + <?php endif; ?> - <? if (in_array("requiredByDate", $this->extraFields)): ?> + <?php if (in_array("requiredByDate", $this->extraFields)): ?> <label class="control-label" for="requiredByDate"><?=$this->transEsc("EmailHold::hold_required_by")?>:</label> <input id="requiredByDate" type="text" name="gatheredDetails[requiredBy]" value="<?=(isset($this->gatheredDetails['requiredBy']) && !empty($this->gatheredDetails['requiredBy'])) ? $this->escapeHtmlAttr($this->gatheredDetails['requiredBy']) : $this->escapeHtmlAttr($this->defaultRequiredDate)?>" size="8" class="form-control"/> - (<?=$this->dateTime()->getDisplayDateFormat()?>) + (<?=$this->dateTime()->getDisplayDateFormat()?>) - <? endif; ?> + <?php endif; ?> - <? if (in_array("pickUpLocation", $this->extraFields)): ?> - <? if (count($this->pickup) > 1): ?> - <? - if (isset($this->gatheredDetails['pickUpLocation']) && $this->gatheredDetails['pickUpLocation'] !== "") { - $selected = $this->gatheredDetails['pickUpLocation']; - } elseif (isset($this->homeLibrary) && $this->homeLibrary !== "") { - $selected = $this->homeLibrary; - } else { - $selected = $this->defaultPickup; - } - ?> + <?php if (in_array("pickUpLocation", $this->extraFields)): ?> + <?php if (count($this->pickup) > 1): ?> + <?php + if (isset($this->gatheredDetails['pickUpLocation']) && $this->gatheredDetails['pickUpLocation'] !== "") { + $selected = $this->gatheredDetails['pickUpLocation']; + } elseif (isset($this->homeLibrary) && $this->homeLibrary !== "") { + $selected = $this->homeLibrary; + } else { + $selected = $this->defaultPickup; + } + ?> <label class="control-label" for="pickUpLocation"><?=$this->transEsc("EmailHold::pick_up_location")?>:</label> <select name="gatheredDetails[pickUpLocation]" id="pickUpLocation" class="form-control"> - <? if ($selected === false): ?> - <option value="" selected="selected"> - <?=$this->transEsc('EmailHold::select_pickup_location')?> - </option> - <? endif; ?> - <? foreach ($this->pickup as $lib): ?> - <option value="<?=$this->escapeHtmlAttr($lib['locationID'])?>" <?=($selected == $lib['locationID']) ? ' selected="selected"' : ''?>> - <?=$this->escapeHtml($lib['locationDisplay'])?> - </option> - <? endforeach; ?> - </select> + <?php if ($selected === false): ?> + <option value="" selected="selected"> + <?=$this->transEsc('EmailHold::select_pickup_location')?> + </option> + <?php endif; ?> + <?php foreach ($this->pickup as $lib): ?> + <option value="<?=$this->escapeHtmlAttr($lib['locationID'])?>" <?=($selected == $lib['locationID']) ? ' selected="selected"' : ''?>> + <?=$this->escapeHtml($lib['locationDisplay'])?> + </option> + <?php endforeach; ?> + </select> - <? else: ?> - <input type="hidden" name="gatheredDetails[pickUpLocation]" value="<?=$this->escapeHtmlAttr($this->defaultPickup)?>" /> - <? endif; ?> - <? endif; ?> + <?php else: ?> + <input type="hidden" name="gatheredDetails[pickUpLocation]" value="<?=$this->escapeHtmlAttr($this->defaultPickup)?>"/> + <?php endif; ?> + <?php endif; ?> - <? if (in_array("comments", $this->extraFields)): ?> + <?php if (in_array("comments", $this->extraFields)): ?> <label class="control-label" for="comment"><?=$this->transEsc("Comments")?>:</label> - <textarea rows="3" cols="20" name="gatheredDetails[comment]" id="comment" class="form-control"><?=isset($this->gatheredDetails['comment']) ? $this->escapeHtml($this->gatheredDetails['comment']) : ''?></textarea> - <? endif; ?> + <textarea rows="3" cols="20" name="gatheredDetails[comment]" id="comment" + class="form-control"><?=isset($this->gatheredDetails['comment']) ? $this->escapeHtml($this->gatheredDetails['comment']) : ''?></textarea> + <?php endif; ?> - <input class="btn btn-primary" type="submit" name="placeEmailHold" role="button" value="<?=$this->transEsc('EmailHold::email_hold_submit_text')?>"/> + <input class="btn btn-primary" type="submit" name="placeEmailHold" role="button" value="<?=$this->transEsc('EmailHold::email_hold_submit_text')?>"/> </form> </div> diff --git a/themes/finc/templates/record/pdaform.phtml b/themes/finc/templates/record/pdaform.phtml index daa7748c56059616b7a72981cd76483a73242e88..440c1c275f57ea893e832e569c6fcc3de893b237 100644 --- a/themes/finc/templates/record/pdaform.phtml +++ b/themes/finc/templates/record/pdaform.phtml @@ -1,5 +1,5 @@ <!-- finc: record - pdaform --> -<? +<?php // Set page title. $this->headTitle($this->translate('PDA::Acquisition')); @@ -24,20 +24,19 @@ $this->layout()->breadcrumbs = '<li>' . $this->searchMemory()->getLastSearchLink <label class="control-label" for="pdaSubject"><?=$this->transEsc('PDA::pda_form_field_of_study_label')?><span class="required">*</span>:</label> <select name="pdaFieldOfStudy" class="form-control"> <option value="-1"><?=$this->transEsc('PDA::pda_form_field_of_study_text')?></option> - <? if (isset($this->fieldOfStudyList) && is_array($this->fieldOfStudyList)): ?> - <? foreach ($this->fieldOfStudyList as $value): ?> - <option value="<?=$value?>" <? if (!empty($this->pdaFieldOfStudy) && $value == $this->pdaFieldOfStudy): ?> selected="selected"<? endif; ?>><?=$this->transEsc('PDA::fos_' . $value)?></option> - <? endforeach; ?> - <? endif; ?> + <?php if (isset($this->fieldOfStudyList) && is_array($this->fieldOfStudyList)): ?> + <?php foreach ($this->fieldOfStudyList as $value): ?> + <option value="<?=$value?>" <?php if (!empty($this->pdaFieldOfStudy) && $value == $this->pdaFieldOfStudy): ?> selected="selected"<?php endif; ?>><?=$this->transEsc('PDA::fos_' . $value)?></option> + <?php endforeach; ?> + <?php endif; ?> </select> </div> <div class="form-group"> - <span> - <?=$this->recaptcha()->html($this->useRecaptcha)?> - </span> + <span> + <?=$this->recaptcha()->html($this->useRecaptcha)?> + </span> <input type="submit" class="btn btn-primary" role="button" name="submit" value="<?=$this->transEsc('Submit')?>"/> - <a class="btn btn-primary" data-lightbox-ignore data-toggle="tooltip" title="<?=$this->transEsc('PDA::pda_open_new_window')?>" href="<?=$this->interlibraryloan()->getSwbLink($this->driver)?>" - target="_blank"><?=$this->transEsc('PDA::pda_tab_interlibrary_button')?> + <a class="btn btn-primary" data-lightbox-ignore data-toggle="tooltip" title="<?=$this->transEsc('PDA::pda_open_new_window')?>" href="<?=$this->interlibraryloan()->getSwbLink($this->driver)?>" target="_blank"><?=$this->transEsc('PDA::pda_tab_interlibrary_button')?> </a> <button class="btn btn-transparent" type="button" data-dismiss="modal" href="#"><?=$this->transEsc('Reset')?></button> </div> diff --git a/themes/finc/templates/record/pdamessage.phtml b/themes/finc/templates/record/pdamessage.phtml index abf32479eade23d86dcd5feda59a4c4c4b7b33c0..1a385ff512d5c06b5f3b5d1da18237defe274a07 100644 --- a/themes/finc/templates/record/pdamessage.phtml +++ b/themes/finc/templates/record/pdamessage.phtml @@ -1,5 +1,5 @@ -<!-- finc: record - PDAMESSAGE --> -<? +<!-- finc: record - pdamessage --> +<?php // Set page title. $this->headTitle($this->translate('PDA::Acquisition')); @@ -9,4 +9,4 @@ . '<li class="active">' . $this->transEsc('PDA::Acquisition') . '</li>'; ?> <?=$this->flashmessages()?> -<!-- finc: record - PDAMESSAGE - END --> +<!-- finc: record - pdamessage - END --> diff --git a/themes/finc/templates/record/reporterrorsform.phtml b/themes/finc/templates/record/reporterrorsform.phtml index 8ce730b47208c7df3dae73b815bd01563442e711..396ecd138f251ac17bc1eaeb8d3aa99382694d52 100644 --- a/themes/finc/templates/record/reporterrorsform.phtml +++ b/themes/finc/templates/record/reporterrorsform.phtml @@ -1,5 +1,5 @@ <!-- finc: record - reporterrorsform --> -<? +<?php // Set page title. $this->headTitle($this->translate('ReportErrors')); @@ -13,8 +13,8 @@ $this->layout()->breadcrumbs = '<li>' . $this->searchMemory()->getLastSearchLink <?=$this->flashmessages()?> <div class="form-group"> <label class="control-label" for="reporterrors_email"><?=$this->transEsc("Email")?>:</label> - <input type="email" id="reporterrors_email" name="reporterrors_email" class="form-control"<? if (!empty($this->email)): ?> value="<?=$this->email?>"<? endif; ?>/> - <div class="gutter-top gutter-btm <? if (empty($this->email)): ?>hidden<? endif; ?>" id="replyCheckbox"> + <input type="email" id="reporterrors_email" name="reporterrors_email" class="form-control"<?php if (!empty($this->email)): ?> value="<?=$this->email?>"<?php endif; ?>/> + <div class="gutter-top gutter-btm <?php if (empty($this->email)): ?>hidden<?php endif; ?>" id="replyCheckbox"> <label for="reporterrors_checkbox" class="control-label"><?=$this->transEsc("reporterrors_response_requested")?></label> <input type="checkbox" id="reporterrors_checkbox" name="reporterrors_checkbox"<?=($this->reply_requested) ? ' checked' : ''?> /> </div> @@ -27,7 +27,7 @@ $this->layout()->breadcrumbs = '<li>' . $this->searchMemory()->getLastSearchLink <input type="submit" class="btn btn-primary" role="button" name="submit" value="<?=$this->transEsc('Send')?>"/> </div> </form> -<? $script = <<<JS +<?php $script = <<<JS $(document).ready(function () { // show response email checkbox ReportErrors $('input#reporterrors_email').on('keyup change', function () { diff --git a/themes/finc/templates/record/view.phtml b/themes/finc/templates/record/view.phtml index 2117940030a02d2b6dbc4f17d42f1fef38c78e18..f9442b2b3e731a5bce282ca51e35c61fb4ab8ac2 100644 --- a/themes/finc/templates/record/view.phtml +++ b/themes/finc/templates/record/view.phtml @@ -1,5 +1,5 @@ <!-- finc: record - view --> -<? +<?php // Set up standard record scripts: $this->headScript()->appendFile("record.js"); $this->headScript()->appendFile("check_save_statuses.js"); @@ -19,109 +19,116 @@ $this->layout()->breadcrumbs = '<li>' . $this->searchMemory()->getLastSearchLink $this->layout()->title = $this->driver->getShortTitle(); ?> - <? if (isset($this->scrollData) && ($this->scrollData['previousRecord'] || $this->scrollData['nextRecord'])): ?> - <? /* Pager is identical to pager in collection - view! - CK */ ?> - <ul class="pager hidden-print"> - <? if ($this->scrollData['previousRecord']): ?> - <? if ($this->scrollData['firstRecord']): ?> - <li class="left"> - <a href="<?=$this->recordLink()->getUrl($this->scrollData['firstRecord'])?>" title="<?=$this->transEsc('First Search Result')?>" rel="nofollow">« <?=$this->transEsc('First')?></a> + <?php if (isset($this->scrollData) && ($this->scrollData['previousRecord'] || $this->scrollData['nextRecord'])): ?> + <?php + /* Pager is identical to pager in collection - view! + Keep .left/.right classes for alignment on left/right edge - CK */ + ?> + <ul class="pager hidden-print"> + <?php if ($this->scrollData['previousRecord']): ?> + <?php if ($this->scrollData['firstRecord']): ?> + <li class="left"> + <a href="<?=$this->recordLink()->getUrl($this->scrollData['firstRecord'])?>" title="<?=$this->transEsc('First Search Result')?>" rel="nofollow">« <?=$this->transEsc('First')?></a> </li> - <? endif; ?> + <?php endif; ?> <li class="left"> <a href="<?=$this->recordLink()->getUrl($this->scrollData['previousRecord'])?>" title="<?=$this->transEsc('Previous Search Result')?>" rel="nofollow">« <?=$this->transEsc('Prev')?></a> </li> - <? else: ?> - <? if ($this->scrollData['firstRecord']): ?> + <?php else: ?> + <?php if ($this->scrollData['firstRecord']): ?> <li class="disabled left"><a href="#">« <?=$this->transEsc('First')?></a></li> - <? endif; ?> + <?php endif; ?> <li class="disabled left"><a href="#">« <?=$this->transEsc('Prev')?></a></li> - <? endif; ?> - <? /* finc-specific: li + hidden-xs, and li class="right" below CK */ ?> + <?php endif; ?> + <?php + /* finc-specific wrapping: li + hidden-xs for consistency - CK */ + ?> <li class="hidden-xs"> <?=$this->transEsc('of_num_results', [ '%%position%%' => $this->localizedNumber($this->scrollData['currentPosition']), '%%total%%' => $this->localizedNumber($this->scrollData['resultTotal']) ]) ?> </li> - <? if ($this->scrollData['nextRecord']): ?> + <?php if ($this->scrollData['nextRecord']): ?> <li class="right"> <a href="<?=$this->recordLink()->getUrl($this->scrollData['nextRecord'])?>" title="<?=$this->transEsc('Next Search Result')?>" rel="nofollow"><?=$this->transEsc('Next')?> »</a> </li> - <? if ($this->scrollData['lastRecord']): ?> + <?php if ($this->scrollData['lastRecord']): ?> <li class="right"> <a href="<?=$this->recordLink()->getUrl($this->scrollData['lastRecord'])?>" title="<?=$this->transEsc('Last Search Result')?>" rel="nofollow"><?=$this->transEsc('Last')?> »</a> </li> - <? endif; ?> - <? else: ?> + <?php endif; ?> + <?php else: ?> <li class="disabled right"><a href="#"><?=$this->transEsc('Next')?> »</a></li> - <? if ($this->scrollData['lastRecord']): ?> + <?php if ($this->scrollData['lastRecord']): ?> <li class="disabled right"><a href="#"><?=$this->transEsc('Last')?> »</a></li> - <? endif; ?> - <? endif; ?> + <?php endif; ?> + <?php endif; ?> </ul> - <? endif; ?> + <?php endif; ?> - <? /* finc-specific: Remove getToolbar from here and add it to sidebar below - CK */ ?> + <?php + /* finc-specific: Remove getToolbar from here and add it to sidebar below - CK + <?=$this->record($this->driver)->getToolbar()?> */ + ?> - <div class="record source<?=$this->escapeHtmlAttr($this->driver->getSourceIdentifier())?> row"> - <? /* finc-specific print... class - CK */ ?> + <div class="record source<?=$this->escapeHtmlAttr($this->driver->getSourceIdentifier())?>"> + <?php /* finc: remove related-sidebar count and "solo" class since we use a custom sidebar, + keep print classes, CK */ ?> + <?php $sidebarList = $this->related()->getList($this->driver); ?> <div class="<?=$this->layoutClass('mainbody')?> print-full-width"> <input type="hidden" value="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>" class="hiddenId"/> <input type="hidden" value="<?=$this->escapeHtmlAttr($this->driver->getSourceIdentifier())?>" class="hiddenSource"/> <?=$this->flashmessages()?> <?=$this->record($this->driver)->getCoreMetadata()?> - <? if (count($this->tabs) > 0): ?> + <?php if (count($this->tabs) > 0): ?> <a name="tabnav"></a> <div class="record-tabs"> <ul class="nav nav-tabs"> - <? foreach ($this->tabs as $tab => $obj): ?> - <? // add current tab to breadcrumbs if applicable: + <?php foreach ($this->tabs as $tab => $obj): ?> + <?php // add current tab to breadcrumbs if applicable: $desc = $obj->getDescription(); - $tab_classes = []; + $tabName = preg_replace("/\W/", "-", strtolower($tab)); + $tabClasses = [ 'record-tab', $tabName ]; if (0 === strcasecmp($this->activeTab, $tab)) { if (!$this->loadInitialTabWithAjax || !$obj->supportsAjax()) { - $tab_classes[] = 'active'; + $tabClasses[] = 'active'; } - $tab_classes[] = 'initiallyActive'; + $tabClasses[] = 'initiallyActive'; $this->layout()->breadcrumbs .= '<li class="active">' . $this->transEsc($desc) . '</li>'; $activeTabObj = $obj; } - if (!$obj->isVisible()) { - $tab_classes[] = 'hidden'; - } - if (!$obj->supportsAjax()) { - $tab_classes[] = 'noajax'; - } + if (!$obj->isVisible()) { $tabClasses[] = 'hidden'; } + if (!$obj->supportsAjax()) { $tabClasses[] = 'noajax'; } ?> - <li<?=count($tab_classes) > 0 ? ' class="' . implode(' ', $tab_classes) . '"' : ''?>> - <a class="<?=strtolower($tab)?>" href="<?=$this->recordLink()->getTabUrl($this->driver, $tab)?>#tabnav"<? if ($obj->supportsAjax() && in_array($tab, $this->backgroundTabs)): ?> data-background<? endif ?>><?=$this->transEsc($desc)?></a> + <li class="<?=implode(' ', $tabClasses)?>" data-tab="<?=$tabName?>"> + <a href="<?=$this->recordLink()->getTabUrl($this->driver, $tab)?>#tabnav"<?php if ($obj->supportsAjax() && in_array($tab, $this->backgroundTabs)):?> data-background<?php endif ?>><?=$this->transEsc($desc)?></a> </li> - <? endforeach; ?> + <?php endforeach; ?> </ul> <div class="tab-content"> - <? if (!$this->loadInitialTabWithAjax || !isset($activeTabObj) || !$activeTabObj->supportsAjax()): ?> - <div class="tab-pane active <?=$this->activeTab?>-tab"> + <?php if (!$this->loadInitialTabWithAjax || !isset($activeTabObj) || !$activeTabObj->supportsAjax()): ?> + <div class="tab-pane active <?=$this->escapeHtmlAttr($this->activeTab) ?>-tab"> <?=isset($activeTabObj) ? $this->record($this->driver)->getTab($activeTabObj) : ''?> </div> - <? endif; ?> + <?php endif; ?> </div> </div> - <? endif; ?> + <?php endif; ?> <?=$this->driver->supportsCoinsOpenURL() ? '<span class="Z3988" title="' . $this->escapeHtmlAttr($this->driver->getCoinsOpenURL()) . '"></span>' : ''?> </div> <div class="<?=$this->layoutClass('sidebar')?>"> - <? /* finc-specific: add toolbar to sidebar - CK */ ?> + <?php /* finc-specific: add toolbar to sidebar - CK */ ?> <?=$this->record($this->driver)->getToolbar()?> - <? foreach ($this->related()->getList($this->driver) as $current): ?> + <?php foreach ($sidebarList as $current): ?> <?=$this->related()->render($current)?> - <? endforeach; ?> + <?php endforeach; ?> </div> </div> diff --git a/themes/finc/templates/search/advanced/layout.phtml b/themes/finc/templates/search/advanced/layout.phtml index ba61303c16aa2f689fe44b1c91a8f3fce5a89d9c..56bb3e5dd32481331cb7a32f51253bd5614878d4 100644 --- a/themes/finc/templates/search/advanced/layout.phtml +++ b/themes/finc/templates/search/advanced/layout.phtml @@ -1,5 +1,5 @@ <!-- finc: search - advanced - layout --> -<? +<?php // Set page title. $this->headTitle($this->translate('Advanced Search')); @@ -65,88 +65,90 @@ if (isset($searchDetails) && is_object($searchDetails)) { <?=$this->flashmessages()?> <div role="search"> <form name="searchForm" id="advSearchForm" method="get" action="<?=$this->url($this->options->getSearchAction())?>"> - <? foreach ($hiddenFilters as $key => $filter): ?> - <? foreach ($filter as $value): ?> + <?php foreach ($hiddenFilters as $key => $filter): ?> + <?php foreach ($filter as $value): ?> <input type="hidden" name="hiddenFilters[]" value="<?=$this->escapeHtmlAttr($key) . ':' . $this->escapeHtmlAttr($value)?>" /> - <? endforeach; ?> - <? endforeach; ?> + <?php endforeach; ?> + <?php endforeach; ?> <div class="<?=$this->layoutClass('mainbody')?>"> - <? $lastSort = $this->searchMemory()->getLastSort($this->searchClassId); ?> - <? if (!empty($lastSort)): ?> + <?php $lastSort = $this->searchMemory()->getLastSort($this->searchClassId); ?> + <?php if (!empty($lastSort)): ?> <input type="hidden" name="sort" value="<?=$this->escapeHtmlAttr($lastSort)?>" /> - <? endif; ?> + <?php endif; ?> <div class="clearfix"> <h2 class="pull-left flip"><?=$this->transEsc('Advanced Search')?></h2> <div id="groupJoin" class="form-inline pull-right flip"> <label for="groupJoinOptions"><?=$this->transEsc("search_match")?>:</label> <select id="groupJoinOptions" name="join" class="form-control"> - <option value="AND"<? if($searchDetails && $searchDetails->getOperator()=='ALL'):?> selected<?endif?>><?= $this->transEsc('group_AND') ?></option> - <option value="OR"<? if($searchDetails && $searchDetails->getOperator()=='OR'):?> selected<?endif?>><?= $this->transEsc('group_OR') ?></option> + <option value="AND"<?php if($searchDetails && $searchDetails->getOperator()=='ALL'):?> selected<?php endif;?>><?= $this->transEsc('group_AND') ?></option> + <option value="OR"<?php if($searchDetails && $searchDetails->getOperator()=='OR'):?> selected<?php endif;?>><?= $this->transEsc('group_OR') ?></option> </select> </div> </div> - <? /* finc: keep icon inside link for consistent functionality */ ?> + <?php /* finc: keep icon inside link for consistent functionality */ ?> <span id="groupPlaceHolder" class="hidden"> <a href="javascript:void(0);" onClick="addGroup();return false"><i class="fa fa-plus" aria-hidden="true"> </i> <?= $this->transEsc('add_search_group') ?></a> </span> - <? /* fallback to a fixed set of search groups/fields if JavaScript is turned off */ ?> + <?php /* fallback to a fixed set of search groups/fields if JavaScript is turned off */ ?> <div class="no-js"> - <? if(!empty($this->formOverride)): ?> + <?php if(!empty($this->formOverride)): ?> <?=$this->formOverride ?> - <? else: ?> - <? for($group=0 ; $group<3 || $group<=$setGroupCount ; $group++): ?> - <? if($group == 0): ?> + <?php else: ?> + <?php for($group=0 ; $group<3 || $group<=$setGroupCount ; $group++): ?> + <?php if($group == 0): ?> <div id="new_group_template"> - <? endif; ?> + <?php endif; ?> <div id="group<?=$group ?>" class="adv-group"> <div class="adv-group-terms"> <label class="adv-group-label"><?=$this->transEsc("adv_search_label")?>:</label> - <? for($search=0 ; $search<3 || (isset($setQueries[$group]) && $search<count($setQueries[$group])) ; $search++): ?> - <? if($group == 0 && $search == 0): ?> + <?php for($search=0 ; $search<3 || (isset($setQueries[$group]) && $search<count($setQueries[$group])) ; $search++): ?> + <?php if($group == 0 && $search == 0): ?> <div id="new_search_template"> - <? endif; ?> + <?php endif; ?> <div id="search<?=$group.'_'.$search ?>" class="adv-search"> - <input name="lookfor<?=$group ?>[]" id="search_lookfor<?=$group.'_'.$search ?>" class="adv-term-input form-control" type="text"<?if(isset($setQueries[$group][$search])):?> value="<?=$this->escapeHtml($setQueries[$group][$search]->getString())?>"<?endif;?>> - <select class="adv-term-type form-control" name="type<?=$group ?>[]"> - <? foreach ($this->options->getAdvancedHandlers() as $searchVal => $searchDesc): ?> - <option value="<?=$this->escapeHtml($searchVal)?>"<?if(isset($setQueries[$group][$search]) && $searchVal == $setQueries[$group][$search]->getHandler()):?> selected<?endif;?>><?=$this->transEsc($searchDesc)?></option> - <? endforeach; ?> + <input name="lookfor<?=$group ?>[]" id="search_lookfor<?=$group . '_' . $search ?>" class="adv-term-input form-control" type="text"<?php if (isset($setQueries[$group][$search])): ?> value="<?=$this->escapeHtml($setQueries[$group][$search]->getString())?>"<?php endif; ?> aria-label="<?=$this->transEsc("search_terms")?>"> + <select class="adv-term-type form-control" name="type<?=$group ?>[]" aria-label="<?=$this->transEsc("Search type")?>"> + <?php foreach ($this->options->getAdvancedHandlers() as $searchVal => $searchDesc): ?> + <option value="<?=$this->escapeHtml($searchVal)?>"<?php if(isset($setQueries[$group][$search]) && $searchVal == $setQueries[$group][$search]->getHandler()):?> selected<?php endif;?>><?=$this->transEsc($searchDesc)?></option> + <?php endforeach; ?> </select> <a href="javascript:void(0);" class="adv-term-remove hidden">×</a> </div> - <? if($group == 0 && $search == 0): ?> + <?php if($group == 0 && $search == 0): ?> </div> - <? /* finc: use xs-cols to improve mobile view, .middle used in print styles, CK */ ?> + <?php /* finc: moving entire original icon tag inside link WILL BUST removal-button functionality! + (As this will also 'shift search_place_holder') Therefore Keep 'search_place_holder' separate and move icon only ! + */ ?> <span class="float-left"> <span class="search_place_holder hidden" aria-hidden="true"></span> <a href="javascript:void(0);" class="add_search_link hidden"> <i class="fa fa-plus" aria-hidden="true"></i> <?=$this->transEsc("add_search")?></a> </span> - <? endif; ?> - <? endfor; ?> + <?php endif; ?> + <?php endfor; ?> </div> <div class="adv-group-match"> <label class="search_bool"><?=$this->transEsc("search_match")?>: </label> <select name="bool<?=$group ?>[]" id="search_bool<?=$group ?>" class="form-control"> - <option value="AND"<? if(isset($setSearchGroups[$group]) && 'AND' == $setSearchGroups[$group]):?> selected<?endif;?>><?=$this->transEsc("search_AND")?></option> - <option value="OR"<? if(isset($setSearchGroups[$group]) && 'OR' == $setSearchGroups[$group]):?> selected<?endif;?>><?=$this->transEsc("search_OR")?></option> - <option value="NOT"<? if(isset($setSearchGroups[$group]) && 'NOT' == $setSearchGroups[$group]):?> selected<?endif;?>><?=$this->transEsc("search_NOT")?></option> + <option value="AND"<?php if(isset($setSearchGroups[$group]) && 'AND' == $setSearchGroups[$group]):?> selected<?php endif;?>><?=$this->transEsc("search_AND")?></option> + <option value="OR"<?php if(isset($setSearchGroups[$group]) && 'OR' == $setSearchGroups[$group]):?> selected<?php endif;?>><?=$this->transEsc("search_OR")?></option> + <option value="NOT"<?php if(isset($setSearchGroups[$group]) && 'NOT' == $setSearchGroups[$group]):?> selected<?php endif;?>><?=$this->transEsc("search_NOT")?></option> </select> </div> <a href="javascript:void(0);" class="adv-group-close hidden"><i class="fa fa-close"></i> <?=$this->transEsc("del_search")?></a> </div> - <? if($group == 0): ?> + <?php if($group == 0): ?> </div> - <? endif; ?> - <? endfor; ?> - <? endif; ?> + <?php endif; ?> + <?php endfor; ?> + <?php endif; ?> </div> - <? /* finc: introduce 'fnd-btn'-class to swap submit and clear buttons for consistency */ ?> + <?php /* finc: introduce 'fnd-btn'-class to swap submit and clear buttons for consistency */ ?> <div class="adv-submit"> <input class="clear-btn btn btn-transparent" type="button" value="<?=$this->transEsc('Clear')?>"> <input class="fnd-btn btn btn-primary" type="submit" value="<?= $this->transEsc('Find')?>"> </div> - <? if (isset($this->extraAdvancedControls)): ?> + <?php if (isset($this->extraAdvancedControls)): ?> <div class="clearfix"> <?=$this->extraAdvancedControls ?> </div> @@ -154,14 +156,14 @@ if (isset($searchDetails) && is_object($searchDetails)) { <input class="clear-btn btn btn-transparent" type="button" value="<?=$this->transEsc('Clear')?>"> <input class="fnd-btn btn btn-primary" type="submit" value="<?= $this->transEsc('Find')?>"> </div> - <? endif; ?> + <?php endif; ?> </div> <div class="<?=$this->layoutClass('sidebar')?>"> - <? if ($hasDefaultsApplied): ?> + <?php if ($hasDefaultsApplied): ?> <input type="hidden" name="dfApplied" value="1" /> - <? endif ?> - <? if (!empty($searchFilters)): ?> + <?php endif ?> + <?php if (!empty($searchFilters)): ?> <h4><?=$this->transEsc("adv_search_filters")?></h4> <div class="facet-group"> <label class="checkbox"> @@ -169,15 +171,15 @@ if (isset($searchDetails) && is_object($searchDetails)) { <?=$this->transEsc("adv_search_select_all")?> </label> </div> - <? foreach ($searchFilters as $field => $data): ?> + <?php foreach ($searchFilters as $field => $data): ?> <div class="facet-group"> <div class="title"><?=$this->transEsc($field)?></div> - <? foreach ($data as $value): ?> + <?php foreach ($data as $value): ?> <label class="facet checkbox"><input class="checkbox-select-item" type="checkbox" checked="checked" name="filter[]" value='<?=$this->escapeHtmlAttr($value['field'])?>:"<?=$this->escapeHtmlAttr($value['value'])?>"' /> <?=$this->escapeHtml($value['displayText'])?></label> - <? endforeach; ?> + <?php endforeach; ?> </div> - <? endforeach; ?> - <? endif; ?> + <?php endforeach; ?> + <?php endif; ?> <h4><?=$this->transEsc("Search Tips")?></h4> <div class="facet-group"> <a class="facet help-link" data-lightbox href="<?=$this->url('help-home')?>?topic=advsearch&_=<?=time() ?>"><?=$this->transEsc("Help with Advanced Search")?></a> diff --git a/themes/finc/templates/search/advanced/limit.phtml b/themes/finc/templates/search/advanced/limit.phtml deleted file mode 100644 index 570f40dc694e1de7d3c2f5b5facb400c2336950a..0000000000000000000000000000000000000000 --- a/themes/finc/templates/search/advanced/limit.phtml +++ /dev/null @@ -1,21 +0,0 @@ -<!-- finc: search - advanced - limit --> -<? /* BS version has error in line 16 -- space missing before 'selected' - throws w3c error - CK */ ?> -<? -// Set up convenience variables: -$limitList = $this->options->getLimitOptions(); - -// If a previous limit was used, make that the default; otherwise, use the "default default" -$lastLimit = $this->searchMemory()->getLastLimit($this->options->getSearchClassId()); -$defaultLimit = empty($lastLimit) ? $this->options->getDefaultLimit() : $lastLimit; -?> -<? if (count($limitList) > 1): ?> - <fieldset class="limits"> - <legend><?=$this->transEsc('Results per page')?></legend> - <select id="limit" name="limit" class="form-control"> - <? foreach ($limitList as $limitVal): ?> - <option value="<?=$this->escapeHtmlAttr($limitVal)?>"<?=($limitVal == $defaultLimit) ? ' selected="selected"' : ''?>><?=$this->escapeHtml($limitVal)?></option> - <? endforeach; ?> - </select> - </fieldset> -<? endif; ?> -<!-- finc: search - advanced - limit - END --> diff --git a/themes/finc/templates/search/advanced/solr.phtml b/themes/finc/templates/search/advanced/solr.phtml index 8aba06e67947bf42a3cc14676a335cb341c24011..a25a6a5a85a218f86d16aa5f2a06ae3451d48b41 100644 --- a/themes/finc/templates/search/advanced/solr.phtml +++ b/themes/finc/templates/search/advanced/solr.phtml @@ -1,30 +1,30 @@ <!-- finc: search - advanced - solr --> -<? if (!empty($this->facetList) || !empty($this->checkboxFacets)): ?> +<?php if (!empty($this->facetList) || !empty($this->checkboxFacets)): ?> <fieldset class="solr-facets"> <legend><?=$this->transEsc('Limit To')?></legend> - <? if (!empty($this->checkboxFacets)): ?> + <?php if (!empty($this->checkboxFacets)): ?> <?=$this->render('search/advanced/checkbox-filters.phtml')?> - <? endif; ?> - <? /* finc: we need the limiter-boxes class to set select height to auto + remove bg image - CK */ ?> + <?php endif; ?> + <?php /* finc: we need the limiter-boxes class to set select height to auto + remove bg image - CK */ ?> <div class="solr-facet-container limiter-boxes"> - <? //narrow the facet list via whitespace from config, #13783, DM + <?php //finc: narrow the facet list via whitespace from config, #13783, DM $this->facetList = $this->sideFacet()->displayAllowedFacetValues($this->facetList); ?> - <? foreach ($this->facetList as $field => $list): ?> + <?php foreach ($this->facetList as $field => $list): ?> <div class="solr-adv-facet"> <label for="limit_<?=$this->escapeHtmlAttr(str_replace(' ', '', $field))?>"><?=$this->transEsc($list['label'])?>:</label> <select class="form-control" id="limit_<?=$this->escapeHtmlAttr(str_replace(' ', '', $field))?>" name="filter[]" multiple="multiple" size="10"> - <? if (is_array($this->hierarchicalFacets) && in_array($field, $this->hierarchicalFacets)): ?> - <? foreach ($list['list'] as $value): ?> - <? $display = str_pad('', 4 * $value['level'] * 6, ' ', STR_PAD_LEFT) . $this->escapeHtml($value['displayText']); ?> + <?php if (is_array($this->hierarchicalFacets) && in_array($field, $this->hierarchicalFacets)): ?> + <?php foreach ($list['list'] as $value): ?> + <?php $display = str_pad('', 4 * $value['level'] * 6, ' ', STR_PAD_LEFT) . $this->escapeHtml($value['displayText']); ?> <option value="<?=$this->escapeHtmlAttr(($value['operator'] == 'OR' ? '~' : '') . $field . ':"' . $value['value'] . '"')?>"<?=(isset($value['selected']) && $value['selected']) ? ' selected="selected"' : ''?>><?=$display?></option> - <? endforeach; ?> - <? else: ?> - <? + <?php endforeach; ?> + <?php else: ?> + <?php // Sort the current facet list alphabetically; we'll use this data // along with the foreach below to display facet options in the // correct order. - $sorted = array(); + $sorted = []; foreach ($list['list'] as $i => $value) { if (!empty($value['displayText'])) { $sorted[$i] = $value['displayText']; @@ -32,30 +32,30 @@ } natcasesort($sorted); ?> - <? foreach ($sorted as $i => $display): ?> - <? $value = $list['list'][$i]; ?> + <?php foreach ($sorted as $i => $display): ?> + <?php $value = $list['list'][$i]; ?> <option value="<?=$this->escapeHtmlAttr(($value['operator'] == 'OR' ? '~' : '') . $field . ':"' . $value['value'] . '"')?>"<?=(isset($value['selected']) && $value['selected']) ? ' selected="selected"' : ''?>><?=$this->escapeHtml($display)?></option> - <? endforeach; ?> - <? endif; ?> + <?php endforeach; ?> + <?php endif; ?> </select> </div> - <? endforeach; ?> + <?php endforeach; ?> </div> </fieldset> -<? endif; ?> +<?php endif; ?> -<? if (isset($this->illustratedLimit)): ?> +<?php if (isset($this->illustratedLimit)): ?> <fieldset class="solr"> <legend><?=$this->transEsc("Illustrated")?>:</legend> - <? foreach ($this->illustratedLimit as $current): ?> + <?php foreach ($this->illustratedLimit as $current): ?> <input id="illustrated_<?=$this->escapeHtmlAttr($current['value'])?>" type="radio" name="illustration" value="<?=$this->escapeHtmlAttr($current['value'])?>"<?=$current['selected'] ? ' checked="checked"' : ''?>/> <label for="illustrated_<?=$this->escapeHtmlAttr($current['value'])?>"><?=$this->transEsc($current['text'])?></label><br/> - <? endforeach; ?> + <?php endforeach; ?> </fieldset> -<? endif; ?> +<?php endif; ?> <?=$this->render('search/advanced/limit.phtml')?> <?=$this->render('search/advanced/ranges.phtml')?> <!-- finc: search - advanced - solr - END --> diff --git a/themes/finc/templates/search/bulk-action-buttons.phtml b/themes/finc/templates/search/bulk-action-buttons.phtml index 367fa90c12779fe53e6a74b32b7a997a807be9aa..000657184878a36dd55ac105a2e0987fd6dbbdcb 100644 --- a/themes/finc/templates/search/bulk-action-buttons.phtml +++ b/themes/finc/templates/search/bulk-action-buttons.phtml @@ -1,28 +1,28 @@ <!-- finc: search - bulk-action-buttons --> -<? if (isset($this->showCheckboxes) && $this->showCheckboxes): ?> +<?php if (isset($this->showCheckboxes) && $this->showCheckboxes): ?> <div class="bulkActionButtons hidden-print"> <div class="bulk-checkbox"> - <input type="checkbox" class="checkbox-select-all" name="selectAll" id="<?=$this->idPrefix?>addFormCheckboxSelectAll"<?if($this->formAttr):?> form="<?=$this->escapeHtmlAttr($this->formAttr) ?>"<? endif; ?>/> + <input type="checkbox" class="checkbox-select-all" name="selectAll" id="<?=$this->idPrefix?>addFormCheckboxSelectAll"<?php if($this->formAttr):?> form="<?=$this->escapeHtmlAttr($this->formAttr) ?>"<?php endif; ?>/> <label for="<?=$this->idPrefix?>addFormCheckboxSelectAll"> <?=$this->transEsc('select_page')?> | <?=$this->transEsc('with_selected')?>: </label> </div> <div class="btn-group"> - <? if (isset($this->showBulkOptions) && $this->showBulkOptions): ?> - <input id="ribbon-email" class="btn btn-transparent" type="submit" name="email" title="<?=$this->transEsc('bookbag_email_selected')?>" value="<?=$this->transEsc('Email')?>"<?if($this->formAttr):?> form="<?=$this->escapeHtmlAttr($this->formAttr) ?>"<? endif; ?>/> - <? $exportOptions = $this->export()->getBulkOptions(); if (count($exportOptions) > 0): ?> - <input id="ribbon-export" class="btn btn-transparent" type="submit" name="export" title="<?=$this->transEsc('bookbag_export_selected')?>" value="<?=$this->transEsc('Export')?>"<?if($this->formAttr):?> form="<?=$this->escapeHtmlAttr($this->formAttr) ?>"<? endif; ?>/> - <? endif; ?> - <input id="ribbon-print" class="btn btn-transparent" type="submit" name="print" title="<?=$this->transEsc('bookbag_print_selected')?>" value="<?=$this->transEsc('Print')?>"<?if($this->formAttr):?> form="<?=$this->escapeHtmlAttr($this->formAttr) ?>"<? endif; ?>/> - <? if ($this->userlist()->getMode() !== 'disabled'): ?> - <input id="ribbon-save" class="btn btn-transparent" type="submit" name="saveCart" title="<?=$this->transEsc('bookbag_save_selected')?>" value="<?=$this->transEsc('Save')?>"<?if($this->formAttr):?> form="<?=$this->escapeHtmlAttr($this->formAttr) ?>"<? endif; ?>/> - <? endif; ?> - <? endif; ?> - <? if (isset($this->showCartControls) && $this->showCartControls): ?> - <input id="<?=$this->idPrefix?>updateCart" type="submit" class="btn btn-transparent" name="add" value="<?=$this->transEsc('Add to Book Bag')?>"<?if($this->formAttr):?> form="<?=$this->escapeHtmlAttr($this->formAttr) ?>"<? endif; ?>/> - <? endif; ?> + <?php if (isset($this->showBulkOptions) && $this->showBulkOptions): ?> + <input id="ribbon-email" class="btn btn-transparent" type="submit" name="email" title="<?=$this->transEsc('bookbag_email_selected')?>" value="<?=$this->transEsc('Email')?>"<?php if($this->formAttr):?> form="<?=$this->escapeHtmlAttr($this->formAttr) ?>"<?php endif; ?>/> + <?php $exportOptions = $this->export()->getBulkOptions(); if (count($exportOptions) > 0): ?> + <input id="ribbon-export" class="btn btn-transparent" type="submit" name="export" title="<?=$this->transEsc('bookbag_export_selected')?>" value="<?=$this->transEsc('Export')?>"<?php if($this->formAttr):?> form="<?=$this->escapeHtmlAttr($this->formAttr) ?>"<?php endif; ?>/> + <?php endif; ?> + <input id="ribbon-print" class="btn btn-transparent" type="submit" name="print" title="<?=$this->transEsc('bookbag_print_selected')?>" value="<?=$this->transEsc('Print')?>"<?php if($this->formAttr):?> form="<?=$this->escapeHtmlAttr($this->formAttr) ?>"<?php endif; ?>/> + <?php if ($this->userlist()->getMode() !== 'disabled'): ?> + <input id="ribbon-save" class="btn btn-transparent" type="submit" name="saveCart" title="<?=$this->transEsc('bookbag_save_selected')?>" value="<?=$this->transEsc('Save')?>"<?php if($this->formAttr):?> form="<?=$this->escapeHtmlAttr($this->formAttr) ?>"<?php endif; ?>/> + <?php endif; ?> + <?php endif; ?> + <?php if (isset($this->showCartControls) && $this->showCartControls): ?> + <input id="<?=$this->idPrefix?>updateCart" type="submit" class="btn btn-transparent" name="add" value="<?=$this->transEsc('Add to Book Bag')?>"<?php if($this->formAttr):?> form="<?=$this->escapeHtmlAttr($this->formAttr) ?>"<?php endif; ?>/> + <?php endif; ?> </div> </div> -<? endif; ?> -<!-- finc: search - bulk-action-buttons - END --> \ No newline at end of file +<?php endif; ?> +<!-- finc: search - bulk-action-buttons - END --> diff --git a/themes/finc/templates/search/controls/limit.phtml b/themes/finc/templates/search/controls/limit.phtml index 03befccf3df28b2ab0fdd1eb9633517988b2c1c6..9284b184791a9838154e3c8a3e277b6c4af9a76e 100644 --- a/themes/finc/templates/search/controls/limit.phtml +++ b/themes/finc/templates/search/controls/limit.phtml @@ -1,16 +1,16 @@ <!-- finc: search - controls - limit --> -<? $limitList = $this->params->getLimitList(); ?> -<? if (count($limitList) > 1): ?> - <? /* finc: DO NOT use 'form-inline' as it messes up the select box */ ?> +<?php $limitList = $this->params->getLimitList(); ?> +<?php if (count($limitList) > 1): ?> + <?php /* finc: DO NOT use class 'form-inline' as it messes up the select box */ ?> <form class="limit" action="<?=$this->currentPath() . $this->results->getUrlQuery()->setLimit(null)?>" method="post"> <label for="limit"><?=$this->transEsc('Results per page')?></label> - <? /* finc: DO NOT use 'form-control' as it messes up the select box */ ?> + <?php /* finc: DO NOT use class 'form-control' as it messes up the select box */ ?> <select id="limit" name="limit" class="jumpMenu"> - <? foreach ($limitList as $limitVal => $limitData): ?> + <?php foreach ($limitList as $limitVal => $limitData): ?> <option value="<?=$this->escapeHtmlAttr($limitVal)?>" <?=$limitData['selected']? ' selected="selected" ':'' ?>><?=$this->escapeHtml($limitData['desc'])?></option> - <? endforeach; ?> + <?php endforeach; ?> </select> <noscript><input type="submit" value="<?=$this->transEsc("Set")?>" /></noscript> </form> -<? endif; ?> +<?php endif; ?> <!-- finc: search - controls - limit - END --> diff --git a/themes/finc/templates/search/controls/sort.phtml b/themes/finc/templates/search/controls/sort.phtml index c007e3e5a7c74012cae8f5d02aa0fcb87a01eb37..c8a8186475864d0fe27206dd387136eb5a82ea4f 100644 --- a/themes/finc/templates/search/controls/sort.phtml +++ b/themes/finc/templates/search/controls/sort.phtml @@ -1,16 +1,16 @@ <!-- finc: search - controls - sort --> -<? $list = $this->params->getSortList(); if (!empty($list)): ?> - <? /* finc: DO NOT use 'form-inline' as it messes up the select box */ ?> +<?php $list = $this->params->getSortList(); if (!empty($list)): ?> + <?php /* finc: we use class 'text-right' */ ?> <form class="search-sort text-right" action="<?=$this->currentPath()?>" method="get" name="sort"> - <?=$this->results->getUrlQuery()->asHiddenFields(array('sort' => '/.*/'));?> + <?=$this->results->getUrlQuery()->asHiddenFields(['sort' => '/.*/']);?> <label for="sort_options_1"><?=$this->transEsc('Sort')?></label> - <? /* finc: DO NOT use 'form-control' as it messes up the select box */ ?> + <?php /* finc: DO NOT use class 'form-control' as it messes up the select box */ ?> <select id="sort_options_1" name="sort" class="jumpMenu"> - <? foreach ($list as $sortType => $sortData): ?> + <?php foreach ($list as $sortType => $sortData): ?> <option value="<?=$this->escapeHtmlAttr($sortType)?>" <?=$sortData['selected']?' selected="selected"':''?>><?=$this->transEsc($sortData['desc'])?></option> - <? endforeach; ?> + <?php endforeach; ?> </select> <noscript><input type="submit" class="btn btn-primary" value="<?=$this->transEsc("Set")?>" /></noscript> </form> -<? endif; ?> +<?php endif; ?> <!-- finc: search - controls - sort - END --> diff --git a/themes/finc/templates/search/home.phtml b/themes/finc/templates/search/home.phtml index 7c0e5f69a12dce82a523763bbb3e49e084023954..723835dde5337b59e190509d6de0b2367e213ea3 100644 --- a/themes/finc/templates/search/home.phtml +++ b/themes/finc/templates/search/home.phtml @@ -1,5 +1,5 @@ <!-- finc: search - home --> -<? +<?php // Set page title. $this->headTitle($this->translate('Search Home')); @@ -11,17 +11,12 @@ if (!isset($this->searchClassId)) { $this->searchClassId = 'Solr'; } -// Load search actions and settings (if any): -$options = $this->searchOptions($this->searchClassId); -$basicSearch = $options->getSearchAction(); -$advSearch = $options->getAdvancedSearchAction(); - $this->layout()->breadcrumbs = false; ?> <div class="searchHomeContent"> - <? /* finc-specific: #7187@89bb6e70; VF moved the original BS code to a separate template: helpers - ils-offline.phtml - CK */ ?> - <? + <?php /* finc-specific: #7187@89bb6e70; VF moved the original BS code to a separate template: helpers - ils-offline.phtml - CK */ ?> + <?php $ilsStatusScript = <<<JS $(document).ready(function() { $.ajax({ @@ -36,30 +31,32 @@ $this->layout()->breadcrumbs = false; }); JS; ?> - <? /* finc-specific: #7187 - END */ ?> + <?php /* finc-specific: #7187 - END */ ?> <?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, $ilsStatusScript, 'SET');?> - <? /* finc: Activate search box here if you want the old look -- otherwise we keep the consisten look with searchbox in header */ ?> - <? /* =$this->context($this)->renderInContext("search/searchbox.phtml", ['ignoreHiddenFilterMemory' => true])?> - <?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, '$("#searchForm_lookfor").focus();', 'SET'); */ ?> + <?php /* finc: Activate search box here if you want the old look -- otherwise we keep the consistent look with searchbox in header */ ?> + <?php /* + <?=$this->context($this)->renderInContext("search/searchbox.phtml", ['ignoreHiddenFilterMemory' => true])?> + <?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, '$("#searchForm_lookfor").focus();', 'SET'); ?> + */ ?> </div> -<? if (isset($facetList) && is_array($facetList)): ?> +<?php if (!empty($facetList)): ?> <div class="search-home-facets"> - <? foreach ($facetList as $field => $details): ?> - <? if (isset($this->hierarchicalFacets) && in_array($field, $this->hierarchicalFacets)): ?> - <? $this->headScript()->appendFile('vendor/jsTree/jstree.min.js'); ?> - <? $this->headScript()->appendFile('facets.js'); ?> - <? $sort = isset($this->hierarchicalFacetSortOptions[$field]) ? $this->hierarchicalFacetSortOptions[$field] : ''; ?> - <? + <?php foreach ($facetList as $field => $details): ?> + <?php if ($isHierarchy = in_array($field, $this->hierarchicalFacets ?? [])): + $this->headScript()->appendFile('vendor/jsTree/jstree.min.js'); + $this->headScript()->appendFile('facets.js'); + $sort = $this->hierarchicalFacetSortOptions[$field] ?? ''; $script = <<<JS $(document).ready(function() { + $('#facet_{$this->escapeHtml($field)}_container').removeClass('hide'); initFacetTree($('#facet_{$this->escapeHtml($field)}'), false); }); JS; + echo $this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, $script, 'SET'); ?> - <?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, $script, 'SET');?> - <div class="home-facet <?=$this->escapeHtmlAttr($field)?>"> + <div id="facet_<?=$this->escapeHtml($field)?>_container" class="home-facet <?=$this->escapeHtmlAttr($field)?> hide"> <h2><?=$this->transEsc('home_browse') . ' ' . $this->transEsc($details['label'])?></h2> <div id="facet_<?=$this->escapeHtml($field)?>" class="jstree-facet" data-facet="<?=$this->escapeHtml($field)?>" @@ -71,56 +68,52 @@ JS; </div> </div> <noscript> - <? endif; ?> - <? $sortedList = $this->sortFacetList($this->results, $field, $details['list'], $basicSearch); ?> + <?php if (!$noJsSupport): ?> + <h2><?=$this->transEsc('home_browse') . ' ' . $this->transEsc($details['label'])?></h2> + <?=$this->transEsc('Please enable JavaScript.')?> + <?php endif; ?> + <?php endif; ?> + <?php if (!$isHierarchy || $noJsSupport): // do we need regular display? ?> + <?php $sortedList = $this->sortFacetList($this->results, $field, $details['list'], $basicSearch); ?> <div class="home-facet <?=$this->escapeHtmlAttr($field)?>"> <h2><?=$this->transEsc('home_browse') . ' ' . $this->transEsc($details['label'])?></h2> <div class="home-facet-container"> <ul class="home-facet-list"> - <? /* Special case: two columns for LC call numbers... */ ?> - <? if ($field == "callnumber-first"): ?> - <? $i = 0; - foreach ($sortedList + <?php + // Special case: two columns for LC call numbers... + $maxListLength = $field == 'callnumber-first' + ? $columnSize * 2 : $columnSize; - as $url => $value): ?> - <? if (!empty($value)): ?> - <li><a href="<?=$url?>"><?=$this->escapeHtml($value)?></a></li> - <? else: $i--; ?> - <? endif; ?> - <? if (++$i == 10): ?> - </ul> - <ul class="home-facet-list"> - <? endif; ?> - <? endforeach; ?> - <? /* Special case: collections */ ?> - <? elseif ($field == 'hierarchy_top_title'): ?> - <? $i = 0; - foreach ($sortedList as $url => $value): ?> - <? if (++$i > 10): ?> - <li><a href="<?=$this->url('collections-home')?>"><strong><?=$this->transEsc("More options")?> ...</strong></a></li> - <? break; ?> - <? endif; ?> - <li><a href="<?=$this->url('collections-bytitle')?>?title=<?=urlencode($value)?>"><?=$this->escapeHtml($value)?></a></li> - <? endforeach; ?> - <? else: ?> - <? $i = 0; - foreach ($sortedList as $url => $value): ?> - <? if (++$i > 10): ?> - <li><a href="<?=$this->url($advSearch)?>"><strong><?=$this->transEsc("More options")?> ...</strong></a></li> - <? break; ?> - <? elseif (!empty($value)): ?> - <li><a href="<?=$url?>"><?=$this->escapeHtml($value)?></a></li> - <? else: $i--; ?> - <? endif; ?> - <? endforeach; ?> - <? endif; ?> + // Special case: custom URLs for collections... + $moreUrl = $field == 'hierarchy_top_title' + ? $this->url('collections-home') : $this->url($advSearch); + + // Convenience variable: + $currentListLength = count($sortedList); + ?> + <?php $i = 0; foreach ($sortedList as $url => $value): + // Special case: custom URLs for collections... + if ($field == 'hierarchy_top_title') { + $url = $this->url('collections-bytitle') . '?title=' . urlencode($value); + } + ?> + <li><a href="<?=$url?>"><?=$this->escapeHtml(empty($value) ? '-' : $value)?></a></li> + <?php if (++$i >= $currentListLength) break; // end of list? bail out! ?> + <?php if ($i >= $maxListLength): // list too long? show more link! ?> + <li><a href="<?=$moreUrl?>"><strong><?=$this->transEsc("More options")?>...</strong></a></li> + <?php break; ?> + <?php elseif ($i % $columnSize === 0): // end of column? insert break! ?> + </ul><ul class="home-facet-list"> + <?php endif; ?> + <?php endforeach; ?> </ul> </div> </div> - <? if (isset($this->hierarchicalFacets) && in_array($field, $this->hierarchicalFacets)): ?> + <?php endif; ?> + <?php if ($isHierarchy): // close tag opened in matching if above ?> </noscript> - <? endif; ?> - <? endforeach; ?> + <?php endif; ?> + <?php endforeach; ?> </div> -<? endif; ?> +<?php endif; ?> <!-- finc: search - home - END --> diff --git a/themes/finc/templates/search/pagination.phtml b/themes/finc/templates/search/pagination.phtml index 5df5bfdb8980e89fcdefe7633c73568497e61bb8..74708050efea7cfeea85875e4b59b50511ec30f3 100644 --- a/themes/finc/templates/search/pagination.phtml +++ b/themes/finc/templates/search/pagination.phtml @@ -1,29 +1,29 @@ <!-- finc: search - pagination --> -<? if ($this->pageCount): ?> +<?php if ($this->pageCount): ?> <ul class="pagination"> - <? if (isset($this->previous)): ?> - <? if (!isset($this->options['disableFirst']) || !$this->options['disableFirst']): ?> + <?php if (isset($this->previous)): ?> + <?php if (!isset($this->options['disableFirst']) || !$this->options['disableFirst']): ?> <li class="first"><a href="<?=$this->currentPath() . $this->results->getUrlQuery()->setPage(1)?>">[1]</a></li> - <? endif; ?> + <?php endif; ?> <li class="page-prev"><a href="<?=$this->currentPath() . $this->results->getUrlQuery()->setPage($this->previous)?>">« <span class="hidden-xs"><?=$this->transEsc('Prev')?></span></a></li> - <? endif; ?> + <?php endif; ?> - <? if (count($this->pagesInRange) > 1): ?> - <? foreach ($this->pagesInRange as $page): ?> - <? if ($page != $this->current): ?> + <?php if (count($this->pagesInRange) > 1): ?> + <?php foreach ($this->pagesInRange as $page): ?> + <?php if ($page != $this->current): ?> <li><a href="<?=$this->currentPath() . $this->results->getUrlQuery()->setPage($page)?>"><?=$page?></a></li> - <? else: ?> + <?php else: ?> <li class="active"><span><?=$page?></span></li> - <? endif; ?> - <? endforeach; ?> - <? endif; ?> + <?php endif; ?> + <?php endforeach; ?> + <?php endif; ?> - <? if (isset($this->next)): ?> + <?php if (isset($this->next)): ?> <li class="page-next"><a href="<?=$this->currentPath() . $this->results->getUrlQuery()->setPage($this->next)?>"><span class="hidden-xs"><?=$this->transEsc('Next');?></span> »</a></li> - <? if (!isset($this->options['disableLast']) || !$this->options['disableLast']): ?> + <?php if (!isset($this->options['disableLast']) || !$this->options['disableLast']): ?> <li class="last"><a href="<?=$this->currentPath() . $this->results->getUrlQuery()->setPage($this->pageCount)?>">[<?=$this->pageCount?>]</a></li> - <? endif; ?> - <? endif; ?> + <?php endif; ?> + <?php endif; ?> </ul> -<? endif; ?> +<?php endif; ?> <!-- finc: search - pagination - END --> diff --git a/themes/finc/templates/search/results.phtml b/themes/finc/templates/search/results.phtml index 61584de96cd83af71730636c63dec9da5e205546..75e6ee8afd517f72d759924e0ac4d1b291cfe994 100644 --- a/themes/finc/templates/search/results.phtml +++ b/themes/finc/templates/search/results.phtml @@ -1,5 +1,5 @@ <!-- finc: search - results --> -<? +<?php // Set up page title: $lookfor = $this->results->getUrlQuery()->isQuerySuppressed() ? '' : $this->params->getDisplayQuery(); if (isset($this->overrideTitle)) { @@ -53,55 +53,70 @@ $this->headScript()->appendFile("check_item_statuses.js"); $this->headScript()->appendFile("check_save_statuses.js"); ?> -<? /* finc: we need search-results-col to pull content to full width, also used in print styles! - CK */?> +<?php /* finc: we need search-results-col to pull content to full width, also used in print styles! - CK */?> <div class="<?=$this->layoutClass('mainbody')?> search-results-col"> - <? if (($recordTotal = $this->results->getResultTotal()) > 0): // only display these at very top if we have results ?> - <? foreach ($this->results->getRecommendations('top') as $current): ?> - <?=$this->recommend($current)?> - <? endforeach; ?> - <? endif; ?> + <?php if (($recordTotal = $this->results->getResultTotal()) > 0): // only display these at very top if we have results ?> + <?php foreach ($this->results->getRecommendations('top') as $index => $current): ?> + <?=$this->recommend($current, 'top', $index)?> + <?php endforeach; ?> + <?php endif; ?> <?=$this->flashmessages()?> - <? /* finc: remove 'hidden' below to show search-stats; we also hide the entire bar on xs + sm - CK */ ?> - <nav class="search-header hidden-xs hidden-sm hidden-print"> - <div class="search-stats hidden"> - <? if ($recordTotal > 0): ?> + <?php /* finc: remove 'hidden' below to show search-stats; we also hide the entire bar on xs + sm - CK */ ?> + <nav class="search-header hidden-print"> + <div class="search-stats"> + <?php /* finc: use spans for easier to show/hide choices - CK */ ?> + <?php if ($recordTotal > 0): ?> + <span class="hit-stats hidden-xs hidden-sm"> <?=$this->context()->renderInContext('search/controls/showing.phtml', ['lookfor' => $lookfor, 'recordTotal' => $recordTotal]) ?> - <? else: ?> + </span> + <span class="offcanvas-toogler"> + <button class="search-filter-toggle btn btn-primary visible-xs" href="#search-sidebar" data-toggle="offcanvas" title="<?=$this->transEsc('sidebar_expand') ?>"> + <?=$this->transEsc('Refine Results') ?> + </button> + </span> + <?php else: ?> <h2><?=$this->transEsc('nohit_heading')?></h2> - <? endif; ?> + <?php endif; ?> </div> - <? if ($recordTotal > 0): ?> + <?php if ($recordTotal > 0): ?> + <?php /* finc: use spans for easier to show/hide choices - CK */ ?> <div class="search-controls"> + <span class="limit"> <?=$this->render('search/controls/limit.phtml')?> + </span> + <span class="sort right"> <?=$this->render('search/controls/sort.phtml')?> + </span> + <span class="view"> <?=$this->render('search/controls/view.phtml')?> + </span> </div> - <? endif; ?> + <?php endif; ?> </nav> - <? /* End Listing Options */ ?> + <?php /* End Listing Options */ ?> - <? if ($recordTotal < 1): ?> + <?php if ($recordTotal < 1): ?> <p> - <? if (isset($this->overrideEmptyMessage)): ?> + <?php if (isset($this->overrideEmptyMessage)): ?> <?=$this->overrideEmptyMessage?> - <? else: ?> - <? $this->layout()->srmessage = $this->translate('nohit_lookfor_html', ['%%lookfor%%' => $this->escapeHtml($lookfor)]); ?> + <?php else: ?> + <?php $this->layout()->srmessage = $this->translate('nohit_lookfor_html', ['%%lookfor%%' => $this->escapeHtml($lookfor)]); ?> <?=$this->layout()->srmessage?> - <? endif; ?> + <?php endif; ?> </p> - <? if (isset($this->parseError)): ?> + <?php if (isset($this->parseError)): ?> <p class="alert alert-danger"><?=$this->transEsc('nohit_parse_error')?></p> - <? endif; ?> - <? foreach (($top = $this->results->getRecommendations('top')) as $current): ?> - <?=$this->recommend($current)?> - <? endforeach; ?> - <? foreach ($this->results->getRecommendations('noresults') as $current): ?> - <? if (!in_array($current, $top)): ?> - <?=$this->recommend($current)?> - <? endif; ?> - <? endforeach; ?> - <? else: ?> + <?php endif; ?> + <?php foreach (($top = $this->results->getRecommendations('top')) as $index => $current): ?> + <?=$this->recommend($current, 'top', $index)?> + <?php endforeach; ?> + <?php foreach ($this->results->getRecommendations('noresults') as $index => $current): ?> + <?php if (!in_array($current, $top)): ?> + <?=$this->recommend($current, 'noresults', $index)?> + <?php endif; ?> + <?php endforeach; ?> + <?php else: ?> <form id="search-cart-form" method="post" name="bulkActionForm" action="<?=$this->url('cart-searchresultsbulk')?>" data-lightbox data-lightbox-onsubmit="bulkFormHandler"> <?=$this->context($this)->renderInContext('search/bulk-action-buttons.phtml', ['idPrefix' => ''])?> </form> @@ -116,27 +131,27 @@ $this->headScript()->appendFile("check_save_statuses.js"); <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> - <? if ($this->accountCapabilities()->getSavedSearchSetting() === 'enabled'): ?> + <?php if ($this->accountCapabilities()->getSavedSearchSetting() === 'enabled'): ?> — - <? if (is_numeric($this->results->getSearchId())): ?> - <? if ($this->results->isSavedSearch()): ?> + <?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> - <? else: ?> + <?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> - <? endif; ?> - <? endif; ?> - <? endif; ?> + <?php endif; ?> + <?php endif; ?> + <?php endif; ?> </div> - <? endif; ?> + <?php endif; ?> </div> -<? /* End Main Listing */ ?> +<?php /* End Main Listing */ ?> -<? /* Narrow Search Options */ ?> -<div class="<?=$this->layoutClass('sidebar')?>"> - <? foreach ($this->results->getRecommendations('side') as $current): ?> - <?=$this->recommend($current)?> - <? endforeach; ?> +<?php /* Narrow Search Options */ ?> +<div class="<?=$this->layoutClass('sidebar')?>" id="search-sidebar"> + <?php foreach ($this->results->getRecommendations('side') as $index => $current): ?> + <?=$this->recommend($current, 'side', $index)?> + <?php endforeach; ?> </div> -<? /* End Narrow Search Options */ ?> +<?php /* End Narrow Search Options */ ?> <!-- finc: search - results - END --> diff --git a/themes/finc/templates/search/searchTabs.phtml b/themes/finc/templates/search/searchTabs.phtml index 3dfe07d34e0ce1387cbdc9d8fc907ec4b088dc1d..f5be8f1aaa1fb5a512e0a272b97ebad9c24e0fa7 100644 --- a/themes/finc/templates/search/searchTabs.phtml +++ b/themes/finc/templates/search/searchTabs.phtml @@ -1,16 +1,16 @@ <!-- finc: search - searchTabs --> -<? if (isset($searchTabs) && count($searchTabs) > 0): ?> +<?php if (isset($searchTabs) && count($searchTabs) > 0): ?> <ul class="nav nav-tabs"> - <? foreach ($searchTabs as $tab): ?> - <? if ($this->permission()->allowDisplay($tab['permission'])): ?> + <?php foreach ($searchTabs as $tab): ?> + <?php if ($this->permission()->allowDisplay($tab['permission'])): ?> <li<?=$tab['selected'] ? ' class="active"' : ''?>> <a <?=$tab['selected'] ? '' : 'href="' . $this->escapeHtmlAttr($tab['url']) . '"'?>><?=$this->transEsc($tab['label']);?></a> </li> - <? elseif ($block = $this->permission()->getAlternateContent($tab['permission'])): ?> + <?php elseif ($block = $this->permission()->getAlternateContent($tab['permission'])): ?> <?=$block?> - <? endif; ?> - <? endforeach; ?> + <?php endif; ?> + <?php endforeach; ?> </ul> -<? endif; ?> +<?php endif; ?> <!-- finc: search - searchTabs - END --> diff --git a/themes/finc/templates/search/searchbox.phtml b/themes/finc/templates/search/searchbox.phtml index 050d3d733a74969e960baec9613e1de3097dc0ae..de089ef016d20764bce9ea2c8fd54a0bb7b6a986 100644 --- a/themes/finc/templates/search/searchbox.phtml +++ b/themes/finc/templates/search/searchbox.phtml @@ -1,5 +1,5 @@ <!-- finc: search - searchbox --> -<? +<?php // Set default value if necessary: if (!isset($this->searchClassId)) { $this->searchClassId = 'Solr'; @@ -28,109 +28,106 @@ if (empty($hiddenFilters) && !$ignoreHiddenFilterMemory) { } $hiddenFilterParams = $this->searchTabs()->getCurrentHiddenFilterParams($this->searchClassId, $ignoreHiddenFilterMemory, '?'); ?> -<? $searchTabs = $this->searchTabs()->getTabConfig($this->searchClassId, $this->lookfor, $this->searchIndex, $this->searchType, $hiddenFilters); ?> -<? if ($this->searchType == 'advanced'): ?> - <? /* finc: keep .no-margin-t or advanced search box will be pushed down too far (navbar-form) */ ?> - <div class="navbar-left flip no-margin-t"> - <? $tabs = $this->context($this)->renderInContext('search/searchTabs', ['searchTabs' => $searchTabs['tabs']]); ?> - <? if (!empty($tabs)): ?><?=$tabs?> - <div class="tab-content clearfix no-gutter-all"><? endif; ?> +<?php $tabConfig = $this->searchTabs()->getTabConfig($this->searchClassId, $this->lookfor, $this->searchIndex, $this->searchType, $hiddenFilters); ?> +<?php if ($this->searchType == 'advanced'): ?> + <?php /* finc: keep .no-margin-t or advanced search box will be pushed down too far (navbar-form) */ ?> + <div class="navbar-form navbar-left flip no-margin-t"> + <?php $tabs = $this->context($this)->renderInContext('search/searchTabs', ['searchTabs' => $tabConfig['tabs']]); ?> + <?php if (!empty($tabs)): ?><?=$tabs?> + <div class="tab-content clearfix no-gutter-all"><?php endif; ?> <p class="adv_search_terms"><?=$this->transEsc("Your search terms")?> : "<strong><?=$this->escapeHtml($this->lookfor)?></strong>"</p> - <? /* finc: we use an ul li list, CK */ ?> + <?php /* finc: we use an ul li list, CK */ ?> <ul class="adv_search_links"> <li><a href="<?=$this->url($advSearch)?>?edit=<?=$this->escapeHtmlAttr($this->searchId)?>"><?=$this->transEsc("Edit this Advanced Search")?></a></li> <li><a href="<?=$this->url($advSearch) . $hiddenFilterParams?>"><?=$this->transEsc("Start a new Advanced Search")?></a></li> <li><a href="<?=$this->url($searchHome) . $hiddenFilterParams?>"><?=$this->transEsc("Start a new Basic Search")?></a></li> </ul> - <? if (!empty($tabs)): ?></div><? endif; ?> + <?php if (!empty($tabs)): ?></div><?php endif; ?> </div> -<? else: ?> - <form id="searchForm" class="searchForm navbar-form navbar-left flip" role="search" method="get" action="<?=$this->url($basicSearch)?>" name="searchForm" autocomplete="off"> - <?=$this->context($this)->renderInContext('search/searchTabs', ['searchTabs' => $searchTabs['tabs']]);?> - <? $placeholder = $this->searchbox()->getPlaceholderText(isset($searchTabs['selected']['id']) ? $searchTabs['selected']['id'] : null); ?> - <? /* finc: We use a list here, CK */ ?> +<?php else: ?> + <form id="searchForm" class="searchForm navbar-form navbar-left flip" method="get" action="<?=$this->url($basicSearch)?>" name="searchForm" autocomplete="off"> + <?= $this->context($this)->renderInContext('search/searchTabs', ['searchTabs' => $tabConfig['tabs']]); ?> + <?php $placeholder = $this->searchbox()->getPlaceholderText($tabConfig['selected']['id'] ?? null); ?> + <?php /* finc: keep "required" */ ?> + <input id="searchForm_lookfor" class="searchForm_lookfor form-control search-query<?php if($this->searchbox()->autocompleteEnabled($this->searchClassId)):?> autocomplete searcher:<?=$this->escapeHtmlAttr($this->searchClassId) ?><?=$this->searchbox()->autocompleteAutoSubmit($this->searchClassId) ? ' ac-auto-submit' : '' ?><?php endif ?>" type="text" name="lookfor" value="<?=$this->escapeHtmlAttr($this->lookfor)?>"<?php if ($placeholder): ?> placeholder="<?=$this->transEsc($placeholder) ?>"<?php endif ?> aria-label="<?=$this->transEsc("search_terms")?>" required="required" /> + <?php /* finc: We use a list here, CK */ ?> <ul class="navbar-left list-unstyled"> - <li> - <? /* finc: we use required='required', CK */ ?> - <input id="searchForm_lookfor" - class="searchForm_lookfor form-control search-query<? if ($this->searchbox()->autocompleteEnabled($this->searchClassId)): ?> autocomplete searcher:<?=$this->escapeHtmlAttr($this->searchClassId)?><? endif ?>" - type="text" name="lookfor" value="<?=$this->escapeHtmlAttr($this->lookfor)?>"<? if ($placeholder): ?> placeholder="<?=$this->transEsc($placeholder)?>"<? endif ?> required="required"/> - </li> - <? if ($handlerCount > 1): ?> + <?php if ($handlerCount > 1): ?> <li class="hidden-xs"> - <select id="searchForm_type" class="searchForm_type form-control" name="type" data-native-menu="false"> - <? foreach ($handlers as $handler): ?> + <select id="searchForm_type" class="searchForm_type form-control" name="type" data-native-menu="false" aria-label="<?=$this->transEsc("Search type")?>"> + <?php foreach ($handlers as $handler): ?> <option value="<?=$this->escapeHtmlAttr($handler['value'])?>"<?=$handler['selected'] ? ' selected="selected"' : ''?>><?=$handler['indent'] ? '-- ' : ''?><?=$this->transEsc($handler['label'])?></option> - <? endforeach; ?> + <?php endforeach; ?> </select> </li> - <? elseif ($handlerCount == 1): ?> + <?php elseif ($handlerCount == 1): ?> <input type="hidden" name="type" value="<?=$this->escapeHtmlAttr($handlers[0]['value'])?>"/> - <? endif; ?> + <?php endif; ?> <li> <button type="submit" class="btn btn-primary"><i class="fa fa-search" aria-hidden="true"></i> <span class="find-label"><?=$this->transEsc("Find")?></span></button> </li> - <? if ($advSearch): ?> + <?php if ($advSearch): ?> <li class="hidden-xs"> - <a href="<?=$this->url($advSearch) . ((isset($this->searchId) && $this->searchId) ? '?edit=' . $this->escapeHtmlAttr($this->searchId) : $hiddenFilterParams)?>" class="btn btn-transparent" - role="button" rel="nofollow"><i class="fa fa-cog"></i> <span class="hidden-xs hidden-sm hidden-md"><?=$this->transEsc("Advanced")?></span></a> + <a href="<?=$this->url($advSearch) . ((isset($this->searchId) && $this->searchId) ? '?edit=' . $this->escapeHtmlAttr($this->searchId) : $hiddenFilterParams)?>" class="btn btn-transparent" role="button" rel="nofollow"><i class="fa fa-cog"></i> <span class="hidden-xs hidden-sm hidden-md"><?=$this->transEsc("Advanced")?></span></a> </li> - <? endif; ?> + <?php endif; ?> <li> - <? if ($geoUrl = $this->geocoords()->getSearchUrl($options)) : ?> + <?php if ($geoUrl = $this->geocoords()->getSearchUrl($options)) : ?> <a href="<?=$geoUrl?>" class="btn btn-link"><?=$this->transEsc('Geographic Search')?></a> - <? endif; ?> + <?php endif; ?> </li> </ul> - <? /* finc: We hide this for small and keep the solution using labels, same below - CK */ ?> + <?php /* finc: We hide this for small and keep the solution using labels, same below - CK */ ?> <div class="checkbox hidden-xs"> - <? $shards = $options->getShards(); + <?php $shards = $options->getShards(); if ($options->showShardCheckboxes() && !empty($shards)): ?> - <? + <?php $selectedShards = isset($this->selectedShards) ? $this->selectedShards : $options->getDefaultSelectedShards(); ?> - <? foreach ($shards as $shard => $val): ?> - <? $isSelected = empty($selectedShards) || in_array($shard, $selectedShards); ?> - <input type="checkbox" <?=$isSelected ? 'checked="checked" ' : ''?>name="shard[]" value='<?=$this->escapeHtmlAttr($shard)?>' id='checkbox_<?=$this->escapeHtmlAttr($shard)?>'/> <label for="checkbox_<?=$this->escapeHtmlAttr($shard)?>"><?=$this->transEsc($shard)?></label> - <? endforeach; ?> - <? endif; ?> + <?php foreach ($shards as $shard => $val): ?> + <?php $isSelected = empty($selectedShards) || in_array($shard, $selectedShards); ?> + <label for="checkbox_<?=$this->escapeHtmlAttr($shard)?>"><?=$this->transEsc($shard)?> + <input type="checkbox" <?=$isSelected ? 'checked="checked" ' : ''?>name="shard[]" value='<?=$this->escapeHtmlAttr($shard)?>' id='checkbox_<?=$this->escapeHtmlAttr($shard)?>'/> + </label> + <?php endforeach; ?> + <?php endif; ?> </div> - <? + <?php $filterDetails = $this->searchbox()->getFilterDetails( isset($this->filterList) && is_array($this->filterList) ? $this->filterList : [], isset($this->checkboxFilters) && is_array($this->checkboxFilters) ? $this->checkboxFilters : [] ); ?> - <? if ((isset($hasDefaultsApplied) && $hasDefaultsApplied) || !empty($filterDetails)): ?> - <? $defaultFilterState = $options->getRetainFilterSetting() ? ' checked="checked"' : ''; ?> + <?php if ((isset($hasDefaultsApplied) && $hasDefaultsApplied) || !empty($filterDetails)): ?> + <?php $defaultFilterState = $options->getRetainFilterSetting() ? ' checked="checked"' : ''; ?> <div class="checkbox"> - <input type="checkbox"<?=$defaultFilterState?> class="searchFormKeepFilters" id="keepfilters"> - <label for="keepfilters"> + <label> + <input type="checkbox"<?=$defaultFilterState?> class="searchFormKeepFilters"/> <?=$this->transEsc("basic_search_keep_filters")?> </label> </div> <div class="hidden"> - <? foreach ($filterDetails as $current): ?> + <?php foreach ($filterDetails as $current): ?> <input class="applied-filter" id="<?=$this->escapeHtmlAttr($current['id'])?>" type="checkbox"<?=$defaultFilterState?> name="filter[]" value="<?=$this->escapeHtmlAttr($current['value'])?>"/> <label for="<?=$this->escapeHtmlAttr($current['id'])?>"><?=$this->escapeHtml($current['value'])?></label> - <? endforeach; ?> - <? if (isset($hasDefaultsApplied) && $hasDefaultsApplied): ?> + <?php endforeach; ?> + <?php if (isset($hasDefaultsApplied) && $hasDefaultsApplied): ?> <!-- this is a hidden element that flags whether or not default filters have been applied; it is intentionally unlabeled, as users are not meant to manipulate it directly. --> <input class="applied-filter" id="dfApplied" type="checkbox" name="dfApplied" value="1"<?=$defaultFilterState?> /> - <? endif; ?> + <?php endif; ?> </div> - <? endif; ?> - <? foreach ($hiddenFilters as $key => $filter): ?> - <? foreach ($filter as $value): ?> + <?php endif; ?> + <?php foreach ($hiddenFilters as $key => $filter): ?> + <?php foreach ($filter as $value): ?> <input type="hidden" name="hiddenFilters[]" value="<?=$this->escapeHtmlAttr($key) . ':' . $this->escapeHtmlAttr($value)?>"/> - <? endforeach; ?> - <? endforeach; ?> - <? + <?php endforeach; ?> + <?php endforeach; ?> + <?php /* Show hidden field for active search class when in combined handler mode. */ if ($this->searchbox()->combinedHandlersActive()) { echo '<input type="hidden" name="activeSearchClassId" value="' . $this->escapeHtmlAttr($this->searchClassId) . '" />'; @@ -144,5 +141,5 @@ $hiddenFilterParams = $this->searchTabs()->getCurrentHiddenFilterParams($this->s } ?> </form> -<? endif; ?> +<?php endif; ?> <!-- finc: search - searchbox - END --> diff --git a/themes/finc/theme.config.php b/themes/finc/theme.config.php index 436336913259362f3431223cc98d75745eb6fc2e..02cfd66e1a3e14e1f4300f3e2d7dcfe374d47e11 100644 --- a/themes/finc/theme.config.php +++ b/themes/finc/theme.config.php @@ -4,8 +4,6 @@ return [ 'js' => [ 'openurl.js', 'check_item_statuses.js', - // remove nxt line when aria-hidden issue fixed, obsolete in VF5, see #12684 - 'finc.js', ], 'helpers' => [ 'aliases' => [