Skip to content
Snippets Groups Projects
Commit 1f8bd8d8 authored by Gregor Gawol's avatar Gregor Gawol Committed by Dorian Merz
Browse files

refs #14759 [fid_bbi] footer + sources list

* set footer
* set home facets to sources
* some VF5 adaptations
* re-uses facetlistAction()
parent 941e9329
No related merge requests found
......@@ -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]
......
......@@ -1874,6 +1874,9 @@ Other Originators = "Weitere Schöpfer"
Subject Actor = "Motiv"
Time of origin = "Entstehungszeit"
; #14759
Project Coordination = "Projektkoordination"
; #14758
Login = "Mein BBI"
......
......@@ -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"
......
......@@ -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);
......
<?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;
}
}
<?=$this->partial("content/$page.phtml", []) ?>
<? $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>
<!-- 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 -->
......@@ -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 -->
<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")?>&nbsp;...</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>
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment