Beispiel #1
0
 /**
  * Get remove button
  *
  * @param Mage_DesignEditor_Block_Adminhtml_Theme $themeBlock
  * @return string
  */
 protected function _addRemoveButtonHtml($themeBlock)
 {
     $themeId = $themeBlock->getTheme()->getId();
     /** @var $removeButton Mage_Backend_Block_Widget_Button */
     $removeButton = $this->getLayout()->createBlock('Mage_Backend_Block_Widget_Button');
     $removeButton->setData(array('label' => $this->__('Remove Button'), 'data_attribute' => array('mage-init' => array('button' => array('event' => 'delete', 'target' => 'body', 'eventData' => array('url' => $this->getUrl('*/system_design_theme/delete/', array('id' => $themeId, 'back' => true)))))), 'class' => 'save delete-theme', 'target' => '_blank'));
     $themeBlock->addButton($removeButton);
     return $this;
 }
Beispiel #2
0
 /**
  * Get demo button
  *
  * @param Mage_DesignEditor_Block_Adminhtml_Theme $themeBlock
  * @return Mage_DesignEditor_Block_Adminhtml_Theme_Selector_List_Available
  */
 protected function _addDemoButtonHtml($themeBlock)
 {
     /** @var $demoButton Mage_Backend_Block_Widget_Button */
     $demoButton = $this->getLayout()->createBlock('Mage_Backend_Block_Widget_Button');
     $demoButton->setData(array('label' => $this->__('Theme Demo'), 'class' => 'preview-demo', 'data_attribute' => array('mage-init' => array('button' => array('event' => 'preview', 'target' => 'body', 'eventData' => array('preview_url' => $this->_getPreviewUrl($themeBlock->getTheme()->getId())))))));
     $themeBlock->addButton($demoButton);
     return $this;
 }