Skip to content
Snippets Groups Projects
Commit 5cffbe5a authored by Robert Lange's avatar Robert Lange
Browse files

refs #20637 [fid_adlr] BARF result facets

* add page reload hint
* use language tags
* add changes in single-facet.phtml: add sr-only
parent 3d41c401
No related merge requests found
<!-- fid_adlr: Recommend - SideFacets - filter-list -->
<div class="facet-group active-filters flex-column-reverse">
<span class="flex-column-default">
<div class="flex-column-default">
<ul>
<?php $filterCount = 0; ?>
<?php foreach ($filterList as $field => $filters): ?>
......@@ -26,29 +26,30 @@
}
?>
<li class="facet">
<a class="remove-filter" href="<?=$removeLink ?>" title="<?=$this->transEsc('clear_tag_filter') ?>">
<span class="sr-only"><?=$this->transEsc('clear_tag_filter') ?></span>
<span class="text">
<i class="icon icon-close" aria-hidden="true"></i>&nbsp;
<?php if ($filter['operator'] == 'NOT'): ?><?=$this->transEsc('NOT') ?><?php endif; ?>
<?php if ($filter['operator'] == 'OR' && $i > 0): ?><?=$this->transEsc('OR') ?><?php endif; ?>
<?=$this->transEsc($field) ?>: <?=$this->escapeHtml($filter['displayText']) ?>
</span>
<?php /* fid_adlr: Move icon refs #15646 - GG */ ?>
<?php /* */ ?>
</a>
</li>
<a class="remove-filter" href="<?=$removeLink ?>" title="<?=$this->transEsc('clear_tag_filter') ?> - <?=$this->transEsc('page_reload_on_deselect_hint', ['%%filter_name%%' => $filter['displayText']])?>">
<span class="sr-only"><?=$this->transEsc('clear_tag_filter') ?></span>
<span class="text">
<i class="icon icon-close" aria-hidden="true"></i>
<span>
<?php if ($filter['operator'] == 'NOT'): ?><?=$this->transEsc('NOT') ?><?php endif; ?>
<?php if ($filter['operator'] == 'OR' && $i > 0): ?><?=$this->transEsc('OR') ?><?php endif; ?>
<?=$this->transEsc($field) ?>: <?=$this->sideFacet()->getLanguageTag($this->escapeHtml($filter['displayText']), 'span', $this->layout()->userLang) ?>
</span>
</span>
</a>
</li>
<?php endforeach; ?>
<?php endforeach; ?>
</ul>
</span>
</div>
<?php if ($filterCount > 1 && !empty($removeAllLinkQuery)): ?>
<a class="facet all-filters" href="<?= $this->currentPath() . $removeAllLinkQuery ?>" title="<?= $this->transEsc('clear_tag_filter_all') ?>">
<a class="facet all-filters" href="<?= $this->currentPath() . $removeAllLinkQuery ?>" title="<?= $this->transEsc('clear_tag_filter_all') . " - " . $this->transEsc('page_reload_hint') ?>">
<span class="text">
<i class="icon icon-trash-2" aria-hidden="true"></i>&nbsp;
<i class="icon icon-trash-2" aria-hidden="true"></i>
<?= $this->transEsc('clear_tag_filter_all') ?>
</span>
</a>
<?php endif; ?>
<div class="title"><?=$this->transEsc('Remove Filters')?> <span class="sr-only"><?=$this->transEsc('facet_deselect_hint') ?></span></div>
</div>
<!-- fid_adlr: Recommend - SideFacets - filter-list - END -->
\ No newline at end of file
......@@ -53,10 +53,13 @@
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']])?> <?=$this->escapeHtmlAttr($this->facet['displayText']) ?><?php else: ?><?=$this->transEsc('page_reload_on_select_hint', ['%%filter_name%%' => $this->facet['displayText']])?><?php endif;?>">
<?=$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']])?> <?=$this->escapeHtmlAttr($this->facet['displayText']) ?>)<?php else: ?>(<?=$this->transEsc('page_reload_on_select_hint', ['%%filter_name%%' => $this->facet['displayText']])?>)<?php endif;?>
</span>
</a>
<?php else: ?>
<span class="text">
<?=$displayText ?>
<?=$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; ?>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment