[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/administrator/components/com_plugins/tmpl/plugins/ -> default.php (source)

   1  <?php
   2  
   3  /**
   4   * @package     Joomla.Administrator
   5   * @subpackage  com_plugins
   6   *
   7   * @copyright   (C) 2007 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  use Joomla\CMS\Session\Session;
  19  
  20  /** @var \Joomla\CMS\WebAsset\WebAssetManager $wa */
  21  $wa = $this->document->getWebAssetManager();
  22  $wa->useScript('table.columns')
  23      ->useScript('multiselect');
  24  
  25  $user      = Factory::getUser();
  26  $listOrder = $this->escape($this->state->get('list.ordering'));
  27  $listDirn  = $this->escape($this->state->get('list.direction'));
  28  $saveOrder = $listOrder == 'ordering';
  29  
  30  if ($saveOrder) {
  31      $saveOrderingUrl = 'index.php?option=com_plugins&task=plugins.saveOrderAjax&tmpl=component&' . Session::getFormToken() . '=1';
  32      HTMLHelper::_('draggablelist.draggable');
  33  }
  34  ?>
  35  <form action="<?php echo Route::_('index.php?option=com_plugins&view=plugins'); ?>" method="post" name="adminForm" id="adminForm">
  36      <div id="j-main-container" class="j-main-container">
  37          <?php echo LayoutHelper::render('joomla.searchtools.default', array('view' => $this)); ?>
  38          <?php if (empty($this->items)) : ?>
  39              <div class="alert alert-info">
  40                  <span class="icon-info-circle" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('INFO'); ?></span>
  41                  <?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
  42              </div>
  43          <?php else : ?>
  44              <table class="table" id="pluginList">
  45                  <caption class="visually-hidden">
  46                      <?php echo Text::_('COM_PLUGINS_TABLE_CAPTION'); ?>,
  47                              <span id="orderedBy"><?php echo Text::_('JGLOBAL_SORTED_BY'); ?> </span>,
  48                              <span id="filteredBy"><?php echo Text::_('JGLOBAL_FILTERED_BY'); ?></span>
  49                  </caption>
  50                  <thead>
  51                      <tr>
  52                          <td class="w-1 text-center">
  53                              <?php echo HTMLHelper::_('grid.checkall'); ?>
  54                          </td>
  55                          <th scope="col" class="w-1 text-center d-none d-md-table-cell">
  56                              <?php echo HTMLHelper::_('searchtools.sort', '', 'ordering', $listDirn, $listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-sort'); ?>
  57                          </th>
  58                          <th scope="col" class="w-1 text-center">
  59                              <?php echo HTMLHelper::_('searchtools.sort', 'JSTATUS', 'enabled', $listDirn, $listOrder); ?>
  60                          </th>
  61                          <th scope="col" class="title">
  62                              <?php echo HTMLHelper::_('searchtools.sort', 'COM_PLUGINS_NAME_HEADING', 'name', $listDirn, $listOrder); ?>
  63                          </th>
  64                          <th scope="col" class="w-10 d-none d-md-table-cell">
  65                              <?php echo HTMLHelper::_('searchtools.sort', 'COM_PLUGINS_FOLDER_HEADING', 'folder', $listDirn, $listOrder); ?>
  66                          </th>
  67                          <th scope="col" class="w-10 d-none d-md-table-cell">
  68                              <?php echo HTMLHelper::_('searchtools.sort', 'COM_PLUGINS_ELEMENT_HEADING', 'element', $listDirn, $listOrder); ?>
  69                          </th>
  70                          <th scope="col" class="w-10 d-none d-md-table-cell">
  71                              <?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ACCESS', 'access', $listDirn, $listOrder); ?>
  72                          </th>
  73                          <th scope="col" class="w-5 d-none d-md-table-cell">
  74                              <?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ID', 'extension_id', $listDirn, $listOrder); ?>
  75                          </th>
  76                      </tr>
  77                  </thead>
  78                  <tbody <?php if ($saveOrder) :
  79                      ?> class="js-draggable" data-url="<?php echo $saveOrderingUrl; ?>" data-direction="<?php echo strtolower($listDirn); ?>" data-nested="true"<?php
  80                         endif; ?>>
  81                  <?php foreach ($this->items as $i => $item) :
  82                      $ordering   = ($listOrder == 'ordering');
  83                      $canEdit    = $user->authorise('core.edit', 'com_plugins');
  84                      $canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $user->get('id') || is_null($item->checked_out);
  85                      $canChange  = $user->authorise('core.edit.state', 'com_plugins') && $canCheckin;
  86                      ?>
  87                      <tr class="row<?php echo $i % 2; ?>" data-draggable-group="<?php echo $item->folder; ?>">
  88                          <td class="text-center">
  89                              <?php echo HTMLHelper::_('grid.id', $i, $item->extension_id, false, 'cid', 'cb', $item->name); ?>
  90                          </td>
  91                          <td class="text-center d-none d-md-table-cell">
  92                              <?php
  93                              $iconClass = '';
  94                              if (!$canChange) {
  95                                  $iconClass = ' inactive';
  96                              } elseif (!$saveOrder) {
  97                                  $iconClass = ' inactive" title="' . Text::_('JORDERINGDISABLED');
  98                              }
  99                              ?>
 100                              <span class="sortable-handler<?php echo $iconClass; ?>">
 101                                  <span class="icon-ellipsis-v" aria-hidden="true"></span>
 102                              </span>
 103                              <?php if ($canChange && $saveOrder) : ?>
 104                                  <input type="text" name="order[]" size="5" value="<?php echo $item->ordering; ?>" class="width-20 text-area-order hidden">
 105                              <?php endif; ?>
 106                          </td>
 107                          <td class="text-center">
 108                              <?php echo HTMLHelper::_('jgrid.published', $item->enabled, $i, 'plugins.', $canChange); ?>
 109                          </td>
 110                          <th scope="row">
 111                              <?php if ($item->checked_out) : ?>
 112                                  <?php echo HTMLHelper::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'plugins.', $canCheckin); ?>
 113                              <?php endif; ?>
 114                              <?php if ($canEdit) : ?>
 115                                  <a href="<?php echo Route::_('index.php?option=com_plugins&task=plugin.edit&extension_id=' . (int) $item->extension_id); ?>" title="<?php echo Text::_('JACTION_EDIT'); ?> <?php echo $this->escape($item->name); ?>">
 116                                      <?php echo $item->name; ?></a>
 117                                      <?php if (!empty($item->note)) : ?>
 118                                          <div class="small">
 119                                              <?php echo Text::sprintf('JGLOBAL_LIST_NOTE', $this->escape($item->note)); ?>
 120                                          </div>
 121                                      <?php endif; ?>
 122                              <?php else : ?>
 123                                      <?php echo $item->name; ?>
 124                              <?php endif; ?>
 125                          </th>
 126                          <td class="small d-none d-md-table-cell">
 127                              <?php echo $this->escape($item->folder); ?>
 128                          </td>
 129                          <td class="small d-none d-md-table-cell">
 130                              <?php echo $this->escape($item->element); ?>
 131                          </td>
 132                          <td class="small d-none d-md-table-cell">
 133                              <?php echo $this->escape($item->access_level); ?>
 134                          </td>
 135                          <td class="d-none d-md-table-cell">
 136                              <?php echo (int) $item->extension_id; ?>
 137                          </td>
 138                      </tr>
 139                  <?php endforeach; ?>
 140                  </tbody>
 141              </table>
 142  
 143              <?php // load the pagination. ?>
 144              <?php echo $this->pagination->getListFooter(); ?>
 145  
 146          <?php endif; ?>
 147  
 148          <input type="hidden" name="task" value="">
 149          <input type="hidden" name="boxchecked" value="0">
 150          <?php echo HTMLHelper::_('form.token'); ?>
 151      </div>
 152  </form>


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