[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/administrator/components/com_cpanel/tmpl/cpanel/ -> default.php (source)

   1  <?php
   2  
   3  /**
   4   * @package     Joomla.Administrator
   5   * @subpackage  com_cpanel
   6   *
   7   * @copyright   (C) 2008 Open Source Matters, Inc. <https://www.joomla.org>
   8   * @license     GNU General Public License version 2 or later; see LICENSE.txt
   9   */
  10  
  11  defined('_JEXEC') or die;
  12  
  13  use Joomla\CMS\Factory;
  14  use Joomla\CMS\Helper\ModuleHelper;
  15  use Joomla\CMS\HTML\HTMLHelper;
  16  use Joomla\CMS\Language\Text;
  17  use Joomla\CMS\Router\Route;
  18  
  19  // Load JavaScript message titles
  20  Text::script('ERROR');
  21  Text::script('WARNING');
  22  Text::script('NOTICE');
  23  Text::script('MESSAGE');
  24  
  25  Text::script('COM_CPANEL_UNPUBLISH_MODULE_SUCCESS');
  26  Text::script('COM_CPANEL_UNPUBLISH_MODULE_ERROR');
  27  
  28  /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
  29  $wa = $this->document->getWebAssetManager();
  30  $wa->useScript('com_cpanel.admin-cpanel')
  31      ->useScript('com_cpanel.admin-addmodule');
  32  
  33  $user = Factory::getUser();
  34  
  35  // Set up the bootstrap modal that will be used for all module editors
  36  echo HTMLHelper::_(
  37      'bootstrap.renderModal',
  38      'moduleDashboardAddModal',
  39      array(
  40          'title'       => Text::_('COM_CPANEL_ADD_MODULE_MODAL_TITLE'),
  41          'backdrop'    => 'static',
  42          'url'         => Route::_('index.php?option=com_cpanel&task=addModule&function=jSelectModuleType&position=' . $this->escape($this->position)),
  43          'bodyHeight'  => '70',
  44          'modalWidth'  => '80',
  45          'footer'      => '<button type="button" class="button-cancel btn btn-danger" data-bs-dismiss="modal" data-bs-target="#closeBtn">'
  46              . Text::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</button>'
  47              . '<button type="button" id="btnModalSaveAndClose" class="button-save btn btn-success hidden" data-bs-target="#saveBtn">'
  48              . Text::_('JSAVE') . '</button>',
  49      )
  50  );
  51  ?>
  52  <div id="cpanel-modules">
  53      <div class="cpanel-modules <?php echo $this->position; ?>">
  54          <div class="card-columns">
  55          <?php if ($this->quickicons) :
  56              foreach ($this->quickicons as $iconmodule) {
  57                  echo ModuleHelper::renderModule($iconmodule, array('style' => 'well'));
  58              }
  59          endif;
  60          foreach ($this->modules as $module) {
  61              echo ModuleHelper::renderModule($module, array('style' => 'well'));
  62          }
  63          ?>
  64          <?php if ($user->authorise('core.create', 'com_modules')) : ?>
  65              <div class="module-wrapper">
  66                  <div class="card">
  67                      <button type="button" data-bs-toggle="modal" data-bs-target="#moduleDashboardAddModal" class="cpanel-add-module">
  68                          <div class="cpanel-add-module-icon">
  69                              <span class="icon-plus-square" aria-hidden="true"></span>
  70                          </div>
  71                          <span><?php echo Text::_('COM_CPANEL_ADD_DASHBOARD_MODULE'); ?></span>
  72                      </button>
  73                  </div>
  74              </div>
  75          <?php endif; ?>
  76          </div>
  77      </div>
  78  </div>


Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer