Release of v5.1.1-alpha3
Add edit and create options to the ModalSelect Field (in Joomla 5).
This commit is contained in:
47
admin/tmpl/component_router/modalreturn.php
Normal file
47
admin/tmpl/component_router/modalreturn.php
Normal file
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 30th April, 2015
|
||||
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
||||
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
||||
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
use Joomla\CMS\Router\Route;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
/** @var \VDM\Component\Componentbuilder\Administrator\View\Component_router\HtmlView $this */
|
||||
|
||||
$icon = 'icon-check';
|
||||
$title_key = $this->item->id ?? '';
|
||||
$title_column = $this->item->name ?? '';
|
||||
$data = [
|
||||
'contentType' => 'com_componentbuilder.component_router',
|
||||
'id' => $title_key,
|
||||
'title' => $title_column,
|
||||
'uri' => Route::_('index.php?option=com_componentbuilder&layout=modal&tmpl=component&id='. (int) ($this->item->id ?? 0))
|
||||
];
|
||||
|
||||
// Add Content select script
|
||||
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
|
||||
$wa = $this->getDocument()->getWebAssetManager();
|
||||
$wa->useScript('modal-content-select');
|
||||
|
||||
// The data for Content select script
|
||||
$this->getDocument()->addScriptOptions('content-select-on-load', $data, false);
|
||||
|
||||
?>
|
||||
|
||||
<div class="px-4 py-5 my-5 text-center">
|
||||
<span class="fa-8x mb-4 <?php echo $icon; ?>" aria-hidden="true"></span>
|
||||
<h1 class="display-5 fw-bold"><?php echo $title_column; ?></h1>
|
||||
<div class="col-lg-6 mx-auto">
|
||||
<p class="lead mb-4">
|
||||
<?php echo $title_column; ?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
Reference in New Issue
Block a user