<%
' ********************************************************************
' 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/ResourceBrowser/Authoring/
'				/CNCListRenderer_ResourcesBrowse.inc
' Version: 	Microsoft Content Management Server
' Author:	Microsoft Corporation.
' Purpose:	Responsible for Displaying Content Management Server hierarchy tree
'
' Implement NCLCRenderer Interface:
'	- Sub RenderSubdivisionHeadTDAttrib( nSubdivisionIndex )
'	- Sub RenderSubdivisionHeadTDContent( nSubdivisionIndex )
'	- Sub RenderItemTDAttrib( pObject, nCollectionIndex, nDisplayIndex, nSubdivisionIndex )
'	- Sub RenderItemTDContent( pObject, nCollectionIndex, nDisplayIndex, nSubdivisionIndex )
' ********************************************************************



Class CNCListRenderer_VideoResourcesBrowse

	' ---- [Public]
	Public Sub RenderSubdivisionHeadTDAttrib( nSubdivisionIndex )
	End Sub

	' ---- [Public]
	Public Sub RenderSubdivisionHeadTDContent( nSubdivisionIndex )
		Response.Write( "</font></b>" )
	End Sub

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

	' ---- [Public]
	Public Sub RenderItemTDContent( pObject, nCollectionIndex, nDisplayIndex, nSubdivisionIndex )
		Dim strSelectResURL
		Dim pASPUtils
		Dim lCodePage

		Set pASPUtils = GetInitializedASPUtils()
		lCodePage = GetCodePageForResource (g_pASPPageManager.ResourceGallery, pASPUtils )

		Response.write( "<table border=0 width=100% cellpadding=0 cellspacing=5><tr>" )

		' -- rendering the Thumbnail and magnifying glass
		Response.write( "<td valign=top width=80>" )

		Response.write("<a href='#' onClick='WBC_openWindowOnFocus(""" & pObject.Url & """,IDS_WIN_PREVIEW, WBC_getPoppedUpWindowFeatures(IDS_WIN_PREVIEW_FEATURES, window.top));")
		Response.write("return false;'>")

		Response.write( "<img src='" & pObject.URLThumbnail & "'" & "alt='" )
		Call pASPUtils.MBCSWrite(pASPUtils.HTMLEncode(pObject.DisplayName), lCodePage)
		Response.write( "' border='0'></a></td>" )

		' -- render the DisplayName and Size
		Response.write( "<td><table border=0 cellpadding=0 cellspacing=0><tr>" )
		Response.write( "<td>")
		Response.write("<a href='#' onClick='WBC_openWindowOnFocus(""" & pObject.Url & """,IDS_WIN_PREVIEW, WBC_getPoppedUpWindowFeatures(IDS_WIN_PREVIEW_FEATURES, window.top));")
		Response.write("return false;'>")

		Response.write( "<img alt='" & IDS_UI_TOOLTIP_PREVIEW & "' border='0' src='" & IDS_PATH_IMAGES_COMMON & IDS_IMG_ICON_PREVIEW & "'></a>" )
		Response.write( "&nbsp;<span class='WBC_styclsTextColor0'>" )
		Call pASPUtils.MBCSWrite( pASPUtils.HTMLEncode(pObject.DisplayName), lCodePage )
		Response.write( "</span>&nbsp;&nbsp;" )
		Response.write( "<span class='WBC_styclsSmallTextColor0'>" & RoundUp(pObject.Size / 1024) & "k" & "</span></td></tr>" )

		' -- render spacing before Last Modified Date row
		Response.write( "<tr><td height=5><img border=0 src='" & IDS_TRANSPARENT_GIF & "'></td></tr>" )

		' -- render the LastModifiedDate
		Response.write( "<tr><td class='WBC_styclsSmallTextColor0'><nobr>" )
		Response.write( IDS_UI_LABEL_LASTMOD & ": " )
%>
		<script language="JavaScript" type="text/javascript">
		<!--
			WBC_writeUTC2Local( "<%= FormatDate(pObject.LastModifiedDate) %>" );
		// -->
		</script>
<%
		' -- render spacing before select icon
		Response.write("<tr><td height=10><img border=0 src='" & IDS_TRANSPARENT_GIF & "'></td></tr>")

		' -- render the select icon
		Response.write("<tr><td><nobr>")
		%>
		<a href="#" onclick="WBC_procsVideo('<%= g_pASPPageManager.PlaceholderName %>', '<%= g_pASPPageManager.PlaceholderType %>', '<%= pObject.Url %>', <%= Bool2LCaseStr(g_pASPPageManager.ImageTag) %> ); return false;">
		<%
		Response.write( "<img alt='" & IDS_UI_TOOLTIP_SELECT & "' border='0' src='" & IDS_PATH_IMAGES_COMMON & IDS_IMG_ICON_SELECT & "'></a>" )
		Response.write( "</nobr></td></tr></table>" )

		Response.write( "</tr></table>" )
	 End Sub

End Class

%>