Skip to content
Snippets Groups Projects
Commit f1fb3f6e authored by Chris Hallberg's avatar Chris Hallberg Committed by Demian Katz
Browse files

Top facets: Move x outside of badge and contain within a box. (#1287)

parent bed76332
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.
...@@ -40,7 +40,8 @@ ...@@ -40,7 +40,8 @@
.badge { .badge {
flex-shrink: 0; flex-shrink: 0;
max-height: 19px; max-height: 19px;
line-height: 1.1rem; line-height: 1.2;
vertical-align: baseline;
} }
.exclude { .exclude {
...@@ -60,10 +61,6 @@ ...@@ -60,10 +61,6 @@
text-align: inherit; text-align: inherit;
} }
.top-facets {
margin-left: -.5rem;
margin-right: -.5rem;
}
.top-facets .facet, .top-facets .facet,
.top-facets .narrow-toggle, .top-facets .narrow-toggle,
.top-facets > strong { .top-facets > strong {
...@@ -74,6 +71,11 @@ ...@@ -74,6 +71,11 @@
white-space: nowrap; white-space: nowrap;
} }
.top-facets .narrow-toggle { text-decoration: underline; } .top-facets .narrow-toggle { text-decoration: underline; }
.top-facets .top-facet {
margin-top: 2px;
margin-bottom: 2px;
border: 1px solid @list-group-border;
}
.checkbox-filter { .checkbox-filter {
display: block; display: block;
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<div class="collapse in" id="top_<?=$this->escapeHtml($title) ?>"> <div class="collapse in" id="top_<?=$this->escapeHtml($title) ?>">
<?php $limit = $topFacetSettings['rows'] * $topFacetSettings['cols']; ?> <?php $limit = $topFacetSettings['rows'] * $topFacetSettings['cols']; ?>
<?php foreach($cluster['list'] as $index => $thisFacet): ?> <?php foreach($cluster['list'] as $index => $thisFacet): ?>
<span class="facet <?=$index > $limit ? $moreClass : '' ?>"> <span class="facet top-facet <?=$index > $limit ? $moreClass : '' ?>">
<?php if ($thisFacet['isApplied']): <?php if ($thisFacet['isApplied']):
if (isset($thisFacet['specialType']) && $thisFacet['specialType'] == 'keyword') { if (isset($thisFacet['specialType']) && $thisFacet['specialType'] == 'keyword') {
$removeLink = $this->currentPath() . $results->getUrlQuery()->replaceTerm($thisFacet['value'], ''); $removeLink = $this->currentPath() . $results->getUrlQuery()->replaceTerm($thisFacet['value'], '');
...@@ -31,11 +31,10 @@ ...@@ -31,11 +31,10 @@
<a href="<?=$this->currentPath() . $results->getUrlQuery()->addFacet($title, $thisFacet['value'], $thisFacet['operator'])?>"> <a href="<?=$this->currentPath() . $results->getUrlQuery()->addFacet($title, $thisFacet['value'], $thisFacet['operator'])?>">
<?=$this->escapeHtml($thisFacet['displayText'])?><!-- <?=$this->escapeHtml($thisFacet['displayText'])?><!--
--></a> --></a>
<span class="badge"><?=$this->localizedNumber($thisFacet['count']) ?> <span class="badge"><?=$this->localizedNumber($thisFacet['count']) ?></span>
<?php if ($allowExclude): ?> <?php if ($allowExclude): ?>
<a href="<?=$this->currentPath() . $results->getUrlQuery()->addFacet($title, $thisFacet['value'], 'NOT')?>" title="<?=$this->transEsc('exclude_facet')?>"><i class="fa fa-times" aria-hidden="true"></i></a> <a href="<?=$this->currentPath() . $results->getUrlQuery()->addFacet($title, $thisFacet['value'], 'NOT')?>" title="<?=$this->transEsc('exclude_facet')?>"><i class="fa fa-times" aria-hidden="true"></i></a>
<?php endif; ?> <?php endif; ?>
</span>
<?php endif; ?> <?php endif; ?>
</span> </span>
<?php /* More link */ ?> <?php /* More link */ ?>
......
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.
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