namespace Combodo\iTop\Application\Dashlet\Core; use Combodo\iTop\Application\UI\Base\Component\Dashlet\DashletContainer; use Dict; class DashletGroupByTable extends DashletGroupBy { /** * @inheritdoc */ public function __construct($oModelReflection, $sId) { parent::__construct($oModelReflection, $sId); $this->aProperties['style'] = 'table'; } /** * @inheritdoc */ public function RenderNoData($oPage, $bEditMode = false, $aExtraParams = []) { $oDashletContainer = new DashletContainer(); $aDisplayValues = $this->MakeSimulatedData(); $iTotal = 0; foreach ($aDisplayValues as $iRow => $aDisplayData) { $iTotal += $aDisplayData['value']; } $sBlockId = 'block_fake_'.$this->sId.($bEditMode ? '_edit' : ''); // make a unique id (edition occuring in the same DOM) $sHtml = ''; $sHtml .= '
'.Dict::Format('UI:Pagination:HeaderNoSelection', $iTotal).'
'; $sHtml .= '| '.$this->sGroupByLabel.' | '; $sHtml .= ''.Dict::S('UI:GroupBy:Count').' | '; $sHtml .= '
|---|---|
| '.$aDisplayData['label'].' | '; $sHtml .= ''.$aDisplayData['value'].' | '; $sHtml .= '