/** * @return Mage_Core_Block_Abstract */ protected function _prepareLayout() { if (!Mage::helper('bronto_email')->isEnabledForAny()) { return parent::_prepareLayout(); } $this->setChild('back_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('adminhtml')->__('Back'), 'onclick' => "window.location='{$this->getBackUrl()}'", 'class' => 'scalable back'))); $this->setChild('import_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('adminhtml')->__('Load Default Magento Templates'), 'onclick' => "window.location='{$this->getLoadDefaultsUrl()}'", 'class' => 'go'))); $this->setChild('grid', $this->getLayout()->createBlock('bronto_email/adminhtml_system_email_import_grid', 'email.import.grid')); return Mage_Adminhtml_Block_Template::_prepareLayout(); }
/** * @return Mage_Core_Block_Abstract */ protected function _prepareLayout() { if (!Mage::helper('bronto_email')->isEnabledForAny()) { return parent::_prepareLayout(); } $this->setChild('add_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('adminhtml')->__('Add New Template'), 'onclick' => "window.location='" . $this->getCreateUrl() . "'", 'class' => 'add'))); $this->setChild('import_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('adminhtml')->__('Import Existing Templates'), 'onclick' => "window.location='" . $this->getImportUrl() . "'", 'class' => 'go'))); if (Mage::helper('bronto_email')->isLogEnabled()) { $this->setChild('log_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('adminhtml')->__('Delivery Log'), 'onclick' => "window.location='" . $this->getLogUrl() . "'", 'class' => 'go'))); } $this->setChild('grid', $this->getLayout()->createBlock('bronto_email/adminhtml_system_email_template_grid', 'email.template.grid')); return Mage_Adminhtml_Block_Template::_prepareLayout(); }