Stable release of v3.2.0-beta1

Move beta to main repo. Fix #1053 so that the right and left tabs display correctly in Joomla 4&5.
This commit is contained in:
2024-03-02 22:10:30 +02:00
parent 3c91a5cdbb
commit d1e1a56671
1786 changed files with 73608 additions and 37437 deletions

View File

@ -12,12 +12,17 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\MVC\View\HtmlView;
use Joomla\CMS\Toolbar\ToolbarHelper;
use VDM\Joomla\Utilities\StringHelper;
/**
* Componentbuilder View class
*/
class ComponentbuilderViewComponentbuilder extends JViewLegacy
class ComponentbuilderViewComponentbuilder extends HtmlView
{
/**
* View display method
@ -26,19 +31,19 @@ class ComponentbuilderViewComponentbuilder extends JViewLegacy
function display($tpl = null)
{
// Assign data to the view
$this->icons = $this->get('Icons');
$this->contributors = ComponentbuilderHelper::getContributors();
$this->icons = $this->get('Icons');
$this->contributors = ComponentbuilderHelper::getContributors();
$this->wiki = $this->get('Wiki');
$this->noticeboard = $this->get('Noticeboard');
$this->readme = $this->get('Readme');
$this->version = $this->get('Version');
// get the manifest details of the component
$this->manifest = ComponentbuilderHelper::manifest();
// Set the toolbar
$this->addToolBar();
// Check for errors.
if (count($errors = $this->get('Errors')))
{
@ -58,18 +63,18 @@ class ComponentbuilderViewComponentbuilder extends JViewLegacy
protected function addToolBar()
{
$canDo = ComponentbuilderHelper::getActions('componentbuilder');
JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_DASHBOARD'), 'grid-2');
ToolbarHelper::title(Text::_('COM_COMPONENTBUILDER_DASHBOARD'), 'grid-2');
// set help url for this view if found
$this->help_url = ComponentbuilderHelper::getHelpUrl('componentbuilder');
if (ComponentbuilderHelper::checkString($this->help_url))
if (StringHelper::check($this->help_url))
{
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $this->help_url);
ToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $this->help_url);
}
if ($canDo->get('core.admin') || $canDo->get('core.options'))
{
JToolBarHelper::preferences('com_componentbuilder');
ToolbarHelper::preferences('com_componentbuilder');
}
}
@ -80,15 +85,17 @@ class ComponentbuilderViewComponentbuilder extends JViewLegacy
*/
protected function setDocument()
{
$document = JFactory::getDocument();
// add dashboard style sheets
$document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/dashboard.css");
if (!isset($this->document))
{
$this->document = Factory::getDocument();
}
// set page title
$document->setTitle(JText::_('COM_COMPONENTBUILDER_DASHBOARD'));
$this->document->setTitle(Text::_('COM_COMPONENTBUILDER_DASHBOARD'));
// add manifest to page JavaScript
$document->addScriptDeclaration("var manifest = jQuery.parseJSON('" . json_encode($this->manifest) . "');", "text/javascript");
$this->document->addScriptDeclaration("var manifest = jQuery.parseJSON('" . json_encode($this->manifest) . "');", "text/javascript");
// add dashboard style sheets
Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/dashboard.css", ['version' => 'auto']);
}
}