protected function _prepareColumns() { $this->addColumn('name', array('header' => Mage::helper('Mage_Tag_Helper_Data')->__('Tag Name'), 'index' => 'name')); $this->addColumn('popularity', array('header' => Mage::helper('Mage_Tag_Helper_Data')->__('# of Use'), 'width' => '50px', 'align' => 'right', 'index' => 'popularity', 'type' => 'number')); $this->addColumn('status', array('header' => Mage::helper('Mage_Tag_Helper_Data')->__('Status'), 'width' => '90px', 'index' => 'status', 'type' => 'options', 'options' => array(Mage_Tag_Model_Tag::STATUS_DISABLED => Mage::helper('Mage_Tag_Helper_Data')->__('Disabled'), Mage_Tag_Model_Tag::STATUS_PENDING => Mage::helper('Mage_Tag_Helper_Data')->__('Pending'), Mage_Tag_Model_Tag::STATUS_APPROVED => Mage::helper('Mage_Tag_Helper_Data')->__('Approved')))); return parent::_prepareColumns(); }
protected function _prepareColumns() { $this->addColumn('firstname', array('header' => Mage::helper('Mage_Tag_Helper_Data')->__('First Name'), 'index' => 'firstname')); $this->addColumn('lastname', array('header' => Mage::helper('Mage_Tag_Helper_Data')->__('Last Name'), 'index' => 'lastname')); $this->addColumn('email', array('header' => Mage::helper('Mage_Tag_Helper_Data')->__('Email'), 'index' => 'email')); $this->addColumn('name', array('header' => Mage::helper('Mage_Tag_Helper_Data')->__('Tag Name'), 'index' => 'name')); return parent::_prepareColumns(); }
protected function _prepareColumns() { $this->addColumn('user_id', array('header' => Mage::helper('Mage_User_Helper_Data')->__('ID'), 'width' => 5, 'align' => 'right', 'sortable' => true, 'index' => 'user_id')); $this->addColumn('username', array('header' => Mage::helper('Mage_User_Helper_Data')->__('User Name'), 'index' => 'username')); $this->addColumn('firstname', array('header' => Mage::helper('Mage_User_Helper_Data')->__('First Name'), 'index' => 'firstname')); $this->addColumn('lastname', array('header' => Mage::helper('Mage_User_Helper_Data')->__('Last Name'), 'index' => 'lastname')); $this->addColumn('email', array('header' => Mage::helper('Mage_User_Helper_Data')->__('Email'), 'width' => 40, 'align' => 'left', 'index' => 'email')); $this->addColumn('is_active', array('header' => Mage::helper('Mage_User_Helper_Data')->__('Status'), 'index' => 'is_active', 'type' => 'options', 'options' => array('1' => Mage::helper('Mage_User_Helper_Data')->__('Active'), '0' => Mage::helper('Mage_User_Helper_Data')->__('Inactive')))); return parent::_prepareColumns(); }
protected function _prepareColumns() { $this->addColumn('assigned_user_role', array('header_css_class' => 'a-center', 'header' => Mage::helper('Mage_User_Helper_Data')->__('Assigned'), 'type' => 'radio', 'html_name' => 'roles[]', 'values' => $this->_getSelectedRoles(), 'align' => 'center', 'index' => 'role_id')); /*$this->addColumn('role_id', array( 'header' =>Mage::helper('Mage_User_Helper_Data')->__('Role ID'), 'index' =>'role_id', 'align' => 'right', 'width' => '50px' ));*/ $this->addColumn('role_name', array('header' => Mage::helper('Mage_User_Helper_Data')->__('Role Name'), 'index' => 'role_name')); return parent::_prepareColumns(); }
/** * Return row url for js event handlers * * @param Mage_Catalog_Model_Product|Varien_Object * @return string */ public function getRowUrl($item) { $res = parent::getRowUrl($item); return $res ? $res : '#'; }
/** * Add grid columns * * @return Mage_Tag_Block_Adminhtml_Customer_Edit_Tab_Tag_Grid */ protected function _prepareColumns() { $this->addColumn('name', array('header' => Mage::helper('Mage_Tag_Helper_Data')->__('Tag Name'), 'index' => 'name')); $this->addColumn('status', array('header' => Mage::helper('Mage_Tag_Helper_Data')->__('Status'), 'width' => '90px', 'index' => 'status', 'type' => 'options', 'options' => array(Mage_Tag_Model_Tag::STATUS_DISABLED => Mage::helper('Mage_Tag_Helper_Data')->__('Disabled'), Mage_Tag_Model_Tag::STATUS_PENDING => Mage::helper('Mage_Tag_Helper_Data')->__('Pending'), Mage_Tag_Model_Tag::STATUS_APPROVED => Mage::helper('Mage_Tag_Helper_Data')->__('Approved')), 'filter' => false)); $this->addColumn('product', array('header' => Mage::helper('Mage_Tag_Helper_Data')->__('Product Name'), 'index' => 'product', 'filter' => false, 'sortable' => false)); $this->addColumn('product_sku', array('header' => Mage::helper('Mage_Tag_Helper_Data')->__('SKU'), 'index' => 'product_sku', 'filter' => false, 'sortable' => false)); return parent::_prepareColumns(); }
protected function _prepareColumns() { $this->addColumn('in_role_users', array('header_css_class' => 'a-center', 'type' => 'checkbox', 'name' => 'in_role_users', 'values' => $this->_getUsers(), 'align' => 'center', 'index' => 'user_id')); $this->addColumn('role_user_id', array('header' => Mage::helper('Mage_User_Helper_Data')->__('User ID'), 'width' => 5, 'align' => 'left', 'sortable' => true, 'index' => 'user_id')); $this->addColumn('role_user_username', array('header' => Mage::helper('Mage_User_Helper_Data')->__('User Name'), 'align' => 'left', 'index' => 'username')); $this->addColumn('role_user_firstname', array('header' => Mage::helper('Mage_User_Helper_Data')->__('First Name'), 'align' => 'left', 'index' => 'firstname')); $this->addColumn('role_user_lastname', array('header' => Mage::helper('Mage_User_Helper_Data')->__('Last Name'), 'align' => 'left', 'index' => 'lastname')); $this->addColumn('role_user_email', array('header' => Mage::helper('Mage_User_Helper_Data')->__('Email'), 'width' => 40, 'align' => 'left', 'index' => 'email')); $this->addColumn('role_user_is_active', array('header' => Mage::helper('Mage_User_Helper_Data')->__('Status'), 'index' => 'is_active', 'align' => 'left', 'type' => 'options', 'options' => array('1' => Mage::helper('Mage_User_Helper_Data')->__('Active'), '0' => Mage::helper('Mage_User_Helper_Data')->__('Inactive')))); /* $this->addColumn('grid_actions', array( 'header'=>Mage::helper('Mage_User_Helper_Data')->__('Actions'), 'width'=>5, 'sortable'=>false, 'filter' =>false, 'type' => 'action', 'actions' => array( array( 'caption' => Mage::helper('Mage_User_Helper_Data')->__('Remove'), 'onClick' => 'role.deleteFromRole($role_id);' ) ) ) ); */ return parent::_prepareColumns(); }
protected function _prepareColumns() { $this->addColumn('role_id', array('header' => Mage::helper('Mage_User_Helper_Data')->__('ID'), 'index' => 'role_id', 'align' => 'right', 'width' => '50px')); $this->addColumn('role_name', array('header' => Mage::helper('Mage_User_Helper_Data')->__('Role Name'), 'index' => 'role_name')); return parent::_prepareColumns(); }
/** * Prepare grid columns * * @return Mage_Backend_Block_Widget_Grid */ protected function _prepareColumns() { /** @var $helper Mage_Review_Helper_Data */ $helper = Mage::helper('Mage_Review_Helper_Data'); $this->addColumn('review_id', array('header' => $helper->__('ID'), 'align' => 'right', 'width' => '50px', 'filter_index' => 'rt.review_id', 'index' => 'review_id')); $this->addColumn('created_at', array('header' => $helper->__('Created On'), 'align' => 'left', 'type' => 'datetime', 'width' => '100px', 'filter_index' => 'rt.created_at', 'index' => 'review_created_at')); if (!Mage::registry('usePendingFilter')) { $this->addColumn('status', array('header' => $helper->__('Status'), 'align' => 'left', 'type' => 'options', 'options' => $helper->getReviewStatuses(), 'width' => '100px', 'filter_index' => 'rt.status_id', 'index' => 'status_id')); } $this->addColumn('title', array('header' => $helper->__('Title'), 'align' => 'left', 'width' => '100px', 'filter_index' => 'rdt.title', 'index' => 'title', 'type' => 'text', 'truncate' => 50, 'escape' => true)); $this->addColumn('nickname', array('header' => $helper->__('Nickname'), 'align' => 'left', 'width' => '100px', 'filter_index' => 'rdt.nickname', 'index' => 'nickname', 'type' => 'text', 'truncate' => 50, 'escape' => true)); $this->addColumn('detail', array('header' => $helper->__('Review'), 'align' => 'left', 'index' => 'detail', 'filter_index' => 'rdt.detail', 'type' => 'text', 'truncate' => 50, 'nl2br' => true, 'escape' => true)); /** * Check is single store mode */ if (!Mage::app()->isSingleStoreMode()) { $this->addColumn('visible_in', array('header' => $helper->__('Visible In'), 'index' => 'stores', 'type' => 'store', 'store_view' => true)); } $this->addColumn('type', array('header' => $helper->__('Type'), 'type' => 'select', 'index' => 'type', 'filter' => 'Mage_Adminhtml_Block_Review_Grid_Filter_Type', 'renderer' => 'Mage_Adminhtml_Block_Review_Grid_Renderer_Type')); $this->addColumn('name', array('header' => $helper->__('Product Name'), 'align' => 'left', 'type' => 'text', 'index' => 'name', 'escape' => true)); $this->addColumn('sku', array('header' => $helper->__('Product SKU'), 'align' => 'right', 'type' => 'text', 'width' => '50px', 'index' => 'sku', 'escape' => true)); $this->addColumn('action', array('header' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Action'), 'width' => '50px', 'type' => 'action', 'getter' => 'getReviewId', 'actions' => array(array('caption' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Edit'), 'url' => array('base' => '*/catalog_product_review/edit', 'params' => array('productId' => $this->getProductId(), 'customerId' => $this->getCustomerId(), 'ret' => Mage::registry('usePendingFilter') ? 'pending' : null)), 'field' => 'id')), 'filter' => false, 'sortable' => false)); $this->addRssList('rss/catalog/review', Mage::helper('Mage_Catalog_Helper_Data')->__('Pending Reviews RSS')); return parent::_prepareColumns(); }