<%
' ********************************************************************
' 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/
'				PageCreationWizard/TemplateGalleriesBrowse/CNCStateRenderer_ViewAsTreeOrList.inc
' Version: 	Microsoft Content Management Server
' Author:	Microsoft Corporation.
' Purpose:	Responsible for Displaying Content Management Server hierarchy tree
'
' Implements the INCStateRenderer Callback Interface of CNCStateControl
'	- Sub RenderState( strStateID, strRoundTripURL, bIsCurrent )
' ********************************************************************



Class CNCStateRenderer_ViewAsTreeOrList

	' -------------------------------------------------------------------------
	'
	'	This subroutine renders the "View As Tree" or "View As List" links
	'	used in ASP pages listing Resource Galleries.
	'
	'	@param strStateID [in] - a unique state identifier that represents a
	'				state that the CNCStateControl was told to keep track of.
	'
	'	@param strRoundTripURL [in] - the URL which will lead to the state
	'				as specified by strStateID.
	'
	'	@param bIsCurrent [in] - whether the state specified by strStateID is
	'				the current state in the ASP page
	'
	' -------------------------------------------------------------------------
	Public Sub RenderState( strStateID, strRoundTripURL, bIsCurrent )
		' display the link that leads to the alternate state
		If (Not bIsCurrent) Then
			Response.Write( "<a href='" & strRoundTripURL & "'>" )

			Select Case strStateID
				Case IDS_STATE_PAGECREATIONWIZARD_VIEWAS_TREE
					Response.Write( IDS_UI_VIEW_AS_TREE )
				Case IDS_STATE_PAGECREATIONWIZARD_VIEWAS_LIST
					Response.Write( IDS_UI_VIEW_AS_LIST )
			End Select

			Response.Write( "</a>" )
		End If

	End Sub

End Class

%>
