[ 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_contenthistory 6 * 7 * @copyright (C) 2013 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\HTML\HTMLHelper; 14 use Joomla\CMS\Language\Text; 15 use Joomla\CMS\Router\Route; 16 use Joomla\CMS\Session\Session; 17 18 Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); 19 20 $hash = $this->state->get('sha1_hash'); 21 $formUrl = 'index.php?option=com_contenthistory&view=history&layout=modal&tmpl=component&item_id=' . $this->state->get('item_id') . '&' . Session::getFormToken() . '=1'; 22 23 Text::script('COM_CONTENTHISTORY_BUTTON_SELECT_ONE_VERSION', true); 24 Text::script('COM_CONTENTHISTORY_BUTTON_SELECT_TWO_VERSIONS', true); 25 Text::script('JLIB_HTML_PLEASE_MAKE_A_SELECTION_FROM_THE_LIST'); 26 27 /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ 28 $wa = $this->document->getWebAssetManager(); 29 $wa->useScript('multiselect') 30 ->useScript('com_contenthistory.admin-history-modal'); 31 ?> 32 <div class="container-popup"> 33 <div id="subhead" class="subhead noshadow mb-3"> 34 <?php echo $this->toolbar->render(); ?> 35 </div> 36 <form action="<?php echo Route::_($formUrl); ?>" method="post" name="adminForm" id="adminForm"> 37 <table class="table table-sm"> 38 <caption class="visually-hidden"> 39 <?php echo Text::_('COM_CONTENTHISTORY_VERSION_CAPTION'); ?> 40 </caption> 41 <thead> 42 <tr> 43 <td class="w-1 text-center"> 44 <input class="form-check-input" type="checkbox" name="checkall-toggle" value="" title="<?php echo Text::_('JGLOBAL_CHECK_ALL'); ?>" onclick="Joomla.checkAll(this)"> 45 </td> 46 <th scope="col" class="w-15"> 47 <?php echo Text::_('JDATE'); ?> 48 </th> 49 <th scope="col" class="w-15 d-none d-md-table-cell"> 50 <?php echo Text::_('COM_CONTENTHISTORY_VERSION_NOTE'); ?> 51 </th> 52 <th scope="col" class="w-10"> 53 <?php echo Text::_('COM_CONTENTHISTORY_KEEP_VERSION'); ?> 54 </th> 55 <th scope="col" class="w-15 d-none d-md-table-cell"> 56 <?php echo Text::_('JAUTHOR'); ?> 57 </th> 58 <th scope="col" class="w-10 text-end"> 59 <?php echo Text::_('COM_CONTENTHISTORY_CHARACTER_COUNT'); ?> 60 </th> 61 </tr> 62 </thead> 63 <tbody> 64 <?php $i = 0; ?> 65 <?php foreach ($this->items as $item) : ?> 66 <tr class="row<?php echo $i % 2; ?>"> 67 <td class="text-center"> 68 <?php echo HTMLHelper::_('grid.id', $i, $item->version_id, false, 'cid', 'cb', $item->save_date); ?> 69 </td> 70 <th scope="row"> 71 <a class="save-date" onclick="window.open(this.href,'win2','width=800,height=600,resizable=yes,scrollbars=yes'); return false;" 72 href="<?php echo Route::_('index.php?option=com_contenthistory&view=preview&layout=preview&tmpl=component&' . Session::getFormToken() . '=1&version_id=' . $item->version_id); ?>"> 73 <?php echo HTMLHelper::_('date', $item->save_date, Text::_('DATE_FORMAT_LC6')); ?> 74 </a> 75 <?php if ($item->sha1_hash == $hash) : ?> 76 <span class="icon-star" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('JCURRENT'); ?></span> 77 <?php endif; ?> 78 </th> 79 <td class="d-none d-md-table-cell"> 80 <?php echo htmlspecialchars($item->version_note); ?> 81 </td> 82 <td> 83 <?php if ($item->keep_forever) : ?> 84 <button type="button" class="btn btn-secondary btn-sm" onclick="return Joomla.listItemTask('cb<?php echo $i; ?>','history.keep')"> 85 <?php echo Text::_('JYES'); ?> 86 <span class="icon-lock" aria-hidden="true"></span> 87 </button> 88 <?php else : ?> 89 <button type="button" class="btn btn-secondary btn-sm" onclick="return Joomla.listItemTask('cb<?php echo $i; ?>','history.keep')"> 90 <?php echo Text::_('JNO'); ?> 91 </button> 92 <?php endif; ?> 93 </td> 94 <td class="d-none d-md-table-cell"> 95 <?php echo htmlspecialchars($item->editor); ?> 96 </td> 97 <td class="text-end"> 98 <?php echo number_format((int) $item->character_count, 0, Text::_('DECIMALS_SEPARATOR'), Text::_('THOUSANDS_SEPARATOR')); ?> 99 </td> 100 </tr> 101 <?php $i++; ?> 102 <?php endforeach; ?> 103 </tbody> 104 </table> 105 106 <?php // load the pagination. ?> 107 <?php echo $this->pagination->getListFooter(); ?> 108 109 <input type="hidden" name="task" value=""> 110 <input type="hidden" name="boxchecked" value="0"> 111 <?php echo HTMLHelper::_('form.token'); ?> 112 113 </form> 114 </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 |