[ 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_redirect 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\Uri\Uri; 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 ?> 29 <form action="<?php echo Route::_('index.php?option=com_redirect&view=links'); ?>" method="post" name="adminForm" id="adminForm"> 30 <div id="j-main-container" class="j-main-container"> 31 <?php echo LayoutHelper::render('joomla.searchtools.default', array('view' => $this)); ?> 32 <?php if ($this->redirectPluginId) : ?> 33 <?php $link = Route::_('index.php?option=com_plugins&client_id=0&task=plugin.edit&extension_id=' . $this->redirectPluginId . '&tmpl=component&layout=modal'); ?> 34 <?php echo HTMLHelper::_( 35 'bootstrap.renderModal', 36 'plugin' . $this->redirectPluginId . 'Modal', 37 array( 38 'url' => $link, 39 'title' => Text::_('COM_REDIRECT_EDIT_PLUGIN_SETTINGS'), 40 'height' => '400px', 41 'width' => '800px', 42 'bodyHeight' => '70', 43 'modalWidth' => '80', 44 'closeButton' => false, 45 'backdrop' => 'static', 46 'keyboard' => false, 47 'footer' => '<button type="button" class="btn btn-secondary" data-bs-dismiss="modal"' 48 . ' onclick="Joomla.iframeButtonClick({iframeSelector: \'#plugin' . $this->redirectPluginId . 'Modal\', buttonSelector: \'#closeBtn\'})">' 49 . Text::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</button>' 50 . '<button type="button" class="btn btn-primary" data-bs-dismiss="modal" onclick="Joomla.iframeButtonClick({iframeSelector: \'#plugin' . $this->redirectPluginId . 'Modal\', buttonSelector: \'#saveBtn\'})">' 51 . Text::_('JSAVE') . '</button>' 52 . '<button type="button" class="btn btn-success" onclick="Joomla.iframeButtonClick({iframeSelector: \'#plugin' . $this->redirectPluginId . 'Modal\', buttonSelector: \'#applyBtn\'}); return false;">' 53 . Text::_('JAPPLY') . '</button>' 54 ) 55 ); ?> 56 <?php endif; ?> 57 58 <?php if (empty($this->items)) : ?> 59 <div class="alert alert-info"> 60 <span class="icon-info-circle" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('INFO'); ?></span> 61 <?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?> 62 </div> 63 <?php else : ?> 64 <table class="table"> 65 <caption class="visually-hidden"> 66 <?php echo Text::_('COM_REDIRECTS_TABLE_CAPTION'); ?>, 67 <span id="orderedBy"><?php echo Text::_('JGLOBAL_SORTED_BY'); ?> </span>, 68 <span id="filteredBy"><?php echo Text::_('JGLOBAL_FILTERED_BY'); ?></span> 69 </caption> 70 <thead> 71 <tr> 72 <td class="w-1 text-center"> 73 <?php echo HTMLHelper::_('grid.checkall'); ?> 74 </td> 75 <th scope="col" class="w-1 text-center"> 76 <?php echo HTMLHelper::_('searchtools.sort', 'JSTATUS', 'a.published', $listDirn, $listOrder); ?> 77 </th> 78 <th scope="col" class="title"> 79 <?php echo HTMLHelper::_('searchtools.sort', 'COM_REDIRECT_HEADING_OLD_URL', 'a.old_url', $listDirn, $listOrder); ?> 80 </th> 81 <th scope="col"> 82 <?php echo HTMLHelper::_('searchtools.sort', 'COM_REDIRECT_HEADING_NEW_URL', 'a.new_url', $listDirn, $listOrder); ?> 83 </th> 84 <th scope="col" class="d-none d-md-table-cell"> 85 <?php echo HTMLHelper::_('searchtools.sort', 'COM_REDIRECT_HEADING_REFERRER', 'a.referer', $listDirn, $listOrder); ?> 86 </th> 87 <th scope="col" class="w-1 d-none d-md-table-cell"> 88 <?php echo HTMLHelper::_('searchtools.sort', 'COM_REDIRECT_HEADING_CREATED_DATE', 'a.created_date', $listDirn, $listOrder); ?> 89 </th> 90 <th scope="col" class="w-1 d-none d-md-table-cell"> 91 <?php echo HTMLHelper::_('searchtools.sort', 'COM_REDIRECT_HEADING_HITS', 'a.hits', $listDirn, $listOrder); ?> 92 </th> 93 <th scope="col" class="w-1 d-none d-md-table-cell"> 94 <?php echo HTMLHelper::_('searchtools.sort', 'COM_REDIRECT_HEADING_STATUS_CODE', 'a.header', $listDirn, $listOrder); ?> 95 </th> 96 <th scope="col" class="w-1 d-none d-md-table-cell"> 97 <?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?> 98 </th> 99 </tr> 100 </thead> 101 <tbody> 102 <?php foreach ($this->items as $i => $item) : 103 $canEdit = $user->authorise('core.edit', 'com_redirect'); 104 $canChange = $user->authorise('core.edit.state', 'com_redirect'); 105 ?> 106 <tr class="row<?php echo $i % 2; ?>"> 107 <td class="text-center"> 108 <?php echo HTMLHelper::_('grid.id', $i, $item->id, false, 'cid', 'cb', $item->old_url); ?> 109 </td> 110 <td class="text-center"> 111 <?php echo HTMLHelper::_('redirect.published', $item->published, $i); ?> 112 </td> 113 <th scope="row" class="break-word"> 114 <?php if ($canEdit) : ?> 115 <a href="<?php echo Route::_('index.php?option=com_redirect&task=link.edit&id=' . $item->id); ?>" title="<?php echo Text::_('JACTION_EDIT'); ?> <?php echo $this->escape($item->old_url); ?>"> 116 <?php echo $this->escape(str_replace(Uri::root(), '', rawurldecode($item->old_url))); ?> 117 </a> 118 <?php else : ?> 119 <?php echo $this->escape(str_replace(Uri::root(), '', rawurldecode($item->old_url))); ?> 120 <?php endif; ?> 121 </th> 122 <td class="small break-word"> 123 <?php echo $this->escape(rawurldecode($item->new_url)); ?> 124 </td> 125 <td class="small break-word d-none d-md-table-cell"> 126 <?php echo $this->escape($item->referer); ?> 127 </td> 128 <td class="small d-none d-md-table-cell"> 129 <?php echo HTMLHelper::_('date', $item->created_date, Text::_('DATE_FORMAT_LC4')); ?> 130 </td> 131 <td class="d-none d-md-table-cell"> 132 <?php echo (int) $item->hits; ?> 133 </td> 134 <td class="d-none d-md-table-cell"> 135 <?php echo (int) $item->header; ?> 136 </td> 137 <td class="d-none d-md-table-cell"> 138 <?php echo (int) $item->id; ?> 139 </td> 140 </tr> 141 <?php endforeach; ?> 142 </tbody> 143 </table> 144 145 <?php // load the pagination. ?> 146 <?php echo $this->pagination->getListFooter(); ?> 147 148 <?php endif; ?> 149 150 <?php if (!empty($this->items)) : ?> 151 <?php echo $this->loadTemplate('addform'); ?> 152 <?php endif; ?> 153 <?php // Load the batch processing form if user is allowed ?> 154 <?php if ( 155 $user->authorise('core.create', 'com_redirect') 156 && $user->authorise('core.edit', 'com_redirect') 157 && $user->authorise('core.edit.state', 'com_redirect') 158 ) : ?> 159 <?php echo HTMLHelper::_( 160 'bootstrap.renderModal', 161 'collapseModal', 162 array( 163 'title' => Text::_('COM_REDIRECT_BATCH_OPTIONS'), 164 'footer' => $this->loadTemplate('batch_footer'), 165 ), 166 $this->loadTemplate('batch_body') 167 ); ?> 168 <?php endif; ?> 169 170 <input type="hidden" name="task" value=""> 171 <input type="hidden" name="boxchecked" value="0"> 172 <?php echo HTMLHelper::_('form.token'); ?> 173 </div> 174 </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 |