[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/administrator/components/com_installer/tmpl/updatesites/ -> default.php (source)

   1  <?php
   2  
   3  /**
   4   * @package     Joomla.Administrator
   5   * @subpackage  com_installer
   6   *
   7   * @copyright   (C) 2014 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  /** @var \Joomla\CMS\WebAsset\WebAssetManager $wa */
  20  $wa = $this->document->getWebAssetManager();
  21  $wa->useScript('table.columns')
  22      ->useScript('multiselect');
  23  
  24  $user      = Factory::getApplication()->getIdentity();
  25  $userId    = $user->get('id');
  26  $listOrder = $this->escape($this->state->get('list.ordering'));
  27  $listDirn  = $this->escape($this->state->get('list.direction'));
  28  ?>
  29  <div id="installer-manage" class="clearfix">
  30      <form action="<?php echo Route::_('index.php?option=com_installer&view=updatesites'); ?>" method="post" name="adminForm" id="adminForm">
  31          <div class="row">
  32              <div class="col-md-12">
  33                  <div id="j-main-container" class="j-main-container">
  34                      <?php echo LayoutHelper::render('joomla.searchtools.default', array('view' => $this)); ?>
  35                      <?php if (empty($this->items)) : ?>
  36                          <div class="alert alert-info">
  37                              <span class="icon-info-circle" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('INFO'); ?></span>
  38                              <?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
  39                          </div>
  40                      <?php else : ?>
  41                      <table class="table">
  42                          <caption class="visually-hidden">
  43                              <?php echo Text::_('COM_INSTALLER_UPDATESITES_TABLE_CAPTION'); ?>,
  44                              <span id="orderedBy"><?php echo Text::_('JGLOBAL_SORTED_BY'); ?> </span>,
  45                              <span id="filteredBy"><?php echo Text::_('JGLOBAL_FILTERED_BY'); ?></span>
  46                          </caption>
  47                          <thead>
  48                              <tr>
  49                                  <td class="w-1 text-center">
  50                                      <?php echo HTMLHelper::_('grid.checkall'); ?>
  51                                  </td>
  52                                  <th scope="col" class="w-1 text-center">
  53                                      <?php echo HTMLHelper::_('searchtools.sort', 'JSTATUS', 'enabled', $listDirn, $listOrder); ?>
  54                                  </th>
  55                                  <th scope="col">
  56                                      <?php echo HTMLHelper::_('searchtools.sort', 'COM_INSTALLER_HEADING_UPDATESITE_NAME', 'update_site_name', $listDirn, $listOrder); ?>
  57                                  </th>
  58                                  <th scope="col" class="w-20 d-none d-md-table-cell">
  59                                      <?php echo HTMLHelper::_('searchtools.sort', 'COM_INSTALLER_HEADING_NAME', 'name', $listDirn, $listOrder); ?>
  60                                  </th>
  61                                  <th scope="col" class="w-10 d-none d-md-table-cell">
  62                                      <?php echo HTMLHelper::_('searchtools.sort', 'COM_INSTALLER_HEADING_LOCATION', 'client_translated', $listDirn, $listOrder); ?>
  63                                  </th>
  64                                  <th scope="col" class="w-10 d-none d-md-table-cell">
  65                                      <?php echo HTMLHelper::_('searchtools.sort', 'COM_INSTALLER_HEADING_TYPE', 'type_translated', $listDirn, $listOrder); ?>
  66                                  </th>
  67                                  <th scope="col" class="w-10 d-none d-md-table-cell">
  68                                      <?php echo HTMLHelper::_('searchtools.sort', 'COM_INSTALLER_HEADING_FOLDER', 'folder_translated', $listDirn, $listOrder); ?>
  69                                  </th>
  70                                  <th scope="col" class="w-5 d-none d-md-table-cell">
  71                                      <?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ID', 'update_site_id', $listDirn, $listOrder); ?>
  72                                  </th>
  73                              </tr>
  74                          </thead>
  75                          <tbody>
  76                          <?php foreach ($this->items as $i => $item) :
  77                              $canCheckin = $user->authorise('core.manage', 'com_checkin')
  78                                  || $item->checked_out === $userId
  79                                  || is_null($item->checked_out);
  80                              $canEdit    = $user->authorise('core.edit', 'com_installer');
  81                              ?>
  82                              <tr class="row<?php echo $i % 2;
  83                              if ((int) $item->enabled === 2) {
  84                                  echo ' protected';
  85                              } ?>">
  86                                  <td class="text-center">
  87                                      <?php echo HTMLHelper::_('grid.id', $i, $item->update_site_id, false, 'cid', 'cb', $item->update_site_name); ?>
  88                                  </td>
  89                                  <td class="text-center">
  90                                      <?php if (!$item->element) : ?>
  91                                          <strong>X</strong>
  92                                      <?php else : ?>
  93                                          <?php echo HTMLHelper::_('updatesites.state', $item->enabled, $i, $item->enabled < 2, 'cb'); ?>
  94                                      <?php endif; ?>
  95                                  </td>
  96                                  <th scope="row">
  97                                      <?php if ($item->checked_out) : ?>
  98                                          <?php echo HTMLHelper::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'updatesites.', $canCheckin); ?>
  99                                      <?php endif; ?>
 100                                      <?php if ($canEdit) : ?>
 101                                          <a
 102                                              href="<?php echo Route::_('index.php?option=com_installer&task=updatesite.edit&update_site_id=' . (int) $item->update_site_id); ?>"
 103                                              title="<?php echo Text::_('JACTION_EDIT'); ?> <?php echo $this->escape($item->update_site_name); ?>"
 104                                          >
 105                                              <?php echo Text::_($item->update_site_name); ?>
 106                                          </a>
 107                                      <?php else : ?>
 108                                          <?php echo Text::_($item->update_site_name); ?>
 109                                      <?php endif; ?>
 110                                      <div class="small break-word">
 111                                          <a href="<?php echo $item->location; ?>" target="_blank" rel="noopener noreferrer"><?php echo $this->escape($item->location); ?></a>
 112                                      </div>
 113                                      <div class="small break-word">
 114                                          <?php if ($item->downloadKey['valid']) : ?>
 115                                          <span class="badge bg-info">
 116                                              <?php echo Text::_('COM_INSTALLER_DOWNLOADKEY_EXTRA_QUERY_LABEL'); ?>
 117                                          </span>
 118                                          <code><?php echo $item->downloadKey['value']; ?></code>
 119                                          <?php elseif ($item->downloadKey['supported']) : ?>
 120                                          <span class="badge bg-danger" tabindex="0">
 121                                              <?php echo Text::_('COM_INSTALLER_DOWNLOADKEY_MISSING_LABEL'); ?>
 122                                          </span>
 123                                          <div role="tooltip" id="tip-missing<?php echo $i; ?>">
 124                                              <?php echo Text::_('COM_INSTALLER_DOWNLOADKEY_MISSING_TIP'); ?>
 125                                          </div>
 126                                          <?php endif; ?>
 127                                      </div>
 128                                  </th>
 129                                  <td class="d-none d-md-table-cell">
 130                                      <span tabindex="0">
 131                                          <?php echo $item->name; ?>
 132                                      </span>
 133                                      <div role="tooltip" id="tip<?php echo $i; ?>">
 134                                          <?php echo $item->description; ?>
 135                                      </div>
 136                                  </td>
 137                                  <td class="d-none d-md-table-cell">
 138                                      <?php echo $item->client_translated; ?>
 139                                  </td>
 140                                  <td class="d-none d-md-table-cell">
 141                                      <?php echo $item->type_translated; ?>
 142                                  </td>
 143                                  <td class="d-none d-md-table-cell">
 144                                      <?php echo $item->folder_translated; ?>
 145                                  </td>
 146                                  <td class="d-none d-md-table-cell">
 147                                      <?php echo $item->update_site_id; ?>
 148                                  </td>
 149                              </tr>
 150                          <?php endforeach; ?>
 151                          </tbody>
 152                      </table>
 153  
 154                          <?php // Load the pagination. ?>
 155                          <?php echo $this->pagination->getListFooter(); ?>
 156  
 157                      <?php endif; ?>
 158                      <input type="hidden" name="task" value="">
 159                      <input type="hidden" name="boxchecked" value="0">
 160                      <?php echo HTMLHelper::_('form.token'); ?>
 161                  </div>
 162              </div>
 163          </div>
 164      </form>
 165  </div>


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