Browse Source

Added the display of the total count of objects above 'group by' blocks.

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@1492 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 13 years ago
parent
commit
5a6661d732
1 changed files with 3 additions and 0 deletions
  1. 3 0
      application/displayblock.class.inc.php

+ 3 - 0
application/displayblock.class.inc.php

@@ -347,6 +347,7 @@ class DisplayBlock
 				$sGroupByField = $aExtraParams['group_by'];
 				$aGroupBy = array();
 				$sLabels = array();
+				$iTotalCount = $this->m_oSet->Count();
 				while($oObj = $this->m_oSet->Fetch())
 				{
 					if (isset($aExtraParams['group_by_expr']))
@@ -373,6 +374,8 @@ class DisplayBlock
 					'group' => array('label' => MetaModel::GetLabel($this->m_oFilter->GetClass(), $sGroupByField), 'description' => ''),
 					'value' => array('label'=> Dict::S('UI:GroupBy:Count'), 'description' => Dict::S('UI:GroupBy:Count+'))
 				);
+				$sFormat = isset($aExtraParams['format']) ? $aExtraParams['format'] : 'UI:Pagination:HeaderNoSelection';
+				$sHtml .= $oPage->GetP(Dict::Format($sFormat, $iTotalCount));
 				$sHtml .= $oPage->GetTable($aAttribs, $aData);
 			}
 			else