[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

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

   1  <?php
   2  
   3  /**
   4   * @package     Joomla.Administrator
   5   * @subpackage  com_installer
   6   *
   7   * @copyright   (C) 2006 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\HTML\HTMLHelper;
  14  use Joomla\CMS\Language\Text;
  15  use Joomla\CMS\Layout\LayoutHelper;
  16  use Joomla\CMS\Router\Route;
  17  use Joomla\CMS\Version;
  18  
  19  /** @var \Joomla\CMS\WebAsset\WebAssetManager $wa */
  20  $wa = $this->document->getWebAssetManager();
  21  $wa->useScript('table.columns')
  22      ->useScript('multiselect');
  23  
  24  $listOrder = $this->escape($this->state->get('list.ordering'));
  25  $listDirn  = $this->escape($this->state->get('list.direction'));
  26  ?>
  27  <div id="installer-languages" class="clearfix">
  28      <form action="<?php echo Route::_('index.php?option=com_installer&view=languages'); ?>" method="post" name="adminForm" id="adminForm">
  29          <div class="row">
  30              <div class="col-md-12">
  31                  <div id="j-main-container" class="j-main-container">
  32                      <?php echo LayoutHelper::render('joomla.searchtools.default', array('view' => $this, 'options' => array('filterButton' => false))); ?>
  33                      <?php if (empty($this->items)) : ?>
  34                          <div class="alert alert-info">
  35                              <span class="icon-info-circle" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('INFO'); ?></span>
  36                              <?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
  37                          </div>
  38                      <?php else : ?>
  39                      <table class="table">
  40                          <caption class="visually-hidden">
  41                              <?php echo Text::_('COM_INSTALLER_LANGUAGES_TABLE_CAPTION'); ?>,
  42                              <span id="orderedBy"><?php echo Text::_('JGLOBAL_SORTED_BY'); ?> </span>,
  43                              <span id="filteredBy"><?php echo Text::_('JGLOBAL_FILTERED_BY'); ?></span>
  44                          </caption>
  45                          <thead>
  46                              <tr>
  47                                  <td class="w-5"></td>
  48                                  <th scope="col">
  49                                      <?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_LANGUAGE', 'name', $listDirn, $listOrder); ?>
  50                                  </th>
  51                                  <th scope="col" class="w-10 text-center">
  52                                      <?php echo HTMLHelper::_('searchtools.sort', 'COM_INSTALLER_HEADING_LANGUAGE_TAG', 'element', $listDirn, $listOrder); ?>
  53                                  </th>
  54                                  <th scope="col" class="w-15 d-none d-md-table-cell">
  55                                      <?php echo Text::_('JVERSION'); ?>
  56                                  </th>
  57                                  <th scope="col" class="w-35 d-none d-md-table-cell">
  58                                      <?php echo Text::_('COM_INSTALLER_HEADING_DETAILS_URL'); ?>
  59                                  </th>
  60                              </tr>
  61                          </thead>
  62                          <tbody>
  63                          <?php
  64                          $version = new Version();
  65                          $currentShortVersion = preg_replace('#^([0-9\.]+)(|.*)$#', '$1', $version->getShortVersion());
  66                          $i = 0;
  67                          foreach ($this->items as $language) :
  68                              preg_match('#^pkg_([a-z]{2,3}-[A-Z]{2})$#', $language->element, $element);
  69                              $language->code  = $element[1];
  70                              ?>
  71                              <tr class="row<?php echo $i % 2; ?>">
  72                                  <td>
  73                                      <?php $buttonText = (isset($this->installedLang[0][$language->code]) || isset($this->installedLang[1][$language->code])) ? 'REINSTALL' : 'INSTALL'; ?>
  74                                      <?php $buttonClass = (isset($this->installedLang[0][$language->code]) || isset($this->installedLang[1][$language->code])) ? 'btn btn-success btn-sm' : 'btn btn-primary btn-sm'; ?>
  75                                      <?php $onclick = 'document.getElementById(\'install_url\').value = \'' . $language->detailsurl . '\'; Joomla.submitbutton(\'install.install\');'; ?>
  76                                      <input type="button"
  77                                          class="<?php echo $buttonClass; ?>"
  78                                          value="<?php echo Text::_('COM_INSTALLER_' . $buttonText . '_BUTTON'); ?>"
  79                                          aria-label="<?php echo Text::sprintf('COM_INSTALLER_' . $buttonText . '_ARIA', $language->name); ?>"
  80                                          onclick="<?php echo $onclick; ?>"
  81                                      >
  82                                  </td>
  83                                  <th scope="row">
  84                                      <?php echo $language->name; ?>
  85                                  </th>
  86                                  <td class="text-center">
  87                                      <?php echo $language->code; ?>
  88                                  </td>
  89                                  <td class="d-none d-md-table-cell">
  90                                          <?php $minorVersion = $version::MAJOR_VERSION . '.' . $version::MINOR_VERSION; ?>
  91                                          <?php // Display a Note if language pack version is not equal to Joomla version ?>
  92                                          <?php if (strpos($language->version, $minorVersion) !== 0 || strpos($language->version, $currentShortVersion) !== 0) : ?>
  93                                              <span class="badge bg-warning text-dark"><?php echo $language->version; ?></span>
  94                                              <span class="icon-info-circle" aria-hidden="true" tabindex="0"></span>
  95                                              <div role="tooltip" class="text-start" id="tip<?php echo $language->code; ?>">
  96                                              <?php echo Text::_('JGLOBAL_LANGUAGE_VERSION_NOT_PLATFORM'); ?>
  97                                              </div>
  98                                          <?php else : ?>
  99                                              <span class="badge bg-success"><?php echo $language->version; ?></span>
 100                                          <?php endif; ?>
 101                                  </td>
 102                                  <td class="small d-none d-md-table-cell">
 103                                      <a href="<?php echo $language->detailsurl; ?>" target="_blank"><?php echo $language->detailsurl; ?></a>
 104                                  </td>
 105                              </tr>
 106                              <?php $i++; ?>
 107                          <?php endforeach; ?>
 108                          </tbody>
 109                      </table>
 110  
 111                          <?php // load the pagination. ?>
 112                          <?php echo $this->pagination->getListFooter(); ?>
 113  
 114                      <?php endif; ?>
 115                      <input type="hidden" name="task" value="">
 116                      <input type="hidden" name="return" value="<?php echo base64_encode('index.php?option=com_installer&view=languages') ?>">
 117                      <input type="hidden" id="install_url" name="install_url">
 118                      <input type="hidden" name="installtype" value="url">
 119                      <input type="hidden" name="package" value="language">
 120                      <input type="hidden" name="boxchecked" value="0">
 121                      <?php echo HTMLHelper::_('form.token'); ?>
 122                  </div>
 123              </div>
 124          </div>
 125      </form>
 126  </div>


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