00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 class Mage_Bundle_Block_Adminhtml_Catalog_Product_Edit_Tab_Bundle_Option_Search extends Mage_Adminhtml_Block_Widget
00036 {
00037 protected function _construct()
00038 {
00039 $this->setId('bundle_option_selection_search');
00040 $this->setTemplate('bundle/product/edit/bundle/option/search.phtml');
00041 }
00042
00043 public function getHeaderText()
00044 {
00045 return Mage::helper('bundle')->__('Please select products to add');
00046 }
00047
00048 protected function _prepareLayout()
00049 {
00050 $this->setChild(
00051 'grid',
00052 $this->getLayout()->createBlock('bundle/adminhtml_catalog_product_edit_tab_bundle_option_search_grid')
00053 );
00054 return parent::_prepareLayout();
00055 }
00056
00057 protected function _beforeToHtml()
00058 {
00059 $this->getChild('grid')->setIndex($this->getIndex())
00060 ->setFirstShow($this->getFirstShow());
00061
00062 return parent::_beforeToHtml();
00063 }
00064
00065 public function getButtonsHtml()
00066 {
00067 $addButtonData = array(
00068 'id' => 'add_button_' . $this->getIndex(),
00069 'label' => Mage::helper('sales')->__('Add Selected Product(s) to Option'),
00070 'onclick' => 'bSelection.productGridAddSelected(event)',
00071 'class' => 'add',
00072 );
00073 return $this->getLayout()->createBlock('adminhtml/widget_button')->setData($addButtonData)->toHtml();
00074 }
00075
00076 public function getHeaderCssClass()
00077 {
00078 return 'head-catalog-product';
00079 }
00080 }