2020-04-22 21:55:53 +02:00
|
|
|
<?php
|
2019-12-05 21:25:58 +01:00
|
|
|
if (!isset($config)) {
|
|
|
|
$config = $params;
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
<?php if ($config->getHTML()->hasSearch()) { ?>
|
2019-09-09 19:56:14 +02:00
|
|
|
<script>
|
|
|
|
<?php
|
|
|
|
$search_strings = [
|
|
|
|
"Search_one_result",
|
|
|
|
"Search_results",
|
|
|
|
"Search_no_results",
|
|
|
|
"Search_common_words_ignored",
|
|
|
|
"Search_too_short",
|
|
|
|
"Search_one_character_or_more",
|
|
|
|
"Search_should_be_x_or_more",
|
|
|
|
"Link_previous",
|
|
|
|
"Link_next",
|
|
|
|
];
|
|
|
|
$search_translations = [];
|
2019-11-30 22:24:10 +01:00
|
|
|
foreach ($search_strings as $key) {
|
2019-09-09 19:56:14 +02:00
|
|
|
$search_translations[$key] = $this->translate($key);
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
|
|
|
|
window.searchLanguage = <?= json_encode($page['language']) ?>;
|
|
|
|
window.searchTranslation = <?= json_encode($search_translations) ?>;
|
|
|
|
</script>
|
|
|
|
|
2019-09-18 23:16:35 +02:00
|
|
|
<!-- Search -->
|
2019-09-23 22:10:07 +02:00
|
|
|
<script type="text/javascript" src="<?php echo $base_url; ?>daux_libraries/search.min.js"></script>
|
2019-09-09 19:56:14 +02:00
|
|
|
|
|
|
|
<script>
|
2019-09-18 23:16:35 +02:00
|
|
|
window.search({'base_url': '<?php echo $base_url?>'})
|
2019-09-09 19:56:14 +02:00
|
|
|
</script>
|
|
|
|
<?php } ?>
|