Example #1
0
 /**
  * Renders grid column
  *
  * @param   Varien_Object $row
  * @return  string
  */
 public function render(Varien_Object $row)
 {
     $readDetailsHtml = $row->getUrl() ? '<a target="_blank" href="' . $row->getUrl() . '">' . Mage::helper('Mage_AdminNotification_Helper_Data')->__('Read Details') . '</a> | ' : '';
     $markAsReadHtml = !$row->getIsRead() ? '<a href="' . $this->getUrl('*/*/markAsRead/', array('_current' => true, 'id' => $row->getId())) . '">' . Mage::helper('Mage_AdminNotification_Helper_Data')->__('Mark as Read') . '</a> | ' : '';
     $encodedUrl = $this->helper('Mage_Core_Helper_Url')->getEncodedUrl();
     return sprintf('%s%s<a href="%s" onClick="deleteConfirm(\'%s\', this.href); return false;">%s</a>', $readDetailsHtml, $markAsReadHtml, $this->getUrl('*/*/remove/', array('_current' => true, 'id' => $row->getId(), Mage_Core_Controller_Front_Action::PARAM_NAME_URL_ENCODED => $encodedUrl)), Mage::helper('Mage_AdminNotification_Helper_Data')->__('Are you sure?'), Mage::helper('Mage_AdminNotification_Helper_Data')->__('Remove'));
 }
 /**
  * Renders grid column
  *
  * @param   Varien_Object $row
  * @return  string
  */
 public function render(Varien_Object $row)
 {
     if (!$row->getIsRead()) {
         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>', $row->getUrl(), AO::helper('adminnotification')->__('Read Details'), $this->getUrl('*/*/markAsRead/', array('_current' => true, 'id' => $row->getId())), AO::helper('adminnotification')->__('Mark as Read'), $this->getUrl('*/*/remove/', array('_current' => true, 'id' => $row->getId())), AO::helper('adminnotification')->__('Are you sure?'), AO::helper('adminnotification')->__('Remove'));
     } else {
         return sprintf('<a target="_blank" href="%s">%s</a> | <a href="%s" onClick="deleteConfirm(\'%s\',this.href); return false;">%s</a>', $row->getUrl(), AO::helper('adminnotification')->__('Read Details'), $this->getUrl('*/*/remove/', array('_current' => true, 'id' => $row->getId())), AO::helper('adminnotification')->__('Are you sure?'), AO::helper('adminnotification')->__('Remove'));
     }
 }
Example #3
0
 public function getRowClass(Varien_Object $row)
 {
     return $row->getIsRead() ? 'read' : 'unread';
 }
Example #4
0
 /**
  * Renders grid column
  *
  * @param   Varien_Object $row
  * @return  string
  */
 public function render(Varien_Object $row)
 {
     $readDetailsHtml = $row->getUrl() ? '<a target="_blank" href="' . $row->getUrl() . '">' . Mage::helper('adminnotification')->__('Read Details') . '</a> | ' : '';
     $markAsReadHtml = !$row->getIsRead() ? '<a href="' . $this->getUrl('*/*/markAsRead/', array('_current' => true, 'id' => $row->getId())) . '">' . Mage::helper('adminnotification')->__('Mark as Read') . '</a> | ' : '';
     return sprintf('%s%s<a href="%s" onClick="deleteConfirm(\'%s\', this.href); return false;">%s</a>', $readDetailsHtml, $markAsReadHtml, $this->getUrl('*/*/remove/', array('_current' => true, 'id' => $row->getId())), Mage::helper('adminnotification')->__('Are you sure?'), Mage::helper('adminnotification')->__('Remove'));
 }