diff --git a/administrator/components/com_installer/src/View/Warnings/HtmlView.php b/administrator/components/com_installer/src/View/Warnings/HtmlView.php index b53c2d8f31bcc..6ce71fc9c8fb3 100644 --- a/administrator/components/com_installer/src/View/Warnings/HtmlView.php +++ b/administrator/components/com_installer/src/View/Warnings/HtmlView.php @@ -32,8 +32,13 @@ class HtmlView extends InstallerViewDefault */ public function display($tpl = null) { - $items = $this->get('Items'); - $this->messages = &$items; + $this->messages = $this->get('Items'); + + if (!\count($this->messages)) + { + $this->setLayout('emptystate'); + } + parent::display($tpl); } diff --git a/administrator/components/com_installer/tmpl/warnings/emptystate.php b/administrator/components/com_installer/tmpl/warnings/emptystate.php new file mode 100644 index 0000000000000..10cb596b5b38a --- /dev/null +++ b/administrator/components/com_installer/tmpl/warnings/emptystate.php @@ -0,0 +1,22 @@ + + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +defined('_JEXEC') or die; + +use Joomla\CMS\Language\Text; +use Joomla\CMS\Layout\LayoutHelper; + +$displayData = [ + 'helpURL' => 'https://docs.joomla.org/Help4.x:Information:_Warnings', + 'icon' => 'icon-puzzle-piece install', + 'title' => Text::_('COM_INSTALLER_MSG_WARNINGS_NONE'), + 'content' => '', +]; + +echo LayoutHelper::render('joomla.content.emptystate', $displayData); diff --git a/administrator/language/en-GB/com_installer.ini b/administrator/language/en-GB/com_installer.ini index 1f3a50c1b4c95..fa0a4ae990a8e 100644 --- a/administrator/language/en-GB/com_installer.ini +++ b/administrator/language/en-GB/com_installer.ini @@ -171,7 +171,7 @@ COM_INSTALLER_MSG_UPDATESITES_REBUILD_SUCCESS="Update sites have been rebuilt fr COM_INSTALLER_MSG_UPDATESITES_REBUILD_WARNING="Update sites have been rebuilt. No extension with updates sites discovered." COM_INSTALLER_MSG_WARNING_NO_LANGUAGES_UPDATESERVER="The update table is not up to date. Please rebuild your update server table" COM_INSTALLER_MSG_WARNINGFURTHERINFO="Further information on warnings" -COM_INSTALLER_MSG_WARNINGFURTHERINFODESC="For more information see the Joomla! Documentation Site." +COM_INSTALLER_MSG_WARNINGFURTHERINFODESC="For more information see the Joomla! Documentation Site." COM_INSTALLER_MSG_WARNINGS_FILEUPLOADISDISABLEDDESC="File uploads are required to upload extensions with the installer." COM_INSTALLER_MSG_WARNINGS_FILEUPLOADSDISABLED="File uploads disabled." COM_INSTALLER_MSG_WARNINGS_JOOMLATMPNOTSET="The Joomla temporary folder is not set." diff --git a/layouts/joomla/content/emptystate.php b/layouts/joomla/content/emptystate.php index e6e990fd6501f..6871ea28ff3e9 100644 --- a/layouts/joomla/content/emptystate.php +++ b/layouts/joomla/content/emptystate.php @@ -23,6 +23,8 @@ $formURL = $displayData['formURL'] ?? ''; $createURL = $displayData['createURL'] ?? ''; $helpURL = $displayData['helpURL'] ?? ''; +$title = $displayData['title'] ?? Text::_($textPrefix . '_EMPTYSTATE_TITLE'); +$content = $displayData['content'] ?? Text::_($textPrefix . '_EMPTYSTATE_CONTENT'); $icon = $displayData['icon'] ?? 'icon-copy article'; ?> @@ -30,10 +32,10 @@
-

+

- +

input->get('tmpl') !== 'component') : ?>