first commit
This commit is contained in:
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_multilangstatus
|
||||
*
|
||||
* @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;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Helper\ModuleHelper;
|
||||
use Joomla\CMS\Language\Multilanguage;
|
||||
use Joomla\Database\DatabaseInterface;
|
||||
|
||||
$multilanguageEnabled = Multilanguage::isEnabled($app, Factory::getContainer()->get(DatabaseInterface::class));
|
||||
|
||||
require ModuleHelper::getLayoutPath('mod_multilangstatus', $params->get('layout', 'default'));
|
||||
@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<extension type="module" client="administrator" method="upgrade">
|
||||
<name>mod_multilangstatus</name>
|
||||
<author>Joomla! Project</author>
|
||||
<creationDate>2011-09</creationDate>
|
||||
<copyright>(C) 2011 Open Source Matters, Inc.</copyright>
|
||||
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
|
||||
<authorEmail>admin@joomla.org</authorEmail>
|
||||
<authorUrl>www.joomla.org</authorUrl>
|
||||
<version>3.0.0</version>
|
||||
<description>MOD_MULTILANGSTATUS_XML_DESCRIPTION</description>
|
||||
<files>
|
||||
<filename module="mod_multilangstatus">mod_multilangstatus.php</filename>
|
||||
<folder>tmpl</folder>
|
||||
</files>
|
||||
|
||||
<languages>
|
||||
<language tag="en-GB">language/en-GB/mod_multilangstatus.ini</language>
|
||||
<language tag="en-GB">language/en-GB/mod_multilangstatus.sys.ini</language>
|
||||
</languages>
|
||||
|
||||
<help key="Admin_Modules:_Multilingual_Status" />
|
||||
|
||||
<config>
|
||||
|
||||
<fields name="params">
|
||||
|
||||
<fieldset name="advanced">
|
||||
|
||||
<field
|
||||
name="layout"
|
||||
type="modulelayout"
|
||||
label="JFIELD_ALT_LAYOUT_LABEL"
|
||||
class="form-select"
|
||||
validate="moduleLayout"
|
||||
/>
|
||||
|
||||
<field
|
||||
name="moduleclass_sfx"
|
||||
type="textarea"
|
||||
label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL"
|
||||
rows="3"
|
||||
validate="CssIdentifier"
|
||||
/>
|
||||
|
||||
</fieldset>
|
||||
</fields>
|
||||
</config>
|
||||
</extension>
|
||||
48
administrator/modules/mod_multilangstatus/tmpl/default.php
Normal file
48
administrator/modules/mod_multilangstatus/tmpl/default.php
Normal file
@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage mod_multilangstatus
|
||||
*
|
||||
* @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;
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Router\Route;
|
||||
|
||||
$hideLinks = $app->getInput()->getBool('hidemainmenu');
|
||||
|
||||
if (!$multilanguageEnabled || $hideLinks) {
|
||||
return;
|
||||
}
|
||||
|
||||
$modalHTML = HTMLHelper::_(
|
||||
'bootstrap.renderModal',
|
||||
'multiLangModal',
|
||||
[
|
||||
'title' => Text::_('MOD_MULTILANGSTATUS'),
|
||||
'url' => Route::_('index.php?option=com_languages&view=multilangstatus&tmpl=component'),
|
||||
'height' => '400px',
|
||||
'width' => '800px',
|
||||
'bodyHeight' => 70,
|
||||
'modalWidth' => 80,
|
||||
'footer' => '<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">' . Text::_('JTOOLBAR_CLOSE') . '</button>',
|
||||
]
|
||||
);
|
||||
|
||||
$app->getDocument()->getWebAssetManager()
|
||||
->registerAndUseScript('mod_multilangstatus.admin', 'mod_multilangstatus/admin-multilangstatus.min.js', [], ['type' => 'module', 'defer' => true]);
|
||||
?>
|
||||
<a data-bs-target="#multiLangModal" class="header-item-content multilanguage" title="<?php echo Text::_('MOD_MULTILANGSTATUS'); ?>" data-bs-toggle="modal" role="button">
|
||||
<div class="header-item-icon">
|
||||
<span class="icon-language" aria-hidden="true"></span>
|
||||
</div>
|
||||
<div class="header-item-text">
|
||||
<?php echo Text::_('MOD_MULTILANGSTATUS'); ?>
|
||||
</div>
|
||||
</a>
|
||||
<?php echo $modalHTML; ?>
|
||||
Reference in New Issue
Block a user