xref: /webtrees/resources/views/admin/control-panel.phtml (revision b9a4a6c608ac9f9f3bf6c12fbe1fbe871f30fedb)
1<?php
2
3declare(strict_types=1);
4
5use Fisharebest\Webtrees\Contracts\TimestampInterface;
6use Fisharebest\Webtrees\Http\RequestHandlers\BroadcastPage;
7use Fisharebest\Webtrees\Http\RequestHandlers\CheckForNewVersionNow;
8use Fisharebest\Webtrees\Http\RequestHandlers\CleanDataFolder;
9use Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel;
10use Fisharebest\Webtrees\Http\RequestHandlers\CreateTreePage;
11use Fisharebest\Webtrees\Http\RequestHandlers\EmailPreferencesPage;
12use Fisharebest\Webtrees\Http\RequestHandlers\FixLevel0MediaPage;
13use Fisharebest\Webtrees\Http\RequestHandlers\ImportThumbnailsPage;
14use Fisharebest\Webtrees\Http\RequestHandlers\ManageMediaPage;
15use Fisharebest\Webtrees\Http\RequestHandlers\ManageTrees;
16use Fisharebest\Webtrees\Http\RequestHandlers\MapDataList;
17use Fisharebest\Webtrees\Http\RequestHandlers\MergeTreesPage;
18use Fisharebest\Webtrees\Http\RequestHandlers\ModulesAllPage;
19use Fisharebest\Webtrees\Http\RequestHandlers\ModulesAnalyticsPage;
20use Fisharebest\Webtrees\Http\RequestHandlers\ModulesBlocksPage;
21use Fisharebest\Webtrees\Http\RequestHandlers\ModulesChartsPage;
22use Fisharebest\Webtrees\Http\RequestHandlers\ModulesDataFixesPage;
23use Fisharebest\Webtrees\Http\RequestHandlers\ModulesFootersPage;
24use Fisharebest\Webtrees\Http\RequestHandlers\ModulesHistoricEventsPage;
25use Fisharebest\Webtrees\Http\RequestHandlers\ModulesLanguagesPage;
26use Fisharebest\Webtrees\Http\RequestHandlers\ModulesListsPage;
27use Fisharebest\Webtrees\Http\RequestHandlers\ModulesMapAutocompletePage;
28use Fisharebest\Webtrees\Http\RequestHandlers\ModulesMapGeoLocationsPage;
29use Fisharebest\Webtrees\Http\RequestHandlers\ModulesMapLinksPage;
30use Fisharebest\Webtrees\Http\RequestHandlers\ModulesMapProvidersPage;
31use Fisharebest\Webtrees\Http\RequestHandlers\ModulesMenusPage;
32use Fisharebest\Webtrees\Http\RequestHandlers\ModulesReportsPage;
33use Fisharebest\Webtrees\Http\RequestHandlers\ModulesSharesPage;
34use Fisharebest\Webtrees\Http\RequestHandlers\ModulesSidebarsPage;
35use Fisharebest\Webtrees\Http\RequestHandlers\ModulesTabsPage;
36use Fisharebest\Webtrees\Http\RequestHandlers\ModulesThemesPage;
37use Fisharebest\Webtrees\Http\RequestHandlers\PendingChanges;
38use Fisharebest\Webtrees\Http\RequestHandlers\PhpInformation;
39use Fisharebest\Webtrees\Http\RequestHandlers\SiteLogsPage;
40use Fisharebest\Webtrees\Http\RequestHandlers\SitePreferencesPage;
41use Fisharebest\Webtrees\Http\RequestHandlers\SiteRegistrationPage;
42use Fisharebest\Webtrees\Http\RequestHandlers\SiteTagsPage;
43use Fisharebest\Webtrees\Http\RequestHandlers\TreePageDefaultEdit;
44use Fisharebest\Webtrees\Http\RequestHandlers\UpgradeWizardPage;
45use Fisharebest\Webtrees\Http\RequestHandlers\UploadMediaPage;
46use Fisharebest\Webtrees\Http\RequestHandlers\UserAddPage;
47use Fisharebest\Webtrees\Http\RequestHandlers\UserEditPage;
48use Fisharebest\Webtrees\Http\RequestHandlers\UserListPage;
49use Fisharebest\Webtrees\Http\RequestHandlers\UserPageDefaultEdit;
50use Fisharebest\Webtrees\Http\RequestHandlers\UsersCleanupPage;
51use Fisharebest\Webtrees\I18N;
52use Fisharebest\Webtrees\Module\FamilyListModule;
53use Fisharebest\Webtrees\Module\IndividualListModule;
54use Fisharebest\Webtrees\Module\MediaListModule;
55use Fisharebest\Webtrees\Module\ModuleAnalyticsInterface;
56use Fisharebest\Webtrees\Module\ModuleBlockInterface;
57use Fisharebest\Webtrees\Module\ModuleChartInterface;
58use Fisharebest\Webtrees\Module\ModuleConfigInterface;
59use Fisharebest\Webtrees\Module\ModuleCustomInterface;
60use Fisharebest\Webtrees\Module\ModuleDataFixInterface;
61use Fisharebest\Webtrees\Module\ModuleFooterInterface;
62use Fisharebest\Webtrees\Module\ModuleHistoricEventsInterface;
63use Fisharebest\Webtrees\Module\ModuleInterface;
64use Fisharebest\Webtrees\Module\ModuleLanguageInterface;
65use Fisharebest\Webtrees\Module\ModuleListInterface;
66use Fisharebest\Webtrees\Module\ModuleMapAutocompleteInterface;
67use Fisharebest\Webtrees\Module\ModuleMapGeoLocationInterface;
68use Fisharebest\Webtrees\Module\ModuleMapLinkInterface;
69use Fisharebest\Webtrees\Module\ModuleMapProviderInterface;
70use Fisharebest\Webtrees\Module\ModuleMenuInterface;
71use Fisharebest\Webtrees\Module\ModuleReportInterface;
72use Fisharebest\Webtrees\Module\ModuleShareInterface;
73use Fisharebest\Webtrees\Module\ModuleSidebarInterface;
74use Fisharebest\Webtrees\Module\ModuleTabInterface;
75use Fisharebest\Webtrees\Module\ModuleThemeInterface;
76use Fisharebest\Webtrees\Module\NoteListModule;
77use Fisharebest\Webtrees\Module\RepositoryListModule;
78use Fisharebest\Webtrees\Module\SourceListModule;
79use Fisharebest\Webtrees\Module\SubmitterListModule;
80use Fisharebest\Webtrees\Tree;
81use Fisharebest\Webtrees\User;
82use Fisharebest\Webtrees\Webtrees;
83use Illuminate\Support\Collection;
84
85/**
86 * @var Collection<int,User>                           $administrators
87 * @var Collection<int,ModuleInterface>                $all_modules_disabled
88 * @var Collection<int,ModuleInterface>                $all_modules_enabled
89 * @var Collection<int,Tree>                           $all_trees
90 * @var Collection<int,User>                           $all_users
91 * @var Collection<int,ModuleAnalyticsInterface>       $analytics_modules_disabled
92 * @var Collection<int,ModuleAnalyticsInterface>       $analytics_modules_enabled
93 * @var Collection<int,ModuleBlockInterface>           $block_modules_disabled
94 * @var Collection<int,ModuleBlockInterface>           $block_modules_enabled
95 * @var array<string,int>                              $changes
96 * @var Collection<int,ModuleChartInterface>           $chart_modules_disabled
97 * @var Collection<int,ModuleChartInterface>           $chart_modules_enabled
98 * @var Collection<int,ModuleCustomInterface>          $custom_updates
99 * @var Collection<int,ModuleDataFixInterface>         $data_fix_modules_disabled
100 * @var Collection<int,ModuleDataFixInterface>         $data_fix_modules_enabled
101 * @var Collection<array-key,int>                      $families
102 * @var FamilyListModule|null                          $family_list_module
103 * @var Collection<int,ModuleFooterInterface>          $footer_modules_disabled
104 * @var Collection<int,ModuleFooterInterface>          $footer_modules_enabled
105 * @var Collection<int,ModuleHistoricEventsInterface>  $history_modules_disabled
106 * @var Collection<int,ModuleHistoricEventsInterface>  $history_modules_enabled
107 * @var Collection<array-key,int>                      $individuals
108 * @var IndividualListModule|null                      $individual_list_module
109 * @var Collection<int,ModuleLanguageInterface>        $language_modules_disabled
110 * @var Collection<int,ModuleLanguageInterface>        $language_modules_enabled
111 * @var string                                         $latest_version
112 * @var string                                         $latest_version_error
113 * @var TimestampInterface                             $latest_version_timestamp
114 * @var Collection<int,ModuleListInterface>            $list_modules_disabled
115 * @var Collection<int,ModuleListInterface>            $list_modules_enabled
116 * @var Collection<int,ModuleMapLinkInterface>         $map_link_modules_disabled
117 * @var Collection<int,ModuleMapLinkInterface>         $map_link_modules_enabled
118 * @var Collection<int,ModuleMapAutocompleteInterface> $map_autocomplete_modules_disabled
119 * @var Collection<int,ModuleMapAutocompleteInterface> $map_autocomplete_modules_enabled
120 * @var Collection<int,ModuleMapProviderInterface>     $map_provider_modules_disabled
121 * @var Collection<int,ModuleMapProviderInterface>     $map_provider_modules_enabled
122 * @var Collection<int,ModuleMapGeoLocationInterface>  $map_search_modules_disabled
123 * @var Collection<int,ModuleMapGeoLocationInterface>  $map_search_modules_enabled
124 * @var Collection<int,User>                           $managers
125 * @var Collection<array-key,int>                      $media
126 * @var MediaListModule|null                           $media_list_module
127 * @var Collection<int,ModuleMenuInterface>            $menu_modules_disabled
128 * @var Collection<int,ModuleMenuInterface>            $menu_modules_enabled
129 * @var Collection<int,User>                           $moderators
130 * @var Collection<array-key,int>                      $notes
131 * @var NoteListModule|null                            $note_list_module
132 * @var Collection<int,ModuleInterface>                $other_modules
133 * @var array<string,string>                           $recipients
134 * @var Collection<int,ModuleReportInterface>          $report_modules_disabled
135 * @var Collection<int,ModuleReportInterface>          $report_modules_enabled
136 * @var Collection<array-key,int>                      $repositories
137 * @var RepositoryListModule|null                      $repository_list_module
138 * @var Collection<int,string>                         $server_errors
139 * @var Collection<int,string>                         $server_warnings
140 * @var bool                                           $show_synchronize
141 * @var Collection<int,ModuleShareInterface>           $share_modules_disabled
142 * @var Collection<int,ModuleShareInterface>           $share_modules_enabled
143 * @var Collection<int,ModuleSidebarInterface>         $sidebar_modules_disabled
144 * @var Collection<int,ModuleSidebarInterface>         $sidebar_modules_enabled
145 * @var Collection<array-key,int>                      $sources
146 * @var SourceListModule|null                          $source_list_module
147 * @var Collection<array-key,int>                      $submitters
148 * @var SubmitterListModule|null                       $submitter_list_module
149 * @var Collection<int,ModuleTabInterface>             $tab_modules_disabled
150 * @var Collection<int,ModuleTabInterface>             $tab_modules_enabled
151 * @var Collection<int,ModuleThemeInterface>           $theme_modules_disabled
152 * @var Collection<int,ModuleThemeInterface>           $theme_modules_enabled
153 * @var string                                         $title
154 * @var Collection<int,User>                           $unapproved
155 * @var Collection<int,User>                           $unverified
156 */
157
158?>
159
160<h1><?= $title ?></h1>
161
162<!-- WEBSITE / WEBTREES -->
163<div class="card mb-4">
164    <div class="card-header">
165        <h2 class="mb-0">
166            <?= I18N::translate('Website') ?>
167            <span class="badge bg-secondary" dir="ltr">
168                <?= e(Webtrees::VERSION) ?>
169            </span>
170        </h2>
171    </div>
172    <div class="card-body">
173        <?php foreach ($server_errors as $server_error) : ?>
174            <p class="alert alert-danger"><?= $server_error ?></p>
175        <?php endforeach ?>
176
177        <?php foreach ($server_warnings as $server_warning) : ?>
178            <p class="alert alert-warning"><?= $server_warning ?></p>
179        <?php endforeach ?>
180
181        <p class="card-text">
182            <?= /* I18N: %s is a URL/link to the project website */
183            I18N::translate('Support and documentation can be found at %s.', '<a href="https://webtrees.net/">webtrees.net</a>') ?>
184        </p>
185
186        <?php if ($latest_version_error !== '') : ?>
187            <p class="alert alert-danger">
188                <?= I18N::translate('There was an error checking for a new version.') ?>
189                <br>
190                <?= $latest_version_error ?>
191                <br>
192                <?= /* I18N: Last checked X hours ago. */ I18N::translate('Last checked %s.', $latest_version_timestamp->diffForHumans()) ?>
193                <a href="#" class="btn btn-primary" data-wt-post-url="<?= e(route(CheckForNewVersionNow::class)) ?>">
194                    <?= /* I18N: button label */ I18N::translate('check now') ?>
195                </a>
196            </p>
197        <?php elseif ($latest_version === '') : ?>
198            <p class="card-text">
199                <?= I18N::translate('No upgrade information is available.') ?>
200            </p>
201        <?php elseif (version_compare(Webtrees::VERSION, $latest_version) < 0) : ?>
202            <p class="card-text alert alert-info">
203                <?= I18N::translate('A new version of webtrees is available.') ?>
204                <a href="<?= e(route(UpgradeWizardPage::class)) ?>" class="alert-link">
205                    <?= /* I18N: %s is a version number */
206                    I18N::translate('Upgrade to webtrees %s.', e($latest_version)) ?>
207                </a>
208            </p>
209        <?php else : ?>
210            <p class="card-text">
211                <?= I18N::translate('This is the latest version of webtrees. No upgrade is available.') ?>
212                <?= /* I18N: Last checked X hours ago. */ I18N::translate('Last checked %s.', $latest_version_timestamp->diffForHumans()) ?>
213                <?php if ($latest_version_timestamp->timestamp() + 60 < time()) : ?>
214                    <a href="#" class="btn btn-primary" data-wt-post-url="<?= e(route(CheckForNewVersionNow::class)) ?>">
215                        <?= /* I18N: button label */ I18N::translate('check now') ?>
216                    </a>
217                <?php endif ?>
218            </p>
219        <?php endif ?>
220
221        <?php foreach ($custom_updates as $module) : ?>
222        <div class="alert alert-info">
223            <?= view('icons/information') ?>
224            <?= I18N::translate('An upgrade is available.') ?>
225            <br>
226            <?= $module->title() ?><?= e($module->customModuleVersion()) ?><?= e($module->customModuleLatestVersion()) ?>
227            <?php if ($module->customModuleSupportUrl() !== '') : ?>
228                <br>
229                <?= I18N::translate('For more information, see %s.', '<a href="' . e($module->customModuleSupportUrl()) . '">' . e($module->customModuleSupportUrl()) . '</a>') ?>
230            <?php endif ?>
231        </div>
232        <?php endforeach ?>
233
234        <div class="row">
235            <div class="col-sm">
236                <ul class="fa-ul mx-0">
237                    <li>
238                        <span class="fa-li"><?= view('icons/preferences') ?></span>
239                        <a href="<?= e(route(SitePreferencesPage::class)) ?>">
240                            <?= I18N::translate('Website preferences') ?>
241                        </a>
242                    </li>
243                    <li>
244                        <span class="fa-li"><?= view('icons/email') ?></span>
245                        <a href="<?= e(route(EmailPreferencesPage::class)) ?>">
246                            <?= I18N::translate('Sending email') ?>
247                        </a>
248                    </li>
249                    <li>
250                        <span class="fa-li"><?= view('icons/user') ?></span>
251                        <a href="<?= e(route(SiteRegistrationPage::class)) ?>">
252                            <?= I18N::translate('Sign-in and registration') ?>
253                        </a>
254                    </li>
255                </ul>
256            </div>
257            <div class="col-sm">
258                <ul class="fa-ul mx-0">
259                    <li>
260                        <span class="fa-li"><?= view('icons/list') ?></span>
261                        <a href="<?= e(route(SiteLogsPage::class)) ?>">
262                            <?= I18N::translate('Website logs') ?>
263                        </a>
264                    </li>
265                    <li>
266                        <span class="fa-li"><?= view('icons/delete') ?></span>
267                        <a href="<?= e(route(CleanDataFolder::class)) ?>">
268                            <?= I18N::translate('Clean up data folder') ?>
269                        </a>
270                    </li>
271                    <li>
272                        <span class="fa-li"><?= view('icons/server') ?></span>
273                        <a href="<?= e(route(PhpInformation::class)) ?>">
274                            <?= I18N::translate('Server information') ?>
275                        </a>
276                    </li>
277                </ul>
278            </div>
279            <div class="col-sm">
280                <ul class="fa-ul mx-0">
281                    <li>
282                        <span class="fa-li"><?= view('icons/tag') ?></span>
283                        <a href="<?= e(route(SiteTagsPage::class)) ?>">
284                            <?= I18N::translate('GEDCOM tags') ?>
285                        </a>
286                    </li>
287                </ul>
288            </div>
289        </div>
290    </div>
291</div>
292
293<!-- FAMILY TREES -->
294<div class="card mb-4 <?= array_sum($changes) ? 'card-outline-danger' : '' ?>">
295    <div class="card-header">
296        <h2 class="mb-0">
297            <?= I18N::translate('Family trees') ?>
298            <span class="badge bg-secondary">
299                    <?= I18N::number($all_trees->count()) ?>
300                </span>
301        </h2>
302    </div>
303
304    <div class="card-body">
305        <?php if ($all_trees->isEmpty()) : ?>
306            <p class="alert alert-info">
307                <?= I18N::translate('You need to create a family tree.') ?>
308            </p>
309        <?php endif ?>
310
311        <ul class="fa-ul mx-0">
312            <li>
313                <span class="fa-li"><?= view('icons/add') ?></span>
314                <a href="<?= e(route(CreateTreePage::class)) ?>">
315                    <?= I18N::translate('Create a family tree') ?>
316                </a>
317            </li>
318            <li>
319                <span class="fa-li"><?= view('icons/block') ?></span>
320                <a href="<?= e(route(TreePageDefaultEdit::class)) ?>">
321                    <?= I18N::translate('Set the default blocks for new family trees') ?>
322                </a>
323            </li>
324            <?php if (count($all_trees) > 1) : ?>
325                <li>
326                    <span class="fa-li"><?= view('icons/merge') ?></span>
327                    <a href="<?= e(route(MergeTreesPage::class)) ?>">
328                        <?= I18N::translate('Merge family trees') ?>
329                    </a>
330                </li>
331            <?php endif ?>
332        </ul>
333
334        <table class="table table-sm">
335            <caption class="visually-hidden">
336                <?= I18N::translate('Family trees') ?>
337            </caption>
338
339            <thead>
340                <tr>
341                    <th><?= I18N::translate('Family tree') ?></th>
342                    <th class="align-digits"><?= I18N::translate('Pending changes') ?></th>
343                    <th class="d-none d-sm-table-cell align-digits"><?= I18N::translate('Individuals') ?></th>
344                    <th class="d-none d-lg-table-cell align-digits"><?= I18N::translate('Families') ?></th>
345                    <th class="d-none d-sm-table-cell align-digits"><?= I18N::translate('Sources') ?></th>
346                    <th class="d-none d-lg-table-cell align-digits"><?= I18N::translate('Repositories') ?></th>
347                    <th class="d-none d-sm-table-cell align-digits"><?= I18N::translate('Media') ?></th>
348                    <th class="d-none d-lg-table-cell align-digits"><?= I18N::translate('Notes') ?></th>
349                    <th class="d-none d-lg-table-cell align-digits"><?= I18N::translate('Submitters') ?></th>
350                </tr>
351            </thead>
352
353            <tbody>
354                <?php foreach ($all_trees as $tree) : ?>
355                    <tr class="<?= $changes[$tree->id()] ? 'danger' : '' ?>">
356                        <th scope="row">
357                            <?= view('icons/preferences') ?>
358                            <a href="<?= e(route(ManageTrees::class, ['tree' => $tree->name()])) ?>">
359                                <?= e($tree->name()) ?>
360                                -
361                                <?= e($tree->title()) ?>
362                            </a>
363                        </th>
364                        <td style="text-align: right;">
365                            <?php if ($changes[$tree->id()]) : ?>
366                                <a href="<?= e(route(PendingChanges::class, ['tree' => $tree->name(), 'url' => route(ControlPanel::class)])) ?>">
367                                    <?= I18N::number($changes[$tree->id()]) ?>
368                                    <span class="visually-hidden"><?= I18N::translate('Pending changes') ?> <?= e($tree->title()) ?></span>
369                                </a>
370                            <?php else : ?>
371                                -
372                            <?php endif ?>
373                        </td>
374                        <td class="d-none d-sm-table-cell align-digits">
375                            <?php if ($individuals[$tree->id()] > 0) : ?>
376                                <?php if ($individual_list_module instanceof IndividualListModule) : ?>
377                                    <a href="<?= e($individual_list_module->listUrl($tree)) ?>"><?= I18N::number($individuals[$tree->id()]) ?></a>
378                                <?php else : ?>
379                                    <?= I18N::number($individuals[$tree->id()]) ?>
380                                <?php endif ?>
381                            <?php else : ?>
382                                -
383                            <?php endif ?>
384                        </td>
385                        <td class="d-none d-lg-table-cell align-digits">
386                            <?php if ($families[$tree->id()] > 0) : ?>
387                                <?php if ($family_list_module instanceof FamilyListModule) : ?>
388                                    <a href="<?= e($family_list_module->listUrl($tree)) ?>"><?= I18N::number($families[$tree->id()]) ?></a>
389                                <?php else : ?>
390                                    <?= I18N::number($families[$tree->id()]) ?>
391                                <?php endif ?>
392                            <?php else : ?>
393                                -
394                            <?php endif ?>
395                        </td>
396                        <td class="d-none d-sm-table-cell align-digits">
397                            <?php if ($sources[$tree->id()] > 0) : ?>
398                                <?php if ($source_list_module instanceof SourceListModule) : ?>
399                                    <a href="<?= e($source_list_module->listUrl($tree)) ?>"><?= I18N::number($sources[$tree->id()]) ?></a>
400                                <?php else : ?>
401                                    <?= I18N::number($sources[$tree->id()]) ?>
402                                <?php endif ?>
403                            <?php else : ?>
404                                -
405                            <?php endif ?>
406                        </td>
407                        <td class="d-none d-lg-table-cell align-digits">
408                            <?php if ($repositories[$tree->id()] > 0) : ?>
409                                <?php if ($repository_list_module instanceof RepositoryListModule) : ?>
410                                    <a href="<?= e($repository_list_module->listUrl($tree)) ?>"><?= I18N::number($repositories[$tree->id()]) ?></a>
411                                <?php else : ?>
412                                    <?= I18N::number($repositories[$tree->id()]) ?>
413                                <?php endif ?>
414                            <?php else : ?>
415                                -
416                            <?php endif ?>
417                        </td>
418                        <td class="d-none d-sm-table-cell align-digits">
419                            <?php if ($media[$tree->id()] > 0) : ?>
420                                <?php if ($media_list_module instanceof MediaListModule) : ?>
421                                    <a href="<?= e($media_list_module->listUrl($tree)) ?>"><?= I18N::number($media[$tree->id()]) ?></a>
422                                <?php else : ?>
423                                    <?= I18N::number($media[$tree->id()]) ?>
424                                <?php endif ?>
425                            <?php else : ?>
426                                -
427                            <?php endif ?>
428                        </td>
429                        <td class="d-none d-lg-table-cell align-digits">
430                            <?php if ($notes[$tree->id()] > 0) : ?>
431                                <?php if ($note_list_module instanceof NoteListModule) : ?>
432                                    <a href="<?= e($note_list_module->listUrl($tree)) ?>"><?= I18N::number($notes[$tree->id()]) ?></a>
433                                <?php else : ?>
434                                    <?= I18N::number($notes[$tree->id()]) ?>
435                                <?php endif ?>
436                            <?php else : ?>
437                                -
438                            <?php endif ?>
439                        </td>
440                         <td class="d-none d-lg-table-cell align-digits">
441                            <?php if ($submitters[$tree->id()] > 0) : ?>
442                                <?php if ($submitter_list_module instanceof SubmitterListModule) : ?>
443                                    <a href="<?= e($submitter_list_module->listUrl($tree)) ?>"><?= I18N::number($submitters[$tree->id()]) ?></a>
444                                <?php else : ?>
445                                    <?= I18N::number($submitters[$tree->id()]) ?>
446                                <?php endif ?>
447                            <?php else : ?>
448                                -
449                            <?php endif ?>
450                        </td>
451                    </tr>
452                <?php endforeach ?>
453            </tbody>
454
455            <tfoot>
456                <tr>
457                    <th scope="row">
458                        <?= I18N::translate('Total') ?>
459                    </th>
460                    <td class="align-digits">
461                        <?= I18N::number(array_sum($changes)) ?>
462                    </td>
463                    <td class="d-none d-sm-table-cell align-digits">
464                        <?= I18N::number($individuals->sum()) ?>
465                    </td>
466                    <td class="d-none d-lg-table-cell align-digits">
467                        <?= I18N::number($families->sum()) ?>
468                    </td>
469                    <td class="d-none d-sm-table-cell align-digits">
470                        <?= I18N::number($sources->sum()) ?>
471                    </td>
472                    <td class="d-none d-lg-table-cell align-digits">
473                        <?= I18N::number($repositories->sum()) ?>
474                    </td>
475                    <td class="d-none d-sm-table-cell align-digits">
476                        <?= I18N::number($media->sum()) ?>
477                    </td>
478                    <td class="d-none d-lg-table-cell align-digits">
479                        <?= I18N::number($notes->sum()) ?>
480                    </td>
481                    <td class="d-none d-lg-table-cell align-digits">
482                        <?= I18N::number($submitters->sum()) ?>
483                    </td>
484                </tr>
485            </tfoot>
486        </table>
487    </div>
488</div>
489
490<?php if ($show_synchronize) : ?>
491    <?= view('admin/synchronize-trees') ?>
492<?php endif ?>
493
494<!-- USERS -->
495<div class="card mb-4 <?= $unapproved || $unverified ? 'card-outline-danger' : '' ?>">
496    <div class="card-header">
497        <h2 class="mb-0">
498            <?= I18N::translate('Users') ?>
499            <span class="badge bg-secondary">
500                    <?= I18N::number(count($all_users)) ?>
501                </span>
502        </h2>
503    </div>
504    <div class="card-body">
505        <dl class="row">
506            <?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) : ?>
507                <dt class="col-sm-6">
508                    <?= $label ?>
509                </dt>
510                <dd class="col-sm-6">
511                    <?php foreach ($list as $n => $user) : ?>
512                        <?= $n ? I18N::$list_separator : '' ?>
513                        <a href="<?= e(route(UserEditPage::class, ['user_id' => $user->id()])) ?>" dir="auto">
514                            <?= e($user->realName()) ?>
515                        </a>
516                    <?php endforeach ?>
517                    <?php if ($list->isEmpty()) : ?>
518519                    <?php endif ?>
520                </dd>
521            <?php endforeach ?>
522        </dl>
523
524        <div class="row">
525            <div class="col-sm-6">
526                <ul class="fa-ul mx-0">
527                    <li>
528                        <span class="fa-li"><?= view('icons/preferences') ?></span>
529                        <a href="<?= e(route(UserListPage::class)) ?>">
530                            <?= I18N::translate('User administration') ?>
531                        </a>
532                    </li>
533                    <li>
534                        <span class="fa-li"><?= view('icons/add') ?></span>
535                        <a href="<?= e(route(UserAddPage::class)) ?>">
536                            <?= I18N::translate('Add a user') ?>
537                        </a>
538                    </li>
539                    <li>
540                        <span class="fa-li"><?= view('icons/delete') ?></span>
541                        <a href="<?= e(route(UsersCleanupPage::class)) ?>">
542                            <?= I18N::translate('Delete inactive users') ?>
543                        </a>
544                    </li>
545                    <li>
546                        <span class="fa-li"><?= view('icons/block') ?></span>
547                        <a href="<?= e(route(UserPageDefaultEdit::class)) ?>">
548                            <?= I18N::translate('Set the default blocks for new users') ?>
549                        </a>
550                    </li>
551                </ul>
552            </div>
553            <div class="col-sm-6">
554                <ul class="fa-ul mx-0">
555                    <?php foreach ($recipients as $to => $recipient) : ?>
556                    <li>
557                        <span class="fa-li"><?= view('icons/email') ?></span>
558                        <a href="<?= e(route(BroadcastPage::class, ['to' => $to])) ?>">
559                            <?= $recipient ?>
560                        </a>
561                    </li>
562                    <?php endforeach ?>
563                </ul>
564            </div>
565        </div>
566    </div>
567</div>
568
569<!-- MODULES -->
570<div class="card mb-4">
571    <div class="card-header">
572        <h2 class="mb-0">
573            <?= I18N::translate('Modules') ?>
574            <?= view('components/badge', ['count' => $all_modules_enabled->count(), 'total' => $all_modules_disabled->count(), 'context' => 'secondary']) ?>
575        </h2>
576    </div>
577
578    <div class="card-body">
579        <ul class="fa-ul mx-0">
580            <li>
581                <span class="fa-li"><?= view('icons/module') ?></span>
582                <a href="<?= e(route(ModulesAllPage::class)) ?>">
583                    <?= I18N::translate('All modules') ?>
584                </a>
585                <?= view('components/badge', ['count' => $all_modules_enabled->count(), 'total' => $all_modules_disabled->count(), 'context' => 'primary']) ?>
586            </li>
587        </ul>
588
589        <div class="row">
590            <div class="col-sm-4">
591                <h3>
592                    <?= I18N::translate('Website') ?>
593                </h3>
594
595                <ul class="fa-ul mx-0">
596                    <li>
597                        <span class="fa-li"><?= view('icons/footer') ?></span>
598                        <a href="<?= e(route(ModulesFootersPage::class)) ?>">
599                            <?= I18N::translate('Footers') ?>
600                        </a>
601                        <?= view('components/badge', ['count' => $footer_modules_enabled->count(), 'total' => $footer_modules_disabled->count(), 'context' => 'primary']) ?>
602                    </li>
603                    <li>
604                        <span class="fa-li"><?= view('icons/analytics') ?></span>
605                        <a href="<?= e(route(ModulesAnalyticsPage::class)) ?>">
606                            <?= I18N::translate('Tracking and analytics') ?>
607                        </a>
608                        <?= view('components/badge', ['count' => $analytics_modules_enabled->count(), 'total' => $analytics_modules_disabled->count(), 'context' => 'primary']) ?>
609                    </li>
610                    <li>
611                        <span class="fa-li"><?= view('icons/theme') ?></span>
612                        <a href="<?= e(route(ModulesThemesPage::class)) ?>">
613                            <?= I18N::translate('Themes') ?>
614                        </a>
615                        <?= view('components/badge', ['count' => $theme_modules_enabled->count(), 'total' => $theme_modules_disabled->count(), 'context' => 'primary']) ?>
616                    </li>
617                    <li>
618                        <span class="fa-li"><?= view('icons/language') ?></span>
619                        <a href="<?= e(route(ModulesLanguagesPage::class)) ?>">
620                            <?= I18N::translate('Languages') ?>
621                        </a>
622                        <?= view('components/badge', ['count' => $language_modules_enabled->count(), 'total' => $language_modules_disabled->count(), 'context' => 'primary']) ?>
623                    </li>
624                </ul>
625
626                <h3>
627                    <?= I18N::translate('Home page') ?>
628                </h3>
629
630                <ul class="fa-ul mx-0">
631                    <li>
632                        <span class="fa-li"><?= view('icons/block') ?></span>
633                        <a href="<?= e(route(ModulesBlocksPage::class)) ?>">
634                            <?= I18N::translate('Blocks') ?>
635                        </a>
636                        <?= view('components/badge', ['count' => $block_modules_enabled->count(), 'total' => $block_modules_disabled->count(), 'context' => 'primary']) ?>
637                    </li>
638                </ul>
639
640                <h3>
641                    <?= I18N::translate('Geographic data') ?>
642                </h3>
643
644                <ul class="fa-ul mx-0">
645                    <li>
646                        <span class="fa-li"><?= view('icons/search') ?></span>
647                        <a href="<?= e(route(ModulesMapAutocompletePage::class)) ?>">
648                            <?= /* I18N: Automatic suggestions when you type */ I18N::translate('Autocomplete') ?>
649                        </a>
650                        <?= view('components/badge', ['count' => $map_autocomplete_modules_enabled->count(), 'total' => $map_autocomplete_modules_disabled->count(), 'context' => 'primary']) ?>
651                    </li>
652                    <li>
653                        <span class="fa-li"><?= view('icons/search-location') ?></span>
654                        <a href="<?= e(route(ModulesMapGeoLocationsPage::class)) ?>">
655                            <?= /* I18N: find latitude/longitude for a place */ I18N::translate('Geolocation') ?>
656                        </a>
657                        <?= view('components/badge', ['count' => $map_search_modules_enabled->count(), 'total' => $map_search_modules_disabled->count(), 'context' => 'primary']) ?>
658                    </li>
659                    <li>
660                        <span class="fa-li"><?= view('icons/location') ?></span>
661                        <a href="<?= e(route(ModulesMapLinksPage::class)) ?>">
662                            <?= /* I18N: Links to maps */ I18N::translate('Map links') ?>
663                        </a>
664                        <?= view('components/badge', ['count' => $map_link_modules_enabled->count(), 'total' => $map_link_modules_disabled->count(), 'context' => 'primary']) ?>
665                    </li>
666                    <li>
667                        <span class="fa-li"><?= view('icons/map') ?></span>
668                        <a href="<?= e(route(ModulesMapProvidersPage::class)) ?>">
669                            <?= I18N::translate('Map providers') ?>
670                        </a>
671                        <?= view('components/badge', ['count' => $map_provider_modules_enabled->count(), 'total' => $map_provider_modules_disabled->count(), 'context' => 'primary']) ?>
672                    </li>
673                </ul>
674            </div>
675
676            <div class="col-sm-4">
677                <h3>
678                    <?= I18N::translate('Genealogy') ?>
679                </h3>
680
681                <ul class="fa-ul mx-0">
682                    <li>
683                        <span class="fa-li"><?= view('icons/menu') ?></span>
684                        <a href="<?= e(route(ModulesMenusPage::class)) ?>">
685                            <?= I18N::translate('Menus') ?>
686                        </a>
687                        <?= view('components/badge', ['count' => $menu_modules_enabled->count(), 'total' => $menu_modules_disabled->count(), 'context' => 'primary']) ?>
688                    </li>
689                    <li>
690                        <span class="fa-li"><?= view('icons/chart') ?></span>
691                        <a href="<?= e(route(ModulesChartsPage::class)) ?>">
692                            <?= I18N::translate('Charts') ?>
693                        </a>
694                        <?= view('components/badge', ['count' => $chart_modules_enabled->count(), 'total' => $chart_modules_disabled->count(), 'context' => 'primary']) ?>
695                    </li>
696                    <li>
697                        <span class="fa-li"><?= view('icons/list') ?></span>
698                        <a href="<?= e(route(ModulesListsPage::class)) ?>">
699                            <?= I18N::translate('Lists') ?>
700                        </a>
701                        <?= view('components/badge', ['count' => $list_modules_enabled->count(), 'total' => $list_modules_disabled->count(), 'context' => 'primary']) ?>
702                    </li>
703                    <li>
704                        <span class="fa-li"><?= view('icons/report') ?></span>
705                        <a href="<?= e(route(ModulesReportsPage::class)) ?>">
706                            <?= I18N::translate('Reports') ?>
707                        </a>
708                        <?= view('components/badge', ['count' => $report_modules_enabled->count(), 'total' => $report_modules_disabled->count(), 'context' => 'primary']) ?>
709                    </li>
710                    <li>
711                        <span class="fa-li"><?= view('icons/data-fix') ?></span>
712                        <a href="<?= e(route(ModulesDataFixesPage::class)) ?>">
713                            <?= I18N::translate('Data fixes') ?>
714                        </a>
715                        <?= view('components/badge', ['count' => $data_fix_modules_enabled->count(), 'total' => $data_fix_modules_disabled->count(), 'context' => 'primary']) ?>
716                    </li>
717                </ul>
718
719                <h3>
720                    <?= I18N::translate('Individual page') ?>
721                </h3>
722
723                <ul class="fa-ul mx-0">
724                    <li>
725                        <span class="fa-li"><?= view('icons/tab') ?></span>
726                        <a href="<?= e(route(ModulesTabsPage::class)) ?>">
727                            <?= I18N::translate('Tabs') ?>
728                            <?= view('components/badge', ['count' => $tab_modules_enabled->count(), 'total' => $tab_modules_disabled->count(), 'context' => 'primary']) ?>
729                        </a>
730                    </li>
731                    <li>
732                        <span class="fa-li"><?= view('icons/sidebar') ?></span>
733                        <a href="<?= e(route(ModulesSidebarsPage::class)) ?>">
734                            <?= I18N::translate('Sidebars') ?>
735                        </a>
736                        <?= view('components/badge', ['count' => $sidebar_modules_enabled->count(), 'total' => $sidebar_modules_disabled->count(), 'context' => 'primary']) ?>
737                    </li>
738                    <li>
739                        <span class="fa-li"><?= view('icons/history') ?></span>
740                        <a href="<?= e(route(ModulesHistoricEventsPage::class)) ?>">
741                            <?= I18N::translate('Historic events') ?>
742                        </a>
743                        <?= view('components/badge', ['count' => $history_modules_enabled->count(), 'total' => $history_modules_disabled->count(), 'context' => 'primary']) ?>
744                    </li>
745                    <li>
746                        <span class="fa-li"><?= view('icons/share') ?></span>
747                        <a href="<?= e(route(ModulesSharesPage::class)) ?>">
748                            <?= /* I18N: plural noun - things that can be shared */  I18N::translate('Shares') ?>
749                        </a>
750                        <?= view('components/badge', ['count' => $share_modules_enabled->count(), 'total' => $share_modules_disabled->count(), 'context' => 'primary']) ?>
751                    </li>
752                </ul>
753            </div>
754
755            <div class="col-sm-4">
756
757                <h3>
758                    <?= I18N::translate('Other') ?>
759                </h3>
760
761                <ul class="fa-ul mx-0">
762                    <?php foreach ($other_modules as $module) : ?>
763                        <li>
764                            <?php if ($module->isEnabled()) : ?>
765                                <span class="fa-li"><?= view('icons/module') ?></span>
766                                <?php if ($module instanceof ModuleConfigInterface) : ?>
767                                    <a href="<?= e($module->getConfigLink()) ?>">
768                                    <?= $module->title() ?>
769                                    <?= view('icons/preferences') ?>
770                                    </a>
771                                <?php else : ?>
772                                    <?= $module->title() ?>
773                                <?php endif ?>
774                            <?php else : ?>
775                                <span class="text-muted">
776                                    <span class="fa-li"><?= view('icons/module') ?></span>
777                                    <?= $module->title() ?>
778                                    <?php if ($module instanceof ModuleConfigInterface) : ?>
779                                        <?= view('icons/preferences') ?>
780                                    <?php endif ?>
781                                </span>
782                            <?php endif ?>
783
784                            <?php if ($module instanceof ModuleCustomInterface) : ?>
785                                <?= view('admin/custom-module-info', ['module' => $module]) ?>
786                            <?php endif ?>
787                        </li>
788                    <?php endforeach ?>
789                </ul>
790            </div>
791        </div>
792    </div>
793</div>
794
795<!-- MEDIA -->
796<div class="card mb-4">
797    <div class="card-header">
798        <h2 class="mb-0">
799            <?= I18N::translate('Media') ?>
800        </h2>
801    </div>
802    <div class="card-body">
803        <ul class="fa-ul mx-0">
804            <li>
805                <span class="fa-li"><?= view('icons/preferences') ?></span>
806                <a href="<?= e(route(ManageMediaPage::class)) ?>">
807                    <?= I18N::translate('Manage media') ?>
808                </a>
809            </li>
810            <li>
811                <span class="fa-li"><?= view('icons/upload') ?></span>
812                <a href="<?= e(route(UploadMediaPage::class)) ?>">
813                    <?= I18N::translate('Upload media files') ?>
814                </a>
815            </li>
816            <li>
817                <span class="fa-li"><?= view('icons/link') ?></span>
818                <a href="<?= e(route(FixLevel0MediaPage::class)) ?>">
819                    <?= I18N::translate('Link media objects to facts and events') ?>
820                </a>
821            </li>
822            <li>
823                <span class="fa-li"><?= view('icons/upload') ?></span>
824                <a href="<?= e(route(ImportThumbnailsPage::class)) ?>">
825                    <?= I18N::translate('Import custom thumbnails from webtrees version 1') ?>
826                </a>
827            </li>
828        </ul>
829    </div>
830</div>
831
832<!-- MAPS -->
833<div class="card mb-4">
834    <div class="card-header">
835        <h2 class="mb-0">
836            <?= I18N::translate('Map') ?>
837        </h2>
838    </div>
839    <div class="card-body">
840        <div class="row">
841            <div class="col-sm-12">
842                <ul class="fa-ul mx-0">
843                    <li>
844                        <span class="fa-li"><?= view('icons/location') ?></span>
845                        <a href="<?= e(route(MapDataList::class)) ?>">
846                            <?= I18N::translate('Geographic data') ?>
847                        </a>
848                    </li>
849                </ul>
850            </div>
851        </div>
852    </div>
853</div>
854
855<!-- OLD FILES -->
856<?php if (!empty($files_to_delete)) : ?>
857    <div class="card mb-4 card-outline-danger">
858        <div class="card-header">
859            <h2 class="mb-0">
860                <?= I18N::translate('Old files found') ?>
861            </h2>
862        </div>
863        <div class="card-body">
864            <p>
865                <?= I18N::translate('Files have been found from a previous version of webtrees. Old files can sometimes be a security risk. You should delete them.') ?>
866            </p>
867            <ul class="list-unstyled">
868                <?php foreach ($files_to_delete as $file_to_delete) : ?>
869                    <li dir="ltr">
870                        <code><?= e($file_to_delete) ?></code>
871                    </li>
872                <?php endforeach ?>
873            </ul>
874        </div>
875    </div>
876<?php endif ?>
877