-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.phtml
44 lines (33 loc) · 1.11 KB
/
search.phtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
?>
<div class="container">
<?php if (empty($errors)): ?>
<div class="page-header">
<h3 class="text-muted"><i class="glyphicon glyphicon-search"></i> <?php $this->show('Search results for'); ?> "<?php echo $search->getKeyword(); ?>" (<?php echo $paginator->getTotalAmount(); ?>)</h3>
</div>
<?php if (!empty($results)): ?>
<div class="row">
<ul>
<?php foreach ($results as $result): ?>
<li>
<h3><a href="<?php echo $result->getUrl(); ?>"><?php echo $result->getTitle(); ?></a></h3>
<article><?php echo $result->getContent(); ?></article>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php $this->loadPartial('bs-pagination'); ?>
<?php else: ?>
<div class="block-center">
<h2 class="text-center text-muted"><i class="glyphicon glyphicon-remove"></i> <?php $this->show('No results'); ?></h2>
</div>
<?php endif; ?>
<?php else: ?>
<div class="page-header">
<?php foreach($errors as $error): ?>
<h3 class="text-muted"><i class="glyphicon glyphicon-remove"></i> <?php echo $error; ?></h3>
<?php endforeach; ?>
</div>
<div class="row"></div>
<?php endif; ?>
</div>