diff --git a/fid/config/vufind/fid.ini b/fid/config/vufind/fid.ini index b2afda51e2378e9703a8e8a2395da32229830923..20d0e6e943d10ac25cdf362042c695a7cf9f8d03 100644 --- a/fid/config/vufind/fid.ini +++ b/fid/config/vufind/fid.ini @@ -22,6 +22,7 @@ overview_fields[] = 'UserName' overview_fields[] = 'Firstname' overview_fields[] = 'Lastname' overview_fields[] = 'Permissions' +overview_fields[] = 'Deleted' ; List of all available user permissions permission_options[] = 'basic_access' diff --git a/fid/languages/fid/de.ini b/fid/languages/fid/de.ini index 69dd4b1f2c967135d74704519c20b2ca0900a94b..13aab2df6ac2d0b20e7b0b0db3551cb2223afbf3 100644 --- a/fid/languages/fid/de.ini +++ b/fid/languages/fid/de.ini @@ -197,5 +197,7 @@ order_label_due_date = "Leihfrist" order_list = "Liste aller Bestellungen" edit_order_error = "Bestellung kann nicht bearbeitet werden" order_update_success = "Bestellung aktualisiert" -order_update_error = "Fehler beim Aktualisierne der Bestellung" -order_type = "Typ" \ No newline at end of file +order_update_error = "Fehler beim Aktualisieren der Bestellung" +order_type = "Typ" + +label_deleted = Zur Löschung vorgemerkt \ No newline at end of file diff --git a/fid/languages/fid/en.ini b/fid/languages/fid/en.ini index 6e12cc06afe719d7a3b7e4f6a71c2e0fb2e668b6..5747e2a76413e9a9631ef006c9e980c56f55200d 100644 --- a/fid/languages/fid/en.ini +++ b/fid/languages/fid/en.ini @@ -194,4 +194,6 @@ order_list = "List of all orders" edit_order_error = "Order cannot be processed" order_update_success = "Order updated" order_update_error = "Error on updating order" -order_type = "Type" \ No newline at end of file +order_type = "Type" + +label_deleted = Flagged for deletion diff --git a/local/config/vufind/config.ini b/local/config/vufind/config.ini index a7c4da375e38acf6bfa3d1957aaddb39f36e5164..882f6a16dbb7ad97fef82d9c826a4fcc413dc1bc 100644 --- a/local/config/vufind/config.ini +++ b/local/config/vufind/config.ini @@ -1160,6 +1160,7 @@ era = true ; allow browsing of era subdivisions [Export] RefWorks = false EndNote = "record,bulk" +Citavi = "record,bulk" EndNoteWeb = false MARC = false MARCXML = false diff --git a/local/config/vufind/export.ini b/local/config/vufind/export.ini index dacbc2e5a71636369cd6b571ee774429a56131ba..5c5729f8387cc54ea2cc3d455b5fb9f1335a18b1 100644 --- a/local/config/vufind/export.ini +++ b/local/config/vufind/export.ini @@ -32,7 +32,16 @@ ; cannot be implemented in a user-friendly way when Javascript is disabled. [EndNote] -label = "Citavi/EndNote" +label = "EndNote" +requiredMethods[] = getTitle +headers[] = "Pragma: public" +headers[] = "Expires: Thu, 01 Dec 1994 16:00:00 GMT" +headers[] = "Cache-Control: must-revalidate, post-check=0, pre-check=0, private" +headers[] = "Content-type: application/x-endnote-refer" +headers[] = "Content-Disposition: attachment; filename=\"vufind.enw\";" + +[Citavi] +label = "Citavi" requiredMethods[] = getTitle headers[] = "Pragma: public" headers[] = "Expires: Thu, 01 Dec 1994 16:00:00 GMT" diff --git a/local/config/vufind/iconMapping.ini b/local/config/vufind/iconMapping.ini index 892e76ad27f7e134956d10e88b428d431b7da486..22871da5a772121712c829b8744fe87789a2bb7f 100644 --- a/local/config/vufind/iconMapping.ini +++ b/local/config/vufind/iconMapping.ini @@ -18,6 +18,9 @@ concatenateKeys = false ; Formats[default] = "" ; Formats[unknown] = "" +; prepending special icon css class +baseIconClass = "fa" + ; finc default mapping for facet_avail FacetAvail[marcfincpda] = "fa-home passive" FacetAvail[object] = "fa-home object" diff --git a/local/config/vufind/searches.ini b/local/config/vufind/searches.ini index d55eda57d759b3414ead0fb607a0c3028421fd3f..b46a0108273171f8bd52b31b9042b6ab25bd9bc8 100644 --- a/local/config/vufind/searches.ini +++ b/local/config/vufind/searches.ini @@ -62,6 +62,8 @@ default_noresults_recommend[] = SwitchQuery ;default_noresults_recommend[] = SwitchQuery:::fuzzy ;default_noresults_recommend[] = SpellingSuggestions default_noresults_recommend[] = RemoveFilters +; InterlibraryLoan: +default_noresults_recommend[] = InterlibraryLoan:"https://fernleihe.boss.bsz-bw.de/Search/Results?lookfor=<QUERY>" ; Set this to true in order to highlight keywords from the search query when they ; appear in fields displayed in search results. @@ -405,6 +407,15 @@ CallNumber = callnumber-sort ; suggesting that the user try switching to [field]. [field description] ; is the human-readable description of [field]. Default values are ; 'AllFields' and 'All Fields' respectively. +; InterlibraryLoan:[URL template] +; Shows a link to an interlibrary loan site. The [URL template] is an URL +; with a placeholder <QUERY> (case sensitive) that gets replaced by the +; user's search query. E.g: +; +; http://example.com/interlibraryloan?q=<QUERY>&foo=bar +; +; The search query will be encoded via `rawurlencode` (RFC 3986) before +; inserted into the url template. ; ; You can build your own recommendations modules if you wish. See the developer's ; guide here: diff --git a/local/config/vufind/searchspecs.yaml b/local/config/vufind/searchspecs.yaml index 6c329cc6a2bd5c749a521dcaaead87126c791fee..b2fa3dba00c6324a83925fd2eabb9cc2cd5bcacf 100644 --- a/local/config/vufind/searchspecs.yaml +++ b/local/config/vufind/searchspecs.yaml @@ -369,7 +369,7 @@ JournalTitle: series2: - [onephrase, 50] - [and , ~] - FilterQuery: "format:Journal OR format:Article OR format:ElectronicBookPart" + FilterQuery: "format:Journal OR format:Article OR format:ElectronicBookPart OR format:ElectronicBookComponentPart" # ExactSettings: # DismaxFields: # - title_full_unstemmed^450 diff --git a/local/languages/de.ini b/local/languages/de.ini index fdd1f1f19490274583186f0cf3db61b74e438e15..3c2577c93378759a286e50d4be6ffc9e0d849894 100644 --- a/local/languages/de.ini +++ b/local/languages/de.ini @@ -338,6 +338,7 @@ Interlibrary loan = "Fernleihe" Interlibraryloans = "Fernleihe" Interlibrary Loans = "Fernleihe" Interlibrary loan information = "Hinweise zur Fernleihe" +Interlibrary loan recommendation = "Sie können mit Ihrer Suchanfrage direkt nach Fernleihen suchen. Folgen Sie hierfür bitte folgendem Link:" Invalid Recipient Email Address = "Ungültige E-Mail-Adresse des Empfängers" Invalid Sender Email Address = "Ungültige E-Mail-Adresse zum Versenden" ISBD Citation = "ISBD Zitierstil" diff --git a/local/languages/en.ini b/local/languages/en.ini index 540e6182b18c8ce04ba1f0f18885bf8466869c00..c1fcba84f3b1b50b43c3650e98c5611acba3dcc2 100644 --- a/local/languages/en.ini +++ b/local/languages/en.ini @@ -442,6 +442,7 @@ Interlibrary loan = "Interlibrary Loan" Interlibrary loan information = "Interlibrary Loan Information" Interlibrary loan - Medicine = "Interlibrary Loan - Medicine" Interlibraryloans = "Interlibrary Loans" +Interlibrary loan recommendation = "You can search for interlibrary loans directly with your search query. Please follow the link:" Invalid Recipient Email Address = "Invalid recipient e-mail address" Invalid Sender Email Address = "Invalid sender e-mail address" # Irish = Gaeilge diff --git a/module/fid/config/admin-edit-form.php b/module/fid/config/admin-edit-form.php index ecc3a00d29d39b056587e65ffbede5a52620ae11..04ef501802b3c8559fe3139d3b3a271197de36cb 100644 --- a/module/fid/config/admin-edit-form.php +++ b/module/fid/config/admin-edit-form.php @@ -20,6 +20,8 @@ */ use fid\Hydrator\UserHydrator; use fid\InputFilter\RootAwareBaseInputFilter; +use Zend\Filter\Boolean; +use Zend\Form\Element\Checkbox; use Zend\Form\Element\Collection; use Zend\Form\Element\Hidden; use Zend\Form\Element\Radio; @@ -28,6 +30,7 @@ use Zend\Form\Element\Submit; use Zend\Form\Element\Text; use Zend\Form\Fieldset; use Zend\Form\InputFilterProviderFieldset; +use Zend\Validator\NotEmpty; return [ 'name' => 'user-update-form', @@ -35,7 +38,10 @@ return [ 'validation_group' => [ 'id', 'job_title', - 'permissions' + 'permissions', + 'data' => [ + 'deleted' + ], ], 'elements' => [ 'id' => [ @@ -247,6 +253,37 @@ return [ 'spec' => [ 'name' => 'data', 'type' => InputFilterProviderFieldset::class, + 'elements' => [ + 'deleted' => [ + 'spec' => [ + 'name' => 'deleted', + 'type' => Checkbox::class, + 'options' => [ + 'label' => 'label_deleted', + ], + ], + ], + ], + 'options' => [ + 'input_filter_spec' => [ + 'deleted' => [ + 'name' => 'deleted', + 'filters' => [ + Boolean::class => [ + 'name' => Boolean::class, + ], + ], + 'validators' => [ + NotEmpty::class => [ + 'name' => NotEmpty::class, + 'options' => [ + 'type' => NotEmpty::NULL, + ], + ], + ], + ], + ], + ], ], ], 'submit' => [ diff --git a/module/fid/src/InputFilter/UserCreateFormInputFilter.php b/module/fid/src/InputFilter/UserCreateFormInputFilter.php index 4bdb9e93f8eca71b974a658aab65042c48a2fb0a..8860604e101f2d0612b8053713a527ce3024deda 100644 --- a/module/fid/src/InputFilter/UserCreateFormInputFilter.php +++ b/module/fid/src/InputFilter/UserCreateFormInputFilter.php @@ -49,10 +49,12 @@ class UserCreateFormInputFilter extends RootAwareBaseInputFilter */ public function getValues() { - $permissions = [ + $values = parent::getValues(); + $values['data']['deleted'] = false; + $values['permissions'] = [ 'basic_access' => 'granted', 'limited_access' => 'granted' ]; - return compact('permissions') + parent::getValues(); + return $values; } } diff --git a/module/fid/src/VuFind/Auth/Authenticator.php b/module/fid/src/VuFind/Auth/Authenticator.php index c019c2da59d000a6cf8451f41d1dc2ba79e9e61c..c020615c0a896541112c8c1116d081b8f793d1f5 100644 --- a/module/fid/src/VuFind/Auth/Authenticator.php +++ b/module/fid/src/VuFind/Auth/Authenticator.php @@ -116,17 +116,17 @@ class Authenticator extends AbstractBase } } - if (!$this->client->isAuthorized('basic_access')) { - $this->client->logoff(); - throw new AuthException(self::AUTH_ERROR_ACCOUNT_BLOCKED); - } - /* @var User $user */ $user = $this->client->requestUserDetails(); if ($user->isDeleted()) { $this->client->logoff(); throw new AuthException(self::AUTH_ERROR_ACCOUNT_DELETED); } + + if (!$this->client->isAuthorized('basic_access')) { + $this->client->logoff(); + throw new AuthException(self::AUTH_ERROR_ACCOUNT_BLOCKED); + } if ($ownerId = $logon->getOwnerId()) { /* @var VuFindUser $userRow */ diff --git a/module/finc/config/module.config.php b/module/finc/config/module.config.php index d126c48273506f933fe89a8c7656250c81d336f8..640b46118ec83cc2de17613d7655ac90d24f3e8d 100644 --- a/module/finc/config/module.config.php +++ b/module/finc/config/module.config.php @@ -137,9 +137,11 @@ $config = [ 'recommend' => [ 'factories' => [ 'finc\Recommend\EbscoResults' => 'finc\Recommend\Factory::getEbscoResults', + 'finc\Recommend\InterlibraryLoan' => 'finc\Recommend\Factory::getInterlibraryLoan', ], 'aliases' => [ 'ebscoresults' => 'finc\Recommend\EbscoResults', + 'interlibraryloan' => 'finc\Recommend\InterlibraryLoan', ] ], 'recorddriver' => [ diff --git a/module/finc/src/finc/ILS/Driver/FincLibero.php b/module/finc/src/finc/ILS/Driver/FincLibero.php index d64a33334fd2dd811ef8bf85b0093e7c1af824cf..dc778687d223be7632dc39e64ce1f384266eec47 100644 --- a/module/finc/src/finc/ILS/Driver/FincLibero.php +++ b/module/finc/src/finc/ILS/Driver/FincLibero.php @@ -124,7 +124,7 @@ class FincLibero extends FincILS implements TranslatorAwareInterface { parent::init(); - $this->setMemberFromConfig('boundItemPattern', 'General', 'bound_item_id_pattern'); + $this->setMemberFromConfig('boundItemIdPattern', 'General', 'bound_item_id_pattern'); $this->setMemberFromConfig('boundItemLabelPattern', 'General', 'bound_item_label_pattern'); diff --git a/module/finc/src/finc/Recommend/EbscoResults.php b/module/finc/src/finc/Recommend/EbscoResults.php index fec111d4998a10ba2aa96c18b33650c0d1e523c9..b90396fbe62223a8d833b4b25de0d8984bdc1d9c 100644 --- a/module/finc/src/finc/Recommend/EbscoResults.php +++ b/module/finc/src/finc/Recommend/EbscoResults.php @@ -161,8 +161,12 @@ class EbscoResults implements */ public function process($results) { - // Make the HTTP request: - $results = $this->getHttpClient($this->targetUrl)->send(); + try { + // Make the HTTP request: + $results = $this->getHttpClient($this->targetUrl)->send(); + } catch (\Exception $e) { + return; + } if (!$results->isSuccess()) { $this->results = false; diff --git a/module/finc/src/finc/Recommend/Factory.php b/module/finc/src/finc/Recommend/Factory.php index cfd2e61ca3df05c24b45e5fd69eaabb086a68625..0ac7101fb807c0a16efe8d4ad509444701e86b42 100644 --- a/module/finc/src/finc/Recommend/Factory.php +++ b/module/finc/src/finc/Recommend/Factory.php @@ -55,4 +55,16 @@ class Factory extends \Vufind\Recommend\Factory { return new EbscoResults(); } + + /** + * Creates InterlibraryLoan + * + * @param ServiceManager $sm Service manager + * + * @return InterlibraryLoan + */ + public static function getInterlibraryLoan(ServiceManager $sm) + { + return new InterlibraryLoan($sm); + } } diff --git a/module/finc/src/finc/Recommend/InterlibraryLoan.php b/module/finc/src/finc/Recommend/InterlibraryLoan.php new file mode 100644 index 0000000000000000000000000000000000000000..55e29021407d554400b3495a816e3d3b93e88e4d --- /dev/null +++ b/module/finc/src/finc/Recommend/InterlibraryLoan.php @@ -0,0 +1,97 @@ +<?php +/** + * Recommendation Module Interlibrary Loan + * + * PHP version 7 + * + * Copyright (C) Villanova University 2014. + * Copyright (C) Leipzig University Library 2022. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * @category VuFind + * @package Recommendations + * @author Demian Katz <demian.katz@villanova.edu> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org/wiki/development:plugins:hierarchy_components Wiki + */ +namespace finc\Recommend; + +use VuFind\Recommend\RecommendInterface; + +/** + * Controller for an interlibary loan link to fernleihe.boss.bsz-bw.de + * + * @category VuFind + * @package Recommendations + * @author Demian Katz <demian.katz@villanova.edu> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org/wiki/development:plugins:hierarchy_components Wiki + */ +class InterlibraryLoan implements RecommendInterface +{ + /** + * Template URL with a "<QUERY>" slot to be replaced by the search query. + * + * @var string + */ + protected $templateUrl; + + /** + * Store the configuration of the recommendation module. + * + * @param string $settings Settings from searches.ini. + * + * @return void + */ + public function setConfig($settings) + { + $this->templateUrl = $settings; + } + + /** + * Called at the end of the Search Params objects' initFromRequest() method. + * This method is responsible for setting search parameters needed by the + * recommendation module and for reading any existing search parameters that may + * be needed. + * + * @param \VuFind\Search\Base\Params $params Search parameter object + * @param \Zend\StdLib\Parameters $request Parameter object representing user + * request. + * + * @return void + */ + public function init($params, $request) + { + } + + /** + * Create the interlibrary loan href. + * + * The href is accessible in the corresponding template via: + * `$this->recommend->href` + * + * @param \VuFind\Search\Base\Results $results Search results object + * + * @return void + */ + public function process($results) + { + $this->href = str_replace( + '<QUERY>', + rawurlencode($results->getParams()->getDisplayQuery()), + $this->templateUrl + ); + } +} diff --git a/module/finc/src/finc/RecordDriver/SolrMarcFincTrait.php b/module/finc/src/finc/RecordDriver/SolrMarcFincTrait.php index 5c5d72a314308e03a1965c734e377179387067cc..ec33cb04f364b689ce40396c9ddbd857ff2ade97 100644 --- a/module/finc/src/finc/RecordDriver/SolrMarcFincTrait.php +++ b/module/finc/src/finc/RecordDriver/SolrMarcFincTrait.php @@ -2089,6 +2089,25 @@ trait SolrMarcFincTrait return $this->getFirstFieldValue('245', ['n']); } + /** + * Gets the volume number of an article inside a bigger volumen, only if 936 exists + * + * @return mixed + */ + public function getContainerVolume() + { + $field = $this->getMarcRecord()->getFields('936'); + if ($field) { + foreach ( $field as $each ) { + $subfield = $each->getSubfield('d'); + if ($subfield) { + return $subfield->getData(); + } + } + } + return null; + } + /** * Get Cartographic Mathematical Data * @@ -2640,4 +2659,23 @@ trait SolrMarcFincTrait } return null; } + + /** + * Returns Start and Endpage of an Article inside a bigger release + * + * @return mixed + */ + public function getPages() + { + $field = $this->getMarcRecord()->getFields('936'); + if ($field) { + foreach ( $field as $each ) { + $subfield = $each->getSubfield('h'); + if ($subfield) { + return $subfield->getData(); + } + } + } + return null; + } } diff --git a/module/finc/src/finc/View/Helper/Root/Record.php b/module/finc/src/finc/View/Helper/Root/Record.php index bc2a88b87acb9096ff33386dbda07565574039b7..76d54ff47774e4edb3c8f5c8f82ab59a5658c935 100644 --- a/module/finc/src/finc/View/Helper/Root/Record.php +++ b/module/finc/src/finc/View/Helper/Root/Record.php @@ -106,6 +106,14 @@ class Record extends \VuFind\View\Helper\Root\Record */ protected $concatKeysForIconMapping; + /** + * Base css class for displaying icons + * Like 'fa' needed by font awesome + * + * @var string + */ + protected $baseIconClass; + /** * Constructor * @@ -144,6 +152,8 @@ class Record extends \VuFind\View\Helper\Root\Record ->StyleBasedIcons->concatenateKeys ) && $this->iconConfig ->StyleBasedIcons->concatenateKeys ? true : false; + $this->baseIconClass = $this->iconConfig->StyleBasedIcons + ->baseIconClass ?? 'fa'; } } @@ -161,7 +171,10 @@ class Record extends \VuFind\View\Helper\Root\Record ): string { $iconType = $this->getRecordIconType(); $iconClass = $this->getRecordIconClass($iconType); - return $this->renderTemplate($tpl . '.phtml', ['iconClass' => $iconClass]) + return $this->renderTemplate( + $tpl . '.phtml', + ['iconClass' => $this->baseIconClass . ' ' . $iconClass] + ) . ($addText ? $this->getRecordIconText($iconType, $iconClass) : ''); } @@ -212,8 +225,7 @@ class Record extends \VuFind\View\Helper\Root\Record protected function getRecordIconType() { $recordType = $this->driver->getRecordType(); - switch ($recordType) - { + switch ($recordType) { case 'lido': return "object"; case 'missing': @@ -226,7 +238,9 @@ class Record extends \VuFind\View\Helper\Root\Record $recordTypes = $this->driver->tryMethod("get{$type}") ?? ['default']; $recordTypes = $this->concatKeysForIconMapping ? implode('', $recordTypes) : $recordTypes[0] ?? 'default'; - $recordType .= strtolower(str_replace([' ','-',','], '', $recordTypes)); + $recordType .= strtolower( + str_replace([' ','-',','], '', $recordTypes) + ); } return $recordType; } @@ -525,7 +539,9 @@ class Record extends \VuFind\View\Helper\Root\Record $onlineEditions[] = $add; } } elseif (isset($add['related_records'])) { - foreach ($add['related_records']['first_results'] as $linkedRecord) { + foreach ( + $add['related_records']['first_results'] as $linkedRecord + ) { $link = $recordLinkHelper->getTabUrl($linkedRecord); if (!empty($link)) { //overwrite link in entry and add to result array diff --git a/module/finc/src/finc/View/Helper/Root/RecordDataFormatterFactory.php b/module/finc/src/finc/View/Helper/Root/RecordDataFormatterFactory.php index d31e09f4842199442225196a375a4819f98d1d44..6e1ea01c23cf95069fff2f32ccf7fab1349a2701 100644 --- a/module/finc/src/finc/View/Helper/Root/RecordDataFormatterFactory.php +++ b/module/finc/src/finc/View/Helper/Root/RecordDataFormatterFactory.php @@ -92,12 +92,8 @@ class RecordDataFormatterFactory [$this, 'getMarcCoreSpecs'] ); $helper->setDefaults( - 'rvk', - [$this, 'getRvkSpecs'] - ); - $helper->setDefaults( - 'topics', - [$this, 'getTopicsSpecs'] + 'topics-tab', + [$this, 'getTopicsTabSpecs'] ); return $helper; @@ -921,35 +917,24 @@ class RecordDataFormatterFactory ); return $spec->getArray(); } - + /** - * Get marc specifications for displaying rvk. + * Get default specifications for displaying data in the topics tab. * * @return array */ - public function getRvkSpecs() + public function getTopicsTabSpecs() { $spec = new RecordDataFormatter\SpecBuilder(); $spec->setTemplateLine( - 'Topics', + 'RVK', 'getRvkWithMetadata', - 'data-rvk.phtml' + 'data-rvkNotation.phtml' ); - return $spec->getArray(); - } - - /** - * Get marc specifications for displaying topics. - * - * @return array - */ - public function getTopicsSpecs() - { - $spec = new RecordDataFormatter\SpecBuilder(); $spec->setTemplateLine( - 'Topics', + 'Subjects', 'getTopics', - 'data-topics.phtml' + 'data-allSubjectHeadingsWithExtended.phtml' ); return $spec->getArray(); } diff --git a/module/finc/tests/fixtures/configs/yaml/searchspecs/result/local/alpha/searchspecs.yaml b/module/finc/tests/fixtures/configs/yaml/searchspecs/result/local/alpha/searchspecs.yaml index 3b8b3c80c928dce382527e349077bfa44ba71a0b..a6a6eda38d0e29ff27e1eeb44184546e2c3af80e 100644 --- a/module/finc/tests/fixtures/configs/yaml/searchspecs/result/local/alpha/searchspecs.yaml +++ b/module/finc/tests/fixtures/configs/yaml/searchspecs/result/local/alpha/searchspecs.yaml @@ -176,7 +176,7 @@ JournalTitle: series2: - [onephrase, 50] - [and, null] - FilterQuery: 'format:Journal OR format:Article OR format:ElectronicBookPart' + FilterQuery: 'format:Journal OR format:Article OR format:ElectronicBookPart OR format:ElectronicBookComponentPart' Title: DismaxParams: - diff --git a/module/finc/tests/fixtures/configs/yaml/searchspecs/result/local/searchspecs.yaml b/module/finc/tests/fixtures/configs/yaml/searchspecs/result/local/searchspecs.yaml index 3b8b3c80c928dce382527e349077bfa44ba71a0b..a6a6eda38d0e29ff27e1eeb44184546e2c3af80e 100644 --- a/module/finc/tests/fixtures/configs/yaml/searchspecs/result/local/searchspecs.yaml +++ b/module/finc/tests/fixtures/configs/yaml/searchspecs/result/local/searchspecs.yaml @@ -176,7 +176,7 @@ JournalTitle: series2: - [onephrase, 50] - [and, null] - FilterQuery: 'format:Journal OR format:Article OR format:ElectronicBookPart' + FilterQuery: 'format:Journal OR format:Article OR format:ElectronicBookPart OR format:ElectronicBookComponentPart' Title: DismaxParams: - diff --git a/module/finc/tests/unit-tests/src/fincTest/Config/SearchSpecsReaderTest.php b/module/finc/tests/unit-tests/src/fincTest/Config/SearchSpecsReaderTest.php index e172829e6cab132cffe3edd5c76ee73deb7b78d6..395f632496516457e6bcbf0dc99f689c7d1ab91c 100644 --- a/module/finc/tests/unit-tests/src/fincTest/Config/SearchSpecsReaderTest.php +++ b/module/finc/tests/unit-tests/src/fincTest/Config/SearchSpecsReaderTest.php @@ -120,6 +120,9 @@ class SearchSpecsReaderTest extends \VuFindTest\Config\SearchSpecsReaderTest $resultArray = $this->callMethod(self::$reader, 'getFromPaths', [$vufindYaml, $currentEnvYaml]); $expectedArray = $this->callMethod(self::$reader, 'getFromPaths', [$expectedYaml]); + + ksort($resultArray); + ksort($expectedArray); if ($printResult) { file_put_contents("$this->basePathToLogging/input_reverse.yaml", Yaml::dump($resultArray, 4, 2)); diff --git a/themes/fid/templates/Auth/AbstractBase/loginfields.phtml b/themes/fid/templates/Auth/AbstractBase/loginfields.phtml index 9001e9f97ed1bd1eb337474a8bf87b40e708ddc7..65fce64c58882a4809702ad8be24ea782e6ddf9c 100644 --- a/themes/fid/templates/Auth/AbstractBase/loginfields.phtml +++ b/themes/fid/templates/Auth/AbstractBase/loginfields.phtml @@ -1,8 +1,11 @@ +<!-- fid: Auth - AbstractBase - loginfields --> <div class="form-group"> <label class="control-label" for="login_<?=$this->escapeHtmlAttr($topClass)?>_username"><?=$this->transEsc('Username')?>:</label> - <input type="email" name="username" id="login_<?=$this->escapeHtmlAttr($topClass)?>_username" value="<?=$this->escapeHtmlAttr($this->request->get('username'))?>" class="form-control"/> + <?php /* FID uses e-mail as username! */ ?> + <input type="email" name="username" id="login_<?=$this->escapeHtmlAttr($topClass)?>_username" value="<?=$this->escapeHtmlAttr($this->request->get('username'))?>" autocomplete="email" class="form-control" autofocus /> </div> <div class="form-group"> <label class="control-label" for="login_<?=$this->escapeHtmlAttr($topClass)?>_password"><?=$this->transEsc('Password')?>:</label> - <input type="password" name="password" id="login_<?=$this->escapeHtmlAttr($topClass)?>_password" class="form-control"/> -</div> \ No newline at end of file + <input type="password" name="password" id="login_<?=$this->escapeHtmlAttr($topClass)?>_password" autocomplete="current-password" class="form-control"/> +</div> +<!-- fid: Auth - AbstractBase - loginfields - END --> diff --git a/themes/fid/templates/fid/admin/edit.phtml b/themes/fid/templates/fid/admin/edit.phtml index 1acfdfedafe072d339aa6aebd29d8485f0df8d54..20131662f20f1199a601d8c5eaa7ded941c5dfb9 100644 --- a/themes/fid/templates/fid/admin/edit.phtml +++ b/themes/fid/templates/fid/admin/edit.phtml @@ -169,6 +169,20 @@ foreach ($permissions as $permission) { <?php /* addresses */ ?> <?= $this->render('fid/user/address-collection.phtml') ?> +<? /* deletion */ ?> +<?php + /** @var Checkbox $elemDeleted */ + $elemDeleted = $form->get('data')->get('deleted'); + $elemDeleted->setAttribute('id', 'deleted'); +?> +<div class="form-group eula"> + <div> + <?= $this->formElement($elemDeleted) ?> + <?= $this->formLabel($elemDeleted) ?> + </div> + <?= $this->formElementErrors($elemDeleted) ?> +</div> + <?php /* submit button */ ?> <?php /** @var Submit $elemSubmit */ diff --git a/themes/fid/templates/fid/admin/list-entry.phtml b/themes/fid/templates/fid/admin/list-entry.phtml index db2b561124275da0ce650827fa2a4fd97cfa5417..e2c216f1e87fda9898c50895fc4853acd79e6c9b 100644 --- a/themes/fid/templates/fid/admin/list-entry.phtml +++ b/themes/fid/templates/fid/admin/list-entry.phtml @@ -12,6 +12,8 @@ foreach ($this->fields as $field): ?> <?php if ($field === 'Permissions'): ?> <td><?=implode(', ', $permissions)?></td> +<?php elseif ($field === 'Deleted'): ?> + <td><?= $user->isDeleted() ? $this->translate("fid::label_deleted") : '' ?></td> <?php else: ?> <td><?=$this->escapeHtml($user->$field)?></td> <?php endif; ?> diff --git a/themes/fid/templates/fid/order/order-edit.phtml b/themes/fid/templates/fid/order/order-edit.phtml index cc513e5c6b1f1b605e11b35005a0360bbcb29e87..5aa4d544c983e8d3feed49cac8b8b293d8cdf262 100644 --- a/themes/fid/templates/fid/order/order-edit.phtml +++ b/themes/fid/templates/fid/order/order-edit.phtml @@ -61,7 +61,6 @@ $this->headTitle($title = $this->translate("fid::acquisition_" . str_replace('-' class="btn btn-primary"> <?= $this->transEsc('Cancel') ?> </a> - </div> </div> <?php endif; ?> <!-- fid: fid - order - order-edit - END --> diff --git a/themes/finc/scss/compiled.scss b/themes/finc/scss/compiled.scss index 9f5f878014f6a4dab3e7c5402ed3ea87ed836f0c..62190274dddde6c29a85055cc297028785df9bc5 100644 --- a/themes/finc/scss/compiled.scss +++ b/themes/finc/scss/compiled.scss @@ -819,7 +819,7 @@ a.toggle { } } -span.notation ul { +.notation ul { padding-inline-start: 1.5em; @media (max-width: $screen-md-min) { @@ -830,7 +830,7 @@ span.notation ul { list-style-type: none; } - li::before { + li:nth-of-type(1)::before { content: $fa-var-level-down; font-family: 'FontAwesome', sans-serif; margin-right: .5em; diff --git a/themes/finc/templates/Helpers/nestedList.phtml b/themes/finc/templates/Helpers/nestedList.phtml index acba95440d9cdd20b432fa9fb19e588d5e7a3f23..d52cc8d0309805201580b6406452e5d9231d391e 100644 --- a/themes/finc/templates/Helpers/nestedList.phtml +++ b/themes/finc/templates/Helpers/nestedList.phtml @@ -1,8 +1,10 @@ -<?php //Base case: an empty array produces no list ?> -<?php if (!empty($array)): ?> - <ul> - <li><?=array_shift($array)?></li> +<ul role="tree"> + <li role="listitem"><?=array_shift($array)?></li> + <?php if (!empty($array)): ?> + <li role="listitem"> <?php //Recursive Step: make a list with child lists ?> <?= $this->render('Helpers/nestedList.phtml', ['array' => $array])?> - </ul> -<?php endif; ?> \ No newline at end of file + </li> + <?php endif; ?> +</ul> + diff --git a/themes/finc/templates/Recommend/InterlibraryLoan.phtml b/themes/finc/templates/Recommend/InterlibraryLoan.phtml new file mode 100644 index 0000000000000000000000000000000000000000..d5104249705e16d2a8da5c9a1bb51976acf3a52a --- /dev/null +++ b/themes/finc/templates/Recommend/InterlibraryLoan.phtml @@ -0,0 +1,10 @@ +<?php + $href = $this->recommend->href; + $text = $this->transEsc('Interlibrary loan recommendation'); +?> +<div class="alert alert-info"> + <p> + <?= $text ?> + </p> + <?= $this->externalLink($href, $href, [], true) ?> +</div> diff --git a/themes/finc/templates/RecordDriver/AbstractBase/export-citavi.phtml b/themes/finc/templates/RecordDriver/AbstractBase/export-citavi.phtml new file mode 100644 index 0000000000000000000000000000000000000000..d70fbc1bbd2c0cf823977f3fdd22723b4946e8a8 --- /dev/null +++ b/themes/finc/templates/RecordDriver/AbstractBase/export-citavi.phtml @@ -0,0 +1,232 @@ +<?php +// per https://www1.citavi.com/sub/manual5/en/importing_an_endnote_tagged_file.html +// also for germans: https://www.ub.rwth-aachen.de/global/show_document.asp?id=aaaaaaaaaaptikv&download=1 +$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) { + switch ($format) { + case 'Article': + case 'ElectronicArticle': + case 'SerialComponentPart': + case 'ElectronicSerialComponentPart': + $format = "Journal article"; + break; + case 'BookComponentPart': + $format = "Book Section"; + break; + case 'ElectronicBookComponentPart': + case 'ElectronicBookPart': + $format = "Contribution in an Edited Book"; + break; + case 'ElectronicBook': + case 'eBook': + $format = "Electronic Book"; + break; + default: + //$format = $format; // unnecessary default + break; + } + $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"; +} +/*$author = $this->driver->tryMethod('getPrimaryAuthor'); +if (!empty($author)) { + echo "%A $author\n"; +} +$authors = $this->driver->tryMethod('getAdditionalAuthors'); +if (!empty($authors)) { + $arr = []; + foreach ($authors as $author) { + $arr[] = $author['name']; + } + $author = implode(' and ', $arr); + echo "%A $author\n"; +}*/ + +$authors = []; +$primaryAuthor = $this->driver->tryMethod('getPrimaryAuthor'); +if (!empty($primaryAuthor)) { + $authors[] = $primaryAuthor; +} +$additionalAuthors = $this->driver->tryMethod('getAdditionalAuthors'); +if (!empty($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; + } + } + } + $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"; + } +} + +$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) + || (count($pubNames) > 0) + || (count($pubPlaces) > 0) + )) { + $total = 1; + } + 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"; + } */ /* TODO: decide if this is really superfluous */ + } + 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"; +} + +if (empty($data)) { + $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"; + } +} + +$series = $this->driver->tryMethod('getSeries'); +if (is_array($series)) { + 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"; + } +} + +$issns = $this->driver->tryMethod('getISSNs'); +if (is_array($issns)) { + foreach ($issns as $issn) { + echo "%@ $issn\n"; + } +} + +$library = $this->config()->get('config')->Site->title; +if (!empty($library)) { + echo "%~ {$library}\n"; +} + +$title = rtrim($this->driver->getTitle(), " /"); +echo "%T $title\n"; + +$volume = $this->driver->tryMethod('getVolume'); +if (!empty($volume)) { + $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"; + } + /* getContainerStartPage is not implemented in default and will give '' */ + /*$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)) { + echo "%P {$pages}\n"; + } + } +} + +foreach ($this->record($this->driver)->getUrlList() as $doi) { + echo "%U $doi\n"; +} + +$edition = $this->driver->tryMethod('getEdition'); +if (!empty($edition)) { + echo "%7 $edition\n"; +} + +$summary = $this->driver->tryMethod('getSummary'); +if (!empty($summary)) { + echo "%X {$summary[0]}\n"; +} + +$serverurl = $this->serverUrl(); +$url = $serverurl . $this->url('record', ['id' => $this->driver->getUniqueId()]); +if (!empty($url)) { + echo "%Z {$url}\n"; +} + +$serverurl = $this->serverUrl(); +$url = $serverurl . $this->url('record', ['id' => $this->driver->getUniqueId()]); +if (!empty($url)) { + echo "%U {$url}\n"; +} +// Record separator: +echo "\n"; +?> \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/data-containerTitle.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-containerTitle.phtml new file mode 100644 index 0000000000000000000000000000000000000000..be4186a23d8142894f5e801573e3313113baf126 --- /dev/null +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-containerTitle.phtml @@ -0,0 +1,12 @@ +<!-- finc: RecordDriver - DefaultRecord - data-containerTitle --> +<?php + $containerSource = $this->driver->getSourceIdentifier(); + $containerID = $this->driver->getContainerRecordID(); + $ref = $this->driver->getContainerReference(); + $link = $containerID + ? $this->recordLink()->getUrl("$containerSource|$containerID", $data, 'JournalTitle') + : $this->record($this->driver)->getLink('journaltitle', $data); +?> +<a href="<?=$link?>"><?=$this->escapeHtml($data)?></a> +<?=empty($ref) ? '' : $this->escapeHtml($ref)?> +<!-- finc: RecordDriver - DefaultRecord - data-containerTitle - END --> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/data-rvk.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-rvk.phtml deleted file mode 100644 index b113b53c7c9366f25cccbebd4de45742462601e9..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/DefaultRecord/data-rvk.phtml +++ /dev/null @@ -1,26 +0,0 @@ -<!-- finc: RecordDriver - DefaultRecord - data-rvk --> -<tr> - <th><?=$this->transEsc('RVK')?>:</th> - <td data-title="<?= $this->transEsc('RVK') ?>:"> - <?php $i = 0; foreach ($data as $item): ?> - <?=($i > 0 ? "<br />" : "") //no linebreak after last item?> - <?=$item['rvk']?> - <?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>"; - } - } - $tooltip_content .= "</ul>"; - ?> - <?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> - <?php $i++; ?> - <?php endforeach; ?> - </td> -</tr> -<!-- finc: RecordDriver - DefaultRecord - data-rvk - END --> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/data-rvkNotation.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-rvkNotation.phtml index 59cc4551a62c002577faf3abef1dc7b0e74fb721..d558ee2482d7aecbd72b4d4a8bb544f07ac14fbe 100644 --- a/themes/finc/templates/RecordDriver/DefaultRecord/data-rvkNotation.phtml +++ b/themes/finc/templates/RecordDriver/DefaultRecord/data-rvkNotation.phtml @@ -1,26 +1,25 @@ <!-- finc: RecordDriver - DefaultRecord - data-rvkNotation --> <?php /* partial copied from themes/finc/templates/RecordTab/topics.phtml */ ?> -<?php $i = 0; foreach ($data as $item): ?> - <?=($i>0?"<br />":"") //no linebreak after last item ?> - - <span> - <a href="<?=$this->record($this->driver)->getLink('rvk', $item['rvk'])?>"> - <?=$item['rvk']?> - </a> - </span> - - <?php if(isset($item['name'])): ?> - <a class="toggle" role="button" data-toggle="collapse" href="#collapse_rvk_<?=$i?>" aria-expanded="false" aria-controls="collapse_rvk_<?=$i?>"> - <?=$item['name']?> - </a> - <?php endif; ?> - - <?php if(isset($item['level']) && is_array($item['level'])): ?> - <span id="collapse_rvk_<?=$i?>" class="collapse notation"> - <?= $this->render('Helpers/nestedList.phtml', ['array' => $item['level']]); ?> - </span> - <?php endif; ?> - - <?php $i++; ?> +<?php foreach ($data as $i => $item): ?> + <div> + <span> + <a href="<?=$this->record($this->driver)->getLink('rvk', $item['rvk'])?>"> + <?=$item['rvk']?> + </a> + </span> + + <?php if(isset($item['name'])): ?> + <a class="toggle" role="button" data-toggle="collapse" href="#collapse_rvk_<?=$i?>" aria-expanded="false" aria-controls="collapse_rvk_<?=$i?>"> + <?=$item['name']?> + </a> + <?php endif; ?> + + <?php if(isset($item['level']) && is_array($item['level'])): ?> + <div id="collapse_rvk_<?=$i?>" class="collapse notation"> + <?= $this->render('Helpers/nestedList.phtml', ['array' => $item['level']]); ?> + </div> + <?php endif; ?> + + </div> <?php endforeach; ?> <!-- finc: RecordDriver - DefaultRecord - data-rvkNotation - END --> \ No newline at end of file diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/data-topics.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/data-topics.phtml deleted file mode 100644 index d0276526570eac7a531d3362e9416630abe6744f..0000000000000000000000000000000000000000 --- a/themes/finc/templates/RecordDriver/DefaultRecord/data-topics.phtml +++ /dev/null @@ -1,25 +0,0 @@ -<!-- finc: RecordDriver - DefaultRecord - data-topics --> -<tr> - <th><?=$this->transEsc('Subjects')?>: </th> - <td data-title="<?= $this->transEsc('Subjects') ?>:"> - <?php foreach ($data as $field): ?> - <div class="subject-line" property="keywords"> - <?php $subject = ''; ?> - <?php - if (count($field) == 1 && !isset($field['subject'])) { - $field = explode('--', $field[0]); - } - ?> - <?php if (isset($field['subject'])): /* extended topics */?> - <?php $field = $field['subject']; ?> - <?php endif; ?> - <?php $i = 0; foreach ($field as $subfield): ?> - <?=($i++ == 0) ? '' : ' > '?> - <?php $subject = trim($subject . ' ' . $subfield); ?> - <a title="<?=$this->escapeHtmlAttr($subject)?>" href="<?=$this->record($this->driver)->getLink('subject', $subject)?>" rel="nofollow"><?=trim($this->escapeHtml($subfield))?></a> - <?php endforeach; ?> - </div> - <?php endforeach; ?> - </td> -</tr> -<!-- finc: RecordDriver - DefaultRecord - data-topics - END --> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/record-icon.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/record-icon.phtml index bfa3afa3183bac4a2625e33bd2e732da77b67a9c..6cd2fbe8890f1db9ea1319f2a1045ebbf1a6a977 100644 --- a/themes/finc/templates/RecordDriver/DefaultRecord/record-icon.phtml +++ b/themes/finc/templates/RecordDriver/DefaultRecord/record-icon.phtml @@ -1,7 +1,7 @@ <!-- finc: recordDriver - DefaultRecord - record-icon --> <?php if (!empty($iconClass)): ?> <span class="access-icon hidden-print"> - <i aria-hidden="true" class="fa <?=$iconClass?>"></i> + <i aria-hidden="true" class="<?=$iconClass?>"></i> <?php /* separate access text from icon - moved to cover.phtml */ ?> </span> <?php endif; ?> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/result-list.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/result-list.phtml index 5003f3a16be704dd1bb427f2e1f9c28aa09f67ad..3ec38ca856e328fb6bc1e1ecd31d6374080dfdc5 100644 --- a/themes/finc/templates/RecordDriver/DefaultRecord/result-list.phtml +++ b/themes/finc/templates/RecordDriver/DefaultRecord/result-list.phtml @@ -61,7 +61,7 @@ if ($cover): <?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> + <a href="<?=($containerID ? $this->recordLink()->getUrl("$containerSource|$containerID", $journalTitle, 'JournalTitle') : $this->record($this->driver)->getLink('journaltitle', str_replace(['{{{{START_HILITE}}}}', '{{{{END_HILITE}}}}'], '', $journalTitle)))?>"><?=$this->highlight($journalTitle) ?></a> <?php /* finc-specific: nxt line #8639 - CK */ ?> <?=!empty($summDate) ? ' (' . $this->escapeHtml($summDate) . ')' : ''?> <?php elseif (!empty($summDate)): ?> diff --git a/themes/finc/templates/RecordTab/topics.phtml b/themes/finc/templates/RecordTab/topics.phtml index 7e7d46803351f161e13563d87143fcd18bc38bd0..c6e063a786c23ab408c5809e5961d5623fe21c9d 100644 --- a/themes/finc/templates/RecordTab/topics.phtml +++ b/themes/finc/templates/RecordTab/topics.phtml @@ -1,18 +1,32 @@ <!-- finc: recordtab - topics --> +<?php /* template copied from themes/finc/templates/RecordTab/description.phtml + same display logic */ ?> <?php -// Set page title. -$this->headTitle($this->translate('Topics') . ': ' . $this->driver->getBreadcrumb()); -$formatter = $this->recordDataFormatter(); -$rvk = $formatter->getData($this->driver, $formatter->getDefaults('rvk')); -$topics = $formatter->getData($this->driver, $formatter->getDefaults('topics')); + // Set page title. + $this->headTitle($this->translate('Topics') . ': ' . $this->driver->getBreadcrumb()); + + $formatter = $this->recordDataFormatter(); + $mainFields = $formatter->getData($driver, $formatter->getDefaults('topics-tab')); ?> +<?php /* finc: remove schema tag here but keep in core, include responsive data table - CK */ ?> <table class="table table-striped table-resp-data"> + <?php + /* Table gets filled via recordDriver/.../data-... templates as referenced in RecordDataFormatterFactory */ ?> <caption><span class="sr-only"><?=$this->transEsc('Topics')?></span></caption> - <?php foreach ($rvk as $rvkItem): ?> - <?= $rvkItem['value'] ?? ''?> - <?php endforeach; ?> - <?php foreach ($topics as $topicsItem): ?> - <?= $topicsItem['value'] ?? ''?> - <?php endforeach; ?> + <?php if (!empty($mainFields)): ?> + <?php foreach ($mainFields as $current): ?> + <tr> + <?php if (!empty($current['label'])): ?> + <th><?=$this->transEsc($current['label'])?>:</th> + <td lang="" data-title="<?= $this->transEsc($current['label']) ?>:"> + <?php else: ?> + <td lang="" colspan="2"> + <?php endif; ?> + <?=$current['value']?></td> + </tr> + <?php endforeach; ?> + <?php else: ?> + <tr><td><?=$this->transEsc('no_description')?></td></tr> + <?php endif; ?> </table> <!-- finc: recordtab - topics - END -->