<!-- #include virtual="/NR/System/WBC/Internals/ServerControls/GridControl/CNCGridControl.inc"-->
<!-- #include virtual="/NR/System/WBC/Internals/WBCFuncPages/Cross-Browser/PropertiesDialog/Channel/CNCGridDecorator_ChannelEopList.inc"-->
<!-- #include virtual="/NR/System/WBC/Internals/WBCFuncPages/Cross-Browser/PropertiesDialog/Posting/CNCGridDecorator_PostingEopList.inc"-->
<%
' ********************************************************************
' Copyright (C) 2001 Microsoft Corporation. All rights reserved.
'
'	IMPORTANT.  Please read the legal.txt file, located in the
'	"<CMS Install Directory>\Server\httpexec\WBC\Internals"
'	directory, governing the use of this internal file."
' ********************************************************************

' ********************************************************************
' File:		/NR/System/WBC/Internals/WBCFuncPages/Cross-Browser/PropertiesDialog/
'			Channel/CNCTabRenderer_CustomProperties.inc
'
' Version: 	Microsoft Content Management Server
' Author:	Microsoft Corporation.
' Purpose:	Responsible for Creat a Standard tab head and content of
'			Channel Properties Dialog.
'
' Public Methods and Properties Exposed:
'	- Sub RenderTabActiveHead()
'	- Sub RenderTabInactiveHead()
'	- Sub RenderTabContent()
' ********************************************************************


Class CNCTabRenderer_CustomProperties


	'----[Public] Render an active head in tab control
	Public Sub RenderTabActiveHead()
		If AutoSession.This.IsPosting Then
			If AutoSession.This.IsConnected Then
				Call Response.Write("<img border=0 src='" & IDS_PATH_IMAGES_COMMON & IDS_IMG_TAB_CUSTOM_CONNECTED & "' alt='" & IDS_UI_TOOLTIP_SHARED_PROPERTY & "'>")
			Else
				Call Response.Write("<img border=0 src='" & IDS_PATH_IMAGES_COMMON & IDS_IMG_TAB_CUSTOM & "'>")
			End If
		Else
			Call Response.Write("<img border=0 src='" & IDS_PATH_IMAGES_COMMON & IDS_IMG_TAB_CUSTOM & "'>")
		End If
	End Sub

	'----[Public] Render an inactive head in tab control
	Public Sub RenderTabInactiveHead()
		If AutoSession.This.IsPosting Then
			If AutoSession.This.IsConnected Then
				Call Response.Write("<img border=0 src='" & IDS_PATH_IMAGES_COMMON & IDS_IMG_TAB_CUSTOM_CONNECTED_OFF & "' alt='" & IDS_UI_TOOLTIP_SHARED_PROPERTY & "'>")
			Else
				Call Response.Write("<img border=0 src='" & IDS_PATH_IMAGES_COMMON & IDS_IMG_TAB_CUSTOM_OFF & "'>")
			End If
		Else
			Call Response.Write("<img border=0 src='" & IDS_PATH_IMAGES_COMMON & IDS_IMG_TAB_CUSTOM_OFF & "'>")
		End If
	End Sub

	'----[Public] Render a content in tab control
	Public Sub RenderTabContent()

		Dim pThisObject
		Set pThisObject = AutoSession.This

		' get the EOP collection object
		Dim pEops
		Set pEops = pThisObject.CustomProperties

		' create the Grid control to show the EOP list view.
		Dim pGridControl, pGridDecorator
		Set pGridControl = New CNCGridControl
		If (pThisObject.IsChannel) Then
			Set pGridDecorator = New CNCGridDecorator_ChannelEopList
		ElseIf (pThisObject.IsPosting) Then
			Set pGridDecorator = New CNCGridDecorator_PostingEopList
		Else
			' Something wrong, exit the function
			Exit sub
		End If

		' initial the Grid Control
		Call pGridControl.InitGridControl( IDS_CHANNEL_GRID_INSTANCE_ID, pGridDecorator, pEops, false )
		Call pGridControl.AddColumn( IDS_GRIDINDEX_NAME, False )
		Call pGridControl.AddColumn( IDS_GRIDINDEX_PROPS, False )
		Call pGridControl.AddColumn( IDS_GRIDINDEX_TYPE, False )
		If (pThisObject.IsPosting) Then
			Call pGridControl.AddColumn( IDS_GRIDINDEX_DEFAULT, False )
		End If
		Call pGridControl.AddColumn( IDS_GRIDINDEX_VALUE, False )

		pGridControl.ItemSpacing = 1
		pGridControl.ItemPadding = 3

		' Display the List view
		Call WBC_writeCustomTabHTML(pGridControl)
	End Sub
End Class
%>