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

<%
' ************************************************************************
' File:		/NR/System/WBC/Internals/WBCFuncPages/Cross-Browser/
'				TaskAssistant/ApprovalAssistant/ApprovalsAssistant.asp
' Author:	Microsoft Corporation.
' Purpose:	Display a list of pages that are currently waiting for
'			approval by the user. The information that is displayed
'			includes the name of the page waiting for approval
'			(checked-out), the location (channel path), status, owner, and
'			the date the page was last modified.
'
' Query String Parameters:
'
'	[API-Generated-Query-Params]:
'		This set of parameters is generated by invoking the API method
'		Posting.QueryString in the previous ASP page. It contains all the
'		necessary information to be interpreted by the API to set the
'		AutoSession.This object in this ASP page.
'
'	IDS_QPARAM_TIMESTAMP_NAME
'		This query string parameter is passed to the page from the
'		PagesApproveDecline.ASP page to enforce uniqueness on the URL
'		so that the cached version of the page is not used. This query
'		string is not propagated to other pages.
'
'	IDS_QPARAM_PAGESTATUS_NAME
'		This query string is passed to the page from the
'		PagesApproveDecline.ASP page to indicate that an approve or
'		decline operation has just been performed and that the page
'		control should be reset to the first page.
'
' Expected Form Data:
'
'		None.
'
' ************************************************************************

' we can only run in update or unpublished mode
if (AutoSession.IsModeUpdate = false) AND (AutoSession.IsModeUnpublished = false) then
	Response.End
end if

' initialize the ASPPageManager. This server control will take care of all of
' the initialization code for setting up the grid control, grabbing query
' strings, etc.
Dim g_pASPPageManager
Set g_pASPPageManager = New CNCASPPageManager_ApprovalAssistant
Call g_pASPPageManager.InitManager()

Dim pASPUtils
Set pASPUtils = g_pASPPageManager.ASPUtils
%>

<!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 a list of pages pending approval from the user">
<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/TasksAssistant/ApprovalAssistant/ApprovalAssistantClient.js"
		type="text/javascript">
</script>

</head>

<body <%= IDS_BODYSETTING %> class="<%= IDS_CSS_APPROVALASSISTANT_NORMALTEXT0 %>">

<form name="<%= IDS_FORM_APPROVALASSISTANT %>" action="PagesApproveDecline/PagesApproveDecline.asp?<%=g_pASPPageManager.FilteredQueryString%>" method="post" enctype="multipart/form-data">

<!--
	WARNING:
	========
	For the following HTML that has <td><img src=...></td>,
	do NOT break them into separate lines as it will alter
	the layout of the rendered page
-->


<!-- hidden form element to pass action (approve/decline) to server -->
<input type="hidden" name="<%=IDS_FORM_ELEMENT_APPROVEORDECLINE%>" value="">


<table height="90%" width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr valign="top">
		<td>
			<table width="100%" border="0" cellspacing="0" cellpadding="0">

				<!-- Show the top title -->
				<tr class="<%= IDS_CSS_APPROVALASSISTANT_BACKGROUND1 %>">
					<td align=right><img border=0 src="<%= IDS_PATH_IMAGE_LOGO %>"></td>
					<td width=100% valign="middle"  class="<%= IDS_CSS_APPROVALASSISTANT_HEADERTEXT %>"><%= IDS_UI_APPROVALASSISTANT_TITLE %></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="<%= IDS_CSS_APPROVALASSISTANT_BACKGROUND2 %>">
					<td><img src="<%= IDS_TRANSPARENT_GIF %>" width="<%= C_INT_MAIN_MARGIN %>" height="<%= C_INT_SUBHEAD_HEIGHT %>" border="0"></td>
					<td class="<%= IDS_CSS_APPROVALASSISTANT_SUBHEADTEXT %>"><%= IDS_UI_APPROVALASSISTANT_DESC %></td>
					<td><img src="<%= IDS_TRANSPARENT_GIF %>" width="<%= C_INT_MAIN_MARGIN %>" height="<%= C_INT_SUBHEAD_HEIGHT %>" border="0"></td>
				</tr>

				<!-- Insert a spacer image -->
				<tr>
					<td colspan=3><img src="<%=IDS_TRANSPARENT_GIF%>" width="15" height="<%= C_INT_MAIN_SPACING %>" 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>

				<!-- Show area displaying information about whose pages are displayed  -->
				<tr>
					<td class="<%= IDS_CSS_APPROVALASSISTANT_BACKGROUND1 %>">
						<table width="100%" border="0" cellspacing="<%= C_INT_THICK_BORDER %>" cellpadding="5">
							<tr class="<%= IDS_CSS_APPROVALASSISTANT_BACKGROUND3 %>">
								<td>
									<span class="<%= IDS_CSS_APPROVALASSISTANT_HEAVYTEXT1 %>"><%= IDS_UI_LABEL_PAGESWAITINGFOR %></span>&nbsp;&nbsp;
									<span class="<%= IDS_CSS_APPROVALASSISTANT_NORMALTEXT1 %>"><% Call pASPUtils.MBCSWrite( pASPUtils.HTMLEncode( g_pASPPageManager.UserShortname ), g_pASPPageManager.CodePage ) %></span>
								</td>
							</tr>
						</table>
					</td>
				</tr>

				<!-- Insert a spacer image -->
				<tr>
					<td colspan=3><img src="<%=IDS_TRANSPARENT_GIF%>"
						width="15" height="<%= C_INT_MAIN_SPACING %>" border="0"></td>
				</tr>

				<!-- Display info about subset of pages being shown and the PagingConfigControl -->
				<tr>
					<td width="100%" align="right">
						<table width=100% border=0 cellspacing=0 cellpadding=0>
							<tr>
								<td width=50% align=left  class="<%= IDS_CSS_APPROVALASSISTANT_NORMALTEXT0 %>">
									<%=  IDS_UI_LABEL_ITEMSSHOWN  %> <b> <%= g_pASPPageManager.StartItem %> - <%= g_pASPPageManager.EndItem %>  </b><%= IDS_UI_LABEL_OF %> <b><%= g_pASPPageManager.PagesToApprove.Count %></b>
								</td>
								<td width=50% align=right class="<%= IDS_CSS_APPROVALASSISTANT_NORMALTEXT0 %>">
									<%= IDS_UI_LABEL_ITEMSPERPAGE %>&nbsp;
									<% Call g_pASPPageManager.PagingConfigControl.DisplayPagingConfigControl() %>
								</td>
							</tr>
						</table>
					</td>
				</tr>

				<!-- Insert a set of spacer images -->
				<tr>
					<td><img src="<%=IDS_TRANSPARENT_GIF%>" width="15" height="<%=C_INT_MINOR_SPACING%>"></td>
				</tr>
				<tr>
					<td class="<%= IDS_CSS_APPROVALASSISTANT_BACKGROUND1 %>"><img src="<%=IDS_TRANSPARENT_GIF%>" width="15" height="<%= C_INT_SEPARATOR_HEIGHT %>"></td>
				</tr>
				<tr>
					<td><img src="<%=IDS_TRANSPARENT_GIF%>"	width="15" height="<%= C_INT_MAIN_SPACING %>" border="0"></td>
				</tr>

				<!-- Show the list of pages in production -->
				<tr>
					<td><% Call g_pASPPageManager.GridControl.DisplayGrid() %></td>
				</tr>

				<!-- Show the Check All and Clear All Buttons -->
				<tr>
					<td class="<%= IDS_CSS_APPROVALASSISTANT_NORMALTEXT0 %>">
						<a href="#" onclick="WBC_checkAllPostings( true );return false"><%= IDS_UI_LABEL_SELECTALL %></a>
						&nbsp;
						<a href="#" onclick="WBC_checkAllPostings( false );return false"><%= IDS_UI_LABEL_CLEARALL %></a>
					</td>
				</tr>

				<!-- Insert a spacer image -->
				<tr>
					<td><img src="<%=IDS_TRANSPARENT_GIF%>" width="15" height="<%=C_INT_MINOR_SPACING%>"></td>
				</tr>

				<!-- Show the Approve and Decline Buttons -->
				<tr>
					<td>
						<!-- Show the "Approve" button -->
						<%	If ( g_pASPPageManager.ApproveButtonEnabled = True ) Then %>

								<a target="_self" href="#" onclick="WBC_processApproveDeclineAction('<%= IDS_FORM_ELEMENT_APPROVEORDECLINE_VALUE_APPROVE %>' );return false">
								<img src="<%= IDS_PATH_IMAGES_COMMON_BUTTONS & IDS_IMG_BUTTON_APPROVE %>" name="NC_PostingAppove" border="0" alt="<%= IDS_UI_TOOLTIP_APPROVE %>"></a>

						<%	Else %>

								<img src="<%= IDS_PATH_IMAGES_COMMON_BUTTONS & IDS_IMG_BUTTON_APPROVE %>" name="NC_PostingDecline" border="0" alt="<%= IDS_UI_TOOLTIP_APPROVE %>"></a>

						<%	End If %>

						&nbsp;&nbsp;

						<!-- Show the "Decline" button -->
						<%	If ( g_pASPPageManager.DeclineButtonEnabled = True) Then %>

								<a target="_self" href="#" onclick="WBC_processApproveDeclineAction('<%= IDS_FORM_ELEMENT_APPROVEORDECLINE_VALUE_DECLINE %>' );return false">
								<img src="<%= IDS_PATH_IMAGES_COMMON_BUTTONS & IDS_IMG_BUTTON_DECLINE %>" border="0"></a>

						<%	Else %>

								<img src="<%= IDS_PATH_IMAGES_COMMON_BUTTONS & IDS_IMG_BUTTON_DECLINE %>"

						<%	End If %>
					</td>
				</tr>

				<!-- Insert a spacer image -->
				<tr>
					<td><img src="<%= IDS_TRANSPARENT_GIF %>" width="15" height="<%= C_INT_XSMALL_SPACING %>" border="0"></td>
				</tr>

			</table>

		</td>

	</tr>

</table>


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

<table height="10%" width="100%" border="0" cellspacing="0" cellpadding="0">

	<!-- Show the paging index link -->
	<tr valign="top">
		<td align=center class="<%= IDS_CSS_APPROVALASSISTANT_NORMALTEXT0 %>">
			<% Call g_pASPPageManager.PagingControl.DisplayPagingLinks() %>
		</td>
	</tr>
</table>

<%	End If %>


</form>

</body>

</html>

