Sub BuildCard(res As Map) As ABMContainer
Dim tmpCard As ABMContainer
tmpCard.Tag = res.Get("regid")
tmpCard.InitializeCollapsable(page, "Card" & res.Get("regid"), "zdepthgrey", "", "white", False )
' initialize header
tmpCard.CollapsableHeading.AddRowsM(1, False, 0,0,"").AddCellsOSMP(1,0,0,0,12,4,4,0,0,20,20,"").AddCellsOSMP(1,0,0,0,12,8,8,0,0,20,20,"")
tmpCard.CollapsableHeading.BuildGrid
' initialize body
tmpCard.CollapsableBody.AddRowsM(1, False,0 ,0,"").AddCellsOSMP(1,0,0,0,10,11,11,0,0,20,20,"").AddCellsOSMP(1,0,0,0,2,1,1,20,0,0,20,"")
'tmpCard.CollapsableBody.AddRowsM(1, True ,20,10, "").AddCellsOS(1,6,6,6,3,3,3,"cellright").AddCellsOS(1,0,0,0,3,3,3,"cellright")
tmpCard.CollapsableBody.BuildGrid
DateTime.DateFormat = "yyyy-MM-dd"
DateTime.TimeFormat = "HH:mm:ss"
Dim tmpStr As String = res.Get("regtimestamp")
Dim tmpDate As Long = DateTime.DateTimeParse(tmpStr.SubString2(0,10),tmpStr.SubString2(11,19))
DateTime.DateFormat = "dd/MM/yyyy"
DateTime.TimeFormat = "HH:mm"
Dim tmpCardDate As ABMLabel
tmpCardDate.Initialize(page, "CardDate" & res.Get("regid"), DateTime.Date(tmpDate) & " " & DateTime.Time(tmpDate), ABM.SIZE_H6, True, "")
'tmpCardDate.IsBlockQuote = True
tmpCard.CollapsableHeading.Cell(1,1).AddComponent(tmpCardDate)
Dim tmpCardType As ABMLabel
tmpCardType.Initialize(page, "CardType" & res.Get("regid"), res.Get("itcode"), ABM.SIZE_H6, True, "")
tmpCardType.IconName = "fa fa-expand"
tmpCardType.IconSize = ABM.ICONSIZE_SMALL
tmpCardType.IconAlign = ABM.ICONALIGN_RIGHT
'tmpCardType.IsBlockQuote = True
tmpCard.CollapsableHeading.Cell(1,2).AddComponent(tmpCardType)
Dim tmpCardEditor As ABMEditor
tmpCardEditor.Initialize(page, "CardEditor" & res.Get("regid"), False, False, "")
tmpCard.CollapsableBody.Cell(1,1).AddComponent(tmpCardEditor)
Dim tmpCardEdit As ABMButton
tmpCardEdit.InitializeFloating(page, res.Get("regid"), "mdi-action-visibility", "")
tmpCard.CollapsableBody.Cell(1,2).AddArrayComponent(tmpCardEdit, "tmpCardEdit")
Return tmpCard
End Sub