[ 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) 2011 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\LanguageHelper; 16 use Joomla\CMS\Language\Text; 17 use Joomla\CMS\Layout\LayoutHelper; 18 use Joomla\CMS\Router\Route; 19 20 /** @var \Joomla\CMS\WebAsset\WebAssetManager $wa */ 21 $wa = $this->document->getWebAssetManager(); 22 $wa->useScript('table.columns') 23 ->useScript('multiselect'); 24 25 $client = $this->state->get('filter.client') == 'site' ? Text::_('JSITE') : Text::_('JADMINISTRATOR'); 26 $language = $this->state->get('filter.language'); 27 $listOrder = $this->escape($this->state->get('list.ordering')); 28 $listDirn = $this->escape($this->state->get('list.direction')); 29 30 $oppositeClient = $this->state->get('filter.client') == 'administrator' ? Text::_('JSITE') : Text::_('JADMINISTRATOR'); 31 $oppositeFilename = constant('JPATH_' . strtoupper($this->state->get('filter.client') === 'site' ? 'administrator' : 'site')) 32 . '/language/overrides/' . $this->state->get('filter.language', 'en-GB') . '.override.ini'; 33 $oppositeStrings = LanguageHelper::parseIniFile($oppositeFilename); 34 ?> 35 36 <form action="<?php echo Route::_('index.php?option=com_languages&view=overrides'); ?>" method="post" name="adminForm" id="adminForm"> 37 <div class="row"> 38 <div class="col-md-12"> 39 <div id="j-main-container" class="j-main-container"> 40 <?php echo LayoutHelper::render('joomla.searchtools.default', array('view' => $this, 'options' => ['selectorFieldName' => 'language_client'])); ?> 41 <div class="clearfix"></div> 42 <?php if (empty($this->items)) : ?> 43 <div class="alert alert-info"> 44 <span class="icon-info-circle" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('INFO'); ?></span> 45 <?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?> 46 </div> 47 <?php else : ?> 48 <table class="table" id="overrideList"> 49 <caption class="visually-hidden"> 50 <?php echo Text::_('COM_LANGUAGES_OVERRIDES_TABLE_CAPTION'); ?>, 51 <span id="orderedBy"><?php echo Text::_('JGLOBAL_SORTED_BY'); ?> </span>, 52 <span id="filteredBy"><?php echo Text::_('JGLOBAL_FILTERED_BY'); ?></span> 53 </caption> 54 <thead> 55 <tr> 56 <td class="w-1 text-center"> 57 <?php echo HTMLHelper::_('grid.checkall'); ?> 58 </td> 59 <th scope="col" class="w-30"> 60 <?php echo HTMLHelper::_('searchtools.sort', 'COM_LANGUAGES_VIEW_OVERRIDES_KEY', 'key', $listDirn, $listOrder); ?> 61 </th> 62 <th scope="col" class="d-none d-md-table-cell"> 63 <?php echo HTMLHelper::_('searchtools.sort', 'COM_LANGUAGES_VIEW_OVERRIDES_TEXT', 'text', $listDirn, $listOrder); ?> 64 </th> 65 <th scope="col" class="d-none d-md-table-cell"> 66 <?php echo Text::_('COM_LANGUAGES_FIELD_LANG_TAG_LABEL'); ?> 67 </th> 68 <th scope="col" class="d-none d-md-table-cell"> 69 <?php echo Text::_('JCLIENT'); ?> 70 </th> 71 </tr> 72 </thead> 73 <tbody> 74 <?php $canEdit = Factory::getUser()->authorise('core.edit', 'com_languages'); ?> 75 <?php $i = 0; ?> 76 <?php foreach ($this->items as $key => $text) : ?> 77 <tr class="row<?php echo $i % 2; ?>" id="overriderrow<?php echo $i; ?>"> 78 <td class="text-center"> 79 <?php echo HTMLHelper::_('grid.id', $i, $key, false, 'cid', 'cb', $key); ?> 80 </td> 81 <th scope="row"> 82 <?php if ($canEdit) : ?> 83 <a id="key[<?php echo $this->escape($key); ?>]" href="<?php echo Route::_('index.php?option=com_languages&task=override.edit&id=' . $key); ?>" title="<?php echo Text::_('JACTION_EDIT'); ?> <?php echo $this->escape($key); ?>"> 84 <?php echo $this->escape($key); ?></a> 85 <?php else : ?> 86 <?php echo $this->escape($key); ?> 87 <?php endif; ?> 88 </th> 89 <td class="d-none d-md-table-cell"> 90 <span id="string[<?php echo $this->escape($key); ?>]"><?php echo HTMLHelper::_('string.truncate', $this->escape($text), 200); ?></span> 91 </td> 92 <td class="d-none d-md-table-cell"> 93 <?php echo $language; ?> 94 </td> 95 <td class="d-none d-md-table-cell"> 96 <?php echo $client; ?> 97 <?php 98 if (isset($oppositeStrings[$key]) && ($oppositeStrings[$key] == $text)) { 99 echo '/' . $oppositeClient; 100 } 101 ?> 102 </td> 103 </tr> 104 <?php $i++; ?> 105 <?php endforeach; ?> 106 </tbody> 107 </table> 108 109 <?php // load the pagination. ?> 110 <?php echo $this->pagination->getListFooter(); ?> 111 112 <?php endif; ?> 113 114 <input type="hidden" name="task" value=""> 115 <input type="hidden" name="boxchecked" value="0"> 116 <?php echo HTMLHelper::_('form.token'); ?> 117 </div> 118 </div> 119 </div> 120 </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 |