diff --git a/local/languages/de.ini b/local/languages/de.ini index 7ae1450eb6c4d1f61e7943f7c6cec9ad25c44a30..87e6d4532f96927b4a544fcae6dd8267b6304317 100644 --- a/local/languages/de.ini +++ b/local/languages/de.ini @@ -2005,4 +2005,22 @@ License = "Lizenz" ; #17717 Skip to content = "Zum Inhalt" -fine_date_short = "Gebühr fällig" \ No newline at end of file +fine_date_short = "Gebühr fällig" + +; #17626 +; only necessary for de.ini: +go_to_page = "Gehe zur Seite " +page_first = "Gehe zur ersten Seite" +page_last = "Gehe zur letzten Seite" +page_next = "Gehe zur nächsten Seite" +page_no = "Seite " +page_prev = "Gehe zur vorherigen Seite" +pagination_label = "Pagination" +Go to First Page = "Erste Seite" +Go to Last Page = "Letzte Seite" +Go to Next Page = "Nächste Seite" +Go to Previous Page = "Vorherige Seite" +Next = "Nächster" +Next Search Result = "Nächster" +Previous = "Vorheriger" +Previous Search Result = "Vorheriger" diff --git a/themes/finc/js/advanced_search.js b/themes/finc/js/advanced_search.js deleted file mode 100644 index 680f784c37c8ebd3fbcf6d74ac013c18114ed969..0000000000000000000000000000000000000000 --- a/themes/finc/js/advanced_search.js +++ /dev/null @@ -1,132 +0,0 @@ -/*exported addGroup, addSearch, deleteGroup, deleteSearch, TEMPORARY BARF CK */ -var nextGroup = 0; -var groupLength = []; - -function addSearch(group, _fieldValues) { - var fieldValues = _fieldValues || {}; - // Build the new search - var inputID = group + '_' + groupLength[group]; - var $newSearch = $($('#new_search_template').html()); - - $newSearch.attr('id', 'search' + inputID); - $newSearch.find('input.form-control') - .attr('id', 'search_lookfor' + inputID) - .attr('name', 'lookfor' + group + '[]') - .val(''); - $newSearch.find('select.adv-term-type option:first-child').attr('selected', 1); - $newSearch.find('select.adv-term-type') - .attr('id', 'search_type' + inputID) - .attr('name', 'type' + group + '[]'); - $newSearch.find('.adv-term-remove') - .attr('onClick', 'return deleteSearch(' + group + ',' + groupLength[group] + ')'); - // Preset Values - if (typeof fieldValues.term !== "undefined") { - $newSearch.find('input.form-control').val(fieldValues.term); - } - if (typeof fieldValues.field !== "undefined") { - $newSearch.find('select.adv-term-type option[value="' + fieldValues.field + '"]').attr('selected', 1); - } - if (typeof fieldValues.op !== "undefined") { - $newSearch.find('select.adv-term-op option[value="' + fieldValues.op + '"]').attr('selected', 1); - } - // Insert it - $("#group" + group + "Holder").before($newSearch); - // Individual search ops (for searches like EDS) - if (groupLength[group] === 0) { - $newSearch.find('.first-op') - .attr('name', 'op' + group + '[]') - .removeClass('hidden'); - $newSearch.find('select.adv-term-op').remove(); - } else { - $newSearch.find('select.adv-term-op') - .attr('id', 'search_op' + group + '_' + groupLength[group]) - .attr('name', 'op' + group + '[]') - .removeClass('hidden'); - $newSearch.find('.first-op').remove(); - $newSearch.find('label').remove(); - // Show x if we have more than one search inputs - $('#group' + group + ' .adv-term-remove').removeClass('hidden'); - } - groupLength[group]++; - return false; -} - -function deleteSearch(group, sindex) { - for (var i = sindex; i < groupLength[group] - 1; i++) { - var $search0 = $('#search' + group + '_' + i); - var $search1 = $('#search' + group + '_' + (i + 1)); - $search0.find('input').val($search1.find('input').val()); - var select0 = $search0.find('select')[0]; - var select1 = $search1.find('select')[0]; - select0.selectedIndex = select1.selectedIndex; - } - if (groupLength[group] > 1) { - groupLength[group]--; - $('#search' + group + '_' + groupLength[group]).remove(); - if (groupLength[group] === 1) { - $('#group' + group + ' .adv-term-remove').addClass('hidden'); // Hide x - } - } - return false; -} - -function addGroup(_firstTerm, _firstField, _join) { - var firstTerm = _firstTerm || ''; - var firstField = _firstField || ''; - var join = _join || ''; - - var $newGroup = $($('#new_group_template').html()); - $newGroup.find('.adv-group-label') // update label - .attr('for', 'search_lookfor' + nextGroup + '_0'); - $newGroup.attr('id', 'group' + nextGroup); - $newGroup.find('.search_place_holder') - .attr('id', 'group' + nextGroup + 'Holder') - .removeClass('hidden'); - $newGroup.find('.add_search_link') - .attr('id', 'add_search_link_' + nextGroup) - .attr('onClick', 'return addSearch(' + nextGroup + ')') - .removeClass('hidden'); - $newGroup.find('.adv-group-close') - .attr('onClick', 'return deleteGroup(' + nextGroup + ')'); - $newGroup.find('select.form-control') - .attr('id', 'search_bool' + nextGroup) - .attr('name', 'bool' + nextGroup + '[]'); - $newGroup.find('.search_bool') - .attr('for', 'search_bool' + nextGroup); - if (join.length > 0) { - $newGroup.find('option[value="' + join + '"]').attr('selected', 1); - } - // Insert - $('#groupPlaceHolder').before($newGroup); - // Populate - groupLength[nextGroup] = 0; - addSearch(nextGroup, {term: firstTerm, field: firstField}); - // Show join menu - if (nextGroup > 0) { - $('#groupJoin').removeClass('hidden'); - // Show x - $('.adv-group-close').removeClass('hidden'); - } - return nextGroup++; -} - -function deleteGroup(group) { - // Find the group and remove it - $("#group" + group).remove(); - // If the last group was removed, add an empty group - if ($('.adv-group').length === 0) { - addGroup(); - } else if ($('#advSearchForm .adv-group').length === 1) { - $('#groupJoin').addClass('hidden'); // Hide join menu - $('.adv-group .adv-group-close').addClass('hidden'); // Hide x - } - return false; -} - -$(document).ready(function advSearchReady() { - $('.clear-btn').click(function clearBtnClick() { - $('input[type="text"]').val(''); - $("option:selected").removeAttr("selected"); - $("#illustrated_-1").click(); - }); -}); diff --git a/themes/finc/templates/Recommend/SideFacetsDeferred.phtml b/themes/finc/templates/Recommend/SideFacetsDeferred.phtml deleted file mode 100644 index ae599aaec796bafd34ba2fbd409fdcb6be53a02b..0000000000000000000000000000000000000000 --- a/themes/finc/templates/Recommend/SideFacetsDeferred.phtml +++ /dev/null @@ -1,83 +0,0 @@ -<!-- finc: recommend - TEMPORARY BARF - sidefacetsDeferred --> -<?php - $this->headScript()->appendFile('vendor/jsTree/jstree.min.js'); - $this->headScript()->appendFile('facets.js'); - - $results = $this->recommend->getResults(); - $activeFacets = $this->recommend->getActiveFacets(); - $rangeFacets = $this->recommend->getAllRangeFacets(); - - foreach ($activeFacets as $field => $facetName) { - if (isset($rangeFacets[$field]) && 'date' === $rangeFacets[$field]['type']) { - $this->headScript()->appendFile('vendor/bootstrap-slider.min.js'); - $this->headLink()->appendStylesheet('vendor/bootstrap-slider.min.css'); - break; - } - } -?> -<?php if ($results->getResultTotal() > 0): ?> - <h2><?=$this->transEsc(isset($this->overrideSideFacetCaption) ? $this->overrideSideFacetCaption : 'Narrow Search')?></h2> - <div class="side-facets-container-ajax" data-search-class-id="<?=$this->escapeHtmlAttr($this->searchClassId) ?>" data-location="<?=$this->escapeHtmlAttr($this->location) ?>" data-config-index="<?=$this->escapeHtmlAttr($this->configIndex) ?>"> -<?php endif; ?> -<?php $checkboxFilters = $results->getParams()->getCheckboxFacets(); ?> -<?php $checkboxesShown = false; ?> -<?php if (count($checkboxFilters) > 0): - foreach ($checkboxFilters as $current) { - if ($results->getResultTotal() > 0 || $current['selected'] || $current['alwaysVisible']) { - $checkboxesShown = true; - break; - } - } - ?> - <?php if ($checkboxesShown): ?> - <div class="checkboxFilter"> - <?=$this->context($this)->renderInContext('Recommend/SideFacets/checkbox-filters.phtml', ['checkboxFilters' => $checkboxFilters, 'results' => $results]); ?> - </div> - <?php endif; ?> -<?php endif; ?> -<?php $extraFilters = isset($this->extraSideFacetFilters) ? $this->extraSideFacetFilters : []; ?> -<?php $collapsedFacets = $this->recommend->getCollapsedFacets() ?> -<?php $filterList = array_merge($results->getParams()->getFilterList(true), $extraFilters); ?> -<?php if (!empty($filterList)): ?> - <?=$this->context($this)->renderInContext('Recommend/SideFacets/filter-list.phtml', [ - 'collapsedFacets' => $collapsedFacets, - 'extraFilters' => $extraFilters, - 'filterList' => $filterList, - ]); ?> -<?php endif; ?> -<?= isset($this->sideFacetExtraControls) ? $this->sideFacetExtraControls : '' ?> -<?php $sideFacetSet = $this->recommend->getFacetSet(); ?> -<?php $hierarchicalFacets = $this->recommend->getHierarchicalFacets() ?> -<?php $hierarchicalFacetSortOptions = $this->recommend->getHierarchicalFacetSortOptions() ?> -<?php if (!empty($activeFacets) && $results->getResultTotal() > 0): ?> - <?php foreach ($activeFacets as $field => $facetName): ?> - <?php $allowExclude = $this->recommend->excludeAllowed($field); ?> - <div class="facet-group" id="side-panel-<?=$this->escapeHtmlAttr($field) ?>"> - <button class="title<?php if (in_array($field, $collapsedFacets)): ?> collapsed<?php endif ?>" data-toggle="collapse" href="#side-collapse-<?=$this->escapeHtmlAttr($field) ?>" > - <?=$this->transEsc($facetName)?> - </button> - <div id="side-collapse-<?=$this->escapeHtmlAttr($field) ?>" class="collapse<?php if (!in_array($field, $collapsedFacets)): ?> in<?php endif ?>" data-facet="<?=$this->escapeHtmlAttr($field) ?>"> - <span class="facet-load-indicator hidden"> - <span class="text"> - <i class="fa fa-spinner fa-spin"></i> <?=$this->transEsc('Loading')?>... - </span> - </span> - <span class="facet-load-failed hidden"> <?=$this->transEsc('ajax_load_interrupted')?></span> - <?php if (in_array($field, $hierarchicalFacets)): ?> - <div id="facet_<?=$this->escapeHtml($field)?>" class="jstree-facet" - data-facet="<?=$this->escapeHtmlAttr($field)?>" - data-path="" - data-exclude="<?=$allowExclude?>" - data-operator="<?=$this->recommend->getFacetOperator($field)?>" - data-exclude-title="<?=$this->transEsc('exclude_facet')?>" - data-sort="<?=$hierarchicalFacetSortOptions[$field] ?? ''?>"> - </div> - <?php endif; ?> - </div> - </div> - <?php endforeach; ?> -<?php endif; ?> -<?php if ($results->getResultTotal() > 0): ?> - </div> -<?php endif; ?> -<!-- finc: recommend - TEMPORARY BARF - sidefacetsDeferred - END --> diff --git a/themes/finc/templates/breadcrumbs/default.phtml b/themes/finc/templates/breadcrumbs/default.phtml deleted file mode 100644 index cbeb6f4a4faf06ffb45b0c3755c26209e9f5e9da..0000000000000000000000000000000000000000 --- a/themes/finc/templates/breadcrumbs/default.phtml +++ /dev/null @@ -1,13 +0,0 @@ -<!-- finc: - breadcrumbs -- default - TEMPORARY BARF - END --> -<li><a href="<?=$this->url('home')?>"><?=$this->transEsc('Home')?></a></li> -<?php $current = $this->layout()->breadcrumbs; $current = current($current); ?> -<?php foreach($current as $id => $parent): ?> - <li><a href="<?=$this->url('collection', ['id' => $id]) ?>"><?=$parent ?></a></li> -<?php endforeach; ?> -<?php if(isset($this->layout()->end)): ?> - <li title="<?=$this->layout()->title ?>"><?=$this->truncate($this->layout()->title, 100) ?></li> - <li class="active" aria-current="page"><?=$this->layout()->end ?></li> -<?php else: ?> - <li class="active" title="<?=$this->layout()->title ?>" aria-current="page"><?=$this->truncate($this->layout()->title, 100) ?></li> -<?php endif; ?> -<!-- finc: - breadcrumbs -- default - TEMPORARY BARF - END --> diff --git a/themes/finc/templates/collection/view.phtml b/themes/finc/templates/collection/view.phtml index 940d193f5559d3b1fd672a1af1f7895454613880..14646b9d9dffe2826ea4f0138e4082fc2ba59c2f 100644 --- a/themes/finc/templates/collection/view.phtml +++ b/themes/finc/templates/collection/view.phtml @@ -26,49 +26,7 @@ ?> <?php if (isset($this->scrollData) && ($this->scrollData['previousRecord'] || $this->scrollData['nextRecord'])): ?> - <?php /* Pager is identical to pager in record - view! - CK */ ?> - <nav aria-label="<?= $this->transEsc('pagination_navigation') ?>"> - <ul class="pager hidden-print"> - <?php if ($this->scrollData['previousRecord']): ?> - <?php if ($this->scrollData['firstRecord']): ?> - <li class="left"> - <a href="<?= $this->recordLink()->getUrl($this->scrollData['firstRecord']) ?>" title="<?= $this->transEsc('First Search Result') ?>" rel="nofollow" aria-label="<?= $this->transEsc('go_to') ?> <?= $this->transEsc('First Search Result') ?>"><span aria-hidden="true">«</span> <?= $this->transEsc('First') ?></a> - </li> - <?php endif; ?> - <li class="left"> - <a href="<?= $this->recordLink()->getUrl($this->scrollData['previousRecord']) ?>" title="<?= $this->transEsc('Previous Search Result') ?>" rel="nofollow" aria-label="<?= $this->transEsc('go_to') ?> <?= $this->transEsc('Previous Search Result') ?>"><span aria-hidden="true">«</span> <?= $this->transEsc('Prev') ?></a> - </li> - <?php else: ?> - <?php if ($this->scrollData['firstRecord']): ?> - <li class="disabled left"><a href="#"><span aria-hidden="true">«</span> <?= $this->transEsc('First') ?></a></li> - <?php endif; ?> - <li class="disabled left"><a href="#"><span aria-hidden="true">«</span> <?= $this->transEsc('Prev') ?></a></li> - <?php endif; ?> - <?php /* finc-specific: li + hidden-xs, and li right below CK */ ?> - <li class="hidden-xs"> - <?= $this->transEsc('of_num_results', [ - '%%position%%' => $this->localizedNumber($this->scrollData['currentPosition']), - '%%total%%' => $this->localizedNumber($this->scrollData['resultTotal']) - ]) ?> - </li> - <?php if ($this->scrollData['nextRecord']): ?> - <li class="right"> - <a href="<?= $this->recordLink()->getUrl($this->scrollData['nextRecord']) ?>" title="<?= $this->transEsc('Next Search Result') ?>" rel="nofollow" aria-label="<?= $this->transEsc('go_to') ?> <?= $this->transEsc('Next Search Result') ?>"><?= $this->transEsc('Next') ?> <span aria-hidden="true">»</span></a> - </li> - <?php if ($this->scrollData['lastRecord']): ?> - <li class="right"> - <a href="<?= $this->recordLink()->getUrl($this->scrollData['lastRecord']) ?>" title="<?= $this->transEsc('Last Search Result') ?>" rel="nofollow" - aria-label="<?= $this->transEsc('go_to') ?> <?= $this->transEsc('Last Search Result') ?>"><?= $this->transEsc('Last') ?> <span aria-hidden="true">»</span></a> - </li> - <?php endif; ?> - <?php else: ?> - <li class="disabled right" aria-hidden="true"><a href="#"><?= $this->transEsc('Next') ?> »</a></li> - <?php if ($this->scrollData['lastRecord']): ?> - <li class="disabled right" aria-hidden="true"><a href="#"><?= $this->transEsc('Last') ?> »</a></li> - <?php endif; ?> - <?php endif; ?> - </ul> - </nav> + <?=$this->render('record/prev-next.phtml'); ?> <?php endif; ?> <?php /* DON'T pull the toolbar in here but below, finc-specific, CK */ ?> diff --git a/themes/finc/templates/layout/lightbox.phtml b/themes/finc/templates/layout/lightbox.phtml deleted file mode 100644 index d9ba015de5a932dee20a103aecffd7c4aaa53096..0000000000000000000000000000000000000000 --- a/themes/finc/templates/layout/lightbox.phtml +++ /dev/null @@ -1,6 +0,0 @@ -<!-- finc: recommend - TEMPORARY BARF - layout -- lightbox --> -<span id="modal-title" hidden><?=$this->headTitle()->renderTitle() ?></span> -<?=$this->layout()->content?> -<?=$this->piwik(['lightbox' => true])?> -<?=$this->googleanalytics($this->serverUrl(true))?> -<!-- finc: recommend - TEMPORARY BARF - layout -- lightbox - END --> diff --git a/themes/finc/templates/record/prev-next.phtml b/themes/finc/templates/record/prev-next.phtml new file mode 100644 index 0000000000000000000000000000000000000000..0ee502839a65fcfe10e75332543c1eee102f93f1 --- /dev/null +++ b/themes/finc/templates/record/prev-next.phtml @@ -0,0 +1,56 @@ +<!-- finc: record - prev-next --> +<nav aria-label="<?=$this->transEsc('Search Results')?>"> + <ul class="pager hidden-print"> + <?php if ($this->scrollData['previousRecord']): ?> + <?php if ($this->scrollData['firstRecord']): ?> + <li class="left" role="none"> + <a href="<?=$this->recordLink()->getUrl($this->scrollData['firstRecord'])?>" aria-label="<?=$this->transEsc('First Search Result')?>" rel="nofollow"> + <i class="fa fa-angle-double-left" aria-hidden="true"></i> + <?=$this->transEsc('First')?> + </a> + </li> + <?php endif; ?> + <li class="left" role="none"> + <a href="<?=$this->recordLink()->getUrl($this->scrollData['previousRecord'])?>" aria-label="<?=$this->transEsc('Previous Search Result')?>" rel="nofollow"> + <i class="fa fa-angle-left" aria-hidden="true"></i> + <?=$this->transEsc('Prev')?> + </a> + </li> + <?php else: ?> + <?php if ($this->scrollData['firstRecord']): ?> + <li class="disabled left" aria-hidden="true" role="none"><a href="#"><i class="fa fa-angle-double-left"></i> <?=$this->transEsc('First')?></a></li> + <?php endif; ?> + <li class="disabled left" aria-hidden="true" role="none"><a href="#"><i class="fa fa-angle-left"></i> <?=$this->transEsc('Prev')?></a></li> + <?php endif; ?> + + <?php /* finc-specific wrapping: li + hidden-xs for consistency - CK */ ?> + <?=$this->transEsc('of_num_results', [ + '%%position%%' => $this->localizedNumber($this->scrollData['currentPosition']), + '%%total%%' => $this->localizedNumber($this->scrollData['resultTotal']) + ]) ?> + </li> + + <?php if ($this->scrollData['nextRecord']): ?> + <li class="right" role="none"> + <a href="<?=$this->recordLink()->getUrl($this->scrollData['nextRecord'])?>" aria-label="<?=$this->transEsc('Next Search Result')?>" rel="nofollow"> + <?=$this->transEsc('Next')?> + <i class="fa fa-angle-right" aria-hidden="true"></i> + </a> + </li> + <?php if ($this->scrollData['lastRecord']): ?> + <li class="right" role="none"> + <a href="<?=$this->recordLink()->getUrl($this->scrollData['lastRecord'])?>" aria-label="<?=$this->transEsc('Last Search Result')?>" rel="nofollow"> + <?=$this->transEsc('Last')?> + <i class="fa fa-angle-double-right" aria-hidden="true"></i> + </a> + </li> + <?php endif; ?> + <?php else: ?> + <li class="disabled right" aria-hidden="true" role="none"><a href="#"><?=$this->transEsc('Next')?> <i class="fa fa-angle-right"></i></a></li> + <?php if ($this->scrollData['lastRecord']): ?> + <li class="disabled right" aria-hidden="true" role="none"><a href="#"><?=$this->transEsc('Last')?> <i class="fa fa-angle-double-right"></i></a></li> + <?php endif; ?> + <?php endif; ?> + </ul> +</nav> +<!-- finc: record - prev-next - END --> diff --git a/themes/finc/templates/record/view.phtml b/themes/finc/templates/record/view.phtml index 5ba792c5e1c03fcd248edadde3a2385158ab5007..dc87e36b4332929517e7967b8f9c7a550df69ebd 100644 --- a/themes/finc/templates/record/view.phtml +++ b/themes/finc/templates/record/view.phtml @@ -20,51 +20,7 @@ ?> <?php if (isset($this->scrollData) && ($this->scrollData['previousRecord'] || $this->scrollData['nextRecord'])): ?> - <?php - /* Pager is identical to pager in collection - view! - Keep .left/.right classes for alignment on left/right edge - CK */ - ?> - <nav aria-label="<?= $this->transEsc('pagination_navigation') ?>"> - <ul class="pager hidden-print"> - <?php if ($this->scrollData['previousRecord']): ?> - <?php if ($this->scrollData['firstRecord']): ?> - <li class="left"> - <a href="<?= $this->recordLink()->getUrl($this->scrollData['firstRecord']) ?>" title="<?= $this->transEsc('First Search Result') ?>" rel="nofollow" aria-label="<?= $this->transEsc('go_to') ?> <?= $this->transEsc('First Search Result') ?>"><span aria-hidden="true">«</span> <?= $this->transEsc('First') ?></a> - </li> - <?php endif; ?> - <li class="left"> - <a href="<?= $this->recordLink()->getUrl($this->scrollData['previousRecord']) ?>" title="<?= $this->transEsc('Previous Search Result') ?>" rel="nofollow" aria-label="<?= $this->transEsc('go_to') ?> <?= $this->transEsc('Previous Search Result') ?>"><span aria-hidden="true">«</span> <?= $this->transEsc('Prev') ?></a> - </li> - <?php else: ?> - <?php if ($this->scrollData['firstRecord']): ?> - <li class="disabled left"><a href="#"><span aria-hidden="true">«</span> <?= $this->transEsc('First') ?></a></li> - <?php endif; ?> - <li class="disabled left"><a href="#"><span aria-hidden="true">«</span> <?= $this->transEsc('Prev') ?></a></li> - <?php endif; ?> - <?php /* finc-specific wrapping: li + hidden-xs for consistency - CK */ ?> - <li class="hidden-xs"> - <?= $this->transEsc('of_num_results', [ - '%%position%%' => $this->localizedNumber($this->scrollData['currentPosition']), - '%%total%%' => $this->localizedNumber($this->scrollData['resultTotal']) - ]) ?> - </li> - <?php if ($this->scrollData['nextRecord']): ?> - <li class="right"> - <a href="<?= $this->recordLink()->getUrl($this->scrollData['nextRecord']) ?>" title="<?= $this->transEsc('Next Search Result') ?>" rel="nofollow" aria-label="<?= $this->transEsc('go_to') ?> <?= $this->transEsc('Next Search Result') ?>"><?= $this->transEsc('Next') ?> <span aria-hidden="true">»</span></a> - </li> - <?php if ($this->scrollData['lastRecord']): ?> - <li class="right"> - <a href="<?= $this->recordLink()->getUrl($this->scrollData['lastRecord']) ?>" title="<?= $this->transEsc('Last Search Result') ?>" rel="nofollow" aria-label="<?= $this->transEsc('go_to') ?> <?= $this->transEsc('Last Search Result') ?>"><?= $this->transEsc('Last') ?> <span aria-hidden="true">»</span></a> - </li> - <?php endif; ?> - <?php else: ?> - <li class="disabled right" aria-hidden="true"><a href="#"><?= $this->transEsc('Next') ?> »</a></li> - <?php if ($this->scrollData['lastRecord']): ?> - <li class="disabled right" aria-hidden="true"><a href="#"><?= $this->transEsc('Last') ?> »</a></li> - <?php endif; ?> - <?php endif; ?> - </ul> - </nav> + <?=$this->render('record/prev-next.phtml'); ?> <?php endif; ?> <?php diff --git a/themes/finc/templates/search/pagination.phtml b/themes/finc/templates/search/pagination.phtml index 55aecec9cbc288220586e75fea10b8d971c716cd..adef509782f9fff12da6048a4f48325980739762 100644 --- a/themes/finc/templates/search/pagination.phtml +++ b/themes/finc/templates/search/pagination.phtml @@ -1,32 +1,57 @@ <!-- finc: search - pagination --> +<?php /* #17626 copied from BS and merged former finc specific amendments, + especially the surrounding <nav> and additional class for <li> + and amended two BS statements */ ?> + <?php if ($this->pageCount): ?> - <nav aria-label="<?= $this->transEsc('pagination_navigation') ?>"> - <ul class="pagination"> - <?php if (isset($this->previous)): ?> - <?php if (!isset($this->options['disableFirst']) || !$this->options['disableFirst']): ?> - <li class="first"><a href="<?= $this->currentPath() . $this->results->getUrlQuery()->setPage(1) ?>" aria-label="<?= $this->transEsc('go_to_first_page') ?>">[1]</a></li> - <?php endif; ?> - <li class="page-prev"><a href="<?= $this->currentPath() . $this->results->getUrlQuery()->setPage($this->previous) ?>"><span class="sr-only"><?= $this->transEsc('go_to_prev_page') ?></span><span aria-hidden="true"><span aria-hidden="true">«</span> <?= $this->transEsc('Prev') ?></span></a></li> - <?php endif; ?> - - <?php if (count($this->pagesInRange) > 1): ?> - <?php foreach ($this->pagesInRange as $page): ?> - <?php if ($page != $this->current): ?> - <li><a href="<?= $this->currentPath() . $this->results->getUrlQuery()->setPage($page) ?>" aria-label="<?= $this->transEsc('go_to_page') ?> <?= $page ?>"><?= $page ?></a></li> - <?php else: ?> - <li class="active" aria-current="true" aria-label="<?= $this->transEsc('current_page') ?>, <?=$this->transEsc('page_no', ['%%page%%' => $page])?>"><span><?= $page ?></span></li> - <?php endif; ?> - <?php endforeach; ?> - <?php endif; ?> - - <?php if (isset($this->next)): ?> - <li class="page-next"><a href="<?= $this->currentPath() . $this->results->getUrlQuery()->setPage($this->next) ?>"> <span class="sr-only"><?= $this->transEsc('go_to_next_page') ?></span> - <span aria-hidden="true"><?= $this->transEsc('Next'); ?> <span aria-hidden="true">»</span></span></a></li> - <?php if (!isset($this->options['disableLast']) || !$this->options['disableLast']): ?> - <li class="last"><a href="<?= $this->currentPath() . $this->results->getUrlQuery()->setPage($this->pageCount) ?>" aria-label="<?= $this->transEsc('go_to_last_page') ?>, <?= $this->transEsc('page') ?> <?= $this->pageCount ?>">[<?= $this->pageCount ?>]</a></li> - <?php endif; ?> - <?php endif; ?> - </ul> - </nav> + <nav> + <ul class="pagination" aria-label="<?=$this->transEsc('pagination_label')?>"> + <?php if (isset($this->previous)): ?> + <?php if (!isset($this->options['disableFirst']) || !$this->options['disableFirst']): ?> + <li class="first" role="none"> + <a href="<?=$this->currentPath() . $this->results->getUrlQuery()->setPage(1)?>" aria-label="<?=$this->transEsc('page_first')?>">[1]</a> + </li> + <?php endif; ?> + <li class="page-prev" role="none"> + <a class="page-prev" href="<?=$this->currentPath() . $this->results->getUrlQuery()->setPage($this->previous)?>" aria-label="<?=$this->transEsc('page_prev')?>"> + <i class="fa fa-angle-left" aria-hidden="true"></i> + <?=$this->transEsc('Prev')?> + </a> + </li> + <?php endif; ?> + + <?php if (count($this->pagesInRange) > 1): ?> + <?php foreach ($this->pagesInRange as $page): ?> + <?php if ($page != $this->current): ?> + <li role="none"> + <?php /* #17626 the solution from BS does not work properly + <a href="<?=$this->currentPath() . $this->results->getUrlQuery()->setPage($page)?>" aria-label="<?=$this->transEsc('page_no', ['%%page%%' => $page])?>"><?=$page?></a> + */ ?> + <a href="<?=$this->currentPath() . $this->results->getUrlQuery()->setPage($page)?>" aria-label="<?=$this->transEsc('go_to_page')?><?=$page?>"><?=$page?></a> + </li> + <?php else: ?> + <?php /* #17626 the solution from BS does not work properly + <li role="none" class="active" aria-current="page"><span><?=$page?></span></li> + */ ?> + <li role="none" class="active" aria-current="page"><span aria-label="<?=$this->transEsc('page_no')?><?=$page?>"><?=$page?></span></li> + <?php endif; ?> + <?php endforeach; ?> + <?php endif; ?> + + <?php if (isset($this->next)): ?> + <li class="page-next" role="none"> + <a class="page-next" href="<?=$this->currentPath() . $this->results->getUrlQuery()->setPage($this->next)?>" aria-label="<?=$this->transEsc('page_next')?>"> + <?=$this->transEsc('Next');?> + <i class="fa fa-angle-right" aria-hidden="true"></i> + </a> + </li> + <?php if (!isset($this->options['disableLast']) || !$this->options['disableLast']): ?> + <li class="last" role="none"> + <a href="<?=$this->currentPath() . $this->results->getUrlQuery()->setPage($this->pageCount)?>" aria-label="<?=$this->transEsc('page_last')?>">[<?=$this->pageCount?>]</a> + </li> + <?php endif; ?> + <?php endif; ?> + </ul> + </nav> <?php endif; ?> <!-- finc: search - pagination - END -->