xref: /webtrees/resources/views/admin/upgrade/wizard.phtml (revision cc96dffc309b4d8fe7403ed9e9bd9b8ac8fa1b3c)
1<?php
2
3use Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel;
4use Fisharebest\Webtrees\Http\RequestHandlers\UpgradeWizardConfirm;
5use Fisharebest\Webtrees\I18N;
6
7/**
8 * @var string $current_version
9 * @var string $latest_version
10 * @var string $title
11 */
12
13?>
14
15<?= view('components/breadcrumbs', ['links' => [route(ControlPanel::class) => I18N::translate('Control panel'), $title]]) ?>
16
17<h1><?= $title ?></h1>
18
19<?php if ($latest_version === '') : ?>
20    <div class="alert alert-warning">
21        <?= I18N::translate('No upgrade information is available.') ?>
22    </div>
23<?php elseif (version_compare($current_version, $latest_version) >= 0) : ?>
24    <div class="alert alert-info">
25        <?= I18N::translate('This is the latest version of webtrees. No upgrade is available.') ?>
26    </div>
27<?php else : ?>
28    <p>
29        <?= I18N::translate('A new version of webtrees is available.') ?>
30    </p>
31
32    <p>
33        <?= I18N::translate('Depending on your server configuration, you may be able to upgrade automatically.') ?>
34    </p>
35
36    <form method="post" action="<?= e(route(UpgradeWizardConfirm::class)) ?>" class="form-horizontal">
37        <button type="submit" class="btn btn-primary" name="continue" value="1">
38            <?= I18N::translate('continue') ?>
39        </button>
40
41        <?= csrf_field() ?>
42    </form>
43<?php endif ?>
44