[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * @package Joomla.Administrator 5 * @subpackage com_languages 6 * 7 * @copyright (C) 2009 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\String\PunycodeHelper; 19 use Joomla\CMS\Version; 20 21 /** @var \Joomla\CMS\WebAsset\WebAssetManager $wa */ 22 $wa = $this->document->getWebAssetManager(); 23 $wa->useScript('table.columns'); 24 25 $user = Factory::getUser(); 26 $listOrder = $this->escape($this->state->get('list.ordering')); 27 $listDirn = $this->escape($this->state->get('list.direction')); 28 ?> 29 <form action="<?php echo Route::_('index.php?option=com_languages&view=installed'); ?>" method="post" id="adminForm" name="adminForm"> 30 <div class="row"> 31 <div class="col-md-12"> 32 <div id="j-main-container" class="j-main-container"> 33 <?php echo LayoutHelper::render('joomla.searchtools.default', array('view' => $this)); ?> 34 <?php if (empty($this->rows)) : ?> 35 <div class="alert alert-info"> 36 <span class="icon-info-circle" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('INFO'); ?></span> 37 <?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?> 38 </div> 39 <?php else : ?> 40 <table class="table"> 41 <caption class="visually-hidden"> 42 <?php echo Text::_('COM_LANGUAGES_INSTALLED_TABLE_CAPTION'); ?>, 43 <span id="orderedBy"><?php echo Text::_('JGLOBAL_SORTED_BY'); ?> </span>, 44 <span id="filteredBy"><?php echo Text::_('JGLOBAL_FILTERED_BY'); ?></span> 45 </caption> 46 <thead> 47 <tr> 48 <td class="w-1"> 49   50 </td> 51 <th scope="col" class="w-15"> 52 <?php echo HTMLHelper::_('searchtools.sort', 'JGLOBAL_TITLE', 'name', $listDirn, $listOrder); ?> 53 </th> 54 <th scope="col" class="w-15 d-none d-md-table-cell"> 55 <?php echo HTMLHelper::_('searchtools.sort', 'COM_LANGUAGES_HEADING_TITLE_NATIVE', 'nativeName', $listDirn, $listOrder); ?> 56 </th> 57 <th scope="col" class="text-center"> 58 <?php echo HTMLHelper::_('searchtools.sort', 'COM_LANGUAGES_HEADING_LANG_TAG', 'language', $listDirn, $listOrder); ?> 59 </th> 60 <th scope="col" class="w-5 text-center"> 61 <?php echo HTMLHelper::_('searchtools.sort', 'COM_LANGUAGES_HEADING_DEFAULT', 'published', $listDirn, $listOrder); ?> 62 </th> 63 <th scope="col" class="w-5 d-none d-md-table-cell text-center"> 64 <?php echo HTMLHelper::_('searchtools.sort', 'COM_LANGUAGES_HEADING_VERSION', 'version', $listDirn, $listOrder); ?> 65 </th> 66 <th scope="col" class="w-10 d-none d-md-table-cell text-center"> 67 <?php echo HTMLHelper::_('searchtools.sort', 'COM_LANGUAGES_HEADING_DATE', 'creationDate', $listDirn, $listOrder); ?> 68 </th> 69 <th scope="col" class="w-10 d-none d-md-table-cell text-center"> 70 <?php echo HTMLHelper::_('searchtools.sort', 'COM_LANGUAGES_HEADING_AUTHOR', 'author', $listDirn, $listOrder); ?> 71 </th> 72 <th scope="col" class="w-10 d-none d-md-table-cell text-center"> 73 <?php echo HTMLHelper::_('searchtools.sort', 'COM_LANGUAGES_HEADING_AUTHOR_EMAIL', 'authorEmail', $listDirn, $listOrder); ?> 74 </th> 75 <th scope="col" class="w-5 d-none d-md-table-cell text-center"> 76 <?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ID', 'extension_id', $listDirn, $listOrder); ?> 77 </th> 78 </tr> 79 </thead> 80 <tbody> 81 <?php 82 $version = new Version(); 83 $currentShortVersion = preg_replace('#^([0-9\.]+)(|.*)$#', '$1', $version->getShortVersion()); 84 foreach ($this->rows as $i => $row) : 85 $canCreate = $user->authorise('core.create', 'com_languages'); 86 $canEdit = $user->authorise('core.edit', 'com_languages'); 87 $canChange = $user->authorise('core.edit.state', 'com_languages'); 88 ?> 89 <tr class="row<?php echo $i % 2; ?>"> 90 <td> 91 <?php echo HTMLHelper::_('languages.id', $i, $row->language); ?> 92 </td> 93 <th scope="row"> 94 <label for="cb<?php echo $i; ?>"> 95 <?php echo $this->escape($row->name); ?> 96 </label> 97 </th> 98 <td class="d-none d-md-table-cell"> 99 <?php echo $this->escape($row->nativeName); ?> 100 </td> 101 <td class="text-center"> 102 <?php echo $this->escape($row->language); ?> 103 </td> 104 <td class="text-center"> 105 <?php echo HTMLHelper::_('jgrid.isdefault', $row->published, $i, 'installed.', !$row->published && $canChange); ?> 106 </td> 107 <td class="d-none d-md-table-cell text-center"> 108 <?php $minorVersion = $version::MAJOR_VERSION . '.' . $version::MINOR_VERSION; ?> 109 <?php // Display a Note if language pack version is not equal to Joomla version ?> 110 <?php if (strpos($row->version, $minorVersion) !== 0 || strpos($row->version, $currentShortVersion) !== 0) : ?> 111 <span class="badge bg-warning text-dark" title="<?php echo Text::_('JGLOBAL_LANGUAGE_VERSION_NOT_PLATFORM'); ?>"><?php echo $row->version; ?></span> 112 <?php else : ?> 113 <span class="badge bg-success"><?php echo $row->version; ?></span> 114 <?php endif; ?> 115 </td> 116 <td class="d-none d-md-table-cell text-center"> 117 <?php echo $this->escape($row->creationDate); ?> 118 </td> 119 <td class="d-none d-md-table-cell text-center"> 120 <?php echo $this->escape($row->author); ?> 121 </td> 122 <td class="d-none d-md-table-cell text-center"> 123 <?php echo PunycodeHelper::emailToUTF8($this->escape($row->authorEmail)); ?> 124 </td> 125 <td class="d-none d-md-table-cell text-center"> 126 <?php echo $this->escape($row->extension_id); ?> 127 </td> 128 </tr> 129 <?php endforeach; ?> 130 </tbody> 131 </table> 132 133 <?php // load the pagination. ?> 134 <?php echo $this->pagination->getListFooter(); ?> 135 136 <?php endif; ?> 137 <input type="hidden" name="task" value=""> 138 <input type="hidden" name="boxchecked" value="0"> 139 <?php echo HTMLHelper::_('form.token'); ?> 140 </div> 141 </div> 142 </div> 143 </form>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |