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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
|
<form class="default" method="post"
name="wiki_import_form"
data-dialog="size=auto;<?= $show_wiki_page_form ? 'reload-on-close' : '' ?>"
action="<?= $controller->link_for("wiki/import/{$course->id}") ?>">
<?= CSRFProtection::tokenTag() ?>
<? if (!$show_wiki_page_form && !$success): ?>
<fieldset>
<legend><?= _('Suche nach Veranstaltungen') ?></legend>
<label class="with-action">
<? if ($bad_course_search): ?>
<?= _('Meinten Sie eine der folgenden Veranstaltungen?') ?>
<? else: ?>
<?= _('Sie können hier eine Veranstaltung mit zu importierenden Wikiseiten suchen.') ?>
<? endif ?>
<?= $course_search->render() ?>
<?= Icon::create('search')->asImg([
'class' => 'text-bottom',
'title' => _('Suche starten'),
'onclick' => "jQuery(this).closest('form').submit();"
]) ?>
<? if ($bad_course_search): ?>
<a href="<?= $controller->link_for("wiki/import/{$course->id}") ?>"
data-dialog="1">
<?= Icon::create('decline')->asImg([
'class' => 'text-bottom',
'title' => _('Suche zurücksetzen'),
'onclick' => "STUDIP.QuickSearch.reset('wiki_import_form', 'selected_course_id');"
]) ?>
</a>
<? else: ?>
<?= Icon::create('decline')->asImg([
'class' => 'text-bottom',
'title' => _('Suche zurücksetzen'),
'onclick' => "STUDIP.QuickSearch.reset('wiki_import_form', 'selected_course_id');"
]) ?>
<? endif ?>
</label>
<div data-dialog-button>
<? if ($bad_course_search): ?>
<?= Studip\LinkButton::create(
_('Neue Suche'),
$controller->url_for("wiki/import/{$course->id}"),
['data-dialog' => 'size=auto']
) ?>
<? endif ?>
<?= Studip\LinkButton::createCancel(
_('Abbrechen'),
URLHelper::getURL(
'wiki.php',
[
'cid' => Context::getId(),
'view' => 'show'
]
)
) ?>
</div>
</fieldset>
<? endif ?>
<? if ($show_wiki_page_form): ?>
<input type="hidden" name="selected_course_id"
value="<?= htmlReady($selected_course->id) ?>">
<? if ($wiki_pages): ?>
<table class="default">
<colgroup>
<col width="20px">
<col>
</colgroup>
<caption>
<?= sprintf(
_('%s: Importierbare Wikiseiten'),
htmlReady($selected_course->getFullName())
) ?>
</caption>
<thead>
<tr>
<th>
<input type="checkbox"
data-proxyfor=":checkbox[name='selected_wiki_page_ids[]']">
</th>
<th><?= _('Seitenname') ?></th>
</tr>
</thead>
<tbody>
<? foreach ($wiki_pages as $wiki_page): ?>
<tr>
<td>
<input type="checkbox"
name="selected_wiki_page_ids[]"
value="<?= htmlReady(json_encode($wiki_page->getId())) ?>">
</td>
<td><?= htmlReady($wiki_page->keyword) ?></td>
</tr>
<? endforeach ?>
</tbody>
</table>
<div data-dialog-button>
<?= Studip\Button::create(_('Importieren'), 'import') ?>
<?= Studip\LinkButton::create(
_('Neue Suche'),
$controller->url_for("wiki/import/{$course->id}"),
['data-dialog' => 'size=auto']
) ?>
<?= Studip\LinkButton::createCancel(
_('Abbrechen'),
URLHelper::getURL(
'wiki.php',
[
'cid' => Context::getId(),
'view' => 'show'
]
)
) ?>
</div>
<? else: ?>
<?= MessageBox::info(
_('Die gewählte Veranstaltung besitzt keine Wikiseiten!')
) ?>
<? endif ?>
<? endif ?>
<? if ($success): ?>
<div data-dialog-button>
<?= Studip\LinkButton::create(
_('Import neu starten'),
$controller->url_for("wiki/import/{$course->id}"),
['data-dialog' => 'size=auto']
) ?>
<?= Studip\LinkButton::createCancel(
_('Zurück zum Wiki'),
URLHelper::getURL(
'wiki.php',
[
'cid' => Context::getId(),
'view' => 'show'
]
)
) ?>
</div>
<? endif ?>
</form>
|