Skip to content

Commit

Permalink
Actions column rewritten to utilize new Actions renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
vovayatsyuk committed Jan 27, 2017
1 parent d4745e3 commit b775674
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
<?php

class TM_Core_Block_Adminhtml_Module_Grid_Renderer_Actions
extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
class TM_Core_Block_Adminhtml_Module_Grid_Renderer_Actions extends TM_Core_Block_Adminhtml_Renderer_Actions
{
/**
* Renders grid column
*
* @param Varien_Object $row
* @return string
*/
public function render(Varien_Object $row)
public function getActions(Varien_Object $row)
{
$links = array();

if ($row->getDocsLink()) {
$links[] = sprintf(
'<a href="%s" title="%s" onclick="window.open(this.href); return false;">%s</a>',
$row->getDocsLink(),
Mage::helper('tmcore')->__('View Docs'),
Mage::helper('tmcore')->__('Docs')
Mage::helper('tmcore')->__('Read Documentation'),
Mage::helper('tmcore')->__('Read Documentation')
);
}

Expand All @@ -27,7 +26,7 @@ public function render(Varien_Object $row)
'<a href="%s" title="%s" onclick="window.open(this.href); return false;">%s</a>',
$row->getChangelogLink(),
Mage::helper('tmcore')->__('View Changelog'),
Mage::helper('tmcore')->__('Changelog')
Mage::helper('tmcore')->__('View Changelog')
);
}

Expand All @@ -44,10 +43,10 @@ public function render(Varien_Object $row)
$links[] = sprintf(
'<a href="%s">%s</a>',
$this->getUrl('*/*/manage/', array('_current' => true, 'id' => $row->getId())),
Mage::helper('tmcore')->__('Manage')
Mage::helper('tmcore')->__('Open Installer')
);
}

return implode(' | ', $links);
return $links;
}
}
1 change: 1 addition & 0 deletions app/design/adminhtml/default/default/layout/tmcore.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0"?>
<layout>
<adminhtml_tmcore_module_index>
<update handle="tmcore_actions"/>
<update handle="tmcore_popup"/>
<reference name="content">
<block type="tmcore/adminhtml_module" name="module.list"/>
Expand Down

0 comments on commit b775674

Please sign in to comment.