Skip to content

Commit

Permalink
Wire up keyword search as well.
Browse files Browse the repository at this point in the history
  • Loading branch information
demiankatz committed Jul 5, 2024
1 parent f609352 commit 9d5aa5d
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 8 deletions.
5 changes: 5 additions & 0 deletions module/GeebyDeeby/view/geeby-deeby/search/controls.phtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div class="results row">
<ul class="search-controls hidden">
<li><label><input class="creator-toggle" type="checkbox" /> Show creator details</label></li>
</ul>
</div>
14 changes: 12 additions & 2 deletions module/GeebyDeeby/view/geeby-deeby/search/keyword.phtml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<?php
$this->layout()->title = 'Search Results - Keyword';
$this->scriptManager()->add(['search']);
$empty = true;
?>
<?=$this->render('geeby-deeby/search/controls.phtml')?>
<?php if (count($series) > 0): $empty = false; ?>
<h2>Series</h2>
<p>
Expand All @@ -28,7 +30,11 @@
<?php foreach ($items as $current): ?>
<a href="<?=$this->url('item', ['id' => $current['Item_ID']])?>">
<?=$this->escapeHtml($this->fixtitle($current['Item_Name']))?>
</a><br />
</a>
<span class="hidden creators" data-loaded="0" data-item-id="<?=$current['Item_ID']?>">
/ <span class="values"></span>
</span>
<br />
<?php endforeach; ?>
</p>
<?php endif; ?>
Expand All @@ -38,7 +44,11 @@
<?php foreach ($itemsAltTitles as $current): ?>
<a href="<?=$this->url('item', ['id' => $current['Item_ID']])?>">
<?=$this->escapeHtml($this->fixtitle($current['Item_AltName']))?>
</a><br />
</a>
<span class="hidden creators" data-loaded="0" data-item-id="<?=$current['Item_ID']?>">
/ <span class="values"></span>
</span>
<br />
<?php endforeach; ?>
</p>
<?php endif; ?>
Expand Down
2 changes: 1 addition & 1 deletion module/GeebyDeeby/view/geeby-deeby/search/list.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<?php if ($this->prefix === 'Item'): ?>
<div class="result row hidden creators" data-loaded="0" data-item-id="<?=$current[$this->prefix . '_ID']?>">
<span class="col-md-1">&nbsp;</span>
<span class="col-md-10 values"><?=$this->prefix?></span>
<span class="col-md-10 values"></span>
</div>
<?php endif; ?>
<?php endforeach; ?>
Expand Down
6 changes: 1 addition & 5 deletions module/GeebyDeeby/view/geeby-deeby/search/title.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@
'Item Alternate Titles' => $itemsAltTitles,
];
?>
<div class="results row">
<p class="search-controls hidden">
<label><input class="creator-toggle" type="checkbox" /> Show creator details</label>
</p>
</div>
<?=$this->render('geeby-deeby/search/controls.phtml')?>
<div class="results row">
<?php foreach($lists as $title => $results): ?>
<?php if (count($results) > 0): $empty = false; ?>
Expand Down
4 changes: 4 additions & 0 deletions public/css/geeby-deeby.css
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,10 @@ table td {padding-bottom:6px}
padding:5px 8px;
}

ul.search-controls li {
list-style-type: none;
}

.item-image {
max-width: 100%;
box-shadow: 0 1px 2px rgba(0,0,0,0.3);
Expand Down

0 comments on commit 9d5aa5d

Please sign in to comment.