Переглянути джерело

Enhancement: the number of items is displayed (statically) in the header of the each "details" tab.

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@1398 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 14 роки тому
батько
коміт
7389579d71
1 змінених файлів з 9 додано та 2 видалено
  1. 9 2
      application/cmdbabstract.class.inc.php

+ 9 - 2
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)