コード例 #1
0
ファイル: Window.php プロジェクト: sagmahajan/aswan_release
 protected function _toHtml()
 {
     if ($this->getIsHtml()) {
         $this->setTemplate('aw_all/notification/window.phtml');
     }
     return parent::_toHtml();
 }
コード例 #2
0
 protected function _toHtml()
 {
     if ($this->getIsHtml()) {
         $this->setTemplate('wio_all/popup.phtml');
     }
     return parent::_toHtml();
 }
コード例 #3
0
 /**
  * Initialize block window
  *
  */
 protected function _construct()
 {
     $this->setMarkAllReadText(Mage::helper('adminnotificationadvanced')->__('Mark all read'));
     $this->setMarkAllReadUrl(Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/notificationadvanced/markallread'));
     $this->setDeleteAllText($this->__('Delete all'));
     $this->setDeleteAllUrl(Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/notificationadvanced/deleteall'));
     parent::_construct();
 }
コード例 #4
0
 protected function _construct()
 {
     parent::_construct();
     if (Mage::getModel('magenotification/magenotification')->is_existedUrl($this->getLastNotice()->getUrl())) {
         $url = $this->getUrl('magenotification/adminhtml_magenotification/readdetail', array('id' => $this->getLastNotice()->getId()));
         $this->setHeaderText(addslashes($this->__('Magestore Message')));
         $this->setNoticeMessageUrl(addslashes($url));
     }
 }
コード例 #5
0
 protected function _construct()
 {
     parent::_construct();
     $this->setHeaderText($this->escapeHtml($this->__('Incoming Message')));
     $this->setCloseText($this->escapeHtml($this->__('close')));
     $this->setReadDetailsText($this->escapeHtml($this->__('Read details')));
     $this->setNoticeText($this->escapeHtml($this->__('NOTICE')));
     $this->setMinorText($this->escapeHtml($this->__('MINOR')));
     $this->setMajorText($this->escapeHtml($this->__('MAJOR')));
     $this->setCriticalText($this->escapeHtml($this->__('CRITICAL')));
     $collectionNotifiByModule = $this->getNotificationByModule();
     if ($collectionNotifiByModule && $collectionNotifiByModule->getFirstItem()->getData()) {
         $inboxFirstData = $collectionNotifiByModule->getFirstItem()->getData();
         $this->setNoticeMessageText($this->escapeHtml($collectionNotifiByModule->getFirstItem()->getTitle()));
         $this->setNoticeMessageUrl($this->escapeUrl($collectionNotifiByModule->getFirstItem()->getUrl()));
     } else {
         $this->setNoticeMessageText($this->escapeHtml($this->getLastNotice()->getTitle()));
         $this->setNoticeMessageUrl($this->escapeUrl($this->getLastNotice()->getUrl()));
     }
     switch ($this->getLastNotice()->getSeverity()) {
         default:
         case Mage_AdminNotification_Model_Inbox::SEVERITY_NOTICE:
             $severity = 'SEVERITY_NOTICE';
             break;
         case Mage_AdminNotification_Model_Inbox::SEVERITY_MINOR:
             $severity = 'SEVERITY_MINOR';
             break;
         case Mage_AdminNotification_Model_Inbox::SEVERITY_MAJOR:
             $severity = 'SEVERITY_MAJOR';
             break;
         case Mage_AdminNotification_Model_Inbox::SEVERITY_CRITICAL:
             $severity = 'SEVERITY_CRITICAL';
             break;
     }
     $this->setNoticeSeverity($severity);
 }