Closed joomlapl-bot closed 5 months ago
PR w związku ze zmianą oryginału https://github.com/joomla/joomla-cms/pull/41254 Poniżej zmiany w oryginale:
PR w związku ze zmianą oryginału https://github.com/joomla/joomla-cms/pull/41254 Poniżej zmiany w oryginale:
Click to expand the diff!
```diff diff --git a/administrator/components/com_finder/src/View/Indexer/HtmlView.php b/administrator/components/com_finder/src/View/Indexer/HtmlView.php index af1e7c5eafe6e..7dcd1ba819bc8 100644 --- a/administrator/components/com_finder/src/View/Indexer/HtmlView.php +++ b/administrator/components/com_finder/src/View/Indexer/HtmlView.php @@ -10,7 +10,6 @@ namespace Joomla\Component\Finder\Administrator\View\Indexer; -use Joomla\CMS\Factory; use Joomla\CMS\Form\Form; use Joomla\CMS\Language\Text; use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView; @@ -64,17 +63,14 @@ public function display($tpl = null) */ protected function addToolbar() { - $toolbar = Toolbar::getInstance('toolbar'); + /** @var Toolbar $toolbar */ + $toolbar = $this->getDocument()->getToolbar(); ToolbarHelper::title(Text::_('COM_FINDER_INDEXER_TOOLBAR_TITLE'), 'search-plus finder'); - $arrow = Factory::getLanguage()->isRtl() ? 'arrow-right' : 'arrow-left'; - - ToolbarHelper::link( - Route::_('index.php?option=com_finder&view=index'), - 'JTOOLBAR_BACK', - $arrow - ); + $toolbar->linkButton('back', 'JTOOLBAR_BACK') + ->icon('icon-arrow-' . ($this->getLanguage()->isRtl() ? 'right' : 'left')) + ->url(Route::_('index.php?option=com_finder&view=index')); $toolbar->standardButton('index', 'COM_FINDER_INDEX') ->icon('icon-play') diff --git a/administrator/components/com_finder/src/View/Item/HtmlView.php b/administrator/components/com_finder/src/View/Item/HtmlView.php index ef50034d3d5a3..70b4af4cd8077 100644 --- a/administrator/components/com_finder/src/View/Item/HtmlView.php +++ b/administrator/components/com_finder/src/View/Item/HtmlView.php @@ -12,6 +12,8 @@ use Joomla\CMS\Language\Text; use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Toolbar\Toolbar; use Joomla\CMS\Toolbar\ToolbarHelper; /** @@ -78,7 +80,13 @@ public function display($tpl = null) */ protected function addToolbar() { + /** @var Toolbar $toolbar */ + $toolbar = $this->getDocument()->getToolbar(); + ToolbarHelper::title(Text::_('COM_FINDER_INDEX_TOOLBAR_TITLE'), 'search-plus finder'); - ToolbarHelper::back('JTOOLBAR_BACK', 'index.php?option=com_finder&view=index'); + + $toolbar->linkButton('back', 'JTOOLBAR_BACK') + ->icon('icon-arrow-' . ($this->getLanguage()->isRtl() ? 'right' : 'left')) + ->url(Route::_('index.php?option=com_finder&view=index')); } } diff --git a/administrator/language/en-GB/mod_toolbar.ini b/administrator/language/en-GB/mod_toolbar.ini index 880c42614dad2..aec2f9d4d4a1a 100644 --- a/administrator/language/en-GB/mod_toolbar.ini +++ b/administrator/language/en-GB/mod_toolbar.ini @@ -4,4 +4,6 @@ ; Note : All ini files need to be saved as UTF-8 MOD_TOOLBAR="Toolbar" -MOD_TOOLBAR_XML_DESCRIPTION="This module shows the toolbar icons used to control actions throughout the Administrator area." \ No newline at end of file +MOD_TOOLBAR_FIELD_TOOLBAR_LABEL="Toolbar Identifier" +MOD_TOOLBAR_FIELD_TOOLBAR_DESCRIPTION="The default toolbar in the administrator is called 'toolbar', if you have an extension that generate own toolbars you can create an own module with it's toolbar identifier. The default toolbar should never be removed!" +MOD_TOOLBAR_XML_DESCRIPTION="This module shows the toolbar icons used to control actions throughout the Administrator area." diff --git a/administrator/modules/mod_toolbar/mod_toolbar.php b/administrator/modules/mod_toolbar/mod_toolbar.php index 9466a9efd76b3..4c1cb606e6f6a 100644 --- a/administrator/modules/mod_toolbar/mod_toolbar.php +++ b/administrator/modules/mod_toolbar/mod_toolbar.php @@ -10,9 +10,11 @@ defined('_JEXEC') or die; +use Joomla\CMS\Factory; use Joomla\CMS\Helper\ModuleHelper; -use Joomla\CMS\Toolbar\Toolbar; -$toolbar = Toolbar::getInstance('toolbar')->render(); +/** @var $params Joomla\Registry\Registry */ + +$toolbar = Factory::getApplication()->getDocument()->getToolbar($params->get('toolbar', 'toolbar'))->render(); require ModuleHelper::getLayoutPath('mod_toolbar', $params->get('layout', 'default')); diff --git a/administrator/modules/mod_toolbar/mod_toolbar.xml b/administrator/modules/mod_toolbar/mod_toolbar.xml index 41cb6c5c8e182..05ba439b0e4d9 100644 --- a/administrator/modules/mod_toolbar/mod_toolbar.xml +++ b/administrator/modules/mod_toolbar/mod_toolbar.xml @@ -20,6 +20,16 @@