/** * Prepare category attributes grid columns * * @return Hackathon_CatalogAttributes_Block_Adminhtml_Catalog_Category_Attribute_Grid */ protected function _prepareColumns() { parent::_prepareColumns(); $this->addColumnAfter('is_visible', array('header' => Mage::helper('catalog')->__('Visible'), 'sortable' => true, 'index' => 'is_visible_on_front', 'type' => 'options', 'options' => array('1' => Mage::helper('catalog')->__('Yes'), '0' => Mage::helper('catalog')->__('No')), 'align' => 'center'), 'frontend_label'); $this->addColumnAfter('is_global', array('header' => Mage::helper('catalog')->__('Scope'), 'sortable' => true, 'index' => 'is_global', 'type' => 'options', 'options' => array(Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE => Mage::helper('catalog')->__('Store View'), Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE => Mage::helper('catalog')->__('Website'), Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL => Mage::helper('catalog')->__('Global')), 'align' => 'center'), 'is_visible'); return $this; }
/** * Prepare customer attributes grid columns * * @return Enterprise_Customer_Block_Adminhtml_Customer_Attribute_Grid */ protected function _prepareColumns() { parent::_prepareColumns(); $this->addColumn('is_visible', array('header' => Mage::helper('enterprise_rma')->__('Visible on Frontend'), 'sortable' => true, 'index' => 'is_visible', 'type' => 'options', 'options' => array('0' => Mage::helper('enterprise_rma')->__('No'), '1' => Mage::helper('enterprise_rma')->__('Yes')), 'align' => 'center')); $this->addColumn('sort_order', array('header' => Mage::helper('enterprise_rma')->__('Sort Order'), 'sortable' => true, 'align' => 'center', 'index' => 'sort_order')); return $this; }
/** * prepare collection for block to display * * @return Magestore_Customerattribute_Block_Adminhtml_Customerattribute_Grid */ protected function _prepareCollection() { $entityTypeId = Mage::getModel('customer/entity_setup', 'core_setup')->getEntityTypeId('customer_address'); $tbl_faq_item = Mage::getSingleton('core/resource')->getTableName('customerattribute/customeraddressattribute'); $collection = Mage::getResourceModel('eav/entity_attribute_collection')->setEntityTypeFilter($entityTypeId); $collection->getSelect()->join(array('table_attribute' => $tbl_faq_item), 'main_table.attribute_id=table_attribute.attribute_id'); $this->setCollection($collection); return parent::_prepareCollection(); }
/** * Prepare product attributes grid columns * * @return Mage_Adminhtml_Block_Catalog_Product_Attribute_Grid */ protected function _prepareColumns() { parent::_prepareColumns(); $this->addColumnAfter('is_visible', array('header' => Mage::helper('catalog')->__('Visible'), 'sortable' => true, 'index' => 'is_visible_on_front', 'type' => 'options', 'options' => array('1' => Mage::helper('catalog')->__('Yes'), '0' => Mage::helper('catalog')->__('No')), 'align' => 'center'), 'frontend_label'); $this->addColumnAfter('is_global', array('header' => Mage::helper('catalog')->__('Scope'), 'sortable' => true, 'index' => 'is_global', 'type' => 'options', 'options' => array(Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE => Mage::helper('catalog')->__('Store View'), Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE => Mage::helper('catalog')->__('Website'), Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL => Mage::helper('catalog')->__('Global')), 'align' => 'center'), 'is_visible'); $this->addColumn('is_searchable', array('header' => Mage::helper('catalog')->__('Searchable'), 'sortable' => true, 'index' => 'is_searchable', 'type' => 'options', 'options' => array('1' => Mage::helper('catalog')->__('Yes'), '0' => Mage::helper('catalog')->__('No')), 'align' => 'center'), 'is_user_defined'); $this->addColumnAfter('is_filterable', array('header' => Mage::helper('catalog')->__('Use in Layered Navigation'), 'sortable' => true, 'index' => 'is_filterable', 'type' => 'options', 'options' => array('1' => Mage::helper('catalog')->__('Filterable (with results)'), '2' => Mage::helper('catalog')->__('Filterable (no results)'), '0' => Mage::helper('catalog')->__('No')), 'align' => 'center'), 'is_searchable'); $this->addColumnAfter('is_comparable', array('header' => Mage::helper('catalog')->__('Comparable'), 'sortable' => true, 'index' => 'is_comparable', 'type' => 'options', 'options' => array('1' => Mage::helper('catalog')->__('Yes'), '0' => Mage::helper('catalog')->__('No')), 'align' => 'center'), 'is_filterable'); return $this; }
/** * Prepare product attributes grid columns * * @return Mage_Adminhtml_Block_Catalog_Product_Attribute_Grid */ protected function _prepareColumns() { $disablesInput = false; if ($this->getRequest()->getParam('scope') == 'disabled') { $disablesInput = true; } $this->addColumn('is_allow', array('type' => 'radio', 'header' => Mage::helper('aitpermissions')->__('Allow'), 'name' => 'is_allow', 'values' => $this->_getAllowAttribute(), 'align' => 'center', 'index' => 'attribute_id', 'field_name' => 'is_allow', 'html_name' => 'attribute_permission', 'radio_value' => '1', 'disabled' => $disablesInput, 'renderer' => 'Aitoc_Aitpermissions_Block_Adminhtml_Permissions_Tab_Product_Editor_Render_Radio')); $this->addColumn('is_disable', array('type' => 'radio', 'header' => Mage::helper('aitpermissions')->__('Deny'), 'name' => 'is_disable', 'values' => $this->_getDisableAttribute(), 'align' => 'center', 'index' => 'attribute_id', 'field_name' => 'is_disable', 'html_name' => 'attribute_permission', 'radio_value' => '0', 'disabled' => $disablesInput, 'renderer' => 'Aitoc_Aitpermissions_Block_Adminhtml_Permissions_Tab_Product_Editor_Render_Radio')); $this->addColumn('is_ait_allow', array('header' => Mage::helper('aitpermissions')->__('Inherited from Scope'), 'sortable' => true, 'index' => 'is_ait_allow', 'name' => 'is_ait_allow', 'field_name' => 'is_ait_allow', 'type' => 'options', 'width' => '100px', 'options' => $this->_getDisableScopeOptions(), 'align' => 'center', 'radio_value' => '', 'disabled' => $disablesInput, 'html_name' => 'attribute_permission', 'values' => array_merge($this->_getAllowAttribute(), $this->_getDisableAttribute()), 'renderer' => 'Aitoc_Aitpermissions_Block_Adminhtml_Permissions_Tab_Product_Editor_Render_Radio')); $this->addColumn('is_global', array('header' => Mage::helper('aitpermissions')->__('Scope'), 'sortable' => true, 'index' => 'is_global', 'type' => 'options', 'options' => $this->getScopeArray(), 'align' => 'center')); parent::_prepareColumns(); $this->addColumn('attribute_group_name', array('header' => Mage::helper('aitpermissions')->__('Tabs'), 'sortable' => true, 'index' => 'attribute_group_name')); return $this; }
/** * Prepare columns for grid * * @return $this */ protected function _prepareColumns() { $this->addColumn('attribute_id', array('header' => Mage::helper('catalog')->__('ID'), 'width' => '100', 'sortable' => true, 'index' => 'attribute_id', 'type' => 'number')); parent::_prepareColumns(); $this->removeColumn('attribute_label'); $scopes = Mage::getModel('goodahead_etm/source_scope')->toArray(); $this->addColumn('is_global', array('header' => Mage::helper('catalog')->__('Scope'), 'sortable' => true, 'index' => 'is_global', 'type' => 'options', 'options' => $scopes)); $yesNo = Mage::getModel('goodahead_etm/source_yesno')->toArray(); $this->addColumn('is_visible', array('header' => Mage::helper('catalog')->__('Visible'), 'sortable' => true, 'index' => 'is_visible', 'type' => 'options', 'options' => $yesNo)); // TODO: Add permission check for actions $this->addColumn('action', array('header' => Mage::helper('catalog')->__('Action'), 'width' => '80px', 'type' => 'action', 'getter' => 'getId', 'actions' => array(array('caption' => Mage::helper('catalog')->__('Edit'), 'url' => array('base' => '*/*/edit/entity_type_id/' . $this->_getEntityTypeFromRegistry()->getId()), 'field' => 'attribute_id'), array('caption' => Mage::helper('catalog')->__('Delete'), 'url' => array('base' => '*/*/delete/entity_type_id/' . $this->_getEntityTypeFromRegistry()->getId()), 'field' => 'attribute_id', 'confirm' => Mage::helper('goodahead_etm')->__('Are you sure you want to delete attribute?'))), 'filter' => false, 'sortable' => false, 'renderer' => 'goodahead_etm/adminhtml_template_grid_renderer_actionLinks', 'index' => 'etm_attribute')); return $this; }
/** * Prepare temple attributes grid columns * * @access protected * @return Lionleap_Temples_Block_Adminhtml_Temple_Attribute_Grid * @author Ultimate Module Creator */ protected function _prepareColumns() { parent::_prepareColumns(); $this->addColumnAfter('is_global', array('header' => Mage::helper('lionleap_temples')->__('Scope'), 'sortable' => true, 'index' => 'is_global', 'type' => 'options', 'options' => array(Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE => Mage::helper('lionleap_temples')->__('Store View'), Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE => Mage::helper('lionleap_temples')->__('Website'), Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL => Mage::helper('lionleap_temples')->__('Global')), 'align' => 'center'), 'is_user_defined'); return $this; }