-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsearch.html
25 lines (25 loc) · 1.63 KB
/
search.html
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
<?php $this->yellow->layout("header") ?>
<div class="content">
<div class="main" role="main">
<h1><?php echo $this->yellow->page->getHtml("titleContent") ?></h1>
<form class="search-form" action="<?php echo $this->yellow->page->getLocation(true) ?>" method="post">
<input class="form-control" type="text" name="query" value="<?php echo $this->yellow->page->getRequestHtml("query") ?>"<?php echo $this->yellow->page->get("status")=="none" ? " autofocus=\"autofocus\"" : "" ?> />
<input class="btn search-btn" type="submit" value="<?php echo $this->yellow->language->getTextHtml("searchButton") ?>" />
<input type="hidden" name="clean-url" />
</form>
<?php if ($this->yellow->page->get("status")=="done"): ?>
<?php $pages = $this->yellow->page->getPages("search")->paginate($this->yellow->system->get("searchPaginationLimit")) ?>
<?php foreach ($pages as $page): ?>
<div class="entry">
<div class="entry-title"><h2><a href="<?php echo $page->getLocation(true) ?>"><?php echo $page->getHtml("title") ?></a></h2></div>
<div class="entry-content"><?php echo htmlspecialchars($this->yellow->toolbox->createTextDescription($page->getPage("searchResult")->getContentHtml(), $this->yellow->system->get("searchPageLength"))) ?></div>
<div class="entry-location"><a href="<?php echo $page->getLocation(true) ?>"><?php echo $page->getUrl() ?></a></div>
</div>
<?php endforeach ?>
<?php $this->yellow->layout("pagination", $pages) ?>
<?php elseif ($this->yellow->page->get("status")=="empty"): ?>
<p><?php echo $this->yellow->language->getTextHtml("searchResults".ucfirst($this->yellow->page->get("status"))) ?><p>
<?php endif ?>
</div>
</div>
<?php $this->yellow->layout("footer") ?>