From c5e1b7eda682178ab5bd8e129c318160a8f29b5d Mon Sep 17 00:00:00 2001 From: Gregor Gawol <gawol@ub.uni-leipzig.de> Date: Wed, 27 Oct 2021 09:39:19 +0200 Subject: [PATCH] refs #20826 [finc] integrate pullrequest 2157 * reverted #19621 * reverted #17979 * clean up view helper factory * add pullrequest changes --- local/config/vufind/config.ini | 2 + local/languages/de.ini | 3 + local/languages/en.ini | 3 + .../src/finc/View/Helper/Root/Factory.php | 13 ----- .../src/finc/View/Helper/Root/HeadTitle.php | 58 ------------------- .../Auth/AbstractBase/resetpassword.phtml | 2 +- .../templates/RecordTab/acquisitionpda.phtml | 1 - .../templates/RecordTab/description.phtml | 2 +- .../templates/RecordTab/descriptionlido.phtml | 2 +- .../templates/RecordTab/hierarchytree.phtml | 2 +- .../templates/RecordTab/holdingsils.phtml | 2 +- .../finc/templates/RecordTab/serviceebl.phtml | 2 +- .../templates/RecordTab/staffviewai.phtml | 2 +- .../templates/RecordTab/staffviewarray.phtml | 2 +- .../templates/RecordTab/staffviewmarc.phtml | 2 +- themes/finc/templates/RecordTab/topics.phtml | 2 +- themes/finc/templates/admin/home.phtml | 2 +- themes/finc/templates/alphabrowse/home.phtml | 2 +- themes/finc/templates/amsl/sources-list.phtml | 2 +- themes/finc/templates/browse/home.phtml | 2 +- themes/finc/templates/cart/cart.phtml | 2 +- themes/finc/templates/cart/email.phtml | 2 +- themes/finc/templates/cart/save.phtml | 2 +- themes/finc/templates/channels/home.phtml | 2 +- .../documentdeliveryservice/home.phtml | 2 +- themes/finc/templates/layout/layout.phtml | 14 ++++- .../templates/librarycards/editcard.phtml | 2 +- themes/finc/templates/librarycards/home.phtml | 2 +- .../finc/templates/myresearch/account.phtml | 2 +- .../templates/myresearch/acquisition.phtml | 2 +- .../templates/myresearch/cataloglogin.phtml | 2 +- .../templates/myresearch/checkedout.phtml | 2 +- themes/finc/templates/myresearch/edit.phtml | 2 +- .../finc/templates/myresearch/editlist.phtml | 2 +- themes/finc/templates/myresearch/fines.phtml | 2 +- .../templates/myresearch/historicloans.phtml | 2 +- themes/finc/templates/myresearch/holds.phtml | 2 +- .../templates/myresearch/illrequests.phtml | 2 +- themes/finc/templates/myresearch/mylist.phtml | 2 +- .../templates/myresearch/newpassword.phtml | 2 +- .../finc/templates/myresearch/profile.phtml | 2 +- .../myresearch/storageretrievalrequests.phtml | 2 +- .../templates/search/advanced/layout.phtml | 2 +- themes/finc/templates/search/history.phtml | 2 +- themes/finc/templates/search/home.phtml | 2 +- themes/finc/templates/search/results.phtml | 2 +- themes/finc/theme.config.php | 3 - 47 files changed, 60 insertions(+), 115 deletions(-) delete mode 100644 module/finc/src/finc/View/Helper/Root/HeadTitle.php diff --git a/local/config/vufind/config.ini b/local/config/vufind/config.ini index c4f84f2d911..a7c4da375e3 100644 --- a/local/config/vufind/config.ini +++ b/local/config/vufind/config.ini @@ -26,6 +26,8 @@ autoConfigure = true url = http://localhost/vufind_generic email = dummy@vufind.org title = "Generic Katalog (devel)" +; The separator used between page name and site name in the <title> tag of pages. +titleSeparator = "::" ; This is the default theme for non-mobile devices (or all devices if mobile_theme ; is disabled below). Available standard themes: ; bootstrap3 = HTML5 theme using Bootstrap 3 + jQuery libraries, with minimal diff --git a/local/languages/de.ini b/local/languages/de.ini index 144a30c70ca..fc2852d7120 100644 --- a/local/languages/de.ini +++ b/local/languages/de.ini @@ -2077,3 +2077,6 @@ missing_record_exception = "Der aufgerufene Titel (%%id%%) ist nicht vorhanden." ; #18611 unknown resolver state 10 Unknown Electronic = "Titel ist beim Resolver-Service nicht bekannt" + +; #20826 +title_wrapper = "%%pageTitle%% %%titleSeparator%% %%siteTitle%%" \ No newline at end of file diff --git a/local/languages/en.ini b/local/languages/en.ini index 807e7d4350a..48a6d2dbab0 100644 --- a/local/languages/en.ini +++ b/local/languages/en.ini @@ -2165,3 +2165,6 @@ missing_record_exception = "Record %%id%% is unavailable." ; #18611 unknown resolver state 10 Unknown Electronic = "Record is unknown to the resolver service" + +; #20826 +title_wrapper = "%%pageTitle%% %%titleSeparator%% %%siteTitle%%" \ No newline at end of file diff --git a/module/finc/src/finc/View/Helper/Root/Factory.php b/module/finc/src/finc/View/Helper/Root/Factory.php index 4e44d5bae6a..82c343ba186 100644 --- a/module/finc/src/finc/View/Helper/Root/Factory.php +++ b/module/finc/src/finc/View/Helper/Root/Factory.php @@ -211,19 +211,6 @@ class Factory ); } - /** - * Construct Head Title Helper - * - * @param ContainerInterface $container Service manager - * - * @return HeadTitle - */ - public static function getHeadTitle(ContainerInterface $container) - { - $config = $container->get('VuFind\Config')->get('config')->Site; - return new HeadTitle($config->title ?? ''); - } - /** * Construct ExternalLink * diff --git a/module/finc/src/finc/View/Helper/Root/HeadTitle.php b/module/finc/src/finc/View/Helper/Root/HeadTitle.php deleted file mode 100644 index c4036a17429..00000000000 --- a/module/finc/src/finc/View/Helper/Root/HeadTitle.php +++ /dev/null @@ -1,58 +0,0 @@ -<?php -/** - * Head Title view helper - * - * PHP version 7 - * - * Copyright (C) Leipzig University Library 2020. - * - * 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 View_Helpers - * @author Dorian Merz <merz@ub.uni-leipzig.de> - * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License - * @link https://vufind.org/wiki/development Wiki - */ -namespace finc\View\Helper\Root; - -use Zend\View\Helper\HeadTitle as BaseHelper; - -/** - * Head Title view helper - * - * @category VuFind - * @package View_Helpers - * @author Dorian Merz <merz@ub.uni-leipzig.de> - * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License - * @link https://vufind.org/wiki/development Wiki - */ -class HeadTitle extends BaseHelper -{ - protected $headerSuffix; - - public function __construct($headerSuffix = '') - { - parent::__construct(); - if (!empty($headerSuffix)) { - $this->headerSuffix = ' - '.$headerSuffix; - } - } - - public function __invoke($title = null, $setType = null) - { - $title = $title ? : $this->headerSuffix; - return parent::__invoke($title, $setType); - } -} diff --git a/themes/finc/templates/Auth/AbstractBase/resetpassword.phtml b/themes/finc/templates/Auth/AbstractBase/resetpassword.phtml index 379fd2fbdd2..ed63456d5f7 100644 --- a/themes/finc/templates/Auth/AbstractBase/resetpassword.phtml +++ b/themes/finc/templates/Auth/AbstractBase/resetpassword.phtml @@ -2,7 +2,7 @@ <?php /* compare with BS login templates in Auth during updates */ ?> <?php // Set page title. -$this->headTitle($this->translate('Reset Password') . ' | ' . $this->translate("LibraryName")); +$this->headTitle($this->translate('Reset Password')); ?> <h1><?=$this->transEsc('Reset Password')?></h1> <form method="post" name="resetPasswordForm" action="<?=$this->url('myresearch-resetpassword')?>"> diff --git a/themes/finc/templates/RecordTab/acquisitionpda.phtml b/themes/finc/templates/RecordTab/acquisitionpda.phtml index ed7a386cde1..91296ba15fa 100644 --- a/themes/finc/templates/RecordTab/acquisitionpda.phtml +++ b/themes/finc/templates/RecordTab/acquisitionpda.phtml @@ -4,7 +4,6 @@ $this->headTitle( $this->translate('PDA::Acquisition') . ': ' . $this->driver->getBreadcrumb() - . ' | ' . $this->translate("LibraryName") ); // Get some variables $id = $this->driver->getUniqueId(); diff --git a/themes/finc/templates/RecordTab/description.phtml b/themes/finc/templates/RecordTab/description.phtml index 9978227ede0..0e39ff89ba9 100644 --- a/themes/finc/templates/RecordTab/description.phtml +++ b/themes/finc/templates/RecordTab/description.phtml @@ -1,7 +1,7 @@ <!-- finc: recordtab - description --> <?php // Set page title. -$this->headTitle($this->translate('Description') . ': ' . $this->driver->getBreadcrumb() . ' | ' . $this->translate("LibraryName")); +$this->headTitle($this->translate('Description') . ': ' . $this->driver->getBreadcrumb()); $formatter = $this->recordDataFormatter(); $mainFields = $formatter->getData($driver, $formatter->getDefaults('description')); diff --git a/themes/finc/templates/RecordTab/descriptionlido.phtml b/themes/finc/templates/RecordTab/descriptionlido.phtml index 221d9845697..939b171f95e 100644 --- a/themes/finc/templates/RecordTab/descriptionlido.phtml +++ b/themes/finc/templates/RecordTab/descriptionlido.phtml @@ -1,7 +1,7 @@ <!-- finc: recordtab - descriptionlido --> <?php // Set page title. -$this->headTitle($this->translate('Description') . ': ' . $this->driver->getBreadcrumb() . ' | ' . $this->translate("LibraryName")); +$this->headTitle($this->translate('Description') . ': ' . $this->driver->getBreadcrumb()); $formatter = $this->recordDataFormatter(); $mainFields = $formatter->getData($driver, $formatter->getDefaults('description-lido')); diff --git a/themes/finc/templates/RecordTab/hierarchytree.phtml b/themes/finc/templates/RecordTab/hierarchytree.phtml index dfc402d7830..0c5f7f1879a 100644 --- a/themes/finc/templates/RecordTab/hierarchytree.phtml +++ b/themes/finc/templates/RecordTab/hierarchytree.phtml @@ -1,7 +1,7 @@ <!-- finc: record-tab - hierarchytree --> <?php // Set page title. - $this->headTitle($this->translate('hierarchy_tree') . ': ' . $this->driver->getBreadcrumb() . ' | ' . $this->translate("LibraryName")); + $this->headTitle($this->translate('hierarchy_tree') . ': ' . $this->driver->getBreadcrumb()); $hierarchyTreeList = $this->tab->getTreeList(); $activeTree = $this->tab->getActiveTree(); diff --git a/themes/finc/templates/RecordTab/holdingsils.phtml b/themes/finc/templates/RecordTab/holdingsils.phtml index b78c5f34b09..d929e6b59b9 100644 --- a/themes/finc/templates/RecordTab/holdingsils.phtml +++ b/themes/finc/templates/RecordTab/holdingsils.phtml @@ -26,7 +26,7 @@ } } // Set page title. - $this->headTitle($this->translate('Holdings') . ': ' . $this->driver->getBreadcrumb() . ' | ' . $this->translate("LibraryName")); + $this->headTitle($this->translate('Holdings') . ': ' . $this->driver->getBreadcrumb()); ?> <?php /* finc-specific: nxt line - #7841@56988450 - CK */ ?> diff --git a/themes/finc/templates/RecordTab/serviceebl.phtml b/themes/finc/templates/RecordTab/serviceebl.phtml index 5ef8e11a1e9..edb3e1171bc 100644 --- a/themes/finc/templates/RecordTab/serviceebl.phtml +++ b/themes/finc/templates/RecordTab/serviceebl.phtml @@ -1,6 +1,6 @@ <?php // Set page title. -$this->headTitle($this->translate('EBL') . ': ' . $this->driver->getBreadcrumb() . ' | ' . $this->translate("LibraryName")); +$this->headTitle($this->translate('EBL') . ': ' . $this->driver->getBreadcrumb()); // Get EBL url $link = $this->tab->getLinkEBL(); diff --git a/themes/finc/templates/RecordTab/staffviewai.phtml b/themes/finc/templates/RecordTab/staffviewai.phtml index 62a5748a6bf..d38b62fdc2e 100644 --- a/themes/finc/templates/RecordTab/staffviewai.phtml +++ b/themes/finc/templates/RecordTab/staffviewai.phtml @@ -1,7 +1,7 @@ <!-- finc: recordtab - staffviewai --> <?php // Set page title. -$this->headTitle($this->translate('Staff View') . ': ' . $this->driver->getBreadcrumb() . ' | ' . $this->translate("LibraryName")); +$this->headTitle($this->translate('Staff View') . ': ' . $this->driver->getBreadcrumb()); ?> <?php /* include responsive data table - CK */ ?> <table class="citation table table-striped table-resp-data"> diff --git a/themes/finc/templates/RecordTab/staffviewarray.phtml b/themes/finc/templates/RecordTab/staffviewarray.phtml index 73fac7db40f..c046901cfae 100644 --- a/themes/finc/templates/RecordTab/staffviewarray.phtml +++ b/themes/finc/templates/RecordTab/staffviewarray.phtml @@ -1,7 +1,7 @@ <!-- finc: recordtab - staffviewarray --> <?php // Set page title. - $this->headTitle($this->translate('Staff View') . ': ' . $this->driver->getBreadcrumb() . ' | ' . $this->translate("LibraryName")); + $this->headTitle($this->translate('Staff View') . ': ' . $this->driver->getBreadcrumb()); ?> <?php /* include responsive data table - CK */ ?> <table class="citation table table-striped table-resp-data"> diff --git a/themes/finc/templates/RecordTab/staffviewmarc.phtml b/themes/finc/templates/RecordTab/staffviewmarc.phtml index 19f2aa691b4..ebd800bbd7d 100644 --- a/themes/finc/templates/RecordTab/staffviewmarc.phtml +++ b/themes/finc/templates/RecordTab/staffviewmarc.phtml @@ -1,7 +1,7 @@ <!-- finc: recordtab - staffviewmarc --> <?php // Set page title. -$this->headTitle($this->translate('Staff View') . ': ' . $this->driver->getBreadcrumb() . ' | ' . $this->translate("LibraryName")); +$this->headTitle($this->translate('Staff View') . ': ' . $this->driver->getBreadcrumb()); ?> <?=\VuFind\XSLT\Processor::process('record-marc.xsl', $this->driver->getXML('marc21'))?> <?php /* the following introduced in 9934*/ ?> diff --git a/themes/finc/templates/RecordTab/topics.phtml b/themes/finc/templates/RecordTab/topics.phtml index eac80af00c6..40d1f149f83 100644 --- a/themes/finc/templates/RecordTab/topics.phtml +++ b/themes/finc/templates/RecordTab/topics.phtml @@ -1,7 +1,7 @@ <!-- finc: recordtab - topics --> <?php // Set page title. -$this->headTitle($this->translate('Topics') . ': ' . $this->driver->getBreadcrumb() . ' | ' . $this->translate("LibraryName")); +$this->headTitle($this->translate('Topics') . ': ' . $this->driver->getBreadcrumb()); ?> <table class="table table-striped table-resp-data"> diff --git a/themes/finc/templates/admin/home.phtml b/themes/finc/templates/admin/home.phtml index 57ba0f03286..5e8aa62a4df 100644 --- a/themes/finc/templates/admin/home.phtml +++ b/themes/finc/templates/admin/home.phtml @@ -5,7 +5,7 @@ */ // Set page title. - $this->headTitle($this->translate('VuFind Administration - Home') . ' | ' . $this->translate("LibraryName")); + $this->headTitle($this->translate('VuFind Administration - Home')); // Set up map of core name => label $coreLabels = [ diff --git a/themes/finc/templates/alphabrowse/home.phtml b/themes/finc/templates/alphabrowse/home.phtml index ccd0a1caca6..0e024ed7736 100644 --- a/themes/finc/templates/alphabrowse/home.phtml +++ b/themes/finc/templates/alphabrowse/home.phtml @@ -1,6 +1,6 @@ <!-- finc - templates - alphabrowse - home --> <?php - $this->headTitle($this->translate('Browse the Collection Alphabetically') . ' | ' . $this->translate("LibraryName")); + $this->headTitle($this->translate('Browse the Collection Alphabetically')); $this->layout()->breadcrumbs = '<a href="' . $this->url('alphabrowse-home') . '">' . $this->transEsc('Browse Alphabetically') . '</a>'; $baseQuery = ['source' => $this->source, 'from' => $this->from]; diff --git a/themes/finc/templates/amsl/sources-list.phtml b/themes/finc/templates/amsl/sources-list.phtml index 5946ef486e2..371f906684d 100644 --- a/themes/finc/templates/amsl/sources-list.phtml +++ b/themes/finc/templates/amsl/sources-list.phtml @@ -8,7 +8,7 @@ <!-- finc: amsl/sources-list - home --> <?php // Set up page title: -$this->headTitle($this->translate('List of available Sources') . ' | ' . $this->translate("LibraryName")); +$this->headTitle($this->translate('List of available Sources')); // Set up breadcrumbs: $this->layout()->breadcrumbs .= '</li> <li class="active">' . $this->transEsc('List of available Sources') . '</li>'; diff --git a/themes/finc/templates/browse/home.phtml b/themes/finc/templates/browse/home.phtml index bac20ae20af..d20402286c3 100644 --- a/themes/finc/templates/browse/home.phtml +++ b/themes/finc/templates/browse/home.phtml @@ -2,7 +2,7 @@ <?php /* copied from bootstrap3 - added h1 for sr-only - #17596 - HR */?> <?php - $this->headTitle($this->translate('Browse the Catalog') . ' | ' . $this->translate("LibraryName")); + $this->headTitle($this->translate('Browse the Catalog')); $this->layout()->breadcrumbs = '<a href="' . $this->url('browse-home') . '">' . $this->transEsc('Browse') . '</a>'; $BROWSE_BASE = $this->url('browse-' . strtolower($this->currentAction)); diff --git a/themes/finc/templates/cart/cart.phtml b/themes/finc/templates/cart/cart.phtml index 53de8590ca3..7ac208d9e77 100644 --- a/themes/finc/templates/cart/cart.phtml +++ b/themes/finc/templates/cart/cart.phtml @@ -1,7 +1,7 @@ <!-- finc: cart - cart --> <?php // Set page title. - $this->headTitle($this->translate('Book Bag') . ' | ' . $this->translate("LibraryName")); + $this->headTitle($this->translate('Book Bag')); // Set up breadcrumbs: $this->layout()->breadcrumbs = '<li>' . $this->searchMemory()->getLastSearchLink($this->transEsc('Search'), '', '</li> ') diff --git a/themes/finc/templates/cart/email.phtml b/themes/finc/templates/cart/email.phtml index e4498df745d..54d82cec86f 100644 --- a/themes/finc/templates/cart/email.phtml +++ b/themes/finc/templates/cart/email.phtml @@ -3,7 +3,7 @@ <?php // Set page title. - $this->headTitle($this->translate('email_selected_favorites') . ' | ' . $this->translate("LibraryName")); + $this->headTitle($this->translate('email_selected_favorites')); // Set up breadcrumbs: $this->layout()->breadcrumbs = '<li>' . $this->searchMemory()->getLastSearchLink($this->transEsc('Search'), '', '</li> ') diff --git a/themes/finc/templates/cart/save.phtml b/themes/finc/templates/cart/save.phtml index dd40f5249f4..92183fe7ae6 100644 --- a/themes/finc/templates/cart/save.phtml +++ b/themes/finc/templates/cart/save.phtml @@ -3,7 +3,7 @@ <?php // Set page title. - $this->headTitle($this->translate('bookbag_save_selected') . ' | ' . $this->translate("LibraryName")); + $this->headTitle($this->translate('bookbag_save_selected')); // Set up breadcrumbs: $this->layout()->breadcrumbs = '<li>' . $this->searchMemory()->getLastSearchLink($this->transEsc('Search'), '', '</li> ') . diff --git a/themes/finc/templates/channels/home.phtml b/themes/finc/templates/channels/home.phtml index 5220503f936..5bf072cc53b 100644 --- a/themes/finc/templates/channels/home.phtml +++ b/themes/finc/templates/channels/home.phtml @@ -3,7 +3,7 @@ <?php // Set up page title: - $this->headTitle($this->translate('Channels') . ' | ' . $this->translate("LibraryName")); + $this->headTitle($this->translate('Channels')); // Set up breadcrumbs: $this->layout()->breadcrumbs = '<li class="active">' . $this->transEsc('Channels') . '</li>'; diff --git a/themes/finc/templates/documentdeliveryservice/home.phtml b/themes/finc/templates/documentdeliveryservice/home.phtml index d92c526dd57..db283942371 100644 --- a/themes/finc/templates/documentdeliveryservice/home.phtml +++ b/themes/finc/templates/documentdeliveryservice/home.phtml @@ -1,6 +1,6 @@ <?php // Set up page title: -$this->headTitle($this->translate('Delivery service for documents') . ' | ' . $this->translate("LibraryName")); +$this->headTitle($this->translate('Delivery service for documents')); ?> <?=($this->loadForm ? $this->render('documentdeliveryservice/zform.phtml') : $this->flashmessages());?> \ No newline at end of file diff --git a/themes/finc/templates/layout/layout.phtml b/themes/finc/templates/layout/layout.phtml index 898b0e194a6..a269a91e3a9 100644 --- a/themes/finc/templates/layout/layout.phtml +++ b/themes/finc/templates/layout/layout.phtml @@ -8,8 +8,20 @@ <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 + // Pullrequest 2157 Ticket #20826 + // Format the page title using the translation system: + $siteConfig = $this->config()->get('config')->Site; + $fullTitle = $this->translate( + 'title_wrapper', + [ + '%%pageTitle%%' => $this->headTitle()->renderTitle(), + '%%siteTitle%%' => $siteConfig->title, + '%%titleSeparator%%' => $siteConfig->titleSeparator ?? '::' + ] + ); + echo $this->headTitle($fullTitle, \Zend\View\Helper\Placeholder\Container\AbstractContainer::SET); + // Set up OpenSearch link: $this->headLink( [ diff --git a/themes/finc/templates/librarycards/editcard.phtml b/themes/finc/templates/librarycards/editcard.phtml index 34c7edc473a..9a7926db76b 100644 --- a/themes/finc/templates/librarycards/editcard.phtml +++ b/themes/finc/templates/librarycards/editcard.phtml @@ -2,7 +2,7 @@ <?php // Set up page title: $pageTitle = empty($this->card->id) ? 'Add a Library Card' : "Edit Library Card"; - $this->headTitle($this->translate($pageTitle) . ' | ' . $this->translate("LibraryName")); + $this->headTitle($this->translate($pageTitle)); // Set up breadcrumbs: $this->layout()->breadcrumbs = '<li><a href="' . $this->url('myresearch-home') . '">' . $this->transEsc('Your Account') . '</a></li>' diff --git a/themes/finc/templates/librarycards/home.phtml b/themes/finc/templates/librarycards/home.phtml index 5ded3c3ad5a..25338aa28e5 100644 --- a/themes/finc/templates/librarycards/home.phtml +++ b/themes/finc/templates/librarycards/home.phtml @@ -1,7 +1,7 @@ <!-- finc: librarycards - home --> <?php // Set up page title: - $this->headTitle($this->translate('Library Cards') . ' | ' . $this->translate("LibraryName")); + $this->headTitle($this->translate('Library Cards')); // Set up breadcrumbs: $this->layout()->breadcrumbs = '<li><a href="' . $this->url('myresearch-home') . '">' . $this->transEsc('Your Account') . '</a></li> <li class="active">' . $this->transEsc('Library Cards') . '</li>'; diff --git a/themes/finc/templates/myresearch/account.phtml b/themes/finc/templates/myresearch/account.phtml index 93352dd3908..b1055a8c55b 100644 --- a/themes/finc/templates/myresearch/account.phtml +++ b/themes/finc/templates/myresearch/account.phtml @@ -2,7 +2,7 @@ <?php // Set up page title: - $this->headTitle($this->translate('User Account') . ' | ' . $this->translate("LibraryName")); + $this->headTitle($this->translate('User Account')); // Set up breadcrumbs: $this->layout()->breadcrumbs = '<li><a href="' . $this->url('myresearch-home') . '">' . $this->transEsc('Your Account') . '</a></li> <li class="active">' . $this->transEsc('Account') . '</li>'; diff --git a/themes/finc/templates/myresearch/acquisition.phtml b/themes/finc/templates/myresearch/acquisition.phtml index 0d2140246d9..62d81badc6f 100644 --- a/themes/finc/templates/myresearch/acquisition.phtml +++ b/themes/finc/templates/myresearch/acquisition.phtml @@ -1,7 +1,7 @@ <!-- finc: myresearch - acquisition --> <?php // Set up page title: -$this->headTitle($this->translate('PDA::pda_form_title') . ' | ' . $this->translate("LibraryName")); +$this->headTitle($this->translate('PDA::pda_form_title')); // Set up breadcrumbs: $this->layout()->breadcrumbs = '<li><a href="' . $this->url('myresearch-home') . '">' . $this->transEsc('Your Account') . '</a></li> <li class="active">' . $this->transEsc('PDA::pda_form_title') . '</li>'; diff --git a/themes/finc/templates/myresearch/cataloglogin.phtml b/themes/finc/templates/myresearch/cataloglogin.phtml index 1f89d9181e8..0ae0ff0c85d 100644 --- a/themes/finc/templates/myresearch/cataloglogin.phtml +++ b/themes/finc/templates/myresearch/cataloglogin.phtml @@ -1,6 +1,6 @@ <?php // Set up page title: - $this->headTitle($this->translate('Login') . ' | ' . $this->translate("LibraryName")); + $this->headTitle($this->translate('Login')); // Set up breadcrumbs: $this->layout()->breadcrumbs = '<li><a href="' . $this->url('myresearch-home') . '">' . $this->transEsc('Your Account') . '</a></li> <li class="active">' . $this->transEsc('Login') . '</li>'; diff --git a/themes/finc/templates/myresearch/checkedout.phtml b/themes/finc/templates/myresearch/checkedout.phtml index da91dd35e27..a6b6773c1a9 100644 --- a/themes/finc/templates/myresearch/checkedout.phtml +++ b/themes/finc/templates/myresearch/checkedout.phtml @@ -1,7 +1,7 @@ <!-- finc: myresearch - checkedout --> <?php // Set up page title: - $this->headTitle($this->translate('Checked Out Items') . ' | ' . $this->translate("LibraryName")); + $this->headTitle($this->translate('Checked Out Items')); // Set up breadcrumbs: $this->layout()->breadcrumbs = '<li><a href="' . $this->url('myresearch-home') . '">' . $this->transEsc('Your Account') . '</a></li> <li class="active">' . $this->transEsc('Checked Out Items') . '</li>'; diff --git a/themes/finc/templates/myresearch/edit.phtml b/themes/finc/templates/myresearch/edit.phtml index 71a923eaa55..0484ff434fb 100644 --- a/themes/finc/templates/myresearch/edit.phtml +++ b/themes/finc/templates/myresearch/edit.phtml @@ -3,7 +3,7 @@ <?php // Set up page title: - $this->headTitle($this->translate('Edit') . ' : ' . $this->driver->getBreadcrumb() . ' | ' . $this->translate("LibraryName")); + $this->headTitle($this->translate('Edit') . ' : ' . $this->driver->getBreadcrumb()); // Set up breadcrumbs: $this->layout()->breadcrumbs = '<li><a href="' . $this->url('myresearch-home') . '">' . $this->transEsc('Your Account') . '</a></li> <li class="active">' . $this->transEsc('Edit') . '</li>'; diff --git a/themes/finc/templates/myresearch/editlist.phtml b/themes/finc/templates/myresearch/editlist.phtml index 91994836d6b..929bb53ca80 100644 --- a/themes/finc/templates/myresearch/editlist.phtml +++ b/themes/finc/templates/myresearch/editlist.phtml @@ -4,7 +4,7 @@ <?php // Set up page title: $pageTitle = empty($this->list->id) ? 'Create a List' : "edit_list"; - $this->headTitle($this->translate($pageTitle) . ' | ' . $this->translate("LibraryName")); + $this->headTitle($this->translate($pageTitle)); // Set up breadcrumbs: $this->layout()->breadcrumbs = '<li><a href="' . $this->url('myresearch-home') . '">' . $this->transEsc('Your Account') . '</a></li>' diff --git a/themes/finc/templates/myresearch/fines.phtml b/themes/finc/templates/myresearch/fines.phtml index 2762ecb0504..a4054ab251f 100644 --- a/themes/finc/templates/myresearch/fines.phtml +++ b/themes/finc/templates/myresearch/fines.phtml @@ -1,7 +1,7 @@ <!-- finc: myresearch - fines --> <?php // Set up page title: - $this->headTitle($this->translate('My Fines') . ' | ' . $this->translate("LibraryName")); + $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>'; diff --git a/themes/finc/templates/myresearch/historicloans.phtml b/themes/finc/templates/myresearch/historicloans.phtml index 16cf3c34b27..44605abc8de 100644 --- a/themes/finc/templates/myresearch/historicloans.phtml +++ b/themes/finc/templates/myresearch/historicloans.phtml @@ -1,7 +1,7 @@ <!-- finc: myresearch - historicloans --> <?php // Set up page title: - $this->headTitle($this->translate('Loan History') . ' | ' . $this->translate("LibraryName")); + $this->headTitle($this->translate('Loan History')); // Set up breadcrumbs: $this->layout()->breadcrumbs = '<li><a href="' . $this->url('myresearch-home') . '">' . $this->transEsc('Your Account') . '</a></li> <li class="active">' . $this->transEsc('Loan History') . '</li>'; diff --git a/themes/finc/templates/myresearch/holds.phtml b/themes/finc/templates/myresearch/holds.phtml index 7131cf6092d..6b584c7355c 100644 --- a/themes/finc/templates/myresearch/holds.phtml +++ b/themes/finc/templates/myresearch/holds.phtml @@ -1,7 +1,7 @@ <!-- finc: myresearch - holds --> <?php // Set up page title: - $this->headTitle($this->translate('My Holds') . ' | ' . $this->translate("LibraryName")); + $this->headTitle($this->translate('My Holds')); // Set up breadcrumbs: $this->layout()->breadcrumbs = '<li><a href="' . $this->url('myresearch-home') . '">' . $this->transEsc('Your Account') . '</a></li> <li class="active">' . $this->transEsc('My Holds') . '</li>'; diff --git a/themes/finc/templates/myresearch/illrequests.phtml b/themes/finc/templates/myresearch/illrequests.phtml index 27320ac4a5b..6f87f860b07 100644 --- a/themes/finc/templates/myresearch/illrequests.phtml +++ b/themes/finc/templates/myresearch/illrequests.phtml @@ -1,7 +1,7 @@ <!-- finc: myresearch - illrequests --> <?php // Set up page title: - $this->headTitle($this->translate('Interlibrary Loan Requests') . ' | ' . $this->translate("LibraryName")); + $this->headTitle($this->translate('Interlibrary Loan Requests')); // Set up breadcrumbs: $this->layout()->breadcrumbs = '<li><a href="' . $this->url('myresearch-home') . '">' . $this->transEsc('Your Account') . '</a></li>' diff --git a/themes/finc/templates/myresearch/mylist.phtml b/themes/finc/templates/myresearch/mylist.phtml index f210befcf16..6354ae6aa1c 100644 --- a/themes/finc/templates/myresearch/mylist.phtml +++ b/themes/finc/templates/myresearch/mylist.phtml @@ -4,7 +4,7 @@ $list = $this->results->getListObject(); // Set up page title: -$this->headTitle(isset($list) ? $list->title : $this->translate('Favorites') . ' | ' . $this->translate("LibraryName")); +$this->headTitle(isset($list) ? $list->title : $this->translate('Favorites')); // Set up breadcrumbs: $currPage = isset($list) ? 'List' : 'Favorites'; diff --git a/themes/finc/templates/myresearch/newpassword.phtml b/themes/finc/templates/myresearch/newpassword.phtml index 713a5234ad4..b2102e7315a 100644 --- a/themes/finc/templates/myresearch/newpassword.phtml +++ b/themes/finc/templates/myresearch/newpassword.phtml @@ -1,7 +1,7 @@ <!-- finc - templates - myresearch - newpassword --> <?php // Set up page title: - $this->headTitle($this->translate('Create New Password') . ' | ' . $this->translate("LibraryName")); + $this->headTitle($this->translate('Create New Password')); // Set up breadcrumbs: $this->layout()->breadcrumbs = '<li><a href="' . $this->url('myresearch-home') . '">' . $this->transEsc('Your Account') . '</a></li>' diff --git a/themes/finc/templates/myresearch/profile.phtml b/themes/finc/templates/myresearch/profile.phtml index e3ad22b6eee..8360cd61d7b 100644 --- a/themes/finc/templates/myresearch/profile.phtml +++ b/themes/finc/templates/myresearch/profile.phtml @@ -1,7 +1,7 @@ <!-- finc: myresearch - profile --> <?php // Set up page title: - $this->headTitle($this->translate('My Profile') . ' | ' . $this->translate("LibraryName")); + $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>'; diff --git a/themes/finc/templates/myresearch/storageretrievalrequests.phtml b/themes/finc/templates/myresearch/storageretrievalrequests.phtml index 7b34bcd48b0..a7ec9c25346 100644 --- a/themes/finc/templates/myresearch/storageretrievalrequests.phtml +++ b/themes/finc/templates/myresearch/storageretrievalrequests.phtml @@ -1,7 +1,7 @@ <!-- finc: myresearch - storageretrievalrequests --> <?php // Set up page title: - $this->headTitle($this->translate('Storage Retrieval Requests') . ' | ' . $this->translate("LibraryName")); + $this->headTitle($this->translate('Storage Retrieval Requests')); // Set up breadcrumbs: $this->layout()->breadcrumbs = '<li><a href="' . $this->url('myresearch-home') . '">' . $this->transEsc('Your Account') . '</a></li> <li class="active">' . $this->transEsc('Storage Retrieval Requests') . '</li>'; diff --git a/themes/finc/templates/search/advanced/layout.phtml b/themes/finc/templates/search/advanced/layout.phtml index a4e70ff5492..350eabbcb32 100644 --- a/themes/finc/templates/search/advanced/layout.phtml +++ b/themes/finc/templates/search/advanced/layout.phtml @@ -1,7 +1,7 @@ <!-- finc: search - advanced - layout --> <?php // Set page title. -$this->headTitle($this->translate('Advanced Search') . ' | ' . $this->translate("LibraryName")); +$this->headTitle($this->translate('Advanced Search')); // Disable top search box -- this page has a special layout. $this->layout()->searchbox = false; diff --git a/themes/finc/templates/search/history.phtml b/themes/finc/templates/search/history.phtml index e5a71ac83b0..04a7ee298e0 100644 --- a/themes/finc/templates/search/history.phtml +++ b/themes/finc/templates/search/history.phtml @@ -1,7 +1,7 @@ <!-- finc - templates - search - history --> <?php // Set page title. - $this->headTitle($this->translate('Search History') . ' | ' . $this->translate("LibraryName")); + $this->headTitle($this->translate('Search History')); $loginEnabled = is_object($account = $this->auth()->getManager()) && $account->loginEnabled(); diff --git a/themes/finc/templates/search/home.phtml b/themes/finc/templates/search/home.phtml index 781d4415bfc..4fc8d20045f 100644 --- a/themes/finc/templates/search/home.phtml +++ b/themes/finc/templates/search/home.phtml @@ -1,7 +1,7 @@ <!-- finc: search - home --> <?php // Set page title. - $this->headTitle($this->translate('Search Home') . ' | ' . $this->translate("LibraryName")); + $this->headTitle($this->translate('Search Home')); // finc: disable top search box here if you want the old look, see also below // $this->layout()->searchbox = false; diff --git a/themes/finc/templates/search/results.phtml b/themes/finc/templates/search/results.phtml index 57048aa1343..de9ade6fd08 100644 --- a/themes/finc/templates/search/results.phtml +++ b/themes/finc/templates/search/results.phtml @@ -7,7 +7,7 @@ $lookfor = $this->results->getUrlQuery()->isQuerySuppressed() ? '' : $this->para if (isset($this->overrideTitle)) { $this->headTitle($this->overrideTitle); } else { - $this->headTitle($this->translate('Search Results') . (empty($lookfor) ? '' : " - {$lookfor}") . ' | ' . $this->translate("LibraryName")); + $this->headTitle($this->translate('Search Results') . (empty($lookfor) ? '' : " - {$lookfor}")); } // Set up search box: diff --git a/themes/finc/theme.config.php b/themes/finc/theme.config.php index 3896a57fa8b..c20700c8971 100644 --- a/themes/finc/theme.config.php +++ b/themes/finc/theme.config.php @@ -18,7 +18,6 @@ return [ 'recordLink' => 'finc\View\Helper\Root\RecordLink', 'record' => 'finc\View\Helper\Root\Record', 'flashmessages' => 'finc\View\Helper\Root\Flashmessages', - 'headTitle' => 'finc\View\Helper\Root\HeadTitle', 'externalLink' => 'finc\View\Helper\Root\ExternalLink', ], 'factories' => [ @@ -44,8 +43,6 @@ return [ 'VuFind\View\Helper\Root\ResultFeedFactory', 'finc\View\Helper\Root\Flashmessages' => 'VuFind\View\Helper\Root\FlashmessagesFactory', - 'finc\View\Helper\Root\HeadTitle' => - 'finc\View\Helper\Root\Factory::getHeadTitle', 'finc\View\Helper\Root\ExternalLink' => 'finc\View\Helper\Root\Factory::getExternalLink', ] -- GitLab