- md5
- 35758bcaa89e76183048de7ca988e3f2
- sha1
- 7ef7cfe509db99b760485940d4e81a2f612f4a8f
- sha256
- ac2de6587d6cc6e44c6c8398a748a2b82c1a9c9175b2f899cd3424a63492ff61
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
<?php
/**
* @package Joomla.Administrator
* @subpackage Templates.Atum
*
* @copyright Copyright (C) 2005 - 2020 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\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
$module = $displayData['module'];
$params = $displayData['params'];
if ((string) $module->content === '')
{
return;
}
$id = $module->id;
// Permission checks
$user = Factory::getUser();
$canEdit = $user->authorise('core.edit', 'com_modules.module.' . $id) && $user->authorise('core.manage', 'com_modules');
$canChange = $user->authorise('core.edit.state', 'com_modules.module.' . $id) && $user->authorise('core.manage', 'com_modules');
$moduleTag = $params->get('module_tag', 'div');
$bootstrapSize = (int) $params->get('bootstrap_size', 6);
$moduleClass = $bootstrapSize ? 'col-md-' . $bootstrapSize : 'col-md-12';
$headerTag = htmlspecialchars($params->get('header_tag', 'h2'), ENT_QUOTES, 'UTF-8');
$moduleClassSfx = $params->get('moduleclass_sfx', '');
// Temporarily store header class in variable
$headerClass = $params->get('header_class');
$headerClass = $headerClass ? ' ' . htmlspecialchars($headerClass, ENT_QUOTES, 'UTF-8') : '';
?>
<div class="<?php echo $moduleClass; ?> module-wrapper">
<<?php echo $moduleTag; ?> class="card mb-5<?php echo $moduleClassSfx; ?>">
<?php if ($canEdit || $canChange) : ?>
<?php $dropdownPosition = Factory::getLanguage()->isRTL() ? 'left' : 'right'; ?>
<div class="module-actions dropdown">
<button type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="btn" id="dropdownMenuButton-<?php echo $id; ?>">
<span class="fas fa-cog" aria-hidden="true"></span>
<span class="sr-only"><?php echo Text::sprintf('JACTION_EDIT_MODULE', $module->title); ?></span>
</button>
<div class="dropdown-menu dropdown-menu-<?php echo $dropdownPosition; ?>" aria-labelledby="dropdownMenuButton-<?php echo $id; ?>">
<?php if ($canEdit) : ?>
<?php $uri = Uri::getInstance(); ?>
<?php $url = Route::_('index.php?option=com_modules&task=module.edit&id=' . $id . '&return=' . base64_encode($uri)); ?>
<a class="dropdown-item" href="<?php echo $url; ?>"><?php echo Text::_('JACTION_EDIT'); ?></a>
<?php endif; ?>
<?php if ($canChange) : ?>
<button type="button" class="dropdown-item unpublish-module" data-module-id="<?php echo $id; ?>"><?php echo Text::_('JACTION_UNPUBLISH'); ?></button>
<?php endif; ?>
</div>
</div>
<?php endif; ?>
<?php if ($module->showtitle) : ?>
<<?php echo $headerTag; ?> class="card-header<?php echo $headerClass; ?>"><?php echo $module->title; ?></<?php echo $headerTag; ?>>
<?php endif; ?>
<div class="module-body">
<?php echo $module->content; ?>
</div>
</<?php echo $moduleTag; ?>>
</div>
The same content is in 5 releases, Joomla 4.0.0-beta to 4.0.0-beta5. See them all, or every version of this file.