[ 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 mod_sampledata 6 * 7 * @copyright (C) 2017 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\Language\Text; 14 use Joomla\CMS\Uri\Uri; 15 16 $app->getDocument()->getWebAssetManager() 17 ->registerAndUseScript('mod_sampledata', 'mod_sampledata/sampledata-process.js', [], ['type' => 'module'], ['core']); 18 19 Text::script('MOD_SAMPLEDATA_COMPLETED'); 20 Text::script('MOD_SAMPLEDATA_CONFIRM_START'); 21 Text::script('MOD_SAMPLEDATA_ITEM_ALREADY_PROCESSED'); 22 Text::script('MOD_SAMPLEDATA_INVALID_RESPONSE'); 23 24 $app->getDocument()->addScriptOptions( 25 'sample-data', 26 [ 27 'icon' => Uri::root(true) . '/media/system/images/ajax-loader.gif', 28 ] 29 ); 30 ?> 31 <?php if ($items) : ?> 32 <ul id="sample-data-wrapper" class="list-group list-group-flush sample-data"> 33 <?php foreach ($items as $i => $item) : ?> 34 <li class="list-group-item sampledata-<?php echo $item->name; ?>"> 35 <div class="d-flex justify-content-between align-items-center"> 36 <div class="sample-data__title"> 37 <span class="sample-data__icon icon-<?php echo $item->icon; ?> me-1" aria-hidden="true"></span> 38 <?php echo htmlspecialchars($item->title, ENT_QUOTES, 'UTF-8'); ?> 39 </div> 40 <button type="button" class="btn btn-secondary btn-sm apply-sample-data" data-type="<?php echo $item->name; ?>" data-steps="<?php echo $item->steps; ?>"> 41 <span class="icon-upload" aria-hidden="true"></span> <?php echo Text::_('JLIB_INSTALLER_INSTALL'); ?> 42 <span class="visually-hidden"><?php echo $item->title; ?></span> 43 </button> 44 </div> 45 <p class="sample-data__desc small mt-1"><?php echo $item->description; ?></p> 46 </li> 47 <?php // Progress bar ?> 48 <li class="list-group-item sampledata-progress-<?php echo $item->name; ?> d-none"> 49 <div class="progress mb-3"> 50 <div class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar"></div> 51 </div> 52 </li> 53 <?php endforeach; ?> 54 </ul> 55 <a href="index.php?option=com_plugins&filter[folder]=sampledata" class="btn btn-secondary btn-sm manage-sample-data float-end m-3"> 56 <span class="icon-tasks" aria-hidden="true"></span> <?php echo Text::_('MOD_SAMPLEDATA_MANAGE_SAMPLEDATA'); ?> 57 </a> 58 <?php endif; ?>
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 |