<?php
namespace App\Dashboard\Templates\Home; class CEO extends \App\Dashboard\Templates\BaseAbstract { public function configureDashboard() { $t1c = new \Engine\Dashboard\Containers\Table1Col(); $t1c->setTitle($this->getName()); $this->dashboard->appendElement($t1c); $salesOverview = new \App\Dashboard\Widget\QuickReports_SalesOverview(); $acquisitionsOverview = new \App\Dashboard\Widget\QuickReports_AcquisitionsOverview(); $monthlySalesComparison = new \App\Dashboard\Widget\Charts_MonthlySalesComparison(); $incomeProfitComparison = new \App\Dashboard\Widget\Charts_IncomeProfitComparison(); $estimatedDailyBalance = new \App\Dashboard\Widget\Charts_EstimatedDailyBalance(); $cancelledServicesCountMonthly = new \App\Dashboard\Widget\Charts_CancelledServicesCountMonthly(); $topCorporatesSales = new \App\Dashboard\Widget\QuickReports_TopCorporatesSales(); $topAgentsPerf = new \App\Dashboard\Widget\QuickReports_TopAgentsPerf(); $t1c->appendElement($salesOverview, 0); $t1c->appendElement($acquisitionsOverview, 0); $t1c->appendElement($monthlySalesComparison, 0); $t1c->appendElement($incomeProfitComparison, 0); $t1c->appendElement($estimatedDailyBalance, 0); $t1c->appendElement($cancelledServicesCountMonthly, 0); $t1c->appendElement($topCorporatesSales, 0); $t1c->appendElement($topAgentsPerf, 0); } public function getDescription() { \App\Loader_Lang::getInstance()->loadAppFile("_customLoad/dashboard/dashboard/_general.lang.php"); $_LANG = \App\Loader_Lang::getInstance()->getGlobal(); $widgetNames = []; foreach ($this->dashboard->getContentLinear()[0]->getContentLinear() as $widget) { $widgetNames[] = $widget->getTitle(); } $widgetNamesStr = implode(", ", $widgetNames); $link = \Engine\Mvc\Dispatcher::getInstance()->getAppUrl('Modules/Home', 'selectFirstTemplate', [ 'template' => addslashes('\\'.__CLASS__), ]); $description = <<<HTML
			<div class="tplRow">
				<div class="tplCol">
					<img src="Modules/Home/View/_img/CEO.png" onclick="requestChangeTemplate('{$link}');" style="cursor:pointer;" tooltip="{$_LANG['dashboard']['tooltips']['selectTemplate']}" />
				</div>
				<div class="tplCol">
					<a onclick="requestChangeTemplate('{$link}');" class="tplLink" href="javascript:;" tooltip="{$_LANG['dashboard']['tooltips']['selectTemplate']}">{$this->getName()}</a>

					<div class="text"><b>{$_LANG['dashboard']['templates']['general']['who']}</b></div>
					<div class="text"><b>{$_LANG['dashboard']['templates']['\\'.__CLASS__]['who']}</b></div>
					<div class="text">{$_LANG['dashboard']['templates']['\\'.__CLASS__]['description']}</div>
				</div>
			</div>
			<div class="tplRow">
				<div class="tplCol">
					<div class="text"><b>{$_LANG['dashboard']['templates']['general']['widgets']}</b></div>
					<div class="text">{$widgetNamesStr}.</div>
				</div>
			</div>
HTML;
return $description; } } 