示例#1
0
文件: Add.php 项目: natxetee/magento2
 protected function _prepareLayout()
 {
     $this->addChild('save_button', 'Mage_Adminhtml_Block_Widget_Button', array('label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Save Attribute Set'), 'class' => 'save', 'data_attribute' => array('mage-init' => array('button' => array('event' => 'save', 'target' => '#set-prop-form')))));
     $this->addChild('back_button', 'Mage_Adminhtml_Block_Widget_Button', array('label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Back'), 'onclick' => 'setLocation(\'' . $this->getUrl('*/*/') . '\')', 'class' => 'back'));
     $this->addChild('setForm', 'Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Main_Formset');
     return parent::_prepareLayout();
 }
示例#2
0
 protected function _prepareLayout()
 {
     $url = $this->getUrl('*/*/add', array('_current' => true, 'parent' => base64_encode($this->getCategoryPath()), 'id' => null));
     $this->setChild('add_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Add New'), 'onclick' => "setLocation('" . $url . "')", 'class' => 'add')));
     $this->setChild('store_switcher', $this->getLayout()->createBlock('adminhtml/store_switcher')->setSwitchUrl($this->getUrl('*/*/*', array('store' => null))));
     return parent::_prepareLayout();
 }
 protected function _prepareLayout()
 {
     $this->setChild('back_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('core')->__('Back'), 'onclick' => 'setLocation(\'' . $this->getUrl('*/*/') . '\')', 'class' => 'back')));
     $this->setChild('save_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('core')->__('Save'), 'onclick' => 'designForm.submit()', 'class' => 'save')));
     $this->setChild('delete_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('core')->__('Delete'), 'onclick' => 'confirmSetLocation(\'' . Mage::helper('core')->__('Are you sure?') . '\', \'' . $this->getDeleteUrl() . '\')', 'class' => 'delete')));
     return parent::_prepareLayout();
 }
示例#4
0
 protected function _prepareLayout()
 {
     $onclick = "submitAndReloadArea(\$('inchoo_ticket_view_tabs_view_tab_content'), '" . $this->getSubmitUrl() . "')";
     $button = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('sales')->__('Submit Message'), 'class' => 'save', 'onclick' => $onclick));
     $this->setChild('submit_button', $button);
     return parent::_prepareLayout();
 }
示例#5
0
 protected function _prepareLayout()
 {
     $customer = Mage::registry('current_customer');
     $this->setChild('sales', $this->getLayout()->createBlock('adminhtml/customer_edit_tab_view_sales'));
     $accordion = $this->getLayout()->createBlock('adminhtml/widget_accordion')->setId('customerViewAccordion');
     //->setShowOnlyOne(0)
     /* @var $accordion Mage_Adminhtml_Block_Widget_Accordion */
     $accordion->addItem('lastOrders', array('title' => Mage::helper('customer')->__('Recent Orders'), 'ajax' => true, 'content_url' => $this->getUrl('*/*/lastOrders', array('_current' => true))));
     // add shopping cart block of each website
     foreach (Mage::registry('current_customer')->getSharedWebsiteIds() as $websiteId) {
         $website = Mage::app()->getWebsite($websiteId);
         // count cart items
         $cartItemsCount = Mage::getModel('sales/quote')->setWebsite($website)->loadByCustomer($customer)->getItemsCollection(false)->getSize();
         // prepare title for cart
         $title = Mage::helper('customer')->__('Shopping Cart - %d item(s)', $cartItemsCount);
         if (count($customer->getSharedWebsiteIds()) > 1) {
             $title = Mage::helper('customer')->__('Shopping Cart of %1$s - %2$d item(s)', $website->getName(), $cartItemsCount);
         }
         // add cart ajax accordion
         $accordion->addItem('shopingCart' . $websiteId, array('title' => $title, 'ajax' => true, 'content_url' => $this->getUrl('*/*/viewCart', array('_current' => true, 'website_id' => $websiteId))));
     }
     // count wishlist items
     $wishlistCount = Mage::getModel('wishlist/wishlist')->loadByCustomer($customer)->getProductCollection()->addStoreData()->getSize();
     // add wishlist ajax accordion
     $accordion->addItem('wishlist', array('title' => Mage::helper('customer')->__('Wishlist - %d item(s)', $wishlistCount), 'ajax' => true, 'content_url' => $this->getUrl('*/*/viewWishlist', array('_current' => true))));
     $this->setChild('accordion', $accordion);
     return parent::_prepareLayout();
 }
示例#6
0
 /**
  * Prepare layout.
  * Add accordion items
  *
  * @return Enterprise_Reward_Block_Adminhtml_Customer_Edit_Tab_Reward
  */
 protected function _prepareLayout()
 {
     $accordion = $this->getLayout()->createBlock('adminhtml/widget_accordion');
     $accordion->addItem('storecredit_history', array('title' => Mage::helper('storecreditpro')->__('Credit History'), 'open' => false, 'class' => '', 'ajax' => true, 'content_url' => $this->getUrl('storecreditpro/adminhtml_customer/history', array('_current' => true))));
     $this->setChild('mw_storecredit_history', $accordion);
     return parent::_prepareLayout();
 }
示例#7
0
文件: Add.php 项目: nemphys/magento2
 protected function _prepareLayout()
 {
     $this->setChild('save_button', $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')->setData(array('label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Save Attribute Set'), 'onclick' => 'if (addSet.submit()) disableElements(\'save\');', 'class' => 'save')));
     $this->setChild('back_button', $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')->setData(array('label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Back'), 'onclick' => 'setLocation(\'' . $this->getUrl('*/*/') . '\')', 'class' => 'back')));
     $this->setChild('setForm', $this->getLayout()->createBlock('Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Main_Formset'));
     return parent::_prepareLayout();
 }
示例#8
0
 protected function _prepareLayout()
 {
     $refreshButton = $this->setChild('refresh_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => $this->__('Refresh'), 'onclick' => "\$('aw_hdu_stats_form').submit()", 'class' => 'task')));
     $this->setChild('reset_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => $this->__('Reset'), 'onclick' => "\$('period_date_to').value='';\$('period_date_from').value='';\$('aw_hdu_stats_form').submit();", 'class' => 'task')));
     parent::_prepareLayout();
     return $this;
 }
示例#9
0
 protected function _prepareLayout()
 {
     $addUrl = $this->getUrl("*/*/add", array('_current' => true, 'id' => null, '_query' => false));
     $this->setChild('add_sub_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('cms')->__('Add Page'), 'onclick' => "addNew('" . $addUrl . "', false)", 'class' => 'add', 'id' => 'add_subpage_button', 'style' => $this->canAddSubPage() ? '' : 'display: none;')));
     $this->setChild('store_switcher', $this->getLayout()->createBlock('adminhtml/store_switcher')->setSwitchUrl($this->getUrl('*/*/switch', array('_current' => true, '_query' => false, 'store' => null)))->setTemplate('clevercms/page/store/switcher.phtml'));
     return parent::_prepareLayout();
 }
示例#10
0
 protected function _prepareLayout()
 {
     $this->setChild('import_category_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Import Categories'), 'onclick' => "importCategories('" . $this->getUrl('*/*/importCategories') . "')", 'id' => 'add_subvesverticalmenu_button')));
     $this->setChild('delete_category_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Delete Categories'), 'onclick' => "deleteCategories('" . $this->getUrl('*/*/deleteCategories') . "', false)", 'id' => 'add_subvesverticalmenu_button')));
     $this->setChild('store_switcher', $this->getLayout()->createBlock('adminhtml/store_switcher')->setSwitchUrl($this->getUrl('*/*/*'))->setTemplate('ves_verticalmenu/store/switcher.phtml'));
     return parent::_prepareLayout();
 }
示例#11
0
 protected function _prepareLayout()
 {
     $this->setChild('save_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Save Attribute Set'), 'onclick' => 'addSet.submit();', 'class' => 'save')));
     $this->setChild('back_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Back'), 'onclick' => 'setLocation(\'' . $this->getUrl('*/*/') . '\')', 'class' => 'back')));
     $this->setChild('setForm', $this->getLayout()->createBlock('adminhtml/catalog_product_attribute_set_main_formset'));
     return parent::_prepareLayout();
 }
示例#12
0
 /**
  * Prepare layout
  *
  * Set child blocks.
  *
  * @return void
  */
 protected function _prepareLayout()
 {
     $this->setChild('cmsPages', $this->getLayout()->createBlock('forkel_grids/adminhtml_dashboard_cms_pages_grid'));
     $this->setChild('adminLogins', $this->getLayout()->createBlock('forkel_grids/adminhtml_dashboard_login_admin_grid'));
     $this->setChild('custom', $this->getLayout()->createBlock('forkel_grids/adminhtml_dashboard_custom_grid'));
     parent::_prepareLayout();
 }
示例#13
0
 /**
  * Prepare layout.
  * Add accordion items
  *
  * @return Enterprise_Reward_Block_Adminhtml_Customer_Edit_Tab_Reward
  */
 protected function _prepareLayout()
 {
     $accordion = $this->getLayout()->createBlock('adminhtml/widget_accordion');
     $accordion->addItem('reward_points_history', array('title' => Mage::helper('enterprise_reward')->__('Reward Points History'), 'open' => false, 'class' => '', 'ajax' => true, 'content_url' => $this->getUrl('*/customer_reward/history', array('_current' => true))));
     $this->setChild('history_accordion', $accordion);
     return parent::_prepareLayout();
 }
 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'), 'onclick' => 'reviewForm._submit();return false;', 'class' => 'save')));
     return parent::_prepareLayout();
 }
示例#15
0
 protected function _prepareLayout()
 {
     $this->setChild('grid', $this->getLayout()->createBlock('adminhtml/newsletter_problem_grid', 'newsletter.problem.grid'));
     $this->setChild('deleteButton', $this->getLayout()->createBlock('adminhtml/widget_button', 'del.button')->setData(array('label' => Mage::helper('newsletter')->__('Delete Selected Problems'), 'onclick' => 'problemController.deleteSelected();')));
     $this->setChild('unsubscribeButton', $this->getLayout()->createBlock('adminhtml/widget_button', 'unsubscribe.button')->setData(array('label' => Mage::helper('newsletter')->__('Unsubscribe Selected'), 'onclick' => 'problemController.unsubscribe();')));
     return parent::_prepareLayout();
 }
示例#16
0
 protected function _prepareLayout()
 {
     $onclick = "submitAndReloadArea(\$('order_history_block').parentNode, '" . $this->getSubmitUrl() . "')";
     $button = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('sales')->__('Submit Comment'), 'class' => 'save', 'onclick' => $onclick));
     $this->setChild('submit_button', $button);
     return parent::_prepareLayout();
 }
示例#17
0
 protected function _prepareLayout()
 {
     $this->setTemplate('system/design/index.phtml');
     $this->setChild('add_new_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Add Design Change'), 'onclick' => "setLocation('" . $this->getUrl('*/*/new') . "')", 'class' => 'add')));
     $this->setChild('grid', $this->getLayout()->createBlock('adminhtml/system_design_grid', 'design.grid'));
     return parent::_prepareLayout();
 }
示例#18
0
 protected function _prepareLayout()
 {
     $this->setChild('statistics-credit', $this->getLayout()->createBlock('customercredit/adminhtml_statisticscredit'));
     $this->setChild('max-balance', $this->getLayout()->createBlock('customercredit/adminhtml_maxbalance'));
     $this->setChild('customer-credit', $this->getLayout()->createBlock('customercredit/adminhtml_report_dashboard'));
     parent::_prepareLayout();
 }
示例#19
0
 protected function _prepareLayout()
 {
     $this->setChild('store_switcher', $this->getLayout()->createBlock('adminhtml/store_switcher', '', array('use_confirm' => false)));
     $this->setChild('department', $this->getLayout()->createBlock('aw_hdu3/adminhtml_statistic_workload_view_department'));
     $this->setChild('agent', $this->getLayout()->createBlock('aw_hdu3/adminhtml_statistic_workload_view_agent'));
     return parent::_prepareLayout();
 }
示例#20
0
 protected function _prepareLayout()
 {
     $helper = Mage::helper('mageworx_multifees');
     $this->setChild('add_new_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => $helper->__('Add Fee'), 'onclick' => "setLocation('" . $this->getUrl('*/*/new') . "')", 'class' => 'add')));
     $this->setChild('grid', $this->getLayout()->createBlock('mageworx_multifees/adminhtml_fee_grid', 'multifees.grid'));
     return parent::_prepareLayout();
 }
示例#21
0
 protected function _prepareLayout()
 {
     $addUrl = $this->getUrl("*/*/new", array('_current' => true, 'id' => null, '_query' => false));
     $this->setChild('add_sub_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('gallery')->__('Add Look Item'), 'onclick' => "addNew('" . $addUrl . "', false)", 'class' => 'add')));
     $this->setChild('add_root_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('gallery')->__('Add Look of the Month'), 'onclick' => "addNew('" . $addUrl . "', true)", 'class' => 'add', 'id' => 'add_root_category_button')));
     return parent::_prepareLayout();
 }
示例#22
0
 protected function _prepareLayout()
 {
     $this->setChild('store_switcher', $this->getLayout()->createBlock('adminhtml/store_switcher'));
     $this->setChild('chart', $this->getLayout()->createBlock('aw_hdu3/adminhtml_statistic_agent_view_chart'));
     $this->setChild('grid', $this->getLayout()->createBlock('aw_hdu3/adminhtml_statistic_agent_view_grid'));
     return parent::_prepareLayout();
 }
示例#23
0
 public function _prepareLayout()
 {
     $form = new Varien_Data_Form();
     $form->setHtmlIdPrefix('toolbar_');
     $this->setForm($form);
     $this->setTemplate('mst_helpdesk/report/ticket/toolbar.phtml');
     return parent::_prepareLayout();
 }
示例#24
0
 protected function _prepareLayout()
 {
     $this->setChild('backButton', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('tax')->__('Back'), 'onclick' => 'window.location.href=\'' . $this->getUrl('*/*/') . '\'', 'class' => 'back')));
     $this->setChild('resetButton', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('tax')->__('Reset'), 'onclick' => 'window.location.reload()')));
     $this->setChild('saveButton', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('tax')->__('Save Rate'), 'onclick' => 'wigetForm.submit();return false;', 'class' => 'save')));
     $this->setChild('deleteButton', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('tax')->__('Delete Rate'), 'onclick' => 'deleteConfirm(\'' . Mage::helper('tax')->__('Are you sure you want to do this?') . '\', \'' . $this->getUrl('*/*/delete', array('rate' => $this->getRequest()->getParam('rate'))) . '\')', 'class' => 'delete')));
     return parent::_prepareLayout();
 }
示例#25
0
 /**
  * Include JS in head if section is moneybookers
  */
 protected function _prepareLayout()
 {
     $section = $this->getAction()->getRequest()->getParam('section', false);
     if ($section == 'moneybookers') {
         $this->getLayout()->getBlock('head')->addJs('mage/adminhtml/moneybookers.js');
     }
     parent::_prepareLayout();
 }
 /**
  * Prepare layout
  *
  * @return Enterprise_Reward_Block_Adminhtml_Customer_Edit_Tab_Reward_Management
  */
 protected function _prepareLayout()
 {
     $total = $this->getLayout()->createBlock('enterprise_reward/adminhtml_customer_edit_tab_reward_management_balance');
     $this->setChild('balance', $total);
     $update = $this->getLayout()->createBlock('enterprise_reward/adminhtml_customer_edit_tab_reward_management_update');
     $this->setChild('update', $update);
     return parent::_prepareLayout();
 }
示例#27
0
 /**
  * @return $this
  */
 protected function _prepareLayout()
 {
     $this->setChild('tab.content.all', $this->getLayout()->createBlock('aw_hdu3/adminhtml_ticket_edit_form_thread_all'));
     $this->setChild('tab.content.discussion', $this->getLayout()->createBlock('aw_hdu3/adminhtml_ticket_edit_form_thread_discussion'));
     $this->setChild('tab.content.notes', $this->getLayout()->createBlock('aw_hdu3/adminhtml_ticket_edit_form_thread_notes'));
     $this->setChild('tab.content.history', $this->getLayout()->createBlock('aw_hdu3/adminhtml_ticket_edit_form_thread_history'));
     return parent::_prepareLayout();
 }
示例#28
0
 protected function _prepareLayout()
 {
     $this->setChild('save_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('adminhtml')->__('Save Currency Rates'), 'onclick' => 'currencyForm.submit();', 'class' => 'save')));
     $this->setChild('reset_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('adminhtml')->__('Reset'), 'onclick' => 'document.location.reload()', 'class' => 'reset')));
     $this->setChild('import_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('adminhtml')->__('Import'), 'class' => 'add', 'type' => 'submit')));
     $this->setChild('rates_matrix', $this->getLayout()->createBlock('adminhtml/system_currency_rate_matrix'));
     return parent::_prepareLayout();
 }
示例#29
0
 protected function _prepareLayout()
 {
     $this->addChild('backButton', 'Mage_Adminhtml_Block_Widget_Button', array('label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Back'), 'onclick' => 'window.location.href=\'' . $this->getUrl('*/*/') . '\'', 'class' => 'back'));
     $this->addChild('resetButton', 'Mage_Adminhtml_Block_Widget_Button', array('label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Reset'), 'onclick' => 'window.location.reload()'));
     $this->addChild('saveButton', 'Mage_Adminhtml_Block_Widget_Button', array('label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Save Role'), 'onclick' => 'roleForm.submit();return false;', 'class' => 'save'));
     $this->addChild('deleteButton', 'Mage_Adminhtml_Block_Widget_Button', array('label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Delete Role'), 'onclick' => 'deleteConfirm(\'' . Mage::helper('Mage_Adminhtml_Helper_Data')->__('Are you sure you want to do this?') . '\', \'' . $this->getUrl('*/*/delete', array('rid' => $this->getRequest()->getParam('rid'))) . '\')', 'class' => 'delete'));
     return parent::_prepareLayout();
 }
示例#30
0
 protected function _prepareLayout()
 {
     $this->setChild('tabs', $this->getLayout()->createBlock('adminhtml/catalog_category_tabs', 'tabs'));
     $this->setChild('save_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Save Category'), 'onclick' => 'categoryForm.submit()', 'class' => 'save')));
     $this->setChild('delete_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Delete Category'), 'onclick' => 'categoryDelete()', 'class' => 'delete')));
     $this->setChild('reset_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Reset'), 'onclick' => "setLocation('" . $this->getUrl('*/*/*', array('_current' => true)) . "')")));
     return parent::_prepareLayout();
 }