Skip to content

Commit 3f58bda

Browse files
author
Phil E. Taylor
authored
com_installer warnings empty state (#33411)
1 parent 770e24b commit 3f58bda

File tree

3 files changed

+30
-3
lines changed

3 files changed

+30
-3
lines changed

administrator/components/com_installer/src/View/Warnings/HtmlView.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,13 @@ class HtmlView extends InstallerViewDefault
3232
*/
3333
public function display($tpl = null)
3434
{
35-
$items = $this->get('Items');
36-
$this->messages = &$items;
35+
$this->messages = $this->get('Items');
36+
37+
if (!\count($this->messages))
38+
{
39+
$this->setLayout('emptystate');
40+
}
41+
3742
parent::display($tpl);
3843
}
3944

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
/**
3+
* @package Joomla.Administrator
4+
* @subpackage com_installer
5+
*
6+
* @copyright (C) 2021 Open Source Matters, Inc. <https://www.joomla.org>
7+
* @license GNU General Public License version 2 or later; see LICENSE.txt
8+
*/
9+
10+
defined('_JEXEC') or die;
11+
12+
use Joomla\CMS\Language\Text;
13+
use Joomla\CMS\Layout\LayoutHelper;
14+
15+
$displayData = [
16+
'helpURL' => 'https://docs.joomla.org/Help4.x:Information:_Warnings',
17+
'icon' => 'icon-puzzle-piece install',
18+
'title' => Text::_('COM_INSTALLER_MSG_WARNINGS_NONE'),
19+
'content' => '',
20+
];
21+
22+
echo LayoutHelper::render('joomla.content.emptystate', $displayData);

administrator/language/en-GB/com_installer.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ COM_INSTALLER_MSG_UPDATESITES_REBUILD_SUCCESS="Update sites have been rebuilt fr
171171
COM_INSTALLER_MSG_UPDATESITES_REBUILD_WARNING="Update sites have been rebuilt. No extension with updates sites discovered."
172172
COM_INSTALLER_MSG_WARNING_NO_LANGUAGES_UPDATESERVER="The update table is not up to date. Please <a href=\"index.php?option=com_installer&view=updatesites\">rebuild your update server table</a>"
173173
COM_INSTALLER_MSG_WARNINGFURTHERINFO="Further information on warnings"
174-
COM_INSTALLER_MSG_WARNINGFURTHERINFODESC="For more information see the <a href=\"https://docs.joomla.org\" target=\"_blank\" class=\"alert-link\">Joomla! Documentation Site</a>."
174+
COM_INSTALLER_MSG_WARNINGFURTHERINFODESC="For more information see the <a href=\"https://docs.joomla.org/Help4.x:Information:_Warnings\" target=\"_blank\" class=\"alert-link\">Joomla! Documentation Site</a>."
175175
COM_INSTALLER_MSG_WARNINGS_FILEUPLOADISDISABLEDDESC="File uploads are required to upload extensions with the installer."
176176
COM_INSTALLER_MSG_WARNINGS_FILEUPLOADSDISABLED="File uploads disabled."
177177
COM_INSTALLER_MSG_WARNINGS_JOOMLATMPNOTSET="The Joomla temporary folder is not set."

0 commit comments

Comments
 (0)