<%@ Register TagPrefix="WebAuthor" Namespace="Microsoft.ContentManagement.WebAuthor" Assembly="Microsoft.ContentManagement.WebAuthor" %>
<%@ Register tagprefix="WebAuthor" Tagname="DialogTitle" Src="..\..\..\Controls\DialogTitle.ascx" %>
<%@ Page language="c#" Codebehind="TemplateGalleriesBrowse.aspx.cs" AutoEventWireup="false" Inherits="Microsoft.ContentManagement.WebAuthor.TemplateGalleriesBrowse" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>
			<%= IDS_UI_BROWSER_TITLE %>
		</title>
		<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
		<meta content="Microsoft Visual Studio 7.0" name="GENERATOR">
		<meta content="C#" name="CODE_LANGUAGE">
		<meta content="JavaScript" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
		<%=EmbedHeadSection()%>
	</HEAD>
	<BODY class=WBC_styclsTextColor0 bgColor="<%=IDS_BODYSETTING_BGCOLOR %>" 
                                    leftMargin="<%=IDS_BODYSETTING_LEFTMARGIN%>" 
                                    topMargin="<%= IDS_BODYSETTING_TOPMARGIN %>">
		<FORM id="TemplateGalleriesBrowse" method="post" runat="server">
			<table cellSpacing="0" cellPadding="0" width="100%" border="0">
				<!-- Set Dialog Title-->
				<tr>
					<td colspan="3">
						<WebAuthor:DialogTitle ID="title" runat="server"></WebAuthor:DialogTitle>
					</td>
				</tr>
				<!-- Define a margin -->
				<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 height=1 src="<%=IDS_TRANSPARENT_GIF%>" width="<%= C_INT_MAIN_MARGIN %>" border=0></td>
					<td><img height=1  src="<%=IDS_TRANSPARENT_GIF%>" width="100%" border=0 ></td>
					<td rowSpan="999"><img height=1  src="<%=IDS_TRANSPARENT_GIF%>" width="<%= C_INT_MAIN_MARGIN %>"  border=0></td>
				</tr>
				<!-- Write the status box -->
				<tr>
					<td>
						<WebAuthor:StatusBox ID="statusbox" runat="server"></WebAuthor:StatusBox>
					</td>
				</tr>
				<!-- Define a margin -->
				<tr>
					<td colspan="3"><img src="<%=IDS_TRANSPARENT_GIF%>"   width="15" height="<%= C_INT_MAIN_SPACING %>" border="0"></td>
				</tr>
				<!-- Write the "View As Tree" or "View as List" selector -->
				<tr>
					<td align="left" width="100%">
						<asp:DropDownList Runat="server" id="GalleriesViewSelect" AutoPostBack="True">
							<asp:ListItem Value="View As List" Selected="True">View As List</asp:ListItem>
							<asp:ListItem Value="View As Tree">View As Tree</asp:ListItem>
						</asp:DropDownList>
					</td>
				</tr>
				<tr>
					<td><img src="<%=IDS_TRANSPARENT_GIF%>"
        				width="15" height="<%= C_INT_MAIN_SPACING %>" border="0"></td>
				</tr>
				<asp:PlaceHolder Runat="server" ID="GalleriesGridInfo">
					<!-- Display info about subset 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="WBC_styclsTextColor0">
										<asp:Literal id="ItemsInfo" runat="server" />
									</td>
									<td width="50%" align="right" class="WBC_styclsTextColor0">
										<asp:Literal ID="ItemsPerPage" Runat="server" />
										&nbsp;
										<asp:DropDownList id="PagingConfigControl" AutoPostBack="True" OnSelectedIndexChanged="ChangePagingConfig" runat="server" />
									</td>
								</tr>
							</table>
						</td>
					</tr>
					<tr>
						<td><img src="<%=IDS_TRANSPARENT_GIF%>"
							width="15" height="<%=C_INT_XSMALL_SPACING%>" border="0"></td>
					</tr>
				</asp:PlaceHolder>
				<!-- Display Separator -->
				<tr>
					<td class="WBC_styclsBackground1"><img src="<%=IDS_TRANSPARENT_GIF%>"  width="15" height="<%=C_INT_SEPARATOR_HEIGHT%>"></td>
				</tr>
				<!-- Define a margin -->
				<tr>
					<td><img src="<%=IDS_TRANSPARENT_GIF%>"   width="15" height="<%= C_INT_MAIN_SPACING %>" border="0"></td>
				</tr>
				<!-- Show the Template Galleries as List -->
				<tr>
					<td>
						<asp:PlaceHolder Runat="server" ID="GalleriesTree">
							<table width="100%">
								<tr>
									<td>
										<WebAuthor:TemplateGalleryTree id="TemplateGalleryTree1" runat="server">
											<TemplateGalleryTemplate>
            									<A href="<%# DataBindGalleryUrl(Container.TemplateGallery) %>">
													<%# DataBindGalleryName(Container.TemplateGallery) %>
												</A>
            									            &nbsp;&nbsp;(<%# DataBindGalleryItemCount(Container.TemplateGallery)%>)
            								</TemplateGalleryTemplate>
										</WebAuthor:TemplateGalleryTree>
									</td>
								</tr>
							</table>
						</asp:PlaceHolder>
						<asp:PlaceHolder Runat="server" ID="GalleriesGrid">
							<WebAuthor:CustomDataGrid id="TemplateGalleriesGrid" runat="server" AutoGenerateColumns="False" AllowSorting="True" OnSortCommand="SortGrid" AllowPaging="True" PagerStyle-HorizontalAlign="Center" OnPageIndexChanged="ChangeGridPage" GridLines="None">
								<COLUMNS>
									<ASP:TEMPLATECOLUMN>
										<ITEMTEMPLATE>
                                            <nobr><a id='Gallery1_<%#DataBindGalleryGuid(Container.DataItem)%>' href='<%#DataBindGalleryUrl(Container.DataItem)%>'>
													<img border='0' src='<%# IDS_PATH_IMAGES_COMMON_ICONS + IDS_IMG_ICON_OPENED_TEMPLATE_GALLERY%>'>
												</a>
												<!--&nbsp;&nbsp;-->
												<a id='Gallery2_<%#DataBindGalleryGuid(Container.DataItem)%>' href='<%#DataBindGalleryUrl(Container.DataItem)%>'>
													<%#DataBindGalleryName(Container.DataItem)%>
												</a><span class='WBC_styclsSmallTextColor0'>(<%#DataBindGalleryItemCount(Container.DataItem)%>)</span>
											</nobr>
    										</asp:Literal>
    									</ITEMTEMPLATE>
									</ASP:TEMPLATECOLUMN>
									<ASP:TEMPLATECOLUMN>
										<ITEMTEMPLATE>
											<asp:Literal id=Literal2 runat="server" Text="<%# DataBindLocationColumn(Container.DataItem) %>">
											</asp:Literal>
										</ITEMTEMPLATE>
									</ASP:TEMPLATECOLUMN>
									<ASP:TEMPLATECOLUMN>
										<ITEMTEMPLATE>
											<asp:Literal id=Literal3 runat="server" Text="<%# DataBindLastModifiedColumn(Container.DataItem) %>">
											</asp:Literal>
										</ITEMTEMPLATE>
									</ASP:TEMPLATECOLUMN>
								</COLUMNS>
							</WebAuthor:CustomDataGrid>
						</asp:PlaceHolder>
					</td>
				</tr>
			</table>
		</FORM>
	</BODY>
</HTML>
