2011-10-11 13:02:57 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* @package PatchTester
|
|
|
|
* @copyright Copyright (C) 2011 Ian MacLennan, Inc. All rights reserved.
|
|
|
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
|
|
|
*/
|
|
|
|
|
|
|
|
// No direct access
|
|
|
|
defined('_JEXEC') or die;
|
|
|
|
|
|
|
|
jimport('joomla.application.component.view');
|
|
|
|
|
|
|
|
/**
|
|
|
|
* View class for a list of pull requests.
|
|
|
|
*
|
|
|
|
* @package PatchTester
|
|
|
|
*/
|
|
|
|
class PatchtesterViewPulls extends JView
|
|
|
|
{
|
|
|
|
protected $items;
|
|
|
|
protected $state;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Display the view
|
|
|
|
*/
|
|
|
|
public function display($tpl = null)
|
|
|
|
{
|
|
|
|
$this->state = $this->get('State');
|
|
|
|
$this->items = $this->get('Items');
|
|
|
|
$this->patches = $this->get('AppliedPatches');
|
|
|
|
|
|
|
|
// Check for errors.
|
|
|
|
if (count($errors = $this->get('Errors'))) {
|
|
|
|
JError::raiseError(500, implode("\n", $errors));
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
$this->addToolbar();
|
|
|
|
parent::display($tpl);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Add the page title and toolbar.
|
|
|
|
*/
|
|
|
|
protected function addToolbar()
|
|
|
|
{
|
2011-10-15 22:02:31 +00:00
|
|
|
JToolBarHelper::title('Joomla! Patch Tester', 'patchtester');
|
2011-10-11 13:02:57 +00:00
|
|
|
JToolBarHelper::preferences('com_patchtester');
|
2011-10-15 22:02:31 +00:00
|
|
|
|
|
|
|
JFactory::getDocument()->addStyleDeclaration(
|
|
|
|
'.icon-48-patchtester {background-image: url(components/com_patchtester/assets/images/icon-48-patchtester.png);}'
|
|
|
|
);
|
2011-10-11 13:02:57 +00:00
|
|
|
}
|
|
|
|
}
|