1dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\Bootstrap4; ?> 2dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\I18N; ?> 39e5cb8c9SGreg Roach<?php use Fisharebest\Webtrees\Module\ModuleAnalyticsInterface; ?> 4dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\Module\ModuleBlockInterface; ?> 5dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\Module\ModuleChartInterface; ?> 6dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\Module\ModuleConfigInterface; ?> 79cad7645SGreg Roach<?php use Fisharebest\Webtrees\Module\ModuleCustomInterface; ?> 88e5c5efeSGreg Roach<?php use Fisharebest\Webtrees\Module\ModuleExternalUrlInterface; ?> 933c34396SGreg Roach<?php use Fisharebest\Webtrees\Module\ModuleFooterInterface; ?> 10f3244202SGreg Roach<?php use Fisharebest\Webtrees\Module\ModuleHistoricEventsInterface; ?> 1111eb8581SGreg Roach<?php use Fisharebest\Webtrees\Module\ModuleLanguageInterface; ?> 1267992b6aSRichard Cissee<?php use Fisharebest\Webtrees\Module\ModuleListInterface; ?> 13dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\Module\ModuleMenuInterface; ?> 14dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\Module\ModuleReportInterface; ?> 15dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\Module\ModuleSidebarInterface; ?> 16dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\Module\ModuleTabInterface; ?> 17dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\Module\ModuleThemeInterface; ?> 18dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\View; ?> 19dd6b2bfcSGreg Roach 20dd6b2bfcSGreg Roach<?= view('components/breadcrumbs', ['links' => [route('admin-control-panel') => I18N::translate('Control panel'), $title]]) ?> 21dd6b2bfcSGreg Roach 22dd6b2bfcSGreg Roach<h1><?= $title ?></h1> 23dd6b2bfcSGreg Roach 24dd6b2bfcSGreg Roach<?php foreach ($deleted_modules as $module_name) : ?> 25dd6b2bfcSGreg Roach <div class="alert alert-warning" role="alert"> 26244d9cdfSGreg Roach <form action="<?= e(route('delete-module-settings')) ?>" class="form-inline" method="POST"> 27dd6b2bfcSGreg Roach <?= csrf_field() ?> 28dd6b2bfcSGreg Roach <input type="hidden" name="module_name" value="<?= $module_name ?>"> 29dd6b2bfcSGreg Roach <?= I18N::translate('Preferences exist for the module “%s”, but this module no longer exists.', $module_name) ?> 3097c22350SGreg Roach <button type="submit" class="btn btn-secondary"> 31dd6b2bfcSGreg Roach <?= I18N::translate('Delete the preferences for this module.') ?> 32dd6b2bfcSGreg Roach </button> 33dd6b2bfcSGreg Roach </form> 34dd6b2bfcSGreg Roach </div> 35dd6b2bfcSGreg Roach<?php endforeach ?> 36dd6b2bfcSGreg Roach 37*8d6560c4SGreg Roach<form method="post"> 38dd6b2bfcSGreg Roach <input type="hidden" name="route" value="admin-update-module-status"> 39dd6b2bfcSGreg Roach <?= csrf_field() ?> 4049d6539eSGreg Roach <table class="table table-bordered table-hover table-sm table-module-administration" data-info="false" data-paging="false" data-state-save="true" data-filter="false"> 41dd6b2bfcSGreg Roach <caption class="sr-only"> 42dd6b2bfcSGreg Roach <?= I18N::translate('Module administration') ?> 43dd6b2bfcSGreg Roach </caption> 44dd6b2bfcSGreg Roach <thead> 45dd6b2bfcSGreg Roach <tr> 46dd6b2bfcSGreg Roach <th> 47dd6b2bfcSGreg Roach <?= I18N::translate('Module') ?> 48dd6b2bfcSGreg Roach </th> 49dd6b2bfcSGreg Roach <th> 50dd6b2bfcSGreg Roach <?= I18N::translate('Enabled') ?> 51dd6b2bfcSGreg Roach </th> 520cb66f86SGreg Roach <th data-orderable="false"> 53dd6b2bfcSGreg Roach <?= I18N::translate('Description') ?> 54dd6b2bfcSGreg Roach </th> 550cb66f86SGreg Roach <th title="<?= I18N::translate('Preferences') ?>"> 560cb66f86SGreg Roach <?= view('icons/preferences') ?> 570cb66f86SGreg Roach <span class="sr-only"><?= I18N::translate('Preferences') ?></span> 58dd6b2bfcSGreg Roach </th> 590cb66f86SGreg Roach <th title="<?= I18N::translate('Menus') ?>"> 600cb66f86SGreg Roach <?= view('icons/menu') ?> 610cb66f86SGreg Roach <span class="sr-only"><?= I18N::translate('Menus') ?></span> 62dd6b2bfcSGreg Roach </th> 630cb66f86SGreg Roach <th title="<?= I18N::translate('Tabs') ?>"> 640cb66f86SGreg Roach <?= view('icons/tab') ?> 650cb66f86SGreg Roach <span class="sr-only"><?= I18N::translate('Tabs') ?></span> 66dd6b2bfcSGreg Roach </th> 670cb66f86SGreg Roach <th title="<?= I18N::translate('Sidebars') ?>"> 680cb66f86SGreg Roach <?= view('icons/sidebar') ?> 690cb66f86SGreg Roach <span class="sr-only"><?= I18N::translate('Sidebars') ?></span> 70dd6b2bfcSGreg Roach </th> 710cb66f86SGreg Roach <th title="<?= I18N::translate('Blocks') ?>"> 720cb66f86SGreg Roach <?= view('icons/block') ?> 730cb66f86SGreg Roach <span class="sr-only"><?= I18N::translate('Blocks') ?></span> 74dd6b2bfcSGreg Roach </th> 750cb66f86SGreg Roach <th title="<?= I18N::translate('Charts') ?>"> 760cb66f86SGreg Roach <?= view('icons/chart') ?> 770cb66f86SGreg Roach <span class="sr-only"><?= I18N::translate('Charts') ?></span> 78dd6b2bfcSGreg Roach </th> 7967992b6aSRichard Cissee <th title="<?= I18N::translate('Lists') ?>"> 8067992b6aSRichard Cissee <?= view('icons/list') ?> 8167992b6aSRichard Cissee <span class="sr-only"><?= I18N::translate('Lists') ?></span> 8267992b6aSRichard Cissee </th> 830cb66f86SGreg Roach <th title="<?= I18N::translate('Reports') ?>"> 840cb66f86SGreg Roach <?= view('icons/report') ?> 850cb66f86SGreg Roach <span class="sr-only"><?= I18N::translate('Reports') ?></span> 86dd6b2bfcSGreg Roach </th> 8733c34396SGreg Roach <th title="<?= I18N::translate('Footers') ?>"> 8833c34396SGreg Roach <?= view('icons/footer') ?> 8933c34396SGreg Roach <span class="sr-only"><?= I18N::translate('Footers') ?></span> 9033c34396SGreg Roach </th> 919e5cb8c9SGreg Roach <th title="<?= I18N::translate('Tracking and analytics') ?>"> 929e5cb8c9SGreg Roach <?= view('icons/analytics') ?> 939e5cb8c9SGreg Roach <span class="sr-only"><?= I18N::translate('Tracking and analytics') ?></span> 949e5cb8c9SGreg Roach </th> 95f3244202SGreg Roach <th title="<?= I18N::translate('Historic events') ?>"> 96f3244202SGreg Roach <?= view('icons/history') ?> 97f3244202SGreg Roach <span class="sr-only"><?= I18N::translate('Historic events') ?></span> 98f3244202SGreg Roach </th> 9911eb8581SGreg Roach <th title="<?= I18N::translate('Themes') ?>"> 1000cb66f86SGreg Roach <?= view('icons/theme') ?> 1010cb66f86SGreg Roach <span class="sr-only"><?= I18N::translate('Themes') ?></span> 102dd6b2bfcSGreg Roach </th> 10311eb8581SGreg Roach <th title="<?= I18N::translate('Languages') ?>"> 10411eb8581SGreg Roach <?= view('icons/language') ?> 10511eb8581SGreg Roach <span class="sr-only"><?= I18N::translate('Languages') ?></span> 10611eb8581SGreg Roach </th> 107dd6b2bfcSGreg Roach </tr> 108dd6b2bfcSGreg Roach </thead> 1090cb66f86SGreg Roach 110dd6b2bfcSGreg Roach <tbody> 11149a243cbSGreg Roach <?php foreach ($modules as $module) : ?> 112dd6b2bfcSGreg Roach <tr> 1130cb66f86SGreg Roach <th scope="row" dir="auto"> 11449a243cbSGreg Roach <?= $module->title() ?> 115dd6b2bfcSGreg Roach </th> 11649a243cbSGreg Roach <td class="text-center" data-sort="<?= $module->isEnabled() ?>"> 117677aaceaSGreg Roach <?= Bootstrap4::checkbox('', false, ['name' => 'status-' . $module->name(), 'checked' => $module->isEnabled()]) ?> 118dd6b2bfcSGreg Roach </td> 1190cb66f86SGreg Roach <td> 12049a243cbSGreg Roach <?= $module->description() ?> 1219cad7645SGreg Roach <?php if ($module instanceof ModuleCustomInterface) : ?> 1221bfef740SGreg Roach <?= view('admin/custom-module-info', ['module' => $module]) ?> 123dd6b2bfcSGreg Roach <?php endif ?> 1248e5c5efeSGreg Roach <?php if ($module instanceof ModuleExternalUrlInterface) : ?> 1251bfef740SGreg Roach <?= view('admin/external-module-info', ['module' => $module]) ?> 1268e5c5efeSGreg Roach <?php endif ?> 127dd6b2bfcSGreg Roach </td> 1280cb66f86SGreg Roach <td class="text-center text-muted" title="<?= I18N::translate('Preferences') ?>"> 1290cb66f86SGreg Roach <?php if ($module instanceof ModuleConfigInterface) : ?> 130*8d6560c4SGreg Roach <?php if ($module->isEnabled()) : ?> 1310cb66f86SGreg Roach <a href="<?= e($module->getConfigLink()) ?>" title="<?= I18N::translate('Preferences') ?>"> 1320cb66f86SGreg Roach <?= view('icons/preferences') ?> 1330cb66f86SGreg Roach <span class="sr-only"> 1340cb66f86SGreg Roach <?= I18N::translate('Preferences') ?> 1350cb66f86SGreg Roach </span> 1360cb66f86SGreg Roach </a> 137*8d6560c4SGreg Roach <?php else : ?> 138*8d6560c4SGreg Roach <?= view('icons/preferences') ?> 139*8d6560c4SGreg Roach <?php endif ?> 1400cb66f86SGreg Roach <?php endif ?> 1410cb66f86SGreg Roach </td> 1420cb66f86SGreg Roach <td class="text-center text-muted" title="<?= I18N::translate('Menu') ?>"> 143dd6b2bfcSGreg Roach <?php if ($module instanceof ModuleMenuInterface) : ?> 144dd6b2bfcSGreg Roach <?= view('icons/menu') ?> 145dd6b2bfcSGreg Roach <span class="sr-only"><?= I18N::translate('Menu') ?></span> 146dd6b2bfcSGreg Roach <?php else : ?> 147dd6b2bfcSGreg Roach - 148dd6b2bfcSGreg Roach <?php endif ?> 149dd6b2bfcSGreg Roach </td> 1500cb66f86SGreg Roach <td class="text-center text-muted" title="<?= I18N::translate('Tab') ?>"> 151dd6b2bfcSGreg Roach <?php if ($module instanceof ModuleTabInterface) : ?> 152dd6b2bfcSGreg Roach <?= view('icons/tab') ?> 153dd6b2bfcSGreg Roach <span class="sr-only"><?= I18N::translate('Tab') ?></span> 1540cb66f86SGreg Roach <?php else : ?> 1550cb66f86SGreg Roach - 156dd6b2bfcSGreg Roach <?php endif ?> 1570cb66f86SGreg Roach </td> 1580cb66f86SGreg Roach <td class="text-center text-muted" title="<?= I18N::translate('Sidebar') ?>"> 159dd6b2bfcSGreg Roach <?php if ($module instanceof ModuleSidebarInterface) : ?> 160dd6b2bfcSGreg Roach <?= view('icons/sidebar') ?> 161dd6b2bfcSGreg Roach <span class="sr-only"><?= I18N::translate('Sidebar') ?></span> 1620cb66f86SGreg Roach <?php else : ?> 1630cb66f86SGreg Roach - 164dd6b2bfcSGreg Roach <?php endif ?> 1650cb66f86SGreg Roach </td> 1660cb66f86SGreg Roach <td class="text-center text-muted"> 1670cb66f86SGreg Roach <?php if ($module instanceof ModuleBlockInterface) : ?> 1680cb66f86SGreg Roach <?php if ($module->isUserBlock()) : ?> 1690cb66f86SGreg Roach <span title="<?= I18N::translate('My page') ?>"> 170dd6b2bfcSGreg Roach <?= view('icons/block-user') ?> 1710cb66f86SGreg Roach </span> 1720cb66f86SGreg Roach <span class="sr-only"> 1730cb66f86SGreg Roach <?= I18N::translate('My page') ?> 1740cb66f86SGreg Roach </span> 175dd6b2bfcSGreg Roach <?php endif ?> 1760cb66f86SGreg Roach 1770cb66f86SGreg Roach <?php if ($module->isTreeBlock()) : ?> 1780cb66f86SGreg Roach <span title="<?= I18N::translate('Home page') ?>"> 179dd6b2bfcSGreg Roach <?= view('icons/block-tree') ?> 1800cb66f86SGreg Roach </span> 1810cb66f86SGreg Roach <span class="sr-only"> 1820cb66f86SGreg Roach <?= I18N::translate('Home page') ?> 1830cb66f86SGreg Roach </span> 184dd6b2bfcSGreg Roach <?php endif ?> 1850cb66f86SGreg Roach <?php else : ?> 1860cb66f86SGreg Roach - 1870cb66f86SGreg Roach <?php endif ?> 1880cb66f86SGreg Roach </td> 1890cb66f86SGreg Roach <td class="text-center text-muted" title="<?= I18N::translate('Chart') ?>"> 190dd6b2bfcSGreg Roach <?php if ($module instanceof ModuleChartInterface) : ?> 191dd6b2bfcSGreg Roach <?= view('icons/chart') ?> 192dd6b2bfcSGreg Roach <span class="sr-only"><?= I18N::translate('Chart') ?></span> 1930cb66f86SGreg Roach <?php else : ?> 1940cb66f86SGreg Roach - 195dd6b2bfcSGreg Roach <?php endif ?> 1960cb66f86SGreg Roach </td> 19767992b6aSRichard Cissee <td class="text-center text-muted" title="<?= I18N::translate('List') ?>"> 19867992b6aSRichard Cissee <?php if ($module instanceof ModuleListInterface) : ?> 19967992b6aSRichard Cissee <?= view('icons/list') ?> 20067992b6aSRichard Cissee <span class="sr-only"><?= I18N::translate('List') ?></span> 20167992b6aSRichard Cissee <?php else : ?> 20267992b6aSRichard Cissee - 20367992b6aSRichard Cissee <?php endif ?> 20467992b6aSRichard Cissee </td> 2050cb66f86SGreg Roach <td class="text-center text-muted" title="<?= I18N::translate('Report') ?>"> 206dd6b2bfcSGreg Roach <?php if ($module instanceof ModuleReportInterface) : ?> 207dd6b2bfcSGreg Roach <?= view('icons/report') ?> 208dd6b2bfcSGreg Roach <span class="sr-only"><?= I18N::translate('Report') ?></span> 2090cb66f86SGreg Roach <?php else : ?> 2100cb66f86SGreg Roach - 211dd6b2bfcSGreg Roach <?php endif ?> 2120cb66f86SGreg Roach </td> 21333c34396SGreg Roach <td class="text-center text-muted" title="<?= I18N::translate('Footer') ?>"> 21433c34396SGreg Roach <?php if ($module instanceof ModuleFooterInterface) : ?> 21533c34396SGreg Roach <?= view('icons/footer') ?> 21633c34396SGreg Roach <span class="sr-only"><?= I18N::translate('Footer') ?></span> 21733c34396SGreg Roach <?php else : ?> 21833c34396SGreg Roach - 21933c34396SGreg Roach <?php endif ?> 22033c34396SGreg Roach </td> 2219e5cb8c9SGreg Roach <td class="text-center text-muted" title="<?= I18N::translate('Tracking and analytics') ?>"> 2229e5cb8c9SGreg Roach <?php if ($module instanceof ModuleAnalyticsInterface) : ?> 2239e5cb8c9SGreg Roach <?= view('icons/analytics') ?> 2249e5cb8c9SGreg Roach <span class="sr-only"><?= I18N::translate('Tracking and analytics') ?></span> 2259e5cb8c9SGreg Roach <?php else : ?> 2269e5cb8c9SGreg Roach - 2279e5cb8c9SGreg Roach <?php endif ?> 2289e5cb8c9SGreg Roach </td> 229f3244202SGreg Roach <td class="text-center text-muted" title="<?= I18N::translate('Historic events') ?>"> 230f3244202SGreg Roach <?php if ($module instanceof ModuleHistoricEventsInterface) : ?> 231f3244202SGreg Roach <?= view('icons/history') ?> 232f3244202SGreg Roach <span class="sr-only"><?= I18N::translate('Historic events') ?></span> 233f3244202SGreg Roach <?php else : ?> 234f3244202SGreg Roach - 235f3244202SGreg Roach <?php endif ?> 236f3244202SGreg Roach </td> 23711eb8581SGreg Roach <td class="text-center text-muted" title="<?= I18N::translate('Theme') ?>"> 238dd6b2bfcSGreg Roach <?php if ($module instanceof ModuleThemeInterface) : ?> 239dd6b2bfcSGreg Roach <?= view('icons/theme') ?> 240dd6b2bfcSGreg Roach <span class="sr-only"><?= I18N::translate('Theme') ?></span> 2410cb66f86SGreg Roach <?php else : ?> 2420cb66f86SGreg Roach - 243dd6b2bfcSGreg Roach <?php endif ?> 244dd6b2bfcSGreg Roach </td> 24511eb8581SGreg Roach <td class="text-center text-muted" title="<?= I18N::translate('Language') ?>"> 24611eb8581SGreg Roach <?php if ($module instanceof ModuleLanguageInterface) : ?> 24711eb8581SGreg Roach <?= view('icons/language') ?> 24811eb8581SGreg Roach <span class="sr-only"><?= I18N::translate('Language') ?></span> 24911eb8581SGreg Roach <?php else : ?> 25011eb8581SGreg Roach - 25111eb8581SGreg Roach <?php endif ?> 25211eb8581SGreg Roach </td> 253dd6b2bfcSGreg Roach </tr> 254dd6b2bfcSGreg Roach <?php endforeach ?> 255dd6b2bfcSGreg Roach </tbody> 256dd6b2bfcSGreg Roach </table> 257dd6b2bfcSGreg Roach <button class="btn btn-primary" type="submit"> 258dd6b2bfcSGreg Roach <?= view('icons/save') ?> 259dd6b2bfcSGreg Roach <?= I18N::translate('save') ?></button> 260dd6b2bfcSGreg Roach</form> 261dd6b2bfcSGreg Roach 262dd6b2bfcSGreg Roach<?php View::push('javascript') ?> 263dd6b2bfcSGreg Roach<script> 264dd6b2bfcSGreg Roach 'use strict'; 265dd6b2bfcSGreg Roach 266dd6b2bfcSGreg Roach $(".table-module-administration").dataTable({<?= I18N::datatablesI18N() ?>}); 267dd6b2bfcSGreg Roach</script> 268dd6b2bfcSGreg Roach<?php View::endpush() ?> 269