Skip to content

Commit

Permalink
Merge branch 'version1'
Browse files Browse the repository at this point in the history
Conflicts:
	composer.json
  • Loading branch information
Fabrizio Branca committed Mar 16, 2015
2 parents 221b363 + 6f418b9 commit 6c06a4f
Show file tree
Hide file tree
Showing 105 changed files with 5,295 additions and 1,634 deletions.
34 changes: 34 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
language: php
php:
- 5.3
- 5.4
- 5.5
#- 5.6
#- hhvm
matrix:
allow_failures:
- php: 5.6
- php: hhvm
env:
global:
- MAGENTO_DB_ALLOWSAME=1
- SKIP_CLEANUP=1
matrix:
- MAGENTO_VERSION=magento-ce-1.9.1.0
- MAGENTO_VERSION=magento-ce-1.9.0.1
- MAGENTO_VERSION=magento-ce-1.8.1.0
- MAGENTO_VERSION=magento-ce-1.8.0.0
- MAGENTO_VERSION=magento-ce-1.7.0.2
before_script:
- curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar
script:
# Code Style
- php phpcs.phar --standard=./phpcs.xml --encoding=utf-8 --report-width=180 ./app ./shell
# Unit Tests
- curl -sSL https://raw.githubusercontent.com/AOEpeople/MageTestStand/master/setup.sh | bash
notifications:
email:
recipients:
- travis@fabrizio-branca.de
on_success: always
on_failure: always
58 changes: 0 additions & 58 deletions app/code/community/Aoe/Scheduler/Block/Adminhtml/Cron.php

This file was deleted.

141 changes: 0 additions & 141 deletions app/code/community/Aoe/Scheduler/Block/Adminhtml/Cron/Grid.php

This file was deleted.

20 changes: 20 additions & 0 deletions app/code/community/Aoe/Scheduler/Block/Adminhtml/Instructions.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

/**
* Job block
*
* @author Fabrizio Branca
*/
class Aoe_Scheduler_Block_Adminhtml_Instructions extends Mage_Adminhtml_Block_Template
{

public function getCurrentUser()
{
return trim(shell_exec('whoami'));
}

public function getMagentoRootpath()
{
return Mage::getBaseDir();
}
}
68 changes: 68 additions & 0 deletions app/code/community/Aoe/Scheduler/Block/Adminhtml/Job.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<?php

/**
* Job block
*
* @author Fabrizio Branca
*/
class Aoe_Scheduler_Block_Adminhtml_Job extends Mage_Adminhtml_Block_Widget_Grid_Container
{
/**
* Constructor for Job Adminhtml Block
*/
public function __construct()
{
$this->_blockGroup = 'aoe_scheduler';
$this->_controller = 'adminhtml_job';
$this->_headerText = $this->__('Available Jobs');
parent::__construct();
}

/**
* Prepare layout
*
* @return $this
*/
protected function _prepareLayout()
{
$this->removeButton('add');
$this->_addButton(
'add_new_job',
array(
'label' => $this->__('Create new job'),
'onclick' => "setLocation('{$this->getUrl('*/*/new')}')",
'class' => 'add'
)
);
$this->_addButton(
'add_new',
array(
'label' => $this->__('Generate Schedule'),
'onclick' => "setLocation('{$this->getUrl('*/*/generateSchedule')}')",
)
);
$this->_addButton(
'configure',
array(
'label' => $this->__('Cron Configuration'),
'onclick' => "setLocation('{$this->getUrl('adminhtml/system_config/edit', array('section' => 'system'))}#system_cron')",
)
);
return parent::_prepareLayout();
}


/**
* Returns the CSS class for the header
*
* Usually 'icon-head' and a more precise class is returned. We return
* only an empty string to avoid spacing on the left of the header as we
* don't have an icon.
*
* @return string
*/
public function getHeaderCssClass()
{
return '';
}
}
68 changes: 68 additions & 0 deletions app/code/community/Aoe/Scheduler/Block/Adminhtml/Job/Edit.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<?php
/**
* Job edit container
*
* @author Fabrizio Branca
* @since 2014-08-09
*/
class Aoe_Scheduler_Block_Adminhtml_Job_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
{

public function __construct()
{
parent::__construct();
if ($this->getJob()->isOverlay()) {
$this->updateButton('delete', 'label', $this->__('Reset overlay'));
} elseif ($this->getJob()->isXmlOnly()) {
$this->removeButton('delete');
}
$this->removeButton('reset');
}

/**
* Internal constructor
*
*/
protected function _construct()
{
parent::_construct();
$this->_objectId = 'job_code';
$this->_blockGroup = 'aoe_scheduler';
$this->_controller = 'adminhtml_job';
}

/**
* Get job
*
* @return Aoe_Scheduler_Model_Job
*/
public function getJob()
{
return Mage::registry('current_job_instance');
}


/**
* Return translated header text depending on creating/editing action
*
* @return string
*/
public function getHeaderText()
{
if ($this->getJob()->getId()) {
return $this->__('Job "%s"', $this->escapeHtml($this->getJob()->getJobCode()));
} else {
return $this->__('New Job');
}
}

/**
* Return save url for edit form
*
* @return string
*/
public function getSaveUrl()
{
return $this->getUrl('*/*/save', array('_current'=>true, 'back'=>null));
}
}
Loading

0 comments on commit 6c06a4f

Please sign in to comment.