2013-01-07 24 views
0

如何在magento管理網格中顯示圖標而不是動作標籤。例如:我需要顯示的圖像圖標,而不是「編輯」中網格/「刪除行顯示圖標而不是magento網格動作標籤

感謝, 穆拉利

+0

是否有任何顯示圖標的可能性。我做了不同的方式,但沒有工作。 –

回答

2

我用css.Simply加入行動數組新類像

做這個問題
$this->addColumn('action', 
      array(
       'header' => Mage::helper('mymodule')->__('Action'), 
       'width'  => '100', 
       'type'  => 'action', 
      'align'  =>'center', 
       'getter' => 'getAnswerId', 

     'actions' => array(   
      array(
         'caption' => Mage::helper('mymodule')->__('Delete'), 
         'url'  => array('base'=> '*/*/delete'), 
       'confirm' => Mage::helper('mymodule')->__('Are you sure?'), 
         'class'  => 'addm', 


        ) 
      ), 
       'filter' => false, 
       'sortable' => false, 
       'index'  => 'store', 
       'is_system' => true, 


     )); 

而且寫這個代碼的新的CSS:

.addm{ 
    background-image:url('delete.png'); 
    background-repeat:no-repeat; 
    text-indent:-9999px !important; 
    font-size:0px; 
    display:block; 
    margin-left:5px; 

    }. 

你做。