Public Member Functions | |
render (Varien_Object $row) |
Definition at line 35 of file Action.php.
render | ( | Varien_Object $ | row | ) |
Renders column
Varien_Object | $row |
Reimplemented from Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Action.
Definition at line 37 of file Action.php.
00038 { 00039 $actions = array(); 00040 00041 00042 if($row->getQueueStatus()==Mage_Newsletter_Model_Queue::STATUS_NEVER) { 00043 if(!$row->getQueueStartAt() && $row->getSubscribersTotal()) { 00044 $actions[] = array( 00045 'url' => $this->getUrl('*/*/start', array('id'=>$row->getId())), 00046 'caption' => Mage::helper('newsletter')->__('Start') 00047 ); 00048 } 00049 } else if ($row->getQueueStatus()==Mage_Newsletter_Model_Queue::STATUS_SENDING) { 00050 $actions[] = array( 00051 'url' => $this->getUrl('*/*/pause', array('id'=>$row->getId())), 00052 'caption' => Mage::helper('newsletter')->__('Pause') 00053 ); 00054 00055 $actions[] = array( 00056 'url' => $this->getUrl('*/*/cancel', array('id'=>$row->getId())), 00057 'confirm' => Mage::helper('newsletter')->__('Do you really want to cancel the queue?'), 00058 'caption' => Mage::helper('newsletter')->__('Cancel') 00059 ); 00060 00061 00062 } else if ($row->getQueueStatus()==Mage_Newsletter_Model_Queue::STATUS_PAUSE) { 00063 00064 $actions[] = array( 00065 'url' => $this->getUrl('*/*/resume', array('id'=>$row->getId())), 00066 'caption' => Mage::helper('newsletter')->__('Resume') 00067 ); 00068 00069 } 00070 00071 $actions[] = array( 00072 'url' => $this->getUrl('*/newsletter_template/preview',array('id'=>$row->getTemplateId())), 00073 'caption' => Mage::helper('newsletter')->__('Preview'), 00074 'popup' => true 00075 ); 00076 00077 $this->getColumn()->setActions($actions); 00078 return parent::render($row); 00079 }