[ 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_templates 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 19 /** @var \Joomla\CMS\WebAsset\WebAssetManager $wa */ 20 $wa = $this->document->getWebAssetManager(); 21 $wa->useScript('table.columns') 22 ->useScript('multiselect'); 23 24 $user = Factory::getUser(); 25 $listOrder = $this->escape($this->state->get('list.ordering')); 26 $listDirn = $this->escape($this->state->get('list.direction')); 27 ?> 28 29 <form action="<?php echo Route::_('index.php?option=com_templates&view=templates'); ?>" method="post" name="adminForm" id="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, 'options' => array('selectorFieldName' => 'client_id'))); ?> 34 <?php if ($this->total > 0) : ?> 35 <table class="table" id="templateList"> 36 <caption class="visually-hidden"> 37 <?php echo Text::_('COM_TEMPLATES_TEMPLATES_TABLE_CAPTION'); ?>, 38 <span id="orderedBy"><?php echo Text::_('JGLOBAL_SORTED_BY'); ?> </span>, 39 <span id="filteredBy"><?php echo Text::_('JGLOBAL_FILTERED_BY'); ?></span> 40 </caption> 41 <thead> 42 <tr> 43 <th scope="col" class="w-20 col1template d-none d-md-table-cell"> 44 <?php echo Text::_('COM_TEMPLATES_HEADING_IMAGE'); ?> 45 </th> 46 <th scope="col" class="w-30"> 47 <?php echo HTMLHelper::_('searchtools.sort', 'COM_TEMPLATES_HEADING_TEMPLATE', 'a.element', $listDirn, $listOrder); ?> 48 </th> 49 <th scope="col" class="w-10 d-none d-md-table-cell text-center"> 50 <?php echo Text::_('JVERSION'); ?> 51 </th> 52 <th scope="col" class="w-10 d-none d-md-table-cell text-center"> 53 <?php echo Text::_('JDATE'); ?> 54 </th> 55 <th scope="col" class="w-25 d-none d-md-table-cell text-center"> 56 <?php echo Text::_('JAUTHOR'); ?> 57 </th> 58 <?php if ($this->pluginState) : ?> 59 <th scope="col" class="w-10 d-none d-md-table-cell text-center"> 60 <?php echo Text::_('COM_TEMPLATES_OVERRIDES'); ?> 61 </th> 62 <?php endif; ?> 63 </tr> 64 </thead> 65 <tbody> 66 <?php foreach ($this->items as $i => $item) : ?> 67 <tr class="row<?php echo $i % 2; ?>"> 68 <td class="text-center d-none d-md-table-cell"> 69 <?php echo HTMLHelper::_('templates.thumb', $item); ?> 70 <?php echo HTMLHelper::_('templates.thumbModal', $item); ?> 71 </td> 72 <th scope="row" class="template-name"> 73 <a href="<?php echo Route::_('index.php?option=com_templates&view=template&id=' . (int) $item->extension_id . '&file=' . $this->file); ?>"> 74 <?php echo Text::sprintf('COM_TEMPLATES_TEMPLATE_DETAILS', ucfirst($item->name)); ?></a> 75 <div> 76 <?php if ($this->preview) : ?> 77 <?php $client = (int) $item->client_id === 1 ? 'administrator' : 'site'; ?> 78 <a href="<?php echo Route::link($client, 'index.php?tp=1&template=' . $item->element); ?>" target="_blank" aria-labelledby="preview-<?php echo $item->extension_id; ?>"> 79 <?php echo Text::_('COM_TEMPLATES_TEMPLATE_PREVIEW'); ?> 80 </a> 81 <div role="tooltip" id="preview-<?php echo $item->extension_id; ?>"><?php echo Text::sprintf('COM_TEMPLATES_TEMPLATE_NEW_PREVIEW', $item->name); ?></div> 82 <?php else : ?> 83 <?php echo Text::_('COM_TEMPLATES_TEMPLATE_NO_PREVIEW'); ?> 84 <?php endif; ?> 85 </div> 86 <?php if (isset($item->xmldata->inheritable) && $item->xmldata->inheritable) : ?> 87 <div class="badge bg-primary"> 88 <span class="fas fa-link text-light" aria-hidden="true"></span> 89 <?php echo Text::_('COM_TEMPLATES_TEMPLATE_IS_PARENT'); ?> 90 </div> 91 <?php endif; ?> 92 <?php if (isset($item->xmldata->parent) && (string) $item->xmldata->parent !== '') : ?> 93 <div class="badge bg-info text-light"> 94 <span class="fas fa-clone text-light" aria-hidden="true"></span> 95 <?php echo Text::sprintf('COM_TEMPLATES_TEMPLATE_IS_CHILD_OF', (string) $item->xmldata->parent); ?> 96 </div> 97 <?php endif; ?> 98 </th> 99 <td class="small d-none d-md-table-cell text-center"> 100 <?php echo $this->escape($item->xmldata->get('version')); ?> 101 </td> 102 <td class="small d-none d-md-table-cell text-center"> 103 <?php echo $this->escape($item->xmldata->get('creationDate')); ?> 104 </td> 105 <td class="d-none d-md-table-cell text-center"> 106 <?php if ($author = $item->xmldata->get('author')) : ?> 107 <div><?php echo $this->escape($author); ?></div> 108 <?php else : ?> 109 — 110 <?php endif; ?> 111 <?php if ($email = $item->xmldata->get('authorEmail')) : ?> 112 <div><?php echo $this->escape($email); ?></div> 113 <?php endif; ?> 114 <?php if ($url = $item->xmldata->get('authorUrl')) : ?> 115 <div><a href="<?php echo $this->escape($url); ?>"><?php echo $this->escape($url); ?></a></div> 116 <?php endif; ?> 117 </td> 118 <?php if ($this->pluginState) : ?> 119 <td class="d-none d-md-table-cell text-center"> 120 <?php if (!empty($item->updated)) : ?> 121 <a href="<?php echo Route::_('index.php?option=com_templates&view=template&id=' . (int) $item->extension_id . '#files'); ?>"> 122 <span class="badge bg-warning text-dark"><?php echo Text::plural('COM_TEMPLATES_N_CONFLICT', $item->updated); ?></span> 123 </a> 124 <?php else : ?> 125 <span class="badge bg-success"><?php echo Text::_('COM_TEMPLATES_UPTODATE'); ?></span> 126 <?php endif; ?> 127 </td> 128 <?php endif; ?> 129 </tr> 130 <?php endforeach; ?> 131 </tbody> 132 </table> 133 134 <?php // load the pagination. ?> 135 <?php echo $this->pagination->getListFooter(); ?> 136 137 <?php endif; ?> 138 139 <input type="hidden" name="task" value=""> 140 <input type="hidden" name="boxchecked" value="0"> 141 <?php echo HTMLHelper::_('form.token'); ?> 142 </div> 143 </div> 144 </div> 145 </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 |