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