00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 class Mage_Adminhtml_Block_Notification_Grid_Renderer_Actions
00036 extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
00037 {
00038
00039
00040
00041
00042
00043
00044 public function render(Varien_Object $row)
00045 {
00046 if (!$row->getIsRead()) {
00047 return sprintf('<a target="_blank" href="%s">%s</a> | <a href="%s">%s</a> | <a href="%s" onClick="deleteConfirm(\'%s\',this.href); return false;">%s</a>',
00048 $row->getUrl(),
00049 Mage::helper('adminnotification')->__('Read Details'),
00050 $this->getUrl('*/*/markAsRead/', array('_current'=>true, 'id' => $row->getId())),
00051 Mage::helper('adminnotification')->__('Mark as Read'),
00052 $this->getUrl('*/*/remove/', array('_current'=>true, 'id' => $row->getId())),
00053 Mage::helper('adminnotification')->__('Are you sure?'),
00054 Mage::helper('adminnotification')->__('Remove')
00055 );
00056 }
00057 else {
00058 return sprintf('<a target="_blank" href="%s">%s</a> | <a href="%s" onClick="deleteConfirm(\'%s\',this.href); return false;">%s</a>',
00059 $row->getUrl(),
00060 Mage::helper('adminnotification')->__('Read Details'),
00061 $this->getUrl('*/*/remove/', array('_current'=>true, 'id' => $row->getId())),
00062 Mage::helper('adminnotification')->__('Are you sure?'),
00063 Mage::helper('adminnotification')->__('Remove')
00064 );
00065 }
00066 }
00067 }