From 9bcf78bfd67ff34e0071b922093b85485febec15 Mon Sep 17 00:00:00 2001 From: Denis Flaven Date: Sun, 31 Jul 2011 10:45:03 +0000 Subject: [PATCH] Enhancement: the number of items is displayed (statically) in the header of the each "details" tab. SVN:trunk[1398] --- application/cmdbabstract.class.inc.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/application/cmdbabstract.class.inc.php b/application/cmdbabstract.class.inc.php index d212bdd61..fc81176de 100644 --- a/application/cmdbabstract.class.inc.php +++ b/application/cmdbabstract.class.inc.php @@ -241,7 +241,14 @@ abstract class cmdbAbstractObject extends CMDBObject implements iDisplay // Display mode if (!$oAttDef->IsLinkset()) continue; // Process only linkset attributes... - $oPage->SetCurrentTab($oAttDef->GetLabel()); + $oSet = new DBObjectSet($this->Get($sAttCode)->GetFilter()); + $iCount = $oSet->Count(); + $sCount = ''; + if ($iCount != 0) + { + $sCount = " ($iCount)"; + } + $oPage->SetCurrentTab($oAttDef->GetLabel().$sCount); if ($bEditMode) { $iFlags = $this->GetAttributeFlags($sAttCode); @@ -1676,7 +1683,7 @@ EOF if ($iFlags & (OPT_ATT_READONLY|OPT_ATT_SLAVE)) { - // Check if the attribute is not read-only becuase of a synchro... + // Check if the attribute is not read-only because of a synchro... $aReasons = array(); $sSynchroIcon = ''; if ($iFlags & OPT_ATT_SLAVE)