-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #103 from beluga-core/develop-5
Develop 5
- Loading branch information
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
themes/belugax/templates/Recommend/SideFacets/filter-list.phtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<div class="facet-group active-filters"> | ||
<div class="title"><?=$this->transEsc('Remove Filters')?></div> | ||
<?php foreach ($filterList as $field => $filters): ?> | ||
<?php foreach ($filters as $i => $filter): ?> | ||
<?php | ||
$index = isset($filter['field']) ? array_search($filter['field'], $collapsedFacets) : false; | ||
if ($index !== false) { | ||
unset($collapsedFacets[$index]); // Open if we have a match | ||
} | ||
if (isset($filter['specialType']) && $filter['specialType'] == 'keyword') { | ||
$removeLink = $this->currentPath() . $results->getUrlQuery()->replaceTerm($filter['value'], ''); | ||
} else { | ||
$removeLink = $this->currentPath() . $results->getUrlQuery()->removeFacet($filter['field'], $filter['value'], $filter['operator']); | ||
} | ||
if ($filter['displayText'] == '[* TO *]') { | ||
$filter['displayText'] = $this->translate('filter_wildcard'); | ||
} | ||
?> | ||
<a class="facet" href="<?=$removeLink ?>" title="<?=$this->transEsc('clear_tag_filter') ?>"> | ||
<span class="sr-only"><?=$this->transEsc('clear_tag_filter') ?></span> | ||
<span class="text"> | ||
<?php if ($filter['operator'] == 'NOT'): ?><?=$this->transEsc('NOT') ?><?php endif; ?> | ||
<?php if ($filter['operator'] == 'OR' && $i > 0): ?><?=$this->transEsc('OR') ?><?php endif; ?> | ||
<?=$this->transEsc($filter['field']) ?>: <?=$this->escapeHtml($filter['displayText']) ?> | ||
</span> | ||
<span class="status"><i class="fa fa-times" aria-hidden="true"></i></span> | ||
</a> | ||
<?php endforeach; ?> | ||
<?php endforeach; ?> | ||
</div> |