diff --git a/fid_bbi/alpha/config/vufind/config.ini b/fid_bbi/alpha/config/vufind/config.ini index 2a210df6b566baf683c4e363b505b54db2e99386..9c5eb7a9dd7e640808d7832f3453f1ca03a430ad 100644 --- a/fid_bbi/alpha/config/vufind/config.ini +++ b/fid_bbi/alpha/config/vufind/config.ini @@ -38,3 +38,7 @@ url = "https://alpha.finc.info/vufind2/fid_bbi" [Database] database = "mysql://vufind_fidbbi:i3lIPQTBmbSGmzipQHjOPrzmUfUuiDiA@localhost/vufind_fidbbi" + +[Authentication] +; #14758 test login button +hideLogin = false diff --git a/fid_bbi/languages/de.ini b/fid_bbi/languages/de.ini index 2af71097ddb028e5ff0033773eb19f9221ec3ce0..03d48561dc2c4f6baec535a4845c00d87c95ca10 100644 --- a/fid_bbi/languages/de.ini +++ b/fid_bbi/languages/de.ini @@ -1873,3 +1873,6 @@ Other ID = "Weitere Identifier" Other Originators = "Weitere Schöpfer" Subject Actor = "Motiv" Time of origin = "Entstehungszeit" + +; #14758 +Login = "Mein BBI" \ No newline at end of file diff --git a/fid_bbi/languages/en.ini b/fid_bbi/languages/en.ini index 02e5c987d2b7cf23d8f3b0c2fd0edf7b1c30a8b3..9f3d7781855f5a01847713cee7ac5898f9bbe64b 100644 --- a/fid_bbi/languages/en.ini +++ b/fid_bbi/languages/en.ini @@ -1813,4 +1813,7 @@ Originators = "Originators" Other ID = "Other ID" Other Originators = "Other Originators" Subject Actor = "Subject Actor" -Time of origin = "Time of origin" \ No newline at end of file +Time of origin = "Time of origin" + +; #14758 +Login = "My BBI" diff --git a/themes/fid_bbi/scss/compiled.scss b/themes/fid_bbi/scss/compiled.scss index 3d6a51996f7b698d4ade398c788e7a8646c2dc90..b9e55596f51a11fd1565ef5eb18ce6967070030c 100644 --- a/themes/fid_bbi/scss/compiled.scss +++ b/themes/fid_bbi/scss/compiled.scss @@ -2,7 +2,53 @@ @import 'customMixins'; @import '../../finc/scss/compiled'; +// Header +.navbar { + min-height: 95px; +} + +.searchHomeContent { + min-height: 15em; + display: flex; + align-items: center; + justify-content: center; +} + +#header-collapse { + flex: 1 1; +} + +.breadcrumb { + padding-top: 20px; +} + +.breadcrumb > li + li::before { + content: ""; + padding: 0 5px; + color: #fff; +} + .searchtools { display: block; margin: 0 0 1em 0; -} \ No newline at end of file +} + +.search-home { + display: block; + margin-left: auto; + margin-right: auto; + width: 50%; + //padding-top: 7em; +} + +.searchbox-home { + position: absolute; + padding-left: 12em; + //padding-top: 2em; +} + +.searchbox { + position: absolute; + padding-left: 50em; + padding-top: 3em; +} diff --git a/themes/fid_bbi/templates/header.phtml b/themes/fid_bbi/templates/header.phtml new file mode 100644 index 0000000000000000000000000000000000000000..d864ea08e760728d7e4876275cca3050fb181015 --- /dev/null +++ b/themes/fid_bbi/templates/header.phtml @@ -0,0 +1,104 @@ +<!-- finc: header --> +<? $account = $this->auth()->getManager(); ?> +<? /* This navbar is the sticky element in the header - CK; you can use 'affix' as an alternative to 'navbar-fixed-top' like so: + <div data-spy="affix" data-offset-top="1" class="navbar"> + Do not use 'navbar-fixed-top' and 'affix' at the same time. When using 'affix', set the variables for + '$navbar-height', '$navbar-height-xs' and '$navbar-height-sm' in _customVariables.scss to '=0' + or set the paddings-top under 'body' in compiled.scss to '=0' + */ ?> +<div class="banner container navbar navbar-fixed-top"> + <? /* This element only holds the mobile toggler and the navbar-brand/library name - CK */ ?> + <div class="navbar-header"> + <? /* mobile navigation toggler - CK */ ?> + <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#header-collapse"> + <span class="sr-only">Toggle navigation</span> + <i class="fa fa-bars" aria-hidden="true"></i> + </button> + + <h1> + <a class="navbar-brand lang-<?=$this->layout()->userLang?>" href="<?=$this->url('home')?>"> + <? /* Custom finc header - CK*/ ?> + <span class="hidden-sm hidden-md hidden-lg"><?=$this->transEsc("LibraryName")?></span> + <img src="<?=$this->imageLink('headerlogo.png')?>" class="hidden-xs" alt="Logo <?=$this->transEsc("LibraryName")?>" title="<?=$this->transEsc("LibraryName")?>"> + <? /* Custom finc header - END */ ?> + </a> + </h1> + </div> + + <div class="flex-container"> + <? if (!isset($this->layout()->renderingError)): ?> + <div class="collapse navbar-collapse right" id="header-collapse"> + <? /* finc: right-hand navbar section - see flex-container in SCSS: + we need this order on XS: navbar-right searchbox + but reverse it on anything but mobile */ ?> + <nav> + <ul class="nav navbar-nav navbar-right flip"> + <? if ($this->feedback()->tabEnabled()): ?> + <li> + <a id="feedbackLink" data-lightbox class="btn" href="<?=$this->url('feedback-home')?>"> <i class="fa fa-envelope" aria-hidden="true"></i> + <span class="hidden-sm"><?=$this->transEsc("Feedback")?></span> + </a> + </li> + <? endif; ?> + <? $cart = $this->cart(); + if ($cart->isActive()): ?> + <li id="cartSummary"> + <a id="cartItems" class="btn" data-lightbox title="<?=$this->transEsc('View Book Bag')?>" href="<?=$this->url('cart-home')?>"> + <i class="fa fa-clipboard" aria-hidden="true"></i> <strong><?=count($cart->getItems())?></strong> <span class="cart-label"><?=$this->transEsc('items')?></span> + <span class="hidden-sm full<?=!$cart->isFull() ? ' hidden' : ''?>">(<?=$this->transEsc('bookbag_full')?>)</span> + </a> + </li> + <? endif; ?> + + <? if (isset($this->layout()->themeOptions) && count($this->layout()->themeOptions) > 1): ?> + <li class="theme dropdown"> + <form method="post" name="themeForm" id="themeForm"> + <input type="hidden" name="ui"/> + </form> + <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?=$this->transEsc("Theme")?> <strong class="caret"></strong></a> + + <ul class="dropdown-menu"> + <? foreach ($this->layout()->themeOptions as $current): ?> + <li<?=$current['selected'] ? ' class="active"' : ''?>> + <a href="#" onClick="document.themeForm.ui.value='<?=$this->escapeHtmlAttr($current['name'])?>';document.themeForm.submit()"><?=$this->transEsc($current['desc'])?></a> + </li> + <? endforeach; ?> + </ul> + </li> + <? endif; ?> + + <? if (isset($this->layout()->allLangs) && count($this->layout()->allLangs) > 1): ?> + <li class="language dropdown"> + <form method="post" name="langForm" id="langForm"> + <input type="hidden" name="mylang"/> + </form> + <a href="#" class="btn dropdown-toggle hidden-xs hidden-sm" data-toggle="dropdown" aria-controls="langmenu" aria-expanded="false"> + <?=$this->transEsc("Language")?> <strong class="caret"></strong> + </a> + <ul id="langmenu" class="dropdown-menu"> + <? foreach ($this->layout()->allLangs as $langCode => $langName): ?> + <li<?=$this->layout()->userLang == $langCode ? ' class="active"' : ''?>> + <a class="btn" href="#" onClick="document.langForm.mylang.value='<?=$langCode?>';document.langForm.submit()"><?=$this->displayLanguageOption($langName)?></a> + </li> + <? endforeach; ?> + </ul> + </li> + <? endif; ?> + </ul> + </nav> + </div> + <? endif; ?> + <? /* finc 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:*/ ?> + <? if ($this->layout()->searchbox !== false): ?> + <div class="search container left"> + <nav class="nav searchbox hidden-print"> + <?=$this->layout()->searchbox?> + </nav> + </div> + <? endif; ?> + <? /* finc searchbox - END */ ?> + </div> +</div> +<? /* If you want to use searchbox in a separate row, insert it here as in bootstrap theme - CK */ ?> +<!-- finc: header - END --> diff --git a/themes/fid_bbi/templates/layout/layout.phtml b/themes/fid_bbi/templates/layout/layout.phtml new file mode 100644 index 0000000000000000000000000000000000000000..ec798a4452eabe8e717ea35f3bcd921b71749f42 --- /dev/null +++ b/themes/fid_bbi/templates/layout/layout.phtml @@ -0,0 +1,230 @@ +<?=$this->doctype('HTML5')?> +<html lang="<?=$this->layout()->userLang?>"> +<head> + <? $this->headThemeResources() ?> + <? /* remove meta because of W3C Validator error - CK */ + /* <meta charset="utf-8"> */ + ?> + <meta http-equiv="X-UA-Compatible" content="IE=edge"/> + <meta name="viewport" content="width=device-width,initial-scale=1.0"/> + <?=$this->headMeta()?> + <?=$this->headTitle()?> + <? + // Set up OpenSearch link: + $this->headLink( + [ + 'href' => $this->url('search-opensearch') . '?method=describe', + 'type' => 'application/opensearchdescription+xml', + 'title' => $this->transEsc('Library Catalog Search'), + 'rel' => 'search' + ] + ); + $account = $this->auth()->getManager(); + ?> + <!-- RTL styling --> + <? if ($this->layout()->rtl) { + $this->headLink()->appendStylesheet('vendor/bootstrap-rtl.min.css'); + } ?> + <?=$this->headLink()?> + <?=$this->headStyle()?> + <? + if (!isset($this->renderingError)) { + // Add translation strings + // PDA (BELOW) is a custom finc string - CK + $this->jsTranslations()->addStrings( + [ + 'pda_send_success' => 'PDA::pda_send_success', + 'add_tag_success' => 'add_tag_success', + 'bulk_email_success' => 'bulk_email_success', + 'bulk_noitems_advice' => 'bulk_noitems_advice', + 'bulk_save_success' => 'bulk_save_success', + 'close' => 'close', + 'collection_empty' => 'collection_empty', + 'error_occurred' => 'An error has occurred', + 'go_to_list' => 'go_to_list', + 'libphonenumber_invalid' => 'libphonenumber_invalid', + 'libphonenumber_invalidcountry' => 'libphonenumber_invalidcountry', + 'libphonenumber_invalidregion' => 'libphonenumber_invalidregion', + 'libphonenumber_notanumber' => 'libphonenumber_notanumber', + 'libphonenumber_toolong' => 'libphonenumber_toolong', + 'libphonenumber_tooshort' => 'libphonenumber_tooshort', + 'libphonenumber_tooshortidd' => 'libphonenumber_tooshortidd', + 'loading' => 'Loading', + 'more' => 'more', + 'number_thousands_separator' => [ + 'number_thousands_separator', null, ',' + ], + 'sms_success' => 'sms_success' + ] + ); + // Add libphonenumber.js strings + $this->jsTranslations()->addStrings( + [ + "Phone number invalid" => 'libphonenumber_invalid', + "Invalid country calling code" => 'libphonenumber_invalidcountry', + "Invalid region code" => 'libphonenumber_invalidregion', + "The string supplied did not seem to be a phone number" => 'libphonenumber_notanumber', + "The string supplied is too long to be a phone number" => 'libphonenumber_toolong', + "The string supplied is too short to be a phone number" => 'libphonenumber_tooshort', + "Phone number too short after IDD" => 'libphonenumber_tooshortidd' + ] + ); + // Deal with cart stuff: + $cart = $this->cart(); + if ($cart->isActive()) { + $this->headScript()->appendFile("vendor/cookies.js"); + $this->headScript()->appendFile("cart.js"); + $domain = $cart->getCookieDomain(); + if (!empty($domain)) { + $this->headScript()->appendScript( + 'VuFind.cart.setDomain("' . $domain . '");' + ); + } + $cookiePath = $cart->getCookiePath(); + if (!empty($cookiePath)) { + $this->headScript()->appendScript( + 'VuFind.cart.setCookiePath("' . $cookiePath . '");' + ); + } + $this->jsTranslations()->addStrings( + [ + 'addBookBag' => 'Add to Book Bag', + 'bookbagFull' => 'bookbag_full_msg', + 'bookbagMax' => $cart->getMaxSize(), + 'bookbagStatusFull' => 'bookbag_full', + 'confirmDelete' => 'confirm_delete', + 'confirmEmpty' => 'bookbag_confirm_empty', + 'itemsAddBag' => 'items_added_to_bookbag', + 'itemsInBag' => 'items_already_in_bookbag', + 'removeBookBag' => 'Remove from Book Bag', + 'viewBookBag' => 'View Book Bag' + ] + ); + } + $this->headScript()->appendScript( + 'var userIsLoggedIn = ' . ($this->auth()->isLoggedIn() ? 'true' : 'false') . ';' + ); + } + + // Session keep-alive + if ($this->KeepAlive()) { + $this->headScript()->appendScript('var keepAliveInterval = ' + . $this->KeepAlive()); + $this->headScript()->appendFile("keep_alive.js"); + } + ?> + <? + $root = rtrim($this->url('home'), '/'); + $translations = $this->jsTranslations()->getJSON(); + $dsb = DEFAULT_SEARCH_BACKEND; + $setupJS = <<<JS +VuFind.path = '{$root}'; +VuFind.defaultSearchBackend = '{$dsb}'; +VuFind.addTranslations({$translations}); +JS; + $this->headScript()->appendScript($setupJS); + ?> + <?=$this->headScript()?> +</head> +<body class="template-dir-<?=$this->templateDir?> template-name-<?=$this->templateName?> <?=$this->layoutClass('offcanvas-row')?><? if ($this->layout()->rtl): ?> rtl<? endif; ?>"> +<? // Set up the search box -- there are three possible cases: +// 1. No search box was set; we should default to the normal box +// 2. It was set to false; we should display nothing +// 3. It is set to a custom string; we should display the provided version +// Set up default search box if no data was provided from the template; +// this covers case 1. Cases 2 and 3 are then covered by logic below. +if (!isset($this->layout()->searchbox)) { + $this->layout()->searchbox = $this->render('search/searchbox.phtml'); +} +?> +<? if (isset($this->layout()->srmessage)): // message for benefit of screen-reader users ?> + <span class="sr-only"><?=$this->layout()->srmessage?></span> +<? endif; ?> +<a class="sr-only" href="#searchslots"><?=$this->transEsc('Skip to search')?></a> +<a class="sr-only" href="#content"><?=$this->transEsc('Skip to content')?></a> + +<? /* Start header here, not above, custom finc, CK */ ?> +<header class="hidden-print"> + <?=$this->render('header.phtml')?> +</header> +<nav class="breadcrumbs"> + <? /* finc: Don't use .container here or the breadcrumbs will get a left+right padding - CK */ ?> + <ul class="breadcrumb large-centered hidden-xs hidden-print"> + <? if (is_object($account) && $account->loginEnabled()): // hide login/logout if unavailable ?> + <li class="left logoutOptions<? if (!$account->isLoggedIn()): ?> hidden<? endif ?>"> + <a class="btn" href="<?=$this->url('myresearch-home', array(), array('query' => array('redirect' => 0)))?>"> + <i class="fa fa-home" aria-hidden="true"></i> + <span class="hidden-sm"><?=$this->transEsc("Your Account")?></span> + </a> + </li> + + <li class="left logoutOptions<? if (!$account->isLoggedIn()): ?> hidden<? endif ?>"> + <a href="<?=$this->url('myresearch-logout')?>" class="logout btn" title="<?=$this->transEsc("Log Out")?>"> + <i class="fa fa-sign-out" aria-hidden="true"></i> + <span class="hidden-sm"><?=$this->transEsc("Log Out")?></span> + </a> + </li> + + <li id="loginOptions"<? if ($account->isLoggedIn()): ?> class="left hidden"<? endif ?>> + <? if ($account->getSessionInitiator($this->serverUrl($this->url('myresearch-home')))): ?> + <a class="btn" href="<?=$this->url('myresearch-userlogin')?>"> + <i class="fa fa-sign-in" aria-hidden="true"></i> + <span class="hidden-sm"><?=$this->transEsc("Institutional Login")?></span> + </a> + <? else: ?> + <a class="btn" href="<?=$this->url('myresearch-userlogin')?>" data-lightbox> + <i class="fa fa-sign-in" aria-hidden="true"></i> + <span class="hidden-sm"><?=$this->transEsc("Login")?></span> + </a> + <? endif; ?> + </li> + <? endif; ?> + <li class="right"> + <a class="btn" href="<?=$this->url('home')?>"> + <?=$this->transEsc("Home")?> + </a> + </li> + </ul> +</nav> +<div role="main" class="main"> + <div id="content" class="container"> + <?=$this->layout()->content?> + </div> +</div> + +<?=$this->render('footer.phtml')?> + + +<!-- MODAL IN CASE WE NEED ONE --> +<? /* remove aria-hidden attr via JS, move X button to logical pos. in structure + make accessible via tab */ ?> +<div id="modal" class="modal fade hidden-print" tabindex="-1" role="dialog" aria-modal="true" aria-labelledby="modalTitle" aria-hidden="true"> + <div class="modal-dialog"> + <div class="modal-content"> + <div class="modal-body"><?=$this->transEsc('Loading')?> ...</div> + <button type="button" class="close" data-dismiss="modal" tabindex="0"> + <span class="sr-only"><?=$this->transEsc('Close')?></span> + <i class="fa fa-times" aria-hidden="true"></i> + </button> + </div> + </div> +</div> + +<div class="offcanvas-toggle" data-toggle="offcanvas" tabindex="0"> + <i class="fa" title="<?=$this->transEsc('sidebar_expand')?>"></i> + <span class="sr-only"><?=$this->transEsc('sidebar_expand')?></span> +</div> + +<div class="offcanvas-overlay" data-toggle="offcanvas"></div> +<?=$this->googleanalytics()?> +<?=$this->piwik()?> +<? if ($this->recaptcha()->active()): ?> + <?=$this->inlineScript(\Zend\View\Helper\HeadScript::FILE, "https://www.google.com/recaptcha/api.js?onload=recaptchaOnLoad&render=explicit&hl=" . $this->layout()->userLang, 'SET')?> +<? endif; ?> +<? /* Enable Tooltips, finc-specific, CK */ ?> +<script type="text/javascript"> + $(document).ready(function () { + $("body").tooltip({selector: '[data-toggle=tooltip]'}); + }); +</script> +</body> +</html> diff --git a/themes/fid_bbi/templates/search/home.phtml b/themes/fid_bbi/templates/search/home.phtml new file mode 100644 index 0000000000000000000000000000000000000000..6b76cf46faed307fe92d56552167bffc5058eb03 --- /dev/null +++ b/themes/fid_bbi/templates/search/home.phtml @@ -0,0 +1,33 @@ +<!-- fid_bbi: search - home --> +<? +// Set page title. +$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; + +// Set default value if necessary: +if (!isset($this->searchClassId)) { + $this->searchClassId = 'Solr'; +} + +// Load search actions and settings (if any): +$options = $this->searchOptions($this->searchClassId); +$basicSearch = $options->getSearchAction(); +$advSearch = $options->getAdvancedSearchAction(); + +?> + +<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 */ ?> +</div> +<!-- fid_bbi: search - home - END --> diff --git a/themes/fid_bbi/templates/search/searchbox.phtml b/themes/fid_bbi/templates/search/searchbox.phtml new file mode 100644 index 0000000000000000000000000000000000000000..995f4354d2056c8da4438ec31eb6c10a05ceb37e --- /dev/null +++ b/themes/fid_bbi/templates/search/searchbox.phtml @@ -0,0 +1,148 @@ +<!-- finc: search - searchbox --> +<? +// Set default value if necessary: +if (!isset($this->searchClassId)) { + $this->searchClassId = 'Solr'; +} + +// Load search actions and settings (if any): +$options = $this->searchOptions($this->searchClassId); +$handlers = $this->searchbox()->getHandlers( + $this->searchClassId, + isset($this->searchIndex) ? $this->searchIndex : null +); +$handlerCount = count($handlers); +$basicSearch = $this->searchbox()->combinedHandlersActive() ? 'combined-searchbox' : $options->getSearchAction(); +$searchHome = $options->getSearchHomeAction(); +$advSearch = $options->getAdvancedSearchAction(); +$lastSort = $this->searchMemory()->getLastSort($this->searchClassId); +$lastLimit = $this->searchMemory()->getLastLimit($this->searchClassId); +$ignoreHiddenFilterMemory = isset($this->ignoreHiddenFilterMemory) && $this->ignoreHiddenFilterMemory; +$ignoreHiddenFiltersInRequest = isset($this->ignoreHiddenFiltersInRequest) && $this->ignoreHiddenFiltersInRequest; +$hiddenFilters = $this->searchtabs()->getHiddenFilters($this->searchClassId, $ignoreHiddenFilterMemory, $ignoreHiddenFiltersInRequest); +if (empty($hiddenFilters) && !$ignoreHiddenFilterMemory) { + $hiddenFilters = $this->searchMemory()->getLastHiddenFilters($this->searchClassId); + if (empty($hiddenFilters)) { + $hiddenFilters = $this->searchtabs()->getHiddenFilters($this->searchClassId); + } +} +$hiddenFilterParams = $this->searchtabs()->getCurrentHiddenFilterParams($this->searchClassId, $ignoreHiddenFilterMemory, '?'); +?> +<? $searchTabs = $this->searchtabs()->getTabConfig($this->searchClassId, $this->lookfor, $this->searchIndex, $this->searchType, $hiddenFilters); ?> +<? if ($this->searchType == 'advanced'): ?> + <? /* finc: keep .no-margin-t or advanced search box will be pushed down too far (navbar-form) */ ?> + <div class="navbar-left flip no-margin-t"> + <? $tabs = $this->context($this)->renderInContext('search/searchTabs', ['searchTabs' => $searchTabs['tabs']]); ?> + <? if (!empty($tabs)): ?><?=$tabs?> + <div class="tab-content clearfix no-gutter-all"><? endif; ?> + <p class="adv_search_terms"><?=$this->transEsc("Your search terms")?> : "<strong><?=$this->escapeHtml($this->lookfor)?></strong>"</p> + <? /* finc: we use an ul li list, CK */ ?> + <ul class="adv_search_links"> + <li><a href="<?=$this->url($advSearch)?>?edit=<?=$this->escapeHtmlAttr($this->searchId)?>"><?=$this->transEsc("Edit this Advanced Search")?></a></li> + <li><a href="<?=$this->url($advSearch) . $hiddenFilterParams?>"><?=$this->transEsc("Start a new Advanced Search")?></a></li> + <li><a href="<?=$this->url($searchHome) . $hiddenFilterParams?>"><?=$this->transEsc("Start a new Basic Search")?></a></li> + </ul> + <? if (!empty($tabs)): ?></div><? endif; ?> + </div> +<? else: ?> + <form id="searchForm" class="searchForm navbar-form navbar-left flip" role="search" method="get" action="<?=$this->url($basicSearch)?>" name="searchForm" autocomplete="off"> + <?=$this->context($this)->renderInContext('search/searchTabs', ['searchTabs' => $searchTabs['tabs']]);?> + <? $placeholder = $this->searchbox()->getPlaceholderText(isset($searchTabs['selected']['id']) ? $searchTabs['selected']['id'] : null); ?> + <? /* finc: We use a list here, CK */ ?> + <ul class="navbar-left list-unstyled"> + <li> + <? /* finc: we use required='required', CK */ ?> + <input id="searchForm_lookfor" + class="searchForm_lookfor form-control search-query<? if ($this->searchbox()->autocompleteEnabled($this->searchClassId)): ?> autocomplete searcher:<?=$this->escapeHtmlAttr($this->searchClassId)?><? endif ?>" + type="text" name="lookfor" value="<?=$this->escapeHtmlAttr($this->lookfor)?>"<? if ($placeholder): ?> placeholder="<?=$this->transEsc($placeholder)?>"<? endif ?> required="required"/> + </li> + <?/* if ($handlerCount > 1): ?> + <li class="hidden-xs"> + <select id="searchForm_type" class="searchForm_type form-control" name="type" data-native-menu="false"> + <? foreach ($handlers as $handler): ?> + <option + value="<?=$this->escapeHtmlAttr($handler['value'])?>"<?=$handler['selected'] ? ' selected="selected"' : ''?>><?=$handler['indent'] ? '-- ' : ''?><?=$this->transEsc($handler['label'])?></option> + <? endforeach; ?> + </select> + </li> + <? elseif ($handlerCount == 1): ?> + <input type="hidden" name="type" value="<?=$this->escapeHtmlAttr($handlers[0]['value'])?>"/> + <? endif;*/ ?> + <li> + <button type="submit" class="btn btn-primary"><i class="fa fa-search" aria-hidden="true"></i> <span class="find-label"><?/*=$this->transEsc("Find")*/?></span></button> + </li> + <? /*if ($advSearch): ?> + <li class="hidden-xs"> + <a href="<?=$this->url($advSearch) . ((isset($this->searchId) && $this->searchId) ? '?edit=' . $this->escapeHtmlAttr($this->searchId) : $hiddenFilterParams)?>" class="btn btn-transparent" + role="button" rel="nofollow"><i class="fa fa-cog"></i> <span class="hidden-xs hidden-sm hidden-md"><?=$this->transEsc("Advanced")?></span></a> + </li> + <? endif;*/ ?> + <li> + <? if ($geoUrl = $this->geocoords()->getSearchUrl($options)) : ?> + <a href="<?=$geoUrl?>" class="btn btn-link"><?=$this->transEsc('Geographic Search')?></a> + <? endif; ?> + </li> + </ul> + + <? /* finc: We hide this for small and keep the solution using labels, same below - CK */ ?> + <div class="checkbox hidden-xs"> + <? $shards = $options->getShards(); + if ($options->showShardCheckboxes() && !empty($shards)): ?> + <? + $selectedShards = isset($this->selectedShards) + ? $this->selectedShards : $options->getDefaultSelectedShards(); + ?> + <? foreach ($shards as $shard => $val): ?> + <? $isSelected = empty($selectedShards) || in_array($shard, $selectedShards); ?> + <input type="checkbox" <?=$isSelected ? 'checked="checked" ' : ''?>name="shard[]" value='<?=$this->escapeHtmlAttr($shard)?>' id='checkbox_<?=$this->escapeHtmlAttr($shard)?>'/> <label for="checkbox_<?=$this->escapeHtmlAttr($shard)?>"><?=$this->transEsc($shard)?></label> + <? endforeach; ?> + <? endif; ?> + </div> + + <? + $filterDetails = $this->searchbox()->getFilterDetails( + isset($this->filterList) && is_array($this->filterList) ? $this->filterList : [], + isset($this->checkboxFilters) && is_array($this->checkboxFilters) ? $this->checkboxFilters : [] + ); + ?> + <? if ((isset($hasDefaultsApplied) && $hasDefaultsApplied) || !empty($filterDetails)): ?> + <? $defaultFilterState = $options->getRetainFilterSetting() ? ' checked="checked"' : ''; ?> + <div class="checkbox"> + <input type="checkbox"<?=$defaultFilterState?> class="searchFormKeepFilters" id="keepfilters"> + <label for="keepfilters"> + <?=$this->transEsc("basic_search_keep_filters")?> + </label> + </div> + <div class="hidden"> + <? foreach ($filterDetails as $current): ?> + <input class="applied-filter" id="<?=$this->escapeHtmlAttr($current['id'])?>" type="checkbox"<?=$defaultFilterState?> name="filter[]" value="<?=$this->escapeHtmlAttr($current['value'])?>"/> + <label for="<?=$this->escapeHtmlAttr($current['id'])?>"><?=$this->escapeHtml($current['value'])?></label> + <? endforeach; ?> + <? if (isset($hasDefaultsApplied) && $hasDefaultsApplied): ?> + <!-- this is a hidden element that flags whether or not default filters have been applied; + it is intentionally unlabeled, as users are not meant to manipulate it directly. --> + <input class="applied-filter" id="dfApplied" type="checkbox" name="dfApplied" value="1"<?=$defaultFilterState?> /> + <? endif; ?> + </div> + <? endif; ?> + <? foreach ($hiddenFilters as $key => $filter): ?> + <? foreach ($filter as $value): ?> + <input type="hidden" name="hiddenFilters[]" value="<?=$this->escapeHtmlAttr($key) . ':' . $this->escapeHtmlAttr($value)?>"/> + <? endforeach; ?> + <? endforeach; ?> + <? + /* Show hidden field for active search class when in combined handler mode. */ + if ($this->searchbox()->combinedHandlersActive()) { + echo '<input type="hidden" name="activeSearchClassId" value="' . $this->escapeHtmlAttr($this->searchClassId) . '" />'; + } + /* Load hidden limit preference from Session */ + if (!empty($lastLimit)) { + echo '<input type="hidden" name="limit" value="' . $this->escapeHtmlAttr($lastLimit) . '" />'; + } + if (!empty($lastSort)) { + echo '<input type="hidden" name="sort" value="' . $this->escapeHtmlAttr($lastSort) . '" />'; + } + ?> + </form> +<? endif; ?> +<!-- finc: search - searchbox - END -->