blob: 36c311e49c463cd5ed7aea972b9eb41f47ed19c5 (
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
|
<?php
/**
* @var PrivacyController $controller
* @var array $plugin_data
* @var string $section
* @var string $user_id
*/
?>
<? if (empty($plugin_data) || empty(reset($plugin_data))): ?>
<?= MessageBox::info(_('In dieser Kategorie sind keine Daten vorhanden.')) ?>
<? endif; ?>
<? foreach ($plugin_data as $label => $tabledata) : ?>
<? if ($tabledata['table_content']) : ?>
<article class="studip toggle <? if (!Request::isDialog() && $section) echo 'open'; ?>">
<header>
<h1>
<a>
<?= htmlReady($label) ?>,
<?= sprintf(_('%u Einträge'), count($tabledata['table_content'])) ?>
</a>
</h1>
<? if (Request::isDialog()) : ?>
<a href="<?= $controller->link_for("privacy/export2csv/{$tabledata['table_name']}/{$user_id}") ?>">
<strong><?= htmlReady($label) ?> CSV</strong>
</a>
<? endif; ?>
</header>
<section>
<table class="default">
<thead>
<tr>
<? foreach (array_keys($tabledata['table_content'][0]) as $caption) : ?>
<th><?= htmlReady($caption) ?></th>
<? endforeach; ?>
</tr>
</thead>
<tbody>
<? foreach ($tabledata['table_content'] as $row) : ?>
<tr>
<? foreach ($row as $key => $value): ?>
<td>
<?= \Studip\Markup::isHtml($value) ? formatReady($value) : htmlReady($value) ?>
</td>
<? endforeach; ?>
</tr>
<? endforeach; ?>
</tbody>
</table>
</section>
</article>
<? endif; ?>
<? endforeach; ?>
<div data-dialog-button>
<? if (Request::isDialog()): ?>
<?= Studip\LinkButton::create(_('Zurück'), $controller->url_for("privacy/landing/{$user_id}"), ['data-dialog' => 'size=medium']); ?>
<? else: ?>
<?= Studip\LinkButton::create(_('Zurück'), $controller->url_for("privacy/landing/{$user_id}")); ?>
<? endif; ?>
</div>
|