diff --git a/fid_bbi/config/vufind/facets.ini b/fid_bbi/config/vufind/facets.ini index 29ccba2858b48ab2c42075d64c9f6bb47f88ee64..5a27c4cb68f7738f15f187c2ba5afb60e0c97124 100644 --- a/fid_bbi/config/vufind/facets.ini +++ b/fid_bbi/config/vufind/facets.ini @@ -47,7 +47,8 @@ collapsedFacets = language,finc_class_facet,author_facet,mega_collection topic_facet = "Related Subjects" [HomePage] -format = Medientyp +; use a single facet here +; see #14759 mega_collection = Datensammlung [Advanced] diff --git a/fid_bbi/languages/de.ini b/fid_bbi/languages/de.ini index 8a8ff3b1377c66041cff0a416b6e9bd2c7577ae8..a37b88236515a6e9d2399f74a368bcf0ab9a75c4 100644 --- a/fid_bbi/languages/de.ini +++ b/fid_bbi/languages/de.ini @@ -1874,6 +1874,9 @@ Other Originators = "Weitere Schöpfer" Subject Actor = "Motiv" Time of origin = "Entstehungszeit" +; #14759 +Project Coordination = "Projektkoordination" + ; #14758 Login = "Mein BBI" diff --git a/fid_bbi/languages/en.ini b/fid_bbi/languages/en.ini index bcdb215b5ce598ee69738bd9c31f7950d69e7a8f..f333db44618cd95b8959913338a9798fa6c0d2d5 100644 --- a/fid_bbi/languages/en.ini +++ b/fid_bbi/languages/en.ini @@ -1815,6 +1815,9 @@ Other Originators = "Other Originators" Subject Actor = "Subject Actor" Time of origin = "Time of origin" +; #14759 +Project Coordination = "Project Coordination" + ; #14758 Login = "My BBI" diff --git a/module/fid_bbi/config/module.config.php b/module/fid_bbi/config/module.config.php index 054e266e438a54b5f05243d6bc56000a49f9786d..35b99691e04be8937c8dc094d14f80b5a181b2e2 100644 --- a/module/fid_bbi/config/module.config.php +++ b/module/fid_bbi/config/module.config.php @@ -2,6 +2,15 @@ namespace fid_bbi\Module\Configuration; $config = [ + 'controllers' => [ + 'factories' => [ + 'fid_bbi\Controller\SearchController' => 'VuFind\Controller\AbstractBaseFactory', + ], + 'aliases' => [ + 'Search' => 'fid_bbi\Controller\SearchController', + 'search' => 'fid_bbi\Controller\SearchController', + ], + ], 'vufind' => [ 'plugin_managers' => [ 'recorddriver' => [ @@ -101,7 +110,8 @@ $staticRoutes = [ 'MyResearch/ResetPassword', 'dds/Home', 'dds/Email', - 'Record/EblLink' + 'Record/EblLink', + 'Search/Sources' ]; $routeGenerator = new \VuFind\Route\RouteGenerator($nonTabRecordActions); diff --git a/module/fid_bbi/src/fid_bbi/Controller/SearchController.php b/module/fid_bbi/src/fid_bbi/Controller/SearchController.php new file mode 100644 index 0000000000000000000000000000000000000000..522996bd261bb2b2236c4c67860d39238760d9ab --- /dev/null +++ b/module/fid_bbi/src/fid_bbi/Controller/SearchController.php @@ -0,0 +1,60 @@ +<?php +/** + * Default Controller + * + * PHP version 5 + * + * Copyright (C) Villanova University 2010. + * + * 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 Controller + * @author Demian Katz <demian.katz@villanova.edu> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org Main Site + */ +namespace fid_bbi\Controller; + +use VuFind\Controller\SearchController as BaseSearchController; +use Zend\ServiceManager\ServiceLocatorInterface; + +/** + * Redirects the user to the appropriate default VuFind action. + * + * @category VuFind + * @package Controller + * @author Demian Katz <demian.katz@villanova.edu> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org Main Site + */ +class SearchController extends BaseSearchController +{ + /** + * Home action + * + * @return mixed + */ + public function sourcesAction() + { + $facet = $this->params()->fromQuery('facet'); + if (empty($facet)) { + $homepageFacet = key($this->getConfig('facets')->HomePage->toArray()); + return $this->redirect()->toRoute('search-sources',[],['query'=>['facet'=>$homepageFacet]]); + } + $view = $this->facetListAction(); + $view->setTemplate('search/sources.phtml'); + return $view; + } +} diff --git a/themes/fid_bbi/templates/content/content.phtml b/themes/fid_bbi/templates/content/content.phtml new file mode 100644 index 0000000000000000000000000000000000000000..af1e589e56e745cb9e6e366e80ee500a8c4acffc --- /dev/null +++ b/themes/fid_bbi/templates/content/content.phtml @@ -0,0 +1 @@ +<?=$this->partial("content/$page.phtml", []) ?> diff --git a/themes/fid_bbi/templates/content/faq.phtml b/themes/fid_bbi/templates/content/faq.phtml new file mode 100644 index 0000000000000000000000000000000000000000..60bd0e069c58994a55478b6af73f6b5bf5be2f46 --- /dev/null +++ b/themes/fid_bbi/templates/content/faq.phtml @@ -0,0 +1,14 @@ +<? $this->headTitle($this->translate('FAQs')); ?> + +<h1><?=$this->transEsc('FAQs') ?></h1> + +<? if ($this->auth()->getManager()->supportsRecovery()): ?> + <p> + Q: How do I reset my password?<br/> + A: Go to the login screen and click the "Forgot password" link. Enter either your user name or email address, and you will get an email containing a link to reset your password. + </p> +<? endif; ?> +<p> + Q: Why does the service use cookies?<br/> + A: Cookies are used to manage sessions, which include selected language, last search, book bag contents, any login information, etc. +</p> diff --git a/themes/fid_bbi/templates/footer.phtml b/themes/fid_bbi/templates/footer.phtml new file mode 100644 index 0000000000000000000000000000000000000000..b0a588b181aadc865dd5d567999a551d5bf1d536 --- /dev/null +++ b/themes/fid_bbi/templates/footer.phtml @@ -0,0 +1,42 @@ +<!-- finc: footer --> +<footer class="hidden-print"> + <div class="footer-container"> + <div class="footer-column"> + <p><strong><?=$this->transEsc('Search Options')?></strong></p> + <ul> + <li><a href="<?=$this->url('search-advanced')?>"><?=$this->transEsc('Advanced Search')?></a></li> + <li><a href="<?=$this->url('search-sources')?>"><?=$this->transEsc('Datensammlung')?></a></li> + </ul> + </div> + <div class="footer-column"> + <p><strong><?=$this->transEsc('More Information')?></strong></p> + <ul> + <li><a href="<?=$this->url('content-page', ['page' => 'about'])?>"><?=$this->transEsc('About Us')?></a></li> + <li><a href="<?=$this->url('content-page', ['page' => 'faq'])?>"><?=$this->transEsc('FAQs')?></a></li> + <li><a href="<?=$this->url('content-page', ['page' => 'terms'])?>"><?=$this->transEsc('Terms of Use')?></a></li> + <li><a href="<?=$this->url('content-page', ['page' => 'privacy'])?>"><?=$this->transEsc('Privacy Policy')?></a></li> + </ul> + </div> + <div class="footer-column"> + <p><strong><?=$this->transEsc('Contact')?></strong></p> + <ul> + <p>N.N.<br/> + <?=$this->transEsc('Project Coordination')?><br/> + <?=$this->transEsc('Phone Number')?>: N.N.<br/> + <?=$this->transEsc('Email')?>: <a href="mailto:fid@hab.de">fid@hab.de</a></p> + </ul> + </div> + </div> + + <? /* finc branding footer */ ?> + <hr> + <div class="footer-container powered-by"> + <div class="footer-column"> + <?=$this->layout()->poweredBy?> + <span>Powered by</span> + <a href="https://vufind.org/" title="vufind.org" target="_blank"><img src="<?=$this->imageLink('vufind_logo.png')?>" alt="powered by VuFind - VuFind Logo"/></a> + <a href="http://blog.finc.info" title="Blog FinC-Team" target="_blank"><img src="<?=$this->imageLink('finc_logo.png')?>" alt="powered by finc - finc Logo"/></a> + </div> + </div> +</footer> +<!-- finc: Footer - END --> diff --git a/themes/fid_bbi/templates/search/home.phtml b/themes/fid_bbi/templates/search/home.phtml index 6b76cf46faed307fe92d56552167bffc5058eb03..108902f83b52ccc2ce954fffe91afe720f4ca6e4 100644 --- a/themes/fid_bbi/templates/search/home.phtml +++ b/themes/fid_bbi/templates/search/home.phtml @@ -16,18 +16,42 @@ $options = $this->searchOptions($this->searchClassId); $basicSearch = $options->getSearchAction(); $advSearch = $options->getAdvancedSearchAction(); +$this->layout()->breadcrumbs = false; ?> <div class="searchHomeContent"> - <? - /* fid_bbi searchbox: we use searchbox here so it becomes part of the sticky header, - we need to place this after the navbar-right for anything but mobile - see flex-container in SCSS:*/ - ?> - <div class="search-home flex-container"> - <nav class="searchbox-home hidden-print"> - <?=$this->render('search/searchbox.phtml')?> - </nav> - </div> - <? /* fid_bbi searchbox - END */ ?> + <? + /* fid_bbi searchbox: we use searchbox here so it becomes part of the sticky header, + we need to place this after the navbar-right for anything but mobile - see flex-container in SCSS:*/ + ?> + <div class="search-home flex-container"> + <nav class="searchbox-home hidden-print"> + <?=$this->render('search/searchbox.phtml')?> + </nav> + </div> + <? /* fid_bbi searchbox - END */ ?> + <? /* finc-specific: #7187@89bb6e70; VF moved the original BS code to a separate template: helpers - ils-offline.phtml - CK */ ?> + <? + $ilsStatusScript = <<<JS + $(document).ready(function() { + $.ajax({ + dataType: 'json', + method: 'GET', + data: {'offlineModeMsg':'ils_offline_home_message'}, + url: VuFind.path + '/AJAX/JSON?method=getIlsStatus', + success: function(response) { + $('.searchHomeContent').prepend(response.data); + } + }); + }); +JS; + ?> + <? /* finc-specific: #7187 - END */ ?> + <?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, $ilsStatusScript, 'SET');?> + + <? /* finc: Activate search box here if you want the old look -- otherwise we keep the consisten look with searchbox in header */ ?> + <? /* =$this->context($this)->renderInContext("search/searchbox.phtml", ['ignoreHiddenFilterMemory' => true])?> + <?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, '$("#searchForm_lookfor").focus();', 'SET'); */ ?> </div> -<!-- fid_bbi: search - home - END --> + +<!-- finc: search - home - END --> diff --git a/themes/fid_bbi/templates/search/sources.phtml b/themes/fid_bbi/templates/search/sources.phtml new file mode 100644 index 0000000000000000000000000000000000000000..57237cc2303b39e24bb8c55df0368fe70840db76 --- /dev/null +++ b/themes/fid_bbi/templates/search/sources.phtml @@ -0,0 +1,71 @@ +<div class="searchHomeContent"> + <div class="search-home-facets"> + + <? if (isset($this->hierarchicalFacets) && in_array($facet, $this->hierarchicalFacets)): ?> + <? $this->headScript()->appendFile('vendor/jsTree/jstree.min.js'); ?> + <? $this->headScript()->appendFile('facets.js'); ?> + <? $sort = isset($this->hierarchicalFacetSortOptions[$facet]) ? $this->hierarchicalFacetSortOptions[$facet] : ''; ?> + <? + $script = <<<JS +$(document).ready(function() { + initFacetTree($('#facet_{$this->escapeHtml($facet)}'), false); +}); +JS; + ?> + <?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, $script, 'SET');?> + <div class="home-facet <?=$this->escapeHtmlAttr($facet)?>"> + <h2><?=$this->transEsc('home_browse') . ' ' . $this->transEsc($facetLabel)?></h2> + <div id="facet_<?=$this->escapeHtml($facet)?>" class="jstree-facet" + data-facet="<?=$this->escapeHtml($facet)?>" + data-path="<?=$this->url($basicSearch)?>" + data-exclude="0" + data-operator="AND" + data-exclude-title="<?=$this->transEsc('exclude_facet')?>" + data-sort="all"> + </div> + </div> + <noscript> + <? endif; ?> + <? $sortedList = $this->sortFacetList($results, $facet, $data, 'search-results'); ?> + <div class="home-facet <?=$this->escapeHtmlAttr($facet)?>"> + <h2><?=$this->transEsc('home_browse') . ' ' . $this->transEsc($facetLabel)?></h2> + <div class="home-facet-container"> + <ul class="home-facet-list"> + <? /* Special case: two columns for LC call numbers... */ ?> + <? if ($facet == "callnumber-first"): ?> + <? $i = 0; + foreach ($sortedList + + as $url => $value): ?> + <? if (!empty($value)): ?> + <li><a href="<?=$url?>"><?=$this->escapeHtml($value)?></a></li> + <? else: $i--; ?> + <? endif; ?> + <? if (++$i == 10): ?> + </ul> + <ul class="home-facet-list"> + <? endif; ?> + <? endforeach; ?> + <? /* Special case: collections */ ?> + <? elseif ($facet == 'hierarchy_top_title'): ?> + <? $i = 0; + foreach ($sortedList as $url => $value): ?> + <? if (++$i > 10): ?> + <li><a href="<?=$this->url('collections-home')?>"><strong><?=$this->transEsc("More options")?> ...</strong></a></li> + <? break; ?> + <? endif; ?> + <li><a href="<?=$this->url('collections-bytitle')?>?title=<?=urlencode($value)?>"><?=$this->escapeHtml($value)?></a></li> + <? endforeach; ?> + <? else: ?> + <? foreach ($sortedList as $url => $value): ?> + <li><a href="<?=$url?>"><?=$this->escapeHtml($value)?></a></li> + <? endforeach; ?> + <? endif; ?> + </ul> + </div> + </div> + <? if (isset($this->hierarchicalFacets) && in_array($facet, $this->hierarchicalFacets)): ?> + </noscript> + <? endif; ?> + </div> +</div>