blob: 6bba52fbf24ed5bc499e4fdf66d0f1bd5247cecf (
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
|
<? if (count($migrations) === 0): ?>
<?= MessageBox::info(_('Ihr System befindet sich auf dem aktuellen Stand.'))->hideClose() ?>
<? else: ?>
<form method="post" action="<?= $controller->link_for('migrate') ?>">
<?= CSRFProtection::tokenTag() ?>
<? if (isset($target)): ?>
<input type="hidden" name="target" value="<?= htmlReady($target) ?>">
<? endif ?>
<input type="hidden" name="branch" value="<?= htmlReady($branch) ?>">
<table class="default" id="migration-list">
<caption>
<?= _('Die hier aufgeführten Anpassungen werden beim Klick auf "Starten" ausgeführt:') ?>
</caption>
<colgroup>
<col style="width: 24px">
<col style="width: 120px">
<col>
<col>
</colgroup>
<thead>
<tr>
<th></th>
<th><?= _('Nr.') ?></th>
<th><?= _('Name') ?></th>
<th><?= _('Beschreibung') ?></th>
</tr>
</thead>
<tbody>
<? foreach ($migrations as $number => $migration): ?>
<? $version = $migrator->migrationBranchAndVersion($number) ?>
<tr>
<td>
<? if ($version[0] === $branch): ?>
<input type="radio" name="target" value="<?= $version[1] + $offset ?>">
<? endif ?>
</td>
<td>
<?= htmlReady($number) ?>
</td>
<td>
<?= htmlReady(get_class($migration)) ?>
</td>
<td>
<? if ($migration->description()): ?>
<?= htmlReady($migration->description()) ?>
<? else: ?>
<em><?= _('keine Beschreibung vorhanden') ?></em>
<? endif ?>
</td>
</tr>
<? endforeach; ?>
</tbody>
<tfoot>
<tr>
<td colspan="4">
<? if ($lock->isLocked($lock_data)):
$user = User::find($lock_data['user_id']);
?>
<?= MessageBox::info(sprintf(
_('Die Migration wurde %s von %s bereits angestossen und läuft noch.'),
reltime($lock_data['timestamp']),
htmlReady($user ? $user->getFullName() : _('unbekannt'))
), [
sprintf(
_('Sollte während der Migration ein Fehler aufgetreten sein, so können Sie '
. 'diese Sperre durch den unten stehenden Link oder das Löschen der Datei '
. '<em>%s</em> auflösen.'),
$lock->getFilename()
)
]) ?>
<?= Studip\LinkButton::create(_('Sperre aufheben'), $controller->url_for('release', $target)) ?>
<? else: ?>
<?= Studip\Button::createAccept(_('Starten'), 'start')?>
<? endif; ?>
</td>
</tr>
</tfoot>
</table>
</form>
<? endif ?>
|