blob: f380647007c391d6fdaa173dfdf186718e447c7a (
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
|
<?php
if ($rule->getStartTime() && $rule->getEndTime()) {
printf(_('Diese Regel gilt von %s bis %s.') . '<br>',
strftime('%d.%m.%Y %H:%M', $rule->getStartTime()),
strftime('%d.%m.%Y %H:%M', $rule->getEndTime()));
} else if ($rule->getStartTime() && !$rule->getEndTime()) {
printf(_('Diese Regel gilt ab %s.') . '<br>',
strftime('%d.%m.%Y %H:%M', $rule->getStartTime()));
} else if (!$rule->getStartTime() && $rule->getEndTime()) {
printf(_('Diese Regel gilt bis %s.') . '<br>',
strftime('%d.%m.%Y %H:%M', $rule->getEndTime()));
}
?>
<? if (count($rule->getUngroupedConditions()) == 1): ?>
<?= _('Folgende Bedingung muss zur Anmeldung erfüllt sein:') ?>
<br>
<div id="conditions">
<?php
$conditions = $rule->getUngroupedConditions();
$condition = reset($conditions);
?>
<div id="condition_<?= $condition->getId() ?>">
<i><?= $condition->toString() ?></i>
</div>
</div>
<? elseif (count($rule->getUngroupedConditions()) > 1): ?>
<?= _('Mindestens eine der folgenden Bedingungen muss zur Anmeldung '.
'erfüllt sein:') ?>
<br>
<ul id="conditions">
<? foreach ($rule->getUngroupedConditions() as $condition): ?>
<li id="condition_<?= $condition->getId() ?>">
<i><?= $condition->toString() ?></i>
</li>
<? endforeach; ?>
</ul>
<? elseif (count($rule->getConditionGroups())): ?>
<?= _('Mindestens eine der folgenden Bedingungen muss zur Anmeldung '.
'erfüllt sein:') ?>
<br>
<ul id="conditions">
<? foreach ($rule->getConditionGroups() as $conditiongroup_id => $conditions): ?>
<li>
<i><?= sprintf(_('Kontingent: %s Prozent'), $rule->getQuota($conditiongroup_id)) ?></i>
<ul id="conditiongroup_<?=$conditiongroup_id?>">
<? foreach ($conditions as $condition): ?>
<li id="condition_<?= $condition->getId() ?>">
<i><?= $condition->toString() ?></i>
</li>
<? endforeach; ?>
</ul>
</li>
<? endforeach; ?>
</ul>
<? endif; ?>
|