- md5
- a606f5144f1df6cac12955c81a388bdb
- sha1
- 2d12423569d8ed52262477ab84446ac66eecbcd0
- sha256
- 49a59980b0ca6aeb3dfeed6abbd03f3bc3f908f1b3ed1ad295e99aaa10ba418e
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
<?php
/**
* @package Joomla.Administrator
* @subpackage com_cpanel
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\Helper\ModuleHelper;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
// Load JavaScript message titles
Text::script('ERROR');
Text::script('WARNING');
Text::script('NOTICE');
Text::script('MESSAGE');
Text::script('COM_CPANEL_UNPUBLISH_MODULE_SUCCESS');
Text::script('COM_CPANEL_UNPUBLISH_MODULE_ERROR');
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('com_cpanel.admin-cpanel')
->useScript('com_cpanel.admin-addmodule');
$user = Factory::getUser();
// Set up the bootstrap modal that will be used for all module editors
echo HTMLHelper::_(
'bootstrap.renderModal',
'moduleDashboardAddModal',
array(
'title' => Text::_('COM_CPANEL_ADD_MODULE_MODAL_TITLE'),
'backdrop' => 'static',
'url' => Route::_('index.php?option=com_cpanel&task=addModule&function=jSelectModuleType&position=' . $this->escape($this->position)),
'bodyHeight' => '70',
'modalWidth' => '80',
'footer' => '<button type="button" class="button-cancel btn btn-sm btn-danger" data-dismiss="modal" data-target="#closeBtn"><span class="fas fa-times" aria-hidden="true"></span>'
. Text::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</button>'
. '<button type="button" class="button-save btn btn-sm btn-success hidden" data-target="#saveBtn"><span class="fas fa-copy" aria-hidden="true"></span>'
. Text::_('JSAVE') . '</button>',
)
);
?>
<div id="cpanel-modules">
<div class="cpanel-modules <?php echo $this->position; ?>">
<div class="card-columns">
<?php if ($this->quickicons) :
foreach ($this->quickicons as $iconmodule)
{
echo ModuleHelper::renderModule($iconmodule, array('style' => 'well'));
}
endif;
foreach ($this->modules as $module)
{
echo ModuleHelper::renderModule($module, array('style' => 'well'));
}
?>
</div>
</div>
</div>
<?php if ($user->authorise('core.manage', 'com_modules')) : ?>
<div class="row">
<div class="col-md-6">
<button type="button" data-toggle="modal" data-target="#moduleDashboardAddModal" class="cpanel-add-module text-center py-5 w-100 d-block">
<div class="cpanel-add-module-icon text-center">
<span class="fas fa-plus-square text-light mt-2"></span>
</div>
<span><?php echo Text::_('COM_CPANEL_ADD_DASHBOARD_MODULE'); ?></span>
</button>
</div>
</div>
<?php endif; ?>
The same content is in 3 releases, Joomla 4.0.0-beta2 to 4.0.0-beta4. See them all, or every version of this file.