first commit

This commit is contained in:
2025-06-17 11:53:18 +02:00
commit 9f0f7ba12b
8804 changed files with 1369176 additions and 0 deletions

View File

@ -0,0 +1,71 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage com_postinstall
*
* @copyright (C) 2013 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;
$adminFormClass = count($this->extension_options) > 1 ? 'form-inline mb-3' : 'visually-hidden';
?>
<form action="index.php" method="post" name="adminForm" class="<?php echo $adminFormClass; ?>" id="adminForm">
<input type="hidden" name="option" value="com_postinstall">
<input type="hidden" name="task" value="">
<?php echo HTMLHelper::_('form.token'); ?>
<label for="eid" class="me-sm-2"><?php echo Text::_('COM_POSTINSTALL_MESSAGES_FOR'); ?></label>
<?php echo HTMLHelper::_('select.genericlist', $this->extension_options, 'eid', ['onchange' => 'this.form.submit()', 'class' => 'form-select'], 'value', 'text', $this->eid, 'eid'); ?>
</form>
<?php foreach ($this->items as $item) : ?>
<?php if ($item->enabled === 1) : ?>
<div class="card card-outline-secondary mb-3">
<div class="card-body">
<h3><?php echo Text::_($item->title_key); ?></h3>
<p class="small">
<?php echo Text::sprintf('COM_POSTINSTALL_LBL_SINCEVERSION', $item->version_introduced); ?>
</p>
<div>
<?php echo Text::_($item->description_key); ?>
<?php if ($item->type !== 'message') : ?>
<a href="<?php echo Route::_('index.php?option=com_postinstall&view=messages&task=message.action&id=' . $item->postinstall_message_id . '&' . $this->token . '=1'); ?>" class="btn btn-primary">
<?php echo Text::_($item->action_key); ?>
</a>
<?php endif; ?>
<?php if ($this->getCurrentUser()->authorise('core.edit.state', 'com_postinstall')) : ?>
<a href="<?php echo Route::_('index.php?option=com_postinstall&view=messages&task=message.unpublish&id=' . $item->postinstall_message_id . '&' . $this->token . '=1'); ?>" class="btn btn-danger btn-sm">
<?php echo Text::_('COM_POSTINSTALL_BTN_HIDE'); ?>
</a>
<a href="<?php echo Route::_('index.php?option=com_postinstall&view=messages&task=message.archive&id=' . $item->postinstall_message_id . '&' . $this->token . '=1'); ?>" class="btn btn-danger btn-sm">
<?php echo Text::_('COM_POSTINSTALL_BTN_ARCHIVE'); ?>
</a>
<?php endif; ?>
</div>
</div>
</div>
<?php elseif ($item->enabled === 2) : ?>
<div class="card card-outline-secondary mb-3">
<div class="card-body">
<h3><?php echo Text::_($item->title_key); ?></h3>
<div>
<?php if ($this->getCurrentUser()->authorise('core.edit.state', 'com_postinstall')) : ?>
<a href="<?php echo Route::_('index.php?option=com_postinstall&view=messages&task=message.unpublish&id=' . $item->postinstall_message_id . '&' . $this->token . '=1'); ?>" class="btn btn-danger btn-sm">
<?php echo Text::_('COM_POSTINSTALL_BTN_HIDE'); ?>
</a>
<a href="<?php echo Route::_('index.php?option=com_postinstall&view=messages&task=message.republish&id=' . $item->postinstall_message_id . '&' . $this->token . '=1'); ?>" class="btn btn-success btn-sm">
<?php echo Text::_('COM_POSTINSTALL_BTN_REPUBLISH'); ?>
</a>
<?php endif; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php endforeach; ?>

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<layout title="COM_POSTINSTALL_MESSAGES_VIEW_DEFAULT_TITLE">
<message>
<![CDATA[COM_POSTINSTALL_MESSAGES_VIEW_DEFAULT_DESC]]>
</message>
</layout>
<fields name="params">
<fieldset name="basic" label="JOPTIONS">
<field
name="ajax-badge"
type="radio"
label="COM_POSTINSTALL_MESSAGES_VIEW_DISPLAY_BADGE"
layout="joomla.form.field.radio.switcher"
default=""
>
<option value="">JHIDE</option>
<option value="index.php?option=com_postinstall&amp;task=getMenuBadgeData&amp;format=json">JSHOW</option>
</field>
</fieldset>
</fields>
</metadata>

View File

@ -0,0 +1,36 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage com_postinstall
*
* @copyright (C) 2021 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\Layout\LayoutHelper;
$adminFormClass = count($this->extension_options) > 1 ? 'form-inline mb-3' : 'visually-hidden';
?>
<form action="index.php" method="post" name="adminForm" class="<?php echo $adminFormClass; ?>" id="adminForm">
<input type="hidden" name="option" value="com_postinstall">
<input type="hidden" name="task" value="">
<?php echo HTMLHelper::_('form.token'); ?>
<label for="eid" class="me-sm-2"><?php echo Text::_('COM_POSTINSTALL_MESSAGES_FOR'); ?></label>
<?php echo HTMLHelper::_('select.genericlist', $this->extension_options, 'eid', ['onchange' => 'this.form.submit()', 'class' => 'form-select'], 'value', 'text', $this->eid, 'eid'); ?>
</form>
<?php
$displayData = [
'textPrefix' => 'COM_POSTINSTALL',
'formURL' => 'index.php?option=com_postinstall',
'icon' => 'icon-bell',
'createURL' => 'index.php?option=com_postinstall&view=messages&task=message.reset&eid=' . $this->eid . '&' . $this->token . '=1',
];
echo LayoutHelper::render('joomla.content.emptystate', $displayData);