[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/administrator/components/com_redirect/tmpl/links/ -> emptystate.php (source)

   1  <?php
   2  
   3  /**
   4   * @package     Joomla.Administrator
   5   * @subpackage  com_redirect
   6   *
   7   * @copyright   (C) 2021 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\HTML\HTMLHelper;
  15  use Joomla\CMS\Language\Text;
  16  use Joomla\CMS\Layout\LayoutHelper;
  17  use Joomla\CMS\Router\Route;
  18  
  19  $displayData = [
  20      'textPrefix' => 'COM_REDIRECT',
  21      'formURL'    => 'index.php?option=com_redirect&view=links',
  22      'helpURL'    => 'https://docs.joomla.org/Special:MyLanguage/Help4.x:Redirects:_Links',
  23      'icon'       => 'icon-map-signs redirect',
  24  ];
  25  
  26  $user = Factory::getApplication()->getIdentity();
  27  
  28  if ($user->authorise('core.create', 'com_redirect')) {
  29      $displayData['createURL'] = 'index.php?option=com_redirect&task=link.add';
  30  }
  31  
  32  if (
  33      $user->authorise('core.create', 'com_redirect')
  34      && $user->authorise('core.edit', 'com_redirect')
  35      && $user->authorise('core.edit.state', 'com_redirect')
  36  ) {
  37      $displayData['formAppend'] = HTMLHelper::_(
  38          'bootstrap.renderModal',
  39          'collapseModal',
  40          [
  41              'title' => Text::_('COM_REDIRECT_BATCH_OPTIONS'),
  42              'footer' => $this->loadTemplate('batch_footer'),
  43          ],
  44          $this->loadTemplate('batch_body')
  45      );
  46  } ?>
  47  <?php if ($this->redirectPluginId) : ?>
  48      <?php $link = Route::_('index.php?option=com_plugins&client_id=0&task=plugin.edit&extension_id=' . $this->redirectPluginId . '&tmpl=component&layout=modal'); ?>
  49      <?php echo HTMLHelper::_(
  50          'bootstrap.renderModal',
  51          'plugin' . $this->redirectPluginId . 'Modal',
  52          array(
  53              'url'         => $link,
  54              'title'       => Text::_('COM_REDIRECT_EDIT_PLUGIN_SETTINGS'),
  55              'height'      => '400px',
  56              'width'       => '800px',
  57              'bodyHeight'  => '70',
  58              'modalWidth'  => '80',
  59              'closeButton' => false,
  60              'backdrop'    => 'static',
  61              'keyboard'    => false,
  62              'footer'      => '<button type="button" class="btn btn-secondary" data-bs-dismiss="modal"'
  63                  . ' onclick="Joomla.iframeButtonClick({iframeSelector: \'#plugin' . $this->redirectPluginId . 'Modal\', buttonSelector: \'#closeBtn\'})">'
  64                  . Text::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</button>'
  65                  . '<button type="button" class="btn btn-primary" data-bs-dismiss="modal" onclick="Joomla.iframeButtonClick({iframeSelector: \'#plugin' . $this->redirectPluginId . 'Modal\', buttonSelector: \'#saveBtn\'})">'
  66                  . Text::_('JSAVE') . '</button>'
  67                  . '<button type="button" class="btn btn-success" onclick="Joomla.iframeButtonClick({iframeSelector: \'#plugin' . $this->redirectPluginId . 'Modal\', buttonSelector: \'#applyBtn\'}); return false;">'
  68                  . Text::_('JAPPLY') . '</button>'
  69          )
  70      ); ?>
  71  <?php endif; ?>
  72  <?php echo LayoutHelper::render('joomla.content.emptystate', $displayData);


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