-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[4] Empty State for Banner clients and tracks (#33381)
* Empty State for Banner clients and tracks * Remove formURL Co-authored-by: Quy <quy@fluxbb.org>
- Loading branch information
Phil E. Taylor
and
Quy
authored
Apr 30, 2021
1 parent
30aa741
commit 4e930a7
Showing
5 changed files
with
98 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
administrator/components/com_banners/tmpl/clients/emptystate.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
/** | ||
* @package Joomla.Administrator | ||
* @subpackage com_banners | ||
* | ||
* @copyright (C) 2021 Open Source Matters, Inc. <https://www.joomla.org> | ||
* @license GNU General Public License version 2 or later; see LICENSE.txt | ||
*/ | ||
|
||
defined('_JEXEC') or die; | ||
|
||
use Joomla\CMS\Factory; | ||
use Joomla\CMS\Layout\LayoutHelper; | ||
|
||
$displayData = [ | ||
'textPrefix' => 'COM_BANNERS_CLIENT', | ||
'formURL' => 'index.php?option=com_banners&view=clients', | ||
'helpURL' => 'https://docs.joomla.org/Special:MyLanguage/Help40:Banners:_Clients', | ||
'icon' => 'icon-bookmark banners', | ||
]; | ||
|
||
if (count(Factory::getApplication()->getIdentity()->getAuthorisedCategories('com_banners', 'core.create')) > 0) | ||
{ | ||
$displayData['createURL'] = 'index.php?option=com_banners&task=client.add'; | ||
} | ||
|
||
echo LayoutHelper::render('joomla.content.emptystate', $displayData); |
20 changes: 20 additions & 0 deletions
20
administrator/components/com_banners/tmpl/tracks/emptystate.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
/** | ||
* @package Joomla.Administrator | ||
* @subpackage com_banners | ||
* | ||
* @copyright (C) 2021 Open Source Matters, Inc. <https://www.joomla.org> | ||
* @license GNU General Public License version 2 or later; see LICENSE.txt | ||
*/ | ||
|
||
defined('_JEXEC') or die; | ||
|
||
use Joomla\CMS\Layout\LayoutHelper; | ||
|
||
$displayData = [ | ||
'textPrefix' => 'COM_BANNERS_TRACKS', | ||
'helpURL' => 'https://docs.joomla.org/Special:MyLanguage/Help40:Banners:_Tracks', | ||
'icon' => 'icon-bookmark banners', | ||
]; | ||
|
||
echo LayoutHelper::render('joomla.content.emptystate', $displayData); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters