d6848e6b90
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 11s
- deleteFromPlatforms(): use CredentialHelper::decrypt() + Joomla 6 dispatcher pattern instead of json_decode + deprecated triggerEvent (#226, #228) - PostsController: add ACL checks on retryFailed/purgePosted (#224) - QueueProcessor: recover stale posting entries stuck >10min (#235) - onContentChangeState: respect post_on_first_publish_only (#238) - Uninstall SQL: add analytics + category_rules table drops (#225) - Dashboard/Calendar: remove deprecated Sidebar::render() (#250) - AnalyticsHelper: rewrite AJAX endpoints to query posts table (#246) - Submenu helper: remove duplicate calendar key (#248) - CHANGELOG: remove 3 duplicate version headers (#240) Authored-by: Moko Consulting Claude-Session: https://claude.ai/code/session_014iwLv3vUVsSxP8LyZ6STTj
61 lines
1.8 KiB
PHP
61 lines
1.8 KiB
PHP
<?php
|
|
|
|
/**
|
|
* @package MokoSuiteCross
|
|
* @subpackage com_mokosuitecross
|
|
* @author Moko Consulting <hello@mokoconsulting.tech>
|
|
* @copyright Copyright (C) 2026 Moko Consulting. All rights reserved.
|
|
* @license GNU General Public License version 3 or later; see LICENSE
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
*/
|
|
|
|
namespace Joomla\Component\MokoSuiteCross\Administrator\View\Calendar;
|
|
|
|
defined('_JEXEC') or die;
|
|
|
|
use Joomla\CMS\Factory;
|
|
use Joomla\CMS\Language\Text;
|
|
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
|
|
use Joomla\CMS\Router\Route;
|
|
use Joomla\CMS\Toolbar\ToolbarHelper;
|
|
use Joomla\Component\MokoSuiteCross\Administrator\Helper\MokoSuiteCrossHelper;
|
|
|
|
class HtmlView extends BaseHtmlView
|
|
{
|
|
|
|
public $ajaxUrl;
|
|
|
|
public function display($tpl = null): void
|
|
{
|
|
// ACL check
|
|
$canDo = MokoSuiteCrossHelper::getActions();
|
|
|
|
if (!$canDo->get('core.manage')) {
|
|
throw new \RuntimeException(Text::_('JERROR_ALERTNOAUTHOR'), 403);
|
|
}
|
|
|
|
// Build AJAX URL for FullCalendar event source
|
|
$this->ajaxUrl = Route::_('index.php?option=com_mokosuitecross&task=calendar.events&format=json', false);
|
|
|
|
$this->addToolbar();
|
|
|
|
MokoSuiteCrossHelper::addSubmenu('calendar');
|
|
|
|
// Set document title
|
|
Factory::getApplication()->getDocument()->setTitle(
|
|
Text::_('COM_MOKOSUITECROSS_CALENDAR') . ' - ' . Text::_('COM_MOKOSUITECROSS')
|
|
);
|
|
|
|
parent::display($tpl);
|
|
}
|
|
|
|
protected function addToolbar(): void
|
|
{
|
|
ToolbarHelper::title(
|
|
Text::_('COM_MOKOSUITECROSS') . ' - ' . Text::_('COM_MOKOSUITECROSS_CALENDAR'),
|
|
'calendar'
|
|
);
|
|
ToolbarHelper::back('JTOOLBAR_BACK', Route::_('index.php?option=com_mokosuitecross&view=dashboard', false));
|
|
}
|
|
}
|