Arc-hive-omeka-theme/view/common/search-form.phtml

32 lines
1.4 KiB
PHTML
Raw Normal View History

2021-04-25 09:49:47 +02:00
<?php
$translate = $this->plugin('translate');
$searchType = $this->siteSetting('search_type', 'sitewide');
switch ($searchType) {
case 'cross-site':
$searchAction = $this->url('site/cross-site-search', ['action' => 'results'], true);
break;
case 'sitewide':
default:
$searchAction = $this->url('site/resource', ['controller' => 'index', 'action' => 'search'], true);
}
$searchValue = $this->escapeHtml($this->params()->fromQuery('fulltext_search', ''));
?>
<form class="search" action="<?php echo $this->escapeHtml($searchAction); ?>">
<div class="input-group">
2021-04-25 09:49:47 +02:00
<input type="text" name="fulltext_search" value="<?php echo $searchValue; ?>"
placeholder="<?php echo $translate('Search'); ?>"
aria-label="<?php echo $translate('Search'); ?>" class="input-group-field button hollow" />
<button class="appear button" type="submit"><?php echo $translate('Search'); ?></button>
</div>
</form>
<!-- <form action="<?php// echo $this->escapeHtml($searchAction); ?>" id="search-form" class="input-group">
<input type="text" name="fulltext_search" value="<?php //echo $searchValue; ?>"
placeholder="<?php// echo $translate('Search'); ?>"
aria-label="<?php //echo $translate('Search'); ?>" class="input-group-field">
2021-04-25 09:49:47 +02:00
<div class="input-group-button">
<button type="submit" class="button"><?php //echo $translate('Search'); ?></button>
2021-04-25 09:49:47 +02:00
</div>
</form> -->