Skip to content
Snippets Groups Projects
Commit 4c2bcd25 authored by Chris Hallberg's avatar Chris Hallberg
Browse files

Click again to remove top facets. With styling.

parent 8be52744
Branches
Tags
No related merge requests found
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -265,6 +265,15 @@ label.list-group-item {border-radius:0;font-weight:normal;margin-top:0;padding-l ...@@ -265,6 +265,15 @@ label.list-group-item {border-radius:0;font-weight:normal;margin-top:0;padding-l
.sidebar .facet a { .sidebar .facet a {
text-decoration: none; text-decoration: none;
} }
.top-row .applied {
font-weight:bold;
&:hover {
color:@state-danger-text;
.fa.fa-check:before {
content:"\f00d";
}
}
}
/* --- Slider accessibility --- */ /* --- Slider accessibility --- */
.slider-container { .slider-container {
......
...@@ -19,8 +19,15 @@ ...@@ -19,8 +19,15 @@
<? endif; ?> <? endif; ?>
<? /* Columns */ ?> <? /* Columns */ ?>
<span class="col-sm-<?=floor(12/$topFacetSettings['cols'])?><? if ($iter == $corner+1) echo $moreClass ?>"> <span class="col-sm-<?=floor(12/$topFacetSettings['cols'])?><? if ($iter == $corner+1) echo $moreClass ?>">
<? if ($thisFacet['isApplied']): ?> <? if ($thisFacet['isApplied']):
<?=$this->escapeHtml($thisFacet['displayText'])?> <i class="fa fa-check"></i> if (isset($thisFacet['specialType']) && $thisFacet['specialType'] == 'keyword') {
$removeLink = $this->currentPath().$results->getUrlQuery()->replaceTerm($thisFacet['value'], '');
} else {
$removeLink = $this->currentPath().$results->getUrlQuery()->removeFacet($title, $thisFacet['value'], true, $thisFacet['operator']);
} ?>
<a href="<?=$removeLink ?>" class="applied">
<?=$this->escapeHtml($thisFacet['displayText'])?> <i class="fa fa-check"></i>
</a>
<? else: ?> <? else: ?>
<a href="<?=$this->currentPath().$this->recommend->getResults()->getUrlQuery()->addFacet($title, $thisFacet['value'], $thisFacet['operator'])?>"><?=$this->escapeHtml($thisFacet['displayText'])?></a> <span class="badge"><?=$this->localizedNumber($thisFacet['count']) ?> <a href="<?=$this->currentPath().$this->recommend->getResults()->getUrlQuery()->addFacet($title, $thisFacet['value'], $thisFacet['operator'])?>"><?=$this->escapeHtml($thisFacet['displayText'])?></a> <span class="badge"><?=$this->localizedNumber($thisFacet['count']) ?>
<? if ($allowExclude): ?> <? if ($allowExclude): ?>
......
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