Файловый менеджер - Редактировать - /home/wuectly/www/03cbe/menutypes.tar
Назад
tmpl/default.php 0000604 00000003564 15245654200 0007664 0 ustar 00 <?php /** * @package Joomla.Administrator * @subpackage com_menus * * @copyright (C) 2011 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; $input = JFactory::getApplication()->input; // Checking if loaded via index.php or component.php $tmpl = ($input->getCmd('tmpl') != '') ? '1' : ''; JHtml::_('behavior.core'); JFactory::getDocument()->addScriptDeclaration(' setmenutype = function(type) { var tmpl = ' . json_encode($tmpl) . '; if (tmpl) { window.parent.Joomla.submitbutton("item.setType", type); window.parent.jQuery("#menuTypeModal").modal("hide"); } else { window.location="index.php?option=com_menus&view=item&task=item.setType&layout=edit&type=" + type; } }; '); ?> <?php echo JHtml::_('bootstrap.startAccordion', 'collapseTypes', array('active' => 'slide1')); ?> <?php $i = 0; ?> <?php foreach ($this->types as $name => $list) : ?> <?php echo JHtml::_('bootstrap.addSlide', 'collapseTypes', $name, 'collapse' . ($i++)); ?> <ul class="nav nav-tabs nav-stacked"> <?php foreach ($list as $title => $item) : ?> <li> <?php $menutype = array('id' => $this->recordId, 'title' => isset($item->type) ? $item->type : $item->title, 'request' => $item->request); ?> <?php $menutype = base64_encode(json_encode($menutype)); ?> <a class="choose_type" href="#" title="<?php echo JText::_($item->description); ?>" onclick="setmenutype('<?php echo $menutype; ?>')"> <?php echo $title;?> <small class="muted"> <?php echo JText::_($item->description); ?> </small> </a> </li> <?php endforeach; ?> </ul> <?php echo JHtml::_('bootstrap.endSlide'); ?> <?php endforeach; ?> <?php echo JHtml::_('bootstrap.endSlide'); ?> <?php echo JHtml::_('bootstrap.endAccordion'); view.html.php 0000604 00000006332 15245654200 0007175 0 ustar 00 <?php /** * @package Joomla.Administrator * @subpackage com_menus * * @copyright (C) 2011 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * The HTML Menus Menu Item Types View. * * @since 1.6 */ class MenusViewMenutypes extends JViewLegacy { /** * @var JObject[] */ protected $types; /** * Display the view * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return void * * @since 1.6 */ public function display($tpl = null) { $app = JFactory::getApplication(); $this->recordId = $app->input->getInt('recordId'); $types = $this->get('TypeOptions'); $this->addCustomTypes($types); $sortedTypes = array(); foreach ($types as $name => $list) { $tmp = array(); foreach ($list as $item) { $tmp[JText::_($item->title)] = $item; } uksort($tmp, 'strcasecmp'); $sortedTypes[JText::_($name)] = $tmp; } uksort($sortedTypes, 'strcasecmp'); $this->types = $sortedTypes; $this->addToolbar(); parent::display($tpl); } /** * Add the page title and toolbar. * * @return void * * @since 3.0 */ protected function addToolbar() { // Add page title JToolbarHelper::title(JText::_('COM_MENUS'), 'list menumgr'); // Get the toolbar object instance $bar = JToolbar::getInstance('toolbar'); // Cancel $title = JText::_('JTOOLBAR_CANCEL'); $dhtml = "<button onClick=\"location.href='index.php?option=com_menus&view=items'\" class=\"btn\"> <span class=\"icon-remove\" title=\"$title\"></span> $title</button>"; $bar->appendButton('Custom', $dhtml, 'new'); } /** * Method to add system link types to the link types array * * @param array $types The list of link types * * @return void * * @since 3.7.0 */ protected function addCustomTypes(&$types) { if (empty($types)) { $types = array(); } // Adding System Links $list = array(); $o = new JObject; $o->title = 'COM_MENUS_TYPE_EXTERNAL_URL'; $o->type = 'url'; $o->description = 'COM_MENUS_TYPE_EXTERNAL_URL_DESC'; $o->request = null; $list[] = $o; $o = new JObject; $o->title = 'COM_MENUS_TYPE_ALIAS'; $o->type = 'alias'; $o->description = 'COM_MENUS_TYPE_ALIAS_DESC'; $o->request = null; $list[] = $o; $o = new JObject; $o->title = 'COM_MENUS_TYPE_SEPARATOR'; $o->type = 'separator'; $o->description = 'COM_MENUS_TYPE_SEPARATOR_DESC'; $o->request = null; $list[] = $o; $o = new JObject; $o->title = 'COM_MENUS_TYPE_HEADING'; $o->type = 'heading'; $o->description = 'COM_MENUS_TYPE_HEADING_DESC'; $o->request = null; $list[] = $o; if ($this->get('state')->get('client_id') == 1) { $o = new JObject; $o->title = 'COM_MENUS_TYPE_CONTAINER'; $o->type = 'container'; $o->description = 'COM_MENUS_TYPE_CONTAINER_DESC'; $o->request = null; $list[] = $o; } $types['COM_MENUS_TYPE_SYSTEM'] = $list; } }
| ver. 1.4 |
Github
|
.
| PHP 8.1.34 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка