75c34345f9
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Rename root source directory from src/ to source/ and update all references in Makefile, manifest.xml, .gitignore, CI workflows, and wiki documentation. Internal Joomla namespace paths (src/Extension) are unchanged as they are plugin-internal structure. CI workflows updated to check source/ first with src/ fallback for backward compatibility across repos. Authored-by: Moko Consulting Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
83 lines
2.7 KiB
PHP
83 lines
2.7 KiB
PHP
<?php
|
|
|
|
/**
|
|
* @package MokoJoomCross
|
|
* @subpackage com_mokojoomcross
|
|
* @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\MokoJoomCross\Administrator\View\Posts;
|
|
|
|
defined('_JEXEC') or die;
|
|
|
|
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
|
|
use Joomla\CMS\Router\Route;
|
|
use Joomla\CMS\Toolbar\Toolbar;
|
|
use Joomla\CMS\Toolbar\ToolbarHelper;
|
|
use Joomla\Component\MokoJoomCross\Administrator\Helper\MokoJoomCrossHelper;
|
|
|
|
class HtmlView extends BaseHtmlView
|
|
{
|
|
protected $items;
|
|
protected $pagination;
|
|
protected $state;
|
|
public $filterForm;
|
|
public $activeFilters;
|
|
public $sidebar;
|
|
|
|
public function display($tpl = null): void
|
|
{
|
|
$this->items = $this->get('Items');
|
|
$this->pagination = $this->get('Pagination');
|
|
$this->state = $this->get('State');
|
|
$this->filterForm = $this->get('FilterForm');
|
|
$this->activeFilters = $this->get('ActiveFilters');
|
|
|
|
$this->addToolbar();
|
|
|
|
parent::display($tpl);
|
|
}
|
|
|
|
protected function addToolbar(): void
|
|
{
|
|
ToolbarHelper::title('MokoJoomCross — Post Queue', 'share-alt');
|
|
ToolbarHelper::addNew('post.add');
|
|
|
|
$toolbar = Toolbar::getInstance('toolbar');
|
|
$toolbar->standardButton('retry', 'COM_MOKOJOOMCROSS_TOOLBAR_RETRY_FAILED', 'posts.retryFailed')
|
|
->icon('icon-refresh')
|
|
->listCheck(false);
|
|
$toolbar->standardButton('purge', 'COM_MOKOJOOMCROSS_TOOLBAR_PURGE_POSTED', 'posts.purgePosted')
|
|
->icon('icon-trash')
|
|
->listCheck(false);
|
|
|
|
$toolbar->standardButton('retry-selected', 'COM_MOKOJOOMCROSS_TOOLBAR_RETRY_SELECTED', 'posts.retrySelected')
|
|
->icon('icon-redo')
|
|
->listCheck(true);
|
|
$toolbar->standardButton('schedule', 'COM_MOKOJOOMCROSS_TOOLBAR_SCHEDULE', 'posts.schedule')
|
|
->icon('icon-calendar')
|
|
->listCheck(true);
|
|
|
|
ToolbarHelper::deleteList('', 'posts.delete', 'JTOOLBAR_DELETE');
|
|
|
|
// Export CSV button
|
|
$toolbar->appendButton(
|
|
'Link',
|
|
'download',
|
|
'COM_MOKOJOOMCROSS_EXPORT_CSV',
|
|
Route::_('index.php?option=com_mokojoomcross&task=posts.exportCsv&format=raw', false)
|
|
);
|
|
|
|
// Dashboard link in toolbar
|
|
$toolbar->appendButton(
|
|
'Link',
|
|
'home',
|
|
'COM_MOKOJOOMCROSS_SUBMENU_DASHBOARD',
|
|
Route::_('index.php?option=com_mokojoomcross&view=dashboard', false)
|
|
);
|
|
}
|
|
}
|