- md5
- b86918b46cbbbf0125575ba057e9264c
- sha1
- a6887ab185373048464a1417feb7ab18a81c904d
- sha256
- 39fee384a589b32555c3bdc9acd66b88de7cdd6fce51b836370120b792b41084
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
<?php
/**
* @package Joomla.Administrator
* @subpackage com_menus
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\LayoutHelper;
HTMLHelper::_('behavior.core');
foreach ($this->levels as $key => $value)
{
$allLevels[$value->id] = $value->title;
}
Factory::getDocument()->addScriptOptions('menus-edit-modules', ['viewLevels' => $allLevels, 'itemId' => $this->item->id]);
HTMLHelper::_('stylesheet', 'com_menus/admin-item-edit_modules.css', array('version' => 'auto', 'relative' => true));
HTMLHelper::_('script', 'com_menus/admin-item-edit_modules.min.js', array('version' => 'auto', 'relative' => true));
// Set up the bootstrap modal that will be used for all module editors
echo HTMLHelper::_(
'bootstrap.renderModal',
'moduleEditModal',
array(
'title' => Text::_('COM_MENUS_EDIT_MODULE_SETTINGS'),
'backdrop' => 'static',
'keyboard' => false,
'closeButton' => false,
'bodyHeight' => '70',
'modalWidth' => '80',
'footer' => '<a type="button" class="btn" data-dismiss="modal" data-target="#closeBtn" aria-hidden="true">'
. Text::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</a>'
. '<button type="button" class="btn btn-primary" data-dismiss="modal" data-target="#saveBtn" aria-hidden="true">'
. Text::_('JSAVE') . '</button>'
. '<button type="button" class="btn btn-success" data-target="#applyBtn" aria-hidden="true">'
. Text::_('JAPPLY') . '</button>',
)
);
?>
<?php
// Set main fields.
$this->fields = array('toggle_modules_assigned','toggle_modules_published');
echo LayoutHelper::render('joomla.menu.edit_modules', $this); ?>
<table class="table">
<thead>
<tr>
<th>
<?php echo Text::_('COM_MENUS_HEADING_ASSIGN_MODULE'); ?>
</th>
<th class="text-center">
<?php echo Text::_('COM_MENUS_HEADING_LEVELS'); ?>
</th>
<th class="text-center">
<?php echo Text::_('COM_MENUS_HEADING_POSITION'); ?>
</th>
<th class="text-center">
<?php echo Text::_('COM_MENUS_HEADING_DISPLAY'); ?>
</th>
<th class="text-center">
<?php echo Text::_('COM_MENUS_HEADING_PUBLISHED_ITEMS'); ?>
</th>
</tr>
</thead>
<tbody>
<?php foreach ($this->modules as $i => &$module) : ?>
<?php if (is_null($module->menuid)) : ?>
<?php if (!$module->except || $module->menuid < 0) : ?>
<?php $no = 'no '; ?>
<?php else : ?>
<?php $no = ''; ?>
<?php endif; ?>
<?php else : ?>
<?php $no = ''; ?>
<?php endif; ?>
<?php if ($module->published) : ?>
<?php $status = ''; ?>
<?php else : ?>
<?php $status = 'unpublished '; ?>
<?php endif; ?>
<tr class="<?php echo $no; ?><?php echo $status; ?>row<?php echo $i % 2; ?>" id="tr-<?php echo $module->id; ?>">
<td id="<?php echo $module->id; ?>" style="width:40%">
<a href="#moduleEditModal"
role="button"
class="btn btn-link module-edit-link"
title="<?php echo Text::_('COM_MENUS_EDIT_MODULE_SETTINGS'); ?>"
id="title-<?php echo $module->id; ?>"
data-module-id="<?php echo $module->id; ?>">
<?php echo $this->escape($module->title); ?></a>
</td>
<td id="access-<?php echo $module->id; ?>" style="width:15%" class="text-center">
<?php echo $this->escape($module->access_title); ?>
</td>
<td id="position-<?php echo $module->id; ?>" style="width:15%" class="text-center">
<?php echo $this->escape($module->position); ?>
</td>
<td id="menus-<?php echo $module->id; ?>" style="width:15%" class="text-center">
<?php if (is_null($module->menuid)) : ?>
<?php if ($module->except) : ?>
<span class="badge badge-success">
<?php echo Text::_('JYES'); ?>
</span>
<?php else : ?>
<span class="badge badge-danger">
<?php echo Text::_('JNO'); ?>
</span>
<?php endif; ?>
<?php elseif ($module->menuid > 0) : ?>
<span class="badge badge-success">
<?php echo Text::_('JYES'); ?>
</span>
<?php elseif ($module->menuid < 0) : ?>
<span class="badge badge-danger">
<?php echo Text::_('JNO'); ?>
</span>
<?php else : ?>
<span class="badge badge-info">
<?php echo Text::_('JALL'); ?>
</span>
<?php endif; ?>
</td>
<td id="status-<?php echo $module->id; ?>" class="text-center">
<?php if ($module->published) : ?>
<span class="badge badge-success">
<?php echo Text::_('JYES'); ?>
</span>
<?php else : ?>
<span class="badge badge-danger">
<?php echo Text::_('JNO'); ?>
</span>
<?php endif; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
The same content is in 2 releases, Joomla 4.0.0-alpha7 to 4.0.0-alpha8. See them all, or every version of this file.