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; ?> 12dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\Module\ModuleMenuInterface; ?> 13dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\Module\ModuleReportInterface; ?> 14dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\Module\ModuleSidebarInterface; ?> 15dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\Module\ModuleTabInterface; ?> 16dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\Module\ModuleThemeInterface; ?> 17dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\View; ?> 18dd6b2bfcSGreg Roach 19dd6b2bfcSGreg Roach<?= view('components/breadcrumbs', ['links' => [route('admin-control-panel') => I18N::translate('Control panel'), $title]]) ?> 20dd6b2bfcSGreg Roach 21dd6b2bfcSGreg Roach<h1><?= $title ?></h1> 22dd6b2bfcSGreg Roach 23dd6b2bfcSGreg Roach<?php foreach ($deleted_modules as $module_name) : ?> 24dd6b2bfcSGreg Roach <div class="alert alert-warning" role="alert"> 25244d9cdfSGreg Roach <form action="<?= e(route('delete-module-settings')) ?>" class="form-inline" method="POST"> 26dd6b2bfcSGreg Roach <?= csrf_field() ?> 27dd6b2bfcSGreg Roach <input type="hidden" name="module_name" value="<?= $module_name ?>"> 28dd6b2bfcSGreg Roach <?= I18N::translate('Preferences exist for the module “%s”, but this module no longer exists.', $module_name) ?> 29*97c22350SGreg Roach <button type="submit" class="btn btn-secondary"> 30dd6b2bfcSGreg Roach <?= I18N::translate('Delete the preferences for this module.') ?> 31dd6b2bfcSGreg Roach </button> 32dd6b2bfcSGreg Roach </form> 33dd6b2bfcSGreg Roach </div> 34dd6b2bfcSGreg Roach<?php endforeach ?> 35dd6b2bfcSGreg Roach 36f70ab68bSGreg Roach<form method="POST"> 37dd6b2bfcSGreg Roach <input type="hidden" name="route" value="admin-update-module-status"> 38dd6b2bfcSGreg Roach <?= csrf_field() ?> 3949d6539eSGreg 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"> 40dd6b2bfcSGreg Roach <caption class="sr-only"> 41dd6b2bfcSGreg Roach <?= I18N::translate('Module administration') ?> 42dd6b2bfcSGreg Roach </caption> 43dd6b2bfcSGreg Roach <thead> 44dd6b2bfcSGreg Roach <tr> 45dd6b2bfcSGreg Roach <th> 46dd6b2bfcSGreg Roach <?= I18N::translate('Module') ?> 47dd6b2bfcSGreg Roach </th> 48dd6b2bfcSGreg Roach <th> 49dd6b2bfcSGreg Roach <?= I18N::translate('Enabled') ?> 50dd6b2bfcSGreg Roach </th> 510cb66f86SGreg Roach <th data-orderable="false"> 52dd6b2bfcSGreg Roach <?= I18N::translate('Description') ?> 53dd6b2bfcSGreg Roach </th> 540cb66f86SGreg Roach <th title="<?= I18N::translate('Preferences') ?>"> 550cb66f86SGreg Roach <?= view('icons/preferences') ?> 560cb66f86SGreg Roach <span class="sr-only"><?= I18N::translate('Preferences') ?></span> 57dd6b2bfcSGreg Roach </th> 580cb66f86SGreg Roach <th title="<?= I18N::translate('Menus') ?>"> 590cb66f86SGreg Roach <?= view('icons/menu') ?> 600cb66f86SGreg Roach <span class="sr-only"><?= I18N::translate('Menus') ?></span> 61dd6b2bfcSGreg Roach </th> 620cb66f86SGreg Roach <th title="<?= I18N::translate('Tabs') ?>"> 630cb66f86SGreg Roach <?= view('icons/tab') ?> 640cb66f86SGreg Roach <span class="sr-only"><?= I18N::translate('Tabs') ?></span> 65dd6b2bfcSGreg Roach </th> 660cb66f86SGreg Roach <th title="<?= I18N::translate('Sidebars') ?>"> 670cb66f86SGreg Roach <?= view('icons/sidebar') ?> 680cb66f86SGreg Roach <span class="sr-only"><?= I18N::translate('Sidebars') ?></span> 69dd6b2bfcSGreg Roach </th> 700cb66f86SGreg Roach <th title="<?= I18N::translate('Blocks') ?>"> 710cb66f86SGreg Roach <?= view('icons/block') ?> 720cb66f86SGreg Roach <span class="sr-only"><?= I18N::translate('Blocks') ?></span> 73dd6b2bfcSGreg Roach </th> 740cb66f86SGreg Roach <th title="<?= I18N::translate('Charts') ?>"> 750cb66f86SGreg Roach <?= view('icons/chart') ?> 760cb66f86SGreg Roach <span class="sr-only"><?= I18N::translate('Charts') ?></span> 77dd6b2bfcSGreg Roach </th> 780cb66f86SGreg Roach <th title="<?= I18N::translate('Reports') ?>"> 790cb66f86SGreg Roach <?= view('icons/report') ?> 800cb66f86SGreg Roach <span class="sr-only"><?= I18N::translate('Reports') ?></span> 81dd6b2bfcSGreg Roach </th> 8233c34396SGreg Roach <th title="<?= I18N::translate('Footers') ?>"> 8333c34396SGreg Roach <?= view('icons/footer') ?> 8433c34396SGreg Roach <span class="sr-only"><?= I18N::translate('Footers') ?></span> 8533c34396SGreg Roach </th> 869e5cb8c9SGreg Roach <th title="<?= I18N::translate('Tracking and analytics') ?>"> 879e5cb8c9SGreg Roach <?= view('icons/analytics') ?> 889e5cb8c9SGreg Roach <span class="sr-only"><?= I18N::translate('Tracking and analytics') ?></span> 899e5cb8c9SGreg Roach </th> 90f3244202SGreg Roach <th title="<?= I18N::translate('Historic events') ?>"> 91f3244202SGreg Roach <?= view('icons/history') ?> 92f3244202SGreg Roach <span class="sr-only"><?= I18N::translate('Historic events') ?></span> 93f3244202SGreg Roach </th> 9411eb8581SGreg Roach <th title="<?= I18N::translate('Themes') ?>"> 950cb66f86SGreg Roach <?= view('icons/theme') ?> 960cb66f86SGreg Roach <span class="sr-only"><?= I18N::translate('Themes') ?></span> 97dd6b2bfcSGreg Roach </th> 9811eb8581SGreg Roach <th title="<?= I18N::translate('Languages') ?>"> 9911eb8581SGreg Roach <?= view('icons/language') ?> 10011eb8581SGreg Roach <span class="sr-only"><?= I18N::translate('Languages') ?></span> 10111eb8581SGreg Roach </th> 102dd6b2bfcSGreg Roach </tr> 103dd6b2bfcSGreg Roach </thead> 1040cb66f86SGreg Roach 105dd6b2bfcSGreg Roach <tbody> 10649a243cbSGreg Roach <?php foreach ($modules as $module) : ?> 107dd6b2bfcSGreg Roach <tr> 1080cb66f86SGreg Roach <th scope="row" dir="auto"> 10949a243cbSGreg Roach <?= $module->title() ?> 110dd6b2bfcSGreg Roach </th> 11149a243cbSGreg Roach <td class="text-center" data-sort="<?= $module->isEnabled() ?>"> 112677aaceaSGreg Roach <?= Bootstrap4::checkbox('', false, ['name' => 'status-' . $module->name(), 'checked' => $module->isEnabled()]) ?> 113dd6b2bfcSGreg Roach </td> 1140cb66f86SGreg Roach <td> 11549a243cbSGreg Roach <?= $module->description() ?> 1169cad7645SGreg Roach <?php if ($module instanceof ModuleCustomInterface) : ?> 117dd6b2bfcSGreg Roach <br> 118dd6b2bfcSGreg Roach <?= view('icons/warning') ?> 119dd6b2bfcSGreg Roach <?= I18N::translate('Custom module') ?> 120dd6b2bfcSGreg Roach <?php if ($module::CUSTOM_VERSION) : ?> 121dd6b2bfcSGreg Roach - <?= I18N::translate('Version') ?> <?= $module::CUSTOM_VERSION ?> 122dd6b2bfcSGreg Roach <?php endif ?> 123dd6b2bfcSGreg Roach <?php if ($module::CUSTOM_WEBSITE) : ?> 124dd6b2bfcSGreg Roach - <a href="<?= $module::CUSTOM_WEBSITE ?>"> 125dd6b2bfcSGreg Roach <?= $module::CUSTOM_WEBSITE ?> 126dd6b2bfcSGreg Roach </a> 127dd6b2bfcSGreg Roach <?php endif ?> 128dd6b2bfcSGreg Roach <?php endif ?> 1298e5c5efeSGreg Roach <?php if ($module instanceof ModuleExternalUrlInterface) : ?> 1308e5c5efeSGreg Roach <br> 1318e5c5efeSGreg Roach <a href="<?= e($module->externalUrl()) ?>"> 1328e5c5efeSGreg Roach <?= e($module->externalUrl()) ?> 1338e5c5efeSGreg Roach </a> 1348e5c5efeSGreg Roach <?php endif ?> 135dd6b2bfcSGreg Roach </td> 1360cb66f86SGreg Roach <td class="text-center text-muted" title="<?= I18N::translate('Preferences') ?>"> 1370cb66f86SGreg Roach <?php if ($module instanceof ModuleConfigInterface) : ?> 1380cb66f86SGreg Roach <a href="<?= e($module->getConfigLink()) ?>" title="<?= I18N::translate('Preferences') ?>"> 1390cb66f86SGreg Roach <?= view('icons/preferences') ?> 1400cb66f86SGreg Roach <span class="sr-only"> 1410cb66f86SGreg Roach <?= I18N::translate('Preferences') ?> 1420cb66f86SGreg Roach </span> 1430cb66f86SGreg Roach </a> 1440cb66f86SGreg Roach <?php endif ?> 1450cb66f86SGreg Roach </td> 1460cb66f86SGreg Roach <td class="text-center text-muted" title="<?= I18N::translate('Menu') ?>"> 147dd6b2bfcSGreg Roach <?php if ($module instanceof ModuleMenuInterface) : ?> 148dd6b2bfcSGreg Roach <?= view('icons/menu') ?> 149dd6b2bfcSGreg Roach <span class="sr-only"><?= I18N::translate('Menu') ?></span> 150dd6b2bfcSGreg Roach <?php else : ?> 151dd6b2bfcSGreg Roach - 152dd6b2bfcSGreg Roach <?php endif ?> 153dd6b2bfcSGreg Roach </td> 1540cb66f86SGreg Roach <td class="text-center text-muted" title="<?= I18N::translate('Tab') ?>"> 155dd6b2bfcSGreg Roach <?php if ($module instanceof ModuleTabInterface) : ?> 156dd6b2bfcSGreg Roach <?= view('icons/tab') ?> 157dd6b2bfcSGreg Roach <span class="sr-only"><?= I18N::translate('Tab') ?></span> 1580cb66f86SGreg Roach <?php else : ?> 1590cb66f86SGreg Roach - 160dd6b2bfcSGreg Roach <?php endif ?> 1610cb66f86SGreg Roach </td> 1620cb66f86SGreg Roach <td class="text-center text-muted" title="<?= I18N::translate('Sidebar') ?>"> 163dd6b2bfcSGreg Roach <?php if ($module instanceof ModuleSidebarInterface) : ?> 164dd6b2bfcSGreg Roach <?= view('icons/sidebar') ?> 165dd6b2bfcSGreg Roach <span class="sr-only"><?= I18N::translate('Sidebar') ?></span> 1660cb66f86SGreg Roach <?php else : ?> 1670cb66f86SGreg Roach - 168dd6b2bfcSGreg Roach <?php endif ?> 1690cb66f86SGreg Roach </td> 1700cb66f86SGreg Roach <td class="text-center text-muted"> 1710cb66f86SGreg Roach <?php if ($module instanceof ModuleBlockInterface) : ?> 1720cb66f86SGreg Roach <?php if ($module->isUserBlock()) : ?> 1730cb66f86SGreg Roach <span title="<?= I18N::translate('My page') ?>"> 174dd6b2bfcSGreg Roach <?= view('icons/block-user') ?> 1750cb66f86SGreg Roach </span> 1760cb66f86SGreg Roach <span class="sr-only"> 1770cb66f86SGreg Roach <?= I18N::translate('My page') ?> 1780cb66f86SGreg Roach </span> 179dd6b2bfcSGreg Roach <?php endif ?> 1800cb66f86SGreg Roach 1810cb66f86SGreg Roach <?php if ($module->isTreeBlock()) : ?> 1820cb66f86SGreg Roach <span title="<?= I18N::translate('Home page') ?>"> 183dd6b2bfcSGreg Roach <?= view('icons/block-tree') ?> 1840cb66f86SGreg Roach </span> 1850cb66f86SGreg Roach <span class="sr-only"> 1860cb66f86SGreg Roach <?= I18N::translate('Home page') ?> 1870cb66f86SGreg Roach </span> 188dd6b2bfcSGreg Roach <?php endif ?> 1890cb66f86SGreg Roach <?php else : ?> 1900cb66f86SGreg Roach - 1910cb66f86SGreg Roach <?php endif ?> 1920cb66f86SGreg Roach </td> 1930cb66f86SGreg Roach <td class="text-center text-muted" title="<?= I18N::translate('Chart') ?>"> 194dd6b2bfcSGreg Roach <?php if ($module instanceof ModuleChartInterface) : ?> 195dd6b2bfcSGreg Roach <?= view('icons/chart') ?> 196dd6b2bfcSGreg Roach <span class="sr-only"><?= I18N::translate('Chart') ?></span> 1970cb66f86SGreg Roach <?php else : ?> 1980cb66f86SGreg Roach - 199dd6b2bfcSGreg Roach <?php endif ?> 2000cb66f86SGreg Roach </td> 2010cb66f86SGreg Roach <td class="text-center text-muted" title="<?= I18N::translate('Report') ?>"> 202dd6b2bfcSGreg Roach <?php if ($module instanceof ModuleReportInterface) : ?> 203dd6b2bfcSGreg Roach <?= view('icons/report') ?> 204dd6b2bfcSGreg Roach <span class="sr-only"><?= I18N::translate('Report') ?></span> 2050cb66f86SGreg Roach <?php else : ?> 2060cb66f86SGreg Roach - 207dd6b2bfcSGreg Roach <?php endif ?> 2080cb66f86SGreg Roach </td> 20933c34396SGreg Roach <td class="text-center text-muted" title="<?= I18N::translate('Footer') ?>"> 21033c34396SGreg Roach <?php if ($module instanceof ModuleFooterInterface) : ?> 21133c34396SGreg Roach <?= view('icons/footer') ?> 21233c34396SGreg Roach <span class="sr-only"><?= I18N::translate('Footer') ?></span> 21333c34396SGreg Roach <?php else : ?> 21433c34396SGreg Roach - 21533c34396SGreg Roach <?php endif ?> 21633c34396SGreg Roach </td> 2179e5cb8c9SGreg Roach <td class="text-center text-muted" title="<?= I18N::translate('Tracking and analytics') ?>"> 2189e5cb8c9SGreg Roach <?php if ($module instanceof ModuleAnalyticsInterface) : ?> 2199e5cb8c9SGreg Roach <?= view('icons/analytics') ?> 2209e5cb8c9SGreg Roach <span class="sr-only"><?= I18N::translate('Tracking and analytics') ?></span> 2219e5cb8c9SGreg Roach <?php else : ?> 2229e5cb8c9SGreg Roach - 2239e5cb8c9SGreg Roach <?php endif ?> 2249e5cb8c9SGreg Roach </td> 225f3244202SGreg Roach <td class="text-center text-muted" title="<?= I18N::translate('Historic events') ?>"> 226f3244202SGreg Roach <?php if ($module instanceof ModuleHistoricEventsInterface) : ?> 227f3244202SGreg Roach <?= view('icons/history') ?> 228f3244202SGreg Roach <span class="sr-only"><?= I18N::translate('Historic events') ?></span> 229f3244202SGreg Roach <?php else : ?> 230f3244202SGreg Roach - 231f3244202SGreg Roach <?php endif ?> 232f3244202SGreg Roach </td> 23311eb8581SGreg Roach <td class="text-center text-muted" title="<?= I18N::translate('Theme') ?>"> 234dd6b2bfcSGreg Roach <?php if ($module instanceof ModuleThemeInterface) : ?> 235dd6b2bfcSGreg Roach <?= view('icons/theme') ?> 236dd6b2bfcSGreg Roach <span class="sr-only"><?= I18N::translate('Theme') ?></span> 2370cb66f86SGreg Roach <?php else : ?> 2380cb66f86SGreg Roach - 239dd6b2bfcSGreg Roach <?php endif ?> 240dd6b2bfcSGreg Roach </td> 24111eb8581SGreg Roach <td class="text-center text-muted" title="<?= I18N::translate('Language') ?>"> 24211eb8581SGreg Roach <?php if ($module instanceof ModuleLanguageInterface) : ?> 24311eb8581SGreg Roach <?= view('icons/language') ?> 24411eb8581SGreg Roach <span class="sr-only"><?= I18N::translate('Language') ?></span> 24511eb8581SGreg Roach <?php else : ?> 24611eb8581SGreg Roach - 24711eb8581SGreg Roach <?php endif ?> 24811eb8581SGreg Roach </td> 249dd6b2bfcSGreg Roach </tr> 250dd6b2bfcSGreg Roach <?php endforeach ?> 251dd6b2bfcSGreg Roach </tbody> 252dd6b2bfcSGreg Roach </table> 253dd6b2bfcSGreg Roach <button class="btn btn-primary" type="submit"> 254dd6b2bfcSGreg Roach <?= view('icons/save') ?> 255dd6b2bfcSGreg Roach <?= I18N::translate('save') ?></button> 256dd6b2bfcSGreg Roach</form> 257dd6b2bfcSGreg Roach 258dd6b2bfcSGreg Roach<?php View::push('javascript') ?> 259dd6b2bfcSGreg Roach<script> 260dd6b2bfcSGreg Roach 'use strict'; 261dd6b2bfcSGreg Roach 262dd6b2bfcSGreg Roach $(".table-module-administration").dataTable({<?= I18N::datatablesI18N() ?>}); 263dd6b2bfcSGreg Roach</script> 264dd6b2bfcSGreg Roach<?php View::endpush() ?> 265