コード例 #1
0
ファイル: Form.php プロジェクト: HelioFreitas/magento-pt_br
 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' => "categorySubmit('" . $this->getSaveUrl() . "',true)", 'class' => 'save')));
     $this->setChild('delete_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Delete Category'), 'onclick' => "categoryDelete('" . $this->getUrl('*/*/delete', array('_current' => true)) . "',true)", 'class' => 'delete')));
     $this->setChild('reset_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Reset'), 'onclick' => "categoryReset('" . $this->getUrl('*/*/edit', array('_current' => true)) . "',true)")));
     return parent::_prepareLayout();
 }
コード例 #2
0
ファイル: Tree.php プロジェクト: HelioFreitas/magento-pt_br
 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('catalog')->__('Add Subcategory'), 'onclick' => "addNew('" . $addUrl . "', false)", 'class' => 'add')));
     $this->setChild('add_root_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Add Root Category'), 'onclick' => "addNew('" . $addUrl . "', true)", 'class' => 'add', 'id' => 'add_root_category_button')));
     $this->setChild('store_switcher', $this->getLayout()->createBlock('adminhtml/store_switcher')->setSwitchUrl($this->getUrl('*/*/*', array('_current' => true, '_query' => false, 'store' => null)))->setTemplate('store/switcher/enhanced.phtml'));
     return parent::_prepareLayout();
 }
コード例 #3
0
ファイル: Tree.php プロジェクト: xiaoguizhidao/ecommerce
 public function __construct()
 {
     parent::__construct();
     // Initialization block
     //------------------------------
     $this->setId('listingCategoryTree');
     //------------------------------
     $this->setTemplate('M2ePro/common/listing/category/tree.phtml');
 }
コード例 #4
0
ファイル: Tree.php プロジェクト: vinayshuklasourcefuse/sareez
 protected function _prepareLayout()
 {
     $addMenuUrl = $this->getUrl("*/*/add", array('_current' => true, 'menu_id' => null, '_query' => false));
     $this->setChild('add_menu_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('menu')->__('Add Menu'), 'onclick' => "addNew('" . $addMenuUrl . "', false)", 'class' => 'add', 'id' => 'add_menu_button')));
     $addItemUrl = $this->getUrl("*/adminhtml_item/add", array('_current' => true, 'id' => null, '_query' => false));
     $this->setChild('add_item_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('menu')->__('Add Item'), 'onclick' => "addNew('" . $addItemUrl . "', false)", 'class' => 'add', 'id' => 'add_item_button')));
     $this->setChild('menu_switcher', $this->getLayout()->createBlock('menu/adminhtml_menu_switcher')->setSwitchUrl($this->getUrl('*/*/*', array('_current' => true, '_query' => false, 'store' => null)))->setTemplate('glace/menu/switcher.phtml'));
     return parent::_prepareLayout();
 }
コード例 #5
0
ファイル: Tree.php プロジェクト: ReeceCrossland/essua-m2epro
 public function __construct()
 {
     parent::__construct();
     // Initialization block
     // ---------------------------------------
     $this->setId('listingCategoryTree');
     // ---------------------------------------
     $this->setTemplate('M2ePro/listing/category/tree.phtml');
     $this->_isAjax = $this->getRequest()->isXmlHttpRequest();
 }
コード例 #6
0
ファイル: Tree.php プロジェクト: nayanchamp/magento2
 protected function _prepareLayout()
 {
     $addUrl = $this->getUrl("*/*/add", array('_current' => true, 'id' => null, '_query' => false));
     $this->addChild('add_sub_button', 'Mage_Adminhtml_Block_Widget_Button', array('label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Add Subcategory'), 'onclick' => "addNew('" . $addUrl . "', false)", 'class' => 'add', 'id' => 'add_subcategory_button', 'style' => $this->canAddSubCategory() ? '' : 'display: none;'));
     if ($this->canAddRootCategory()) {
         $this->addChild('add_root_button', 'Mage_Adminhtml_Block_Widget_Button', array('label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Add Root Category'), 'onclick' => "addNew('" . $addUrl . "', true)", 'class' => 'add', 'id' => 'add_root_category_button'));
     }
     $this->setChild('store_switcher', $this->getLayout()->createBlock('Mage_Adminhtml_Block_Store_Switcher')->setSwitchUrl($this->getUrl('*/*/*', array('_current' => true, '_query' => false, 'store' => null)))->setTemplate('store/switcher/enhanced.phtml'));
     return parent::_prepareLayout();
 }
コード例 #7
0
 protected function _prepareLayout()
 {
     $this->setChild('tabs', $this->getLayout()->createBlock('adminhtml/catalog_category_tabs', 'tabs'));
     if (!$this->getCategory()->isReadonly()) {
         $this->setChild('save_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Save Category'), 'onclick' => "categorySubmit('" . $this->getSaveUrl() . "',true)", 'class' => 'save')));
     }
     if (!in_array($this->getCategory()->getId(), $this->getRootIds()) && $this->getCategory()->isDeleteable()) {
         $this->setChild('delete_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Delete Category'), 'onclick' => "categoryDelete('" . $this->getUrl('*/*/delete', array('_current' => true)) . "',true)", 'class' => 'delete')));
     }
     if (!$this->getCategory()->isReadonly()) {
         $resetPath = $this->getCategory()->getId() ? '*/*/edit' : '*/*/add';
         $this->setChild('reset_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Reset'), 'onclick' => "categoryReset('" . $this->getUrl($resetPath, array('_current' => true)) . "',true)")));
     }
     return parent::_prepareLayout();
 }
コード例 #8
0
ファイル: Form.php プロジェクト: hirentricore/devmagento
 protected function _prepareLayout()
 {
     $category = $this->getCategory();
     $categoryId = (int) $category->getId();
     // 0 when we create category, otherwise some value for editing category
     $this->setChild('tabs', $this->getLayout()->createBlock('adminhtml/catalog_category_tabs', 'tabs'));
     // Save button
     if (!$category->isReadonly()) {
         $this->setChild('save_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Save Category'), 'onclick' => "categorySubmit('" . $this->getSaveUrl() . "', true)", 'class' => 'save')));
     }
     // Delete button
     if (!in_array($categoryId, $this->getRootIds()) && $category->isDeleteable()) {
         $this->setChild('delete_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Delete Category'), 'onclick' => "categoryDelete('" . $this->getUrl('*/*/delete', array('_current' => true)) . "', true, {$categoryId})", 'class' => 'delete')));
     }
     // Reset button
     if (!$category->isReadonly()) {
         $resetPath = $categoryId ? '*/*/edit' : '*/*/add';
         $this->setChild('reset_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Reset'), 'onclick' => "categoryReset('" . $this->getUrl($resetPath, array('_current' => true)) . "',true)")));
     }
     return parent::_prepareLayout();
 }
コード例 #9
0
ファイル: Permissions.php プロジェクト: jpbender/mage_virtual
 /**
  * Prepare layout
  *
  * @return Enterprise_CatalogPermissions_Block_Adminhtml_Catalog_Category_Tab_Permissions
  */
 protected function _prepareLayout()
 {
     $this->setChild('row', $this->getLayout()->createBlock('enterprise_catalogpermissions/adminhtml_catalog_category_tab_permissions_row'));
     $this->setChild('add_button', $this->getLayout()->createBlock('adminhtml/widget_button')->addData(array('label' => $this->helper('enterprise_catalogpermissions')->__('New Permission'), 'class' => 'add' . ($this->isReadonly() ? ' disabled' : ''), 'type' => 'button', 'disabled' => $this->isReadonly())));
     return parent::_prepareLayout();
 }
コード例 #10
0
ファイル: Tree.php プロジェクト: nemphys/magento2
 /**
  * Set custom template for the block
  */
 public function __construct()
 {
     parent::__construct();
     $this->setTemplate('urlrewrite/categories.phtml');
 }
コード例 #11
0
 protected function _prepareLayout()
 {
     $this->setChild('delete_button', $this->getLayout()->createBlock('adminhtml/widget_button')->addData(array('class' => 'delete' . ($this->isReadonly() ? ' disabled' : ''), 'disabled' => $this->isReadonly(), 'type' => 'button', 'id' => '{{html_id}}_delete_button')));
     return parent::_prepareLayout();
 }
コード例 #12
0
ファイル: Category.php プロジェクト: jpbender/mage_virtual
 /**
  * Set custom template for the block
  *
  */
 public function __construct()
 {
     parent::__construct();
     $this->setTemplate('enterprise/catalogevent/categories.phtml');
 }
コード例 #13
0
 public function __construct()
 {
     parent::__construct();
     $this->setUseAjax(false);
     $this->setTemplate('M2ePro/listings/tree.phtml');
 }