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
|
<? use Studip\Button, Studip\LinkButton; ?>
<div style="padding:2em; text-align:center; vertical-align: middle; background-color: #e7ebf1; margin-bottom: 20px;">
<form action="<?= $controller->action_link('index') ?>" method="post">
<?= CSRFProtection::tokenTag() ?>
<input type="text" style="width:50%;" name="sterm" value="<?= htmlReady($input_search) ?>">
<input type="hidden" name="do_search" value="1">
<?= Button::create('Suche') ?>
<? if ($sterm) : ?>
<?= LinkButton::create('Zurücksetzen', $controller->url_for('search/module/reset'), ['title' => _('Suche zurücksetzen')]); ?>
<? endif; ?>
</form>
</div>
<!-- Trefferset -->
<table class="default collapsable">
<caption>
<? if ($count) : ?>
<?= sprintf(_('Gefundene Module für <i>%s</i>'), htmlReady($sterm)) ?>
<span class="actions">
<? printf(ngettext('%s Modul', '%s Module', $count), $count); ?>
</span>
<? endif; ?>
</caption>
<? if (count($module)) : ?>
<colgroup>
<col>
<col>
<col>
</colgroup>
<thead>
<tr>
<th>
<abbr title="<?= _('Moduldeskriptor') ?>">
<?= Icon::create('log', Icon::ROLE_INFO) ?>
</abbr>
</th>
<th class="mvv-search-modules-row"><?= _('Modultitel') ?></th>
<th><?= _('Gültigkeit') ?></th>
<th><?= _('Einrichtung') ?></th>
</tr>
</thead>
<? foreach ($module as $modul) : ?>
<?= $this->render_partial('search/module/_modul', ['modul' => $modul]); ?>
<? endforeach; ?>
<tfoot>
<tr>
<td colspan="4" style="text-align: right;">
<? if ($count > MVVController::$items_per_page) : ?>
<?
$pagination = $GLOBALS['template_factory']->open('shared/pagechooser');
$pagination->clear_attributes();
$pagination->set_attribute('perPage', MVVController::$items_per_page);
$pagination->set_attribute('num_postings', $count);
$pagination->set_attribute('page', $page);
$page_link = reset(explode('?', $controller->action_url('index'))) . '?page_module=%s';
$pagination->set_attribute('pagelink', $page_link);
echo $pagination->render();
?>
<? endif; ?>
</td>
</tr>
</tfoot>
<? endif; ?>
</table>
|