31
0
mirror of https://github.com/joomla-extensions/patchtester.git synced 2024-06-03 14:10:47 +00:00

Make the errors layout a base layout

This commit is contained in:
Michael Babker 2017-01-21 13:52:15 -06:00
parent 3483d98e58
commit cb5ce7e6ac
5 changed files with 11 additions and 9 deletions

View File

@ -88,6 +88,12 @@ class PullsHtmlView extends DefaultHtmlView
$this->trackerAlias = TrackerHelper::getTrackerAlias($this->state->get('github_user'), $this->state->get('github_repo'));
}
// Change the layout if there are environment errors
if (count($this->envErrors))
{
$this->setLayout('errors');
}
$this->addToolbar();
// Make text strings available in the JavaScript API

View File

@ -14,9 +14,6 @@
\JHtml::_('stylesheet', 'com_patchtester/octicons.css', array('version' => 'auto', 'relative' => true));
\JHtml::_('script', 'com_patchtester/patchtester.js', array('version' => 'auto', 'relative' => true));
if (count($this->envErrors)) :
echo $this->loadTemplate('errors');
else :
$listOrder = $this->escape($this->state->get('list.ordering'));
$listDirn = $this->escape($this->state->get('list.direction'));
$filterApplied = $this->escape($this->state->get('filter.applied'));
@ -126,4 +123,3 @@ $colSpan = $this->trackerAlias !== false ? 7 : 6;
<?php echo \JHtml::_('form.token'); ?>
</div>
</form>
<?php endif;

View File

@ -6,7 +6,7 @@
* @license GNU General Public License version 2 or later
*/
/** @var \PatchTester\View\DefaultHtmlView $this */
/** @var \PatchTester\View\Pulls\PullsHtmlView $this */
?>
<h3><?php echo \JText::_('COM_PATCHTESTER_REQUIREMENTS_HEADING'); ?></h3>
<p><?php echo \JText::_('COM_PATCHTESTER_REQUIREMENTS_NOT_MET'); ?></p>

View File

@ -31,6 +31,10 @@ class Com_PatchtesterInstallerScript extends JInstallerScript
$this->minimumJoomla = '3.7';
$this->minimumPhp = JOOMLA_MINIMUM_PHP;
$this->deleteFiles = array(
'/administrator/components/com_patchtester/PatchTester/View/Pulls/tmpl/default_errors.php',
);
$this->deleteFolders = array(
'/administrator/components/com_patchtester/PatchTester/Table',
'/components/com_patchtester',

View File

@ -13,9 +13,6 @@
\JHtml::_('stylesheet', 'com_patchtester/octicons.css', array('version' => 'auto', 'relative' => true));
\JHtml::_('script', 'com_patchtester/patchtester.js', array('version' => 'auto', 'relative' => true));
if (count($this->envErrors)) :
echo $this->loadTemplate('errors');
else :
$listOrder = $this->escape($this->state->get('list.ordering'));
$listDirn = $this->escape($this->state->get('list.direction'));
$filterApplied = $this->escape($this->state->get('filter.applied'));
@ -114,4 +111,3 @@ echo \JHtml::_(
<?php echo \JHtml::_('form.token'); ?>
</div>
</form>
<?php endif;