[ 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) 2010 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\Language\Text; 15 use Joomla\CMS\Layout\LayoutHelper; 16 use Joomla\Component\Menus\Administrator\Helper\MenusHelper; 17 18 // Initialise related data. 19 $menuTypes = MenusHelper::getMenuLinks(); 20 $user = Factory::getUser(); 21 22 /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ 23 $wa = $this->document->getWebAssetManager(); 24 $wa->useScript('com_templates.admin-template-toggle-assignment'); 25 26 ?> 27 <label id="jform_menuselect-lbl" for="jform_menuselect"><?php echo Text::_('JGLOBAL_MENU_SELECTION'); ?></label> 28 <div class="btn-toolbar"> 29 <button class="btn btn-sm btn-secondary jform-rightbtn" type="button" onclick="Joomla.toggleAll()"> 30 <span class="icon-square" aria-hidden="true"></span> <?php echo Text::_('JGLOBAL_SELECTION_INVERT_ALL'); ?> 31 </button> 32 </div> 33 <div id="menu-assignment" class="menu-assignment"> 34 <ul class="menu-links"> 35 36 <?php foreach ($menuTypes as &$type) : ?> 37 <li> 38 <div class="menu-links-block"> 39 <button class="btn btn-sm btn-secondary jform-rightbtn mb-2" type="button" onclick='Joomla.toggleMenutype("<?php echo $type->menutype; ?>")'> 40 <span class="icon-square" aria-hidden="true"></span> <?php echo Text::_('JGLOBAL_SELECTION_INVERT'); ?> 41 </button> 42 <h5><?php echo $type->title ?: $type->menutype; ?></h5> 43 44 <?php foreach ($type->links as $link) : ?> 45 <label class="checkbox small" for="link<?php echo (int) $link->value; ?>" > 46 <input type="checkbox" name="jform[assigned][]" value="<?php echo (int) $link->value; ?>" id="link<?php echo (int) $link->value; ?>"<?php if ($link->template_style_id == $this->item->id) : 47 ?> checked="checked"<?php 48 endif; ?><?php if ($link->checked_out && $link->checked_out != $user->id) : 49 ?> disabled="disabled"<?php 50 else : 51 ?> class="form-check-input chk-menulink menutype-<?php echo $type->menutype; ?>"<?php 52 endif; ?> /> 53 <?php echo LayoutHelper::render('joomla.html.treeprefix', array('level' => $link->level)) . $link->text; ?> 54 </label> 55 <?php endforeach; ?> 56 57 </div> 58 </li> 59 <?php endforeach; ?> 60 61 </ul> 62 </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 |