From 5496c04e515f10a6d1f84f11bc53d2bfe277f3eb Mon Sep 17 00:00:00 2001 From: Viola Elsenhans <elsenhans@ub.uni-leipzig.de> Date: Mon, 8 Aug 2022 17:26:14 +0200 Subject: [PATCH] refs #22151 [fid_adlr] adapt /feedback/ templates to VF6.1.2 * adapt /layout/ templates to VF6.1.2 * revert changes /feedback/form of VF6.1.2 * adapt /myresearch/ templates to VF6.1.2 * adapt /Recommend/ templates to VF6.1.2 * adapt /Recommend/SideFacets/ templates to VF6.1.2 * adapt /record/ templates to VF6.1.2 * adapt /RecordDriver/DefaultRecord/core templates to VF6.1.2 * format /RecordDriver/DefaultRecord/core replace closing tag * adapt /RecordDriver/DefaultRecord/ templates to VF6.1.2 * adapt /RecordDriver/DefaultRecord/ /RecordDriver/SolrAI/ templates to VF6.1.2 * adapt core templates to VF6.1.2 * adapt /RecordTab/ templates to VF6.1.2 * adapt /search/advanced/ templates to VF6.1.2 * adapt /search/controls/ templates to VF6.1.2 * adapt /search/ templates to VF6.1.2 * fix bugs of templates to VF6.1.2 * reset off-Canvas-Togglers in myresearch/profile VF6.1.2 * redo showing selected filter-list above facte, Recommend/SideFacets VF6.1.2 * remove offcanvas-toggler /DefaultRecord/core.phtml VF6.1.2 * remove offcanvas-toggler /SolrMarc/core.phtml VF6.1.2 * remove classname table-resp-data in /RecordTab/ VF6.1.2 * fix closing if in /DefaultRecord/list-entry VF6.1.2 co-authored by: Alexander Purr <purr@ub.uni-leipzig.de> * remove table-resp-data class from tables to prevent ugly responsive tables --- .../templates/Recommend/SideFacets.phtml | 89 ++--- .../Recommend/SideFacets/range-slider.phtml | 12 +- .../Recommend/SideFacets/single-facet.phtml | 25 +- .../templates/Recommend/SwitchTab.phtml | 9 +- .../RecordDriver/DefaultRecord/core.phtml | 288 ++++++++-------- .../DefaultRecord/data-additionals.phtml | 20 -- .../DefaultRecord/list-entry.phtml | 238 +++++++------- .../offcanvas-toggler-myresearch.phtml | 6 +- .../DefaultRecord/result-list.phtml | 47 +-- .../RecordDriver/DefaultRecord/toolbar.phtml | 34 +- .../templates/RecordDriver/SolrAI/core.phtml | 311 ++++++++++-------- .../RecordDriver/SolrAI/result-list.phtml | 23 +- .../RecordDriver/SolrMarc/core.phtml | 289 ++++++++-------- .../templates/RecordTab/description.phtml | 16 +- .../templates/RecordTab/holdingsils.phtml | 92 +++--- .../templates/RecordTab/staffviewai.phtml | 13 +- .../templates/RecordTab/staffviewmarc.phtml | 20 +- themes/fid_adlr/templates/RecordTab/toc.phtml | 37 ++- themes/fid_adlr/templates/feedback/form.phtml | 2 +- themes/fid_adlr/templates/header.phtml | 127 ++++--- themes/fid_adlr/templates/layout/layout.phtml | 94 +++--- .../myresearch/bulk-action-buttons.phtml | 27 +- .../fid_adlr/templates/myresearch/edit.phtml | 8 +- .../fid_adlr/templates/myresearch/menu.phtml | 92 ++---- .../templates/myresearch/profile.phtml | 40 ++- themes/fid_adlr/templates/record/email.phtml | 7 +- themes/fid_adlr/templates/record/view.phtml | 85 ++--- .../templates/search/advanced/layout.phtml | 188 ++++++----- .../search/controls/limit-offcanvas.phtml | 7 +- .../search/controls/sort-offcanvas.phtml | 3 +- themes/fid_adlr/templates/search/email.phtml | 5 +- .../templates/search/history-table.phtml | 47 ++- .../fid_adlr/templates/search/history.phtml | 67 ++-- themes/fid_adlr/templates/search/home.phtml | 132 ++------ .../fid_adlr/templates/search/list-list.phtml | 4 +- .../templates/search/pagination.phtml | 57 ++-- .../fid_adlr/templates/search/results.phtml | 144 ++++---- .../fid_adlr/templates/search/searchbox.phtml | 102 +++--- 38 files changed, 1464 insertions(+), 1343 deletions(-) delete mode 100644 themes/fid_adlr/templates/RecordDriver/DefaultRecord/data-additionals.phtml diff --git a/themes/fid_adlr/templates/Recommend/SideFacets.phtml b/themes/fid_adlr/templates/Recommend/SideFacets.phtml index 6afbe1e6c76..c75c0d08bfb 100644 --- a/themes/fid_adlr/templates/Recommend/SideFacets.phtml +++ b/themes/fid_adlr/templates/Recommend/SideFacets.phtml @@ -1,43 +1,60 @@ <!-- fid_adlr: recommend - sidefacets --> <?php -$this->headScript()->appendFile('facets.js'); + $this->headScript()->appendFile('facets.js'); -// Save results/options to $this so they are available to sub-templates: -$this->results = $results = $this->recommend->getResults(); + // Save results/options to $this so they are available to sub-templates: + $this->results = $results = $this->recommend->getResults(); $this->options = $options = $results->getOptions(); + $collapsedFacets = $this->recommend->getCollapsedFacets(); + $forceUncollapsedFacets = []; -$hierarchicalFacets = $this->recommend->getHierarchicalFacets(); -if ($hierarchicalFacets) { - // jstree.min.js used to be injected by hierarchical-facet.js, but with deferred - // processing it's called too late to append anything to the headers. - $this->headScript()->appendFile('vendor/jsTree/jstree.min.js'); -} + // Make sure facets with active selections are not collapsed: + $filterList = $results->getParams()->getFilterList(true); + foreach ($filterList as $field => $filters) { + foreach ($filters as $filter) { + $index = isset($filter['field']) ? array_search($filter['field'], $collapsedFacets) : false; + if ($index !== false) { + unset($collapsedFacets[$index]); // Open if we have a match + $forceUncollapsedFacets[] = $filter['field']; + } + } + } + + $hierarchicalFacets = $this->recommend->getHierarchicalFacets(); + if ($hierarchicalFacets) { + // jstree.min.js used to be injected by hierarchical-facet.js, but with deferred + // processing it's called too late to append anything to the headers. + $this->headScript()->appendFile('vendor/jsTree/jstree.min.js'); + } ?> +<?php /* fid_adlr: modify result list #15646, #16385 */ ?> <div class="visible-xs visible-sm" id="filter-header"> + <?php /* fid_adlr: remove span #16515 */ ?> <?=$this->transEsc('Refine Results') ?> - <button class="close-offcanvas btn btn-link right" data-toggle="offcanvas"><i class="icon icon-close icon-2x"></i> - </button> + <button class="close-offcanvas btn btn-primary right" data-toggle="offcanvas"><i class="icon icon-close icon-2x"></i></button> </div> +<?php /* fid_adlr: result grouping styling #21409 */ ?> <?= $this->render('search/controls/grouping') ?> -<?php /*if ($results->getResultTotal() > 0): ?> - <h4><?=$this->transEsc(isset($this->overrideSideFacetCaption) ? $this->overrideSideFacetCaption : 'Narrow Search')?></h4> -<?php endif;*/ ?> -<?php $checkboxFilters = $results->getParams()->getCheckboxFacets(); ?> +<?php /* if ($results->getResultTotal() > 0): ?> + <h2><?=$this->transEsc(isset($this->overrideSideFacetCaption) ? $this->overrideSideFacetCaption : 'Narrow Search')?></h2> +<?php endif; */ ?> +<?php $checkboxFilters = $this->recommend->getCheckboxFacetSet(); ?> <?php $checkboxesShown = false; ?> <?php if (count($checkboxFilters) > 0): - foreach ($checkboxFilters as $current) { - if ($results->getResultTotal() > 0 || $current['selected'] || $current['alwaysVisible']) { - $checkboxesShown = true; - break; + foreach ($checkboxFilters as $current) { + if ($results->getResultTotal() > 0 || $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 if ($checkboxesShown): ?> + <div class="checkboxFilter"> + <?=$this->context($this)->renderInContext('Recommend/SideFacets/checkbox-filters.phtml', ['checkboxFilters' => $checkboxFilters, 'results' => $results]); ?> + </div> + <?php endif; ?> <?php endif; ?> +<?php /* fid_adlr: keep selected filterList here, above the sidebar instead of under the searchbox */ ?> <?php $extraFilters = $this->extraSideFacetFilters ?? []; ?> <?php $collapsedFacets = $this->recommend->getCollapsedFacets() ?> <?php $filterList = array_merge($results->getParams()->getFilterList(true), $extraFilters); ?> @@ -49,37 +66,35 @@ if ($hierarchicalFacets) { ]);?> <?php endif; ?> <?=$this->sideFacetExtraControls ?? ''?> -<?php -/* finc-specific line to show allowed facet values only: sidefacet()->displayAllowedFacetValues ..., #7624 - CK */ /* Original line is: -<?php $sideFacetSet = $this->recommend->getFacetSet(); ?> - */ -?> <?php $sideFacetSet = $this->sideFacet()->displayAllowedFacetValues($this->recommend->getFacetSet()); ?> <?php $hierarchicalFacets = $this->recommend->getHierarchicalFacets() ?> <?php $hierarchicalFacetSortOptions = $this->recommend->getHierarchicalFacetSortOptions() ?> <?php if (!empty($sideFacetSet) && $results->getResultTotal() > 0): ?> <?php foreach ($sideFacetSet as $title => $cluster): ?> - <div class="facet-group" id="side-panel-<?=$this->escapeHtmlAttr($title)?>"> + <div class="facet-group" id="side-panel-<?=$this->escapeHtmlAttr($title) ?>"> + <?php /* fid_adlr: corrects aria-expanded on side facets #21185 */ ?> <button - <?php if (in_array($title, $collapsedFacets)): ?>class="title collapsed" aria-expanded="false" <?php else: ?>class="title" aria-expanded="true"<?php endif ?> data-toggle="collapse" href="#side-collapse-<?=$this->escapeHtmlAttr($title) ?>" + <?php if (in_array($title, $collapsedFacets)): ?>class="title collapsed" aria-expanded="false"<?php else: ?>class="title" aria-expanded="true"<?php endif ?> data-toggle="collapse" href="#side-collapse-<?=$this->escapeHtmlAttr($title) ?>" > - <?=$this->transEsc($cluster['label'])?> - <span class="sr-only"><?=$this->transEsc('facet_select_hint') ?> + <?=$this->transEsc($cluster['label'])?> <span class="sr-only"><?=$this->transEsc('facet_select_hint') ?></span> </button> + <?php /* fid_adlr: sidefacets as structured list; change div to ul #20465 */ ?> <ul id="side-collapse-<?=$this->escapeHtmlAttr($title)?>" class="collapse<?php if (!in_array($title, $collapsedFacets)): ?> in<?php endif ?>"> <?=$this->context($this)->renderInContext( 'Recommend/SideFacets/facet.phtml', [ 'facet' => $title, 'cluster' => $cluster, - 'collapsedFacets' => $collapsedFacets ] + 'collapsedFacets' => $collapsedFacets + ] ); ?> </ul> </div> <?php endforeach; ?> <?php endif; ?> <div class="hidden-lg search-controls"> - <?= $this->render('search/controls/sort-offcanvas.phtml') ?> - <?= $this->render('search/controls/limit-offcanvas.phtml') ?> + <?= $this->render('search/controls/sort-offcanvas.phtml') ?> + <?php /* fid_adlr: add limit-offcanvas #15967 */ ?> + <?= $this->render('search/controls/limit-offcanvas.phtml') ?> </div> <!-- fid_adlr: recommend - sidefacets - END --> diff --git a/themes/fid_adlr/templates/Recommend/SideFacets/range-slider.phtml b/themes/fid_adlr/templates/Recommend/SideFacets/range-slider.phtml index 51c57800bfb..ef0146f29f3 100644 --- a/themes/fid_adlr/templates/Recommend/SideFacets/range-slider.phtml +++ b/themes/fid_adlr/templates/Recommend/SideFacets/range-slider.phtml @@ -1,21 +1,25 @@ <!-- fid_adlr: Recommend - SideFacets - range-slider --> +<?php /* compare with bootstrap3 */?> <div class="facet"> - <form name="<?=$this->escapeHtmlAttr($this->title)?>Filter" id="<?=$this->escapeHtmlAttr($this->title)?>Filter"> + <form class="facet-range-form" name="<?=$this->escapeHtmlAttr($this->title)?>Filter" id="<?=$this->escapeHtmlAttr($this->title)?>Filter"> <?=$results->getUrlQuery()->asHiddenFields(['page' => "/./", 'filter' => "/^{$this->title}:.*/"])?> <input type="hidden" name="<?=$this->escapeHtmlAttr($this->facet['type'])?>range[]" value="<?=$this->escapeHtmlAttr($this->title)?>"/> - <?php if ($this->facet['type'] == 'date'): ?> - <div class="slider-container"><input type="text" class="hidden" id="<?=$this->escapeHtmlAttr($this->title)?><?=$this->escapeHtml($this->facet['type'])?>Slider"/></div> - <?php endif; ?> + <?php /* fid_adlr: place slider here instead of further down */ ?> + <?php if ($this->facet['type'] == 'date'): ?> + <div class="slider-container"><input type="text" class="hidden" id="<?=$this->escapeHtmlAttr($this->title)?><?=$this->escapeHtml($this->facet['type'])?>Slider"/></div> + <?php endif; ?> <div class="date-fields"> <?php $extraInputAttribs = ($this->facet['type'] == 'date') ? 'maxlength="4" ' : ''; ?> <div class="date-from"> <label for="<?=$this->escapeHtmlAttr($this->title)?>from"> + <?php /* fid_adlr: modify result list; remove colon #15967 */ ?> <?=$this->transEsc('date_from')?> </label> <input type="text" class="form-control" name="<?=$this->escapeHtmlAttr($this->title)?>from" id="<?=$this->escapeHtmlAttr($this->title)?>from" value="<?=isset($this->facet['values'][0])?$this->escapeHtmlAttr($this->facet['values'][0]):''?>" <?=$extraInputAttribs?>/> </div> <div class="date-to"> <label for="<?=$this->escapeHtmlAttr($this->title)?>to"> + <?php /* fid_adlr: modify result list; remove colon #15967 */ ?> <?=$this->transEsc('date_to')?> </label> <input type="text" class="form-control" name="<?=$this->escapeHtmlAttr($this->title)?>to" id="<?=$this->escapeHtmlAttr($this->title)?>to" value="<?=isset($this->facet['values'][1])?$this->escapeHtmlAttr($this->facet['values'][1]):''?>" <?=$extraInputAttribs?>/> diff --git a/themes/fid_adlr/templates/Recommend/SideFacets/single-facet.phtml b/themes/fid_adlr/templates/Recommend/SideFacets/single-facet.phtml index ed37688cd15..0ca7d741c76 100644 --- a/themes/fid_adlr/templates/Recommend/SideFacets/single-facet.phtml +++ b/themes/fid_adlr/templates/Recommend/SideFacets/single-facet.phtml @@ -13,6 +13,12 @@ if ($this->facet['isApplied']) { $classList[] = 'active'; } + if ($this->facet['operator'] == 'OR') { + $classList[] = 'facetOR'; + } + if ($this->facet['operator'] == 'AND') { + $classList[] = 'facetAND'; + } $displayText = '-'; if (!empty($this->facet['displayText'])) { @@ -21,16 +27,18 @@ $displayText = $this->escapeHtml($this->facet['value']); } - // #18509 decorate special untranslated terms with language tags + // #18509 mark special untranslated terms with language tags $displayText = $this->sideFacet()->getLanguageTag($displayText, 'span', $this->layout()->userLang); if ($this->facet['operator'] == 'OR') { + // fid_adlr: adapt displayText #15646, #19901 $displayText = '<i class="icon ' . ($this->facet['isApplied'] ? 'icon-check' : 'icon-square') . '" aria-hidden="true"></i> ' . ($this->facet['isApplied'] ? ' ' : ' ') . '<span>' . $displayText . ' (' . $this->localizedNumber($this->facet['count']) . ')' . '</span>'; } ?> +<?php /* finc uses list structure and adds skip-to feature + accessibility code; see #17934 and #18933 */ ?> <?php if ($hasSubLinks): ?> <li class="<?=implode(' ', $classList) ?>"> <?php else: ?> @@ -43,9 +51,11 @@ data-count="<?=$this->facet['count'] ?>" title="<?php if($this->facet['isApplied']): ?><?=$this->transEsc('applied_filter')?> - <?=$this->transEsc('page_reload_on_deselect_hint', ['%%filter_name%%' => $this->facet['displayText']])?><?php else: ?><?=$this->transEsc('page_reload_on_select_hint', ['%%filter_name%%' => $this->facet['displayText']])?><?php endif;?>" data-lightbox-ignore> -<?php endif; ?> + <?php endif; ?> <?php if ($hasSubLinks): ?> + <?php /* finc: add landmarks for active facets; add linebreaks #18993 */ + /* finc: add span inside a-element for explanatory sr-only text to facets #19934 */ ?> <a class="text" href="<?=$toggleUrl ?>" data-lightbox-ignore @@ -59,25 +69,28 @@ </a> <?php else: ?> <span class="text"> + <?php /* finc: add explanatory sr-only text to facets #19934 */ ?> <?=$displayText ?><span class="sr-only"><?php if($this->facet['isApplied']): ?>(<?=$this->transEsc('applied_filter')?> - <?=$this->transEsc('page_reload_on_deselect_hint', ['%%filter_name%%' => $this->facet['displayText']])?>)<?php else: ?>(<?=$this->transEsc('page_reload_on_select_hint', ['%%filter_name%%' => $this->facet['displayText']])?>)<?php endif;?></span> </span> <?php endif; ?> + <?php /* fid_adlr: dont show span #15646 */ ?> <?php /* if (!$this->facet['isApplied']): ?> <span class="badge"> + <?php /* finc: add span #18993 <?=$this->localizedNumber($this->facet['count']) ?><span class="sr-only"><?=$this->transEsc('results') ?></span> </span> <?php endif;*/ ?> + <?php /* finc: simplify if by using $hasSubLinks #17934 */ ?> <?php if ($hasSubLinks): ?> <?php $excludeURL = $this->urlBase . $this->url->addFacet($this->group, $this->facet['value'], 'NOT'); ?> + <?php /* finc: Barf for exclude facets #19392 */ ?> <a href="<?=$excludeURL ?>" data-lightbox-ignore class="exclude" title="<?= $this->transEsc('exclude_filter', ['%%filter_name%%' => $this->facet['displayText']]) ?>, <?= $this->transEsc('page_reload_on_exclude_hint', ['%%filter_name%%' => $this->facet['displayText']]) ?>"> <i class="fa fa-times" aria-hidden="true"></i> - <span class="sr-only"> - <?= $this->transEsc('exclude_filter', ['%%filter_name%%' => $this->facet['displayText']]) ?>, <?= $this->transEsc('page_reload_on_exclude_hint', ['%%filter_name%%' => $this->facet['displayText']]) ?> - </span> + <span class="sr-only"><?=$this->transEsc('exclude_filter', ['%%filter_name%%' => $this->facet['displayText']]) ?>, <?= $this->transEsc('page_reload_on_exclude_hint', ['%%filter_name%%' => $this->facet['displayText']]) ?></span> </a> <?php endif; ?> - +<?php /* finc: use lists for facet groups #17934 */ ?> <?=$hasSubLinks ? '</li>' : '</a></li>'; ?> <!-- fid_adlr - Recommend - SideFacets - single-facet - END --> diff --git a/themes/fid_adlr/templates/Recommend/SwitchTab.phtml b/themes/fid_adlr/templates/Recommend/SwitchTab.phtml index 24e5a1f231d..d4499f74b6c 100644 --- a/themes/fid_adlr/templates/Recommend/SwitchTab.phtml +++ b/themes/fid_adlr/templates/Recommend/SwitchTab.phtml @@ -3,12 +3,15 @@ $tabConfig = is_object($this->params) ? $this->searchTabs()->getTabConfigForParams($this->params) : []; ?> +<?php /* fid_adlr: design the catefory box #16750 */ ?> <?php error_reporting(E_ALL); ini_set("display_errors", 1); ?> <?php if (count($tabConfig) > 0 && ($this->recommend->getActiveTab($tabConfig)["label"] ?? "All") !== "All"): ?> <div class="facet-group switchtab-info flex-column-default"> - <div class="switchtab-heading"><i class="icon icon-filter2 icon-1.5x" aria-hidden="true"></i> - <?=$this->transEsc('switchtab_headline')?></div> - <span class="switchtab-text"><?=$this->translate('nohit_change_tab', ['%%activeTab%%' => $this->translate($this->recommend->getActiveTab($tabConfig)['label'])])?></span> + <div class="switchtab-heading"> + <i class="icon icon-filter2 icon-1.5x" aria-hidden="true"></i> + <?=$this->transEsc('switchtab_headline')?> + </div> + <span class="switchtab-text"><?=$this->translate('nohit_change_tab', ['%%activeTab%%' => $this->translate($this->recommend->getActiveTab($tabConfig)['label'])])?></span> <ul class="switchtab-links"> <?php $inactiveTabs = $this->recommend->getInactiveTabs($tabConfig); ?> <?php foreach ($inactiveTabs as $tab): ?> diff --git a/themes/fid_adlr/templates/RecordDriver/DefaultRecord/core.phtml b/themes/fid_adlr/templates/RecordDriver/DefaultRecord/core.phtml index e9dc46d7870..762cb367332 100644 --- a/themes/fid_adlr/templates/RecordDriver/DefaultRecord/core.phtml +++ b/themes/fid_adlr/templates/RecordDriver/DefaultRecord/core.phtml @@ -1,179 +1,203 @@ <!-- fid_adlr: RecordDriver - DefaultRecord - core --> +<?php $this->metadata()->generateMetatags($this->driver);?> <div class="media" vocab="http://schema.org/" resource="#record" typeof="<?=$this->driver->getSchemaOrgFormats()?> Product"> + <?php /* fid_adlr: remove offcanvas-toggler */ ?> <?php - $QRCode = $this->record($this->driver)->getQRCode("core"); - $coverDetails = $this->record($this->driver)->getCoverDetails('core', 'medium', $this->record($this->driver)->getThumbnail('large')); - $cover = $coverDetails['html']; - $preview = $this->record($this->driver)->getPreviews(); + $QRCode = $this->record($this->driver)->getQRCode("core"); + $coverDetails = $this->record($this->driver)->getCoverDetails('core', 'medium', $this->record($this->driver)->getThumbnail('large')); + $cover = $coverDetails['html']; + $preview = ($this->previewOverride ?? false) + ? $this->previewOverride : $this->record($this->driver)->getPreviews(); ?> - <?php if ($QRCode || $cover || $preview): ?> - <div class="media-left <?=$this->escapeHtmlAttr($coverDetails['size'])?> img-col"> - <?php /* Display thumbnail if appropriate: */ ?> - <?php if ($cover): ?> - <?=$cover?> - <?php /* if cover or qrcode or preview not set you can not finc-specific StyleBasedIcons, false position - GG */ ?> - <?php endif; ?> + <?php if ($QRCode || $cover || $preview): ?> + <div class="media-left <?=$this->escapeHtmlAttr($coverDetails['size'])?> img-col"> + <?php /* Display thumbnail if appropriate: */ ?> + <?php if ($cover): ?> + <?=$cover?> + <?php endif; ?> - <?php /* Display qrcode if appropriate: */ ?> - <?php if ($QRCode): ?> - <br/><img alt="<?=$this->transEsc('QR Code')?>" class="qrcode" src="<?=$this->escapeHtmlAttr($QRCode);?>"/> - <?php endif; ?> - <?php // if you have a preview tab but want to move or remove the preview link - // from this area of the record view, this can be split into - // getPreviewData() (should stay here) and - // getPreviewLink() (can go in your desired tab) ?> - <?php if ($preview): ?> - <div class="record-previews"> - <?=$preview?> - </div> - <?php endif; ?> - </div> - <?php /* if cover or qrcode or preview not set you can not finc-specific StyleBasedIcons, right position - GG */ ?> + <?php /* Display qrcode if appropriate: */ + /* finc removes span + class for accessibility */ ?> + <?php if ($QRCode): ?> + <br/><img alt="<?= $this->transEsc('QR Code') ?>" class="qrcode" src="<?= $this->escapeHtmlAttr($QRCode); ?>"/> + <?php endif; ?> + + <?php // if you have a preview tab but want to move or remove the preview link + // from this area of the record view, this can be split into + // getPreviewData() (should stay here) and + // getPreviewLink() (can go in your desired tab) ?> + <?php if ($preview): ?> + <div class="record-previews"> + <?= $preview ?> + </div> + <?php endif; ?> + </div> + <?php /* if cover or qrcode or preview not set you can not finc-specific StyleBasedIcons, right position - GG */ ?> <?php elseif ($this->record($this->driver)->showStyleBasedIcons()): ?> - <div class="media-left <?=$this->escapeHtmlAttr($coverDetails['size'])?> img-col"> - <?=$this->record($this->driver)->getRecordIcon('record-icon', false)?> - <?php /* EOF - finc-specific StyleBasedIcons */ ?> - </div> + <?php /* BOF - finc-specific StyleBasedIcons */ ?> + <div class="media-left <?= $this->escapeHtmlAttr($coverDetails['size']) ?> img-col"> + <?php /* fid_adlr: remove lable text by getRecordIcon('record-icon', false) #20112 */ ?> + <?= $this->record($this->driver)->getRecordIcon('record-icon', false) ?> + </div> <?php endif; ?> <div class="media-body"> + <?php /* fid_adlr: design detail view #15650, #16286 */ ?> <div class="col-md-8"> <div class="title-toolbar"> - <div class="result-body"> + <div class="result-body"> <?php /* finc: We want to get rid of trailing special chars in the title and limit its length to 100 chars; - in finc: keep schema name tag here!! #13861 - CK - */ - ?> - <?php /* finc: add schema tags for title #13850 - VE */ ?> - <?php /* #16676 separate title_sub from title_short- RL */ ?> - <h3 property="name"><?=$this->escapeHtml(preg_replace('/(\s[\/\.:]\s*)*$/', '', $this->truncate($this->driver->getShortTitle(), 100)))?> + in finc: keep schema name tag here!! #13861 - CK + finc: add schema tags for title #13850 - VE */ ?> + <?php /* fid_adlr: #16676 separate title_sub from title_short- RL */ ?> + <h3 property="name" lang=""><?=$this->escapeHtml(preg_replace('/(\s[\/\.:]\s*)*$/', '', $this->truncate($this->driver->getShortTitle(), 100)))?> <p class="sub"><?=$this->escapeHtml(preg_replace('/(\s[\/\.:]\s*)*$/', '', $this->truncate($this->driver->getSubtitle() . ' ' . $this->driver->getTitleSection(), 125)))?></p> </h3> - <?php /* fid_adlr: Remove summary refs #15650 - GG */ ?> - <?php if ($this->userlist()->getMode() !== 'disabled'): ?> - <?php /* Display the lists that this record is saved to */ ?> - <div class="savedLists hidden alert alert-info"> - <strong><?=$this->transEsc("Saved in")?>:</strong> - </div> + <?php if(!empty($this->extraControls)): ?> + <?=$this->extraControls['actionControls'] ?? ''?> + <?=$this->extraControls['availabilityInfo'] ?? ''?> <?php endif; ?> - </div> - <div class="result-links toolbar-details"> + + <?php /* fid_adlr: Remove summary refs #15650 - GG */ /* + <?php $summary = $this->driver->getSummary(); $summary = isset($summary[0]) ? $this->escapeHtml($summary[0]) : false; ?> + <?php if ($summary): ?> + <p><?=$this->truncate($summary, 300)?></p> + + <?php if(strlen($summary) > 300): ?> + <p><a href='<?=$this->recordLink()->getTabUrl($this->driver, 'Description')?>#tabnav'><?=$this->transEsc('Full description')?></a></p> + <?php endif; ?> + <?php endif; ?> + */ ?> + <?php if ($this->userlist()->getMode() !== 'disabled'): ?> - <?php if ($this->permission()->allowDisplay('feature.Favorites')): ?> - <?php /* Add to favorites; finc: keep Icon inside link - CK */ ?> - <div class="favorite"> - <a href="<?=$this->recordLink()->getActionUrl($this->driver, 'Save')?>" data-lightbox class="save-record result-link-label" data-id="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>" title="<?=$this->transEsc('Add to favorites')?>"> - <i class="icon icon-star icon-1.5x" aria-hidden="true"></i> - <span class="sr-only"><?=$this->transEsc('Add to favorites')?></span> - </a> - </div> - <div class="toolbar-menu"> - <a href="#" data-lightbox class="dropdown-toggle" id="toolbar-menu" - data-toggle="dropdown" aria-controls="toolbar-menu"> - <i class="icon icon-share-2 icon-1.5x" aria-hidden="true"></i> - </a> - <span id="toolbar-menu" class="dropdown-menu" aria-labelledby="toolbar-menu"> - <?=$this->record($this->driver)->getToolbar()?> - </span> - </div> - <br/> - <?php elseif ($block = $this->permission()->getAlternateContent('feature.Favorites')): ?> - <?=$block?> - <?php endif; ?> + <?php /* Display the lists that this record is saved to */ ?> + <p class="savedLists" aria-live="polite"> + <strong><?= $this->transEsc("Saved in") ?>:</strong> + </p> + <?php endif; ?> + </div> + <div class="result-links toolbar-details"> + <?php if ($this->userlist()->getMode() !== 'disabled'): ?> + <?php if ($this->permission()->allowDisplay('feature.Favorites')): ?> + <?php /* Add to favorites; finc: keep Icon inside link - CK */ ?> + <div class="favorite"> + <a href="<?=$this->recordLink()->getActionUrl($this->driver, 'Save')?>" data-lightbox class="save-record result-link-label" data-id="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>" title="<?=$this->transEsc('Add to favorites')?>"> + <i class="icon icon-star icon-1.5x" aria-hidden="true"></i> + <span class="sr-only"><?=$this->transEsc('Add to favorites')?></span> + </a> + </div> + <div class="toolbar-menu"> + <a href="#" data-lightbox class="dropdown-toggle" id="toolbar-menu" data-toggle="dropdown" aria-controls="toolbar-menu"> + <i class="icon icon-share-2 icon-1.5x" aria-hidden="true"></i> + </a> + <span id="toolbar-menu" class="dropdown-menu" aria-labelledby="toolbar-menu"> + <?=$this->record($this->driver)->getToolbar()?> + </span> + </div> + <br/> + <?php elseif ($block = $this->permission()->getAlternateContent('feature.Favorites')): ?> + <?=$block?> + <?php endif; ?> <?php endif; ?> + </div> </div> - </div> <?php /* Display Main Details */ ?> <?php - $formatter = $this->recordDataFormatter(); - $coreFields = $formatter->getData($this->driver, $formatter->getDefaults('core')); + $formatter = $this->recordDataFormatter(); + $coreFields = $formatter->getData($this->driver, $formatter->getDefaults('core')); ?> <?php if (!empty($coreFields)): ?> + <?php /* fid_adlr: do NOT add class "table-resp-data", it will break to table for small screens */ ?> <table class="table table-striped"> - <caption class="sr-only"><?=$this->transEsc('Bibliographic Details')?></caption> + <caption class="sr-only"><?= $this->transEsc('Bibliographic Details') ?></caption> <?php foreach ($coreFields as $current): ?> - <tr> - <th><?=$this->transEsc($current['label'])?>:</th> - <td><?=$current['value']?></td> - </tr> + <?php if ($current['label'] == null): ?> + <?= $current['value'] ?> + <?php else: ?> + <tr> + <th><?= $this->transEsc($current['label']) ?>:</th> + <td lang="" data-title="<?= $this->transEsc($current['label']) ?>:"><?= $current['value'] ?></td> + </tr> + <?php endif; ?> <?php endforeach; ?> </table> <?php endif; ?> <?php /* End Main Details */ ?> </div> + <?php /* fid_adlr: style get-it-box #16286, #16308 */ ?> <div class="record col-md-4 media-right-details"> <?php /* finc-specific: add toolbar to sidebar - CK */ ?> <?php //=$this->record($this->driver)->getToolbar()?> <?php /* GET IT-box refs #15930 - GG */ ?> <?php if (count($this->tabs) > 0): ?> - <a name="tabnavi"></a><?php /* Renamed, no typo, to render jump to tab ineffective */ ?> - <div class="record-tabs detailview-box-yellow"> - <?php if (count($this->tabs) > 0): ?> - <a name="tabnavi"></a><?php /* Renamed, no typo, to render jump to tab ineffective */ ?> - <div class="record-tabs getitbox"> - <ul class="recordTabs detailview-tab-nav"><?php /* DO NOT use standard data-tab option here as it triggers Foundation's normal tab behaviour while Vufind only uses tab appearance! FIXME CK */ ?> - <?php foreach ($this->tabs as $tab => $obj): ?> - <?php if (in_array($tab, ['Holdings', 'AcquisitionPDA'])): ?> - <?php // add current tab to breadcrumbs if applicable: - $desc = $obj->getDescription(); - $tab_classes = array(); - if (0 === strcasecmp($this->activeTab, $tab)) { - if (!$this->loadInitialTabWithAjax || !$obj->supportsAjax()) { - $tab_classes[] = 'active'; - } - $tab_classes[] = 'initiallyActive'; - $this->layout()->breadcrumbs .= '<li class="active">' . $this->transEsc($desc) . '</li>'; - $activeTabObj = $obj; - } + <a name="tabnavi"></a><?php /* Renamed, no typo, to render jump to tab ineffective */ ?> + <div class="record-tabs detailview-box-yellow"> + <?php if (count($this->tabs) > 0): ?> + <a name="tabnavi"></a><?php /* Renamed, no typo, to render jump to tab ineffective */ ?> + <div class="record-tabs getitbox"> + <ul class="recordTabs detailview-tab-nav"><?php /* DO NOT use standard data-tab option here as it triggers Foundation's normal tab behaviour while Vufind only uses tab appearance! FIXME CK */ ?> + <?php foreach ($this->tabs as $tab => $obj): ?> + <?php if (in_array($tab, ['Holdings', 'AcquisitionPDA'])): ?> + <?php // add current tab to breadcrumbs if applicable: + $desc = $obj->getDescription(); + $tab_classes = array(); + if (0 === strcasecmp($this->activeTab, $tab)) { + if (!$this->loadInitialTabWithAjax || !$obj->supportsAjax()) { + $tab_classes[] = 'active'; + } + $tab_classes[] = 'initiallyActive'; + $this->layout()->breadcrumbs .= '<li class="active">' . $this->transEsc($desc) . '</li>'; + $activeTabObj = $obj; + } - if (!$obj->isVisible()) { - $tab_classes[] = 'hidden'; - } - //if (!$obj->supportsAjax()) { $tab_classes[] = 'noajax'; } - ?> - <?php endif; ?> - <?php endforeach; ?> - </ul> + if (!$obj->isVisible()) { + $tab_classes[] = 'hidden'; + } + //if (!$obj->supportsAjax()) { $tab_classes[] = 'noajax'; } + ?> + <?php endif; ?> + <?php endforeach; ?> + </ul> - <?php /* next line: we need the id - CK */ ?> - <div class="tabs-content detailview-content" id="record-tabs"> - <?php if (!$this->loadInitialTabWithAjax || !isset($activeTabObj) || !$activeTabObj->supportsAjax()): ?> - <div class="content active <?=$this->activeTab?>-tab"> - <?=isset($activeTabObj) ? $this->record($this->driver)->getTab($activeTabObj) : ''?> - </div> - <?php endif; ?> + <?php /* next line: we need the id - CK */ ?> + <div class="tabs-content detailview-content" id="record-tabs"> + <?php if (!$this->loadInitialTabWithAjax || !isset($activeTabObj) || !$activeTabObj->supportsAjax()): ?> + <div class="content active <?=$this->activeTab?>-tab"> + <?=isset($activeTabObj) ? $this->record($this->driver)->getTab($activeTabObj) : ''?> + </div> + <?php endif; ?> + </div> </div> - </div> - <?php endif; ?> - <?php endif; ?> - </div> + <?php endif; ?> + </div> + <?php endif; ?> </div> </div> - <?php if (count($this->tabs) > 0): ?> - <?php foreach ($this->tabs as $tab => $obj): ?> - <?php if (!in_array($tab, ['Holdings', 'AcquisitionPDA'])): ?> - <?php // add current tab to breadcrumbs if applicable: - $desc = $obj->getDescription(); - ?> - <div class="facet-group" id="side-panel-<?=$desc?>"> - <button class="title collapsed" data-toggle="collapse" href="#side-collapse-<?=$tab?>"> - <?=$this->transEsc($desc)?> - </button> - <div id="side-collapse-<?=$tab?>" class="collapse"> - <div class="tab-content"> - <div class="tab-pane active <?=$this->escapeHtmlAttr($tab) ?>-tab"> - <div class="media-left <?=$this->escapeHtmlAttr($coverDetails['size'])?> img-col"></div> - <div class="media-body"> - <?=$this->record($this->driver)->getTab($obj)?> - </div> + <?php if (count($this->tabs) > 0): ?> + <?php foreach ($this->tabs as $tab => $obj): ?> + <?php if (!in_array($tab, ['Holdings', 'AcquisitionPDA'])): ?> + <?php // add current tab to breadcrumbs if applicable: + $desc = $obj->getDescription(); + ?> + <div class="facet-group" id="side-panel-<?=$desc?>"> + <button class="title collapsed" data-toggle="collapse" href="#side-collapse-<?=$tab?>"> + <?=$this->transEsc($desc)?> + </button> + <div id="side-collapse-<?=$tab?>" class="collapse"> + <div class="tab-content"> + <div class="tab-pane active <?=$this->escapeHtmlAttr($tab) ?>-tab"> + <div class="media-left <?=$this->escapeHtmlAttr($coverDetails['size'])?> img-col"></div> + <div class="media-body"> + <?=$this->record($this->driver)->getTab($obj)?> </div> </div> </div> </div> - <?php endif; ?> - <?php endforeach; ?> - <?php endif; ?> + </div> + <?php endif; ?> + <?php endforeach; ?> + <?php endif; ?> </div> <!-- fid_adlr: RecordDriver - DefaultRecord - core - END --> diff --git a/themes/fid_adlr/templates/RecordDriver/DefaultRecord/data-additionals.phtml b/themes/fid_adlr/templates/RecordDriver/DefaultRecord/data-additionals.phtml deleted file mode 100644 index 4b07a9c117c..00000000000 --- a/themes/fid_adlr/templates/RecordDriver/DefaultRecord/data-additionals.phtml +++ /dev/null @@ -1,20 +0,0 @@ -<!-- finc: RecordDriver - DefaultRecord - data-additionals --> -<?php if (!empty($data) && is_array($data)): ?> - <?php foreach ($data as $additional) : ?> - <?php if (isset($additional['identifier'])): ?> - <tr> - <th> - <?=$this->transEsc($additional['identifier'])?><?php if (!preg_match('/:+$/', $additional['identifier'])): ?>:<?php endif; ?> - </th> - <td> - <?php if (isset($additional['id'])): ?> - <a href="<?=$this->recordLink()->getUrl($additional['id'])?>"><?=$this->escapeHtml($additional['text'])?></a> - <?php else: ?> - <?=$this->escapeHtml($additional['text'])?> - <?php endif; ?> - </td> - </tr> - <?php endif; ?> - <?php endforeach; ?> -<?php endif; ?> -<!-- finc: RecordDriver - DefaultRecord - data-additionals - END --> diff --git a/themes/fid_adlr/templates/RecordDriver/DefaultRecord/list-entry.phtml b/themes/fid_adlr/templates/RecordDriver/DefaultRecord/list-entry.phtml index 74c802dfd79..20b29a79473 100644 --- a/themes/fid_adlr/templates/RecordDriver/DefaultRecord/list-entry.phtml +++ b/themes/fid_adlr/templates/RecordDriver/DefaultRecord/list-entry.phtml @@ -1,41 +1,41 @@ <!-- fid_adlr: RecordDriver - DefaultRecord - list-entry --> <?php -/* copied from finc */ -// Set up some convenience variables: -$id = $this->driver->getUniqueId(); -$source = $this->driver->getSourceIdentifier(); -if (isset($this->list) && is_object($this->list)) { - $list_id = $this->list->id; - $user_id = $this->list->user_id; -} else { - $list_id = null; - $user_id = $this->user ? $this->user->id : null; -} -// finc: next line finc-specific; required to display public favorites lists, #12052, see also below - CK -$isEditable = $this->user && $this->user->id === $user_id; -// Thumbnail -$coverDetails = $this->record($this->driver)->getCoverDetails('list-entry', 'medium', $this->recordLink()->getUrl($this->driver)); -$cover = $coverDetails['html']; -$thumbnail = false; -$thumbnailAlignment = $this->record($this->driver)->getThumbnailAlignment('list'); -/* #17046: use based style cover if is configure - GG */ -if ($cover): + /* copied from finc */ + // Set up some convenience variables: + $id = $this->driver->getUniqueId(); + $source = $this->driver->getSourceIdentifier(); + if (isset($this->list) && is_object($this->list)) { + $list_id = $this->list->id; + $user_id = $this->list->user_id; + } else { + $list_id = null; + $user_id = $this->user ? $this->user->id : null; + } + // finc: next line finc-specific; required to display public favorites lists, #12052, see also below - CK + $isEditable = $this->user && $this->user->id === $user_id; + // Thumbnail + $coverDetails = $this->record($this->driver)->getCoverDetails('list-entry', 'medium', $this->recordLink()->getUrl($this->driver)); + $cover = $coverDetails['html']; + $thumbnail = false; + $thumbnailAlignment = $this->record($this->driver)->getThumbnailAlignment('list'); + /* #17046: use based style cover if is configure - GG */ + if ($cover): ob_start(); ?> - <div class="media-<?=$thumbnailAlignment?> <?=$this->escapeHtmlAttr($coverDetails['size'])?>" aria-hidden="true"> + <div class="media-<?=$thumbnailAlignment?> <?=$this->escapeHtmlAttr($coverDetails['size'])?>" aria-hidden="true"> <?=$cover?> - </div> + </div> <?php $thumbnail = ob_get_contents(); ?> <?php ob_end_clean(); ?> - <?php /* Show finc style-based icons; */ ?> -<?php elseif ($this->record($this->driver)->showStyleBasedIcons()): ?> - <?php ob_start(); ?> - <div class="media-<?=$thumbnailAlignment?> record-icon"> + <?php /* fid_adlr: Show finc style-based icons; #17046, #20329 */ ?> + <?php elseif ($this->record($this->driver)->showStyleBasedIcons()): ?> + <?php ob_start(); ?> + <div class="media-<?=$thumbnailAlignment?> record-icon"> <?=$this->record($this->driver)->getRecordIcon('record-icon', false)?> - </div> + </div> <?php $thumbnail = ob_get_contents(); ?> <?php ob_end_clean(); ?> <?php /* Show finc style-based icons - END */ ?> -<?php endif; ?> + <?php endif; ?> <li class="result<?php if ($this->driver->supportsAjaxStatus()): ?> ajaxItem<?php endif ?>"> <input type="hidden" value="<?=$this->escapeHtmlAttr($id)?>" class="hiddenId"/> <input type="hidden" value="<?=$this->escapeHtmlAttr($source)?>" class="hiddenSource"/> @@ -46,23 +46,33 @@ if ($cover): <?php endif; ?> <div class="media-body"> <div class="result-body"> + <div class="resultItemLine1"> <?php $missing = $this->driver instanceof \VuFind\RecordDriver\Missing; ?> - <?php if ($missing && $this->driver->isCachedRecord()): ?> - <?php $describedById = $driver->getSourceIdentifier() . '|' . $driver->getUniqueId(); ?> - <span id="<?=$describedById?>" class="title" lang=""><?=$this->record($this->driver)->getTitleHtml()?></span> - <p class="alert alert-info"> - <?= $this->translate('record_from_cache')?> - <?php if ($queryParams = $this->record($this->driver)->getAdvancedSearchQueryParams()): ?> - <br/><a href="<?=$this->url('search-results', [], ['query' => $queryParams])?>"><?=$this->transEsc('search_cached_record', ['%%title_full%%' => $this->driver->getTitle()])?></a> - <?php endif; ?> - </p> - <?php elseif (!$missing): ?> - <?php $describedById = $driver->getSourceIdentifier() . '|' . $driver->getUniqueId(); ?> - <a href="<?=$this->recordLink()->getUrl($this->driver)?>" class="getFull" data-view="<?=$this->params->getOptions()->getListViewOption() ?>"> - <span id="<?=$describedById?>" class="title" lang=""><?=$this->record($this->driver)->getTitleHtml()?></span> - </a> - <?php endif;?> + <?php /* finc: restore missing favorites #17375 */ ?> + <?php if ($missing && $this->driver->isCachedRecord()): ?> + <?php /* finc: add aria-label and aria-describedby #18019 */ ?> + <?php $describedById = $driver->getSourceIdentifier() . '|' . $driver->getUniqueId(); ?> + <span id="<?=$describedById?>" class="title" lang=""><?=$this->record($this->driver)->getTitleHtml()?></span> + <?php /* finc uses <p> and aria for alerts */ ?> + <p class="alert alert-info" aria-live="polite"> + <?= $this->translate('record_from_cache')?> + <?php if ($queryParams = $this->record($this->driver)->getAdvancedSearchQueryParams()): ?> + <?php /* finc: add h2 for record title #22158 */ ?> + <h2> + <a href="<?=$this->url('search-results', [], ['query' => $queryParams])?>"><?=$this->transEsc('search_cached_record', ['%%title_full%%' => $this->driver->getTitle()])?></a> + </h2> + <?php endif; ?> + </p> + <?php elseif (!$missing): ?> + <?php /* finc adds aria-lable and aria-describedby #18019 */ ?> + <?php $describedById = $driver->getSourceIdentifier() . '|' . $driver->getUniqueId(); ?> + <a href="<?=$this->recordLink()->getUrl($this->driver)?>" class="getFull" data-view="<?=$this->params->getOptions()->getListViewOption() ?>"> + <?php /* finc: change span to h2 element #22158 */ ?> + <h2 id="<?=$describedById?>" class="title" lang=""><?=$this->record($this->driver)->getTitleHtml()?></h2> + </a> + <?php endif; ?> + <?php /* finc: restore missing favorites #17375 - END */ ?> </div> <div class="resultItemLine2"> @@ -77,28 +87,28 @@ if ($cover): <a href="<?=$this->record($this->driver)->getLink('author', $summAuthor)?>"><?=$this->escapeHtml($summAuthor)?></a><?=($i + 1 < $authorCount ? ';' : '')?> <?php endforeach; ?> <?php endif; ?> + <?php endif; ?> + </div> - <?php $journalTitle = $this->driver->getContainerTitle(); + <div class="resultItemLine3"> + <?php $journalTitle = $this->driver->getContainerTitle(); $summDate = $this->driver->getPublicationDates(); ?> - <?php if (!empty($journalTitle)): ?> - <?=!empty($summAuthor) ? '<br/>' : ''?> - <?=/* TODO: handle highlighting more elegantly here */ $this->transEsc('Published in') . ' <a href="' . $this->record($this->driver)->getLink('journaltitle', str_replace(['{{{{START_HILITE}}}}', '{{{{END_HILITE}}}}'], '', $journalTitle)) . '">' . $this->highlight($journalTitle) . '</a>';?> - <?=!empty($summDate) ? ' (' . $this->escapeHtml($summDate[0]) . ')' : ''?> - <?php elseif (!empty($summDate)): ?> - <?=!empty($summAuthor) ? '<br/>' : ''?> - <?=$this->transEsc('Published') . ' ' . $this->escapeHtml($summDate[0])?> - <?php endif; ?> - <?php $summInCollection = $this->driver->getContainingCollections(); - if (false && !empty($summInCollection)): ?> - <?php foreach ($summInCollection as $collId => $collText): ?> - <div> - <b><?=$this->transEsc("in_collection_label")?></b> - <a class="collectionLinkText" href="<?=$this->url('collection', ['id' => $collId])?>?recordID=<?=urlencode($this->driver->getUniqueID())?>"> - <?=$this->escapeHtml($collText)?> - </a> - </div> - <?php endforeach; ?> - <?php endif; ?> + <?php if (!empty($journalTitle)): ?> + <?=/* TODO: handle highlighting more elegantly here */ $this->transEsc('Published in') . ' <a href="' . $this->record($this->driver)->getLink('journaltitle', str_replace(['{{{{START_HILITE}}}}', '{{{{END_HILITE}}}}'], '', $journalTitle)) . '">' . $this->highlight($journalTitle) . '</a>';?> + <?=!empty($summDate) ? ' (' . $this->escapeHtml($summDate[0]) . ')' : ''?> + <?php elseif (!empty($summDate)): ?> + <?=$this->transEsc('Published') . ' ' . $this->escapeHtml($summDate[0])?> + <?php endif; ?> + <?php $summInCollection = $this->driver->getContainingCollections(); + if (false && !empty($summInCollection)): ?> + <?php foreach ($summInCollection as $collId => $collText): ?> + <div> + <strong><?=$this->transEsc("in_collection_label")?></strong> + <a class="collectionLinkText" href="<?=$this->record($this->driver)->getLink('collection', $collid)?>"> + <?=$this->escapeHtml($collText)?> + </a> + </div> + <?php endforeach; ?> <?php endif; ?> </div> @@ -117,7 +127,7 @@ if ($cover): <?php $listTags = ($this->usertags()->getMode() !== 'disabled') ? $this->driver->getTags( null === $list_id ? true : $list_id, // get tags for all lists if no single list is selected $user_id, 'tag' - ) : []; + ) : []; ?> <?php if (count($listTags) > 0): ?> <strong><?=$this->transEsc('Your Tags')?>:</strong> @@ -135,11 +145,12 @@ if ($cover): <?php endforeach; ?> <?php endif; ?> + <?php /* finc: avoid call of count() on null #16122 */ ?> <?php if (!empty($this->lists)): ?> <strong><?=$this->transEsc('Saved in')?>:</strong> <?php $i = 0; foreach ($this->lists as $current): ?> - <a href="<?=$this->url('userList', ['id' => $current->id])?>"><?=$this->escapeHtml($current->title)?></a><?php if ($i++ < count($this->lists) - 1): ?>,<?php endif; ?> + <a href="<?=$this->url('userList', ['id' => $current->id])?>"><?=$this->escapeHtml($current->title)?></a><?php if ($i++ < count($this->lists) - 1): ?>,<?php endif; ?> <?php endforeach; ?> <br/> <?php endif; ?> @@ -156,54 +167,52 @@ if ($cover): </span> <div class="locationDetails"></div> <?php else: ?> - <?php $summCallNo = $this->driver->getCallNumber(); - if (!empty($summCallNo)): ?> + <?php $summCallNo = $this->driver->getCallNumber(); if (!empty($summCallNo)): ?> <strong><?=$this->transEsc('Call Number')?>:</strong> <?=$this->escapeHtml($summCallNo)?> <?php endif; ?> <?php endif; ?> </div> <?php /* We need to find out if we're supposed to display an OpenURL link ($openUrlActive), - but even if we don't plan to display the link, we still want to get the $openUrl - value for use in generating a COinS (Z3988) tag -- see bottom of file. - */ - $openUrl = $this->openUrl($this->driver, 'results'); - $openUrlActive = $openUrl->isActive(); - $doi = $this->doi($this->driver, 'results'); - $doiActive = $doi->isActive(); - // Account for replace_other_urls setting - $urls = $this->record($this->driver)->getLinkDetails($openUrlActive); + but even if we don't plan to display the link, we still want to get the $openUrl + value for use in generating a COinS (Z3988) tag -- see bottom of file. + */ + $openUrl = $this->openUrl($this->driver, 'results'); + $openUrlActive = $openUrl->isActive(); + $doi = $this->doi($this->driver, 'results'); + $doiActive = $doi->isActive(); + // Account for replace_other_urls setting + $urls = $this->record($this->driver)->getLinkDetails($openUrlActive); - if ($openUrlActive || $doiActive || !empty($urls)): - ?> + if ($openUrlActive || $doiActive || !empty($urls)): + ?> <?php if ($openUrlActive): ?> - <br/> - <?=$openUrl->renderTemplate()?> - <?php endif; ?> + <br/> + <?=$openUrl->renderTemplate()?> + <?php endif;?> <?php if ($doiActive): ?> - <br/> - <?=$doi->renderTemplate()?> - <?php endif; ?> + <br/> + <?=$doi->renderTemplate()?> + <?php endif; ?> - <?php if (!is_array($urls)) { - $urls = []; - } - if (!$this->driver->isCollection()): - foreach ($urls as $current): ?> + <?php if (!is_array($urls)) { $urls = []; } + if(!$this->driver->isCollection()): + foreach ($urls as $current): ?> + <?php /* finc: add external link view helper #20869 */ ?> <?= $this->externalLink( - $this->escapeHtmlAttr($this->proxyUrl($current['url'])), - '<i class="fa fa-external-link" aria-hidden="true"></i>' - . ($current['url'] == $current['desc'] ? $this->transEsc('Get full text') : $this->escapeHtml($current['desc'])), - ['class' => 'fulltext'], - true + $this->escapeHtmlAttr($this->proxyUrl($current['url'])), + '<i class="fa fa-external-link" aria-hidden="true"></i>' + . ($current['url'] == $current['desc'] ? $this->transEsc('Get full text') : $this->escapeHtml($current['desc'])), + ['class' => 'fulltext'], + true ) ?> - <?php endforeach; ?> + <?php endforeach; ?> + <?php endif; ?> <?php endif; ?> - <?php endif; ?> <br/> - <?=$this->record($this->driver)->getFormatList()?> + <?=$this->record($this->driver)->getFormatList() ?> <?php if (!$openUrlActive && empty($urls) && $this->driver->supportsAjaxStatus()): ?> <span class="status ajax-availability hidden"><?=$this->transEsc('Loading')?>...</span> @@ -214,23 +223,23 @@ if ($cover): </div> <div class="result-links hidden-print"> - <?php /* finc: next line finc-specific; required to display public favorites lists, #12052, see also above - CK */ ?> - <?php if ($isEditable): ?> + <?php /* finc: next line required to display public favorites lists, #12052, see also above - CK */ ?> + <?php if ($isEditable): ?> <?php /* #21900 use adlr-design by setting classname btn btn-link and move i-element inside of a-element; open in data-lightbox */ ?> <a data-lightbox href="<?=$this->url('myresearch-edit')?>?id=<?=urlencode($id)?>&source=<?=urlencode($source)?><?php if (null !== $list_id): ?>&list_id=<?=urlencode($list_id)?><?php endif; ?>" class="edit tool btn btn-link" aria-label="<?=$this->transEsc('Edit').': '.$this->record($this->driver)->getTitleHtml()?>"><i class="fa fa-fw fa-edit" aria-hidden="true"></i> <?=$this->transEsc('Edit')?></a><br/> <?php /* Use a different delete URL if we're removing from a specific list or the overall favorites: */ - $deleteUrl = null === $list_id - ? $this->url('myresearch-favorites') - : $this->url('userList', ['id' => $list_id]); - $deleteUrlGet = $deleteUrl . '?delete=' . urlencode($id) . '&source=' . urlencode($source); + $deleteUrl = null === $list_id + ? $this->url('myresearch-favorites') + : $this->url('userList', ['id' => $list_id]); + $deleteUrlGet = $deleteUrl . '?delete=' . urlencode($id) . '&source=' . urlencode($source); - /* #17712 not necessary to fetch items after deleting by ajax in controller */ - $deleteUrl .= '?layout=lightbox'; - $dLabel = 'delete-label-' . preg_replace('[\W]', '-', $id); + /* #17712 not necessary to fetch items after deleting by ajax in controller */ + $deleteUrl .= '?layout=lightbox'; + $dLabel = 'delete-label-' . preg_replace('[\W]', '-', $id); ?> <div class="dropdown"> - <?php /* #21900 use adlr-design by setting classname btn btn-link and move i-element inside of a-element */ ?> + <?php /* fid_adlr: #21900 use adlr-design by setting classname btn btn-link and move i-element inside of a-element */ ?> <a class="dropdown-toggle btn btn-link" id="<?=$dLabel?>" role="button" data-toggle="dropdown" href="<?=$deleteUrlGet?>" aria-label="<?=$this->transEsc('Delete').': '.$this->record($this->driver)->getTitleHtml()?>"> <i class="fa fa-fw fa-trash-o" aria-hidden="true"></i> <?=$this->transEsc('Delete')?> </a> @@ -238,10 +247,10 @@ if ($cover): <li> <?php /* #17711 give user feedback and dont reload page after deleting */ ?> <a href="javascript:document.getElementById('<?=$dLabel?>').focus();" title="<?= $this->transEsc('confirm_delete_brief') ?>" onClick="$.post( - '<?= $deleteUrl ?>', + '<?=$deleteUrl?>', { - 'delete':'<?= $this->escapeJs($id) ?>', - 'source':'<?= $this->escapeJs($source) ?>', + 'delete':'<?=$this->escapeJs($id) ?>', + 'source':'<?=$this->escapeJs($source) ?>', 'confirm':true }, function(){ $('input[value=<?=$id?>]').parent().remove(0); @@ -254,25 +263,24 @@ if ($cover): }).fail(function(data) { $('.fa-spinner.fa-spin').removeClass('fa-spinner fa-spin').addClass('fa-trash-o'); VuFind.lightbox.alert( - '<?= $this->transEsc('Delete') . ' ' . $this->transEsc('of') . ' ' . htmlspecialchars($this->record($this->driver)->getTitleHtml()) . ': ' . $this->transEsc('errorcode_error')?>', + '<?=$this->transEsc('Delete') . ' ' . $this->transEsc('of') . ' ' . htmlspecialchars($this->record($this->driver)->getTitleHtml()) . ': ' . $this->transEsc('errorcode_error')?>', 'danger' ) }); $(this).closest('.dropdown').find('.fa-trash-o').removeClass('fa-trash-o').addClass('fa-spinner fa-spin');"> - <?= $this->transEsc('confirm_dialog_yes') ?> + <?=$this->transEsc('confirm_dialog_yes')?> </a> </li> <li><a href="javascript:document.getElementById('<?=$dLabel?>').focus();"><?=$this->transEsc('confirm_dialog_no')?></a></li> </ul> </div> - <?=$this->driver->supportsCoinsOpenUrl() ? '<span class="Z3988" title="' . $this->escapeHtmlAttr($this->driver->getCoinsOpenUrl()) . '"></span>' : ''?> + <?=$this->driver->supportsCoinsOpenUrl()?'<span class="Z3988" title="' . $this->escapeHtmlAttr($this->driver->getCoinsOpenUrl()) . '"></span>':''?> <?php endif; ?> </div> </div> - <?php if ($thumbnail && $thumbnailAlignment == 'right'): ?> - <?=$thumbnail?> + <?=$thumbnail ?> <?php endif; ?> </div> </li> diff --git a/themes/fid_adlr/templates/RecordDriver/DefaultRecord/offcanvas-toggler-myresearch.phtml b/themes/fid_adlr/templates/RecordDriver/DefaultRecord/offcanvas-toggler-myresearch.phtml index 1528473541c..277d4b4a00e 100644 --- a/themes/fid_adlr/templates/RecordDriver/DefaultRecord/offcanvas-toggler-myresearch.phtml +++ b/themes/fid_adlr/templates/RecordDriver/DefaultRecord/offcanvas-toggler-myresearch.phtml @@ -1,9 +1,11 @@ <!-- fid_adlr: RecordDriver - DefaultRecord - offcanvas-toggler-myresearch --> <?php ?> <span class="offcanvas-toggler"> - <button class="search-filter-toggle btn btn-primary visible-xs visible-sm" href="#search-sidebar" data-toggle="offcanvas" title="<?=$this->transEsc('sidebar_expand')?>"> + <?php /* fid_adlr: add visible-sm #16385 */ ?> + <a class="search-filter-toggle btn btn-primary visible-xs visible-sm" href="#myresearch-sidebar" data-toggle="offcanvas" aria-label="<?=$this->transEsc('sidebar_expand')?>"> <?=$this->transEsc('offcanvas-toggler-myresearch')?> + <?php /* fid_adlr: add icon #16190 */ ?> <i class="icon icon-plus right" aria-hidden="true"></i> - </button> + </a> </span> <!-- fid_adlr: RecordDriver - DefaultRecord - offcanvas-toggler-myresearch - END --> diff --git a/themes/fid_adlr/templates/RecordDriver/DefaultRecord/result-list.phtml b/themes/fid_adlr/templates/RecordDriver/DefaultRecord/result-list.phtml index 1451af1b528..01eea945eb6 100644 --- a/themes/fid_adlr/templates/RecordDriver/DefaultRecord/result-list.phtml +++ b/themes/fid_adlr/templates/RecordDriver/DefaultRecord/result-list.phtml @@ -5,6 +5,8 @@ $coverDetails = $this->record($this->driver)->getCoverDetails('result-list', 'me $cover = $coverDetails['html']; $thumbnail = false; $thumbnailAlignment = $this->record($this->driver)->getThumbnailAlignment('result'); +/* finc adds $describedById #18737 */ +$describedById = $driver->getSourceIdentifier() . '|' . $driver->getUniqueId(); if ($cover): ob_start(); ?> <div class="media-<?=$thumbnailAlignment?> <?=$this->escapeHtmlAttr($coverDetails['size'])?>"> @@ -32,8 +34,10 @@ if ($cover): <?php endif ?> <div class="media-body"> <div class="result-body"> + <?php /* fid_adlr: add classname for change labels #16676; add div #4222 */ ?> <div class="margin-btm"> - <a href="<?=$this->recordLink()->getUrl($this->driver)?>" class="title getFull" data-view="<?=$this->params->getOptions()->getListViewOption()?>"> + <?php /* finc adds aria and lang code */ ?> + <a id="<?=$describedById?>" href="<?=$this->recordLink()->getUrl($this->driver)?>" class="title getFull" data-view="<?=$this->params->getOptions()->getListViewOption()?>" lang=""> <?=$this->record($this->driver)->getTitleHtml()?> </a> </div> @@ -88,11 +92,10 @@ if ($cover): <?php /* finc-specific: nxt line #8639 - CK */ ?> <?=$this->transEsc('Published') . ' ' . $this->escapeHtml($summDate)?> <?php endif; ?> - <?php $summInCollection = $this->driver->getContainingCollections(); - if (!empty($summInCollection)): ?> + <?php $summInCollection = $this->driver->getContainingCollections(); if (!empty($summInCollection)): ?> <?php foreach ($summInCollection as $collId => $collText): ?> <div> - <strong><?=$this->transEsc("in_collection_label")?></strong> + <strong><?=$this->transEsc("in_collection_label")?></strong> <a class="collectionLinkText" href="<?=$this->recordLink()->getUrl($collId, $collId, 'ParentID')?>"> <?=$this->escapeHtml($collText)?> </a> @@ -132,7 +135,7 @@ if ($cover): <?php endif; ?> <?php endif; ?> </div> -<?php */ ?> + <?php */ ?> <?php /* fid_adlr: Remove open urls refs #15646 - GG */ ?> <div class="result-formats"> @@ -144,10 +147,10 @@ if ($cover): <?php $sourceID = $this->driver->getSourceID(); $collections = $this->driver->getCollection();?> <span class="branding label SID<?= ($sourceID) ?> <?php foreach ($collections as $collection): ?> collection-<?=$collection?><?php endforeach; ?>" title="<?= $this->transEsc("Branding Title From")?> <?= $this->transEsc("Branding SID$sourceID") ?>"> - <?=$this->transEsc("Branding SID$sourceID", [], "")?> - <?php foreach ($collections as $collection): ?> - <?=$this->transEsc("Branding collection-$collection", [], "")?> - <?php endforeach; ?> + <?=$this->transEsc("Branding SID$sourceID", [], "")?> + <?php foreach ($collections as $collection): ?> + <?=$this->transEsc("Branding collection-$collection", [], "")?> + <?php endforeach; ?> </span> </span> <span class="left"> @@ -156,13 +159,13 @@ if ($cover): <?php endforeach; ?> </span> <span class="left"> - <?php foreach ($this->driver->getMegaCollection() as $currentCollection): ?> - <?php if ($currentCollection): ?> - <span class="branding label collection-<?= str_replace(" ", "-", strtolower($currentCollection)) ?>" - title="<?= $this->transEsc("Branding Title From")?> <?= $this->transEsc("Branding $currentCollection") ?>"><?= $this->transEsc("Branding $currentCollection") ?> - </span> - <?php endif; ?> - <?php endforeach; ?> + <?php foreach ($this->driver->getMegaCollection() as $currentCollection): ?> + <?php if ($currentCollection): ?> + <span class="branding label collection-<?= str_replace(" ", "-", strtolower($currentCollection)) ?>" + title="<?= $this->transEsc("Branding Title From")?> <?= $this->transEsc("Branding $currentCollection") ?>"><?= $this->transEsc("Branding $currentCollection") ?> + </span> + <?php endif; ?> + <?php endforeach; ?> </span> <?php /* Labels - END */ ?> </div> @@ -173,9 +176,9 @@ if ($cover): */ ?> </div> <div class="result-links hidden-print"> - + <?php /* fid_adlr: Do NOT display qrcode */ ?> <?php if ($this->cart()->isActiveInSearch() && $this->params->getOptions()->supportsCart() && $this->cart()->isActive()): ?> - <?=$this->render('record/cart-buttons.phtml', ['id' => $this->driver->getUniqueId(), 'source' => $this->driver->getSourceIdentifier()]);?><br/> + <?=$this->render('record/cart-buttons.phtml', ['id' => $this->driver->getUniqueId(), 'source' => $this->driver->getSourceIdentifier()]); ?><br/> <?php endif; ?> <?php if ($this->userlist()->getMode() !== 'disabled'): ?> @@ -189,14 +192,14 @@ if ($cover): <?=$block?> <?php endif; ?> <?php /* Saved lists */ ?> - <div class="savedLists alert alert-info hidden"> + <p class="savedLists" aria-live="polite"> <strong><?=$this->transEsc("Saved in")?>:</strong> - </div> + </p> <?php endif; ?> <?php /* fid_adlr: Remove Hierarchy tree icon at result list refs #15646 - GG */ ?> - <?=$this->driver->supportsCoinsOpenUrl() ? '<span class="Z3988" title="' . $this->escapeHtmlAttr($this->driver->getCoinsOpenUrl()) . '"></span>' : ''?> + <?=$this->driver->supportsCoinsOpenUrl()?'<span class="Z3988" title="' . $this->escapeHtmlAttr($this->driver->getCoinsOpenUrl()) . '"></span>':''?> </div> <?php if ($this->driver->tryMethod('hasSubRecords')): ?> <?=$this->render('RecordDriver/DefaultRecord/result-list-grouping-button')?> @@ -206,7 +209,7 @@ if ($cover): <?php endif; ?> </div> <?php if ($thumbnail && $thumbnailAlignment == 'right'): ?> - <?=$thumbnail?> + <?=$thumbnail ?> <?php endif ?> </div> <!-- fid_adlr: recordDriver - DefaultRecord - result-list - END --> diff --git a/themes/fid_adlr/templates/RecordDriver/DefaultRecord/toolbar.phtml b/themes/fid_adlr/templates/RecordDriver/DefaultRecord/toolbar.phtml index f8b9808ac40..12295ebce7b 100644 --- a/themes/fid_adlr/templates/RecordDriver/DefaultRecord/toolbar.phtml +++ b/themes/fid_adlr/templates/RecordDriver/DefaultRecord/toolbar.phtml @@ -1,34 +1,26 @@ <!-- fid_adlr: recordDriver - DefaultRecord - toolbar --> <?php -$addThis = $this->addThis(); -if (!empty($addThis)) { - $this->headScript()->appendFile('https://s7.addthis.com/js/250/addthis_widget.js?pub=' . urlencode($addThis)); -} + $addThis = $this->addThis(); + if (!empty($addThis)) { + $this->headScript()->appendFile('https://s7.addthis.com/js/250/addthis_widget.js?pub=' . urlencode($addThis)); + } -// Set up some variables for convenience: -$cart = $this->cart(); -$cartId = $this->driver->getSourceIdentifier() . '|' . $this->driver->getUniqueId(); + // finc sets up some variables for bookbag button: + $cart = $this->cart(); + $cartId = $this->driver->getSourceIdentifier() . '|' . $this->driver->getUniqueId(); ?> -<?php /* finc: we use nav-stacked for display in sidebar, CK */ ?> <ul class="record-nav nav nav-pills nav-stacked hidden-print"> - <?php /* finc: we use the sr-only description, CK */ ?> <li class="sr-only"><?=$this->transEsc('Toolbar')?></li> <?php if (count($this->driver->getCitationFormats()) > 0): ?> - <li> - <a class="cite-record" data-lightbox href="<?=$this->recordLink()->getActionUrl($this->driver, 'Cite')?>" rel="nofollow"><?php /* <i class="fa fa-asterisk" aria-hidden="true"></i> */ ?> <?=$this->transEsc('Cite this')?></a> - </li> + <li><a class="cite-record" data-lightbox href="<?=$this->recordLink()->getActionUrl($this->driver, 'Cite')?>" rel="nofollow"><?php /* <i class="fa fa-asterisk" aria-hidden="true"></i> */ ?> <?=$this->transEsc('Cite this')?></a></li> <?php endif; ?> - <?php /* finc: we don't use sms, CK */ - /* + <?php /* finc: we don't use sms, CK <?php if ($this->accountCapabilities()->getSmsSetting() !== 'disabled'): ?> - <li><a class="sms-record" data-lightbox href="<?=$this->recordLink()->getActionUrl($this->driver, 'SMS')?>" rel="nofollow"><i class="fa fa-mobile" aria-hidden="true"></i> <?=$this->transEsc('Text this')?></a></li> + <li role="none"><a class="sms-record" data-lightbox href="<?=$this->recordLink()->getActionUrl($this->driver, 'SMS')?>" rel="nofollow"><i class="fa fa-mobile" aria-hidden="true"></i> <?=$this->transEsc('Text this')?></a></li> <?php endif; ?> */ ?> - <li> - <a class="mail-record" data-lightbox href="<?=$this->recordLink()->getActionUrl($this->driver, 'Email')?>" rel="nofollow"><?php /* <i class="fa fa-envelope" aria-hidden="true"></i> */ ?><?=$this->transEsc('Email this')?></a> - </li> - + <li><a class="mail-record" data-lightbox href="<?=$this->recordLink()->getActionUrl($this->driver, 'Email')?>" rel="nofollow"><?php /* <i class="fa fa-envelope" aria-hidden="true"></i> */ ?><?=$this->transEsc('Email this')?></a></li> <?php $exportFormats = $this->export()->getFormatsForRecord($this->driver); ?> <?php if (count($exportFormats) > 0): ?> <?php foreach ($exportFormats as $exportFormat): ?> @@ -41,9 +33,7 @@ $cartId = $this->driver->getSourceIdentifier() . '|' . $this->driver->getUniqueI <?php endif; ?> <?php if (!empty($addThis)): ?> - <li> - <a class="addThis addthis_button" href="https://www.addthis.com/bookmark.php?v=250&pub=<?=urlencode($addThis)?>"><i class="fa fa-bookmark" aria-hidden="true"></i> <?=$this->transEsc('Bookmark')?></a> - </li> + <li><a class="addThis addthis_button" href="https://www.addthis.com/bookmark.php?v=250&pub=<?=urlencode($addThis)?>"><i class="fa fa-bookmark" aria-hidden="true"></i> <?=$this->transEsc('Bookmark')?></a></li> <?php endif; ?> <li class="bookbag-menu"> <?=$this->render('record/cart-buttons.phtml', ['id' => $this->driver->getUniqueId(), 'source' => $this->driver->getSourceIdentifier()]);?> diff --git a/themes/fid_adlr/templates/RecordDriver/SolrAI/core.phtml b/themes/fid_adlr/templates/RecordDriver/SolrAI/core.phtml index 63f79ee6ba1..efc409c35c7 100644 --- a/themes/fid_adlr/templates/RecordDriver/SolrAI/core.phtml +++ b/themes/fid_adlr/templates/RecordDriver/SolrAI/core.phtml @@ -1,184 +1,203 @@ <!-- fid_adlr: recordDriver - SolrAI - core --> <?php /* Created in 4826, based on DefaultRecord/core, compare with DefaultRecord/core during updates! */ ?> +<?php $this->metadata()->generateMetatags($this->driver);?> <div class="media" vocab="http://schema.org/" resource="#record" typeof="<?=$this->driver->getSchemaOrgFormats()?> Product"> <?php - $QRCode = $this->record($this->driver)->getQRCode("core"); - $coverDetails = $this->record($this->driver)->getCoverDetails('core', 'medium', $this->record($this->driver)->getThumbnail('large')); - $cover = $coverDetails['html']; - $preview = $this->record($this->driver)->getPreviews(); + $QRCode = $this->record($this->driver)->getQRCode("core"); + $coverDetails = $this->record($this->driver)->getCoverDetails('core', 'medium', $this->record($this->driver)->getThumbnail('large')); + $cover = $coverDetails['html']; + $preview = ($this->previewOverride ?? false) + ? $this->previewOverride : $this->record($this->driver)->getPreviews(); ?> - <?php if ($QRCode || $cover || $preview): ?> - <div class="media-left <?=$this->escapeHtmlAttr($coverDetails['size'])?> img-col"> - <?php /* Display thumbnail if appropriate: */ ?> - <?php if ($cover): ?> - <?=$cover?> - <?php /* if cover or qrcode or preview not set you can not finc-specific StyleBasedIcons, false position - GG */ ?> - <?php endif; ?> + <?php if ($QRCode || $cover || $preview): ?> + <div class="media-left <?=$this->escapeHtmlAttr($coverDetails['size'])?> img-col"> + <?php /* Display thumbnail if appropriate: */ ?> + <?php if ($cover): ?> + <?=$cover?> + <?php endif; ?> - <?php /* Display qrcode if appropriate: */ ?> - <?php if ($QRCode): ?> - - <br/><img alt="<?=$this->transEsc('QR Code')?>" class="qrcode" src="<?=$this->escapeHtmlAttr($QRCode);?>"/> - - <?php endif; ?> + <?php /* Display qrcode if appropriate: */ + /* finc removes span + class for accessibility */ ?> + <?php if ($QRCode): ?> + <br/><img alt="<?= $this->transEsc('QR Code') ?>" class="qrcode" src="<?= $this->escapeHtmlAttr($QRCode); ?>"/> + <?php endif; ?> - <?php // if you have a preview tab but want to move or remove the preview link - // from this area of the record view, this can be split into - // getPreviewData() (should stay here) and - // getPreviewLink() (can go in your desired tab) ?> - <?php if ($preview): ?> - <div class="record-previews"> - <?=$preview?> - </div> - <?php endif; ?> - </div> - <?php /* if cover or qrcode or preview not set you can not finc-specific StyleBasedIcons, right position - GG */ ?> + <?php // if you have a preview tab but want to move or remove the preview link + // from this area of the record view, this can be split into + // getPreviewData() (should stay here) and + // getPreviewLink() (can go in your desired tab) ?> + <?php if ($preview): ?> + <div class="record-previews"> + <?= $preview ?> + </div> + <?php endif; ?> + </div> + <?php /* if cover or qrcode or preview not set you can not finc-specific StyleBasedIcons, right position - GG */ ?> <?php elseif ($this->record($this->driver)->showStyleBasedIcons()): ?> - <div class="media-left <?=$this->escapeHtmlAttr($coverDetails['size'])?> img-col"> - <?=$this->record($this->driver)->getRecordIcon('record-icon', false)?> - <?php /* EOF - finc-specific StyleBasedIcons */ ?> - </div> + <?php /* BOF - finc-specific StyleBasedIcons */ ?> + <div class="media-left <?= $this->escapeHtmlAttr($coverDetails['size']) ?> img-col"> + <?php /* fid_adlr: remove lable text by getRecordIcon('record-icon', false) #20112 */ ?> + <?= $this->record($this->driver)->getRecordIcon('record-icon', false) ?> + </div> <?php endif; ?> <div class="media-body"> + <?php /* fid_adlr: design detail view #15650, #16286 */ ?> <div class="col-md-8"> <div class="title-toolbar"> <div class="result-body"> - <?php /* finc: We want to get rid of trailing special chars in the title and limit its length to 100 chars; - in finc: keep schema name tag here!! #13861 - CK - */ - ?> - <?php /* finc: add schema tags for title #13850 - VE */ ?> - <?php /* #16676 separate title_sub from title_short- RL */ ?> - <h3 property="name"><?=$this->escapeHtml(preg_replace('/(\s[\/\.:]\s*)*$/', '', $this->truncate($this->driver->getShortTitle(), 100)))?> - <p class="sub"><?=$this->escapeHtml(preg_replace('/(\s[\/\.:]\s*)*$/', '', $this->truncate($this->driver->getSubtitle() . ' ' . $this->driver->getTitleSection(), 125)))?></p> - </h3> + <?php /* finc: We want to get rid of trailing special chars in the title and limit its length to 100 chars; + in finc: keep schema name tag here!! #13861 - CK + finc: add schema tags for title #13850 - VE */ ?> + <?php /* fid_adlr: #16676 separate title_sub from title_short- RL */ ?> + <h3 property="name" lang=""><?=$this->escapeHtml(preg_replace('/(\s[\/\.:]\s*)*$/', '', $this->truncate($this->driver->getShortTitle(), 100)))?> + <p class="sub"><?=$this->escapeHtml(preg_replace('/(\s[\/\.:]\s*)*$/', '', $this->truncate($this->driver->getSubtitle() . ' ' . $this->driver->getTitleSection(), 125)))?></p> + </h3> - <?php /* fid_adlr: Remove summary refs #15650 - GG */ ?> + <?php if(!empty($this->extraControls)): ?> + <?=$this->extraControls['actionControls'] ?? ''?> + <?=$this->extraControls['availabilityInfo'] ?? ''?> + <?php endif; ?> - <?php if ($this->userlist()->getMode() !== 'disabled'): ?> - <?php /* Display the lists that this record is saved to */ ?> - <div class="savedLists hidden alert alert-info"> - <strong><?=$this->transEsc("Saved in")?>:</strong> - </div> + <?php /* fid_adlr: Remove summary refs #15650 - GG */ /* + <?php $summary = $this->driver->getSummary(); $summary = isset($summary[0]) ? $this->escapeHtml($summary[0]) : false; ?> + <?php if ($summary): ?> + <p><?=$this->truncate($summary, 300)?></p> + + <?php if(strlen($summary) > 300): ?> + <p><a href='<?=$this->recordLink()->getTabUrl($this->driver, 'Description')?>#tabnav'><?=$this->transEsc('Full description')?></a></p> <?php endif; ?> + <?php endif; ?> + */ ?> + + <?php if ($this->userlist()->getMode() !== 'disabled'): ?> + <?php /* Display the lists that this record is saved to */ ?> + <p class="savedLists" aria-live="polite"> + <strong><?= $this->transEsc("Saved in") ?>:</strong> + </p> + <?php endif; ?> </div> <div class="result-links toolbar-details"> - <?php if ($this->userlist()->getMode() !== 'disabled'): ?> - <?php if ($this->permission()->allowDisplay('feature.Favorites')): ?> - <?php /* Add to favorites; finc: keep Icon inside link - CK */ ?> - <div class="favorite"> - <a href="<?=$this->recordLink()->getActionUrl($this->driver, 'Save')?>" data-lightbox class="save-record result-link-label" data-id="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>" title="<?=$this->transEsc('Add to favorites')?>"> - <i class="icon icon-star icon-1.5x" aria-hidden="true"></i> - </a> - </div> - <div class="toolbar-menu"> - <a href="#" data-lightbox class="dropdown-toggle" id="toolbar-menu" - data-toggle="dropdown" aria-controls="toolbar-menu"> - <i class="icon icon-share-2 icon-1.5x" aria-hidden="true"></i> - </a> - <span id="toolbar-menu" class="dropdown-menu" aria-labelledby="toolbar-menu"> - <?=$this->record($this->driver)->getToolbar()?> - </span> - </div> - <br/> - <?php elseif ($block = $this->permission()->getAlternateContent('feature.Favorites')): ?> - <?=$block?> - <?php endif; ?> + <?php if ($this->userlist()->getMode() !== 'disabled'): ?> + <?php if ($this->permission()->allowDisplay('feature.Favorites')): ?> + <?php /* Add to favorites; finc: keep Icon inside link - CK */ ?> + <div class="favorite"> + <a href="<?=$this->recordLink()->getActionUrl($this->driver, 'Save')?>" data-lightbox class="save-record result-link-label" data-id="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>" title="<?=$this->transEsc('Add to favorites')?>"> + <i class="icon icon-star icon-1.5x" aria-hidden="true"></i> + <span class="sr-only"><?=$this->transEsc('Add to favorites')?></span> + </a> + </div> + <div class="toolbar-menu"> + <a href="#" data-lightbox class="dropdown-toggle" id="toolbar-menu" data-toggle="dropdown" aria-controls="toolbar-menu"> + <i class="icon icon-share-2 icon-1.5x" aria-hidden="true"></i> + </a> + <span id="toolbar-menu" class="dropdown-menu" aria-labelledby="toolbar-menu"> + <?=$this->record($this->driver)->getToolbar()?> + </span> + </div> + <br/> + <?php elseif ($block = $this->permission()->getAlternateContent('feature.Favorites')): ?> + <?=$block?> <?php endif; ?> + <?php endif; ?> </div> </div> - <?php /* Display Main Details */?> - <?php + <?php /* Display Main Details */ ?> + <?php $formatter = $this->recordDataFormatter(); $coreFields = $formatter->getData($driver, $formatter->getDefaults('core-ai')); - ?> - <?php if (!empty($coreFields)): ?> - <table class="table table-striped"> - <caption class="sr-only"><?=$this->transEsc('Bibliographic Details')?></caption> - <?php foreach ($coreFields as $current): ?> - <?php if ($current['label'] == null): ?> - <?=$current['value']?> - <?php else: ?> - <tr><th><?=$this->transEsc($current['label'])?>:</th><td><?=$current['value']?></td></tr> - <?php endif; ?> - <?php endforeach; ?> - </table> - <?php endif; ?> - <?php /* End Main Details */?> - </div> - <div class="record col-md-4 media-right-details"> + ?> + <?php if (!empty($coreFields)): ?> + <?php /* fid_adlr: do NOT add class "table-resp-data", it will break to table for small screens */ ?> + <table class="table table-striped"> + <caption class="sr-only"><?= $this->transEsc('Bibliographic Details') ?></caption> + <?php foreach ($coreFields as $current): ?> + <?php if ($current['label'] == null): ?> + <?= $current['value'] ?> + <?php else: ?> + <tr> + <th><?= $this->transEsc($current['label']) ?>:</th> + <td lang="" data-title="<?= $this->transEsc($current['label']) ?>:"><?= $current['value'] ?></td> + </tr> + <?php endif; ?> + <?php endforeach; ?> + </table> + <?php endif; ?> + <?php /* End Main Details */ ?> + </div> + <?php /* fid_adlr: style get-it-box #16286, #16308 */ ?> + <div class="record col-md-4 media-right-details"> <?php /* finc-specific: add toolbar to sidebar - CK */ ?> <?php //=$this->record($this->driver)->getToolbar()?> <?php /* GET IT-box refs #15930 - GG */ ?> <?php if (count($this->tabs) > 0): ?> - <a name="tabnavi"></a><?php /* Renamed, no typo, to render jump to tab ineffective */ ?> - <div class="record-tabs detailview-box-yellow"> - <?php if (count($this->tabs) > 0): ?> - <a name="tabnavi"></a><?php /* Renamed, no typo, to render jump to tab ineffective */ ?> - <div class="record-tabs getitbox"> - <ul class="recordTabs detailview-tab-nav"><?php /* DO NOT use standard data-tab option here as it triggers Foundation's normal tab behaviour while Vufind only uses tab appearance! FIXME CK */ ?> - <?php foreach ($this->tabs as $tab => $obj): ?> - <?php if (in_array($tab, ['Holdings', 'AcquisitionPDA'])): ?> - <?php // add current tab to breadcrumbs if applicable: - $desc = $obj->getDescription(); - $tab_classes = array(); - if (0 === strcasecmp($this->activeTab, $tab)) { - if (!$this->loadInitialTabWithAjax || !$obj->supportsAjax()) { - $tab_classes[] = 'active'; - } - $tab_classes[] = 'initiallyActive'; - $this->layout()->breadcrumbs .= '<li class="active">' . $this->transEsc($desc) . '</li>'; - $activeTabObj = $obj; - } + <a name="tabnavi"></a><?php /* Renamed, no typo, to render jump to tab ineffective */ ?> + <div class="record-tabs detailview-box-yellow"> + <?php if (count($this->tabs) > 0): ?> + <a name="tabnavi"></a><?php /* Renamed, no typo, to render jump to tab ineffective */ ?> + <div class="record-tabs getitbox"> + <ul class="recordTabs detailview-tab-nav"><?php /* DO NOT use standard data-tab option here as it triggers Foundation's normal tab behaviour while Vufind only uses tab appearance! FIXME CK */ ?> + <?php foreach ($this->tabs as $tab => $obj): ?> + <?php if (in_array($tab, ['Holdings', 'AcquisitionPDA'])): ?> + <?php // add current tab to breadcrumbs if applicable: + $desc = $obj->getDescription(); + $tab_classes = array(); + if (0 === strcasecmp($this->activeTab, $tab)) { + if (!$this->loadInitialTabWithAjax || !$obj->supportsAjax()) { + $tab_classes[] = 'active'; + } + $tab_classes[] = 'initiallyActive'; + $this->layout()->breadcrumbs .= '<li class="active">' . $this->transEsc($desc) . '</li>'; + $activeTabObj = $obj; + } - if (!$obj->isVisible()) { - $tab_classes[] = 'hidden'; - } - //if (!$obj->supportsAjax()) { $tab_classes[] = 'noajax'; } - ?> - <?php endif; ?> - <?php endforeach; ?> - </ul> + if (!$obj->isVisible()) { + $tab_classes[] = 'hidden'; + } + //if (!$obj->supportsAjax()) { $tab_classes[] = 'noajax'; } + ?> + <?php endif; ?> + <?php endforeach; ?> + </ul> - <?php /* next line: we need the id - CK */ ?> - <div class="tabs-content detailview-content" id="record-tabs"> - <?php if (!$this->loadInitialTabWithAjax || !isset($activeTabObj) || !$activeTabObj->supportsAjax()): ?> - <div class="content active <?=$this->activeTab?>-tab"> - <?=isset($activeTabObj) ? $this->record($this->driver)->getTab($activeTabObj) : ''?> - </div> - <?php endif; ?> + <?php /* next line: we need the id - CK */ ?> + <div class="tabs-content detailview-content" id="record-tabs"> + <?php if (!$this->loadInitialTabWithAjax || !isset($activeTabObj) || !$activeTabObj->supportsAjax()): ?> + <div class="content active <?=$this->activeTab?>-tab"> + <?=isset($activeTabObj) ? $this->record($this->driver)->getTab($activeTabObj) : ''?> + </div> + <?php endif; ?> + </div> </div> - </div> - <?php endif; ?> - <?php endif; ?> - </div> - </div> + <?php endif; ?> + </div> + <?php endif; ?> </div> - <?php if (count($this->tabs) > 0): ?> - <?php foreach ($this->tabs as $tab => $obj): ?> - <?php if (!in_array($tab, ['Holdings', 'AcquisitionPDA'])): ?> - <?php // add current tab to breadcrumbs if applicable: - $desc = $obj->getDescription(); - ?> - <div class="facet-group" id="side-panel-<?=$desc?>"> - <button class="title collapsed" data-toggle="collapse" href="#side-collapse-<?=$tab?>"> - <?=$this->transEsc($desc)?> - </button> - <div id="side-collapse-<?=$tab?>" class="collapse"> - <div class="tab-content"> - <div class="tab-pane active <?=$this->escapeHtmlAttr($tab) ?>-tab"> - <div class="media-left <?=$this->escapeHtmlAttr($coverDetails['size'])?> img-col"></div> - <div class="media-body"> - <?=$this->record($this->driver)->getTab($obj)?> - </div> + </div> + <?php if (count($this->tabs) > 0): ?> + <?php foreach ($this->tabs as $tab => $obj): ?> + <?php if (!in_array($tab, ['Holdings', 'AcquisitionPDA'])): ?> + <?php // add current tab to breadcrumbs if applicable: + $desc = $obj->getDescription(); + ?> + <div class="facet-group" id="side-panel-<?=$desc?>"> + <button class="title collapsed" data-toggle="collapse" href="#side-collapse-<?=$tab?>"> + <?=$this->transEsc($desc)?> + </button> + <div id="side-collapse-<?=$tab?>" class="collapse"> + <div class="tab-content"> + <div class="tab-pane active <?=$this->escapeHtmlAttr($tab) ?>-tab"> + <div class="media-left <?=$this->escapeHtmlAttr($coverDetails['size'])?> img-col"></div> + <div class="media-body"> + <?=$this->record($this->driver)->getTab($obj)?> </div> </div> </div> </div> - <?php endif; ?> - <?php endforeach; ?> - <?php endif; ?> - </div> + </div> + <?php endif; ?> + <?php endforeach; ?> + <?php endif; ?> +</div> <!-- fid_adlr: recordDriver - SolrAI - core - END --> diff --git a/themes/fid_adlr/templates/RecordDriver/SolrAI/result-list.phtml b/themes/fid_adlr/templates/RecordDriver/SolrAI/result-list.phtml index 0767f65eef0..a52fe264f69 100644 --- a/themes/fid_adlr/templates/RecordDriver/SolrAI/result-list.phtml +++ b/themes/fid_adlr/templates/RecordDriver/SolrAI/result-list.phtml @@ -4,9 +4,10 @@ $coverDetails = $this->record($this->driver)->getCoverDetails('result-list', 'me $cover = $coverDetails['html']; $thumbnail = false; $thumbnailAlignment = $this->record($this->driver)->getThumbnailAlignment('result'); +$describedById = $driver->getSourceIdentifier() . '|' . $driver->getUniqueId(); if ($cover): ob_start(); ?> - <div class="media-<?=$thumbnailAlignment?> <?=$this->escapeHtmlAttr($coverDetails['size'])?>"> + <div class="media-<?=$thumbnailAlignment?> <?=$this->escapeHtmlAttr($coverDetails['size'])?>" aria-hidden="true"> <?=$cover?> </div> <?php $thumbnail = ob_get_contents(); ?> @@ -32,7 +33,7 @@ if ($cover): <div class="media-body"> <div class="result-body"> <div class="margin-btm"> - <a href="<?=$this->recordLink()->getUrl($this->driver)?>" class="title getFull" data-view="<?=$this->params->getOptions()->getListViewOption()?>"> + <a id="<?=$describedById?>" href="<?=$this->recordLink()->getUrl($this->driver)?>" class="title getFull" data-view="<?=$this->params->getOptions()->getListViewOption()?>" lang=""> <?=$this->record($this->driver)->getTitleHtml()?> </a> </div> @@ -45,6 +46,7 @@ if ($cover): <?=$this->transEsc('by')?> <?php $authorCount = count($summAuthors); foreach ($summAuthors as $i => $summAuthor): ?> + <?php /* fid_adlr: change comma to semicolon #16676 */ ?> <a href="<?=$this->record($this->driver)->getLink('author', $this->highlight($summAuthor, null, true, false))?>" class="author"><?=$this->highlight($summAuthor)?></a><?=$i + 1 < $authorCount ? ';' : ''?> <?php endforeach; ?> <?php endif; ?> @@ -122,11 +124,10 @@ if ($cover): <?php /* refs #16325 disable get-it-box temporarily <div class="result-getitbox"> <a class="btn btn-primary btn-getitbox" href="<?=$this->url('search-email')?>" data-lightbox><?=$this->transEsc("get_it")?></a> - </div> - */ ?> + </div> */ ?> </div> <div class="result-links hidden-print"> - + <?php /* fid_adlr: Do NOT display qrcode */ ?> <?php if ($this->cart()->isActiveInSearch() && $this->params->getOptions()->supportsCart() && $this->cart()->isActive()): ?> <?=$this->render('record/cart-buttons.phtml', ['id' => $this->driver->getUniqueId(), 'source' => $this->driver->getSourceIdentifier()]);?><br/> <?php endif; ?> @@ -134,28 +135,28 @@ if ($cover): <?php if ($this->userlist()->getMode() !== 'disabled'): ?> <?php /* if ($this->permission()->allowDisplay('feature.Favorites')): */ ?> <?php /* Add to favorites; finc: keep Icon inside link - CK */ ?> - <a href="<?=$this->recordLink()->getActionUrl($this->driver, 'Save')?>" data-lightbox class="save-record result-link-label" data-id="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>" - title="<?=$this->transEsc('Add to favorites')?>"> + <a href="<?=$this->recordLink()->getActionUrl($this->driver, 'Save')?>?refreshOnClose=false" data-lightbox class="save-record result-link-label" data-id="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>"> <i class="result-link-icon icon icon-star icon-1.5x" aria-hidden="true"></i> <?php /* =$this->transEsc('Add to favorites') */?> </a><br/> <?php elseif ($block = $this->permission()->getAlternateContent('feature.Favorites')): ?> <?=$block?> <?php endif; ?> <?php /* Saved lists */ ?> - <div class="savedLists alert alert-info hidden"> + <p class="savedLists" aria-live="polite"> <strong><?=$this->transEsc("Saved in")?>:</strong> - </div> + </p> <?php /* endif; */ ?> <?php /* Remove Hierarchy tree icon at result list - GG */ ?> <?=$this->driver->supportsCoinsOpenUrl() ? '<span class="Z3988" title="' . $this->escapeHtmlAttr($this->driver->getCoinsOpenUrl()) . '"></span>' : ''?> </div> + <?php /* fid_adlr: add result grouping #21281, #21409 */ ?> <?php if ($this->driver->tryMethod('hasSubRecords')): ?> - <?=$this->render('RecordDriver/DefaultRecord/result-list-grouping-button')?> + <?=$this->render('RecordDriver/DefaultRecord/result-list-grouping-button')?> <?php endif; ?> <?php if ($this->driver->tryMethod('hasSubRecords')): ?> - <?=$this->render('RecordDriver/DefaultRecord/result-list-grouped-subrecords')?> + <?=$this->render('RecordDriver/DefaultRecord/result-list-grouped-subrecords')?> <?php endif; ?> </div> <?php if ($thumbnail && $thumbnailAlignment == 'right'): ?> diff --git a/themes/fid_adlr/templates/RecordDriver/SolrMarc/core.phtml b/themes/fid_adlr/templates/RecordDriver/SolrMarc/core.phtml index 3147ca40ab2..2b6100f489c 100644 --- a/themes/fid_adlr/templates/RecordDriver/SolrMarc/core.phtml +++ b/themes/fid_adlr/templates/RecordDriver/SolrMarc/core.phtml @@ -1,187 +1,204 @@ <!-- fid_adlr: RecordDriver - solrMarc - core --> <?php /* based on DefaultRecord/core, compare with DefaultRecord/core during updates! */ ?> +<?php $this->metadata()->generateMetatags($this->driver);?> <div class="media" vocab="http://schema.org/" resource="#record" typeof="<?=$this->driver->getSchemaOrgFormats()?> Product"> + <?php /* fid_adlr: remove offcanvas-toggler */ ?> <?php - $QRCode = $this->record($this->driver)->getQRCode("core"); - $coverDetails = $this->record($this->driver)->getCoverDetails('core', 'medium', $this->record($this->driver)->getThumbnail('large')); - $cover = $coverDetails['html']; - $preview = $this->record($this->driver)->getPreviews(); + $QRCode = $this->record($this->driver)->getQRCode("core"); + $coverDetails = $this->record($this->driver)->getCoverDetails('core', 'medium', $this->record($this->driver)->getThumbnail('large')); + $cover = $coverDetails['html']; + $preview = ($this->previewOverride ?? false) + ? $this->previewOverride : $this->record($this->driver)->getPreviews(); ?> - <?php if ($QRCode || $cover || $preview): ?> - <div class="media-left <?=$this->escapeHtmlAttr($coverDetails['size'])?> img-col"> - <?php /* Display thumbnail if appropriate: */ ?> - <?php if ($cover): ?> - <?=$cover?> - <?php /* if cover or qrcode or preview not set you can not finc-specific StyleBasedIcons, false position - GG */ ?> - <?php endif; ?> + <?php if ($QRCode || $cover || $preview): ?> + <div class="media-left <?=$this->escapeHtmlAttr($coverDetails['size'])?> img-col"> + <?php /* Display thumbnail if appropriate: */ ?> + <?php if ($cover): ?> + <?=$cover?> + <?php endif; ?> - <?php /* Display qrcode if appropriate: */ ?> - <?php if ($QRCode): ?> - - <br/><img alt="<?=$this->transEsc('QR Code')?>" class="qrcode" src="<?=$this->escapeHtmlAttr($QRCode);?>"/> - - <?php endif; ?> + <?php /* Display qrcode if appropriate: */ + /* finc removes span + class for accessibility */ ?> + <?php if ($QRCode): ?> + <br/><img alt="<?= $this->transEsc('QR Code') ?>" class="qrcode" src="<?= $this->escapeHtmlAttr($QRCode); ?>"/> + <?php endif; ?> - <?php // if you have a preview tab but want to move or remove the preview link - // from this area of the record view, this can be split into - // getPreviewData() (should stay here) and - // getPreviewLink() (can go in your desired tab) ?> - <?php if ($preview): ?> - <div class="record-previews"> - <?=$preview?> - </div> - <?php endif; ?> - </div> - <?php /* if cover or qrcode or preview not set you can not finc-specific StyleBasedIcons, right position - GG */ ?> + <?php // if you have a preview tab but want to move or remove the preview link + // from this area of the record view, this can be split into + // getPreviewData() (should stay here) and + // getPreviewLink() (can go in your desired tab) ?> + <?php if ($preview): ?> + <div class="record-previews"> + <?= $preview ?> + </div> + <?php endif; ?> + </div> + <?php /* if cover or qrcode or preview not set you can not finc-specific StyleBasedIcons, right position - GG */ ?> <?php elseif ($this->record($this->driver)->showStyleBasedIcons()): ?> - <div class="media-left <?=$this->escapeHtmlAttr($coverDetails['size'])?> img-col"> - <?=$this->record($this->driver)->getRecordIcon('record-icon', false)?> - <?php /* EOF - finc-specific StyleBasedIcons */ ?> - </div> + <?php /* BOF - finc-specific StyleBasedIcons */ ?> + <div class="media-left <?= $this->escapeHtmlAttr($coverDetails['size']) ?> img-col"> + <?php /* fid_adlr: remove lable text by getRecordIcon('record-icon', false) #20112 */ ?> + <?= $this->record($this->driver)->getRecordIcon('record-icon', false) ?> + </div> <?php endif; ?> <div class="media-body"> + <?php /* fid_adlr: design detail view #15650, #16286 */ ?> <div class="col-md-8"> <div class="title-toolbar"> <div class="result-body"> - <?php /* finc: We want to get rid of trailing special chars in the title and limit its length to 100 chars; - in finc: keep schema name tag here!! #13861 - CK - */ - ?> - <?php /* finc: add schema tags for title #13850 - VE */ ?> - <?php /* #16676 separate title_sub from title_short- RL */ ?> - <h3 property="name"><?=$this->escapeHtml(preg_replace('/(\s[\/\.:]\s*)*$/', '', $this->truncate($this->driver->getShortTitle(), 100)))?> - <p class="sub"><?=$this->escapeHtml(preg_replace('/(\s[\/\.:]\s*)*$/', '', $this->truncate($this->driver->getSubtitle() . ' ' . $this->driver->getTitleSection(), 125)))?></p> - </h3> - <?php /* fid_adlr: Remove summary refs #15650 - GG */ ?> + <?php /* finc: We want to get rid of trailing special chars in the title and limit its length to 100 chars; + in finc: keep schema name tag here!! #13861 - CK + finc: add schema tags for title #13850 - VE */ ?> + <?php /* fid_adlr: #16676 separate title_sub from title_short- RL */ ?> + <h3 property="name" lang=""><?=$this->escapeHtml(preg_replace('/(\s[\/\.:]\s*)*$/', '', $this->truncate($this->driver->getShortTitle(), 100)))?> + <p class="sub"><?=$this->escapeHtml(preg_replace('/(\s[\/\.:]\s*)*$/', '', $this->truncate($this->driver->getSubtitle() . ' ' . $this->driver->getTitleSection(), 125)))?></p> + </h3> - <?php if ($this->userlist()->getMode() !== 'disabled'): ?> - <?php /* Display the lists that this record is saved to */ ?> - <div class="savedLists hidden alert alert-info"> - <strong><?=$this->transEsc("Saved in")?>:</strong> - </div> + <?php if(!empty($this->extraControls)): ?> + <?=$this->extraControls['actionControls'] ?? ''?> + <?=$this->extraControls['availabilityInfo'] ?? ''?> + <?php endif; ?> + + <?php /* fid_adlr: Remove summary refs #15650 - GG */ /* + <?php $summary = $this->driver->getSummary(); $summary = isset($summary[0]) ? $this->escapeHtml($summary[0]) : false; ?> + <?php if ($summary): ?> + <p><?=$this->truncate($summary, 300)?></p> + + <?php if(strlen($summary) > 300): ?> + <p><a href='<?=$this->recordLink()->getTabUrl($this->driver, 'Description')?>#tabnav'><?=$this->transEsc('Full description')?></a></p> <?php endif; ?> + <?php endif; ?> + */ ?> + + <?php if ($this->userlist()->getMode() !== 'disabled'): ?> + <?php /* Display the lists that this record is saved to */ ?> + <p class="savedLists" aria-live="polite"> + <strong><?= $this->transEsc("Saved in") ?>:</strong> + </p> + <?php endif; ?> </div> <div class="result-links toolbar-details"> - <?php if ($this->userlist()->getMode() !== 'disabled'): ?> - <?php if ($this->permission()->allowDisplay('feature.Favorites')): ?> - <?php /* Add to favorites; finc: keep Icon inside link - CK */ ?> - <div class="favorite"> - <a href="<?=$this->recordLink()->getActionUrl($this->driver, 'Save')?>" data-lightbox class="save-record result-link-label" data-id="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>" title="<?=$this->transEsc('Add to favorites')?>"> - <i class="icon icon-star icon-1.5x" aria-hidden="true"></i> - </a> - </div> - <div class="toolbar-menu"> - <a href="#" data-lightbox class="dropdown-toggle" id="toolbar-menu" - data-toggle="dropdown" aria-controls="toolbar-menu"> - <i class="icon icon-share-2 icon-1.5x" aria-hidden="true"></i> - </a> - <span id="toolbar-menu" class="dropdown-menu" aria-labelledby="toolbar-menu"> - <?=$this->record($this->driver)->getToolbar()?> - </span> - </div> - <br/> - <?php elseif ($block = $this->permission()->getAlternateContent('feature.Favorites')): ?> - <?=$block?> - <?php endif; ?> + <?php if ($this->userlist()->getMode() !== 'disabled'): ?> + <?php if ($this->permission()->allowDisplay('feature.Favorites')): ?> + <?php /* Add to favorites; finc: keep Icon inside link - CK */ ?> + <div class="favorite"> + <a href="<?=$this->recordLink()->getActionUrl($this->driver, 'Save')?>" data-lightbox class="save-record result-link-label" data-id="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>" title="<?=$this->transEsc('Add to favorites')?>"> + <i class="icon icon-star icon-1.5x" aria-hidden="true"></i> + <span class="sr-only"><?=$this->transEsc('Add to favorites')?></span> + </a> + </div> + <div class="toolbar-menu"> + <a href="#" data-lightbox class="dropdown-toggle" id="toolbar-menu" data-toggle="dropdown" aria-controls="toolbar-menu"> + <i class="icon icon-share-2 icon-1.5x" aria-hidden="true"></i> + </a> + <span id="toolbar-menu" class="dropdown-menu" aria-labelledby="toolbar-menu"> + <?=$this->record($this->driver)->getToolbar()?> + </span> + </div> + <br/> + <?php elseif ($block = $this->permission()->getAlternateContent('feature.Favorites')): ?> + <?=$block?> <?php endif; ?> + <?php endif; ?> </div> </div> - <?php /* Display Main Details */?> + <?php /* Display Main Details */ ?> <?php - $formatter = $this->recordDataFormatter(); - $coreFields = $formatter->getData($driver, $formatter->getDefaults('core-marc')); + $formatter = $this->recordDataFormatter(); + $coreFields = $formatter->getData($driver, $formatter->getDefaults('core-marc')); ?> <?php if (!empty($coreFields)): ?> + <?php /* fid_adlr: do NOT add class "table-resp-data", it will break to table for small screens */ ?> <table class="table table-striped"> - <caption class="sr-only"><?=$this->transEsc('Bibliographic Details')?></caption> + <caption class="sr-only"><?= $this->transEsc('Bibliographic Details') ?></caption> <?php foreach ($coreFields as $current): ?> <?php if ($current['label'] == null): ?> - <?=$current['value']?> + <?= $current['value'] ?> <?php else: ?> <tr> - <th><?=$this->transEsc($current['label'])?>:</th> - <td><?=$current['value']?></td> + <th><?= $this->transEsc($current['label']) ?>:</th> + <td lang="" data-title="<?= $this->transEsc($current['label']) ?>:"><?= $current['value'] ?></td> </tr> <?php endif; ?> <?php endforeach; ?> </table> <?php endif; ?> - <?php /* End Main Details */?> + <?php /* End Main Details */ ?> </div> + <?php /* fid_adlr: style get-it-box #16286, #16308 */ ?> <div class="record col-md-4 media-right-details"> <?php /* finc-specific: add toolbar to sidebar - CK */ ?> <?php //=$this->record($this->driver)->getToolbar()?> <?php /* GET IT-box refs #15930 - GG */ ?> <?php if (count($this->tabs) > 0): ?> - <a name="tabnavi"></a><?php /* Renamed, no typo, to render jump to tab ineffective */ ?> - <div class="record-tabs detailview-box-yellow"> - <?php if (count($this->tabs) > 0): ?> - <a name="tabnavi"></a><?php /* Renamed, no typo, to render jump to tab ineffective */ ?> - <div class="record-tabs getitbox"> - <ul class="recordTabs detailview-tab-nav"><?php /* DO NOT use standard data-tab option here as it triggers Foundation's normal tab behaviour while Vufind only uses tab appearance! FIXME CK */ ?> - <?php foreach ($this->tabs as $tab => $obj): ?> - <?php if (in_array($tab, ['Holdings', 'AcquisitionPDA'])): ?> - <?php // add current tab to breadcrumbs if applicable: - $desc = $obj->getDescription(); - $tab_classes = array(); - if (0 === strcasecmp($this->activeTab, $tab)) { - if (!$this->loadInitialTabWithAjax || !$obj->supportsAjax()) { - $tab_classes[] = 'active'; - } - $tab_classes[] = 'initiallyActive'; - $this->layout()->breadcrumbs .= '<li class="active">' . $this->transEsc($desc) . '</li>'; - $activeTabObj = $obj; - } + <a name="tabnavi"></a><?php /* Renamed, no typo, to render jump to tab ineffective */ ?> + <div class="record-tabs detailview-box-yellow"> + <?php if (count($this->tabs) > 0): ?> + <a name="tabnavi"></a><?php /* Renamed, no typo, to render jump to tab ineffective */ ?> + <div class="record-tabs getitbox"> + <ul class="recordTabs detailview-tab-nav"><?php /* DO NOT use standard data-tab option here as it triggers Foundation's normal tab behaviour while Vufind only uses tab appearance! FIXME CK */ ?> + <?php foreach ($this->tabs as $tab => $obj): ?> + <?php if (in_array($tab, ['Holdings', 'AcquisitionPDA'])): ?> + <?php // add current tab to breadcrumbs if applicable: + $desc = $obj->getDescription(); + $tab_classes = array(); + if (0 === strcasecmp($this->activeTab, $tab)) { + if (!$this->loadInitialTabWithAjax || !$obj->supportsAjax()) { + $tab_classes[] = 'active'; + } + $tab_classes[] = 'initiallyActive'; + $this->layout()->breadcrumbs .= '<li class="active">' . $this->transEsc($desc) . '</li>'; + $activeTabObj = $obj; + } - if (!$obj->isVisible()) { - $tab_classes[] = 'hidden'; - } - //if (!$obj->supportsAjax()) { $tab_classes[] = 'noajax'; } - ?> - <?php endif; ?> - <?php endforeach; ?> - </ul> + if (!$obj->isVisible()) { + $tab_classes[] = 'hidden'; + } + //if (!$obj->supportsAjax()) { $tab_classes[] = 'noajax'; } + ?> + <?php endif; ?> + <?php endforeach; ?> + </ul> - <?php /* next line: we need the id - CK */ ?> - <div class="tabs-content detailview-content" id="record-tabs"> - <?php if (!$this->loadInitialTabWithAjax || !isset($activeTabObj) || !$activeTabObj->supportsAjax()): ?> - <div class="content active <?=$this->activeTab?>-tab"> - <?=isset($activeTabObj) ? $this->record($this->driver)->getTab($activeTabObj) : ''?> - </div> - <?php endif; ?> + <?php /* next line: we need the id - CK */ ?> + <div class="tabs-content detailview-content" id="record-tabs"> + <?php if (!$this->loadInitialTabWithAjax || !isset($activeTabObj) || !$activeTabObj->supportsAjax()): ?> + <div class="content active <?=$this->activeTab?>-tab"> + <?=isset($activeTabObj) ? $this->record($this->driver)->getTab($activeTabObj) : ''?> + </div> + <?php endif; ?> + </div> </div> - </div> - <?php endif; ?> - <?php endif; ?> - </div> + <?php endif; ?> + </div> + <?php endif; ?> </div> </div> - - <?php if (count($this->tabs) > 0): ?> - <?php foreach ($this->tabs as $tab => $obj): ?> - <?php if (!in_array($tab, ['Holdings', 'AcquisitionPDA'])): ?> - <?php // add current tab to breadcrumbs if applicable: - $desc = $obj->getDescription(); - ?> - <div class="facet-group" id="side-panel-<?=$desc?>"> - <button class="title collapsed" data-toggle="collapse" href="#side-collapse-<?=$tab?>"> - <?=$this->transEsc($desc)?> - </button> - <div id="side-collapse-<?=$tab?>" class="collapse"> - <div class="tab-content"> - <div class="tab-pane active <?=$this->escapeHtmlAttr($tab) ?>-tab"> - <div class="media-left <?=$this->escapeHtmlAttr($coverDetails['size'])?> img-col"></div> - <div class="media-body"> - <?=$this->record($this->driver)->getTab($obj)?> - </div> + <?php if (count($this->tabs) > 0): ?> + <?php foreach ($this->tabs as $tab => $obj): ?> + <?php if (!in_array($tab, ['Holdings', 'AcquisitionPDA'])): ?> + <?php // add current tab to breadcrumbs if applicable: + $desc = $obj->getDescription(); + ?> + <div class="facet-group" id="side-panel-<?=$desc?>"> + <button class="title collapsed" data-toggle="collapse" href="#side-collapse-<?=$tab?>"> + <?=$this->transEsc($desc)?> + </button> + <div id="side-collapse-<?=$tab?>" class="collapse"> + <div class="tab-content"> + <div class="tab-pane active <?=$this->escapeHtmlAttr($tab) ?>-tab"> + <div class="media-left <?=$this->escapeHtmlAttr($coverDetails['size'])?> img-col"></div> + <div class="media-body"> + <?=$this->record($this->driver)->getTab($obj)?> </div> </div> </div> </div> - <?php endif; ?> - <?php endforeach; ?> - <?php endif; ?> - </div> + </div> + <?php endif; ?> + <?php endforeach; ?> + <?php endif; ?> +</div> <!-- fid_adlr: RecordDriver - solrMarc - core - END --> diff --git a/themes/fid_adlr/templates/RecordTab/description.phtml b/themes/fid_adlr/templates/RecordTab/description.phtml index fa76c68d88c..0f9b56ded71 100644 --- a/themes/fid_adlr/templates/RecordTab/description.phtml +++ b/themes/fid_adlr/templates/RecordTab/description.phtml @@ -1,17 +1,25 @@ <!-- fid_adlr: recordtab - description --> <?php +// fid_adlr: fix multiple titles #18780 +// $this->headTitle($this->translate('Description') . ': ' . $this->driver->getBreadcrumb()); + $formatter = $this->recordDataFormatter(); $mainFields = $formatter->getData($this->driver, $formatter->getDefaults('description')); ?> -<?php /* finc: remove schema tag here but keep in core,*/ ?> +<?php /* finc removes schema tag here but keeps it in core, + finc adds code for responsive data table + plus accessibility code here - CK */ ?> +<?php /* fid_adlr: do NOT add class "table-resp-data", it will break to table for small screens */ ?> <table class="table table-striped"> - <?php - /* Table gets filled via recordDriver/.../data-... templates as referenced in RecordDataFormatterFactory */ ?> + <?php /* finc: this table gets filled via recordDriver/.../data-... templates as referenced in RecordDataFormatterFactory */ ?> <caption class="sr-only"><?=$this->transEsc('Description')?></caption> <?php if (!empty($mainFields)): ?> <?php foreach ($mainFields as $current): ?> <?php if (!empty($current['label'])): ?> - <tr><th><?=$this->transEsc($current['label'])?>:</th><td><?=$current['value']?></td></tr> + <tr> + <th><?=$this->transEsc($current['label'])?>:</th> + <td lang="" data-title="<?= $this->transEsc($current['label']) ?>:"><?=$current['value']?></td> + </tr> <?php elseif (!empty($current['value'])): ?> <?=$current['value']?> <?php endif; ?> diff --git a/themes/fid_adlr/templates/RecordTab/holdingsils.phtml b/themes/fid_adlr/templates/RecordTab/holdingsils.phtml index c93071cd733..534f3ea8654 100644 --- a/themes/fid_adlr/templates/RecordTab/holdingsils.phtml +++ b/themes/fid_adlr/templates/RecordTab/holdingsils.phtml @@ -27,14 +27,17 @@ try { $holdings = $this->driver->getRealTimeHoldings(); } catch (\VuFind\Exception\ILS $e) { - $holdings = ['holdings' => []]; + $holdings = [ + 'holdings' => [], + 'electronic_holdings' => [], + ]; $offlineMode = 'ils-offline'; } } ?> <?php if ($user && $getitConfig['bossData']): ?> - <?php $script = <<<JS + <?php $script = <<<JS $(document).ready(function() { var recordId = $('.hiddenId').val(); var recordSource = $('.hiddenSource').val(); @@ -55,53 +58,59 @@ }); }); JS; - ?> - <?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, $script, 'SET');?> +?> + <?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, $script, 'SET');?> <?php endif; ?> <?php if ($getitConfig['hideNotice']): ?> - <?php $script = <<<JS - $(document).ready(function() { + <?php $script = <<<JS + $(document).ready(function() { $('.getitbox-notices').addClass('hidden'); }); JS; - ?> - <?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, $script, 'SET');?> +?> + <?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, $script, 'SET');?> <?php endif; ?> <div class="getitbox-getit"> <h4><?=$getitConfig['boxHeadline']?></h4> + <?=($offlineMode == "ils-offline") ? $this->render('Helpers/ils-offline.phtml', ['offlineModeMsg' => 'ils_offline_holdings_message']) : ''?> - <?=($offlineMode == "ils-offline") ? $this->render('Helpers/ils-offline.phtml', ['offlineModeMsg' => 'ils_offline_holdings_message']) : ''?> + <?php if ($user && $getitConfig['bossData']): ?> + <div class="boss-data-true"></div> + <?php endif; ?> - <?php if ($user && $getitConfig['bossData']): ?> - <div class="boss-data-true"></div> - <?php endif; ?> + <?php if ($openUrlActive && $getitConfig['showArticleButton']): ?> + <div class="openUrlButton"></div> + <?php endif; ?> + <?php if ($getitConfig['showOrderButton'] && $user): ?> + <a class="btn btn-primary pda-button full-order" data-lightbox href="<?=$this->url('record-fidpda', array('id' => $id))?>" rel="nofollow"> + <?=$this->transEsc('getit_order')?> + </a> + <?php endif; ?> - <?php if ($openUrlActive && $getitConfig['showArticleButton']): ?> - <div class="openUrlButton"></div> - <?php endif; ?> - <?php if ($getitConfig['showOrderButton'] && $user): ?> - <a class="btn btn-primary pda-button full-order" data-lightbox href="<?=$this->url('record-fidpda', array('id' => $id))?>" rel="nofollow"> - <?=$this->transEsc('getit_order')?> - </a> - <?php endif; ?> + <?php if ($getitConfig['showPartCopyButton'] && $user): ?> + <a class="btn btn-primary pda-button part-order" data-lightbox href="<?=$this->url('record-fidsubitopartialcopy', array('id' => $id))?>" rel="nofollow"> + <?=$this->transEsc('getit_partcopy')?> + </a><br /> + <div class="pda-part-text"> + <?=$this->transEsc('getit_partcopy_notice')?> + </div> + <?php endif; ?> - <?php if ($getitConfig['showPartCopyButton'] && $user): ?> - <a class="btn btn-primary pda-button part-order" data-lightbox href="<?=$this->url('record-fidsubitopartialcopy', array('id' => $id))?>" rel="nofollow"> - <?=$this->transEsc('getit_partcopy')?> - </a><br /> - <div class="pda-part-text"> - <?=$this->transEsc('getit_partcopy_notice')?> - </div> - <?php endif; ?> + <?php if (!empty($holdings['electronic_holdings'])): ?> + <?=$this->context($this)->renderInContext( + 'RecordTab/holdingsils/electronic.phtml', + ['holdings' => $holdings['electronic_holdings']] + );?> + <?php endif; ?> - <?php /* finc: add 'Online Access' in holdings-tab #13770 - VE */ ?> - <?php if ($getitConfig['showLinks'] && (!empty($urls) || $openUrlActive || $doiActive)): ?> - <?= $this->context($this)->renderInContext('get-it-box/links.phtml', - compact('getitConfig', 'openUrl','openUrlActive','urls','doiActive','doi') - ); ?> - <?php endif; ?> + <?php /* finc: add 'Online Access' in holdings-tab #13770 - VE */ ?> + <?php if ($getitConfig['showLinks'] && (!empty($urls) || $openUrlActive || $doiActive)): ?> + <?= $this->context($this)->renderInContext('get-it-box/links.phtml', + compact('getitConfig', 'openUrl','openUrlActive','urls','doiActive','doi') + ); ?> + <?php endif; ?> </div> <?php if ($openUrlActive): ?> @@ -111,24 +120,21 @@ JS; <?php endif; ?> <?php if (!empty($getitConfig['notice'])): ?> -<div class="getitbox-notices"> - + <div class="getitbox-notices"> <?php if ($user && $getitConfig['bossData']): ?> <div class="boss-data-false"></div> <?php if (!$getitConfig['hideNotice']): ?><br/><?php endif; ?> <?php endif; ?> - <?php if ($getitConfig['hideNotice']): ?><div class="boss-notice"><?php endif; ?> <?= $this->render('get-it-box/notice.phtml', compact('getitConfig', 'account')); ?> <?php if ($getitConfig['hideNotice']): ?></div><?php endif; ?> -</div> + </div> <?php elseif (!$getitConfig['isAiSidRecord']): ?> -<div class="getitbox-notices resolver"> + <div class="getitbox-notices resolver"> <?php if ($user && $getitConfig['bossData']): ?> - <div class="boss-data-false"></div> - <?php if ($getitConfig['hideNotice']): ?><br/><?php endif; ?> + <div class="boss-data-false"></div> + <?php if ($getitConfig['hideNotice']): ?><br/><?php endif; ?> <?php endif; ?> -</div> + </div> <?php endif; ?> - <!-- fid_adlr: recordTab - holdingsils - END --> diff --git a/themes/fid_adlr/templates/RecordTab/staffviewai.phtml b/themes/fid_adlr/templates/RecordTab/staffviewai.phtml index 55fb5e4109b..18f935bccf4 100644 --- a/themes/fid_adlr/templates/RecordTab/staffviewai.phtml +++ b/themes/fid_adlr/templates/RecordTab/staffviewai.phtml @@ -1,11 +1,16 @@ <!-- fid_adlr: recordtab - staffviewai --> <?php +// fid_adlr: fix multiple titles #18780 +// $this->headTitle($this->translate('Staff View') . ': ' . $this->driver->getBreadcrumb()); ?> +<?php /* finc adds code for responsive data table here - CK */ ?> +<?php /* fid_adlr: do NOT add class "table-resp-data", it will break to table for small screens */ ?> <table class="citation table table-striped"> + <?php /* fid_adlr: cast to array #19139 */ ?> <?php foreach ((array)$this->driver->getAIRecord() as $field => $values): ?> <tr> <th><?=$this->escapeHtml($field)?></th> - <td> + <td data-title="<?= $this->escapeHtml($field) ?>:"> <?php if (!is_array($values)) { $values = array($values); } ?> @@ -19,7 +24,7 @@ <?php if ($openURL = $this->driver->getOpenUrl()): ?> <tr> <th><?=$this->escapeHtml('openURL')?></th> - <td> + <td data-title="<?= $this->escapeHtml('openURL') ?>:"> <?=$this->escapeHtml($openURL)?><br/> </td> </tr> @@ -28,14 +33,14 @@ if (!empty($fields)): ?> <tr> <th><?=$this->translate('SOLR')?></th> - <td></td> + <td data-title="<?= $this->escapeHtml('SOLR') ?>:"></td> </tr> <?php ksort($fields); foreach ($fields as $key => $values): ?> <?php if ($key === 'fullrecord') continue; ?> <tr> <th><?=$this->escapeHtml($key)?></th> - <td><?=$this->escapeHtml(is_array($values) ? implode(', ', $values) : $values)?></td> + <td data-title="<?= $this->escapeHtml($key) ?>:"><?=$this->escapeHtml(is_array($values) ? implode(', ', $values) : $values)?></td> </tr> <?php endforeach ?> <?php endif; ?> diff --git a/themes/fid_adlr/templates/RecordTab/staffviewmarc.phtml b/themes/fid_adlr/templates/RecordTab/staffviewmarc.phtml index 8f001a9dce0..679ddb739a2 100644 --- a/themes/fid_adlr/templates/RecordTab/staffviewmarc.phtml +++ b/themes/fid_adlr/templates/RecordTab/staffviewmarc.phtml @@ -1,18 +1,24 @@ <!-- fid_adlr: recordtab - staffviewmarc --> <?php +// fid_adlr: fix multiple titles #18780 +// $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*/ ?> <?php if ($openURL = $this->driver->getOpenUrl()): ?> - <tr> - <th><?=$this->escapeHtml('openURL')?></th> - <td> - <?=$this->escapeHtml($openURL)?><br/> - </td> - </tr> + <table> + <tr> + <th><?=$this->escapeHtml('openURL')?></th> + <td data-title="<?= $this->escapeHtml('openURL') ?>:"> + <?=$this->escapeHtml($openURL)?><br/> + </td> + </tr> + </table> <?php endif; ?> <?php $fields = $this->driver->getRawData(); if (!empty($fields)): ?> + <?php /* finc adds code for responsive data table here - CK */ ?> + <?php /* fid_adlr: do NOT add class "table-resp-data", it will break to table for small screens */ ?> <table class="citation table table-striped"> <caption><?=$this->translate('SOLR')?></caption> <?php ksort($fields); @@ -20,7 +26,7 @@ if (!empty($fields)): ?> <?php if ($key === 'fullrecord') continue; ?> <tr> <th><?=$this->escapeHtml($key)?></th> - <td><?=$this->escapeHtml(is_array($values) ? implode(', ', $values) : $values)?></td> + <td data-title="<?= $this->escapeHtml($key) ?>:"><?=$this->escapeHtml(is_array($values) ? implode(', ', $values) : $values)?></td> </tr> <?php endforeach ?> </table> diff --git a/themes/fid_adlr/templates/RecordTab/toc.phtml b/themes/fid_adlr/templates/RecordTab/toc.phtml index 5b4c5b7aa81..bc6834d54f6 100644 --- a/themes/fid_adlr/templates/RecordTab/toc.phtml +++ b/themes/fid_adlr/templates/RecordTab/toc.phtml @@ -1,23 +1,30 @@ <!-- fid_adlr: recordtab - toc --> <?php +// fid_adlr: fix multiple titles #18780 +// $this->headTitle($this->translate('Table of Contents') . ': ' . $this->driver->getBreadcrumb()); + +// finc: use recordDataFormatter #19336; rest is mostly custom finc $formatter = $this->recordDataFormatter(); $mainFields = $formatter->getData($this->driver, $formatter->getDefaults('toc')); ?> -<?php /* finc: remove schema tag here but keep in core,*/ ?> +<?php /* finc adds code for responsive data table here - CK */ ?> +<?php /* fid_adlr: do NOT add class "table-resp-data", it will break to table for small screens */ ?> <table class="table table-striped"> - <?php - /* Table gets filled via recordDriver/.../data-... templates as referenced in RecordDataFormatterFactory */ ?> - <caption class="sr-only"><?=$this->transEsc('Table of Contents')?></caption> - <?php if (!empty($mainFields)): ?> - <?php foreach ($mainFields as $current): ?> - <?php if (!empty($current['label'])): ?> - <tr><th><?=$this->transEsc($current['label'])?>:</th><td><?=$current['value']?></td></tr> - <?php elseif (!empty($current['value'])): ?> - <?=$current['value']?> - <?php endif; ?> - <?php endforeach; ?> - <?php else: ?> - <tr><td><?=$this->transEsc('Table of Contents unavailable')?></td></tr> - <?php endif; ?> + <?php /* Table gets filled via recordDriver/.../data-... templates as referenced in RecordDataFormatterFactory */ ?> + <caption><?=$this->transEsc('Table of Contents')?></caption> + <?php if (!empty($mainFields)): ?> + <?php foreach ($mainFields as $current): ?> + <?php if (!empty($current['label'])): ?> + <tr> + <th><?=$this->transEsc($current['label'])?>:</th> + <td data-title="<?=$this->transEsc($current['label'])?>:"><?=$current['value']?></td> + </tr> + <?php elseif (!empty($current['value'])): ?> + <?=$current['value']?> + <?php endif; ?> + <?php endforeach; ?> + <?php else: ?> + <tr><td><?=$this->transEsc('Table of Contents unavailable')?></td></tr> + <?php endif; ?> </table> <!-- fid_adlr: recordtab - toc - END --> diff --git a/themes/fid_adlr/templates/feedback/form.phtml b/themes/fid_adlr/templates/feedback/form.phtml index aae4e431f8a..c96e9391945 100644 --- a/themes/fid_adlr/templates/feedback/form.phtml +++ b/themes/fid_adlr/templates/feedback/form.phtml @@ -18,7 +18,7 @@ $helpPost = isset($help['post']) ? $this->translate($help['post']) : null; ?> <div class="feedback-content"> <?php if ($title): ?> - <h2><?=$title?></h2> + <h2><?=$title?></h2> <?php endif; ?> <?=$this->flashmessages()?> diff --git a/themes/fid_adlr/templates/header.phtml b/themes/fid_adlr/templates/header.phtml index f6b0f0b652d..bd5aa4d472f 100644 --- a/themes/fid_adlr/templates/header.phtml +++ b/themes/fid_adlr/templates/header.phtml @@ -30,36 +30,33 @@ <?php endif; ?> </span> - <?php /* adlr currently doesn't use cart/bookbag, but accessibility of the following was already improved */ - /* - <?php $cart = $this->cart(); - if ($cart->isActive()): ?> - <div id="cartSummary" role="status"> - <a id="cartItems" class="bookmark" data-lightbox title="<?=$this->transEsc('View Book Bag')?>" href="<?=$this->url('cart-home')?>"> - <i class="icon icon-calendar" aria-hidden="true"></i> - <span class="sr-only"><?=$this->transEsc('Book Bag')?>:</span> - <strong class="cart-size"><?= count($cart->getItems()) ?></strong> - <span class="cart-label"><?=$this->transEsc('items')?></span> - <span class="cart-size full<?= !$cart->isFull() ? ' hidden' : '' ?>">(<?= $this->transEsc('bookbag_full') ?>)</span> - </a> - </div> - <?php endif; ?> + <?php /* adlr currently doesn't use cart/bookbag, but accessibility of the following was already improved */ /* + <?php $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> + <span role="status"> + <span class="sr-only"><?=$this->transEsc('Book Bag')?>:</span> <strong><?=count($cart->getItems())?></strong> <span class="cart-label"><?=$this->transEsc('items')?></span> + <span class="sr-only full<?=!$cart->isFull() ? ' hidden' : '' ?>">(<?=$this->transEsc('bookbag_full_msg')?>)</span> + </span> + </a> + </li> + <?php endif; ?> - <?php if (isset($this->layout()->themeOptions) && count($this->layout()->themeOptions) > 1): ?> - <div 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")?> <b class="icon icon-chevron-down"></b></a> - <ul class="dropdown-menu"> - <?php 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> - <?php endforeach; ?> - </ul> - </div> - <?php endif;?> + <?php if (isset($this->layout()->themeOptions) && count($this->layout()->themeOptions) > 1): ?> + <li class="theme dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?=$this->transEsc("Theme")?> <b class="caret"></b></a> + <ul class="dropdown-menu"> + <?php foreach ($this->layout()->themeOptions as $current): ?> + <li<?=$current['selected'] ? ' class="active"' : ''?>> + <a href="<?=$this->escapeHtmlAttr($this->url()->addQueryParameters(['ui' => $current['name']])) ?>" rel="nofollow"> + <?=$this->transEsc($current['desc']) ?> + </a> + </li> + <?php endforeach; ?> + </ul> + </li> + <?php endif; ?> */ ?> </div> <?php endif; ?> @@ -69,44 +66,43 @@ <div class="navbar-header"> <?php /* login / logout */ ?> <?php if (is_object($account) && $account->loginEnabled()): // hide login/logout if unavailable?> - <span class="logoutOptions<?php if (!$account->isLoggedIn()): ?> hidden<?php endif ?>"> - <a class="navbar-header-link logout" href="<?= $this->url('myresearch-logout') ?>" tabindex="3"> - <span class="decorate hidden-xs hidden-sm-lg"><?= $this->transEsc("Log Out") ?></span> - <span class="sr-only-xs-sm-md"><?= $this->transEsc("Log Out") ?></span> - <i class="icon icon-log-out" aria-hidden="true"></i> + <span class="logoutOptions<?php if (!$account->isLoggedIn()): ?> hidden<?php endif ?>"> + <a class="navbar-header-link logout" href="<?= $this->url('myresearch-logout') ?>" tabindex="3"> + <span class="decorate hidden-xs hidden-sm-lg"><?= $this->transEsc("Log Out") ?></span> + <span class="sr-only-xs-sm-md"><?= $this->transEsc("Log Out") ?></span> + <i class="icon icon-log-out" aria-hidden="true"></i> + </a> + </span> + <span id="loginOptions" class="<?php if ($account->isLoggedIn()): ?>hidden<?php endif ?>"> + <?php if ($account->getSessionInitiator($this->serverUrl($this->url('myresearch-home')))): ?> + <a href="<?= $this->url('myresearch-userlogin') ?>" tabindex="2"> + <span class="decorate hidden-xs hidden-sm hidden-md"><?= $this->transEsc("Institutional Login") ?></span> + <span class="sr-only-xs-sm-md"><?= $this->transEsc("Institutional Login") ?></span> + <i class="icon icon-log-in" aria-hidden="true"></i> </a> - </span> - <span id="loginOptions" class="<?php if ($account->isLoggedIn()): ?>hidden<?php endif ?>"> - <?php if ($account->getSessionInitiator($this->serverUrl($this->url('myresearch-home')))): ?> - <a href="<?= $this->url('myresearch-userlogin') ?>" tabindex="2"> - <span class="decorate hidden-xs hidden-sm hidden-md"><?= $this->transEsc("Institutional Login") ?></span> - <span class="sr-only-xs-sm-md"><?= $this->transEsc("Institutional Login") ?></span> + <?php else: ?> + <a class="navbar-header-link" href="<?= $this->url('myresearch-userlogin') ?>" data-lightbox tabindex="2"> + <span class="decorate hidden-xs hidden-sm-lg"><?= $this->transEsc("Login") ?></span> + <span class="sr-only-xs-sm-md"><?= $this->transEsc("Login") ?></span> <i class="icon icon-log-in" aria-hidden="true"></i> - </a> - <?php else: ?> - <a class="navbar-header-link" href="<?= $this->url('myresearch-userlogin') ?>" data-lightbox tabindex="2"> - <span class="decorate hidden-xs hidden-sm-lg"><?= $this->transEsc("Login") ?></span> - <span class="sr-only-xs-sm-md"><?= $this->transEsc("Login") ?></span> - <i class="icon icon-log-in" aria-hidden="true"></i> - </a> - <?php endif; ?> - </span> - <span class="logoutOptions<?php if ($account->dropdownEnabled()): ?> with-dropdown<?php endif ?><?php if (!$account->isLoggedIn()): ?> hidden<?php endif ?>"> - <a tabindex="2" class="navbar-header-link" href="<?= $this->url('myresearch-home', [], ['query' => ['redirect' => 0]]) ?>"> - <span class="decorate hidden-sm-lg hidden-xs"><?= $this->transEsc("Your Account") ?></span> - <span class="sr-only-xs-sm-md"><?= $this->transEsc("Your Account") ?></span> - <i id="account-icon" class="icon icon-user" aria-hidden="true"></i> </a> - </span> - <?php if ($account->dropdownEnabled()): ?> - <div id="login-dropdown" class="dropdown<?php if (!$account->isLoggedIn()): ?> hidden<?php endif ?>"> - <a href="#" data-toggle="dropdown"><i class="icon icon-chevron-down"></i></a> - <div class="dropdown-menu"> - <?= $this->render('myresearch/menu'); ?> - </div> - </div> <?php endif; ?> - + </span> + <span class="logoutOptions<?php if ($account->dropdownEnabled()): ?> with-dropdown<?php endif ?><?php if (!$account->isLoggedIn()): ?> hidden<?php endif ?>"> + <a tabindex="2" class="navbar-header-link" href="<?= $this->url('myresearch-home', [], ['query' => ['redirect' => 0]]) ?>"> + <span class="decorate hidden-sm-lg hidden-xs"><?= $this->transEsc("Your Account") ?></span> + <span class="sr-only-xs-sm-md"><?= $this->transEsc("Your Account") ?></span> + <i id="account-icon" class="icon icon-user" aria-hidden="true"></i> + </a> + </span> + <?php if ($account->dropdownEnabled()): ?> + <div id="login-dropdown" class="dropdown<?php if (!$account->isLoggedIn()): ?> hidden<?php endif ?>"> + <a href="#" data-toggle="dropdown"><i class="icon icon-chevron-down"></i></a> + <div class="dropdown-menu"> + <?= $this->render('myresearch/menu'); ?> + </div> + </div> + <?php endif; ?> <?php endif; ?> <?php /* login / logout - END */ ?> </div> @@ -220,13 +216,12 @@ <?php /* no data-toggle: .open dropdown-menu of sbox manually to prevent interdependence-bug with dropdown quickfilter(s) within sbox - RL */ ?> <button class="btn btn-primary dropdown-toggle" type="button" id="search-main-dropdown"> <span class="text-open"><?= $this->transEsc("Open Search") ?><span class="icon icon-chevron-down"></span></span> - <span class="text-close"><?= $this->transEsc("Close Search") ?><span - class="icon icon-chevron-up"></span></span> + <span class="text-close"><?= $this->transEsc("Close Search") ?><span class="icon icon-chevron-up"></span></span> </button> <ul class="dropdown-menu-parent sbox-dd-menu"> <li> <nav class="nav searchbox hidden-print"> - <?= $this->layout()->searchbox ?> + <?=$this->layout()->searchbox ?> </nav> </li> </ul> diff --git a/themes/fid_adlr/templates/layout/layout.phtml b/themes/fid_adlr/templates/layout/layout.phtml index da8a1da1b00..e46c954e74d 100644 --- a/themes/fid_adlr/templates/layout/layout.phtml +++ b/themes/fid_adlr/templates/layout/layout.phtml @@ -2,7 +2,7 @@ <html lang="<?=$this->layout()->userLang?>"<?php if ($this->layout()->rtl): ?> dir="rtl"<?php endif; ?>> <head> <?php $this->headThemeResources(); ?> - <?php /* remove meta because of W3C Validator error - CK */ + <?php /* finc: remove meta because of W3C Validator error - CK */ /* <meta charset="utf-8"> */ ?> <meta http-equiv="X-UA-Compatible" content="IE=edge"/> @@ -15,6 +15,7 @@ <?php /* END TODO */ ?> <?=$this->headMeta()?> + <?php /* fid_adlr: translate header title */ ?> <?=$this->headTitle(' ' . $this->translate('adlr_head_title'))?> <?php // Set up OpenSearch link: @@ -34,6 +35,7 @@ <?=$this->headLink()?> <?=$this->headStyle()?> <?php + // fid_adlr: move if-condition down for fix broken design #16984 // Add translation strings // PDA (BELOW) is a custom finc string - CK $this->jsTranslations()->addStrings( @@ -62,12 +64,11 @@ 'loading' => 'Loading', 'more' => 'more', 'number_thousands_separator' => [ - 'number_thousands_separator', null, ',' + 'number_thousands_separator', null, ',' ], 'sms_success' => 'sms_success' ] ); - // Add libphonenumber.js strings $this->jsTranslations()->addStrings( [ @@ -81,6 +82,7 @@ ] ); + // fid_adlr: move if-condition here for fix broken design #16984 if (!isset($this->renderingError)) { // Deal with cart stuff: $cart = $this->cart(); @@ -116,9 +118,9 @@ } } - /* #16984 prevent js error due to undefined var userIsLoggedIn */ + /* fid_adlr: #16984 prevent js error due to undefined var userIsLoggedIn */ $this->headScript()->prependScript( - 'var userIsLoggedIn = ' . ($this->auth()->isLoggedIn() ? 'true' : 'false') . ';' + 'var userIsLoggedIn = ' . ($this->auth()->isLoggedIn() ? 'true' : 'false') . ';' ); // Session keep-alive @@ -157,7 +159,20 @@ JS; ?> <?=$this->headScript()?> </head> -<body class="template-dir-<?=$this->templateDir?> template-name-<?=$this->templateName?> <?=$this->layoutClass('offcanvas-row')?><?php if ($this->layout()->rtl): ?> rtl<?php endif; ?>"> +<?php /* finc: accessibility fixes #17720 */ ?> +<?php +$searchType = ''; +// to determine the searchtype it is necessary to ask the child model for its searchType +if ($this->layout()->templateName === 'results' && $this->layout()->hasChildren()) { + try { + $searchType + = current($this->layout()->getChildren())->params->getSearchType(); + } catch (\Throwable $t) { + // ignore all errors + } +} +?> +<body class="template-dir-<?=$this->templateDir?> template-name-<?=$this->templateName?> <?=$this->layoutClass('offcanvas-row')?><?php if ($this->layout()->rtl): ?> rtl<?php endif; ?><?php if ($searchType == 'advanced'): ?> result-advanced<?php endif; ?>"> <?php // 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 @@ -168,49 +183,50 @@ if (!isset($this->layout()->searchbox)) { $this->layout()->searchbox = $this->render('search/searchbox.phtml'); } ?> -<?php if (isset($this->layout()->srmessage)): // message for benefit of screen-reader users ?> - <span class="sr-only" role="heading" aria-level="1"><?=$this->layout()->srmessage?></span> -<?php 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> + <?php if (isset($this->layout()->srmessage)): // message for benefit of screen-reader users ?> + <span class="sr-only" role="heading" aria-level="1"><?=$this->layout()->srmessage?></span> + <?php 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> -<?php /* Start header here, not above, custom finc, CK */ ?> -<header class="hidden-print collapse in"> + <?php /* Start header here, not above, custom finc, CK */ ?> + <?php /* fid_adlr: add class "collapse in" #15653 */ ?> + <header class="hidden-print collapse in"> <?=$this->render('header.phtml')?> </header> +<?php /* fid_adlr: remove nav-element #15967 */ ?> +<?php /* fid_adlr: add classname and id #15653 */ ?> <div role="main" class="main collapse in" id="main"> <div id="content" class="container"> - <?=$this->layout()->content?> + <?=$this->layout()->content?> </div> </div> - <?=$this->render('footer.phtml')?> <!-- MODAL IN CASE WE NEED ONE --> -<?php /* move X button to logical pos. in structure + make accessible via tab - CK */ ?> -<div id="modal" class="modal fade hidden-print" tabindex="-1" role="dialog" aria-modal="true" data-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> +<?php /* finc: move X button to logical pos. in structure + use 'aria-describedby' instead of 'aria-labelledby - CK */ ?> + <div id="modal" class="modal fade hidden-print" tabindex="-1" role="dialog" aria-modal="true" aria-hidden="true" aria-describedby="modal-description"> + <div class="modal-dialog"> + <div class="modal-content"> + <button type="button" class="close" data-dismiss="modal" tabindex="0" aria-label="<?= $this->transEsc('CloseModal') ?>"><i class="fa fa-times" aria-hidden="true"></i></button> + <?php /* finc: add div for screenreader #13547 */ ?> + <div class="sr-only" id="modal-description"><?=$this->transEsc('Modal_description')?></div> + <div class="modal-body"><?=$this->transEsc('Loading') ?> ...</div> + </div> + </div> </div> - </div> -</div> -<div class="offcanvas-overlay" data-toggle="offcanvas"></div> -<?=$this->googleanalytics()?> -<?=$this->piwik()?> -<?php 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')?> -<?php endif; ?> -<?php /* Enable Tooltips, finc-specific, CK */ ?> -<script> - $(document).ready(function () { - $("body").tooltip({selector: '[data-toggle=tooltip]'}); - }); -</script> -</body> + <div class="offcanvas-overlay" data-toggle="offcanvas"></div> + <?=$this->googleanalytics()?> + <?=$this->piwik()?> + <?php 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')?> + <?php endif; ?> + <?php /* Enable Tooltips, finc-specific, CK */ ?> + <script> + $(document).ready(function () { + $("body").tooltip({selector: '[data-toggle=tooltip]'}); + }); + </script> + </body> </html> diff --git a/themes/fid_adlr/templates/myresearch/bulk-action-buttons.phtml b/themes/fid_adlr/templates/myresearch/bulk-action-buttons.phtml index fefa52f4e87..913537b5d14 100644 --- a/themes/fid_adlr/templates/myresearch/bulk-action-buttons.phtml +++ b/themes/fid_adlr/templates/myresearch/bulk-action-buttons.phtml @@ -1,11 +1,12 @@ <!-- fid_adlr: myresearch - bulk-action-buttons --> <?php /* copied from bootstrap3 */ ?> +<?php /* fid_adlr: use $list instead of $location #20908 */ ?> <?php if (isset($list)): ?> <input type="hidden" name="listID" value="<?=$this->escapeHtmlAttr($list->id)?>" /> <input type="hidden" name="listName" value="<?=$this->escapeHtmlAttr($list->title)?>" /> <?php endif; ?> <?php $user = $this->auth()->isLoggedIn(); ?> -<div class="bulkActionButtons"> +<nav class="bulkActionButtons"> <div class="bulk-checkbox"> <input type="checkbox" name="selectAll" class="checkbox-select-all" id="myresearchCheckAll"/> <label for="myresearchCheckAll"><?=$this->transEsc('select_page')?> | <?=$this->transEsc('with_selected')?>:</label> @@ -15,19 +16,21 @@ * removed print action * Changed order of action buttons */ ?> - <div class="btn-group"> - <?php /* #21900 use adlr-design by setting classname btn btn-primary to the following elements */ ?> - <input class="btn btn-primary" type="submit" name="email" value="<?=$this->transEsc('Email this')?>" title="<?=$this->transEsc('email_selected')?>"/> + <ul class="action-toolbar"> + <?php /* #21900 use adlr-design by setting classname btn-primary to the following elements; Do NOT set classname "toolbar-btn" */ ?> + <li><button class="btn btn-primary btn-type-email" type="submit" name="email" value="1" title="<?=$this->transEsc('email_selected')?>"><?=$this->transEsc('Email') ?></button></li> + <?php /* refs #17652 remove delete button - GG */ ?> + <?php /* if ((null !== $this->list && $this->list->editAllowed($user)) || null === $this->list && $user): ?> + <li><button class="toolbar-btn btn-type-delete" id="<?=$this->idPrefix?>delete_list_items_<?=null !== $this->list ? $this->escapeHtmlAttr($this->list->id) : ''?>" type="submit" name="delete" value="1" title="<?=$this->transEsc('delete_selected')?>"><?=$this->transEsc('Delete') ?></button></li> + <?php endif; */ ?> <?php $exportOptions = $this->export()->getActiveFormats('bulk'); if (count($exportOptions) > 0): ?> - <input class="btn btn-primary" type="submit" name="export" value="<?=$this->transEsc('Export')?>" title="<?=$this->transEsc('export_selected')?>"/> + <li><button class="btn btn-primary btn-type-export" type="submit" name="export" value="1" title="<?=$this->transEsc('export_selected')?>"><?=$this->transEsc('Export')?></button></li> <?php endif; ?> - <?php /* refs #17652 remove delete button - GG */ ?> - <?php /*if ((null !== $this->list && $this->list->editAllowed($user)) || null === $this->list && $user): ?> - <input class="btn btn-default" id="<?=$this->idPrefix?>delete_list_items_<?=null !== $this->list ? $this->escapeHtmlAttr($this->list->id) : ''?>" type="submit" name="delete" value="<?=$this->transEsc('Delete')?>" title="<?=$this->transEsc('delete_selected')?>"/> - <?php endif;*/ ?> + <?php /* refs #17046 remove print */ ?> + <?php /* <li><button class="toolbar-btn btn-type-print" type="submit" name="print" value="1" title="<?=$this->transEsc('print_selected')?>" data-lightbox-ignore><?=$this->transEsc('Print')?></button></li> */ ?> <?php if ($this->cart()->isActive()): ?> - <input class="btn btn-primary" id="<?=$this->idPrefix?>updateCart" type="submit" name="add" value="<?=$this->transEsc('Add to Book Bag')?>"/> + <li><button class="btn btn-type-add" id="<?=$this->idPrefix?>updateCart" type="submit" name="add" value="1"><?=$this->transEsc('Add to Book Bag')?></button></li> <?php endif; ?> - </div> -</div> + </ul> +</nav> <!-- fid_adlr: myresearch - bulk-action-buttons - END --> \ No newline at end of file diff --git a/themes/fid_adlr/templates/myresearch/edit.phtml b/themes/fid_adlr/templates/myresearch/edit.phtml index b3e68d08184..82948822c33 100644 --- a/themes/fid_adlr/templates/myresearch/edit.phtml +++ b/themes/fid_adlr/templates/myresearch/edit.phtml @@ -8,14 +8,16 @@ // 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>'; ?> -<h1 class="sr-only"><?=$this->translate('Edit') . ' : ' . $this->driver->getBreadcrumb()?></h1> + +<?php /* Finc: remove space before color for correct spacing 'Bearbeiten: ....' instead of 'Bearbeiten : ....' */ ?> +<h1 class="sr-only"><?=$this->translate('Edit') . ': ' . $this->driver->getBreadcrumb()?></h1> <div class="record"> <h2><?=$this->escapeHtml($this->driver->getBreadcrumb())?></h2> <form class="form-list-edit" method="post" name="editForm"> <?php if (empty($this->savedData)): ?> - <p class="alert alert-info"> + <p class="alert alert-info" aria-live="polite"> <?php if (isset($listFilter)): ?> <?=$this->transEsc('The record you selected is not part of the selected list.') ?> <?php else: ?> @@ -39,7 +41,6 @@ <label class="control-label" for="edit_notes<?=$current['listId'] ?>"><?=$this->transEsc('Notes') ?>:</label> <textarea class="form-control" id="edit_notes<?=$current['listId'] ?>" name="notes<?=$current['listId'] ?>" rows="3"><?=$this->escapeHtml($current['notes'])?></textarea> </div> - <?php /* fid_adlr: use adlr-design by setting classname btn btn-link and move i-element inside of a-element #21900 */ ?> <?php /* Use a different delete URL if we're removing from a specific list or the overall favorites: */ $list_id = $current['listId']; @@ -110,6 +111,7 @@ <?php endif; ?> <?php if (!empty($this->savedData) || count($this->lists) > 0): ?> <div class="form-group"> + <?php /* finc adds aria-label #17915 */ ?> <input class="btn btn-primary" type="submit" name="submit" value="<?=$this->transEsc('Save') ?>" aria-label="<?=$this->transEsc('Save') ?>"/> </div> <?php endif; ?> diff --git a/themes/fid_adlr/templates/myresearch/menu.phtml b/themes/fid_adlr/templates/myresearch/menu.phtml index 1851985ac4a..3b7384e08be 100644 --- a/themes/fid_adlr/templates/myresearch/menu.phtml +++ b/themes/fid_adlr/templates/myresearch/menu.phtml @@ -1,27 +1,22 @@ -<?php -/** -* +<!-- fid_adlr - myresearch - menu --> +<?php /** * copied from /bootstrap3/templates/myresearch/menu.phtml * changed for fid specific menu * refs #15480 add password change to fid profile -* -* @author Robert Lange <lange@@ub.uni-leipzig.de> -* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License -* @link https://vufind.org Main Page -*/ -?> -<!-- fid-adlr myresearch - menu --> +*/ ?> + <?php $user = $this->auth()->isLoggedIn(); + // fid: remove $patron and $capabilityParams for book orders in user profile #16223 ?> -<?php /* Offcanvas closing button missing in BS3! CK*/ ?> -<button class="close-offcanvas btn btn-link right" data-toggle="offcanvas"><i class="icon icon-close icon-2x"></i></button> +<?php /* finc change btn-link to btn-default */ ?> +<button class="close-offcanvas btn btn-default right" data-toggle="offcanvas"><i class="icon icon-close icon-2x"></i></button> <div class="clearfix"></div> <?php if (!empty($user)): ?> - <?php if ($this->userlist()->getMode() !== 'disabled'): ?> - <h4><?=$this->transEsc('Your Lists')?></h4> + <?php /* finc adds '.lists-heading' for styling purposes */ ?> + <h4 class="lists-heading"><?=$this->transEsc('Your Lists')?></h4> <div class="myresearch-menu"> <a href="<?=$this->url('myresearch-favorites')?>"<?=$this->active == 'favorites' ? ' class="active"' : ''?>> @@ -36,7 +31,7 @@ <?php endforeach; ?> <a href="<?=$this->url('editList', ['id' => 'NEW'])?>"> - <i class="icon icon-plus" aria-hidden="true"></i> <?=$this->transEsc('Create a List') ?> + <i class="icon icon-plus" aria-hidden="true"></i> <?=$this->transEsc('Create a List')?> </a> <?php /* link to listing of debis databases etc. */ ?> @@ -46,12 +41,9 @@ </a> <?php endif; ?> - <?php /* refs #16033 order list page link */ ?> + <?php /* fid_adlr: refs #16033 order list page link */ ?> <a href="<?=$this->url('fid/user/orders')?>"<?=$this->active == 'orders' ? ' class="active"' : ''?>> - <span class="no-padding"> - <i class="icon icon-package" aria-hidden="true"></i> - </span> - <?=$this->transEsc('Your Orders')?> + <span class="no-padding"><i class="icon icon-package" aria-hidden="true"></i> </span><?=$this->transEsc('Your Orders')?> </a> <?php if ($this->accountCapabilities()->getSavedSearchSetting() === 'enabled'): ?> @@ -62,11 +54,8 @@ <?php /* refs #16033 / #16510 new print publications page link */ ?> <?php if (!empty($this->config()->get('config')->RawQueries['new_releases'])): ?> - <a href="<?= $this->url('search-results') ?><?= $this->config()->get('config')->RawQueries['new_releases']?>"> - <span class="no-padding"> - <i class="icon icon-book" aria-hidden="true"></i> - </span> - <?=$this->transEsc('new_print_publications')?> + <a href="<?=$this->url('search-results') ?><?=$this->config()->get('config')->RawQueries['new_releases']?>"> + <span class="no-padding"><i class="icon icon-book" aria-hidden="true"></i> </span><?=$this->transEsc('new_print_publications')?> </a> <?php endif; ?> </div> @@ -76,55 +65,38 @@ <h4><?=$this->transEsc('Your Account')?></h4> <div class="myresearch-menu account-menu"> <?php if ('ils-none' !== $this->ils()->getOfflineMode()): ?> - <a href="<?= $this->url('myresearch-profile') ?>" <?= $this->active == 'profile' ? ' class="active"' : '' ?>> - <i class="icon icon-user" aria-hidden="true"></i> - <?= $this->transEsc('Profile') ?> + <a href="<?=$this->url('myresearch-profile')?>"<?=$this->active == 'profile' ? ' class="active"' : ''?>> + <i class="icon icon-user" aria-hidden="true"></i> <?=$this->transEsc('Profile')?> </a> - <?php /* refs #15480 add password change to fid profile */ ?> - - <a href="<?= $this->url('fid/user/reset-password') ?>" data-lightbox> - <span class="no-padding"> - <i class="icon icon-lock" aria-hidden="true"></i> - </span> - <?= $this->transEsc('Change Password') ?> + <?php /* fid: refs #15480 add password change to fid profile */ ?> + <a href="<?=$this->url('fid/user/reset-password')?>" data-lightbox> + <span class="no-padding"><i class="icon icon-lock" aria-hidden="true"></i> </span><?=$this->transEsc('Change Password')?> </a> - <a href="<?= $this->url('fid/user/change-username') ?>" data-lightbox> - <span class="no-padding"> - <i class="icon icon-edit-3" aria-hidden="true"></i> - </span> - <?= $this->transEsc('fid::username_change_link') ?> + <?php /* fid: add username change to fid profile #15777 */ ?> + <a href="<?=$this->url('fid/user/change-username')?>" data-lightbox> + <span class="no-padding"><i class="icon icon-edit-3" aria-hidden="true"></i> </span><?=$this->transEsc('fid::username_change_link')?> </a> - <a href="<?= $this->url('fid/user/delete') ?>" data-lightbox> - <span class="no-padding"> - <i class="icon icon-trash-2" aria-hidden="true"></i> - </span> - <?= $this->transEsc('fid::user_delete_link') ?> + <a href="<?=$this->url('fid/user/delete')?>" data-lightbox> + <span class="no-padding"><i class="icon icon-trash-2" aria-hidden="true"></i> </span><?=$this->transEsc('fid::user_delete_link')?> </a> - <?php /* refs #16033 contact link */ ?> - <a href="<?= $this->url('feedback-home') ?>" data-lightbox> - <span class="no-padding"> - <i class="icon icon-mail" aria-hidden="true"></i> - </span> - <?= $this->transEsc('contact_adlr') ?> + <?php /* fid_adlr: refs #16033 contact link */ ?> + <a href="<?=$this->url('feedback-home')?>" data-lightbox> + <span class="no-padding"><i class="icon icon-mail" aria-hidden="true"></i> </span><?=$this->transEsc('contact_adlr')?> </a> <span class="logout-button"> - <a href="<?= $this->url('myresearch-logout') ?>"> - <span class="no-padding"> - <i class="icon icon-log-out" aria-hidden="true"></i> - </span> - <?= $this->transEsc("Logout") ?> + <a href="<?=$this->url('myresearch-logout')?>"> + <span class="no-padding"><i class="icon icon-log-out" aria-hidden="true"></i> </span><?=$this->transEsc("Logout")?> </a> </span> <?php if ($user->libraryCardsEnabled()): ?> - <a href="<?= $this->url('librarycards-home') ?>" - <?= $this->active == 'librarycards' ? ' class="active"' : '' ?>> - <i class="fa fa-fw fa-barcode" aria-hidden="true"></i> <?= $this->transEsc('Library Cards') ?> + <a href="<?=$this->url('librarycards-home')?>"<?=$this->active == 'librarycards' ? ' class="active"' : ''?>> + <i class="fa fa-fw fa-barcode" aria-hidden="true"></i> <?=$this->transEsc('Library Cards')?> </a> <?php endif; ?> <?php endif; ?> @@ -138,5 +110,5 @@ <a href="<?=$this->url('fid/admin/orders')?>"><?=$this->transEsc('fid::permission_read_order_list')?></a> </div> <?php endif; ?> - <!-- fid-adlr: myresearch - menu - END --> <?php endif; ?> +<!-- fid_adlr - myresearch - menu - END --> diff --git a/themes/fid_adlr/templates/myresearch/profile.phtml b/themes/fid_adlr/templates/myresearch/profile.phtml index 3ffd72b1911..ff19f91e79f 100644 --- a/themes/fid_adlr/templates/myresearch/profile.phtml +++ b/themes/fid_adlr/templates/myresearch/profile.phtml @@ -1,33 +1,45 @@ <!-- fid_adlr: myresearch - profile --> <?php -// Set up page title: -$this->headTitle($this->translate('My Profile')); + // Set up page title: + $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>'; + // 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>'; -// Template for use by the renderArray helper: -$arrTemplate = '<tr><th>%%LABEL%%:</th><td> %%VALUE%%</td></tr>'; + // Template for use by the renderArray helper: + $arrTemplate = '<tr><th>%%LABEL%%:</th><td> %%VALUE%%</td></tr>'; -$profile = $this->profile; -if (is_array($profile)) { + // styling for user forms #15445 + $profile = $this->profile; + if (is_array($profile)) { $groups = $this->UserGroups($profile['user']->getPermissions()); $profile['group'] = $groups->granted(); $profile['requested_group'] = $groups->requested(); $profile['job_title'] = $this->translate('fid::job_title_' . $profile['user']->getJobTitle()); $profile['home_library'] = $profile['libs'][$profile['user']->getHomeLibrary()]->getLabel(); $profile['college'] = $profile['user']->getCollege(); + // fid_adlr: display newsletter in profile #19182 $profile['newsletter'] = $this->translate('fid::newsletter_' . (int)$profile['user']->isNewsletter()); -} + } ?> +<?php /* finc: remove title, add aria-label */ ?> +<a class="search-filter-toggle visible-xs" href="#myresearch-sidebar" data-toggle="offcanvas" aria-label="<?=$this->transEsc('sidebar_expand')?>"> + <?=$this->transEsc('Your Account') ?> +</a> + <div class="<?=$this->layoutClass('mainbody')?>"> <?php /* finc V5: adds offcanvas-toggler missing in VF5, compare with finc/fid themes during update - CK */ ?> <?=$this->render('RecordDriver/DefaultRecord/offcanvas-toggler-myresearch'); ?> - <h2><?=$this->transEsc('Your Profile')?></h2> + + <?php /* finc uses h1 here */ ?> + <h1><?=$this->transEsc('Your Profile')?></h1> <?=$this->flashmessages();?> + <?php if (is_array($this->profile)): ?> - <div class="table-responsive"><table class="table table-striped"> + <?php /* fid_adlr: responsive tables via horizontal scrolling: add div with "table-responsive" #16767 */ ?> + <div class="table-responsive"> + <table class="table table-striped"> <?=$this->renderArray( $arrTemplate, $profile, @@ -47,14 +59,16 @@ if (is_array($profile)) { ] ) )?> - </table></div> + </table> + </div> + <?php /* fid: changes user data #15405 */ ?> <a href="<?=$this->url('fid/user/update')?>" class="btn btn-primary"><?=$this->transEsc('fid::Edit Account')?></a> <?php elseif ('ils-none' !== $this->ils()->getOfflineMode() && $this->patronLoginView && !empty($this->patronLoginView->getTemplate())): ?> <?=$this->partial($this->patronLoginView);?> <?php endif; ?> </div> -<div class="<?=$this->layoutClass('sidebar')?>"> +<div class="<?=$this->layoutClass('sidebar')?>" id="myresearch-sidebar"> <?=$this->context($this)->renderInContext("myresearch/menu.phtml", ['active' => 'profile'])?> </div> <!-- fid_adlr: myresearch - profile - END --> diff --git a/themes/fid_adlr/templates/record/email.phtml b/themes/fid_adlr/templates/record/email.phtml index 2003f61fe58..1905bf49031 100644 --- a/themes/fid_adlr/templates/record/email.phtml +++ b/themes/fid_adlr/templates/record/email.phtml @@ -1,4 +1,5 @@ -<!-- adlr-record - EMAIL.phtml --> +<!-- fid_adlr - record - email --> +<?php /* compare with bootstrap3 */?> <?php // Set page title. $this->headTitle($this->translate('Email Record')); @@ -9,11 +10,13 @@ . '<li class="active">' . $this->transEsc('Email Record') . '</li>'; ?> <h2><?=$this->transEsc('Email Record') ?>: <span class="title-in-heading"><?=$this->escapeHtml($this->driver->getBreadcrumb())?></span></h2> +<?php /* fid_adlr: adjust action in form #16680; remove classname #5375 */ ?> <form method="post" action="<?=$this->recordLink()->getActionUrl($this->driver, 'Email')?>" name="emailRecord"> <?=$this->flashmessages()?> + <?php /* fid_adlr: add record information #16680 */ ?> <?=$this->transEsc('email_record_information')?> <input type="hidden" name="id" value="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>" /> <input type="hidden" name="source" value="<?=$this->escapeHtmlAttr($this->driver->getSourceIdentifier())?>" /> <?=$this->render('Helpers/email-form-fields.phtml')?> </form> -<!-- adlr-record - EMAIL.phtml end --> \ No newline at end of file +<!-- fid_adlr - record - email - END --> \ No newline at end of file diff --git a/themes/fid_adlr/templates/record/view.phtml b/themes/fid_adlr/templates/record/view.phtml index 79fe8e479ef..2e93cf7004d 100644 --- a/themes/fid_adlr/templates/record/view.phtml +++ b/themes/fid_adlr/templates/record/view.phtml @@ -1,54 +1,59 @@ <!-- fid_adlr: record - view --> <?php -// Set up standard record scripts: -$this->headScript()->appendFile("record.js"); -$this->headScript()->appendFile("check_save_statuses.js"); -$this->headScript()->appendFile("check_save_statuses_adlr.js"); -// Activate Syndetics Plus if necessary: -if ($this->syndeticsPlus()->isActive()) { - $this->headScript()->appendFile($this->syndeticsPlus()->getScript()); -} + // Set up standard record scripts: + $this->headScript()->appendFile("record.js"); + $this->headScript()->appendFile("check_save_statuses.js"); + // fid_adlr: append file #16706 + $this->headScript()->appendFile("check_save_statuses_adlr.js"); + // Activate Syndetics Plus if necessary: + if ($this->syndeticsPlus()->isActive()) { + $this->headScript()->appendFile($this->syndeticsPlus()->getScript()); + } -// Add RDF header link if applicable: -if ($this->export()->recordSupportsFormat($this->driver, 'RDF')) { - $this->headLink()->appendAlternate($this->recordLink()->getActionUrl($this->driver, 'RDF'), 'application/rdf+xml', 'RDF Representation'); -} + // Add RDF header link if applicable: + if ($this->export()->recordSupportsFormat($this->driver, 'RDF')) { + $this->headLink()->appendAlternate($this->recordLink()->getActionUrl($this->driver, 'RDF'), 'application/rdf+xml', 'RDF Representation'); + } -// Set up breadcrumbs: -$this->layout()->breadcrumbs = '<li>' . $this->searchMemory()->getLastSearchLink($this->transEsc('Search'), '', '</li> ') . - '<li class="active">' . $this->recordLink()->getBreadcrumb($this->driver) . '</li> '; -$this->layout()->title = $this->driver->getShortTitle(); -$this->headTitle($this->driver->getBreadcrumb() . ' -'); + // Set up breadcrumbs: + $this->layout()->breadcrumbs = '<li>' . $this->searchMemory()->getLastSearchLink($this->transEsc('Search'), '', '</li> ') . + '<li class="active" aria-current="page">' . $this->recordLink()->getBreadcrumb($this->driver) . '</li> '; + $this->layout()->title = $this->driver->getShortTitle(); + // fid_adlr: add getBreadcrumb to fix multiple titles #18780 + $this->headTitle($this->driver->getBreadcrumb() . ' -'); ?> -<?php /* fid_adlr:Remove previous and next record refs #15650 - GG */ ?> +<?php /* fid_adlr: Remove previous and next record refs #15650 - GG */ ?> +<?php /* if (isset($this->scrollData) && ($this->scrollData['previousRecord'] || $this->scrollData['nextRecord'])): ?> + <?=$this->render('record/prev-next.phtml'); ?> +<?php endif; */ ?> - <?php - /* finc-specific: Remove getToolbar from here and add it to sidebar below - CK - <?=$this->record($this->driver)->getToolbar()?> */ - ?> +<?php + /* finc removes 'getToolbar' from here and adds it to sidebar below - CK + <?=$this->record($this->driver)->getToolbar()?> + */ +?> - <div class="record source<?=$this->escapeHtmlAttr($this->driver->getSourceIdentifier())?>"> - <?php /* finc: remove related-sidebar count and "solo" class since we use a custom sidebar, - keep print classes, CK */ ?> - <?php $sidebarList = $this->related()->getList($this->driver); ?> - <div class="<?=$this->layoutClass('mainbody')?> print-full-width"> - <input type="hidden" value="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>" class="hiddenId"/> - <input type="hidden" value="<?=$this->escapeHtmlAttr($this->driver->getSourceIdentifier())?>" class="hiddenSource"/> - <?=$this->flashmessages()?> - <?=$this->record($this->driver)->getCoreMetadata()?> +<div class="record source<?= $this->escapeHtmlAttr($this->driver->getSourceIdentifier()) ?>"> + <?php $sidebarList = $this->related()->getList($this->driver); ?> + <?php /* finc - don't use '<?=count($sidebarList) < 1 ? ' solo' : '' ?>' or toolbar won't fit; BS count sidebars but our toolbar isn't counted */ ?> + <div class="<?=$this->layoutClass('mainbody')?>"> + <input type="hidden" value="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>" class="hiddenId" /> + <input type="hidden" value="<?=$this->escapeHtmlAttr($this->driver->getSourceIdentifier()) ?>" class="hiddenSource" /> + <?=$this->flashmessages()?> + <?=$this->record($this->driver)->getCoreMetadata()?> - <?php + <?php /* fid_adlr: add span and classname 'margin-l' #17913 */ ?> + <?php $link = '<i class="icon icon-arrow-left icon-1.5x" aria-hidden="true"></i><span class="margin-l">' . $this->transEsc('go_to_list') . '</span>'; - ?> - <?=$this->searchMemory()->getLastSearchLink($link)?> - - <?=$this->driver->supportsCoinsOpenURL() ? '<span class="Z3988" title="' . $this->escapeHtmlAttr($this->driver->getCoinsOpenURL()) . '"></span>' : ''?> - </div> + ?> + <?=$this->searchMemory()->getLastSearchLink($link)?> + <?=$this->driver->supportsCoinsOpenURL()?'<span class="Z3988" title="' . $this->escapeHtmlAttr($this->driver->getCoinsOpenURL()) . '"></span>':''?> + </div> - <?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, '$(document).ready(recordDocReady);', 'SET');?> +<?= $this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, '$(document).ready(recordDocReady);', 'SET'); ?> -<?php /* #17831 */ ?> +<?php /* fid_adlr: add specific adlr JS #19260, #17831 */ ?> <?php $script = <<<JS $(document).ready(function() { $("body").on('DOMSubtreeModified', ".getitbox", function (){ @@ -64,5 +69,5 @@ $this->headTitle($this->driver->getBreadcrumb() . ' -'); JS; ?> <?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, $script, 'SET');?> -<?php /* #17831 END */ ?> +<?php /* #19260, #17831 END */ ?> <!-- fid_adlr: record - view - END --> diff --git a/themes/fid_adlr/templates/search/advanced/layout.phtml b/themes/fid_adlr/templates/search/advanced/layout.phtml index 6b1897d99ab..c19982cf7ff 100644 --- a/themes/fid_adlr/templates/search/advanced/layout.phtml +++ b/themes/fid_adlr/templates/search/advanced/layout.phtml @@ -1,65 +1,65 @@ -<!-- finc: search - advanced - layout --> +<!-- fid_adlr: search - advanced - layout --> <?php -// Set page title. -$this->headTitle($this->translate('Advanced Search')); + // Set page title. + $this->headTitle($this->translate('Advanced Search')); -// Disable top search box -- this page has a special layout. -$this->layout()->searchbox = false; + // Disable top search box -- this page has a special layout. + $this->layout()->searchbox = false; -// Set up breadcrumbs: -$this->layout()->breadcrumbs = '<li>'; -$lastSearchLink = $this->searchMemory()->getLastSearchLink($this->transEsc('Search')); -$this->layout()->breadcrumbs .= !empty($lastSearchLink) - ? $lastSearchLink : $this->transEsc('Search'); -$this->layout()->breadcrumbs .= '</li> <li class="active">' . $this->transEsc('Advanced') . '</li>'; + // Set up breadcrumbs: + $this->layout()->breadcrumbs = '<li>'; + $lastSearchLink = $this->searchMemory()->getLastSearchLink($this->transEsc('Search')); + $this->layout()->breadcrumbs .= !empty($lastSearchLink) + ? $lastSearchLink : $this->transEsc('Search'); + $this->layout()->breadcrumbs .= '</li> <li class="active">' . $this->transEsc('Advanced') . '</li>'; -// Set up saved search details: -if (isset($this->saved) && is_object($this->saved)) { - $searchDetails = $this->saved->getParams()->getQuery(); - if ($searchDetails instanceof \VuFindSearch\Query\Query) { - // Not an advanced query -- ignore it. - $searchDetails = $groups = false; + // Set up saved search details: + if (isset($this->saved) && is_object($this->saved)) { + $searchDetails = $this->saved->getParams()->getQuery(); + if ($searchDetails instanceof \VuFindSearch\Query\Query) { + // Not an advanced query -- ignore it. + $searchDetails = $groups = false; + } else { + $groups = $searchDetails->getQueries(); + } + $hasDefaultsApplied = $this->saved->getParams()->hasDefaultsApplied(); + $searchFilters = $this->saved->getParams()->getFilterList(); + $hiddenFilters = $this->saved->getParams()->getHiddenFilters(); } else { - $groups = $searchDetails->getQueries(); + $hasDefaultsApplied = $searchDetails = $searchFilters = $groups = false; + $hiddenFilters = $this->searchTabs()->getHiddenFilters($this->searchClassId, true); } - $hasDefaultsApplied = $this->saved->getParams()->hasDefaultsApplied(); - $searchFilters = $this->saved->getParams()->getFilterList(); - $hiddenFilters = $this->saved->getParams()->getHiddenFilters(); -} else { - $hasDefaultsApplied = $searchDetails = $searchFilters = $groups = false; - $hiddenFilters = $this->searchTabs()->getHiddenFilters($this->searchClassId, true); -} -// Step 1: Load the javascript -$this->headScript()->appendFile( - isset($this->advancedSearchJsOverride) ? $this->advancedSearchJsOverride : 'advanced_search.js' -); -// Step 2: Build the page -$this->headScript()->appendScript( - $this->partial( - isset($this->buildPageOverride) ? $this->buildPageOverride : 'search/advanced/build_page.phtml', - ['options' => $this->options, 'searchDetails' => $searchDetails] - ) -); + // Step 1: Load the javascript + $this->headScript()->appendFile( + isset($this->advancedSearchJsOverride) ? $this->advancedSearchJsOverride : 'advanced_search.js' + ); + // Step 2: Build the page + $this->headScript()->appendScript( + $this->partial( + isset($this->buildPageOverride) ? $this->buildPageOverride : 'search/advanced/build_page.phtml', + ['options' => $this->options, 'searchDetails' => $searchDetails] + ) + ); -// Collect previous search queries -$setSearchGroups = []; -$setGroupCount = 0; -$setQueries = []; -if (isset($searchDetails) && is_object($searchDetails)) { - foreach ($searchDetails->getQueries() as $group=>$searchGroup) { - $setSearchGroups[$group] = $searchGroup->isNegated() ? 'NOT' : $searchGroup->getOperator(); - if ($setGroupCount < $group) { - $setGroupCount = $group; - } - if (!isset($setQueries[$group])) { - $setQueries[$group] = []; - } - foreach ($searchGroup->getQueries() as $search) { - $setQueries[$group][] = $search; + // Collect previous search queries + $setSearchGroups = []; + $setGroupCount = 0; + $setQueries = []; + if (isset($searchDetails) && is_object($searchDetails)) { + foreach ($searchDetails->getQueries() as $group => $searchGroup) { + $setSearchGroups[$group] = $searchGroup->isNegated() ? 'NOT' : $searchGroup->getOperator(); + if ($setGroupCount < $group) { + $setGroupCount = $group; + } + if (!isset($setQueries[$group])) { + $setQueries[$group] = []; + } + foreach ($searchGroup->getQueries() as $search) { + $setQueries[$group][] = $search; + } } } -} ?> <?=$this->flashmessages()?> @@ -76,69 +76,74 @@ if (isset($searchDetails) && is_object($searchDetails)) { <input type="hidden" name="sort" value="<?=$this->escapeHtmlAttr($lastSort)?>" /> <?php endif; ?> <div class="clearfix"> - <span class="offcanvas-toggler"> + <?php /* finc: offcanvas behaviour for xs #17601 */ ?> + <span class="offcanvas-toggler"> <a class="search-filter-toggle btn btn-primary visible-xs" href="#myresearch-sidebar" data-toggle="offcanvas" aria-label="<?=$this->transEsc('sidebar_expand')?>"> <?=$this->transEsc('offcanvas-toggler-search-tips')?> </a> </span> + <?php /* finc uses h1 */ ?> <h1 class="pull-left flip"><?=$this->transEsc('Advanced Search')?></h1> <div id="groupJoin" class="form-inline pull-right flip"> <label for="groupJoinOptions"><?=$this->transEsc("search_match")?>:</label> <select id="groupJoinOptions" name="join" class="form-control"> - <option value="AND"<?php if($searchDetails && $searchDetails->getOperator()=='ALL'):?> selected<?php endif;?>><?= $this->transEsc('group_AND') ?></option> - <option value="OR"<?php if($searchDetails && $searchDetails->getOperator()=='OR'):?> selected<?php endif;?>><?= $this->transEsc('group_OR') ?></option> + <option value="AND"<?php if($searchDetails && $searchDetails->getOperator() == 'ALL'):?> selected<?php endif; ?>><?= $this->transEsc('group_AND') ?></option> + <option value="OR"<?php if($searchDetails && $searchDetails->getOperator() == 'OR'):?> selected<?php endif; ?>><?= $this->transEsc('group_OR') ?></option> </select> </div> </div> <?php /* finc: keep icon inside link for consistent functionality */ ?> <span id="groupPlaceHolder" class="hidden"> + <?php /* fid_adlr: adapt layout, remove "btn btn-default" #16502 */ ?> <a href="javascript:void(0);" onClick="addGroup();return false" role="button"> - <i class="fa fa-plus" aria-hidden="true"> </i> <?= $this->transEsc('add_search_group') ?></a> + <i class="fa fa-plus" aria-hidden="true"></i><?= $this->transEsc('add_search_group') ?> + </a> </span> <?php /* fallback to a fixed set of search groups/fields if JavaScript is turned off */ ?> <div class="no-js"> <?php if(!empty($this->formOverride)): ?> <?=$this->formOverride ?> <?php else: ?> - <?php for($group=0 ; $group<3 || $group<=$setGroupCount ; $group++): ?> + <?php for($group = 0; $group < 3 || $group <= $setGroupCount; $group++): ?> <?php if($group == 0): ?> <div id="new_group_template"> <?php endif; ?> - <div id="group<?=$group?>" class="adv-group" role="group" aria-label="<?=$this->transEsc('adv_search_searchgroup')?> <?=$group?>"> + <?php /* finc add roles, aria-label #19418 */ ?> + <div id="group<?=$group ?>" class="adv-group" role="group" aria-label="<?=$this->transEsc('adv_search_searchgroup')?> <?=$group?>"> <div class="adv-group-terms"> <?php /* remove label in favor of more detailed labelling */ /* <label class="adv-group-label" for="search_lookfor<?=$group ?>_0"><?=$this->transEsc("adv_search_label")?>:</label> */ ?> - <?php for($search=0 ; $search<3 || (isset($setQueries[$group]) && $search<count($setQueries[$group])) ; $search++): ?> + <?php for($search = 0; $search < 3 || (isset($setQueries[$group]) && $search < count($setQueries[$group])); $search++): ?> <?php if($group == 0 && $search == 0): ?> <div id="new_search_template"> - <?php else: ?> + <?php else: ?> <?php endif; ?> - <div id="search<?=$group.'_'.$search ?>" class="adv-search"> + <div id="search<?=$group . '_' . $search ?>" class="adv-search"> + <?php /* finc uses fieldset and label for more consistent formatting - check again in VF 7 or 8.x */ ?> <fieldset> <legend class="sr-only"> <?=$this->transEsc("adv_search_searchfield")?> <?=$search + 1?> </legend> - <div class="adv-input"> - <label for="search_lookfor<?=$group . '_' . $search?>"> - <?=$this->transEsc("search_terms")?>: - </label> - <input name="lookfor<?=$group ?>[]" id="search_lookfor<?=$group . '_' . $search ?>" class="adv-term-input form-control" type="text"<?php if (isset($setQueries[$group][$search])): ?> value="<?=$this->escapeHtml($setQueries[$group][$search]->getString())?>"<?php endif; ?>> - </div> - - <div class="adv-select"> - <label for="type<?=$group . '_' . $search?>"><?=$this->transEsc("Search type")?>:</label> - <select id="type<?=$group . '_' . $search?>" class="adv-term-type form-control" name="type<?=$group?>[]"> - <?php foreach ($this->options->getAdvancedHandlers() as $searchVal => $searchDesc): ?> - <option value="<?=$this->escapeHtml($searchVal)?>"<?php if(isset($setQueries[$group][$search]) && $searchVal == $setQueries[$group][$search]->getHandler()):?> selected<?php endif;?>><?=$this->transEsc($searchDesc)?></option> - <?php endforeach; ?> - </select> - </div> - + <div class="adv-input"> + <label for="search_lookfor<?=$group . '_' . $search?>"> + <?=$this->transEsc("search_terms")?>: + </label> + <input name="lookfor<?=$group ?>[]" id="search_lookfor<?=$group . '_' . $search ?>" class="adv-term-input form-control" type="text"<?php if (isset($setQueries[$group][$search])): ?> value="<?=$this->escapeHtml($setQueries[$group][$search]->getString())?>"<?php endif; ?>> + </div> + <div class="adv-select"> + <label for="type<?=$group . '_' . $search?>"><?=$this->transEsc("Search type")?>:</label> + <?php /* finc: add id #19418 */ ?> + <select id="type<?=$group . '_' . $search?>" class="adv-term-type form-control" name="type<?=$group ?>[]"> + <?php foreach ($this->options->getAdvancedHandlers() as $searchVal => $searchDesc): ?> + <option value="<?=$this->escapeHtml($searchVal)?>"<?php if(isset($setQueries[$group][$search]) && $searchVal == $setQueries[$group][$search]->getHandler()):?> selected<?php endif;?>><?=$this->transEsc($searchDesc)?></option> + <?php endforeach; ?> + </select> + </div> <a href="javascript:void(0);" class="adv-term-remove hidden"> + <?php /* finc: add span for screenreader */ ?> <span class="sr-only"><?=$this->transEsc("remove")?></span> <i class="fa fa-times" aria-hidden="true"></i> </a> - </fieldset> - + </fieldset> </div> <?php if($group == 0 && $search == 0): ?> </div> @@ -146,21 +151,24 @@ if (isset($searchDetails) && is_object($searchDetails)) { (As this will also 'shift search_place_holder') Therefore Keep 'search_place_holder' separate and move icon only ! */ ?> <span class="float-left"> + <?php /* finc: remove classname fa fa-plus-circle #11813 */ ?> <span class="search_place_holder hidden" aria-hidden="true"></span> - <a href="javascript:void(0);" class="add_search_link hidden" role="button"> - <i class="fa fa-plus" aria-hidden="true"></i> <?=$this->transEsc("add_search")?></a> + <?php /* fid_adlr: adapt layout, remove "btn btn-default" #16502 */ ?> + <a href="javascript:void(0);" class="add_search_link hidden" role="button"><i class="fa fa-plus" aria-hidden="true"></i> <?=$this->transEsc("add_search")?></a> </span> <?php endif; ?> <?php endfor; ?> </div> <div class="adv-group-match"> + <?php /* finc: add missing labels #18209 */ ?> <label class="search_bool" for="search_bool<?=$group ?>"><?=$this->transEsc("search_match")?>: </label> - <select id="search_bool<?=$group?>" name="bool<?=$group?>[]" class="form-control"> - <option value="AND"<?php if(isset($setSearchGroups[$group]) && 'AND' == $setSearchGroups[$group]):?> selected<?php endif;?>><?=$this->transEsc("search_AND")?></option> - <option value="OR"<?php if(isset($setSearchGroups[$group]) && 'OR' == $setSearchGroups[$group]):?> selected<?php endif;?>><?=$this->transEsc("search_OR")?></option> - <option value="NOT"<?php if(isset($setSearchGroups[$group]) && 'NOT' == $setSearchGroups[$group]):?> selected<?php endif;?>><?=$this->transEsc("search_NOT")?></option> + <select name="bool<?=$group ?>[]" id="search_bool<?=$group ?>" class="form-control"> + <option value="AND"<?php if(isset($setSearchGroups[$group]) && 'AND' == $setSearchGroups[$group]):?> selected<?php endif; ?>><?=$this->transEsc("search_AND")?></option> + <option value="OR"<?php if(isset($setSearchGroups[$group]) && 'OR' == $setSearchGroups[$group]):?> selected<?php endif; ?>><?=$this->transEsc("search_OR")?></option> + <option value="NOT"<?php if(isset($setSearchGroups[$group]) && 'NOT' == $setSearchGroups[$group]):?> selected<?php endif; ?>><?=$this->transEsc("search_NOT")?></option> </select> </div> + <?php /* fid_adlr: adapt layout, remove "btn btn-default" #16502 */ ?> <a href="javascript:void(0);" class="adv-group-close hidden" role="button"><i class="fa fa-close"></i> <?=$this->transEsc("del_search")?></a> </div> <?php if($group == 0): ?> @@ -171,21 +179,25 @@ if (isset($searchDetails) && is_object($searchDetails)) { </div> <?php /* finc: introduce 'fnd-btn'-class to swap submit and clear buttons for consistency */ ?> <div class="adv-submit"> + <?php /* fid_adlr: adapt layout, change btn-transparent to btn-primary #16502 */ ?> <input class="clear-btn btn btn-primary" type="button" value="<?=$this->transEsc('Clear')?>" aria-label="<?=$this->transEsc('Clear')?>"> - <input class="fnd-btn btn btn-primary" type="submit" value="<?= $this->transEsc('Find')?>" aria-label="<?= $this->transEsc('Find')?>"> + <input class="fnd-btn btn btn-primary" type="submit" value="<?= $this->transEsc('Find')?>" aria-label="<?= $this->transEsc('Find')?>"> </div> <?php if (isset($this->extraAdvancedControls)): ?> <div class="clearfix"> <?=$this->extraAdvancedControls ?> </div> <div class="adv-submit margin-t"> + <?php /* fid_adlr: adapt layout, change btn-transparent to btn-primary #16502 */ ?> <input class="clear-btn btn btn-primary" type="button" value="<?=$this->transEsc('Clear')?>" aria-label="<?=$this->transEsc('Clear')?>"> <input class="fnd-btn btn btn-primary" type="submit" value="<?= $this->transEsc('Find')?>" aria-label="<?= $this->transEsc('Find')?>"> </div> <?php endif; ?> </div> - <div class="<?=$this->layoutClass('sidebar')?>"> + <?php /* finc: add id myresearch-sidebar #17908 */ ?> + <div class="<?=$this->layoutClass('sidebar')?>" id="myresearch-sidebar"> + <?php /* finc: add button #17601 */ ?> <button class="close-offcanvas btn btn-primary" data-toggle="offcanvas"><?=$this->transEsc('navigate_back') ?></button> <?php if ($hasDefaultsApplied): ?> <input type="hidden" name="dfApplied" value="1" /> @@ -215,4 +227,4 @@ if (isset($searchDetails) && is_object($searchDetails)) { </div> </form> </div> -<!-- finc: search - advanced - layout - END --> +<!-- fid_adlr: search - advanced - layout - END --> diff --git a/themes/fid_adlr/templates/search/controls/limit-offcanvas.phtml b/themes/fid_adlr/templates/search/controls/limit-offcanvas.phtml index 6df9ac2cd34..6186fdb1d5c 100644 --- a/themes/fid_adlr/templates/search/controls/limit-offcanvas.phtml +++ b/themes/fid_adlr/templates/search/controls/limit-offcanvas.phtml @@ -1,10 +1,12 @@ <!-- fid_adlr: search - controls - limit - offcanvas --> <?php $limitList = $this->params->getLimitList(); ?> <?php if (count($limitList) > 1): ?> - <?php /* finc: DO NOT use class 'form-inline' as it messes up the select box */ ?> + <?php /* finc: DO NOT use class 'form-inline' as it messes up the select box */ + /* finc: remove classname search-result-limit */ ?> <form action="<?=$this->currentPath() . $this->results->getUrlQuery()->setLimit(null)?>" method="post"> <?php /* finc: DO NOT use class 'form-control' as it messes up the select box */ ?> - <select name="limit"> + <?php /* fid_adlr: remove id="limit" #18818 */ ?> + <select name="limit" class="jumpMenu"> <option disabled selected><?=$this->transEsc('Results per page')?></option> <?php foreach ($limitList as $limitVal => $limitData): ?> <option value="<?=$this->escapeHtmlAttr($limitVal)?>" <?=$limitData['selected'] ? ' selected="selected" ' : '' ?>> @@ -12,6 +14,7 @@ </option> <?php endforeach; ?> </select> + <?php /* finc: add button for accessibility #18016 */ ?> <button type="submit" class="btn btn-primary" aria-label="<?=$this->transEsc("Set")?>"> <i class="fa fa-refresh" aria-hidden="true"></i> </button> diff --git a/themes/fid_adlr/templates/search/controls/sort-offcanvas.phtml b/themes/fid_adlr/templates/search/controls/sort-offcanvas.phtml index 22123935a1e..155da33b499 100644 --- a/themes/fid_adlr/templates/search/controls/sort-offcanvas.phtml +++ b/themes/fid_adlr/templates/search/controls/sort-offcanvas.phtml @@ -4,12 +4,13 @@ if (!empty($list)): ?> <form action="<?= $this->currentPath() ?>" method="get" name="sort" class="margin-btm"> <?= $this->results->getUrlQuery()->asHiddenFields(['sort' => '/.*/']); ?> <?php /* finc: DO NOT use class 'form-control' as it messes up the select box */ ?> - <select name="sort"> + <select name="sort" class="jumpMenu"> <option disabled selected><?= $this->transEsc('Sort') ?></option> <?php foreach ($list as $sortType => $sortData): ?> <option value="<?= $this->escapeHtmlAttr($sortType) ?>" <?= $sortData['selected'] ? ' selected="selected"' : '' ?>><?= $this->transEsc($sortData['desc']) ?></option> <?php endforeach; ?> </select> + <?php /* finc: add button for accessibility #18016 */ ?> <button type="submit" class="btn btn-primary" aria-label="<?=$this->transEsc("Set")?>"> <i class="fa fa-refresh" aria-hidden="true"></i> </button> diff --git a/themes/fid_adlr/templates/search/email.phtml b/themes/fid_adlr/templates/search/email.phtml index 6c75d0ac079..192a9d60fd6 100644 --- a/themes/fid_adlr/templates/search/email.phtml +++ b/themes/fid_adlr/templates/search/email.phtml @@ -1,4 +1,4 @@ -<!-- adlr-search - EMAIL.phtml --> +<!-- fid_adlr: search - email --> <?php // Set page title. $this->headTitle($this->translate('Email this Search')); @@ -10,8 +10,9 @@ <h2><?=$this->transEsc('Email this Search') ?></h2> <?=$this->flashmessages()?> <?=$this->transEsc('email_search_information')?> +<?php /* fid_adlr: remove classname */ ?> <form method="post" name="emailSearch"> <input type="hidden" name="url" value="<?=$this->escapeHtmlAttr($this->url)?>" /> <?=$this->render('Helpers/email-form-fields.phtml')?> </form> -<!-- adlr-search - EMAIL.phtml end --> \ No newline at end of file +<!-- fid_adlr: search - email - END --> \ No newline at end of file diff --git a/themes/fid_adlr/templates/search/history-table.phtml b/themes/fid_adlr/templates/search/history-table.phtml index 07c68187f78..d3502e8a5fc 100644 --- a/themes/fid_adlr/templates/search/history-table.phtml +++ b/themes/fid_adlr/templates/search/history-table.phtml @@ -1,25 +1,34 @@ <!-- fid_adlr: search - history-table --> -<?php $saveSupported = $this->accountCapabilities()->getSavedSearchSetting() === 'enabled'; ?> -<div class="table-responsive"><table class="table table-striped"> +<?php + $scheduleSupported = !empty($this->schedule); + $saveSupported = $this->accountCapabilities()->getSavedSearchSetting() === 'enabled'; +?> +<?php /* finc adds code for responsive data table here - CK */ ?> +<?php /* fid_adlr: responsive tables via horizontal scrolling #16767 */ ?> +<div class="table-responsive"> +<table class="search-history-table table-striped" id="<?=$this->showSaved ? 'saved-searches' : 'recent-searches'?>"> <tr> <th width="20%"><?=$this->transEsc("history_time")?></th> <th><?=$this->transEsc("history_search")?></th> <th><?=$this->transEsc("history_limits")?></th> <th><?=$this->transEsc("history_results")?></th> + <?php if ($scheduleSupported): ?><th class="search-schedule-header"><?=$this->transEsc('history_schedule')?></th><?php endif; ?> <?php if ($saveSupported): ?><th><?=$this->transEsc($this->showSaved ? "history_delete" : "history_save")?></th><?php endif; ?> </tr> <?php foreach (($this->showSaved ? array_reverse($this->saved) : array_reverse($this->unsaved)) as $iteration => $info): ?> <tr class="<?=$iteration % 2 == 1 ? 'even' : 'odd'?>row"> - <td><?=$this->escapeHtml($this->dateTime()->convertToDisplayDateAndTime("U", $info->getStartTime()))?></td> - <td> + <td data-title="<?= $this->transEsc('history_time') ?>:"><?=$this->escapeHtml($this->dateTime()->convertToDisplayDateAndTime("U", $info->getStartTime()))?></td> + <td data-title="<?= $this->transEsc('history_search') ?>:"> <?=$this->historylabel($info->getParams()->getSearchClassId())?> - <a href="<?=$this->url($info->getOptions()->getSearchAction()) . $info->getUrlQuery()->getParams()?>" data-lightbox-ignore><?php + <?php /* add lang undefines tag */ ?> + <?php /* fid_adlr: add data-lightbox-ignore #16809 */ ?> + <a href="<?=$this->url($info->getOptions()->getSearchAction()) . $info->getUrlQuery()->getParams()?>" lang="" data-lightbox-ignore><?php $desc = $info->getParams()->getDisplayQuery(); echo empty($desc) ? $this->transEsc("history_empty_search") : $this->escapeHtml($desc); ?></a> </td> - <td> - <?php $info->getParams()->activateAllFacets(); foreach ($info->getParams()->getFilterList(true) as $field => $filters): ?> + <td data-title="<?= $this->transEsc('history_limits') ?>:"> + <?php foreach ($info->getParams()->getFilterList(true) as $field => $filters): ?> <?php foreach ($filters as $i => $filter): ?> <?php if ($filter['operator'] == 'NOT') echo $this->transEsc('NOT') . ' '; if ($filter['operator'] == 'OR' && $i > 0) echo $this->transEsc('OR') . ' '; ?> <strong><?=$this->transEsc($field)?></strong>: <?=$this->escapeHtml($filter['displayText'])?><br/> @@ -31,9 +40,26 @@ <?php endif; ?> <?php endforeach; ?> </td> - <td><?=$this->escapeHtml($this->localizedNumber($info->getResultTotal()))?></td> - <?php if ($saveSupported): ?> + <td data-title="<?= $this->transEsc('history_results') ?>:"><?=$this->escapeHtml($this->localizedNumber($info->getResultTotal()))?></td> + <?php if ($scheduleSupported): ?> <td> + <?php if (isset($this->schedule[$info->getSearchId()])): ?> + <?php $schedule = $this->schedule[$info->getSearchId()]; ?> + <form class="form-inline jumpMenuForm" action="<?= $this->url('myresearch-savesearch')?>" method="get" name="schedule"> + <select name="schedule" class="jumpMenu form-control" aria-haspopup="true" title="<?=$this->transEsc("history_schedule")?>"> + <?php foreach ($scheduleOptions as $scheduleValue => $scheduleLabel): ?> + <option value="<?=$this->escapeHtmlAttr($scheduleValue)?>"<?=($schedule == $scheduleValue) ? (' selected') : ('')?>><?=$this->transEsc($scheduleLabel)?></option> + <?php endforeach; ?> + </select> + <input type="hidden" name="searchid" value="<?= $info->getSearchId(); ?>"/> + </form> + <?php else: ?> + <span class="disable"><?=$this->transEsc("cannot set")?></span> + <?php endif; ?> + </td> + <?php endif; ?> + <?php if ($saveSupported): ?> + <td data-title="<?= $this->transEsc($this->showSaved ? "history_delete" : "history_save") ?>"> <?php if ($this->showSaved): ?> <a href="<?=$this->url('myresearch-savesearch')?>?delete=<?=urlencode($info->getSearchId())?>&mode=history"><i class="fa fa-remove" aria-hidden="true"></i> <?=$this->transEsc("history_delete_link")?></a> <?php else: ?> @@ -43,5 +69,6 @@ <?php endif; ?> </tr> <?php endforeach; ?> -</table></div> +</table> +</div> <!-- fid_adlr: search - history-table - END --> \ No newline at end of file diff --git a/themes/fid_adlr/templates/search/history.phtml b/themes/fid_adlr/templates/search/history.phtml index f70f691348e..efbefc386a0 100644 --- a/themes/fid_adlr/templates/search/history.phtml +++ b/themes/fid_adlr/templates/search/history.phtml @@ -1,37 +1,60 @@ <!-- fid_adlr: search - history --> <?php -// Set page title. -$this->headTitle($this->translate('history_my_searches')); + // Set page title. + $this->headTitle($this->translate('history_my_searches')); -$saveSupported = $this->accountCapabilities()->getSavedSearchSetting() === 'enabled'; + $saveSupported = $this->accountCapabilities()->getSavedSearchSetting() === 'enabled'; ?> <div class="mainbody <?= $this->showMenu && $this->auth()->isLoggedIn() ? 'left' : 'modal-full-width' ?>"> - <?= $this->flashmessages() ?> - <?php if ($saveSupported && !empty($this->saved)): ?> - <h2><?= $this->transEsc("history_saved_searches") ?></h2> - <?= $this->context()->renderInContext('search/history-table.phtml', ['showSaved' => true]); ?> - <?php endif; ?> + <?php if (!empty($this->alertemail)): ?> + <div class="alert alert-info alert-email-notification"> + <?=$this->transEsc("alert_email_address") . ': ' . $this->alertemail ?> + <?php if ($this->auth()->getManager()->supportsEmailChange()): ?> + (<a href="<?=$this->url('myresearch-profile');?>"><?=$this->transEsc("edit");?></a>) + <?php endif; ?> + </div> + <?php elseif (!empty($this->schedule) && $this->auth()->isLoggedIn()): ?> + <div class="alert alert-danger alert-email-notification"> + <?=$this->transEsc("no_email_address") . ' ';?><a href="<?=$this->url('myresearch-profile');?>"><?=$this->transEsc("check_profile");?></a> + </div> + <?php endif; ?> + <?= $this->flashmessages() ?> + <?php if ($saveSupported && !empty($this->saved)): ?> + <h2><?= $this->transEsc("history_saved_searches") ?></h2> + <?= $this->context()->renderInContext('search/history-table.phtml', ['showSaved' => true]); ?> + <?php endif; ?> <h2><?= $this->transEsc("history_recent_searches") ?></h2> - <?php if (!empty($this->unsaved)): ?> - <?= $this->context()->renderInContext('search/history-table.phtml', ['showSaved' => false]); ?> - <a href="<?= $this->url('search-history') ?>?purge=true"> - <i class="fa fa-remove" aria-hidden="true"></i> <?= $this->transEsc("history_purge") ?> - </a> - <?php else: ?> - <?= $this->transEsc("history_no_searches") ?> - <?php endif; ?> + <?php if (!empty($this->unsaved)): ?> + <?= $this->context()->renderInContext('search/history-table.phtml', ['showSaved' => false]); ?> + <a href="?purge=true"><i class="fa fa-remove" aria-hidden="true"></i> <?= $this->transEsc("history_purge") ?></a> + <?php else: ?> + <?= $this->transEsc("history_no_searches") ?> + <?php endif; ?> </div> <?php if ($saveSupported && $this->showMenu && $this->auth()->isLoggedIn()): ?> <div class="<?= $this->layoutClass('sidebar') ?>"> - <?= $this->context($this)->renderInContext( - "myresearch/menu.phtml", - // Only activate search history in account menu if user is logged in. - $this->auth()->isLoggedIn() ? ['active' => 'history'] : [] - ); - ?> + <?= $this->context($this)->renderInContext( + "myresearch/menu.phtml", + // Only activate search history in account menu if user is logged in. + $this->auth()->isLoggedIn() ? ['active' => 'history'] : [] + ); + ?> </div> <?php endif; ?> + +<?php + $explanation = $this->transEsc('schedule_explanation'); + $script = <<<JS +$(".search-schedule-header").popover({ + content: "$explanation", + placement: "top", + trigger: "hover", + container: "body", +}) +JS; +?> +<?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, $script, 'SET') ?> <!-- fid_adlr: search - history - END --> diff --git a/themes/fid_adlr/templates/search/home.phtml b/themes/fid_adlr/templates/search/home.phtml index 2def800b178..10270fe09de 100644 --- a/themes/fid_adlr/templates/search/home.phtml +++ b/themes/fid_adlr/templates/search/home.phtml @@ -1,30 +1,36 @@ <!-- fid_adlr: search - home --> <?php + // fid_adlr: Set default title in layout, not here #16591 + // $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; + // 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)) { + // Set default value if necessary: + if (!isset($this->searchClassId)) { $this->searchClassId = 'Solr'; -} + } -$this->layout()->breadcrumbs = false; + $this->layout()->breadcrumbs = false; ?> +<?php /* fid_adlr: add container with headline and links #15988 */ ?> <div class="home-text container"> <div class="headline"> <?= $this->transEsc("header_text") ?> </div> + <?php /* fid_adlr: handle BARF, add margin-r to following links #17913 */ ?> <div class="home-links"> <a class="navbar-header-link small" href="<?=$this->url('myresearch/databases')?>"><span class="icon icon-arrow-right margin-r"></span><?= $this->transEsc('Specific Databases') ?></a> + <?php /* fid_adlr: fix links in accout menu #16510 */ ?> <?php if (!empty($this->config()->get('config')->RawQueries['new_releases'])): ?> <a class="navbar-header-link small" href="<?php $this->currentPath() ?><?= $this->url('search-results') . $this->config()->get('config')->RawQueries['new_releases']?>"><span class="icon icon-arrow-right margin-r"></span><?= $this->transEsc('new_print_publications') ?></a> <?php endif; ?> + <?php /* fid_adlr: refactor searchbox #16751 */ ?> <?php $searchOptions = $this->searchOptions("Solr"); ?> <?php if (!empty($advSearch = $searchOptions->getAdvancedSearchAction())): ?> <a class="navbar-header-link small" @@ -35,114 +41,14 @@ $this->layout()->breadcrumbs = false; </div> <div class="searchHomeContent"> - <?php /* finc-specific: #7187@89bb6e70; VF moved the original BS code to a separate template: helpers - ils-offline.phtml - CK */ ?> - <?php - $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; - ?> - <?php /* finc-specific: #7187 - END */ ?> - <?= $this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, $ilsStatusScript, 'SET'); ?> - - <?php /* finc: Activate search box here if you want the old look -- otherwise we keep the consistent look with searchbox in header */ ?> - <?php /* - <?=$this->context($this)->renderInContext("search/searchbox.phtml", ['ignoreHiddenFilterMemory' => true])?> + <?php /* finc: Activate search box below if you want the old look -- otherwise we keep the consistent look with searchbox in header */ ?> + <?php /* + <?=$this->context($this)->renderInContext("search/searchbox.phtml", ['ignoreHiddenFilterMemory' => true])?> <?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, '$("#searchForm_lookfor").focus();', 'SET'); ?> - */ ?> + */ ?> </div> -<?php if (!empty($facetList)): ?> - <div class="search-home-facets"> - <?php foreach ($facetList as $field => $details): ?> - <?php if ($isHierarchy = in_array($field, $this->hierarchicalFacets ?? [])): - $this->headScript()->appendFile('vendor/jsTree/jstree.min.js'); - $this->headScript()->appendFile('facets.js'); - $sort = $this->hierarchicalFacetSortOptions[$field] ?? ''; - $script = <<<JS -$(document).ready(function() { - $('#facet_{$this->escapeHtml($field)}_container').removeClass('hide'); - initFacetTree($('#facet_{$this->escapeHtml($field)}'), false); -}); -JS; - echo $this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, $script, 'SET'); - ?> - <div id="facet_<?= $this->escapeHtml($field) ?>_container" - class="home-facet <?= $this->escapeHtmlAttr($field) ?> hide"> - <h2><?= $this->transEsc('home_browse') . ' ' . $this->transEsc($details['label']) ?></h2> - <div id="facet_<?= $this->escapeHtml($field) ?>" class="jstree-facet" - data-facet="<?= $this->escapeHtml($field) ?>" - data-path="<?= $this->url($basicSearch) ?>" - data-exclude="0" - data-operator="AND" - data-exclude-title="<?= $this->transEsc('exclude_facet') ?>" - data-sort="all"> - </div> - </div> - <noscript> - <?php if (!$noJsSupport): ?> - <h2><?= $this->transEsc('home_browse') . ' ' . $this->transEsc($details['label']) ?></h2> - <?= $this->transEsc('Please enable JavaScript.') ?> - <?php endif; ?> - <?php endif; ?> - <?php if (!$isHierarchy || $noJsSupport): // do we need regular display? ?> - <?php $sortedList = $this->sortFacetList($this->results, $field, $details['list'], $basicSearch); ?> - <div class="home-facet <?= $this->escapeHtmlAttr($field) ?>"> - <h2><?= $this->transEsc('home_browse') . ' ' . $this->transEsc($details['label']) ?></h2> - <div class="home-facet-container"> - <ul class="home-facet-list"> - <?php - // Special case: two columns for LC call numbers... - $maxListLength = $field == 'callnumber-first' - ? $columnSize * 2 : $columnSize; - - // Special case: custom URLs for collections... - $moreUrl = $field == 'hierarchy_top_title' - ? $this->url('collections-home') : $this->url($advSearch); - - // Convenience variable: - $currentListLength = count($sortedList); - ?> - <?php $i = 0; - foreach ($sortedList - - as $url => $value): - // Special case: custom URLs for collections... - if ($field == 'hierarchy_top_title') { - $url = $this->url('collections-bytitle') . '?title=' . urlencode($value); - } - ?> - <li><a href="<?= $url ?>"><?= $this->escapeHtml(empty($value) ? '-' : $value) ?></a></li> - <?php if (++$i >= $currentListLength) break; // end of list? bail out! - ?> - <?php if ($i >= $maxListLength): // list too long? show more link! ?> - <li><a href="<?= $moreUrl ?>"><strong><?= $this->transEsc("More options") ?>...</strong></a></li> - <?php break; ?> - <?php elseif ($i % $columnSize === 0): // end of column? insert break! ?> - </ul> - <ul class="home-facet-list"> - <?php endif; ?> - <?php endforeach; ?> - </ul> - </div> - </div> - <?php endif; ?> - <?php if ($isHierarchy): // close tag opened in matching if above ?> - </noscript> - <?php endif; ?> - <?php endforeach; ?> - </div> -<?php endif; ?> - +<?php /* fid_adlr: add basic container #16031 */ ?> <div class="home container"> <div class="row"> <div class="col-md-5"> @@ -185,6 +91,7 @@ JS; if ($feeds && count($feeds) > 0) { foreach ($feeds as $feed) { if(!empty($feed['link']) && !empty($feed['title'])) { + // fid_adlr: remove blank target from link #17648 echo '<p><a href="' . $feed['link'] . '" title="' . $feed['title'] . '">' . $feed['title'] . '</a><br /><br />'; } } @@ -199,6 +106,7 @@ JS; <span><i class="icon icon-arrow-right"></i><?= $this->transEsc('Specific Databases') ?></span></a> <div class="margin-t"><?=$this->transEsc('dbis_licenses_name_long')?></div> </div> + <?php /* fid_adlr: fix links in accout menu #16510 */ ?> <?php if (!empty($this->config()->get('config')->RawQueries['new_releases'])): ?> <div class="new-items box"> <a href="<?php $this->currentPath() ?><?= $this->url('search-results') . $this->config()->get('config')->RawQueries['new_releases']?>"> @@ -231,4 +139,6 @@ JS; </div> </div> </div> + +<?=implode('', array_map([$this, 'contentBlock'], $blocks ?? []))?> <!-- fid_adlr: search - home - END --> diff --git a/themes/fid_adlr/templates/search/list-list.phtml b/themes/fid_adlr/templates/search/list-list.phtml index d9a095d597e..f93c762353e 100644 --- a/themes/fid_adlr/templates/search/list-list.phtml +++ b/themes/fid_adlr/templates/search/list-list.phtml @@ -3,6 +3,7 @@ <?php if (!isset($this->indexStart)) $this->indexStart = 0; ?> <?php $i = $this->indexStart; ?> <?php $listStart = $this->results->getStartRecord() + $i - $this->indexStart; ?> +<?php /* fid_adlr: use list with items istead of div #19273 */ ?> <ol class="record-list" start="<?=$listStart?>"> <?php foreach ($this->results->getResults() as $current): ?> <?php $recordNumber = $this->results->getStartRecord() + $i - $this->indexStart; ?> @@ -10,8 +11,7 @@ <?php if (isset($this->showCheckboxes) && $this->showCheckboxes): ?> <?=$this->record($current)->getCheckbox('', 'search-cart-form', $recordNumber)?> <?php endif; ?> - <?php /* fid_adlr: remove record number refs #15646 - GG */ - /* + <?php /* fid_adlr: remove record number refs #15646 - GG */ /* <div class="record-number"> <?=$recordNumber ?> </div> diff --git a/themes/fid_adlr/templates/search/pagination.phtml b/themes/fid_adlr/templates/search/pagination.phtml index 2b946c8c000..06123324534 100644 --- a/themes/fid_adlr/templates/search/pagination.phtml +++ b/themes/fid_adlr/templates/search/pagination.phtml @@ -1,49 +1,42 @@ <!-- fid_adlr: search - pagination --> <?php if ($this->pageCount): ?> <ul class="pagination flex"> - <?php if (isset($this->previous)): ?> - <li class="page-prev flex-box-20"> - <a href="<?= $this->currentPath() . $this->results->getUrlQuery()->setPage($this->previous) ?>"> - <span> - <i class="icon icon-arrow-left" aria-hidden="true"></i> - </span></a> - </li> - <?php endif; ?> + <?php if (isset($this->previous)): ?> + <li class="page-prev flex-box-20"> + <a href="<?=$this->currentPath() . $this->results->getUrlQuery()->setPage($this->previous)?>" aria-label="<?=$this->transEsc('page_prev')?>"> + <span><i class="icon icon-arrow-left" aria-hidden="true"></i></span> + </a> + </li> + <?php endif; ?> - <?php if (count($this->pagesInRange) > 1): ?> - <li class="page-curr <?php if (isset($this->previous)): ?>flex-box-60<?php else: ?>flex-box-80<?php endif; ?>"> - <div <?php if (isset($this->previous)): ?>class="text-center"<?php endif; ?>> + <?php if (count($this->pagesInRange) > 1): ?> + <li class="page-curr <?php if (isset($this->previous)): ?>flex-box-60<?php else: ?>flex-box-80<?php endif; ?>"> + <div <?php if (isset($this->previous)): ?>class="text-center"<?php endif; ?>> <?php foreach ($this->pagesInRange as $page): ?> <?php if ($page == $this->current): ?> - <span class="active"> - <?= $this->transEsc('Page') ?> - </span> - <span class="active"> - <?= $this->current ?> - </span> + <span class="active"><?= $this->transEsc('Page') ?></span> + <span class="active"><?= $this->current ?></span> <?php endif; ?> <?php endforeach; ?> <?php if (isset($this->next) && !isset($this->options['disableLast']) || !$this->options['disableLast']): ?> - <span class="active"> - <?= $this->transEsc('of') ?> - </span> + <span class="active"><?= $this->transEsc('of') ?></span> <span class="last"> - <a href="<?= $this->currentPath() . $this->results->getUrlQuery()->setPage($this->pageCount) ?>"> - <?= $this->pageCount ?> + <a href="<?=$this->currentPath() . $this->results->getUrlQuery()->setPage($this->pageCount)?>" aria-label="<?=$this->transEsc('page_last')?>"> + <?= $this->pageCount ?> </a> </span> <?php endif; ?> - </div> - </li> - <?php endif; ?> + </div> + </li> + <?php endif; ?> - <?php if (isset($this->next)): ?> - <li class="page-next flex-box-20"> - <a href="<?= $this->currentPath() . $this->results->getUrlQuery()->setPage($this->next) ?>"> - <i class="icon icon-arrow-right" aria-hidden="true"></i> - </a> - </li> - <?php endif; ?> + <?php if (isset($this->next)): ?> + <li class="page-next flex-box-20"> + <a href="<?=$this->currentPath() . $this->results->getUrlQuery()->setPage($this->next)?>" aria-label="<?=$this->transEsc('page_next')?>"> + <i class="icon icon-arrow-right" aria-hidden="true"></i> + </a> + </li> + <?php endif; ?> </ul> <?php endif; ?> <!-- fid_adlr: search - pagination - END --> diff --git a/themes/fid_adlr/templates/search/results.phtml b/themes/fid_adlr/templates/search/results.phtml index f160bf334ff..e6e79ab01f6 100644 --- a/themes/fid_adlr/templates/search/results.phtml +++ b/themes/fid_adlr/templates/search/results.phtml @@ -1,81 +1,90 @@ <!-- fid_adlr: search - results --> <?php -$lookfor = $this->results->getUrlQuery()->isQuerySuppressed() ? '' : $this->params->getDisplayQuery(); -$this->headTitle($this->translate('Search Results') . (empty($lookfor) ? '' : " - {$lookfor} - ")); + // Set up page title: + $lookfor = $this->results->getUrlQuery()->isQuerySuppressed() ? '' : $this->params->getDisplayQuery(); + // fid_adlr: fix multiple titles #18780 + $this->headTitle($this->translate('Search Results') . (empty($lookfor) ? '' : " - {$lookfor} - ")); -// Set up search box: -$this->layout()->searchbox = $this->context($this)->renderInContext( - 'search/searchbox.phtml', - [ - 'lookfor' => $lookfor, - 'searchIndex' => $this->params->getSearchHandler(), - 'searchType' => $this->params->getSearchType(), - 'searchId' => $this->results->getSearchId(), - 'searchClassId' => $this->params->getSearchClassId(), - 'checkboxFilters' => $this->params->getCheckboxFacets(), - 'filterList' => $this->params->getFilters(), - 'hasDefaultsApplied' => $this->params->hasDefaultsApplied(), - 'selectedShards' => $this->params->getSelectedShards(), - 'ignoreHiddenFiltersInRequest' => isset($this->ignoreHiddenFiltersInRequest) ? $this->ignoreHiddenFiltersInRequest : false, - 'ignoreHiddenFilterMemory' => isset($this->ignoreHiddenFilterMemory) ? $this->ignoreHiddenFilterMemory : false, - ] -); + // Set up search box: + $this->layout()->searchbox = $this->context($this)->renderInContext( + 'search/searchbox.phtml', + [ + 'lookfor' => $lookfor, + 'searchIndex' => $this->params->getSearchHandler(), + 'searchType' => $this->params->getSearchType(), + 'searchId' => $this->results->getSearchId(), + 'searchClassId' => $this->params->getSearchClassId(), + 'checkboxFilters' => $this->params->getCheckboxFacets(), + 'filterList' => $this->params->getFilterList(true), + 'hasDefaultsApplied' => $this->params->hasDefaultsApplied(), + 'selectedShards' => $this->params->getSelectedShards(), + 'ignoreHiddenFiltersInRequest' => isset($this->ignoreHiddenFiltersInRequest) ? $this->ignoreHiddenFiltersInRequest : false, + 'ignoreHiddenFilterMemory' => isset($this->ignoreHiddenFilterMemory) ? $this->ignoreHiddenFilterMemory : false, + ] + ); -// Set up breadcrumbs: -if (isset($this->overrideTitle)) { - $this->layout()->breadcrumbs .= '<li class="active">' . $this->escapeHtml($this->overrideTitle) . '</li>'; -} else { - $this->layout()->breadcrumbs .= '<li class="active">' . $this->transEsc('Search') . ': ' . $this->escapeHtml($lookfor) . '</li>'; -} + // Set up breadcrumbs: + if (isset($this->overrideTitle)) { + $this->layout()->breadcrumbs .= '<li class="active">' . $this->escapeHtml($this->overrideTitle) . '</li>'; + } else { + $this->layout()->breadcrumbs .= '<li class="active">' . $this->transEsc('Search') . ': ' . $this->escapeHtml($lookfor) . '</li>'; + } -// Enable cart if appropriate: -$this->showBulkOptions = $this->params->getOptions()->supportsCart() && $this->showBulkOptions; -// Checkboxes if appropriate: -$this->showCartControls = $this->params->getOptions()->supportsCart() && $this->cart()->isActive() - && ($this->showBulkOptions || !$this->cart()->isActiveInSearch()); -// Enable bulk options if appropriate: -$this->showCheckboxes = $this->showCartControls || $this->showBulkOptions; + // Enable cart if appropriate: + $this->showBulkOptions = $this->params->getOptions()->supportsCart() && $this->showBulkOptions; + // Checkboxes if appropriate: + $this->showCartControls = $this->params->getOptions()->supportsCart() && $this->cart()->isActive() + && ($this->showBulkOptions || !$this->cart()->isActiveInSearch()); + // Enable bulk options if appropriate: + $this->showCheckboxes = $this->showCartControls || $this->showBulkOptions; -// Load Javascript only if list view parameter is NOT full: -if ($this->params->getOptions()->getListViewOption() != "full") { - $this->headScript()->appendFile("record.js"); - $this->headScript()->appendFile("embedded_record.js"); -} + // Load Javascript only if list view parameter is NOT full: + if ($this->params->getOptions()->getListViewOption() != "full") { + $this->headScript()->appendFile("record.js"); + $this->headScript()->appendFile("embedded_record.js"); + } -// Load Javascript dependencies into header: -$this->headScript()->appendFile("vendor/hunt.min.js"); -$this->headScript()->appendFile("check_item_statuses.js"); -$this->headScript()->appendFile("check_save_statuses.js"); -$this->headScript()->appendFile("check_save_statuses_adlr.js"); + // Load Javascript dependencies into header: + $this->headScript()->appendFile("vendor/hunt.min.js"); + $this->headScript()->appendFile("check_item_statuses.js"); + $this->headScript()->appendFile("check_save_statuses.js"); + $this->headScript()->appendFile("check_save_statuses_adlr.js"); + + // fid_adlr: do NOT make active filters available here ?> <?php /* finc: we need search-results-col to pull content to full width, also used in print styles! - CK */?> <div class="<?=$this->layoutClass('mainbody')?> search-results-col"> - <?php if (($recordTotal = $this->results->getResultTotal()) > 0): // only display these at very top if we have results ?> + <?php if (($recordTotal = $this->results->getResultTotal()) > 0): // only display these at very top if we have results ?> <?php foreach ($this->results->getRecommendations('top') as $index => $current): ?> <?=$this->recommend($current, 'top', $index)?> - <?php endforeach; ?> - <?php endif; ?> - <span class="offcanvas-toggler"> - <button class="search-filter-toggle visible-xs visible-sm" href="#search-sidebar" data-toggle="offcanvas" title="<?=$this->transEsc('sidebar_expand') ?>"> - <?=$this->transEsc('Refine Results') ?><i class="icon icon-filter right" aria-hidden="true"></i> - </button> - </span> - <?=$this->flashmessages()?> + <?php endforeach; ?> + <?php endif; ?> + <span class="offcanvas-toggler"> + <?php /* finc: remove title, add aria-label */ ?> + <?php /* finc: change href #search-sidebar to #myresearch-sidebar, #17908 */ ?> + <a class="search-filter-toggle visible-xs visible-sm" href="#myresearch-sidebar" data-toggle="offcanvas" aria-label="<?=$this->transEsc('sidebar_expand') ?>"> + <?=$this->transEsc('Refine Results') ?><i class="icon icon-filter right" aria-hidden="true"></i> + </a> + </span> + <?=$this->flashmessages()?> - <?= $this->render('search/advanced_search_information.phtml'); ?> + <?php /* fid_adlr: DO NOT show active filters here */ ?> - <?php /* finc: remove 'hidden' below to show search-stats; we also hide the entire bar on xs + sm - CK */ ?> - <nav class="search-header hidden-print"> - <div class="search-stats"> - <?php /* finc: use spans for easier to show/hide choices - CK */ ?> - <?php if ($recordTotal > 0): ?> - <span class="hit-stats"></span> - <?php else: ?> - <h2><?=$this->transEsc('nohit_heading')?></h2> - <?php endif; ?> - </div> + <?= $this->render('search/advanced_search_information.phtml'); ?> + + <?php /* finc: remove 'hidden' below to show search-stats; we also hide the entire bar on xs + sm - CK */ ?> + <nav class="search-header hidden-print"> + <div class="search-stats"> + <?php /* finc: use spans for easier to show/hide choices - CK */ ?> + <?php if ($recordTotal > 0): ?> + <?php /* fid_adlr: render NO template in hit-stats #21093 */ ?> + <span class="hit-stats"></span> + <?php else: ?> + <h2><?=$this->transEsc('nohit_heading')?></h2> + <?php endif; ?> + </div> <?php if ($recordTotal > 0): ?> <?php /* finc: use spans for easier to show/hide choices - CK */ ?> @@ -87,7 +96,9 @@ $this->headScript()->appendFile("check_save_statuses_adlr.js"); <span class="sort hidden-xs hidden-sm"> <?=$this->render('search/controls/sort.phtml')?> </span> + <?php /* fid_adlr: use VuFind ResultGrouping #21281 */ ?> <?php /*= $this->render('search/controls/grouping') */ ?> + <?php /* fid_adlr: add span "mailsave" for fixing position of action buttons #21511 */ ?> <span class="mailsave"> <span> <a href="<?=$this->url('search-email')?>" class="mailSearch" data-lightbox id="mailSearch<?=$this->escapeHtmlAttr($this->results->getSearchId())?>" title="<?=$this->transEsc('Email this Search')?>" aria-label="<?=$this->transEsc('Email this Search')?>"> @@ -110,6 +121,7 @@ $this->headScript()->appendFile("check_save_statuses_adlr.js"); <?php endif; ?> <?php endif; ?> </span> + <?php /* fid_adlr: show search history #16693 */ ?> <span> <a href="<?=$this->url('search-history')?>" title="<?=$this->transEsc('Search History')?>" data-lightbox aria-label="<?=$this->transEsc('Search History')?>"> <i class="icon icon-clock icon-1.5x" aria-hidden="true"></i> @@ -127,11 +139,11 @@ $this->headScript()->appendFile("check_save_statuses_adlr.js"); <?=$this->overrideEmptyMessage?> <?php else: ?> <?php $this->layout()->srmessage = $this->translate('nohit_lookfor_html', ['%%lookfor%%' => $this->escapeHtml($lookfor)]); ?> - <?=$this->layout()->srmessage?> + <?=$this->layout()->srmessage ?> <?php endif; ?> </p> <?php if (isset($this->parseError)): ?> - <p class="alert alert-danger"><?=$this->transEsc('nohit_parse_error')?></p> + <p class="alert alert-danger" aria-live="polite"><?=$this->transEsc('nohit_parse_error')?></p> <?php endif; ?> <?php foreach (($top = $this->results->getRecommendations('top')) as $index => $current): ?> <?=$this->recommend($current, 'top', $index)?> @@ -145,7 +157,7 @@ $this->headScript()->appendFile("check_save_statuses_adlr.js"); <form id="search-cart-form" method="post" name="bulkActionForm" action="<?=$this->url('cart-searchresultsbulk')?>" data-lightbox data-lightbox-onsubmit="bulkFormHandler"> <?=$this->context($this)->renderInContext('search/bulk-action-buttons.phtml', ['idPrefix' => ''])?> </form> - <?=$this->render('search/list-' . $this->params->getView() . '.phtml')?> + <?=$this->render('search/list-' . $this->params->getView() . '.phtml')?> <?=$this->context($this)->renderInContext('search/bulk-action-buttons.phtml', ['idPrefix' => 'bottom_', 'formAttr' => 'search-cart-form'])?> <?=$this->paginationControl($this->results->getPaginator(), 'Sliding', 'search/pagination.phtml', ['results' => $this->results, 'options' => isset($this->paginationOptions) ? $this->paginationOptions : []])?> <?php endif; ?> @@ -153,7 +165,7 @@ $this->headScript()->appendFile("check_save_statuses_adlr.js"); <?php /* End Main Listing */ ?> <?php /* Narrow Search Options */ ?> -<div class="<?=$this->layoutClass('sidebar')?>" id="search-sidebar"> +<div class="<?=$this->layoutClass('sidebar')?>" id="myresearch-sidebar"> <?php foreach ($this->results->getRecommendations('side') as $index => $current): ?> <?=$this->recommend($current, 'side', $index)?> <?php endforeach; ?> diff --git a/themes/fid_adlr/templates/search/searchbox.phtml b/themes/fid_adlr/templates/search/searchbox.phtml index 006badb02c3..336c9448791 100644 --- a/themes/fid_adlr/templates/search/searchbox.phtml +++ b/themes/fid_adlr/templates/search/searchbox.phtml @@ -1,43 +1,60 @@ <!-- fid_adlr: search - searchbox --> <?php -// Set default value if necessary: -if (!isset($this->searchClassId)) { - $this->searchClassId = 'Solr'; -} + // Set default value if necessary: + if (!isset($this->searchClassId)) { + $config = $this->config()->get('config'); + $this->searchClassId = $config->Site->defaultSearchBackend ?? 'Solr'; + } + + // Load search actions and settings (if any): + $options = $this->searchOptions($this->searchClassId); -// Load search actions and settings (if any): -$options = $this->searchOptions($this->searchClassId); + // fid_adlr: remove $handlers and $handlerCount here for refactor searchbox #16751 -$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); + $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, '?'); + $hiddenFilterParams = $this->searchTabs()->getCurrentHiddenFilterParams($this->searchClassId, $ignoreHiddenFilterMemory, '?'); ?> <?php $tabConfig = $this->searchTabs()->getTabConfig($this->searchClassId, $this->lookfor, $this->searchIndex, $this->searchType, $hiddenFilters); ?> <form id="searchForm" class="searchForm navbar-left flip" method="get" action="<?=$this->url($basicSearch)?>" name="searchForm" autocomplete="off"> + <?php /* fid_adlr: switchTab recommendation #16750; add to if condition: $tabConfig['tabs'][0] #17913 */ ?> <?= $this->context($this)->renderInContext('search/searchTabs', ['searchTabs' => $tabConfig['tabs'], 'selectedTab' => $tabConfig['selected'] ?? $tabConfig['tabs'][0]]); ?> <?php $placeholder = $this->searchbox()->getPlaceholderText($tabConfig['selected']['id'] ?? null); ?> <?php /* finc: keep "required" */ ?> - <input id="searchForm_lookfor" class="searchForm_lookfor form-control search-query<?php if($this->searchbox()->autocompleteEnabled($this->searchClassId)):?> autocomplete searcher:<?=$this->escapeHtmlAttr($this->searchClassId) ?><?=$this->searchbox()->autocompleteAutoSubmit($this->searchClassId) ? ' ac-auto-submit' : '' ?><?php endif ?>" type="text" name="lookfor" value="<?= ($this->searchType != "advanced") ? $this->escapeHtmlAttr($this->lookfor) : ""?>"<?php if ($placeholder): ?> placeholder="<?=$this->transEsc($placeholder) ?>"<?php endif ?> aria-label="<?=$this->transEsc("search_terms")?>" required="required" placeholder="<?=$this->transEsc("enter-search-term")?>" /> + <?php /* fid_adlr: specify value of input #16672 */ ?> + <input id="searchForm_lookfor" + class="searchForm_lookfor form-control search-query<?php if($this->searchbox()->autocompleteEnabled($this->searchClassId)):?> autocomplete searcher:<?=$this->escapeHtmlAttr($this->searchClassId) ?><?=$this->searchbox()->autocompleteAutoSubmit($this->searchClassId) ? ' ac-auto-submit' : '' ?><?php endif ?>" + type="text" + name="lookfor" + value="<?= ($this->searchType != "advanced") ? $this->escapeHtmlAttr($this->lookfor) : ""?>" + <?php if ($placeholder): ?> + placeholder="<?=$this->transEsc($placeholder) ?>" + <?php endif ?> + aria-label="<?=$this->transEsc("search_terms")?>" + required="required" + placeholder="<?=$this->transEsc("enter-search-term")?>" + /> <?php /* finc: We use a list here, CK */ ?> <ul class="navbar-left list-unstyled"> + <?php /* fid_adlr: refactor searchbox #16751 */?> <?php - $filterDetails = $this->searchbox()->getFilterDetails( + $filterDetails = $this->searchbox()->getFilterDetails( isset($this->filterList) && is_array($this->filterList) ? $this->filterList : [], isset($this->checkboxFilters) && is_array($this->checkboxFilters) ? $this->checkboxFilters : [] - ); + ); ?> <?php if (!empty($filterDetails) || (($tabConfig["tabs"][0]["label"] ?? "") !== ($tabConfig["selected"]["label"] ?? ""))): ?> <?php /* adlr custom quickfilter */ ?> @@ -57,14 +74,14 @@ $hiddenFilterParams = $this->searchTabs()->getCurrentHiddenFilterParams($this->s </label> </div> <div class="hidden"> - <?php 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> - <?php endforeach; ?> - <?php 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?> /> + <?php 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> + <?php endforeach; ?> + <?php 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?> /> </div> </li> <?php endif; ?> @@ -73,11 +90,10 @@ $hiddenFilterParams = $this->searchTabs()->getCurrentHiddenFilterParams($this->s <?php endif; ?> <?php /* adlr custom quickfilter - END */ ?> <li class="find-button"> + <?php /* fid_adlr: add extra span and tabindex #17913 */ ?> <button tabindex="0" type="submit" class="btn btn-lg"> <span tabindex="-1" class="find-label btn__content"> - <span class="text"> - <?=$this->transEsc("Find")?> - </span> + <span class="text"><?=$this->transEsc("Find")?></span> </span> </button> </li> @@ -88,16 +104,17 @@ $hiddenFilterParams = $this->searchTabs()->getCurrentHiddenFilterParams($this->s </li> </ul> - <?php /* finc: We hide this for small and keep the solution using labels, same below - CK */ ?> + <?php /* finc-specific: We hide this for small and keep the solution using labels, same below - CK */ ?> + <?php /* fid_adlr: remove class "checkbox" and add "flex-container" #17913 */ ?> <div class="hidden-xs flex-container"> - <?php $shards = $options->getShards(); - if ($options->showShardCheckboxes() && !empty($shards)): ?> + <?php $shards = $options->getShards(); if ($options->showShardCheckboxes() && !empty($shards)): ?> <?php $selectedShards = isset($this->selectedShards) - ? $this->selectedShards : $options->getDefaultSelectedShards(); + ? $this->selectedShards : $options->getDefaultSelectedShards(); ?> <?php foreach ($shards as $shard => $val): ?> <?php $isSelected = empty($selectedShards) || in_array($shard, $selectedShards); ?> + <?php /* fid_adlr: add div for label #19300 */ ?> <div> <label for="checkbox_<?=$this->escapeHtmlAttr($shard)?>"><?=$this->transEsc($shard)?> <input type="checkbox" <?=$isSelected ? 'checked="checked" ' : ''?>name="shard[]" value='<?=$this->escapeHtmlAttr($shard)?>' id='checkbox_<?=$this->escapeHtmlAttr($shard)?>'/> @@ -108,10 +125,10 @@ $hiddenFilterParams = $this->searchTabs()->getCurrentHiddenFilterParams($this->s </div> <?php - $filterDetails = $this->searchbox()->getFilterDetails( - isset($this->filterList) && is_array($this->filterList) ? $this->filterList : [], - isset($this->checkboxFilters) && is_array($this->checkboxFilters) ? $this->checkboxFilters : [] - ); + $filterDetails = $this->searchbox()->getFilterDetails( + isset($this->filterList) && is_array($this->filterList) ? $this->filterList : [], + isset($this->checkboxFilters) && is_array($this->checkboxFilters) ? $this->checkboxFilters : [] + ); ?> <?php if ((isset($hasDefaultsApplied) && $hasDefaultsApplied) || !empty($filterDetails)): ?> <?php $defaultFilterState = $options->getRetainFilterSetting() ? ' checked="checked"' : ''; ?> @@ -168,6 +185,7 @@ $hiddenFilterParams = $this->searchTabs()->getCurrentHiddenFilterParams($this->s setCategoryFilterText($(this)[0].id); }); + // fid_adlr: sync short labels for search quickfilter #16891 function setCategoryFilterText(id) { let text = VuFind.translate(id); if(text) { -- GitLab