00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 class Mage_Adminhtml_Block_Dashboard extends Mage_Adminhtml_Block_Template
00028 {
00029 protected $_locale;
00030
00031 public function __construct()
00032 {
00033 parent::__construct();
00034 $this->setTemplate('dashboard/index.phtml');
00035
00036 }
00037
00038 protected function _prepareLayout()
00039 {
00040 $this->setChild('lastOrders',
00041 $this->getLayout()->createBlock('adminhtml/dashboard_orders_grid')
00042 );
00043
00044 $this->setChild('totals',
00045 $this->getLayout()->createBlock('adminhtml/dashboard_totals')
00046 );
00047
00048 $this->setChild('sales',
00049 $this->getLayout()->createBlock('adminhtml/dashboard_sales')
00050 );
00051
00052 $this->setChild('lastSearches',
00053 $this->getLayout()->createBlock('adminhtml/dashboard_searches_last')
00054 );
00055
00056 $this->setChild('topSearches',
00057 $this->getLayout()->createBlock('adminhtml/dashboard_searches_top')
00058 );
00059
00060 $this->setChild('diagrams',
00061 $this->getLayout()->createBlock('adminhtml/dashboard_diagrams')
00062 );
00063
00064 $this->setChild('grids',
00065 $this->getLayout()->createBlock('adminhtml/dashboard_grids')
00066 );
00067
00068 parent::_prepareLayout();
00069 }
00070
00071 public function getSwitchUrl()
00072 {
00073 if ($url = $this->getData('switch_url')) {
00074 return $url;
00075 }
00076 return $this->getUrl('*/*/*', array('_current'=>true, 'period'=>null));
00077 }
00078 }