diff options
| -rw-r--r-- | resources/views/admin/components.phtml | 25 | ||||
| -rw-r--r-- | resources/views/admin/custom-module-info.phtml | 19 | ||||
| -rw-r--r-- | resources/views/admin/external-module-info.phtml | 5 | ||||
| -rw-r--r-- | resources/views/admin/modules.phtml | 17 |
4 files changed, 41 insertions, 25 deletions
diff --git a/resources/views/admin/components.phtml b/resources/views/admin/components.phtml index 543aa87685..2b2e4c0ae5 100644 --- a/resources/views/admin/components.phtml +++ b/resources/views/admin/components.phtml @@ -1,9 +1,14 @@ -<?php use Fisharebest\Webtrees\Bootstrap4; ?> -<?php use Fisharebest\Webtrees\Functions\FunctionsEdit; ?> -<?php use Fisharebest\Webtrees\I18N; ?> -<?php use Fisharebest\Webtrees\Module\ModuleExternalUrlInterface; ?> -<?php use Fisharebest\Webtrees\Module\ModuleConfigInterface; ?> -<?php use Fisharebest\Webtrees\View; ?> +<?php + +use Fisharebest\Webtrees\Bootstrap4; +use Fisharebest\Webtrees\Functions\FunctionsEdit; +use Fisharebest\Webtrees\I18N; +use Fisharebest\Webtrees\Module\ModuleConfigInterface; +use Fisharebest\Webtrees\Module\ModuleCustomInterface; +use Fisharebest\Webtrees\Module\ModuleExternalUrlInterface; +use Fisharebest\Webtrees\View; + +?> <?= view('components/breadcrumbs', ['links' => [route('admin-control-panel') => I18N::translate('Control panel'), route('modules') => I18N::translate('All modules'), $title]]) ?> @@ -44,11 +49,11 @@ </span> </a> <?php endif ?> + <?php if ($module instanceof ModuleCustomInterface) : ?> + <?= view('admin/custom-module-info', ['module' => $module]) ?> + <?php endif ?> <?php if ($module instanceof ModuleExternalUrlInterface) : ?> - <br> - <a href="<?= e($module->externalUrl()) ?>"> - <?= e($module->externalUrl()) ?> - </a> + <?= view('admin/external-module-info', ['module' => $module]) ?> <?php endif ?> </th> diff --git a/resources/views/admin/custom-module-info.phtml b/resources/views/admin/custom-module-info.phtml new file mode 100644 index 0000000000..410a728ada --- /dev/null +++ b/resources/views/admin/custom-module-info.phtml @@ -0,0 +1,19 @@ +<?php + +use Fisharebest\Webtrees\I18N; + +?> + +<div class="wt-custom-module-info"> + <?= view('icons/warning') ?> + <?= I18N::translate('Custom module') ?> + <?php if ($module::CUSTOM_VERSION) : ?> + - <?= I18N::translate('Version') ?> <?= $module::CUSTOM_VERSION ?> + <?php endif ?> + <?php if ($module::CUSTOM_WEBSITE) : ?> + - + <a href="<?= $module::CUSTOM_WEBSITE ?>"> + <?= $module::CUSTOM_WEBSITE ?> + </a> + <?php endif ?> +</div> diff --git a/resources/views/admin/external-module-info.phtml b/resources/views/admin/external-module-info.phtml new file mode 100644 index 0000000000..5a0a2b18ad --- /dev/null +++ b/resources/views/admin/external-module-info.phtml @@ -0,0 +1,5 @@ +<div class="wt-external-module-info"> + <a href="<?= e($module->externalUrl()) ?>"> + <?= e($module->externalUrl()) ?> + </a> +</div> diff --git a/resources/views/admin/modules.phtml b/resources/views/admin/modules.phtml index b969fe4948..309fe634f4 100644 --- a/resources/views/admin/modules.phtml +++ b/resources/views/admin/modules.phtml @@ -119,23 +119,10 @@ <td> <?= $module->description() ?> <?php if ($module instanceof ModuleCustomInterface) : ?> - <br> - <?= view('icons/warning') ?> - <?= I18N::translate('Custom module') ?> - <?php if ($module::CUSTOM_VERSION) : ?> - - <?= I18N::translate('Version') ?> <?= $module::CUSTOM_VERSION ?> - <?php endif ?> - <?php if ($module::CUSTOM_WEBSITE) : ?> - - <a href="<?= $module::CUSTOM_WEBSITE ?>"> - <?= $module::CUSTOM_WEBSITE ?> - </a> - <?php endif ?> + <?= view('admin/custom-module-info', ['module' => $module]) ?> <?php endif ?> <?php if ($module instanceof ModuleExternalUrlInterface) : ?> - <br> - <a href="<?= e($module->externalUrl()) ?>"> - <?= e($module->externalUrl()) ?> - </a> + <?= view('admin/external-module-info', ['module' => $module]) ?> <?php endif ?> </td> <td class="text-center text-muted" title="<?= I18N::translate('Preferences') ?>"> |
