/**
  * @return Netresearch_OPS_Helper_Directlink
  */
 public function getDirectLinkHelper()
 {
     if (null === $this->directLinkHelper) {
         $this->directLinkHelper = MAge::helper('ops/directlink');
     }
     return $this->directLinkHelper;
 }
 protected function _prepareLayout()
 {
     $this->setChild('backButton', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('adminhtml')->__('Back'), 'onclick' => 'window.location.href=\'' . $this->getUrl('*/*/') . '\'', 'class' => 'back')));
     $this->setChild('resetButton', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('adminhtml')->__('Reset'), 'onclick' => 'window.location.reload()')));
     $this->setChild('saveButton', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('adminhtml')->__('Save Role'), 'onclick' => 'roleForm.submit();return false;', 'class' => 'save')));
     $this->setChild('deleteButton', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('adminhtml')->__('Delete Role'), 'onclick' => 'deleteConfirm(\'' . MAge::helper('core')->jsQuoteEscape(Mage::helper('adminhtml')->__('Are you sure you want to do this?')) . '\', \'' . $this->getUrl('*/*/delete', array('rid' => $this->getRequest()->getParam('rid'))) . '\')', 'class' => 'delete')));
     return parent::_prepareLayout();
 }
Exemple #3
0
 /**
  * Preparing block layout
  *
  * @return Olts_Reminder_Block_Adminhtml_Group_Edit
  */
 protected function _prepareLayout()
 {
     $this->setChild('backButton', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('olts_reminder')->__('Back'), 'onclick' => 'window.location.href=\'' . $this->getUrl('*/*/groups') . '\'', 'class' => 'back')));
     $this->setChild('resetButton', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('olts_reminder')->__('Reset'), 'onclick' => 'window.location.reload()')));
     $this->setChild('saveButton', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('olts_reminder')->__('Save Group'), 'onclick' => 'group_edit_form.submit();return false;', 'class' => 'save')));
     $this->setChild('saveAndContinueButton', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('olts_reminder')->__('Save and Continue Edit'), 'onclick' => "group_edit_form.submit(\$('group_edit_form').action='" . $this->getSaveUrl(array('back' => true)) . "');return false;", 'class' => 'save')));
     $this->setChild('deleteButton', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('olts_reminder')->__('Delete Group'), 'onclick' => 'deleteConfirm(\'' . MAge::helper('core')->jsQuoteEscape(Mage::helper('olts_reminder')->__('Are you sure you want to do this?')) . '\', \'' . $this->getUrl('*/*/deleteGroup', array('gid' => $this->getRequest()->getParam('gid'))) . '\')', 'class' => 'delete')));
     return parent::_prepareLayout();
 }
 public function indexAction()
 {
     Mage::getSingleton('adminhtml/session')->addNotice(MAge::helper('payperrentals')->__('Booked inventory is inventory booked out for currently selected date.'));
     Mage::getSingleton('adminhtml/session')->addNotice(MAge::helper('payperrentals')->__('Current inventory is what is available for today\'s date.'));
     $this->_title($this->__('Reports'))->_title($this->__('Stock'));
     $this->_initAction()->_setActiveMenu('payperrentals/reports/most_rented')->_addBreadcrumb(Mage::helper('payperrentals')->__('Stock Report'), Mage::helper('payperrentals')->__('Stock Report'));
     $gridBlock = $this->getLayout()->getBlock('adminhtml_report_stock.grid');
     $filterFormBlock = $this->getLayout()->getBlock('grid.filter.form');
     $this->_initReportAction(array($gridBlock, $filterFormBlock));
     $this->renderLayout();
 }
 public function printInvoiceAction()
 {
     if ($invoiceId = $this->getRequest()->getParam('id')) {
         $id = base64_decode($invoiceId);
         $id = explode(':', $id);
         if (count($id) != 2) {
             Mage::getSingleton('customer/session')->addError(Mage::helper('zab_billing')->__('Documento non disponibile'));
             $this->_redirectReferer();
             return;
         }
         $orderId = array_shift($id);
         $invoiceId = array_shift($id);
         if (!$orderId || !$invoiceId) {
             Mage::getSingleton('customer/session')->addError(Mage::helper('zab_billing')->__('Documento non disponibile'));
             $this->_redirectReferer();
             return;
         }
         $invoice = Mage::getModel('sales/order_invoice')->load($invoiceId);
         if (!$invoice->getId()) {
             Mage::getSingleton('customer/session')->addError(Mage::helper('zab_billing')->__('Documento non disponibile'));
             $this->_redirectReferer();
             return;
         }
         if ($invoice->getOrder()->getId() != $orderId) {
             Mage::getSingleton('customer/session')->addError(Mage::helper('zab_billing')->__('Documento non disponibile'));
             $this->_redirectReferer();
             return;
         }
         $pdf = Mage::getModel('sales/order_pdf_invoice')->getPdf(array($invoice));
         $this->_prepareDownloadResponse('invoice' . Mage::getSingleton('core/date')->date('Y-m-d_H-i-s') . '.pdf', $pdf->render(), 'application/pdf');
     } else {
         Mage::getSingleton('customer/session')->addError(MAge::helper('zab_billing')->__('Documento non disponibile'));
         $this->_redirectReferer();
         return;
     }
 }
 public function getProductList()
 {
     return MAge::helper('quickorder')->prettyQuickorder();
 }