<!--#include file="CNCASPPageManager_ResourceProperties.inc" -->

<%
' ********************************************************************
' File:		/NR/System/WBC/Internals/WBCFuncPages/Cross-Browser/ResourceBrowser/Management/ResourcePropertiesShow.asp
' Author:	Microsoft Corporation.
' Purpose:	Display Properties of a resource.
'
' Query String Parameters:
'	IDS_QPARAM_RESOURCE: Guid of the resource selected
'
' ********************************************************************


' ---- Initialize the ASPPageManager
Dim g_pASPPageManager
Set g_pASPPageManager = New CNCASPPageManager_ResourceProperties
Call g_pASPPageManager.InitManager()

Dim pASPUtils
Set pASPUtils = g_pASPPageManager.ASPUtilsObject
%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="-1">
<meta name="Author" content="Microsoft Corporation.">
<meta name="Description" content="Display Properties page for a Resource">
<meta name="robots" content="NOINDEX,NOFOLLOW">
<meta http-equiv="Content-Type" content="text/html;charset=<%= g_pASPPageManager.Charset %>">
<title><%= IDS_UI_BROWSER_TITLE %></title>
<% Call EmbedWBCHeadSection %>
<script language="JavaScript"
		src="/NR/System/WBC/Internals/WBCFuncPages/Cross-Browser/ResourceBrowser/Management/ResourceProperties.js"
		type="text/javascript"></script>
<script language="JavaScript"
		type="text/javascript">
<!--
	function WBC_CopyNameToDisplayName()
	{
		document.forms["NC_PropertiesForm"].NC_intxtDisplayName.value = document.forms["NC_PropertiesForm"].NC_intxtName.value;
		return false;
	}


//-->
</script>

<%	If (g_pASPPageManager.Error <> "") Then %>

<body <%= IDS_BODYSETTING %> onload='self.focus()'>

<%	Else %>

<!-- call on WBC_onLoadHandler to initialize some global settings in .js -->
<!-- It will stored the existing resource value into the global variables for checking versioning -->
<body <%= IDS_BODYSETTING %>
	onload='self.focus();WBC_onLoadHandler(<%= Bool2LCaseStr(g_pASPPageManager.Resource.CanSetProperties) %>)'>

<%	End If %>


<!-- true in WBC_validateResouce means want to validate the display text as well -->
<form name="NC_PropertiesForm"
	  action="<%= g_pASPPageManager.URLFormPostAction %>"
	  method="post"
	  enctype="multipart/form-data"
	  onsubmit='return WBC_validateResource(true)'>


<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<!-- Show the Top Title -->
	<tr class="WBC_styclsBackground1">
		<td align=right><img border=0 src="<%=IDS_PATH_IMAGE_LOGO %>"></td>
		<td width=100% valign="middle"  class="WBC_styclsHeaderText">
			<%= IDS_UI_RESOURCE_MANAGER %>
		</td>
		<td><img src="<%=IDS_TRANSPARENT_GIF%>"
					width="<%= C_INT_MAIN_MARGIN %>" height="<%=C_INT_HEADER_HEIGHT%>" border="0"></td>
	</tr>

	<!-- Show the breadcrumb trail -->
	<tr class="WBC_styclsBackground2">
		<td><img src="<%=IDS_TRANSPARENT_GIF%>"
			width="<%= C_INT_MAIN_MARGIN %>" height="<%=C_INT_SUBHEAD_HEIGHT%>" border="0"></td>
		<td class="WBC_styclsSubheadText">
			<%= IDS_UI_RESOURCE_PROPERTIES %>
		</td>
		<td><img src="<%=IDS_TRANSPARENT_GIF%>"
			width="<%= C_INT_MAIN_MARGIN %>" height="<%=C_INT_SUBHEAD_HEIGHT%>" border="0"></td>
	</tr>

	<!-- Set the margin width for the rest of the page -->
	<tr>
		<td rowspan="999"><img src="<%=IDS_TRANSPARENT_GIF%>"
					width="<%= C_INT_MAIN_MARGIN %>" height="1" border="0"></td>
		<td><img src="<%=IDS_TRANSPARENT_GIF%>"
					width="100%" height="1" border="0"></td>
		<td rowspan="999"><img src="<%=IDS_TRANSPARENT_GIF%>"
					width="<%= C_INT_MAIN_MARGIN %>" height="1" border="0"></td>
	</tr>

	<tr>
		<td><img src="<%=IDS_TRANSPARENT_GIF%>"
			width="15" height="<%= C_INT_MAIN_SPACING %>" border="0"></td>
	</tr>

<%	If (g_pASPPageManager.Error = IDS_ERR_RESOURCE_NOT_FOUND) Then %>

	<!-- Display the fact that Resource Is Nothing -->
	<tr>
		<td class="WBC_styclsBackground1">
			<table width="100%" border="0" cellspacing="<%= C_INT_THICK_BORDER %>" cellpadding="5">
				<tr class="WBC_styclsBackground2">
					<td>
						<span class="WBC_styclsFuncPageContextLabelText"><%= IDS_UI_RESOURCE %>:</span>&nbsp;&nbsp;
						<span class="WBC_styclsTextColor1"><%= IDS_UI_RESOURCE_NOT_FOUND %></span>
					</td>
				</tr>
			</table>
		</td>
	</tr>

<%	Else %>

	<!-- Show area displaying info about current object -->
	<tr>
		<td class="WBC_styclsBackground1">
			<table width="100%" border="0" cellspacing="<%= C_INT_THICK_BORDER %>" cellpadding="5">
				<tr class="WBC_styclsBackground2">
					<td>
						<span class="WBC_styclsHeavyTextColor1"><%= IDS_UI_RESOURCE %>:</span>&nbsp;&nbsp;
						<span class="WBC_styclsTextColor1">
							<%
								Call pASPUtils.MBCSWrite( pASPUtils.HTMLEncode(g_pASPPageManager.Resource.Parent.Path), g_pASPPageManager.CodePage)
								Call pASPUtils.MBCSWrite( pASPUtils.HTMLEncode(g_pASPPageManager.Resource.DisplayName), g_pASPPageManager.CodePage)
							%>
						</span>
					</td>
				</tr>
			</table>
		</td>
	</tr>

	<!-- Show the Content area -->
	<tr>
		<td><img src="<%=IDS_TRANSPARENT_GIF%>"
			width="15" height="<%= C_INT_MAIN_SPACING %>" border="0"></td>
	</tr>
	<tr>
		<td valign="top" class="WBC_styclsBackground1">
			<table width="100%" border="0" cellspacing="2" cellpadding="5" >
				<tr class="WBC_styclsBackground2">
					<td valign="top" >
						<table width="100%" border="0" cellspacing="0" cellpadding="5" >

							<!-- Render Mime-type -->
							<tr valign="top">
								<td class="WBC_styclsHeavyTextColor1"><%= IDS_UI_LABEL_TYPE %></td>
								<td class="WBC_styclsTextColor1"><%= g_pASPPageManager.Resource.MIMEType %>
								<td>&nbsp;</td>
							</tr>

							<!-- Render URL name -->
							<tr valign="top">
								<td class="WBC_styclsHeavyTextColor1" width="30%"><%= IDS_UI_LABEL_URLNAME%></td>
								<td class="WBC_styclsTextColor1" width="30%">
									<% Call WriteResourceURLNameField(g_pASPPageManager.Resource.CanSetProperties, g_pASPPageManager.Resource) %>
								</td>
								<td>&nbsp;</td>
							</tr>

							<!-- Render Display name -->
							<tr valign="top">
								<td class="WBC_styclsHeavyTextColor1"><%= IDS_UI_LABEL_DISPLAYNAME %></td>
								<td class="WBC_styclsTextColor1"><% Call WriteResourceDisplayNameDataHTML(g_pASPPageManager.Resource.CanSetProperties, g_pASPPageManager.Resource.Parent, g_pASPPageManager.Resource) %></td>
								<td>
									<%If g_pASPPageManager.Resource.CanSetProperties then %>
										<a href="#" onclick="return WBC_CopyNameToDisplayName() ">
										<img name="NC_Reset" alt="<%=IDS_UI_TOOLTIP_RESET%>" border="0" src="<%=IDS_RESOURCEBROWSER_IMG_PATH%><%=IDS_IMG_BTN_OFF_RESET%>"></a>
									<% Else %>
										<img name="NC_Reset" alt="<%=IDS_UI_TOOLTIP_RESET%>" border="0" src="<%=IDS_RESOURCEBROWSER_IMG_PATH%><%=IDS_IMG_BTN_OFF_RESET%>">
									<%End if%>
								</td>
							</tr>

							<!-- Render Description -->
							<tr valign="top">
								<td class="WBC_styclsHeavyTextColor1"><%= IDS_UI_LABEL_DESCRIPTION %></td>
								<td class="WBC_styclsTextColor1"><% Call WriteResourceDescriptionDataHTML(g_pASPPageManager.Resource.CanSetProperties, g_pASPPageManager.Resource.Parent, g_pASPPageManager.Resource) %></td>
								<td>&nbsp;</td>
							</tr>

							<tr>
								<td colspan="2">&nbsp;</td>
							</tr>

						</table>
					</td>
				</tr>
			</table>
		</td>
	</tr>

<%	End If %>

	<tr>
		<td><img src="<%=IDS_TRANSPARENT_GIF%>"
			width="15" height="<%= C_INT_MAIN_SPACING %>" border="0"></td>
	</tr>

	<tr>
		<td align="right">
			<a href="#" onclick="WBC_onOkayHandler('<%= g_pASPPageManager.URLFormPostAction %>'); return false;">
				<img name="NCImg_Confirm" src="<%=IDS_RESOURCEBROWSER_IMG_PATH%><%=IDS_IMG_BTN_OKAY%>" border="0" alt="OK"></a>
			&nbsp;&nbsp;&nbsp;
			<a href="#" onclick="window.close(); return false;">
				<img name="NCImg_Cancel" src="<%=IDS_RESOURCEBROWSER_IMG_PATH%><%=IDS_IMG_BTN_CANCEL%>" border="0" alt="Cancel"></a>
		</td>
	</tr>

</table>

</form>

</body>
</html>
