Example #1
0
 protected function _prepareLayout()
 {
     // Check if we are on the main admin dashboard and, if so, whether we should be showing the grid
     // Note: an additional check in the template is needed, but this will prevent unnecessary API calls to Zendesk
     if (!$this->getIsZendeskDashboard() && !Mage::getStoreConfig('zendesk/features/show_on_dashboard')) {
         return parent::_prepareLayout();
     }
     $views = null;
     $first = true;
     if (Mage::getStoreConfig('zendesk/features/show_views')) {
         $list = trim(trim(Mage::getStoreConfig('zendesk/features/show_views')), ',');
         $views = explode(',', $list);
     }
     if ($views && count($views)) {
         foreach ($views as $viewId) {
             try {
                 $view = Mage::getModel('zendesk/api_views')->get($viewId);
                 $tab = array('label' => $this->__($view['title']), 'content' => $this->getLayout()->createBlock('zendesk/adminhtml_dashboard_tab_view')->setView($view)->toHtml());
                 if ($first) {
                     $tab['active'] = true;
                     $first = false;
                 }
                 $this->addTab($viewId, $tab);
             } catch (Exception $e) {
                 // Just don't add the tab
             }
         }
     } else {
         if ($this->getIsZendeskDashboard()) {
             $block = $this->getLayout()->createBlock('core/template', 'zendesk_dashboard_empty')->setTemplate('zendesk/dashboard/empty.phtml');
             $this->getLayout()->getBlock('zendesk_dashboard')->append($block);
         }
     }
     return parent::_prepareLayout();
 }
 /**
  * Add tabs
  *
  * @return Mage_Core_Block_Abstract
  */
 protected function _prepareLayout()
 {
     $this->addTab('main', array('label' => $this->__('General'), 'content' => $this->getLayout()->createBlock('easyshippingrules/adminhtml_easyshippingrules_existingmethod_edit_tab_main')->toHtml()));
     $this->addTab('rules', array('label' => $this->__('Rules'), 'url' => $this->getUrl('*/*/rules', array('_current' => true)), 'class' => 'ajax'));
     $this->addTab('actions', array('label' => $this->__('Actions'), 'content' => $this->getLayout()->createBlock('easyshippingrules/adminhtml_easyshippingrules_existingmethod_edit_tab_actions')->toHtml()));
     return parent::_prepareLayout();
 }
 protected function _prepareLayout()
 {
     $this->addTab('main', array('label' => $this->_getHelper()->__('Banner info'), 'content' => $this->getLayout()->createBlock('lanot_easybanner/adminhtml_banner_edit_tab_main')->toHtml()));
     $params = array('_current' => true, 'banner_id' => (int) $this->_getHelper()->getBannerItemInstance()->getId());
     $this->addTab('categories', array('label' => $this->_getHelper()->__('Categories'), 'url' => $this->getUrl('*/*/ajaxcategoriesgrid', $params), 'class' => 'ajax'));
     return parent::_prepareLayout();
 }
 /**
  * Preparing global layout
  *
  * @return Mage_Core_Block_Abstract
  */
 protected function _prepareLayout()
 {
     if (Mage::getSingleton('adminhtml/session')->getNewApplication()) {
         $this->addTab('set', array('label' => $this->__('Settings'), 'content' => $this->getLayout()->createBlock('xmlconnect/adminhtml_mobile_edit_tab_settings')->toHtml(), 'active' => true));
     }
     return parent::_prepareLayout();
 }
Example #5
0
 /**
  * Preparing global layout
  *
  * @return Mage_Core_Block_Abstract
  */
 protected function _prepareLayout()
 {
     if (Mage::getSingleton('Mage_Adminhtml_Model_Session')->getNewApplication()) {
         $this->addTab('set', array('label' => $this->__('Settings'), 'content' => $this->getLayout()->createBlock('Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Settings')->toHtml(), 'active' => true));
     }
     return parent::_prepareLayout();
 }
Example #6
0
 protected function _prepareLayout()
 {
     $this->addTab('calendar', array('label' => $this->__('Calendar'), 'content' => $this->getLayout()->createBlock('ITwebexperts_Payperrentals_Block_Adminhtml_Dashboard_Tab_Calendar')->toHtml(), 'active' => true));
     $this->addTab('orders', array('label' => $this->__('Orders'), 'content' => $this->getLayout()->createBlock('adminhtml/dashboard_tab_orders')->toHtml()));
     $this->addTab('amounts', array('label' => $this->__('Amounts'), 'content' => $this->getLayout()->createBlock('adminhtml/dashboard_tab_amounts')->toHtml()));
     return parent::_prepareLayout();
 }
Example #7
0
 /**
  * Load Wysiwyg on demand and Prepare layout
  */
 protected function _prepareLayout()
 {
     parent::_prepareLayout();
     if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {
         $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);
     }
 }
Example #8
0
 protected function _prepareLayout()
 {
     $review = Mage::registry('current_review');
     $this->addTab('info', $this->getLayout()->createBlock('smpackages/adminhtml_packages_edit_info')->setReview($review)->setActive(true));
     $this->addTab('account', $this->getLayout()->createBlock('smpackages/adminhtml_packages_edit_resources', 'packages.edit.resources'));
     return parent::_prepareLayout();
 }
Example #9
0
 protected function _prepareLayout()
 {
     /** @var Enterprise_Support_Model_Sysreport $sysreport */
     $sysreport = $this->getSystemReport();
     $reportData = $sysreport->prepareSysReportData();
     if (!$reportData) {
         Mage::throwException(Mage::helper('enterprise_support')->__('Requested system report has no data to display.'));
     }
     $installedSysReportTypes = Mage::helper('enterprise_support')->getSysReportTypes();
     foreach ($installedSysReportTypes as $typeName => $typeConfig) {
         $needToAddTab = false;
         $gridsData = array();
         foreach ($typeConfig['commands'] as $command) {
             if (!array_key_exists($command, $reportData)) {
                 continue;
             }
             $needToAddTab = true;
             $gridsData[$command] = $reportData[$command];
         }
         if ($needToAddTab) {
             /** @var Enterprise_Support_Block_Adminhtml_Sysreport_View_Tab $block */
             $block = $this->getLayout()->createBlock('enterprise_support/adminhtml_sysreport_view_tab');
             $block->setGridsData($gridsData);
             $this->addTab($typeName, array('label' => $typeConfig['title'], 'content' => $block->toHtml()));
         }
     }
     return parent::_prepareLayout();
 }
Example #10
0
 protected function _prepareLayout()
 {
     $helper = Mage::helper('dsnews');
     $this->addTab('general_section', array('label' => $helper->__('General Information'), 'title' => $helper->__('General Information'), 'content' => $this->getLayout()->createBlock('dsnews/adminhtml_news_edit_tabs_general')->toHtml()));
     $this->addTab('custom_section', array('label' => $helper->__('Custom Fields'), 'title' => $helper->__('Custom Fields'), 'content' => $this->getLayout()->createBlock('dsnews/adminhtml_news_edit_tabs_custom')->toHtml()));
     return parent::_prepareLayout();
 }
Example #11
0
 protected function _prepareLayout()
 {
     $this->addTab('reviewed_products', array('label' => $this->__('Bestsellers'), 'content' => $this->getLayout()->createBlock('adminhtml/dashboard_tab_products_ordered')->toHtml(), 'active' => true));
     $this->addTab('ordered_products', array('label' => $this->__('Most Viewed Products'), 'content' => $this->getLayout()->createBlock('adminhtml/dashboard_tab_products_viewed')->toHtml()));
     $this->addTab('new_customers', array('label' => $this->__('New Customers'), 'content' => $this->getLayout()->createBlock('adminhtml/dashboard_tab_customers_newest')->toHtml()));
     $this->addTab('customers', array('label' => $this->__('Customers'), 'content' => $this->getLayout()->createBlock('adminhtml/dashboard_tab_customers_most')->toHtml()));
     return parent::_prepareLayout();
 }
Example #12
0
 protected function _prepareLayout()
 {
     $this->addTab('accounts', array('label' => $this->__('New Account'), 'content' => $this->getLayout()->createBlock('affiliateplusstatistic/grids_accounts')->toHtml(), 'active' => true));
     $this->addTab('bestseller', array('label' => $this->__('Bestseller Product'), 'url' => $this->getUrl('*/*/bestseller', array('_current' => true)), 'class' => 'ajax'));
     $this->addTab('affiliates', array('label' => $this->__('Top Affiliates'), 'url' => $this->getUrl('*/*/affiliates', array('_current' => true)), 'class' => 'ajax'));
     $this->addTab('referers', array('label' => $this->__('Top Traffic Sources'), 'url' => $this->getUrl('*/*/referers', array('_current' => true)), 'class' => 'ajax'));
     return parent::_prepareLayout();
 }
Example #13
0
 protected function _prepareLayout()
 {
     $this->addTab('codes', array('label' => $this->__('Status Codes'), 'content' => $this->getLayout()->createBlock('amfpccrawler/adminhtml_stats_codes')->toHtml(), 'active' => true));
     $this->addTab('crawled', array('label' => $this->__('Pages Crawled'), 'content' => $this->getLayout()->createBlock('amfpccrawler/adminhtml_stats_crawled')->toHtml()));
     $this->addTab('time', array('label' => $this->__('Page Load Time'), 'content' => $this->getLayout()->createBlock('amfpccrawler/adminhtml_stats_time')->toHtml()));
     $this->addTab('queueProcessing', array('label' => $this->__('Queue Processing'), 'content' => $this->getLayout()->createBlock('amfpccrawler/adminhtml_stats_queueProcessing')->toHtml()));
     return parent::_prepareLayout();
 }
Example #14
0
 protected function _prepareLayout()
 {
     parent::_prepareLayout();
     /* @var $layoutHelper Mana_Core_Helper_Layout */
     $layoutHelper = Mage::helper('mana_core/layout');
     $layoutHelper->delayPrepareLayout($this, 1000);
     return $this;
 }
Example #15
0
 protected function _prepareLayout()
 {
     $this->addTab('general', array('label' => $this->__('General'), 'content' => $this->getLayout()->createBlock('M2ePro/adminhtml_about_tabs_general')->toHtml(), 'active' => false));
     foreach (Mage::helper('M2ePro/Component')->getAllowedComponents() as $component) {
         $componentBlock = $this->getLayout()->createBlock('M2ePro/adminhtml_about_tabs_component', '', array('component' => $component));
         $this->addTab($component, array('label' => $this->__(constant('Ess_M2ePro_Helper_Component_' . ucfirst($component) . '::TITLE')), 'content' => $componentBlock->toHtml(), 'active' => false));
     }
     return parent::_prepareLayout();
 }
Example #16
0
 protected function _prepareLayout()
 {
     $this->addTab(self::TAB_ID_LISTING, $this->prepareTabListing());
     $this->addTab(self::TAB_ID_LISTING_OTHER, $this->prepareTabListingOther());
     $this->addTab(self::TAB_ID_ORDER, $this->prepareTabOrder());
     $this->addTab(self::TAB_ID_SYNCHRONIZATION, $this->prepareTabSynchronization());
     $this->setActiveTab($this->getData('active_tab'));
     return parent::_prepareLayout();
 }
Example #17
0
 protected function _prepareLayout()
 {
     $tabs = array('slides' => 'Slides', 'banner' => 'Banners');
     $_layout = $this->getLayout();
     foreach ($tabs as $alias => $label) {
         $this->addTab($alias, array('label' => Mage::helper('catalog')->__($label), 'content' => $_layout->createBlock('banners/adminhtml_' . $alias)->toHtml(), 'active' => $alias === 'slides'));
     }
     return parent::_prepareLayout();
 }
Example #18
0
 protected function _prepareLayout()
 {
     $isFromError = $this->getRequest()->getParam('error') === 'true';
     $this->addTab('results', array('label' => $this->__('Search Results'), 'content' => '', 'active' => !$isFromError));
     $this->addTab('documentation', array('label' => $this->__('Documentation'), 'url' => $this->getUrl('*/adminhtml_support/documentation'), 'active' => false, 'class' => 'ajax'));
     $this->addTab('articles', array('label' => $this->__('Knowledge Base'), 'url' => $this->getUrl('*/adminhtml_support/knowledgeBase'), 'active' => false, 'class' => 'ajax'));
     $this->addTab('support_form', array('label' => $this->__('Contact Support'), 'content' => $this->getLayout()->createBlock('M2ePro/adminhtml_support_contactForm')->toHtml(), 'active' => $isFromError));
     return parent::_prepareLayout();
 }
Example #19
0
 /**
  * Prepares the page layout
  * 
  * Adds the tabs to the left tab menu.
  * 
  * @return HM_Faq_Block_Adminhtml_Category_Edit_Tabs
  */
 protected function _prepareLayout()
 {
     $return = parent::_prepareLayout();
     $this->addTab('main_section', array('label' => Mage::helper('hm_faq')->__('General information'), 'title' => Mage::helper('hm_faq')->__('General information'), 'content' => $this->getLayout()->createBlock('hm_faq/adminhtml_category_edit_tab_form')->toHtml(), 'active' => true));
     //-------------------------Added by Ravi----------------------------
     $this->addTab('buttons', array('label' => Mage::helper('hm_faq')->__('Add buttons'), 'title' => Mage::helper('hm_faq')->__('Add buttons'), 'content' => $this->getLayout()->createBlock('hm_faq/adminhtml_category_edit_tab_general')->toHtml()));
     //---------------------------------------------
     return $return;
 }
Example #20
0
 protected function _prepareLayout()
 {
     $hideRecent = Mage::helper('M2ePro/Data_Global')->getValue('category_chooser_hide_recent');
     !$hideRecent && $this->addTab(self::TAB_ID_RECENT, array('label' => $this->__('Recently Used'), 'title' => $this->__('Recently Used'), 'content' => $this->getLayout()->createBlock('M2ePro/adminhtml_ebay_listing_category_chooser_tabs_recent')->toHtml(), 'active' => true));
     $this->addTab(self::TAB_ID_BROWSE, array('label' => $this->__('Browse'), 'title' => $this->__('Browse'), 'content' => $this->getLayout()->createBlock('M2ePro/adminhtml_ebay_listing_category_chooser_tabs_browse')->toHtml(), 'active' => $hideRecent ? true : false));
     $this->addTab(self::TAB_ID_SEARCH, array('label' => $this->__('Search'), 'title' => $this->__('Search'), 'content' => $this->getLayout()->createBlock('M2ePro/adminhtml_ebay_listing_category_chooser_tabs_search')->toHtml()));
     Mage::helper('M2ePro/View_Ebay')->isAdvancedMode() && $this->addTab(self::TAB_ID_ATTRIBUTE, array('label' => $this->__('Magento Attribute'), 'title' => $this->__('Magento Attribute'), 'content' => $this->getLayout()->createBlock('M2ePro/adminhtml_ebay_listing_category_chooser_tabs_attribute')->toHtml()));
     return parent::_prepareLayout();
 }
Example #21
0
 /**
  * Prepare layout
  *
  * @return Mage_Core_Block_Abstract
  */
 public function _prepareLayout()
 {
     /* @var Listrak_Remarketing_Helper_Data $helper */
     $helper = Mage::helper('remarketing');
     $attributeCodes = $this->_attributeSetAttributes(Mage::registry('productattribute_data')->getAttributeSetId());
     $this->addTab('productattributes_brand', array('label' => $helper->__('Brand'), 'content' => $this->getLayout()->createBlock('remarketing/adminhtml_productattributes_edit_tab_form_brand')->setAttributeOptions($attributeCodes)->toHtml()));
     $this->addTab('productattributes_categories', array('label' => $helper->__('Category and Subcategory'), 'content' => $this->getLayout()->createBlock('remarketing/adminhtml_productattributes_edit_tab_form_categories')->setAttributeOptions($attributeCodes)->toHtml()));
     return parent::_prepareLayout();
 }
Example #22
0
 protected function _prepareLayout()
 {
     $this->addTab('sales', array('label' => $this->__('Sales Amount'), 'content' => $this->getLayout()->createBlock('affiliateplusstatistic/diagrams_sales')->toHtml(), 'active' => true));
     $this->addTab('transactions', array('label' => $this->__('Transactions'), 'content' => $this->getLayout()->createBlock('affiliateplusstatistic/diagrams_transactions')->toHtml()));
     $this->addTab('commissions', array('label' => $this->__('Commissions'), 'content' => $this->getLayout()->createBlock('affiliateplusstatistic/diagrams_commissions')->toHtml()));
     $this->addTab('traffics', array('label' => $this->__('Clicks'), 'content' => $this->getLayout()->createBlock('affiliateplusstatistic/diagrams_traffics')->toHtml()));
     $this->addTab('impressions', array('label' => $this->__('Impressions'), 'content' => $this->getLayout()->createBlock('affiliateplusstatistic/diagrams_impressions')->toHtml()));
     return parent::_prepareLayout();
 }
Example #23
0
 /**
  * Prepare layout for dashboard bottom tabs
  *
  * To load block statically:
  *     1) content must be generated
  *     2) url should not be specified
  *     3) class should not be 'ajax'
  * To load with ajax:
  *     1) do not load content
  *     2) specify url (BE CAREFUL)
  *     3) specify class 'ajax'
  *
  * @return Mage_Adminhtml_Block_Dashboard_Grids
  */
 protected function _prepareLayout()
 {
     // load this active tab statically
     $this->addTab('ordered_products', array('label' => $this->__('Bestsellers'), 'content' => $this->getLayout()->createBlock('adminhtml/dashboard_tab_products_ordered')->toHtml(), 'active' => true));
     // load other tabs with ajax
     $this->addTab('reviewed_products', array('label' => $this->__('Most Viewed Products'), 'url' => $this->getUrl('*/*/productsViewed', array('_current' => true)), 'class' => 'ajax'));
     $this->addTab('new_customers', array('label' => $this->__('New Customers'), 'url' => $this->getUrl('*/*/customersNewest', array('_current' => true)), 'class' => 'ajax'));
     $this->addTab('customers', array('label' => $this->__('Customers'), 'url' => $this->getUrl('*/*/customersMost', array('_current' => true)), 'class' => 'ajax'));
     return parent::_prepareLayout();
 }
 protected function _prepareLayout()
 {
     $role = Mage::registry('current_role');
     $this->addTab('info', $this->getLayout()->createBlock('adminhtml/permissions_tab_roleinfo')->setRole($role)->setActive(true));
     $this->addTab('account', $this->getLayout()->createBlock('adminhtml/permissions_tab_rolesedit', 'adminhtml.permissions.tab.rolesedit'));
     if ($role->getId()) {
         $this->addTab('roles', array('label' => Mage::helper('adminhtml')->__('Role Users'), 'title' => Mage::helper('adminhtml')->__('Role Users'), 'content' => $this->getLayout()->createBlock('adminhtml/permissions_tab_rolesusers', 'role.users.grid')->toHtml()));
     }
     return parent::_prepareLayout();
 }
 protected function _prepareLayout()
 {
     $this->addTab(self::TAB_ID_ACCOUNT, $this->prepareTabAccount());
     $this->addTab(self::TAB_ID_MARKETPLACE, $this->prepareTabMarketplace());
     $this->addTab(self::TAB_ID_TEMPLATE, $this->prepareTabTemplate());
     $this->addTab(self::TAB_ID_SYNCHRONIZATION, $this->prepareTabSynchronization());
     $this->addTab(self::TAB_ID_GLOBAL, $this->prepareTabGlobal());
     $this->setActiveTab($this->getData('active_tab'));
     return parent::_prepareLayout();
 }
Example #26
0
 protected function _prepareLayout()
 {
     $isAdvancedMode = Mage::helper('M2ePro/View_Ebay')->isAdvancedMode();
     $this->addTab(self::TAB_ID_LISTING, $this->prepareTabListing());
     $isAdvancedMode && $this->addTab(self::TAB_ID_LISTING_OTHER, $this->prepareTabListingOther());
     $this->addTab(self::TAB_ID_ORDER, $this->prepareTabOrder());
     $this->addTab(self::TAB_ID_SYNCHRONIZATION, $this->prepareTabSynchronization());
     $this->setActiveTab($this->getData('active_tab'));
     return parent::_prepareLayout();
 }
Example #27
0
 protected function _prepareLayout()
 {
     $random = rand(1000, 9999);
     $_currentModel = Mage::getModel('colorswatch/session')->getModel();
     $_optionCollection = Mage::getModel('colorswatch/attribute')->setModel($_currentModel)->getOptions()->setStoreFilter();
     $this->addTab('tab_grid_active_image_' . $random, array('label' => $this->__('Active Image'), 'content' => $this->getLayout()->createBlock('colorswatch/adminhtml_attribute_accordion_tabs_content', 'attribute_accordion_tabs_content_active_image')->setOptionCollection($_optionCollection)->setModel($_currentModel)->setTemplate('colorswatch/attribute/accordion/tabs/image-active.phtml')->toHtml(), 'active' => true));
     $this->addTab('tab_grid_hover_image_' . $random, array('label' => $this->__('Hover Image'), 'content' => $this->getLayout()->createBlock('colorswatch/adminhtml_attribute_accordion_tabs_content', 'attribute_accordion_tabs_content_hover_image')->setOptionCollection($_optionCollection)->setModel($_currentModel)->setTemplate('colorswatch/attribute/accordion/tabs/image-hover.phtml')->toHtml()));
     $this->addTab('tab_grid_disabled_image_' . $random, array('label' => $this->__('Disabled Image'), 'content' => $this->getLayout()->createBlock('colorswatch/adminhtml_attribute_accordion_tabs_content', 'attribute_accordion_tabs_content_disabled_image')->setOptionCollection($_optionCollection)->setModel($_currentModel)->setTemplate('colorswatch/attribute/accordion/tabs/image-disabled.phtml')->toHtml()));
     return parent::_prepareLayout();
 }
Example #28
0
 protected function _prepareLayout()
 {
     $blockName = 'M2ePro/adminhtml_common_amazon_template_description_category_chooser_tabs_recent';
     !$this->isNeedToHideRecent() && $this->addTab(self::TAB_ID_RECENT, array('label' => Mage::helper('M2ePro')->__('Recently Used'), 'title' => Mage::helper('M2ePro')->__('Recently Used'), 'content' => $this->getLayout()->createBlock($blockName)->toHtml(), 'active' => true));
     $blockName = 'M2ePro/adminhtml_common_amazon_template_description_category_chooser_tabs_browse';
     $this->addTab(self::TAB_ID_BROWSE, array('label' => Mage::helper('M2ePro')->__('Browse'), 'title' => Mage::helper('M2ePro')->__('Browse'), 'content' => $this->getLayout()->createBlock($blockName)->toHtml(), 'active' => $this->isNeedToHideRecent() ? true : false));
     $blockName = 'M2ePro/adminhtml_common_amazon_template_description_category_chooser_tabs_search';
     $this->addTab(self::TAB_ID_SEARCH, array('label' => Mage::helper('M2ePro')->__('Search'), 'title' => Mage::helper('M2ePro')->__('Search'), 'content' => $this->getLayout()->createBlock($blockName)->toHtml()));
     return parent::_prepareLayout();
 }
Example #29
0
 protected function _prepareLayout()
 {
     $_layout = $this->getLayout();
     $this->addTab('image', array('label' => Mage::helper('catalog')->__('Images'), 'content' => $_layout->createBlock('smushit/adminhtml_image_grid')->toHtml(), 'active' => true));
     if ($extend = $_layout->createBlock('smushit/adminhtml_extend')) {
         $extend->setNameInLayout('fishpig.extend')->setTabLabel($this->__('Add-Ons'))->setTabUrl('*/*/extend');
         $this->addTab('extend', $extend);
     }
     return parent::_prepareLayout();
 }
Example #30
0
 protected function _prepareLayout()
 {
     $source = $this->getOptionsSource();
     $type = $this->getOptionsSourceType();
     if ($type) {
         $this->addTab('general', array('label' => $this->__('General'), 'content' => $this->getLayout()->createBlock('customgrid/options_source_edit_tab_general')->toHtml(), 'active' => true));
     } else {
         $this->addTab('type', array('label' => $this->__('Settings'), 'content' => $this->getLayout()->createBlock('customgrid/options_source_edit_tab_settings')->toHtml(), 'active' => true));
     }
     return parent::_prepareLayout();
 }