<%
' ********************************************************************
' 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/Channel/
'			Common/CNCGridDecorator_ChannelEopList.inc
' Version: 	Microsoft Content Management Server
' Author:	Microsoft Corporation.
' Purpose:	Implements the INCGridDecorator Interface for the Page Revision History
'			display-as-list page
'
' Implement INCGridDecorator Interface:
'	- Sub RenderSubdivisionHeadTDAttrib( strColumnIndex )
'	- Sub RenderSubdivisionHeadTDContent( strColumnIndex )
'	- Sub RenderItemTDAttrib( pObject, nCollectionIndex, nDisplayIndex, strColumnIndex )
'	- Sub RenderItemTDContent( pObject, nCollectionIndex, nDisplayIndex, strColumnIndex )
'	- Sub SortCollection( strSortByColumn, colObjects, bAscending )
' ********************************************************************


Class CNCGridDecorator_ChannelEopList

	' ---- [Public] Render the column head <Tr> attributes
	Sub RenderColumnHeadTRAttrib()
		response.Write( IDS_UI_COLUMN_HEAD_BG_NS & " class='WBC_styclsBackground1' align='center'" )
	End Sub

	' ---- [Public] Render the column head <Tr> content
	Sub RenderItemTRAttrib( pObject, nCollectionIndex, nDisplayIndex )
		If (nDisplayIndex Mod 2 = 0) Then
			Response.Write( IDS_UI_COLUMN_ALTER_ROW_BG1_NS & " class='WBC_styclsAlternateRowBg1'" )
		Else
			Response.Write( IDS_UI_COLUMN_ALTER_ROW_BG2_NS & " class='WBC_styclsAlternateRowBg2'" )
		End If
	End Sub

	' ---- [Public] Render the column head <TD> attributes
	Public Sub RenderColumnHeadTDAttrib( strColumnIndex )

		Response.Write( "class='WBC_styclsHeavyTextColor3' align='center' valign='middle' " )
		Select Case strColumnIndex
			Case IDS_GRIDINDEX_NAME
				Response.Write("width='150'")
			Case IDS_GRIDINDEX_PROPS
				Response.Write("width='60'")
			Case IDS_GRIDINDEX_TYPE
				Response.Write("width='80'")
			Case IDS_GRIDINDEX_VALUE
				Response.Write("width='220'")
		End Select
	End Sub

	' --  -- [Public] Render the column head <TD> content
	Public Sub RenderColumnHeadTDContent( strColumnIndex )

		Response.Write( "<font " & IDS_UI_COLUMN_HEAD_TEXT_NS & " class='WBC_styclsHeavyTextColor3'>" )
		Select Case strColumnIndex
			Case IDS_GRIDINDEX_NAME
				Response.Write( "<nobr>" & IDS_UI_EOP_NAME & "</nobr>"  )
			Case IDS_GRIDINDEX_PROPS
				Response.Write( "<nobr>" & IDS_UI_EOP_PROPERTIES & "</nobr>"  )
			Case IDS_GRIDINDEX_TYPE
				Response.Write( "<nobr>" & IDS_UI_EOP_TYPE & "</nobr>" )
			Case IDS_GRIDINDEX_VALUE
				Response.Write( "<nobr>" & IDS_UI_EOP_VALUE & "</nobr>" )
		End Select
		Response.Write( "</font>" )
	End Sub

	' ---- [Public]
	Public Sub RenderItemTDAttrib( pObject, nCollectionIndex, nDisplayIndex, strColumnIndex )

		Response.Write( "class='WBC_styclsTextColor0' valign='middle' " )
		Select Case strColumnIndex
			Case IDS_GRIDINDEX_PROPS
				Response.Write( "align='center' " )
			Case IDS_GRIDINDEX_TYPE
				Response.Write( "align='center' " )
		End Select
	End Sub

	' ---- [Public]
	Public Sub RenderItemTDContent( pObject, nCollectionIndex, nDisplayIndex, strColumnIndex )
		Dim strEopId
		strEopId = IDS_TABLE_ITEM_NAME & nCollectionIndex

		Response.Write( "<font " & IDS_UI_COLUMN_ROW_TEXT_NS & " " & IDS_UI_COLUMN_FONT_SIZE_NS & " class='WBC_styclsTextColor0' & >" )
		Select Case strColumnIndex
			Case IDS_GRIDINDEX_NAME

				Response.Write("<input type='hidden' name='" & strEopId & "_name" & "'  value=""")
				Call WBC_writeMBCSEopName(pObject, false)
				Response.Write("""><nobr>")
				Call WBC_writeMBCSEopName(pObject, true)
				Response.Write("</nobr>")
			Case IDS_GRIDINDEX_PROPS

				Response.Write("<a href='#' onclick='WBC_onClickChannelModifyDialog(" & nCollectionIndex & "); " & _
					"return false;'><img border=0 src='" & IDS_PATH_IMAGES_COMMON & IDS_IMG_ICON_PROPS & "' width='16' height='16' border='0' alt=''></a>")
			Case IDS_GRIDINDEX_TYPE

				Response.Write("<input type='hidden' name='" & strEopId & "_type" & "'  value=""" & WBC_getEopType(pObject) & """>")
				Response.Write( "<nobr>" & WBC_getEopType(pObject) & "</nobr>" )
			Case IDS_GRIDINDEX_VALUE

				Response.Write("<input type='hidden' name='" & strEopId & "_value" & "' value=""")
				Call WBC_writeMBCSEopValue(pObject.Value)
				Response.Write("""><nobr><input type='text' ReadOnly onfocus='this.blur();' name='" & strEopId & "_label' value=""")
				Call WBC_writeMBCSEopValue(pObject.Value)
				Response.Write(""" size='" & WBC_getNumOfCols() & "' " & IDS_TABLE_ITEM_STYLE & " on></nobr>")
		End Select
		Response.Write( "</font>" )
	End Sub

	' ---- [Public] Render the Grid content area when there are no items to show
	Public Sub RenderEmptyGrid()
		Response.Write( "<span class='WBC_styclsTextColor1'>There are no Custom Properties in this Channel</span>" )
	End Sub

	' ---- [Public] Gives Decorator a chance to sort the collection
	Public Sub SortCollection( strSortByColumn, colObjects, bAscending )
		' do nothing
	End Sub

	' ---- [Private] Write the hidden field for a specified property item
	Private Function WBC_getNumOfCols()
		If isIE Then
			WBC_getNumOfCols = 50
		Else
			WBC_getNumOfCols = 40
		End If
	End Function

End Class

%>