[ 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) 2008 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 == 'a.ordering'; 29 30 if ($saveOrder && !empty($this->items)) { 31 $saveOrderingUrl = 'index.php?option=com_languages&task=languages.saveOrderAjax&tmpl=component&' . Session::getFormToken() . '=1'; 32 HTMLHelper::_('draggablelist.draggable'); 33 } 34 35 ?> 36 <form action="<?php echo Route::_('index.php?option=com_languages&view=languages'); ?>" 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)); ?> 41 <?php if (empty($this->items)) : ?> 42 <div class="alert alert-info"> 43 <span class="icon-info-circle" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('INFO'); ?></span> 44 <?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?> 45 </div> 46 <?php else : ?> 47 <table class="table" id="languageList"> 48 <caption class="visually-hidden"> 49 <?php echo Text::_('COM_LANGUAGES_CONTENT_TABLE_CAPTION'); ?>, 50 <span id="orderedBy"><?php echo Text::_('JGLOBAL_SORTED_BY'); ?> </span>, 51 <span id="filteredBy"><?php echo Text::_('JGLOBAL_FILTERED_BY'); ?></span> 52 </caption> 53 <thead> 54 <tr> 55 <td class="w-1 text-center"> 56 <?php echo HTMLHelper::_('grid.checkall'); ?> 57 </td> 58 <th scope="col" class="w-1 text-center d-none d-md-table-cell"> 59 <?php echo HTMLHelper::_('searchtools.sort', '', 'a.ordering', $listDirn, $listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-sort'); ?> 60 </th> 61 <th scope="col" class="w-1 text-center"> 62 <?php echo HTMLHelper::_('searchtools.sort', 'JSTATUS', 'a.published', $listDirn, $listOrder); ?> 63 </th> 64 <th scope="col" class="title"> 65 <?php echo HTMLHelper::_('searchtools.sort', 'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder); ?> 66 </th> 67 <th scope="col" class="title d-none d-md-table-cell"> 68 <?php echo HTMLHelper::_('searchtools.sort', 'COM_LANGUAGES_HEADING_TITLE_NATIVE', 'a.title_native', $listDirn, $listOrder); ?> 69 </th> 70 <th scope="col" class="w-10 d-none d-md-table-cell text-center"> 71 <?php echo HTMLHelper::_('searchtools.sort', 'COM_LANGUAGES_HEADING_LANG_TAG', 'a.lang_code', $listDirn, $listOrder); ?> 72 </th> 73 <th scope="col" class="w-10 d-none d-md-table-cell text-center"> 74 <?php echo HTMLHelper::_('searchtools.sort', 'COM_LANGUAGES_HEADING_LANG_CODE', 'a.sef', $listDirn, $listOrder); ?> 75 </th> 76 <th scope="col" class="w-10 d-none d-md-table-cell"> 77 <?php echo HTMLHelper::_('searchtools.sort', 'COM_LANGUAGES_HEADING_LANG_IMAGE', 'a.image', $listDirn, $listOrder); ?> 78 </th> 79 <th scope="col" class="w-10 d-none d-md-table-cell text-center"> 80 <?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ACCESS', 'a.access', $listDirn, $listOrder); ?> 81 </th> 82 <th scope="col" class="w-10 d-none d-md-table-cell text-center"> 83 <?php echo HTMLHelper::_('searchtools.sort', 'COM_LANGUAGES_HEADING_HOMEPAGE', 'l.home', $listDirn, $listOrder); ?> 84 </th> 85 <th scope="col" class="w-5 d-none d-md-table-cell text-center"> 86 <?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.lang_id', $listDirn, $listOrder); ?> 87 </th> 88 </tr> 89 </thead> 90 <tbody<?php if ($saveOrder) : 91 ?> class="js-draggable" data-url="<?php echo $saveOrderingUrl; ?>" data-direction="<?php echo strtolower($listDirn); ?>"<?php 92 endif; ?>> 93 <?php 94 foreach ($this->items as $i => $item) : 95 $canCreate = $user->authorise('core.create', 'com_languages'); 96 $canEdit = $user->authorise('core.edit', 'com_languages'); 97 $canChange = $user->authorise('core.edit.state', 'com_languages'); 98 ?> 99 <tr class="row<?php echo $i % 2; ?>"> 100 <td> 101 <?php echo HTMLHelper::_('grid.id', $i, $item->lang_id, false, 'cid', 'cb', $item->title); ?> 102 </td> 103 <td class="text-center d-none d-md-table-cell"> 104 <?php if ($canChange) : 105 $disableClassName = ''; 106 $disabledLabel = ''; 107 108 if (!$saveOrder) : 109 $disabledLabel = Text::_('JORDERINGDISABLED'); 110 $disableClassName = 'inactive'; 111 endif; ?> 112 <span class="sortable-handler <?php echo $disableClassName; ?>" title="<?php echo $disabledLabel; ?>"> 113 <span class="icon-ellipsis-v" aria-hidden="true"></span> 114 </span> 115 <input type="text" name="order[]" size="5" value="<?php echo $item->ordering; ?>" class="width-20 text-area-order hidden"> 116 <?php else : ?> 117 <span class="sortable-handler inactive"> 118 <span class="icon-ellipsis-v" aria-hidden="true"></span> 119 </span> 120 <?php endif; ?> 121 </td> 122 <td class="text-center"> 123 <?php echo HTMLHelper::_('jgrid.published', $item->published, $i, 'languages.', $canChange); ?> 124 </td> 125 <th scope="row"> 126 <?php if ($canEdit) : ?> 127 <a href="<?php echo Route::_('index.php?option=com_languages&task=language.edit&lang_id=' . (int) $item->lang_id); ?>" title="<?php echo Text::_('JACTION_EDIT'); ?> <?php echo $this->escape($item->title); ?>"> 128 <?php echo $this->escape($item->title); ?></a> 129 <?php else : ?> 130 <?php echo $this->escape($item->title); ?> 131 <?php endif; ?> 132 </th> 133 <td class="d-none d-md-table-cell"> 134 <?php echo $this->escape($item->title_native); ?> 135 </td> 136 <td class="d-none d-md-table-cell text-center"> 137 <?php echo $this->escape($item->lang_code); ?> 138 </td> 139 <td class="d-none d-md-table-cell text-center"> 140 <?php echo $this->escape($item->sef); ?> 141 </td> 142 <td class="d-none d-md-table-cell"> 143 <?php if ($item->image) : ?> 144 <?php echo HTMLHelper::_('image', 'mod_languages/' . $item->image . '.gif', $item->image, array('class' => 'me-1'), true); ?><?php echo $this->escape($item->image); ?> 145 <?php else : ?> 146 <?php echo Text::_('JNONE'); ?> 147 <?php endif; ?> 148 </td> 149 <td class="d-none d-md-table-cell text-center"> 150 <?php echo $this->escape($item->access_level); ?> 151 </td> 152 <td class="d-none d-md-table-cell text-center"> 153 <?php echo ($item->home == '1') ? Text::_('JYES') : Text::_('JNO'); ?> 154 </td> 155 <td class="d-none d-md-table-cell text-center"> 156 <?php echo $this->escape($item->lang_id); ?> 157 </td> 158 </tr> 159 <?php endforeach; ?> 160 </tbody> 161 </table> 162 163 <?php // load the pagination. ?> 164 <?php echo $this->pagination->getListFooter(); ?> 165 166 <?php endif; ?> 167 <input type="hidden" name="task" value=""> 168 <input type="hidden" name="boxchecked" value="0"> 169 <?php echo HTMLHelper::_('form.token'); ?> 170 </div> 171 </div> 172 </div> 173 </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 |