xref: /webtrees/resources/views/admin/control-panel.phtml (revision 5b868ec08ab919eb6029341cfc3ebaf194368275)
1beefaa8eSGreg Roach<?php
2beefaa8eSGreg Roach
3e381f98dSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\BroadcastPage;
4fd6c003fSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\CleanDataFolder;
5b1a54200SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel;
65afbc57aSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\CreateTreePage;
722e73debSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\PendingChanges;
8b1a54200SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\PhpInformation;
957bfa969SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\SiteLogsPage;
10b4144a6dSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\EmailPreferencesPage;
112474349cSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\UsersCleanupPage;
12beefaa8eSGreg Roachuse Fisharebest\Webtrees\I18N;
13b1a54200SGreg Roachuse Fisharebest\Webtrees\Module\FamilyListModule;
14b1a54200SGreg Roachuse Fisharebest\Webtrees\Module\IndividualListModule;
15b1a54200SGreg Roachuse Fisharebest\Webtrees\Module\MediaListModule;
16beefaa8eSGreg Roachuse Fisharebest\Webtrees\Module\ModuleConfigInterface;
17beefaa8eSGreg Roachuse Fisharebest\Webtrees\Module\ModuleCustomInterface;
18b1a54200SGreg Roachuse Fisharebest\Webtrees\Module\NoteListModule;
19b1a54200SGreg Roachuse Fisharebest\Webtrees\Module\RepositoryListModule;
20b1a54200SGreg Roachuse Fisharebest\Webtrees\Module\SourceListModule;
21beefaa8eSGreg Roachuse Fisharebest\Webtrees\Webtrees;
22beefaa8eSGreg Roachuse Illuminate\Support\Collection;
23beefaa8eSGreg Roach
24beefaa8eSGreg Roach/**
25beefaa8eSGreg Roach * @var string     $latest_version
26beefaa8eSGreg Roach * @var string     $title
27beefaa8eSGreg Roach * @var Collection $server_errors
28beefaa8eSGreg Roach * @var Collection $server_warnings
29beefaa8eSGreg Roach */
30beefaa8eSGreg Roach
31beefaa8eSGreg Roach?>
32dd6b2bfcSGreg Roach
33dd6b2bfcSGreg Roach<h1><?= $title ?></h1>
34dd6b2bfcSGreg Roach
35dd6b2bfcSGreg Roach<!-- WEBSITE / WEBTREES -->
36dd6b2bfcSGreg Roach<div class="card mb-4">
37dd6b2bfcSGreg Roach    <div class="card-header">
38dd6b2bfcSGreg Roach        <h2 class="mb-0">
39dd6b2bfcSGreg Roach            <?= I18N::translate('Website') ?>
404ebbf4abSGreg Roach            <span class="badge badge-secondary" dir="ltr">
418d0ebef0SGreg Roach                <?= e(Webtrees::VERSION) ?>
42dd6b2bfcSGreg Roach            </span>
43dd6b2bfcSGreg Roach        </h2>
44dd6b2bfcSGreg Roach    </div>
45dd6b2bfcSGreg Roach    <div class="card-body">
46b7059dccSGreg Roach        <?php foreach ($server_errors as $server_error) : ?>
47b7059dccSGreg Roach            <p class="alert alert-danger"><?= $server_error ?></p>
48b7059dccSGreg Roach        <?php endforeach ?>
49b7059dccSGreg Roach
50dd6b2bfcSGreg Roach        <?php foreach ($server_warnings as $server_warning) : ?>
51dd6b2bfcSGreg Roach            <p class="alert alert-warning"><?= $server_warning ?></p>
52dd6b2bfcSGreg Roach        <?php endforeach ?>
53dd6b2bfcSGreg Roach
54dd6b2bfcSGreg Roach        <p class="card-text">
55dd6b2bfcSGreg Roach            <?= /* I18N: %s is a URL/link to the project website */
56dd6b2bfcSGreg Roach            I18N::translate('Support and documentation can be found at %s.', '<a href="https://webtrees.net/">webtrees.net</a>') ?>
57dd6b2bfcSGreg Roach        </p>
58dd6b2bfcSGreg Roach        <p class="card-text">
59dd6b2bfcSGreg Roach            <?php if ($latest_version === '') : ?>
60dd6b2bfcSGreg Roach                <?= I18N::translate('No upgrade information is available.') ?>
618d0ebef0SGreg Roach            <?php elseif (version_compare(Webtrees::VERSION, $latest_version) < 0) : ?>
62*5b868ec0SGreg Roach                <div class="alert alert-info">
63dd6b2bfcSGreg Roach                    <?= I18N::translate('A new version of webtrees is available.') ?>
64*5b868ec0SGreg Roach                    <a href="<?= e(route('upgrade')) ?>" class="alert-link">
65dd6b2bfcSGreg Roach                        <?= /* I18N: %s is a version number */
66dd6b2bfcSGreg Roach                        I18N::translate('Upgrade to webtrees %s.', e($latest_version)) ?>
67dd6b2bfcSGreg Roach                    </a>
68*5b868ec0SGreg Roach                </div>
69dd6b2bfcSGreg Roach            <?php else : ?>
70dd6b2bfcSGreg Roach                <?= I18N::translate('This is the latest version of webtrees. No upgrade is available.') ?>
71dd6b2bfcSGreg Roach            <?php endif ?>
72dd6b2bfcSGreg Roach        </p>
73dd6b2bfcSGreg Roach
74dd6b2bfcSGreg Roach        <div class="row">
75dd6b2bfcSGreg Roach            <div class="col-sm-6">
76dd6b2bfcSGreg Roach                <ul class="fa-ul">
77dd6b2bfcSGreg Roach                    <li>
78dd6b2bfcSGreg Roach                        <span class="fa-li"><?= view('icons/preferences') ?></span>
79dd6b2bfcSGreg Roach                        <a href="<?= e(route('admin-site-preferences')) ?>">
80dd6b2bfcSGreg Roach                            <?= I18N::translate('Website preferences') ?>
81dd6b2bfcSGreg Roach                        </a>
82dd6b2bfcSGreg Roach                    </li>
83dd6b2bfcSGreg Roach                    <li>
84a24f7142SGreg Roach                        <span class="fa-li"><?= view('icons/email') ?></span>
85b4144a6dSGreg Roach                        <a href="<?= e(route(EmailPreferencesPage::class)) ?>">
86dd6b2bfcSGreg Roach                            <?= I18N::translate('Sending email') ?>
87dd6b2bfcSGreg Roach                        </a>
88dd6b2bfcSGreg Roach                    </li>
89dd6b2bfcSGreg Roach                    <li>
90a24f7142SGreg Roach                        <span class="fa-li"><?= view('icons/user') ?></span>
91dd6b2bfcSGreg Roach                        <a href="<?= e(route('admin-site-registration')) ?>">
92dd6b2bfcSGreg Roach                            <?= I18N::translate('Sign-in and registration') ?>
93dd6b2bfcSGreg Roach                        </a>
94dd6b2bfcSGreg Roach                    </li>
95dd6b2bfcSGreg Roach                </ul>
96dd6b2bfcSGreg Roach            </div>
97dd6b2bfcSGreg Roach            <div class="col-sm-6">
98dd6b2bfcSGreg Roach                <ul class="fa-ul">
99dd6b2bfcSGreg Roach                    <li>
100a24f7142SGreg Roach                        <span class="fa-li"><?= view('icons/list') ?></span>
10157bfa969SGreg Roach                        <a href="<?= e(route(SiteLogsPage::class)) ?>">
102dd6b2bfcSGreg Roach                            <?= I18N::translate('Website logs') ?>
103dd6b2bfcSGreg Roach                        </a>
104dd6b2bfcSGreg Roach                    </li>
105dd6b2bfcSGreg Roach                    <li>
106a24f7142SGreg Roach                        <span class="fa-li"><?= view('icons/delete') ?></span>
107fd6c003fSGreg Roach                        <a href="<?= e(route(CleanDataFolder::class)) ?>">
108dd6b2bfcSGreg Roach                            <?= I18N::translate('Clean up data folder') ?>
109dd6b2bfcSGreg Roach                        </a>
110dd6b2bfcSGreg Roach                    </li>
111dd6b2bfcSGreg Roach                    <li>
112a24f7142SGreg Roach                        <span class="fa-li"><?= view('icons/help') ?></span>
113b1a54200SGreg Roach                        <a href="<?= e(route(PhpInformation::class)) ?>">
114dd6b2bfcSGreg Roach                            <?= I18N::translate('Server information') ?>
115dd6b2bfcSGreg Roach                        </a>
116dd6b2bfcSGreg Roach                    </li>
117dd6b2bfcSGreg Roach                </ul>
118dd6b2bfcSGreg Roach            </div>
119dd6b2bfcSGreg Roach        </div>
120dd6b2bfcSGreg Roach    </div>
121dd6b2bfcSGreg Roach</div>
122dd6b2bfcSGreg Roach
123dd6b2bfcSGreg Roach<!-- FAMILY TREES -->
1244e73f0bdSGreg Roach<div class="card mb-4 <?= array_sum($changes) ? 'card-outline-danger' : '' ?>">
125dd6b2bfcSGreg Roach    <div class="card-header">
126dd6b2bfcSGreg Roach        <h2 class="mb-0">
127dd6b2bfcSGreg Roach            <?= I18N::translate('Family trees') ?>
128dd6b2bfcSGreg Roach            <span class="badge badge-secondary">
129dd6b2bfcSGreg Roach                    <?= I18N::number(count($all_trees)) ?>
130dd6b2bfcSGreg Roach                </span>
131dd6b2bfcSGreg Roach        </h2>
132dd6b2bfcSGreg Roach    </div>
133dd6b2bfcSGreg Roach    <div class="card-body">
134e218f363SGreg Roach        <?php if ($all_trees->isEmpty()) : ?>
135e218f363SGreg Roach            <p class="alert alert-info">
136e218f363SGreg Roach                <?= I18N::translate('You need to create a family tree.') ?>
137e218f363SGreg Roach            </p>
138e218f363SGreg Roach        <?php endif ?>
139e218f363SGreg Roach
1405afbc57aSGreg Roach        <ul class="fa-ul">
1415afbc57aSGreg Roach            <li>
1425afbc57aSGreg Roach                <span class="fa-li"><?= view('icons/add') ?></span>
1435afbc57aSGreg Roach                <a href="<?= e(route(CreateTreePage::class)) ?>">
1445afbc57aSGreg Roach                    <?= I18N::translate('Create a family tree') ?>
1455afbc57aSGreg Roach                </a>
1465afbc57aSGreg Roach            </li>
1475afbc57aSGreg Roach            <li>
1485afbc57aSGreg Roach                <span class="fa-li"><?= view('icons/block') ?></span>
1495afbc57aSGreg Roach                <a href="<?= e(route('tree-page-default-edit')) ?>">
1505afbc57aSGreg Roach                    <?= I18N::translate('Set the default blocks for new family trees') ?>
1515afbc57aSGreg Roach                </a>
1525afbc57aSGreg Roach            </li>
1535afbc57aSGreg Roach            <?php if (count($all_trees) > 1) : ?>
1545afbc57aSGreg Roach                <li>
1555afbc57aSGreg Roach                    <span class="fa-li"><?= view('icons/merge') ?></span>
1565afbc57aSGreg Roach                    <a href="<?= e(route('admin-trees-merge')) ?>">
1575afbc57aSGreg Roach                        <?= I18N::translate('Merge family trees') ?>
1585afbc57aSGreg Roach                    </a>
1595afbc57aSGreg Roach                </li>
1605afbc57aSGreg Roach            <?php endif ?>
1615afbc57aSGreg Roach        </ul>
1625afbc57aSGreg Roach
163dd6b2bfcSGreg Roach        <table class="table table-sm">
164dd6b2bfcSGreg Roach            <caption class="sr-only">
165dd6b2bfcSGreg Roach                <?= I18N::translate('Family trees') ?>
166dd6b2bfcSGreg Roach            </caption>
167dd6b2bfcSGreg Roach            <thead>
168dd6b2bfcSGreg Roach                <tr>
169dd6b2bfcSGreg Roach                    <th><?= I18N::translate('Family tree') ?></th>
170dbffae50SGreg Roach                    <th><?= I18N::translate('Pending changes') ?></th>
171dbffae50SGreg Roach                    <th class="d-none d-sm-table-cell"><?= I18N::translate('Individuals') ?></th>
172dbffae50SGreg Roach                    <th class="d-none d-lg-table-cell"><?= I18N::translate('Families') ?></th>
173dbffae50SGreg Roach                    <th class="d-none d-sm-table-cell"><?= I18N::translate('Sources') ?></th>
174dbffae50SGreg Roach                    <th class="d-none d-lg-table-cell"><?= I18N::translate('Repositories') ?></th>
175dbffae50SGreg Roach                    <th class="d-none d-sm-table-cell"><?= I18N::translate('Media') ?></th>
176dbffae50SGreg Roach                    <th class="d-none d-lg-table-cell"><?= I18N::translate('Notes') ?></th>
177dd6b2bfcSGreg Roach                </tr>
178dd6b2bfcSGreg Roach            </thead>
179dd6b2bfcSGreg Roach            <tbody>
180b1a54200SGreg Roach                <?php foreach ($all_trees as $tree) : ?>
181b1a54200SGreg Roach                    <tr class="<?= $changes[$tree->id()] ? 'danger' : '' ?>">
182b1a54200SGreg Roach                        <th scope="row">
183b1a54200SGreg Roach                            <a href="<?= e(route('manage-trees', ['tree' => $tree->name()])) ?>">
184b1a54200SGreg Roach                                <?= view('icons/preferences') ?>
185b1a54200SGreg Roach                                <?= e($tree->name()) ?>
186b1a54200SGreg Roach                                -
187b1a54200SGreg Roach                                <?= e($tree->title()) ?>
188b1a54200SGreg Roach                            </a>
189b1a54200SGreg Roach                        </th>
190b1a54200SGreg Roach                        <td style="text-align: right;">
191b1a54200SGreg Roach                            <?php if ($changes[$tree->id()]) : ?>
19222e73debSGreg Roach                                <a href="<?= e(route(PendingChanges::class, ['tree' => $tree->name(), 'url' => route(ControlPanel::class)])) ?>">
193b1a54200SGreg Roach                                    <?= I18N::number($changes[$tree->id()]) ?>
194b1a54200SGreg Roach                                    <span class="sr-only"><?= I18N::translate('Pending changes') ?> <?= e($tree->title()) ?></span>
195b1a54200SGreg Roach                                </a>
196b1a54200SGreg Roach                            <?php else : ?>
197b1a54200SGreg Roach                                -
198b1a54200SGreg Roach                            <?php endif ?>
199b1a54200SGreg Roach                        </td>
200b1a54200SGreg Roach                        <td class="d-none d-sm-table-cell align-digits">
201b1a54200SGreg Roach                            <?php if ($individuals[$tree->id()] > 0) : ?>
202b1a54200SGreg Roach                                <?php if ($individual_list_module instanceof IndividualListModule) : ?>
203b1a54200SGreg Roach                                    <a href="<?= e($individual_list_module->listUrl($tree)) ?>"><?= I18N::number($individuals[$tree->id()]) ?></a>
204b1a54200SGreg Roach                                <?php else : ?>
205b1a54200SGreg Roach                                    <?= I18N::number($individuals[$tree->id()]) ?>
206b1a54200SGreg Roach                                <?php endif ?>
207b1a54200SGreg Roach                            <?php else : ?>
208b1a54200SGreg Roach                                -
209b1a54200SGreg Roach                            <?php endif ?>
210b1a54200SGreg Roach                        </td>
211b1a54200SGreg Roach                        <td class="d-none d-lg-table-cell align-digits">
212b1a54200SGreg Roach                            <?php if ($families[$tree->id()] > 0) : ?>
213b1a54200SGreg Roach                                <?php if ($family_list_module instanceof FamilyListModule) : ?>
214b1a54200SGreg Roach                                    <a href="<?= e($family_list_module->listUrl($tree)) ?>"><?= I18N::number($families[$tree->id()]) ?></a>
215b1a54200SGreg Roach                                <?php else : ?>
216b1a54200SGreg Roach                                    <?= I18N::number($families[$tree->id()]) ?>
217b1a54200SGreg Roach                                <?php endif ?>
218b1a54200SGreg Roach                            <?php else : ?>
219b1a54200SGreg Roach                                -
220b1a54200SGreg Roach                            <?php endif ?>
221b1a54200SGreg Roach                        </td>
222b1a54200SGreg Roach                        <td class="d-none d-sm-table-cell align-digits">
223b1a54200SGreg Roach                            <?php if ($sources[$tree->id()] > 0) : ?>
224b1a54200SGreg Roach                                <?php if ($source_list_module instanceof SourceListModule) : ?>
225b1a54200SGreg Roach                                    <a href="<?= e($source_list_module->listUrl($tree)) ?>"><?= I18N::number($sources[$tree->id()]) ?></a>
226b1a54200SGreg Roach                                <?php else : ?>
227b1a54200SGreg Roach                                    <?= I18N::number($sources[$tree->id()]) ?>
228b1a54200SGreg Roach                                <?php endif ?>
229b1a54200SGreg Roach                            <?php else : ?>
230b1a54200SGreg Roach                                -
231b1a54200SGreg Roach                            <?php endif ?>
232b1a54200SGreg Roach                        </td>
233b1a54200SGreg Roach                        <td class="d-none d-lg-table-cell align-digits">
234b1a54200SGreg Roach                            <?php if ($repositories[$tree->id()] > 0) : ?>
235b1a54200SGreg Roach                                <?php if ($repository_list_module instanceof RepositoryListModule) : ?>
236b1a54200SGreg Roach                                    <a href="<?= e($repository_list_module->listUrl($tree)) ?>"><?= I18N::number($repositories[$tree->id()]) ?></a>
237b1a54200SGreg Roach                                <?php else : ?>
238b1a54200SGreg Roach                                    <?= I18N::number($repositories[$tree->id()]) ?>
239b1a54200SGreg Roach                                <?php endif ?>
240b1a54200SGreg Roach                            <?php else : ?>
241b1a54200SGreg Roach                                -
242b1a54200SGreg Roach                            <?php endif ?>
243b1a54200SGreg Roach                        </td>
244b1a54200SGreg Roach                        <td class="d-none d-sm-table-cell align-digits">
245b1a54200SGreg Roach                            <?php if ($media[$tree->id()] > 0) : ?>
246b1a54200SGreg Roach                                <?php if ($media_list_module instanceof MediaListModule) : ?>
247b1a54200SGreg Roach                                    <a href="<?= e($media_list_module->listUrl($tree)) ?>"><?= I18N::number($media[$tree->id()]) ?></a>
248b1a54200SGreg Roach                                <?php else : ?>
249b1a54200SGreg Roach                                    <?= I18N::number($media[$tree->id()]) ?>
250b1a54200SGreg Roach                                <?php endif ?>
251b1a54200SGreg Roach                            <?php else : ?>
252b1a54200SGreg Roach                                -
253b1a54200SGreg Roach                            <?php endif ?>
254b1a54200SGreg Roach                        </td>
255b1a54200SGreg Roach                        <td class="d-none d-lg-table-cell align-digits">
256b1a54200SGreg Roach                            <?php if ($notes[$tree->id()] > 0) : ?>
257b1a54200SGreg Roach                                <?php if ($note_list_module instanceof NoteListModule) : ?>
258b1a54200SGreg Roach                                    <a href="<?= e($note_list_module->listUrl($tree)) ?>"><?= I18N::number($notes[$tree->id()]) ?></a>
259b1a54200SGreg Roach                                <?php else : ?>
260b1a54200SGreg Roach                                    <?= I18N::number($notes[$tree->id()]) ?>
261b1a54200SGreg Roach                                <?php endif ?>
262b1a54200SGreg Roach                            <?php else : ?>
263b1a54200SGreg Roach                                -
264b1a54200SGreg Roach                            <?php endif ?>
265b1a54200SGreg Roach                        </td>
266b1a54200SGreg Roach                    </tr>
267b1a54200SGreg Roach                <?php endforeach ?>            </tbody>
268dd6b2bfcSGreg Roach            <tfoot>
269dd6b2bfcSGreg Roach                <tr>
270dd6b2bfcSGreg Roach                    <th scope="row">
271dd6b2bfcSGreg Roach                        <?= I18N::translate('Total') ?>
272dd6b2bfcSGreg Roach                    </th>
273dbffae50SGreg Roach                    <td class="align-digits">
274dd6b2bfcSGreg Roach                        <?= I18N::number(array_sum($changes)) ?>
275dd6b2bfcSGreg Roach                    </td>
276dbffae50SGreg Roach                    <td class="d-none d-sm-table-cell align-digits">
2772078eafaSGreg Roach                        <?= I18N::number($individuals->sum()) ?>
278dd6b2bfcSGreg Roach                    </td>
279dbffae50SGreg Roach                    <td class="d-none d-lg-table-cell align-digits">
2802078eafaSGreg Roach                        <?= I18N::number($families->sum()) ?>
281dd6b2bfcSGreg Roach                    </td>
282dbffae50SGreg Roach                    <td class="d-none d-sm-table-cell align-digits">
2832078eafaSGreg Roach                        <?= I18N::number($sources->sum()) ?>
284dd6b2bfcSGreg Roach                    </td>
285dbffae50SGreg Roach                    <td class="d-none d-lg-table-cell align-digits">
2862078eafaSGreg Roach                        <?= I18N::number($repositories->sum()) ?>
287dd6b2bfcSGreg Roach                    </td>
288dbffae50SGreg Roach                    <td class="d-none d-sm-table-cell align-digits">
2892078eafaSGreg Roach                        <?= I18N::number($media->sum()) ?>
290dd6b2bfcSGreg Roach                    </td>
291dbffae50SGreg Roach                    <td class="d-none d-lg-table-cell align-digits">
2922078eafaSGreg Roach                        <?= I18N::number($notes->sum()) ?>
293dd6b2bfcSGreg Roach                    </td>
294dd6b2bfcSGreg Roach                </tr>
295dd6b2bfcSGreg Roach            </tfoot>
296dd6b2bfcSGreg Roach        </table>
297dd6b2bfcSGreg Roach    </div>
298dd6b2bfcSGreg Roach</div>
299dd6b2bfcSGreg Roach
300dd6b2bfcSGreg Roach<!-- USERS -->
301dd6b2bfcSGreg Roach<div class="card mb-4 <?= $unapproved || $unverified ? 'card-outline-danger' : '' ?>">
302dd6b2bfcSGreg Roach    <div class="card-header">
303dd6b2bfcSGreg Roach        <h2 class="mb-0">
304dd6b2bfcSGreg Roach            <?= I18N::translate('Users') ?>
305dd6b2bfcSGreg Roach            <span class="badge badge-secondary">
306dd6b2bfcSGreg Roach                    <?= I18N::number(count($all_users)) ?>
307dd6b2bfcSGreg Roach                </span>
308dd6b2bfcSGreg Roach        </h2>
309dd6b2bfcSGreg Roach    </div>
310dd6b2bfcSGreg Roach    <div class="card-body">
311dd6b2bfcSGreg Roach        <dl class="row">
312dd6b2bfcSGreg Roach            <?php foreach ([I18N::translate('Administrators') => $administrators, I18N::translate('Managers') => $managers, I18N::translate('Moderators') => $moderators, I18N::translate('Not verified by the user') => $unverified, I18N::translate('Not approved by an administrator') => $unapproved] as $label => $list) : ?>
313dd6b2bfcSGreg Roach                <?php if (!empty($list)) : ?>
314040e7dbaSGreg Roach                    <dt class="col-sm-6">
315dd6b2bfcSGreg Roach                        <?= $label ?>
316dd6b2bfcSGreg Roach                    </dt>
317040e7dbaSGreg Roach                    <dd class="col-sm-6">
318dd6b2bfcSGreg Roach                        <?php foreach ($list as $n => $user) : ?>
319dd6b2bfcSGreg Roach                            <?= $n ? I18N::$list_separator : '' ?>
320895230eeSGreg Roach                            <a href="<?= e(route('admin-users-edit', ['user_id' => $user->id()])) ?>" dir="auto">
321e5a6b4d4SGreg Roach                                <?= e($user->realName()) ?>
322dd6b2bfcSGreg Roach                            </a>
323dd6b2bfcSGreg Roach                        <?php endforeach ?>
324040e7dbaSGreg Roach                        <?php if ($list->isEmpty()): ?>
325040e7dbaSGreg Roach326040e7dbaSGreg Roach                        <?php endif ?>
327dd6b2bfcSGreg Roach                    </dd>
328dd6b2bfcSGreg Roach                <?php endif ?>
329dd6b2bfcSGreg Roach            <?php endforeach ?>
330dd6b2bfcSGreg Roach        </dl>
331dd6b2bfcSGreg Roach
332dd6b2bfcSGreg Roach        <div class="row">
333dd6b2bfcSGreg Roach            <div class="col-sm-6">
334dd6b2bfcSGreg Roach                <ul class="fa-ul">
335dd6b2bfcSGreg Roach                    <li>
336dd6b2bfcSGreg Roach                        <span class="fa-li"><?= view('icons/preferences') ?></span>
337bf57b580SGreg Roach                        <a href="<?= e(route('admin-users')) ?>">
338dd6b2bfcSGreg Roach                            <?= I18N::translate('User administration') ?>
339dd6b2bfcSGreg Roach                        </a>
340dd6b2bfcSGreg Roach                    </li>
341dd6b2bfcSGreg Roach                    <li>
342a24f7142SGreg Roach                        <span class="fa-li"><?= view('icons/add') ?></span>
343bf57b580SGreg Roach                        <a href="<?= e(route('admin-users-create')) ?>">
344dd6b2bfcSGreg Roach                            <?= I18N::translate('Add a user') ?>
345dd6b2bfcSGreg Roach                        </a>
346dd6b2bfcSGreg Roach                    </li>
347dd6b2bfcSGreg Roach                    <li>
348a24f7142SGreg Roach                        <span class="fa-li"><?= view('icons/delete') ?></span>
3492474349cSGreg Roach                        <a href="<?= e(route(UsersCleanupPage::class)) ?>">
350dd6b2bfcSGreg Roach                            <?= I18N::translate('Delete inactive users') ?>
351dd6b2bfcSGreg Roach                        </a>
352dd6b2bfcSGreg Roach                    </li>
353dd6b2bfcSGreg Roach                    <li>
354a24f7142SGreg Roach                        <span class="fa-li"><?= view('icons/block') ?></span>
355dd6b2bfcSGreg Roach                        <a href="<?= e(route('user-page-default-edit')) ?>">
356dd6b2bfcSGreg Roach                            <?= I18N::translate('Set the default blocks for new users') ?>
357dd6b2bfcSGreg Roach                        </a>
358dd6b2bfcSGreg Roach                    </li>
359dd6b2bfcSGreg Roach                </ul>
360dd6b2bfcSGreg Roach            </div>
361dd6b2bfcSGreg Roach            <div class="col-sm-6">
362dd6b2bfcSGreg Roach                <ul class="fa-ul">
363dd6b2bfcSGreg Roach                    <li>
364dd6b2bfcSGreg Roach                        <span class="fa-li"><?= view('icons/email') ?></span>
365e381f98dSGreg Roach                        <a href="<?= e(route(BroadcastPage::class, ['to' => 'all'])) ?>">
366dd6b2bfcSGreg Roach                            <?= I18N::translate('Send a message to all users') ?>
367dd6b2bfcSGreg Roach                        </a>
368dd6b2bfcSGreg Roach                    </li>
369dd6b2bfcSGreg Roach                    <li>
370dd6b2bfcSGreg Roach                        <span class="fa-li"><?= view('icons/email') ?></span>
371e381f98dSGreg Roach                        <a href="<?= e(route(BroadcastPage::class, ['to' => 'never_logged'])) ?>">
372dd6b2bfcSGreg Roach                            <?= I18N::translate('Send a message to users who have never signed in') ?>
373dd6b2bfcSGreg Roach                        </a>
374dd6b2bfcSGreg Roach                    </li>
375dd6b2bfcSGreg Roach                    <li>
376dd6b2bfcSGreg Roach                        <span class="fa-li"><?= view('icons/email') ?></span>
377e381f98dSGreg Roach                        <a href="<?= e(route(BroadcastPage::class, ['to' => 'last_6mo'])) ?>">
378dd6b2bfcSGreg Roach                            <?= I18N::translate('Send a message to users who have not signed in for 6 months') ?>
379dd6b2bfcSGreg Roach                        </a>
380dd6b2bfcSGreg Roach                    </li>
381dd6b2bfcSGreg Roach                </ul>
382dd6b2bfcSGreg Roach            </div>
383dd6b2bfcSGreg Roach        </div>
384dd6b2bfcSGreg Roach    </div>
385dd6b2bfcSGreg Roach</div>
386dd6b2bfcSGreg Roach
387dd6b2bfcSGreg Roach<!-- MODULES -->
388dd6b2bfcSGreg Roach<div class="card mb-4">
389dd6b2bfcSGreg Roach    <div class="card-header">
390dd6b2bfcSGreg Roach        <h2 class="mb-0">
391dd6b2bfcSGreg Roach            <?= I18N::translate('Modules') ?>
3929d627a9eSGreg Roach            <?= view('components/badge', ['count' => $all_modules_enabled->count(), 'total' => $all_modules_disabled->count(), 'context' => 'secondary']) ?>
393dd6b2bfcSGreg Roach        </h2>
394dd6b2bfcSGreg Roach    </div>
3950cb66f86SGreg Roach
396dd6b2bfcSGreg Roach    <div class="card-body">
3970cb66f86SGreg Roach        <ul class="fa-ul">
3980cb66f86SGreg Roach            <li>
3999d627a9eSGreg Roach                <span class="fa-li"><?= view('icons/module') ?></span>
4000cb66f86SGreg Roach                <a href="<?= e(route('modules')) ?>">
4019d627a9eSGreg Roach                    <?= I18N::translate('All modules') ?>
4020cb66f86SGreg Roach                </a>
4039d627a9eSGreg Roach                <?= view('components/badge', ['count' => $all_modules_enabled->count(), 'total' => $all_modules_disabled->count(), 'context' => 'primary']) ?>
4040cb66f86SGreg Roach            </li>
4050cb66f86SGreg Roach        </ul>
4060cb66f86SGreg Roach
407dd6b2bfcSGreg Roach        <div class="row">
408abafa13cSGreg Roach            <div class="col-sm-4">
4099d627a9eSGreg Roach                <h3>
4109d627a9eSGreg Roach                    <?= I18N::translate('Genealogy') ?>
4119d627a9eSGreg Roach                </h3>
41209fbf3e5SGreg Roach
413dd6b2bfcSGreg Roach                <ul class="fa-ul">
414dd6b2bfcSGreg Roach                    <li>
415dd6b2bfcSGreg Roach                        <span class="fa-li"><?= view('icons/menu') ?></span>
4160cb66f86SGreg Roach                        <a href="<?= e(route('menus')) ?>">
417dd6b2bfcSGreg Roach                            <?= I18N::translate('Menus') ?>
418dd6b2bfcSGreg Roach                        </a>
4199d627a9eSGreg Roach                        <?= view('components/badge', ['count' => $menu_modules_enabled->count(), 'total' => $menu_modules_disabled->count(), 'context' => 'primary']) ?>
420dd6b2bfcSGreg Roach                    </li>
421dd6b2bfcSGreg Roach                    <li>
422dd6b2bfcSGreg Roach                        <span class="fa-li"><?= view('icons/chart') ?></span>
4230cb66f86SGreg Roach                        <a href="<?= e(route('charts')) ?>">
424dd6b2bfcSGreg Roach                            <?= I18N::translate('Charts') ?>
425dd6b2bfcSGreg Roach                        </a>
4269d627a9eSGreg Roach                        <?= view('components/badge', ['count' => $chart_modules_enabled->count(), 'total' => $chart_modules_disabled->count(), 'context' => 'primary']) ?>
427dd6b2bfcSGreg Roach                    </li>
428dd6b2bfcSGreg Roach                    <li>
42967992b6aSRichard Cissee                        <span class="fa-li"><?= view('icons/list') ?></span>
43067992b6aSRichard Cissee                        <a href="<?= e(route('lists')) ?>">
43167992b6aSRichard Cissee                            <?= I18N::translate('Lists') ?>
43267992b6aSRichard Cissee                        </a>
4339d627a9eSGreg Roach                        <?= view('components/badge', ['count' => $list_modules_enabled->count(), 'total' => $list_modules_disabled->count(), 'context' => 'primary']) ?>
43467992b6aSRichard Cissee                    </li>
43567992b6aSRichard Cissee                    <li>
436dd6b2bfcSGreg Roach                        <span class="fa-li"><?= view('icons/report') ?></span>
4370cb66f86SGreg Roach                        <a href="<?= e(route('reports')) ?>">
438dd6b2bfcSGreg Roach                            <?= I18N::translate('Reports') ?>
439dd6b2bfcSGreg Roach                        </a>
4409d627a9eSGreg Roach                        <?= view('components/badge', ['count' => $report_modules_enabled->count(), 'total' => $report_modules_disabled->count(), 'context' => 'primary']) ?>
441dd6b2bfcSGreg Roach                    </li>
4429d627a9eSGreg Roach                </ul>
44309fbf3e5SGreg Roach
4449d627a9eSGreg Roach                <h3>
4459d627a9eSGreg Roach                    <?= I18N::translate('Website') ?>
4469d627a9eSGreg Roach                </h3>
44709fbf3e5SGreg Roach
4489d627a9eSGreg Roach                <ul class="fa-ul">
44933c34396SGreg Roach                    <li>
45033c34396SGreg Roach                        <span class="fa-li"><?= view('icons/footer') ?></span>
45133c34396SGreg Roach                        <a href="<?= e(route('footers')) ?>">
45233c34396SGreg Roach                            <?= I18N::translate('Footers') ?>
45333c34396SGreg Roach                        </a>
4549d627a9eSGreg Roach                        <?= view('components/badge', ['count' => $footer_modules_enabled->count(), 'total' => $footer_modules_disabled->count(), 'context' => 'primary']) ?>
4558e5c5efeSGreg Roach                    </li>
4568e5c5efeSGreg Roach                    <li>
4578e5c5efeSGreg Roach                        <span class="fa-li"><?= view('icons/analytics') ?></span>
4588e5c5efeSGreg Roach                        <a href="<?= e(route('analytics')) ?>">
4598e5c5efeSGreg Roach                            <?= I18N::translate('Tracking and analytics') ?>
4608e5c5efeSGreg Roach                        </a>
4619d627a9eSGreg Roach                        <?= view('components/badge', ['count' => $analytics_modules_enabled->count(), 'total' => $analytics_modules_disabled->count(), 'context' => 'primary']) ?>
46233c34396SGreg Roach                    </li>
46311eb8581SGreg Roach                    <li>
46411eb8581SGreg Roach                        <span class="fa-li"><?= view('icons/theme') ?></span>
46511eb8581SGreg Roach                        <a href="<?= e(route('themes')) ?>">
46611eb8581SGreg Roach                            <?= I18N::translate('Themes') ?>
46711eb8581SGreg Roach                        </a>
4689d627a9eSGreg Roach                        <?= view('components/badge', ['count' => $theme_modules_enabled->count(), 'total' => $theme_modules_disabled->count(), 'context' => 'primary']) ?>
46911eb8581SGreg Roach                    </li>
47011eb8581SGreg Roach                    <li>
47111eb8581SGreg Roach                        <span class="fa-li"><?= view('icons/language') ?></span>
47211eb8581SGreg Roach                        <a href="<?= e(route('languages')) ?>">
47311eb8581SGreg Roach                            <?= I18N::translate('Languages') ?>
47411eb8581SGreg Roach                        </a>
4759d627a9eSGreg Roach                        <?= view('components/badge', ['count' => $language_modules_enabled->count(), 'total' => $language_modules_disabled->count(), 'context' => 'primary']) ?>
47611eb8581SGreg Roach                    </li>
477dd6b2bfcSGreg Roach                </ul>
47809fbf3e5SGreg Roach
479abafa13cSGreg Roach            </div>
480abafa13cSGreg Roach
481abafa13cSGreg Roach            <div class="col-sm-4">
482abafa13cSGreg Roach
48309fbf3e5SGreg Roach                <h3>
48409fbf3e5SGreg Roach                    <?= I18N::translate('Home page') ?>
48509fbf3e5SGreg Roach                </h3>
48609fbf3e5SGreg Roach
48709fbf3e5SGreg Roach                <ul class="fa-ul">
48809fbf3e5SGreg Roach                    <li>
48909fbf3e5SGreg Roach                        <span class="fa-li"><?= view('icons/block') ?></span>
49009fbf3e5SGreg Roach                        <a href="<?= e(route('blocks')) ?>">
49109fbf3e5SGreg Roach                            <?= I18N::translate('Blocks') ?>
49209fbf3e5SGreg Roach                        </a>
49309fbf3e5SGreg Roach                        <?= view('components/badge', ['count' => $block_modules_enabled->count(), 'total' => $block_modules_disabled->count(), 'context' => 'primary']) ?>
49409fbf3e5SGreg Roach                    </li>
49509fbf3e5SGreg Roach                </ul>
49609fbf3e5SGreg Roach
4979d627a9eSGreg Roach                <h3>
4989d627a9eSGreg Roach                    <?= I18N::translate('Individual page') ?>
4999d627a9eSGreg Roach                </h3>
50009fbf3e5SGreg Roach
5019d627a9eSGreg Roach                <ul class="fa-ul">
5029d627a9eSGreg Roach                    <li>
5039d627a9eSGreg Roach                        <span class="fa-li"><?= view('icons/tab') ?></span>
5049d627a9eSGreg Roach                        <a href="<?= e(route('tabs')) ?>">
5059d627a9eSGreg Roach                            <?= I18N::translate('Tabs') ?>
5069d627a9eSGreg Roach                            <?= view('components/badge', ['count' => $tab_modules_enabled->count(), 'total' => $tab_modules_disabled->count(), 'context' => 'primary']) ?>
5079d627a9eSGreg Roach                        </a>
5089d627a9eSGreg Roach                    </li>
5099d627a9eSGreg Roach                    <li>
5109d627a9eSGreg Roach                        <span class="fa-li"><?= view('icons/sidebar') ?></span>
5119d627a9eSGreg Roach                        <a href="<?= e(route('sidebars')) ?>">
5129d627a9eSGreg Roach                            <?= I18N::translate('Sidebars') ?>
5139d627a9eSGreg Roach                        </a>
5149d627a9eSGreg Roach                        <?= view('components/badge', ['count' => $sidebar_modules_enabled->count(), 'total' => $sidebar_modules_disabled->count(), 'context' => 'primary']) ?>
5159d627a9eSGreg Roach                    </li>
5169d627a9eSGreg Roach                    <li>
5179d627a9eSGreg Roach                        <span class="fa-li"><?= view('icons/history') ?></span>
5189d627a9eSGreg Roach                        <a href="<?= e(route('history')) ?>">
5199d627a9eSGreg Roach                            <?= I18N::translate('Historic events') ?>
5209d627a9eSGreg Roach                        </a>
5219d627a9eSGreg Roach                        <?= view('components/badge', ['count' => $history_modules_enabled->count(), 'total' => $history_modules_disabled->count(), 'context' => 'primary']) ?>
5229d627a9eSGreg Roach                    </li>
5239d627a9eSGreg Roach                </ul>
52409fbf3e5SGreg Roach
525abafa13cSGreg Roach            </div>
526abafa13cSGreg Roach
527abafa13cSGreg Roach            <div class="col-sm-4">
528abafa13cSGreg Roach
5299d627a9eSGreg Roach                <h3>
5309d627a9eSGreg Roach                    <?= I18N::translate('Other') ?>
5319d627a9eSGreg Roach                </h3>
53209fbf3e5SGreg Roach
533dd6b2bfcSGreg Roach                <ul class="fa-ul">
53409fbf3e5SGreg Roach                    <?php foreach ($other_modules as $module) : ?>
535dd6b2bfcSGreg Roach                        <li>
53609fbf3e5SGreg Roach                            <span class="fa-li"><?= view('icons/module') ?></span>
5378d6560c4SGreg Roach
5388d6560c4SGreg Roach                            <?php if ($module->isEnabled()): ?>
5398d6560c4SGreg Roach                                <?php if ($module instanceof ModuleConfigInterface): ?>
540dd6b2bfcSGreg Roach                                    <a href="<?= e($module->getConfigLink()) ?>">
54149a243cbSGreg Roach                                    <?= $module->title() ?>
54209fbf3e5SGreg Roach                                    <span class="fa"><?= view('icons/preferences') ?></span>
543dd6b2bfcSGreg Roach                                    </a>
54409fbf3e5SGreg Roach                                <?php else : ?>
5458d6560c4SGreg Roach                                    <?= $module->title() ?>
54609fbf3e5SGreg Roach                                <?php endif ?>
5478d6560c4SGreg Roach                            <?php else : ?>
5488d6560c4SGreg Roach                                <span class="text-muted">
5498d6560c4SGreg Roach                                    <span class="fa-li"><?= view('icons/module') ?></span>
5508d6560c4SGreg Roach                                     <?= $module->title() ?>
5518d6560c4SGreg Roach                                    <?php if ($module instanceof ModuleConfigInterface): ?>
5528d6560c4SGreg Roach                                        <span class="fa"><?= view('icons/preferences') ?></span>
5538d6560c4SGreg Roach                                    <?php endif ?>
5548d6560c4SGreg Roach                                    </span>
5558d6560c4SGreg Roach                                </span>
5568d6560c4SGreg Roach                            <?php endif ?>
5578d6560c4SGreg Roach
558beefaa8eSGreg Roach                            <?php if ($module instanceof ModuleCustomInterface): ?>
559beefaa8eSGreg Roach                                <?= view('admin/custom-module-info', ['module' => $module]) ?>
560beefaa8eSGreg Roach                            <?php endif ?>
561dd6b2bfcSGreg Roach                        </li>
562dd6b2bfcSGreg Roach                    <?php endforeach ?>
563dd6b2bfcSGreg Roach                </ul>
564dd6b2bfcSGreg Roach            </div>
565dd6b2bfcSGreg Roach        </div>
566dd6b2bfcSGreg Roach    </div>
567dd6b2bfcSGreg Roach</div>
568dd6b2bfcSGreg Roach
569dd6b2bfcSGreg Roach<!-- MEDIA -->
570dd6b2bfcSGreg Roach<div class="card mb-4">
571dd6b2bfcSGreg Roach    <div class="card-header">
572dd6b2bfcSGreg Roach        <h2 class="mb-0">
573dd6b2bfcSGreg Roach            <?= I18N::translate('Media') ?>
574dd6b2bfcSGreg Roach        </h2>
575dd6b2bfcSGreg Roach    </div>
576dd6b2bfcSGreg Roach    <div class="card-body">
577dd6b2bfcSGreg Roach        <ul class="fa-ul">
578dd6b2bfcSGreg Roach            <li>
579dd6b2bfcSGreg Roach                <span class="fa-li"><?= view('icons/preferences') ?></span>
580dd6b2bfcSGreg Roach                <a href="<?= e(route('admin-media')) ?>">
581dd6b2bfcSGreg Roach                    <?= I18N::translate('Manage media') ?>
582dd6b2bfcSGreg Roach                </a>
583dd6b2bfcSGreg Roach            </li>
584dd6b2bfcSGreg Roach            <li>
585a24f7142SGreg Roach                <span class="fa-li"><?= view('icons/upload') ?></span>
586dd6b2bfcSGreg Roach                <a href="<?= e(route('admin-media-upload')) ?>">
587dd6b2bfcSGreg Roach                    <?= I18N::translate('Upload media files') ?>
588dd6b2bfcSGreg Roach                </a>
589dd6b2bfcSGreg Roach            </li>
590dd6b2bfcSGreg Roach            <li>
591a24f7142SGreg Roach                <span class="fa-li"><?= view('icons/link') ?></span>
592dd6b2bfcSGreg Roach                <a href="<?= e(route('admin-fix-level-0-media')) ?>">
593dd6b2bfcSGreg Roach                    <?= I18N::translate('Link media objects to facts and events') ?>
594dd6b2bfcSGreg Roach                </a>
595dd6b2bfcSGreg Roach            </li>
596dd6b2bfcSGreg Roach            <li>
597a24f7142SGreg Roach                <span class="fa-li"><?= view('icons/upload') ?></span>
598dd6b2bfcSGreg Roach                <a href="<?= e(route('admin-webtrees1-thumbs')) ?>">
599dd6b2bfcSGreg Roach                    <?= I18N::translate('Import custom thumbnails from webtrees version 1') ?>
600dd6b2bfcSGreg Roach                </a>
601dd6b2bfcSGreg Roach            </li>
602dd6b2bfcSGreg Roach        </ul>
603dd6b2bfcSGreg Roach    </div>
604dd6b2bfcSGreg Roach</div>
605dd6b2bfcSGreg Roach
606dd6b2bfcSGreg Roach<!-- MAPS -->
607dd6b2bfcSGreg Roach<div class="card mb-4">
608dd6b2bfcSGreg Roach    <div class="card-header">
609dd6b2bfcSGreg Roach        <h2 class="mb-0">
610dd6b2bfcSGreg Roach            <?= I18N::translate('Map') ?>
611dd6b2bfcSGreg Roach        </h2>
612dd6b2bfcSGreg Roach    </div>
613dd6b2bfcSGreg Roach    <div class="card-body">
614dd6b2bfcSGreg Roach        <div class="row">
615dd6b2bfcSGreg Roach            <div class="col-sm-6">
616dd6b2bfcSGreg Roach                <ul class="fa-ul">
617dd6b2bfcSGreg Roach                    <li>
618dd6b2bfcSGreg Roach                        <span class="fa-li"><?= view('icons/location') ?></span>
619dd6b2bfcSGreg Roach                        <a href="<?= e(route('map-data')) ?>">
620dd6b2bfcSGreg Roach                            <?= I18N::translate('Geographic data') ?>
621dd6b2bfcSGreg Roach                        </a>
622dd6b2bfcSGreg Roach                    </li>
623dd6b2bfcSGreg Roach                </ul>
624dd6b2bfcSGreg Roach            </div>
625dd6b2bfcSGreg Roach            <div class="col-sm-6">
626dd6b2bfcSGreg Roach                <ul class="fa-ul">
627dd6b2bfcSGreg Roach                    <li>
628dd6b2bfcSGreg Roach                        <span class="fa-li"><?= view('icons/map') ?></span>
629dd6b2bfcSGreg Roach                        <a href="<?= e(route('map-provider')) ?>">
630dd6b2bfcSGreg Roach                            <?= I18N::translate('Map provider') ?>
631dd6b2bfcSGreg Roach                        </a>
632dd6b2bfcSGreg Roach                    </li>
633dd6b2bfcSGreg Roach                </ul>
634dd6b2bfcSGreg Roach            </div>
635dd6b2bfcSGreg Roach        </div>
636dd6b2bfcSGreg Roach    </div>
637dd6b2bfcSGreg Roach</div>
638dd6b2bfcSGreg Roach
639dd6b2bfcSGreg Roach<!-- OLD FILES -->
640dd6b2bfcSGreg Roach<?php if (!empty($files_to_delete)) : ?>
641dd6b2bfcSGreg Roach    <div class="card mb-4 card-outline-danger">
642dd6b2bfcSGreg Roach        <div class="card-header">
643dd6b2bfcSGreg Roach            <h2 class="mb-0">
644dd6b2bfcSGreg Roach                <?= I18N::translate('Old files found') ?>
645dd6b2bfcSGreg Roach            </h2>
646dd6b2bfcSGreg Roach        </div>
647dd6b2bfcSGreg Roach        <div class="card-body">
648dd6b2bfcSGreg Roach            <p>
649dd6b2bfcSGreg Roach                <?= I18N::translate('Files have been found from a previous version of webtrees. Old files can sometimes be a security risk. You should delete them.') ?>
650dd6b2bfcSGreg Roach            </p>
651dd6b2bfcSGreg Roach            <ul class="list-unstyled">
652dd6b2bfcSGreg Roach                <?php foreach ($files_to_delete as $file_to_delete) : ?>
653beefaa8eSGreg Roach                    <li dir="ltr">
654beefaa8eSGreg Roach                        <code><?= e($file_to_delete) ?></code>
655beefaa8eSGreg Roach                    </li>
656dd6b2bfcSGreg Roach                <?php endforeach ?>
657dd6b2bfcSGreg Roach            </ul>
658dd6b2bfcSGreg Roach        </div>
659dd6b2bfcSGreg Roach    </div>
660dd6b2bfcSGreg Roach<?php endif ?>
661