[ 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_content 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\Multilanguage; 16 use Joomla\CMS\Language\Text; 17 use Joomla\CMS\Layout\LayoutHelper; 18 use Joomla\CMS\Router\Route; 19 use Joomla\CMS\Session\Session; 20 use Joomla\Component\Content\Site\Helper\RouteHelper; 21 22 $app = Factory::getApplication(); 23 24 if ($app->isClient('site')) { 25 Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); 26 } 27 28 /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ 29 $wa = $this->document->getWebAssetManager(); 30 $wa->useScript('core') 31 ->useScript('multiselect') 32 ->useScript('com_content.admin-articles-modal'); 33 34 $function = $app->input->getCmd('function', 'jSelectArticle'); 35 $editor = $app->input->getCmd('editor', ''); 36 $listOrder = $this->escape($this->state->get('list.ordering')); 37 $listDirn = $this->escape($this->state->get('list.direction')); 38 $onclick = $this->escape($function); 39 $multilang = Multilanguage::isEnabled(); 40 41 if (!empty($editor)) { 42 // This view is used also in com_menus. Load the xtd script only if the editor is set! 43 $this->document->addScriptOptions('xtd-articles', array('editor' => $editor)); 44 $onclick = "jSelectArticle"; 45 } 46 ?> 47 <div class="container-popup"> 48 49 <form action="<?php echo Route::_('index.php?option=com_content&view=articles&layout=modal&tmpl=component&function=' . $function . '&' . Session::getFormToken() . '=1&editor=' . $editor); ?>" method="post" name="adminForm" id="adminForm"> 50 51 <?php echo LayoutHelper::render('joomla.searchtools.default', array('view' => $this)); ?> 52 53 <?php if (empty($this->items)) : ?> 54 <div class="alert alert-info"> 55 <span class="icon-info-circle" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('INFO'); ?></span> 56 <?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?> 57 </div> 58 <?php else : ?> 59 <table class="table table-sm"> 60 <caption class="visually-hidden"> 61 <?php echo Text::_('COM_CONTENT_ARTICLES_TABLE_CAPTION'); ?>, 62 <span id="orderedBy"><?php echo Text::_('JGLOBAL_SORTED_BY'); ?> </span>, 63 <span id="filteredBy"><?php echo Text::_('JGLOBAL_FILTERED_BY'); ?></span> 64 </caption> 65 <thead> 66 <tr> 67 <th scope="col" class="w-1 text-center"> 68 <?php echo HTMLHelper::_('searchtools.sort', 'JSTATUS', 'a.state', $listDirn, $listOrder); ?> 69 </th> 70 <th scope="col" class="title"> 71 <?php echo HTMLHelper::_('searchtools.sort', 'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder); ?> 72 </th> 73 <th scope="col" class="w-10 d-none d-md-table-cell"> 74 <?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ACCESS', 'a.access', $listDirn, $listOrder); ?> 75 </th> 76 <?php if ($multilang) : ?> 77 <th scope="col" class="w-15"> 78 <?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_LANGUAGE', 'language', $listDirn, $listOrder); ?> 79 </th> 80 <?php endif; ?> 81 <th scope="col" class="w-10 d-none d-md-table-cell"> 82 <?php echo HTMLHelper::_('searchtools.sort', 'JDATE', 'a.created', $listDirn, $listOrder); ?> 83 </th> 84 <th scope="col" class="w-1 d-none d-md-table-cell"> 85 <?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?> 86 </th> 87 </tr> 88 </thead> 89 <tbody> 90 <?php 91 $iconStates = array( 92 -2 => 'icon-trash', 93 0 => 'icon-times', 94 1 => 'icon-check', 95 ); 96 ?> 97 <?php foreach ($this->items as $i => $item) : ?> 98 <?php if ($item->language && $multilang) { 99 $tag = strlen($item->language); 100 if ($tag == 5) { 101 $lang = substr($item->language, 0, 2); 102 } elseif ($tag == 6) { 103 $lang = substr($item->language, 0, 3); 104 } else { 105 $lang = ''; 106 } 107 } elseif (!$multilang) { 108 $lang = ''; 109 } 110 ?> 111 <tr class="row<?php echo $i % 2; ?>"> 112 <td class="text-center"> 113 <span class="tbody-icon"> 114 <span class="<?php echo $iconStates[$this->escape($item->state)]; ?>" aria-hidden="true"></span> 115 </span> 116 </td> 117 <th scope="row"> 118 <?php $attribs = 'data-function="' . $this->escape($onclick) . '"' 119 . ' data-id="' . $item->id . '"' 120 . ' data-title="' . $this->escape($item->title) . '"' 121 . ' data-cat-id="' . $this->escape($item->catid) . '"' 122 . ' data-uri="' . $this->escape(RouteHelper::getArticleRoute($item->id, $item->catid, $item->language)) . '"' 123 . ' data-language="' . $this->escape($lang) . '"'; 124 ?> 125 <a class="select-link" href="javascript:void(0)" <?php echo $attribs; ?>> 126 <?php echo $this->escape($item->title); ?> 127 </a> 128 <div class="small break-word"> 129 <?php if (empty($item->note)) : ?> 130 <?php echo Text::sprintf('JGLOBAL_LIST_ALIAS', $this->escape($item->alias)); ?> 131 <?php else : ?> 132 <?php echo Text::sprintf('JGLOBAL_LIST_ALIAS_NOTE', $this->escape($item->alias), $this->escape($item->note)); ?> 133 <?php endif; ?> 134 </div> 135 <div class="small"> 136 <?php echo Text::_('JCATEGORY') . ': ' . $this->escape($item->category_title); ?> 137 </div> 138 </th> 139 <td class="small d-none d-md-table-cell"> 140 <?php echo $this->escape($item->access_level); ?> 141 </td> 142 <?php if ($multilang) : ?> 143 <td class="small"> 144 <?php echo LayoutHelper::render('joomla.content.language', $item); ?> 145 </td> 146 <?php endif; ?> 147 <td class="small d-none d-md-table-cell"> 148 <?php echo HTMLHelper::_('date', $item->created, Text::_('DATE_FORMAT_LC4')); ?> 149 </td> 150 <td class="small d-none d-md-table-cell"> 151 <?php echo (int) $item->id; ?> 152 </td> 153 </tr> 154 <?php endforeach; ?> 155 </tbody> 156 </table> 157 158 <?php // load the pagination. ?> 159 <?php echo $this->pagination->getListFooter(); ?> 160 161 <?php endif; ?> 162 163 <input type="hidden" name="task" value=""> 164 <input type="hidden" name="boxchecked" value="0"> 165 <input type="hidden" name="forcedLanguage" value="<?php echo $app->input->get('forcedLanguage', '', 'CMD'); ?>"> 166 <?php echo HTMLHelper::_('form.token'); ?> 167 168 </form> 169 </div>
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 |