xref: /webtrees/resources/views/admin/control-panel.phtml (revision b4144a6daa0ef63a3c936d7bce4cdd925efc2a2c)
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;
10*b4144a6dSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\EmailPreferencesPage;
11beefaa8eSGreg Roachuse Fisharebest\Webtrees\I18N;
12b1a54200SGreg Roachuse Fisharebest\Webtrees\Module\FamilyListModule;
13b1a54200SGreg Roachuse Fisharebest\Webtrees\Module\IndividualListModule;
14b1a54200SGreg Roachuse Fisharebest\Webtrees\Module\MediaListModule;
15beefaa8eSGreg Roachuse Fisharebest\Webtrees\Module\ModuleConfigInterface;
16beefaa8eSGreg Roachuse Fisharebest\Webtrees\Module\ModuleCustomInterface;
17b1a54200SGreg Roachuse Fisharebest\Webtrees\Module\NoteListModule;
18b1a54200SGreg Roachuse Fisharebest\Webtrees\Module\RepositoryListModule;
19b1a54200SGreg Roachuse Fisharebest\Webtrees\Module\SourceListModule;
20beefaa8eSGreg Roachuse Fisharebest\Webtrees\Webtrees;
21beefaa8eSGreg Roachuse Illuminate\Support\Collection;
22beefaa8eSGreg Roach
23beefaa8eSGreg Roach/**
24beefaa8eSGreg Roach * @var string     $latest_version
25beefaa8eSGreg Roach * @var string     $title
26beefaa8eSGreg Roach * @var Collection $server_errors
27beefaa8eSGreg Roach * @var Collection $server_warnings
28beefaa8eSGreg Roach */
29beefaa8eSGreg Roach
30beefaa8eSGreg Roach?>
31dd6b2bfcSGreg Roach
32dd6b2bfcSGreg Roach<h1><?= $title ?></h1>
33dd6b2bfcSGreg Roach
34dd6b2bfcSGreg Roach<!-- WEBSITE / WEBTREES -->
35dd6b2bfcSGreg Roach<div class="card mb-4">
36dd6b2bfcSGreg Roach    <div class="card-header">
37dd6b2bfcSGreg Roach        <h2 class="mb-0">
38dd6b2bfcSGreg Roach            <?= I18N::translate('Website') ?>
394ebbf4abSGreg Roach            <span class="badge badge-secondary" dir="ltr">
408d0ebef0SGreg Roach                <?= e(Webtrees::VERSION) ?>
41dd6b2bfcSGreg Roach            </span>
42dd6b2bfcSGreg Roach        </h2>
43dd6b2bfcSGreg Roach    </div>
44dd6b2bfcSGreg Roach    <div class="card-body">
45b7059dccSGreg Roach        <?php foreach ($server_errors as $server_error) : ?>
46b7059dccSGreg Roach            <p class="alert alert-danger"><?= $server_error ?></p>
47b7059dccSGreg Roach        <?php endforeach ?>
48b7059dccSGreg Roach
49dd6b2bfcSGreg Roach        <?php foreach ($server_warnings as $server_warning) : ?>
50dd6b2bfcSGreg Roach            <p class="alert alert-warning"><?= $server_warning ?></p>
51dd6b2bfcSGreg Roach        <?php endforeach ?>
52dd6b2bfcSGreg Roach
53dd6b2bfcSGreg Roach        <p class="card-text">
54dd6b2bfcSGreg Roach            <?= /* I18N: %s is a URL/link to the project website */
55dd6b2bfcSGreg Roach            I18N::translate('Support and documentation can be found at %s.', '<a href="https://webtrees.net/">webtrees.net</a>') ?>
56dd6b2bfcSGreg Roach        </p>
57dd6b2bfcSGreg Roach        <p class="card-text ">
58dd6b2bfcSGreg Roach            <?php if ($latest_version === '') : ?>
59dd6b2bfcSGreg Roach                <?= I18N::translate('No upgrade information is available.') ?>
608d0ebef0SGreg Roach            <?php elseif (version_compare(Webtrees::VERSION, $latest_version) < 0) : ?>
61dd6b2bfcSGreg Roach                <?= I18N::translate('A new version of webtrees is available.') ?>
62dd6b2bfcSGreg Roach                <a href="<?= e(route('upgrade')) ?>" class="error">
63dd6b2bfcSGreg Roach                    <?= /* I18N: %s is a version number */
64dd6b2bfcSGreg Roach                    I18N::translate('Upgrade to webtrees %s.', e($latest_version)) ?>
65dd6b2bfcSGreg Roach                </a>
66dd6b2bfcSGreg Roach            <?php else : ?>
67dd6b2bfcSGreg Roach                <?= I18N::translate('This is the latest version of webtrees. No upgrade is available.') ?>
68dd6b2bfcSGreg Roach            <?php endif ?>
69dd6b2bfcSGreg Roach        </p>
70dd6b2bfcSGreg Roach
71dd6b2bfcSGreg Roach        <div class="row">
72dd6b2bfcSGreg Roach            <div class="col-sm-6">
73dd6b2bfcSGreg Roach                <ul class="fa-ul">
74dd6b2bfcSGreg Roach                    <li>
75dd6b2bfcSGreg Roach                        <span class="fa-li"><?= view('icons/preferences') ?></span>
76dd6b2bfcSGreg Roach                        <a href="<?= e(route('admin-site-preferences')) ?>">
77dd6b2bfcSGreg Roach                            <?= I18N::translate('Website preferences') ?>
78dd6b2bfcSGreg Roach                        </a>
79dd6b2bfcSGreg Roach                    </li>
80dd6b2bfcSGreg Roach                    <li>
81a24f7142SGreg Roach                        <span class="fa-li"><?= view('icons/email') ?></span>
82*b4144a6dSGreg Roach                        <a href="<?= e(route(EmailPreferencesPage::class)) ?>">
83dd6b2bfcSGreg Roach                            <?= I18N::translate('Sending email') ?>
84dd6b2bfcSGreg Roach                        </a>
85dd6b2bfcSGreg Roach                    </li>
86dd6b2bfcSGreg Roach                    <li>
87a24f7142SGreg Roach                        <span class="fa-li"><?= view('icons/user') ?></span>
88dd6b2bfcSGreg Roach                        <a href="<?= e(route('admin-site-registration')) ?>">
89dd6b2bfcSGreg Roach                            <?= I18N::translate('Sign-in and registration') ?>
90dd6b2bfcSGreg Roach                        </a>
91dd6b2bfcSGreg Roach                    </li>
92dd6b2bfcSGreg Roach                </ul>
93dd6b2bfcSGreg Roach            </div>
94dd6b2bfcSGreg Roach            <div class="col-sm-6">
95dd6b2bfcSGreg Roach                <ul class="fa-ul">
96dd6b2bfcSGreg Roach                    <li>
97a24f7142SGreg Roach                        <span class="fa-li"><?= view('icons/list') ?></span>
9857bfa969SGreg Roach                        <a href="<?= e(route(SiteLogsPage::class)) ?>">
99dd6b2bfcSGreg Roach                            <?= I18N::translate('Website logs') ?>
100dd6b2bfcSGreg Roach                        </a>
101dd6b2bfcSGreg Roach                    </li>
102dd6b2bfcSGreg Roach                    <li>
103a24f7142SGreg Roach                        <span class="fa-li"><?= view('icons/delete') ?></span>
104fd6c003fSGreg Roach                        <a href="<?= e(route(CleanDataFolder::class)) ?>">
105dd6b2bfcSGreg Roach                            <?= I18N::translate('Clean up data folder') ?>
106dd6b2bfcSGreg Roach                        </a>
107dd6b2bfcSGreg Roach                    </li>
108dd6b2bfcSGreg Roach                    <li>
109a24f7142SGreg Roach                        <span class="fa-li"><?= view('icons/help') ?></span>
110b1a54200SGreg Roach                        <a href="<?= e(route(PhpInformation::class)) ?>">
111dd6b2bfcSGreg Roach                            <?= I18N::translate('Server information') ?>
112dd6b2bfcSGreg Roach                        </a>
113dd6b2bfcSGreg Roach                    </li>
114dd6b2bfcSGreg Roach                </ul>
115dd6b2bfcSGreg Roach            </div>
116dd6b2bfcSGreg Roach        </div>
117dd6b2bfcSGreg Roach    </div>
118dd6b2bfcSGreg Roach</div>
119dd6b2bfcSGreg Roach
120dd6b2bfcSGreg Roach<!-- FAMILY TREES -->
1214e73f0bdSGreg Roach<div class="card mb-4 <?= array_sum($changes) ? 'card-outline-danger' : '' ?>">
122dd6b2bfcSGreg Roach    <div class="card-header">
123dd6b2bfcSGreg Roach        <h2 class="mb-0">
124dd6b2bfcSGreg Roach            <?= I18N::translate('Family trees') ?>
125dd6b2bfcSGreg Roach            <span class="badge badge-secondary">
126dd6b2bfcSGreg Roach                    <?= I18N::number(count($all_trees)) ?>
127dd6b2bfcSGreg Roach                </span>
128dd6b2bfcSGreg Roach        </h2>
129dd6b2bfcSGreg Roach    </div>
130dd6b2bfcSGreg Roach    <div class="card-body">
131e218f363SGreg Roach        <?php if ($all_trees->isEmpty()) : ?>
132e218f363SGreg Roach            <p class="alert alert-info">
133e218f363SGreg Roach                <?= I18N::translate('You need to create a family tree.') ?>
134e218f363SGreg Roach            </p>
135e218f363SGreg Roach        <?php endif ?>
136e218f363SGreg Roach
1375afbc57aSGreg Roach        <ul class="fa-ul">
1385afbc57aSGreg Roach            <li>
1395afbc57aSGreg Roach                <span class="fa-li"><?= view('icons/add') ?></span>
1405afbc57aSGreg Roach                <a href="<?= e(route(CreateTreePage::class)) ?>">
1415afbc57aSGreg Roach                    <?= I18N::translate('Create a family tree') ?>
1425afbc57aSGreg Roach                </a>
1435afbc57aSGreg Roach            </li>
1445afbc57aSGreg Roach            <li>
1455afbc57aSGreg Roach                <span class="fa-li"><?= view('icons/block') ?></span>
1465afbc57aSGreg Roach                <a href="<?= e(route('tree-page-default-edit')) ?>">
1475afbc57aSGreg Roach                    <?= I18N::translate('Set the default blocks for new family trees') ?>
1485afbc57aSGreg Roach                </a>
1495afbc57aSGreg Roach            </li>
1505afbc57aSGreg Roach            <?php if (count($all_trees) > 1) : ?>
1515afbc57aSGreg Roach                <li>
1525afbc57aSGreg Roach                    <span class="fa-li"><?= view('icons/merge') ?></span>
1535afbc57aSGreg Roach                    <a href="<?= e(route('admin-trees-merge')) ?>">
1545afbc57aSGreg Roach                        <?= I18N::translate('Merge family trees') ?>
1555afbc57aSGreg Roach                    </a>
1565afbc57aSGreg Roach                </li>
1575afbc57aSGreg Roach            <?php endif ?>
1585afbc57aSGreg Roach        </ul>
1595afbc57aSGreg Roach
160dd6b2bfcSGreg Roach        <table class="table table-sm">
161dd6b2bfcSGreg Roach            <caption class="sr-only">
162dd6b2bfcSGreg Roach                <?= I18N::translate('Family trees') ?>
163dd6b2bfcSGreg Roach            </caption>
164dd6b2bfcSGreg Roach            <thead>
165dd6b2bfcSGreg Roach                <tr>
166dd6b2bfcSGreg Roach                    <th><?= I18N::translate('Family tree') ?></th>
167dbffae50SGreg Roach                    <th><?= I18N::translate('Pending changes') ?></th>
168dbffae50SGreg Roach                    <th class="d-none d-sm-table-cell"><?= I18N::translate('Individuals') ?></th>
169dbffae50SGreg Roach                    <th class="d-none d-lg-table-cell"><?= I18N::translate('Families') ?></th>
170dbffae50SGreg Roach                    <th class="d-none d-sm-table-cell"><?= I18N::translate('Sources') ?></th>
171dbffae50SGreg Roach                    <th class="d-none d-lg-table-cell"><?= I18N::translate('Repositories') ?></th>
172dbffae50SGreg Roach                    <th class="d-none d-sm-table-cell"><?= I18N::translate('Media') ?></th>
173dbffae50SGreg Roach                    <th class="d-none d-lg-table-cell"><?= I18N::translate('Notes') ?></th>
174dd6b2bfcSGreg Roach                </tr>
175dd6b2bfcSGreg Roach            </thead>
176dd6b2bfcSGreg Roach            <tbody>
177b1a54200SGreg Roach                <?php foreach ($all_trees as $tree) : ?>
178b1a54200SGreg Roach                    <tr class="<?= $changes[$tree->id()] ? 'danger' : '' ?>">
179b1a54200SGreg Roach                        <th scope="row">
180b1a54200SGreg Roach                            <a href="<?= e(route('manage-trees', ['tree' => $tree->name()])) ?>">
181b1a54200SGreg Roach                                <?= view('icons/preferences') ?>
182b1a54200SGreg Roach                                <?= e($tree->name()) ?>
183b1a54200SGreg Roach                                -
184b1a54200SGreg Roach                                <?= e($tree->title()) ?>
185b1a54200SGreg Roach                            </a>
186b1a54200SGreg Roach                        </th>
187b1a54200SGreg Roach                        <td style="text-align: right;">
188b1a54200SGreg Roach                            <?php if ($changes[$tree->id()]) : ?>
18922e73debSGreg Roach                                <a href="<?= e(route(PendingChanges::class, ['tree' => $tree->name(), 'url' => route(ControlPanel::class)])) ?>">
190b1a54200SGreg Roach                                    <?= I18N::number($changes[$tree->id()]) ?>
191b1a54200SGreg Roach                                    <span class="sr-only"><?= I18N::translate('Pending changes') ?> <?= e($tree->title()) ?></span>
192b1a54200SGreg Roach                                </a>
193b1a54200SGreg Roach                            <?php else : ?>
194b1a54200SGreg Roach                                -
195b1a54200SGreg Roach                            <?php endif ?>
196b1a54200SGreg Roach                        </td>
197b1a54200SGreg Roach                        <td class="d-none d-sm-table-cell align-digits">
198b1a54200SGreg Roach                            <?php if ($individuals[$tree->id()] > 0) : ?>
199b1a54200SGreg Roach                                <?php if ($individual_list_module instanceof IndividualListModule) : ?>
200b1a54200SGreg Roach                                    <a href="<?= e($individual_list_module->listUrl($tree)) ?>"><?= I18N::number($individuals[$tree->id()]) ?></a>
201b1a54200SGreg Roach                                <?php else : ?>
202b1a54200SGreg Roach                                    <?= I18N::number($individuals[$tree->id()]) ?>
203b1a54200SGreg Roach                                <?php endif ?>
204b1a54200SGreg Roach                            <?php else : ?>
205b1a54200SGreg Roach                                -
206b1a54200SGreg Roach                            <?php endif ?>
207b1a54200SGreg Roach                        </td>
208b1a54200SGreg Roach                        <td class="d-none d-lg-table-cell align-digits">
209b1a54200SGreg Roach                            <?php if ($families[$tree->id()] > 0) : ?>
210b1a54200SGreg Roach                                <?php if ($family_list_module instanceof FamilyListModule) : ?>
211b1a54200SGreg Roach                                    <a href="<?= e($family_list_module->listUrl($tree)) ?>"><?= I18N::number($families[$tree->id()]) ?></a>
212b1a54200SGreg Roach                                <?php else : ?>
213b1a54200SGreg Roach                                    <?= I18N::number($families[$tree->id()]) ?>
214b1a54200SGreg Roach                                <?php endif ?>
215b1a54200SGreg Roach                            <?php else : ?>
216b1a54200SGreg Roach                                -
217b1a54200SGreg Roach                            <?php endif ?>
218b1a54200SGreg Roach                        </td>
219b1a54200SGreg Roach                        <td class="d-none d-sm-table-cell align-digits">
220b1a54200SGreg Roach                            <?php if ($sources[$tree->id()] > 0) : ?>
221b1a54200SGreg Roach                                <?php if ($source_list_module instanceof SourceListModule) : ?>
222b1a54200SGreg Roach                                    <a href="<?= e($source_list_module->listUrl($tree)) ?>"><?= I18N::number($sources[$tree->id()]) ?></a>
223b1a54200SGreg Roach                                <?php else : ?>
224b1a54200SGreg Roach                                    <?= I18N::number($sources[$tree->id()]) ?>
225b1a54200SGreg Roach                                <?php endif ?>
226b1a54200SGreg Roach                            <?php else : ?>
227b1a54200SGreg Roach                                -
228b1a54200SGreg Roach                            <?php endif ?>
229b1a54200SGreg Roach                        </td>
230b1a54200SGreg Roach                        <td class="d-none d-lg-table-cell align-digits">
231b1a54200SGreg Roach                            <?php if ($repositories[$tree->id()] > 0) : ?>
232b1a54200SGreg Roach                                <?php if ($repository_list_module instanceof RepositoryListModule) : ?>
233b1a54200SGreg Roach                                    <a href="<?= e($repository_list_module->listUrl($tree)) ?>"><?= I18N::number($repositories[$tree->id()]) ?></a>
234b1a54200SGreg Roach                                <?php else : ?>
235b1a54200SGreg Roach                                    <?= I18N::number($repositories[$tree->id()]) ?>
236b1a54200SGreg Roach                                <?php endif ?>
237b1a54200SGreg Roach                            <?php else : ?>
238b1a54200SGreg Roach                                -
239b1a54200SGreg Roach                            <?php endif ?>
240b1a54200SGreg Roach                        </td>
241b1a54200SGreg Roach                        <td class="d-none d-sm-table-cell align-digits">
242b1a54200SGreg Roach                            <?php if ($media[$tree->id()] > 0) : ?>
243b1a54200SGreg Roach                                <?php if ($media_list_module instanceof MediaListModule) : ?>
244b1a54200SGreg Roach                                    <a href="<?= e($media_list_module->listUrl($tree)) ?>"><?= I18N::number($media[$tree->id()]) ?></a>
245b1a54200SGreg Roach                                <?php else : ?>
246b1a54200SGreg Roach                                    <?= I18N::number($media[$tree->id()]) ?>
247b1a54200SGreg Roach                                <?php endif ?>
248b1a54200SGreg Roach                            <?php else : ?>
249b1a54200SGreg Roach                                -
250b1a54200SGreg Roach                            <?php endif ?>
251b1a54200SGreg Roach                        </td>
252b1a54200SGreg Roach                        <td class="d-none d-lg-table-cell align-digits">
253b1a54200SGreg Roach                            <?php if ($notes[$tree->id()] > 0) : ?>
254b1a54200SGreg Roach                                <?php if ($note_list_module instanceof NoteListModule) : ?>
255b1a54200SGreg Roach                                    <a href="<?= e($note_list_module->listUrl($tree)) ?>"><?= I18N::number($notes[$tree->id()]) ?></a>
256b1a54200SGreg Roach                                <?php else : ?>
257b1a54200SGreg Roach                                    <?= I18N::number($notes[$tree->id()]) ?>
258b1a54200SGreg Roach                                <?php endif ?>
259b1a54200SGreg Roach                            <?php else : ?>
260b1a54200SGreg Roach                                -
261b1a54200SGreg Roach                            <?php endif ?>
262b1a54200SGreg Roach                        </td>
263b1a54200SGreg Roach                    </tr>
264b1a54200SGreg Roach                <?php endforeach ?>            </tbody>
265dd6b2bfcSGreg Roach            <tfoot>
266dd6b2bfcSGreg Roach                <tr>
267dd6b2bfcSGreg Roach                    <th scope="row">
268dd6b2bfcSGreg Roach                        <?= I18N::translate('Total') ?>
269dd6b2bfcSGreg Roach                    </th>
270dbffae50SGreg Roach                    <td class="align-digits">
271dd6b2bfcSGreg Roach                        <?= I18N::number(array_sum($changes)) ?>
272dd6b2bfcSGreg Roach                    </td>
273dbffae50SGreg Roach                    <td class="d-none d-sm-table-cell align-digits">
2742078eafaSGreg Roach                        <?= I18N::number($individuals->sum()) ?>
275dd6b2bfcSGreg Roach                    </td>
276dbffae50SGreg Roach                    <td class="d-none d-lg-table-cell align-digits">
2772078eafaSGreg Roach                        <?= I18N::number($families->sum()) ?>
278dd6b2bfcSGreg Roach                    </td>
279dbffae50SGreg Roach                    <td class="d-none d-sm-table-cell align-digits">
2802078eafaSGreg Roach                        <?= I18N::number($sources->sum()) ?>
281dd6b2bfcSGreg Roach                    </td>
282dbffae50SGreg Roach                    <td class="d-none d-lg-table-cell align-digits">
2832078eafaSGreg Roach                        <?= I18N::number($repositories->sum()) ?>
284dd6b2bfcSGreg Roach                    </td>
285dbffae50SGreg Roach                    <td class="d-none d-sm-table-cell align-digits">
2862078eafaSGreg Roach                        <?= I18N::number($media->sum()) ?>
287dd6b2bfcSGreg Roach                    </td>
288dbffae50SGreg Roach                    <td class="d-none d-lg-table-cell align-digits">
2892078eafaSGreg Roach                        <?= I18N::number($notes->sum()) ?>
290dd6b2bfcSGreg Roach                    </td>
291dd6b2bfcSGreg Roach                </tr>
292dd6b2bfcSGreg Roach            </tfoot>
293dd6b2bfcSGreg Roach        </table>
294dd6b2bfcSGreg Roach    </div>
295dd6b2bfcSGreg Roach</div>
296dd6b2bfcSGreg Roach
297dd6b2bfcSGreg Roach<!-- USERS -->
298dd6b2bfcSGreg Roach<div class="card mb-4 <?= $unapproved || $unverified ? 'card-outline-danger' : '' ?>">
299dd6b2bfcSGreg Roach    <div class="card-header">
300dd6b2bfcSGreg Roach        <h2 class="mb-0">
301dd6b2bfcSGreg Roach            <?= I18N::translate('Users') ?>
302dd6b2bfcSGreg Roach            <span class="badge badge-secondary">
303dd6b2bfcSGreg Roach                    <?= I18N::number(count($all_users)) ?>
304dd6b2bfcSGreg Roach                </span>
305dd6b2bfcSGreg Roach        </h2>
306dd6b2bfcSGreg Roach    </div>
307dd6b2bfcSGreg Roach    <div class="card-body">
308dd6b2bfcSGreg Roach        <dl class="row">
309dd6b2bfcSGreg 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) : ?>
310dd6b2bfcSGreg Roach                <?php if (!empty($list)) : ?>
311040e7dbaSGreg Roach                    <dt class="col-sm-6">
312dd6b2bfcSGreg Roach                        <?= $label ?>
313dd6b2bfcSGreg Roach                    </dt>
314040e7dbaSGreg Roach                    <dd class="col-sm-6">
315dd6b2bfcSGreg Roach                        <?php foreach ($list as $n => $user) : ?>
316dd6b2bfcSGreg Roach                            <?= $n ? I18N::$list_separator : '' ?>
317895230eeSGreg Roach                            <a href="<?= e(route('admin-users-edit', ['user_id' => $user->id()])) ?>" dir="auto">
318e5a6b4d4SGreg Roach                                <?= e($user->realName()) ?>
319dd6b2bfcSGreg Roach                            </a>
320dd6b2bfcSGreg Roach                        <?php endforeach ?>
321040e7dbaSGreg Roach                        <?php if ($list->isEmpty()): ?>
322040e7dbaSGreg Roach323040e7dbaSGreg Roach                        <?php endif ?>
324dd6b2bfcSGreg Roach                    </dd>
325dd6b2bfcSGreg Roach                <?php endif ?>
326dd6b2bfcSGreg Roach            <?php endforeach ?>
327dd6b2bfcSGreg Roach        </dl>
328dd6b2bfcSGreg Roach
329dd6b2bfcSGreg Roach        <div class="row">
330dd6b2bfcSGreg Roach            <div class="col-sm-6">
331dd6b2bfcSGreg Roach                <ul class="fa-ul">
332dd6b2bfcSGreg Roach                    <li>
333dd6b2bfcSGreg Roach                        <span class="fa-li"><?= view('icons/preferences') ?></span>
334bf57b580SGreg Roach                        <a href="<?= e(route('admin-users')) ?>">
335dd6b2bfcSGreg Roach                            <?= I18N::translate('User administration') ?>
336dd6b2bfcSGreg Roach                        </a>
337dd6b2bfcSGreg Roach                    </li>
338dd6b2bfcSGreg Roach                    <li>
339a24f7142SGreg Roach                        <span class="fa-li"><?= view('icons/add') ?></span>
340bf57b580SGreg Roach                        <a href="<?= e(route('admin-users-create')) ?>">
341dd6b2bfcSGreg Roach                            <?= I18N::translate('Add a user') ?>
342dd6b2bfcSGreg Roach                        </a>
343dd6b2bfcSGreg Roach                    </li>
344dd6b2bfcSGreg Roach                    <li>
345a24f7142SGreg Roach                        <span class="fa-li"><?= view('icons/delete') ?></span>
346dd6b2bfcSGreg Roach                        <a href="<?= e(route('admin-users-cleanup')) ?>">
347dd6b2bfcSGreg Roach                            <?= I18N::translate('Delete inactive users') ?>
348dd6b2bfcSGreg Roach                        </a>
349dd6b2bfcSGreg Roach                    </li>
350dd6b2bfcSGreg Roach                    <li>
351a24f7142SGreg Roach                        <span class="fa-li"><?= view('icons/block') ?></span>
352dd6b2bfcSGreg Roach                        <a href="<?= e(route('user-page-default-edit')) ?>">
353dd6b2bfcSGreg Roach                            <?= I18N::translate('Set the default blocks for new users') ?>
354dd6b2bfcSGreg Roach                        </a>
355dd6b2bfcSGreg Roach                    </li>
356dd6b2bfcSGreg Roach                </ul>
357dd6b2bfcSGreg Roach            </div>
358dd6b2bfcSGreg Roach            <div class="col-sm-6">
359dd6b2bfcSGreg Roach                <ul class="fa-ul">
360dd6b2bfcSGreg Roach                    <li>
361dd6b2bfcSGreg Roach                        <span class="fa-li"><?= view('icons/email') ?></span>
362e381f98dSGreg Roach                        <a href="<?= e(route(BroadcastPage::class, ['to' => 'all'])) ?>">
363dd6b2bfcSGreg Roach                            <?= I18N::translate('Send a message to all users') ?>
364dd6b2bfcSGreg Roach                        </a>
365dd6b2bfcSGreg Roach                    </li>
366dd6b2bfcSGreg Roach                    <li>
367dd6b2bfcSGreg Roach                        <span class="fa-li"><?= view('icons/email') ?></span>
368e381f98dSGreg Roach                        <a href="<?= e(route(BroadcastPage::class, ['to' => 'never_logged'])) ?>">
369dd6b2bfcSGreg Roach                            <?= I18N::translate('Send a message to users who have never signed in') ?>
370dd6b2bfcSGreg Roach                        </a>
371dd6b2bfcSGreg Roach                    </li>
372dd6b2bfcSGreg Roach                    <li>
373dd6b2bfcSGreg Roach                        <span class="fa-li"><?= view('icons/email') ?></span>
374e381f98dSGreg Roach                        <a href="<?= e(route(BroadcastPage::class, ['to' => 'last_6mo'])) ?>">
375dd6b2bfcSGreg Roach                            <?= I18N::translate('Send a message to users who have not signed in for 6 months') ?>
376dd6b2bfcSGreg Roach                        </a>
377dd6b2bfcSGreg Roach                    </li>
378dd6b2bfcSGreg Roach                </ul>
379dd6b2bfcSGreg Roach            </div>
380dd6b2bfcSGreg Roach        </div>
381dd6b2bfcSGreg Roach    </div>
382dd6b2bfcSGreg Roach</div>
383dd6b2bfcSGreg Roach
384dd6b2bfcSGreg Roach<!-- MODULES -->
385dd6b2bfcSGreg Roach<div class="card mb-4">
386dd6b2bfcSGreg Roach    <div class="card-header">
387dd6b2bfcSGreg Roach        <h2 class="mb-0">
388dd6b2bfcSGreg Roach            <?= I18N::translate('Modules') ?>
3899d627a9eSGreg Roach            <?= view('components/badge', ['count' => $all_modules_enabled->count(), 'total' => $all_modules_disabled->count(), 'context' => 'secondary']) ?>
390dd6b2bfcSGreg Roach        </h2>
391dd6b2bfcSGreg Roach    </div>
3920cb66f86SGreg Roach
393dd6b2bfcSGreg Roach    <div class="card-body">
3940cb66f86SGreg Roach        <ul class="fa-ul">
3950cb66f86SGreg Roach            <li>
3969d627a9eSGreg Roach                <span class="fa-li"><?= view('icons/module') ?></span>
3970cb66f86SGreg Roach                <a href="<?= e(route('modules')) ?>">
3989d627a9eSGreg Roach                    <?= I18N::translate('All modules') ?>
3990cb66f86SGreg Roach                </a>
4009d627a9eSGreg Roach                <?= view('components/badge', ['count' => $all_modules_enabled->count(), 'total' => $all_modules_disabled->count(), 'context' => 'primary']) ?>
4010cb66f86SGreg Roach            </li>
4020cb66f86SGreg Roach        </ul>
4030cb66f86SGreg Roach
404dd6b2bfcSGreg Roach        <div class="row">
405abafa13cSGreg Roach            <div class="col-sm-4">
4069d627a9eSGreg Roach                <h3>
4079d627a9eSGreg Roach                    <?= I18N::translate('Genealogy') ?>
4089d627a9eSGreg Roach                </h3>
40909fbf3e5SGreg Roach
410dd6b2bfcSGreg Roach                <ul class="fa-ul">
411dd6b2bfcSGreg Roach                    <li>
412dd6b2bfcSGreg Roach                        <span class="fa-li"><?= view('icons/menu') ?></span>
4130cb66f86SGreg Roach                        <a href="<?= e(route('menus')) ?>">
414dd6b2bfcSGreg Roach                            <?= I18N::translate('Menus') ?>
415dd6b2bfcSGreg Roach                        </a>
4169d627a9eSGreg Roach                        <?= view('components/badge', ['count' => $menu_modules_enabled->count(), 'total' => $menu_modules_disabled->count(), 'context' => 'primary']) ?>
417dd6b2bfcSGreg Roach                    </li>
418dd6b2bfcSGreg Roach                    <li>
419dd6b2bfcSGreg Roach                        <span class="fa-li"><?= view('icons/chart') ?></span>
4200cb66f86SGreg Roach                        <a href="<?= e(route('charts')) ?>">
421dd6b2bfcSGreg Roach                            <?= I18N::translate('Charts') ?>
422dd6b2bfcSGreg Roach                        </a>
4239d627a9eSGreg Roach                        <?= view('components/badge', ['count' => $chart_modules_enabled->count(), 'total' => $chart_modules_disabled->count(), 'context' => 'primary']) ?>
424dd6b2bfcSGreg Roach                    </li>
425dd6b2bfcSGreg Roach                    <li>
42667992b6aSRichard Cissee                        <span class="fa-li"><?= view('icons/list') ?></span>
42767992b6aSRichard Cissee                        <a href="<?= e(route('lists')) ?>">
42867992b6aSRichard Cissee                            <?= I18N::translate('Lists') ?>
42967992b6aSRichard Cissee                        </a>
4309d627a9eSGreg Roach                        <?= view('components/badge', ['count' => $list_modules_enabled->count(), 'total' => $list_modules_disabled->count(), 'context' => 'primary']) ?>
43167992b6aSRichard Cissee                    </li>
43267992b6aSRichard Cissee                    <li>
433dd6b2bfcSGreg Roach                        <span class="fa-li"><?= view('icons/report') ?></span>
4340cb66f86SGreg Roach                        <a href="<?= e(route('reports')) ?>">
435dd6b2bfcSGreg Roach                            <?= I18N::translate('Reports') ?>
436dd6b2bfcSGreg Roach                        </a>
4379d627a9eSGreg Roach                        <?= view('components/badge', ['count' => $report_modules_enabled->count(), 'total' => $report_modules_disabled->count(), 'context' => 'primary']) ?>
438dd6b2bfcSGreg Roach                    </li>
4399d627a9eSGreg Roach                </ul>
44009fbf3e5SGreg Roach
4419d627a9eSGreg Roach                <h3>
4429d627a9eSGreg Roach                    <?= I18N::translate('Website') ?>
4439d627a9eSGreg Roach                </h3>
44409fbf3e5SGreg Roach
4459d627a9eSGreg Roach                <ul class="fa-ul">
44633c34396SGreg Roach                    <li>
44733c34396SGreg Roach                        <span class="fa-li"><?= view('icons/footer') ?></span>
44833c34396SGreg Roach                        <a href="<?= e(route('footers')) ?>">
44933c34396SGreg Roach                            <?= I18N::translate('Footers') ?>
45033c34396SGreg Roach                        </a>
4519d627a9eSGreg Roach                        <?= view('components/badge', ['count' => $footer_modules_enabled->count(), 'total' => $footer_modules_disabled->count(), 'context' => 'primary']) ?>
4528e5c5efeSGreg Roach                    </li>
4538e5c5efeSGreg Roach                    <li>
4548e5c5efeSGreg Roach                        <span class="fa-li"><?= view('icons/analytics') ?></span>
4558e5c5efeSGreg Roach                        <a href="<?= e(route('analytics')) ?>">
4568e5c5efeSGreg Roach                            <?= I18N::translate('Tracking and analytics') ?>
4578e5c5efeSGreg Roach                        </a>
4589d627a9eSGreg Roach                        <?= view('components/badge', ['count' => $analytics_modules_enabled->count(), 'total' => $analytics_modules_disabled->count(), 'context' => 'primary']) ?>
45933c34396SGreg Roach                    </li>
46011eb8581SGreg Roach                    <li>
46111eb8581SGreg Roach                        <span class="fa-li"><?= view('icons/theme') ?></span>
46211eb8581SGreg Roach                        <a href="<?= e(route('themes')) ?>">
46311eb8581SGreg Roach                            <?= I18N::translate('Themes') ?>
46411eb8581SGreg Roach                        </a>
4659d627a9eSGreg Roach                        <?= view('components/badge', ['count' => $theme_modules_enabled->count(), 'total' => $theme_modules_disabled->count(), 'context' => 'primary']) ?>
46611eb8581SGreg Roach                    </li>
46711eb8581SGreg Roach                    <li>
46811eb8581SGreg Roach                        <span class="fa-li"><?= view('icons/language') ?></span>
46911eb8581SGreg Roach                        <a href="<?= e(route('languages')) ?>">
47011eb8581SGreg Roach                            <?= I18N::translate('Languages') ?>
47111eb8581SGreg Roach                        </a>
4729d627a9eSGreg Roach                        <?= view('components/badge', ['count' => $language_modules_enabled->count(), 'total' => $language_modules_disabled->count(), 'context' => 'primary']) ?>
47311eb8581SGreg Roach                    </li>
474dd6b2bfcSGreg Roach                </ul>
47509fbf3e5SGreg Roach
476abafa13cSGreg Roach            </div>
477abafa13cSGreg Roach
478abafa13cSGreg Roach            <div class="col-sm-4">
479abafa13cSGreg Roach
48009fbf3e5SGreg Roach                <h3>
48109fbf3e5SGreg Roach                    <?= I18N::translate('Home page') ?>
48209fbf3e5SGreg Roach                </h3>
48309fbf3e5SGreg Roach
48409fbf3e5SGreg Roach                <ul class="fa-ul">
48509fbf3e5SGreg Roach                    <li>
48609fbf3e5SGreg Roach                        <span class="fa-li"><?= view('icons/block') ?></span>
48709fbf3e5SGreg Roach                        <a href="<?= e(route('blocks')) ?>">
48809fbf3e5SGreg Roach                            <?= I18N::translate('Blocks') ?>
48909fbf3e5SGreg Roach                        </a>
49009fbf3e5SGreg Roach                        <?= view('components/badge', ['count' => $block_modules_enabled->count(), 'total' => $block_modules_disabled->count(), 'context' => 'primary']) ?>
49109fbf3e5SGreg Roach                    </li>
49209fbf3e5SGreg Roach                </ul>
49309fbf3e5SGreg Roach
4949d627a9eSGreg Roach                <h3>
4959d627a9eSGreg Roach                    <?= I18N::translate('Individual page') ?>
4969d627a9eSGreg Roach                </h3>
49709fbf3e5SGreg Roach
4989d627a9eSGreg Roach                <ul class="fa-ul">
4999d627a9eSGreg Roach                    <li>
5009d627a9eSGreg Roach                        <span class="fa-li"><?= view('icons/tab') ?></span>
5019d627a9eSGreg Roach                        <a href="<?= e(route('tabs')) ?>">
5029d627a9eSGreg Roach                            <?= I18N::translate('Tabs') ?>
5039d627a9eSGreg Roach                            <?= view('components/badge', ['count' => $tab_modules_enabled->count(), 'total' => $tab_modules_disabled->count(), 'context' => 'primary']) ?>
5049d627a9eSGreg Roach                        </a>
5059d627a9eSGreg Roach                    </li>
5069d627a9eSGreg Roach                    <li>
5079d627a9eSGreg Roach                        <span class="fa-li"><?= view('icons/sidebar') ?></span>
5089d627a9eSGreg Roach                        <a href="<?= e(route('sidebars')) ?>">
5099d627a9eSGreg Roach                            <?= I18N::translate('Sidebars') ?>
5109d627a9eSGreg Roach                        </a>
5119d627a9eSGreg Roach                        <?= view('components/badge', ['count' => $sidebar_modules_enabled->count(), 'total' => $sidebar_modules_disabled->count(), 'context' => 'primary']) ?>
5129d627a9eSGreg Roach                    </li>
5139d627a9eSGreg Roach                    <li>
5149d627a9eSGreg Roach                        <span class="fa-li"><?= view('icons/history') ?></span>
5159d627a9eSGreg Roach                        <a href="<?= e(route('history')) ?>">
5169d627a9eSGreg Roach                            <?= I18N::translate('Historic events') ?>
5179d627a9eSGreg Roach                        </a>
5189d627a9eSGreg Roach                        <?= view('components/badge', ['count' => $history_modules_enabled->count(), 'total' => $history_modules_disabled->count(), 'context' => 'primary']) ?>
5199d627a9eSGreg Roach                    </li>
5209d627a9eSGreg Roach                </ul>
52109fbf3e5SGreg Roach
522abafa13cSGreg Roach            </div>
523abafa13cSGreg Roach
524abafa13cSGreg Roach            <div class="col-sm-4">
525abafa13cSGreg Roach
5269d627a9eSGreg Roach                <h3>
5279d627a9eSGreg Roach                    <?= I18N::translate('Other') ?>
5289d627a9eSGreg Roach                </h3>
52909fbf3e5SGreg Roach
530dd6b2bfcSGreg Roach                <ul class="fa-ul">
53109fbf3e5SGreg Roach                    <?php foreach ($other_modules as $module) : ?>
532dd6b2bfcSGreg Roach                        <li>
53309fbf3e5SGreg Roach                            <span class="fa-li"><?= view('icons/module') ?></span>
5348d6560c4SGreg Roach
5358d6560c4SGreg Roach                            <?php if ($module->isEnabled()): ?>
5368d6560c4SGreg Roach                                <?php if ($module instanceof ModuleConfigInterface): ?>
537dd6b2bfcSGreg Roach                                    <a href="<?= e($module->getConfigLink()) ?>">
53849a243cbSGreg Roach                                    <?= $module->title() ?>
53909fbf3e5SGreg Roach                                    <span class="fa"><?= view('icons/preferences') ?></span>
540dd6b2bfcSGreg Roach                                    </a>
54109fbf3e5SGreg Roach                                <?php else : ?>
5428d6560c4SGreg Roach                                    <?= $module->title() ?>
54309fbf3e5SGreg Roach                                <?php endif ?>
5448d6560c4SGreg Roach                            <?php else : ?>
5458d6560c4SGreg Roach                                <span class="text-muted">
5468d6560c4SGreg Roach                                    <span class="fa-li"><?= view('icons/module') ?></span>
5478d6560c4SGreg Roach                                     <?= $module->title() ?>
5488d6560c4SGreg Roach                                    <?php if ($module instanceof ModuleConfigInterface): ?>
5498d6560c4SGreg Roach                                        <span class="fa"><?= view('icons/preferences') ?></span>
5508d6560c4SGreg Roach                                    <?php endif ?>
5518d6560c4SGreg Roach                                    </span>
5528d6560c4SGreg Roach                                </span>
5538d6560c4SGreg Roach                            <?php endif ?>
5548d6560c4SGreg Roach
555beefaa8eSGreg Roach                            <?php if ($module instanceof ModuleCustomInterface): ?>
556beefaa8eSGreg Roach                                <?= view('admin/custom-module-info', ['module' => $module]) ?>
557beefaa8eSGreg Roach                            <?php endif ?>
558dd6b2bfcSGreg Roach                        </li>
559dd6b2bfcSGreg Roach                    <?php endforeach ?>
560dd6b2bfcSGreg Roach                </ul>
561dd6b2bfcSGreg Roach            </div>
562dd6b2bfcSGreg Roach        </div>
563dd6b2bfcSGreg Roach    </div>
564dd6b2bfcSGreg Roach</div>
565dd6b2bfcSGreg Roach
566dd6b2bfcSGreg Roach<!-- MEDIA -->
567dd6b2bfcSGreg Roach<div class="card mb-4">
568dd6b2bfcSGreg Roach    <div class="card-header">
569dd6b2bfcSGreg Roach        <h2 class="mb-0">
570dd6b2bfcSGreg Roach            <?= I18N::translate('Media') ?>
571dd6b2bfcSGreg Roach        </h2>
572dd6b2bfcSGreg Roach    </div>
573dd6b2bfcSGreg Roach    <div class="card-body">
574dd6b2bfcSGreg Roach        <ul class="fa-ul">
575dd6b2bfcSGreg Roach            <li>
576dd6b2bfcSGreg Roach                <span class="fa-li"><?= view('icons/preferences') ?></span>
577dd6b2bfcSGreg Roach                <a href="<?= e(route('admin-media')) ?>">
578dd6b2bfcSGreg Roach                    <?= I18N::translate('Manage media') ?>
579dd6b2bfcSGreg Roach                </a>
580dd6b2bfcSGreg Roach            </li>
581dd6b2bfcSGreg Roach            <li>
582a24f7142SGreg Roach                <span class="fa-li"><?= view('icons/upload') ?></span>
583dd6b2bfcSGreg Roach                <a href="<?= e(route('admin-media-upload')) ?>">
584dd6b2bfcSGreg Roach                    <?= I18N::translate('Upload media files') ?>
585dd6b2bfcSGreg Roach                </a>
586dd6b2bfcSGreg Roach            </li>
587dd6b2bfcSGreg Roach            <li>
588a24f7142SGreg Roach                <span class="fa-li"><?= view('icons/link') ?></span>
589dd6b2bfcSGreg Roach                <a href="<?= e(route('admin-fix-level-0-media')) ?>">
590dd6b2bfcSGreg Roach                    <?= I18N::translate('Link media objects to facts and events') ?>
591dd6b2bfcSGreg Roach                </a>
592dd6b2bfcSGreg Roach            </li>
593dd6b2bfcSGreg Roach            <li>
594a24f7142SGreg Roach                <span class="fa-li"><?= view('icons/upload') ?></span>
595dd6b2bfcSGreg Roach                <a href="<?= e(route('admin-webtrees1-thumbs')) ?>">
596dd6b2bfcSGreg Roach                    <?= I18N::translate('Import custom thumbnails from webtrees version 1') ?>
597dd6b2bfcSGreg Roach                </a>
598dd6b2bfcSGreg Roach            </li>
599dd6b2bfcSGreg Roach        </ul>
600dd6b2bfcSGreg Roach    </div>
601dd6b2bfcSGreg Roach</div>
602dd6b2bfcSGreg Roach
603dd6b2bfcSGreg Roach<!-- MAPS -->
604dd6b2bfcSGreg Roach<div class="card mb-4">
605dd6b2bfcSGreg Roach    <div class="card-header">
606dd6b2bfcSGreg Roach        <h2 class="mb-0">
607dd6b2bfcSGreg Roach            <?= I18N::translate('Map') ?>
608dd6b2bfcSGreg Roach        </h2>
609dd6b2bfcSGreg Roach    </div>
610dd6b2bfcSGreg Roach    <div class="card-body">
611dd6b2bfcSGreg Roach        <div class="row">
612dd6b2bfcSGreg Roach            <div class="col-sm-6">
613dd6b2bfcSGreg Roach                <ul class="fa-ul">
614dd6b2bfcSGreg Roach                    <li>
615dd6b2bfcSGreg Roach                        <span class="fa-li"><?= view('icons/location') ?></span>
616dd6b2bfcSGreg Roach                        <a href="<?= e(route('map-data')) ?>">
617dd6b2bfcSGreg Roach                            <?= I18N::translate('Geographic data') ?>
618dd6b2bfcSGreg Roach                        </a>
619dd6b2bfcSGreg Roach                    </li>
620dd6b2bfcSGreg Roach                </ul>
621dd6b2bfcSGreg Roach            </div>
622dd6b2bfcSGreg Roach            <div class="col-sm-6">
623dd6b2bfcSGreg Roach                <ul class="fa-ul">
624dd6b2bfcSGreg Roach                    <li>
625dd6b2bfcSGreg Roach                        <span class="fa-li"><?= view('icons/map') ?></span>
626dd6b2bfcSGreg Roach                        <a href="<?= e(route('map-provider')) ?>">
627dd6b2bfcSGreg Roach                            <?= I18N::translate('Map provider') ?>
628dd6b2bfcSGreg Roach                        </a>
629dd6b2bfcSGreg Roach                    </li>
630dd6b2bfcSGreg Roach                </ul>
631dd6b2bfcSGreg Roach            </div>
632dd6b2bfcSGreg Roach        </div>
633dd6b2bfcSGreg Roach    </div>
634dd6b2bfcSGreg Roach</div>
635dd6b2bfcSGreg Roach
636dd6b2bfcSGreg Roach<!-- OLD FILES -->
637dd6b2bfcSGreg Roach<?php if (!empty($files_to_delete)) : ?>
638dd6b2bfcSGreg Roach    <div class="card mb-4 card-outline-danger">
639dd6b2bfcSGreg Roach        <div class="card-header">
640dd6b2bfcSGreg Roach            <h2 class="mb-0">
641dd6b2bfcSGreg Roach                <?= I18N::translate('Old files found') ?>
642dd6b2bfcSGreg Roach            </h2>
643dd6b2bfcSGreg Roach        </div>
644dd6b2bfcSGreg Roach        <div class="card-body">
645dd6b2bfcSGreg Roach            <p>
646dd6b2bfcSGreg 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.') ?>
647dd6b2bfcSGreg Roach            </p>
648dd6b2bfcSGreg Roach            <ul class="list-unstyled">
649dd6b2bfcSGreg Roach                <?php foreach ($files_to_delete as $file_to_delete) : ?>
650beefaa8eSGreg Roach                    <li dir="ltr">
651beefaa8eSGreg Roach                        <code><?= e($file_to_delete) ?></code>
652beefaa8eSGreg Roach                    </li>
653dd6b2bfcSGreg Roach                <?php endforeach ?>
654dd6b2bfcSGreg Roach            </ul>
655dd6b2bfcSGreg Roach        </div>
656dd6b2bfcSGreg Roach    </div>
657dd6b2bfcSGreg Roach<?php endif ?>
658