From 993a9593b66cce7d26f07a6bdace58b351e61c51 Mon Sep 17 00:00:00 2001 From: RickyLeeII Date: Mon, 13 May 2024 09:13:59 -0500 Subject: [PATCH 1/5] Add Uniform Title Field These changes add a field for "Uniform Title" to record pages when MARC field 130a is present. --- .../TAMU/View/Helper/Root/RecordDataFormatterFactory.php | 4 ++++ module/VuFind/src/VuFind/RecordDriver/DefaultRecord.php | 8 ++++++++ themes/TAMU/theme.config.php | 3 ++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/module/TAMU/src/TAMU/View/Helper/Root/RecordDataFormatterFactory.php b/module/TAMU/src/TAMU/View/Helper/Root/RecordDataFormatterFactory.php index 4db70020844..18659a057af 100644 --- a/module/TAMU/src/TAMU/View/Helper/Root/RecordDataFormatterFactory.php +++ b/module/TAMU/src/TAMU/View/Helper/Root/RecordDataFormatterFactory.php @@ -68,6 +68,10 @@ public function getDefaultCoreSpecs() null, ['recordLink' => 'title'] ); + $spec->setLine( + 'Uniform Title', + 'getUniformTitle' + ); $spec->setMultiLine( 'Authors', 'getDeduplicatedAuthors', diff --git a/module/VuFind/src/VuFind/RecordDriver/DefaultRecord.php b/module/VuFind/src/VuFind/RecordDriver/DefaultRecord.php index 5a68db1393c..d7ad6fecd6c 100644 --- a/module/VuFind/src/VuFind/RecordDriver/DefaultRecord.php +++ b/module/VuFind/src/VuFind/RecordDriver/DefaultRecord.php @@ -652,6 +652,14 @@ public function getLanguages() return (array)($this->fields['language'] ?? []); } + /** + * Get the uniform title from the 130a field + */ + public function getUniformTitle() + { + return $this->fields['uniform_title_str_mv'] ?? []; + } + /** * Get a raw, unnormalized LCCN. (See getLCCN for normalization). * diff --git a/themes/TAMU/theme.config.php b/themes/TAMU/theme.config.php index a1c271fb989..3cac34b8eff 100644 --- a/themes/TAMU/theme.config.php +++ b/themes/TAMU/theme.config.php @@ -4,7 +4,8 @@ 'favicon' => 'favicon.ico', 'helpers' => [ 'factories' => [ - 'TAMU\View\Helper\Root\Record' => 'VuFind\View\Helper\Root\RecordFactory' + 'TAMU\View\Helper\Root\Record' => 'VuFind\View\Helper\Root\RecordFactory', + 'VuFind\View\Helper\Root\RecordDataFormatter' => 'TAMU\View\Helper\Root\RecordDataFormatterFactory', ], 'aliases' => [ 'record' => 'TAMU\View\Helper\Root\Record' From 6ce52a636bd4237434e1ac6a0eb17b4f2d339c4c Mon Sep 17 00:00:00 2001 From: RickyLeeII Date: Thu, 13 Jun 2024 13:00:46 -0500 Subject: [PATCH 2/5] Revise error message Change phrasing "Please contact the Library Reference Department for assistance" to "Please contact AskUs for assistance." --- themes/TAMU/templates/error/index.phtml | 49 +++++++++++++++++++ .../TAMU/templates/error/loginForAccess.phtml | 4 ++ .../templates/error/permissiondenied.phtml | 25 ++++++++++ themes/TAMU/templates/error/unavailable.phtml | 22 +++++++++ 4 files changed, 100 insertions(+) create mode 100644 themes/TAMU/templates/error/index.phtml create mode 100644 themes/TAMU/templates/error/loginForAccess.phtml create mode 100644 themes/TAMU/templates/error/permissiondenied.phtml create mode 100644 themes/TAMU/templates/error/unavailable.phtml diff --git a/themes/TAMU/templates/error/index.phtml b/themes/TAMU/templates/error/index.phtml new file mode 100644 index 00000000000..6dc6f4bc138 --- /dev/null +++ b/themes/TAMU/templates/error/index.phtml @@ -0,0 +1,49 @@ +headTitle($this->translate('An error has occurred')); + + $this->layout()->breadcrumbs = '
  • Error
  • '; +?> +
    +

    transEsc('An error has occurred')?>

    +

    transEsc($this->message)?>

    +

    + transEsc('Please contact AskUs for assistance')?> +
    + escapeHtmlAttr($this->systemEmail()); ?> + +

    +
    + +showInstallLink): ?> +

    transEsc('auto_configure_title', [], 'Auto Configure')?>

    + transEsc('auto_configure_description', [], 'If this is a new installation, you may be able to fix the error using VuFind\'s Auto Configure tool.')?> +

    transEsc('Upgrade VuFind')?>

    + transEsc('upgrade_description', [], 'If you are upgrading a previous VuFind version, you can load your old settings with this tool.')?> + + +display_exceptions) && $this->display_exceptions): ?> +

    transEsc('Exception')?>:

    +

    + transEsc('Message')?>: escapeHtml($this->exception->getMessage())?> +

    + +

    transEsc('Backtrace')?>:

    +
    exception->getTraceAsString()?>
    +  
    + + exception->getPrevious()): ?> +

    Previous exceptions:

    + +

    +

    getMessage()?>

    +
    getTraceAsString()?>
    + getPrevious(); ?> + + + + request)): ?> +

    transEsc('error_page_parameter_list_heading')?>:

    +
    escapeHtml(var_export($this->request->getParams(), true))?>
    + + diff --git a/themes/TAMU/templates/error/loginForAccess.phtml b/themes/TAMU/templates/error/loginForAccess.phtml new file mode 100644 index 00000000000..3e90cee9614 --- /dev/null +++ b/themes/TAMU/templates/error/loginForAccess.phtml @@ -0,0 +1,4 @@ + + diff --git a/themes/TAMU/templates/error/permissiondenied.phtml b/themes/TAMU/templates/error/permissiondenied.phtml new file mode 100644 index 00000000000..6280b9882a8 --- /dev/null +++ b/themes/TAMU/templates/error/permissiondenied.phtml @@ -0,0 +1,25 @@ +headTitle($this->translate('permission_denied_title')); + + // Disable top search box -- this page has a special layout. + $this->layout()->searchbox = false; + + $this->layout()->breadcrumbs = '
  • Error
  • '; +?> +
    +

    transEsc('permission_denied_title')?>

    +

    flashmessages()?>

    +

    + transEsc('permission_denied')?> + +

    transEsc($msg)?>
    + +

    +

    + transEsc('Please contact AskUs for assistance')?> +
    + escapeHtmlAttr($this->systemEmail()); ?> + +

    +
    diff --git a/themes/TAMU/templates/error/unavailable.phtml b/themes/TAMU/templates/error/unavailable.phtml new file mode 100644 index 00000000000..146b3dfa391 --- /dev/null +++ b/themes/TAMU/templates/error/unavailable.phtml @@ -0,0 +1,22 @@ +headTitle($this->translate('System Unavailable')); + + // Disable top search box -- this page has a special layout. + $this->layout()->searchbox = false; + + $this->layout()->breadcrumbs = '
  • Error
  • '; +?> +
    +

    transEsc('System Unavailable')?>

    +

    + transEsc('The system is currently unavailable due to system maintenance')?>. + transEsc('Please check back soon')?>. +

    +

    + transEsc('Please contact AskUs for assistance')?> +
    + escapeHtmlAttr($this->systemEmail()); ?> + +

    +
    From 64fb1a54c550680adbc861d2adb0351aeb2bb77e Mon Sep 17 00:00:00 2001 From: Jason Savell Date: Mon, 15 Jul 2024 08:21:08 -0500 Subject: [PATCH 3/5] add uniform title and language notes via TAMU module --- module/TAMU/config/module.config.php | 52 +++++++++++++------ .../src/TAMU/RecordDriver/DefaultRecord.php | 10 +--- .../RecordDriver/IlsAwareDelegatorFactory.php | 8 +++ .../TAMU/RecordDriver/SolrDefaultFactory.php | 8 +++ .../TAMU/src/TAMU/RecordDriver/SolrMarc.php | 24 +++++++++ .../Root/RecordDataFormatterFactory.php | 7 +++ 6 files changed, 85 insertions(+), 24 deletions(-) create mode 100644 module/TAMU/src/TAMU/RecordDriver/IlsAwareDelegatorFactory.php create mode 100644 module/TAMU/src/TAMU/RecordDriver/SolrDefaultFactory.php create mode 100644 module/TAMU/src/TAMU/RecordDriver/SolrMarc.php diff --git a/module/TAMU/config/module.config.php b/module/TAMU/config/module.config.php index b26ed0c77e3..87e55bb13a0 100644 --- a/module/TAMU/config/module.config.php +++ b/module/TAMU/config/module.config.php @@ -1,17 +1,39 @@ [ - 'plugin_managers' => [ - 'ils_driver' => [ - 'factories' => [ - 'TAMU\\ILS\\Driver\\Folio' => 'VuFind\\ILS\\Driver\\FolioFactory', - ], - 'aliases' => [ - 'VuFind\\ILS\\Driver\\Folio' => 'TAMU\\ILS\\Driver\\Folio', - ] - ], - ], - ], -]; +return array ( + 'vufind' => + array ( + 'plugin_managers' => + array ( + 'ils_driver' => + array ( + 'factories' => + array ( + 'TAMU\\ILS\\Driver\\Folio' => 'VuFind\\ILS\\Driver\\FolioFactory', + ), + 'aliases' => + array ( + 'VuFind\\ILS\\Driver\\Folio' => 'TAMU\\ILS\\Driver\\Folio', + ), + ), + 'recorddriver' => + array ( + 'factories' => + array ( + 'TAMU\\RecordDriver\\SolrMarc' => 'TAMU\\RecordDriver\\SolrDefaultFactory', + ), + 'aliases' => + array ( + 'VuFind\\RecordDriver\\SolrMarc' => 'TAMU\\RecordDriver\\SolrMarc', + ), + 'delegators' => + array ( + 'TAMU\\RecordDriver\\SolrMarc' => + array ( + 0 => 'TAMU\\RecordDriver\\IlsAwareDelegatorFactory', + ), + ), + ), + ), + ), +); \ No newline at end of file diff --git a/module/TAMU/src/TAMU/RecordDriver/DefaultRecord.php b/module/TAMU/src/TAMU/RecordDriver/DefaultRecord.php index 899a2f2b8ee..4374ff05685 100644 --- a/module/TAMU/src/TAMU/RecordDriver/DefaultRecord.php +++ b/module/TAMU/src/TAMU/RecordDriver/DefaultRecord.php @@ -40,13 +40,5 @@ */ class DefaultRecord extends \VuFind\RecordDriver\DefaultRecord { - /** - * Get an array of all the language notes associated with the record. - * - * @return array - */ - public function getLanguageNote() - { - return (array)($this->fields['language-notes'] ?? []); - } + } diff --git a/module/TAMU/src/TAMU/RecordDriver/IlsAwareDelegatorFactory.php b/module/TAMU/src/TAMU/RecordDriver/IlsAwareDelegatorFactory.php new file mode 100644 index 00000000000..b4bed9d3653 --- /dev/null +++ b/module/TAMU/src/TAMU/RecordDriver/IlsAwareDelegatorFactory.php @@ -0,0 +1,8 @@ +fields['uniform_title_str_mv'] ?? []; + } + + /** + * Get an array of all the language notes associated with the record. + * + * @return array + */ + public function getLanguageNotes() + { + return (array)($this->fields['language-notes'] ?? []); + } +} diff --git a/module/TAMU/src/TAMU/View/Helper/Root/RecordDataFormatterFactory.php b/module/TAMU/src/TAMU/View/Helper/Root/RecordDataFormatterFactory.php index 18659a057af..7c8418ecf2b 100644 --- a/module/TAMU/src/TAMU/View/Helper/Root/RecordDataFormatterFactory.php +++ b/module/TAMU/src/TAMU/View/Helper/Root/RecordDataFormatterFactory.php @@ -98,6 +98,13 @@ public function getDefaultCoreSpecs() ['itemPrefix' => '', 'itemSuffix' => ''] ); + $spec->setLine( + 'Language Notes', + 'getLanguageNotes', + null, + ['itemPrefix' => '', + 'itemSuffix' => ''] + ); $spec->setTemplateLine( 'Published', 'getPublicationDetails', From ff278260c9ce95a9f2de24447d0ae4438c9957df Mon Sep 17 00:00:00 2001 From: Jason Savell Date: Mon, 15 Jul 2024 09:19:00 -0500 Subject: [PATCH 4/5] clean up previous lang note customization --- .../TAMU/View/Helper/Root/RecordDataFormatterFactory.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/module/TAMU/src/TAMU/View/Helper/Root/RecordDataFormatterFactory.php b/module/TAMU/src/TAMU/View/Helper/Root/RecordDataFormatterFactory.php index 7c8418ecf2b..a58267c2d8a 100644 --- a/module/TAMU/src/TAMU/View/Helper/Root/RecordDataFormatterFactory.php +++ b/module/TAMU/src/TAMU/View/Helper/Root/RecordDataFormatterFactory.php @@ -91,13 +91,6 @@ public function getDefaultCoreSpecs() . '', 'itemSuffix' => ''] ); - $spec->setLine( - 'Language Notes', - 'getLanguageNote', - null, - ['itemPrefix' => '', - 'itemSuffix' => ''] - ); $spec->setLine( 'Language Notes', 'getLanguageNotes', From 06c66cfc9aab4489bb93a4e2c8685cf018966c6c Mon Sep 17 00:00:00 2001 From: RickyLeeII <144821434+RickyLeeII@users.noreply.github.com> Date: Thu, 18 Jul 2024 09:23:43 -0500 Subject: [PATCH 5/5] Add TAMUG to Catalog Home Added a link to search TAMU Galveston on the catalog home page. --- themes/TAMU/templates/ContentBlock/FacetList.phtml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/themes/TAMU/templates/ContentBlock/FacetList.phtml b/themes/TAMU/templates/ContentBlock/FacetList.phtml index e06079a9040..ed0f817508f 100644 --- a/themes/TAMU/templates/ContentBlock/FacetList.phtml +++ b/themes/TAMU/templates/ContentBlock/FacetList.phtml @@ -43,6 +43,10 @@ Policy Sciences and Economics Library +
  • + + Texas A&M University Galveston +
  • Texas A&M University Qatar