Skip to content

Commit

Permalink
Merge branch 'release/1.5.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
therouv committed Oct 29, 2015
2 parents a85887e + 00b1b5a commit 7685eee
Show file tree
Hide file tree
Showing 24 changed files with 327 additions and 289 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This extension provides some debbuging functionality for Magento.

Facts
-----
- version: 1.4.0
- version: 1.5.0
- [extension on GitHub](https://github.com/firegento/firegento)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
* @version 1.2.0
*/

/**
* CheckEvents Grid Container
*
Expand All @@ -34,8 +35,6 @@ class FireGento_Debug_Block_Diagnostic_CheckEvents
{
/**
* Class constructor
*
* @return void
*/
public function __construct()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
* @version 1.2.0
*/

/**
* CheckEvents Grid
*
Expand All @@ -34,8 +35,6 @@ class FireGento_Debug_Block_Diagnostic_CheckEvents_Grid
{
/**
* Class constructor
*
* @return void
*/
public function __construct()
{
Expand All @@ -44,7 +43,7 @@ public function __construct()
$this->setDefaultSort('event');
$this->setDefaultDir('ASC');
//$this->_filterVisibility = false;
$this->_pagerVisibility = false;
$this->_pagerVisibility = false;
}

/**
Expand All @@ -69,38 +68,38 @@ protected function _prepareColumns()
{
$baseUrl = $this->getUrl();

$this->addColumn(
'module',
array(
'header' => $this->__('Module Name'),
'align' => 'left',
'index' => 'module',
'sortable' => false,
'filter' => false
)
);
$this->addColumn(
'code_pool',
array(
'header' => $this->__('Code Pool'),
'align' => 'left',
'index' => 'code_pool',
'width' => '80px',
'sortable' => true,
'type' => 'options',
'options' => Mage::helper('firegento')->getHashCodePools(),
'filter_condition_callback' => array($this, '_codePoolFilter'),
)
$this->addColumn(
'module',
array(
'header' => $this->__('Module Name'),
'align' => 'left',
'index' => 'module',
'sortable' => false,
'filter' => false
)
);
$this->addColumn(
'code_pool',
array(
'header' => $this->__('Code Pool'),
'align' => 'left',
'index' => 'code_pool',
'width' => '80px',
'sortable' => true,
'type' => 'options',
'options' => Mage::helper('firegento')->getHashCodePools(),
'filter_condition_callback' => array($this, '_codePoolFilter'),
)
);

$this->addColumn(
'event',
array(
'header' => $this->__('Event'),
'align' => 'left',
'index' => 'event',
'width' => '50%',
'sortable' => true,
'header' => $this->__('Event'),
'align' => 'left',
'index' => 'event',
'width' => '50%',
'sortable' => true,
'filter_condition_callback' => array($this, '_eventFilter'),
)
);
Expand All @@ -113,59 +112,58 @@ protected function _prepareColumns()
'width' => '30%',
'sortable' => false,
'renderer' => 'firegento/diagnostic_renderer_paragraph',
'filter' => false
'filter' => false
)
);



return parent::_prepareColumns();
}

/**
* Filter code pool collection
*
* @param Varien_Data_Collection $collection
* @param Varien_Data_Collection $collection
* @param Mage_Adminhtml_Block_Widget_Grid_Column $column
*/
protected function _codePoolFilter($collection, $column)
{
if (!$value = $column->getFilter()->getValue()) {
return $this;
protected function _codePoolFilter($collection, $column)
{
if (!$value = $column->getFilter()->getValue()) {
return $this;
}

$collection = $this->getCollection();
$collection = $this->getCollection();

foreach($collection as $itemKey=>$item) {
if($value!=$item->getCodePool()) {
foreach ($collection as $itemKey => $item) {
if ($value != $item->getCodePool()) {
$collection->removeItemByKey($itemKey);
}
}

return $this;
}

return $this;
}

/**
* Filter event collection
*
* @param Varien_Data_Collection $collection
* @param Mage_Adminhtml_Block_Widget_Grid_Column $column
*/
protected function _eventFilter($collection, $column)
{
if (!$value = $column->getFilter()->getValue()) {
return $this;
}

$collection = $this->getCollection();

foreach($collection as $itemKey=>$item) {
if(strpos($item->getEvent(),$value)===false) {
$collection->removeItemByKey($itemKey);
}
}

return $this;
/**
* Filter event collection
*
* @param Varien_Data_Collection $collection
* @param Mage_Adminhtml_Block_Widget_Grid_Column $column
*/
protected function _eventFilter($collection, $column)
{
if (!$value = $column->getFilter()->getValue()) {
return $this;
}

$collection = $this->getCollection();

foreach ($collection as $itemKey => $item) {
if (strpos($item->getEvent(), $value) === false) {
$collection->removeItemByKey($itemKey);
}
}

return $this;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
* @version 1.2.0
*/

/**
* CheckModules Grid Container
*
Expand All @@ -34,8 +35,6 @@ class FireGento_Debug_Block_Diagnostic_CheckModules
{
/**
* Class constructor
*
* @return void;
*/
public function __construct()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
* @version 1.2.0
*/

/**
* CheckRewrites Grid
*
Expand All @@ -34,8 +35,6 @@ class FireGento_Debug_Block_Diagnostic_CheckModules_Grid
{
/**
* Class constructor
*
* @return void
*/
public function __construct()
{
Expand All @@ -44,7 +43,7 @@ public function __construct()
$this->setDefaultSort('name');
$this->setDefaultDir('ASC');
$this->_filterVisibility = false;
$this->_pagerVisibility = false;
$this->_pagerVisibility = false;
}

/**
Expand Down Expand Up @@ -154,11 +153,11 @@ protected function _prepareColumns()
$this->addColumn(
'action',
array(
'header' => Mage::helper('sales')->__('Action'),
'width' => '50px',
'type' => 'action',
'getter' => 'getName',
'actions' => array(
'header' => Mage::helper('sales')->__('Action'),
'width' => '50px',
'type' => 'action',
'getter' => 'getName',
'actions' => array(
array(
'caption' => $this->__('Activate/Deactivate'),
'url' => array('base' => '*/*/activation'),
Expand Down Expand Up @@ -204,9 +203,9 @@ public function checkActivationLink($value, $row)
public function decorateTrueFalse($value, $row)
{
if ($row->getActive()) {
$cell = '<span class="grid-severity-notice"><span>'.$value.'</span></span>';
$cell = '<span class="grid-severity-notice"><span>' . $value . '</span></span>';
} else {
$cell = '<span class="grid-severity-critical"><span>'.$value.'</span></span>';
$cell = '<span class="grid-severity-critical"><span>' . $value . '</span></span>';
}

return $cell;
Expand All @@ -222,9 +221,9 @@ public function decorateTrueFalse($value, $row)
public function decoratePathExists($value, $row)
{
if ($row->getPathExists()) {
$cell = '<span class="grid-severity-notice"><span>'.$value.'</span></span>';
$cell = '<span class="grid-severity-notice"><span>' . $value . '</span></span>';
} else {
$cell = '<span class="grid-severity-critical"><span>'.$value.'</span></span>';
$cell = '<span class="grid-severity-critical"><span>' . $value . '</span></span>';
}

return $cell;
Expand All @@ -240,9 +239,9 @@ public function decoratePathExists($value, $row)
public function decorateConfigExists($value, $row)
{
if ($row->getConfigExists()) {
$cell = '<span class="grid-severity-notice"><span>'.$value.'</span></span>';
$cell = '<span class="grid-severity-notice"><span>' . $value . '</span></span>';
} else {
$cell = '<span class="grid-severity-critical"><span>'.$value.'</span></span>';
$cell = '<span class="grid-severity-critical"><span>' . $value . '</span></span>';
}

return $cell;
Expand All @@ -251,7 +250,7 @@ public function decorateConfigExists($value, $row)
/**
* Get row edit url
*
* @param Varien_Object $row Current row
* @param Varien_Object $row Current row
* @return string|boolean Row url | false = no url
*/
public function getRowUrl($row)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
* @version 1.2.0
*/

/**
* CheckRewrites Grid Container
*
Expand All @@ -34,8 +35,6 @@ class FireGento_Debug_Block_Diagnostic_CheckRewrites
{
/**
* Class constructor
*
* @return void
*/
public function __construct()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
* @version 1.2.0
*/

/**
* CheckRewrites Grid
*
Expand All @@ -34,15 +35,13 @@ class FireGento_Debug_Block_Diagnostic_CheckRewrites_Grid
{
/**
* Class constructor
*
* @return void
*/
public function __construct()
{
parent::__construct();
$this->setId('check_rewrites_grid');
$this->_filterVisibility = false;
$this->_pagerVisibility = false;
$this->_pagerVisibility = false;
}

/**
Expand Down Expand Up @@ -122,9 +121,9 @@ public function decorateStatus($value, $row)
{
$class = '';
if ($row->getStatus()) {
$cell = '<span class="grid-severity-notice"><span>'.$value.'</span></span>';
$cell = '<span class="grid-severity-notice"><span>' . $value . '</span></span>';
} else {
$cell = '<span class="grid-severity-critical"><span>'.$value.'</span></span>';
$cell = '<span class="grid-severity-critical"><span>' . $value . '</span></span>';
}

return $cell;
Expand Down
Loading

0 comments on commit 7685eee

Please sign in to comment.