blob: 65aaa37e971ac64f426390fb9d6abdab5e9a4b95 (
plain)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
<form class="default" action="<?= $controller->url_for('globalsearch/saveconfig') ?>" method="post">
<section>
<label>
<span class="required">
<?= _('Wieviele Ergebnisse pro Kategorie sollen in der Schnellsuche angezeigt werden?') ?>
</span>
<input type="number" name="entries_per_type" size="5"
value="<?= intval(Config::get()->GLOBALSEARCH_MAX_RESULT_OF_TYPE) ?>" required>
</label>
</section>
<br>
<section>
<label>
<?= _('Auf welche Art sollen die Suchergebnisse aus der Datenbank gelesen werden?') ?>
<select name="async_queries" size="1">
<?php if (in_array('mysqli', get_loaded_extensions())) : ?>
<option value="1"<?= Config::get()->GLOBALSEARCH_ASYNC_QUERIES ? ' selected' : '' ?>>
<?= _('Asynchron, via mysqli') ?>
</option>
<?php endif ?>
<option value="0"<?= Config::get()->GLOBALSEARCH_ASYNC_QUERIES ? '' : ' selected' ?>>
<?= _('Synchron, via PDO') ?>
</option>
</select>
</label>
</section>
<br>
<section>
<table class="default sortable-table" id="globalsearch-modules">
<caption>
<?= _('In welcher Reihenfolge sollen Suchergebnisse erscheinen?') ?>
</caption>
<colgroup>
<col width="10">
<col>
<col width="50">
<col width="50">
</colgroup>
<thead>
<tr>
<th></th>
<th><?= _('Kategorie') ?></th>
<th><?= _('Aktiv?') ?></th>
<th><?= _('Volltext?') ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($modules as $className => $module) : ?>
<tr>
<td class="drag-handle"></td>
<td>
<label for="active[<?= htmlReady($className) ?>]">
<?= htmlReady($module->getName()) ?>
</label>
<input type="hidden" name="modules[<?= htmlReady($className) ?>][class]"
value="<?= htmlReady($className) ?>">
</td>
<td>
<input type="checkbox" id="active[<?= htmlReady($className) ?>]"
name="modules[<?= htmlReady($className) ?>][active]" value="1"
<?= !empty($config[$className]['active']) ? ' checked' : '' ?>>
</td>
<td>
<?php if (is_a($module, 'GlobalSearchFulltext')) : ?>
<input type="checkbox" name="modules[<?= htmlReady($className) ?>][fulltext]"
value="1"<?= $config[$className]['fulltext'] ? ' checked' : ''?>>
<?php endif ?>
</td>
</tr>
<?php endforeach ?>
</tbody>
</table>
</section>
<?= CSRFProtection::tokenTag() ?>
<footer data-dialog-button>
<?= \Studip\Button::createAccept(_('Speichern'), 'submit')?>
</footer>
</form>
<script language="JavaScript" type="text/javascript">
//<!--
jQuery('#globalsearch-modules tbody').sortable();
//-->
</script>
|