Skip to content
Snippets Groups Projects
Commit f979d3ed authored by Demian Katz's avatar Demian Katz
Browse files

More consistent handling of results object.

parent 3ce8175b
No related merge requests found
<? <?
$topFacetSet = $this->recommend->getTopFacetSet(); $topFacetSet = $this->recommend->getTopFacetSet();
$topFacetSettings = $this->recommend->getTopFacetSettings(); $topFacetSettings = $this->recommend->getTopFacetSettings();
$results = $this->recommend->getResults();
?> ?>
<? if (isset($topFacetSet)): ?> <? if (isset($topFacetSet)): ?>
<? foreach($topFacetSet as $title => $cluster): ?> <? foreach($topFacetSet as $title => $cluster): ?>
...@@ -28,7 +29,7 @@ ...@@ -28,7 +29,7 @@
<?=$this->escapeHtml($thisFacet['displayText'])?> <img src="<?=$this->imageLink('silk/tick.png')?>" alt="<?=$this->transEsc('Selected') ?>"/> <?=$this->escapeHtml($thisFacet['displayText'])?> <img src="<?=$this->imageLink('silk/tick.png')?>" alt="<?=$this->transEsc('Selected') ?>"/>
</a> </a>
<? else: ?> <? else: ?>
<a href="<?=$this->currentPath().$this->recommend->getResults()->getUrlQuery()->addFacet($title, $thisFacet['value'], $thisFacet['operator'])?>"><?=$this->escapeHtml($thisFacet['displayText'])?></a> (<?=$this->localizedNumber($thisFacet['count']) ?>) <a href="<?=$this->currentPath().$results->getUrlQuery()->addFacet($title, $thisFacet['value'], $thisFacet['operator'])?>"><?=$this->escapeHtml($thisFacet['displayText'])?></a> (<?=$this->localizedNumber($thisFacet['count']) ?>)
<? if ($allowExclude): ?> <? if ($allowExclude): ?>
<a href="<?=$this->currentPath().$results->getUrlQuery()->addFacet($title, $thisFacet['value'], 'NOT')?>"><?=$this->transEsc('exclude_facet')?></a> <a href="<?=$this->currentPath().$results->getUrlQuery()->addFacet($title, $thisFacet['value'], 'NOT')?>"><?=$this->transEsc('exclude_facet')?></a>
<? endif; ?> <? endif; ?>
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
// TODO: This file needs love // TODO: This file needs love
$topFacetSet = $this->recommend->getTopFacetSet(); $topFacetSet = $this->recommend->getTopFacetSet();
$topFacetSettings = $this->recommend->getTopFacetSettings(); $topFacetSettings = $this->recommend->getTopFacetSettings();
$results = $this->recommend->getResults();
?> ?>
<? if (isset($topFacetSet)): ?> <? if (isset($topFacetSet)): ?>
<? $row=0; foreach($topFacetSet as $title => $cluster): ?> <? $row=0; foreach($topFacetSet as $title => $cluster): ?>
...@@ -29,7 +30,7 @@ ...@@ -29,7 +30,7 @@
<?=$this->escapeHtml($thisFacet['displayText'])?> <i class="fa fa-check"></i> <?=$this->escapeHtml($thisFacet['displayText'])?> <i class="fa fa-check"></i>
</a> </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().$results->getUrlQuery()->addFacet($title, $thisFacet['value'], $thisFacet['operator'])?>"><?=$this->escapeHtml($thisFacet['displayText'])?></a> <span class="badge"><?=$this->localizedNumber($thisFacet['count']) ?>
<? if ($allowExclude): ?> <? if ($allowExclude): ?>
<a href="<?=$this->currentPath().$results->getUrlQuery()->addFacet($title, $thisFacet['value'], 'NOT')?>" title="<?=$this->transEsc('exclude_facet')?>"><i class="fa fa-times"></i></a> <a href="<?=$this->currentPath().$results->getUrlQuery()->addFacet($title, $thisFacet['value'], 'NOT')?>" title="<?=$this->transEsc('exclude_facet')?>"><i class="fa fa-times"></i></a>
<? endif; ?> <? 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