diff options
| author | Greg Roach <fisharebest@webtrees.net> | 2019-03-05 07:38:55 +0000 |
|---|---|---|
| committer | Greg Roach <fisharebest@webtrees.net> | 2019-03-05 07:38:55 +0000 |
| commit | 1bfef740b3b1a79bb9cd8df9d26bc6c9da617d5a (patch) | |
| tree | 64a16a620101781f1183a308ab3beaeae3c83a62 | |
| parent | af441945da196ecceb8fd208539a3ede20dd89a7 (diff) | |
| download | webtrees-1bfef740b3b1a79bb9cd8df9d26bc6c9da617d5a.tar.gz webtrees-1bfef740b3b1a79bb9cd8df9d26bc6c9da617d5a.tar.bz2 webtrees-1bfef740b3b1a79bb9cd8df9d26bc6c9da617d5a.zip | |
Fix: #2301 - custom/external module info should be the same on the module summary as the module component pages
| -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') ?>"> |
