<%@ Register TagPrefix="WebAuthor" Namespace="Microsoft.ContentManagement.WebAuthor" Assembly="Microsoft.ContentManagement.WebAuthor" %>
<%@ Control Language="c#" AutoEventWireup="false" Codebehind="ResourceGalleriesGrid.ascx.cs" Inherits="Microsoft.ContentManagement.WebAuthor.ResourceGalleriesGrid" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
<table width="100%" border=0>
	<TBODY>
		<!-- 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="<%=(((DialogBase)Page).IDS_TRANSPARENT_GIF)%>"
				width="15" height="<%= DialogBase.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 align="right" width="100%">
					<TABLE cellSpacing="0" cellPadding="0" width="100%" border="0">
						<TR>
							<TD class="WBC_styclsTextColor0" align="left" width="50%">
								<asp:Literal id="ItemsInfo" runat="server"></asp:Literal></TD>
							<TD class="WBC_styclsTextColor0" align="right" width="50%">
								<asp:Literal id="ItemsPerPage" Runat="server"></asp:Literal>&nbsp;
								<asp:DropDownList id="PagingConfigControl" runat="server" OnSelectedIndexChanged="ChangePagingConfig" AutoPostBack="True"></asp:DropDownList></TD>
						</TR>
					</TABLE>
				</TD>
			</TR>
			<TR>
				<TD><IMG height="<%=DialogBase.C_INT_XSMALL_SPACING%>" 
						  src="<%=(((DialogBase)Page).IDS_TRANSPARENT_GIF)%>" width=15 
							border=0></TD>
			</TR>
		</asp:PlaceHolder>
	<!-- Display Separator -->
	<tr>
		<td class="WBC_styclsBackground1"><img width="15" src="<%=(((DialogBase)Page).IDS_TRANSPARENT_GIF)%>" height="<%=DialogBase.C_INT_SEPARATOR_HEIGHT%>"></td>
	</tr>
	<!-- Define a margin -->
	<tr>
		<td><img src="<%=(((DialogBase)Page).IDS_TRANSPARENT_GIF)%>" width="15" height="<%= DialogBase.C_INT_MAIN_SPACING %>" border="0"></td>
	</tr>
	<!-- Show the List or Tree -->
	<tr>
		<td>
			<asp:PlaceHolder Runat="server" ID="GalleriesTree">
				<table width="100%">
					<tr>
						<td>
							<WebAuthor:ResourceGalleryTree id="ResourceGalleryTree1" runat="server">
								<ResourceGalleryTemplate>
									<A href="<%# DataBindResourceGalleryUrl(Container.ResourceGallery) %>">
											<%# DataBindResourceGalleryName(Container.ResourceGallery) %>
										</A>&nbsp;&nbsp;(<%# DataBindResourceGalleryItemCount(Container.ResourceGallery)%>)
								</ResourceGalleryTemplate>
							</WebAuthor:ResourceGalleryTree>
						</td>
					</tr>
				</table>
			</asp:PlaceHolder>
			<asp:PlaceHolder Runat="server" ID="GalleriesGrid">
				<WebAuthor:CustomDataGrid id="ResourceGalleryGrid" runat="server" GridLines="None" OnPageIndexChanged="ChangeGridPage" PagerStyle-HorizontalAlign="Center" AllowPaging="True" OnSortCommand="SortGrid" AllowSorting="True" AutoGenerateColumns="False">
					<Columns>
						<asp:TemplateColumn>
							<ItemTemplate>
								<table border='0'>
									<tr>
										<td>
											<a href="<%# DataBindResourceGalleryUrl(Container.DataItem) %>"><img border='0' src="<%#DialogBase.IDS_PATH_IMAGES_COMMON_ICONS %><%# ResourceBrowserBase.IDS_IMG_ICON_CLOSE_RESOURCE_GALLERY%>">
											</a>
										</td>
										<td class='WBC_styclsTextColor0'>
											<a href="<%# DataBindResourceGalleryUrl(Container.DataItem) %>">
												<%# DataBindResourceGalleryName(Container.DataItem) %>
											</a><span class='WBC_styclsSmallTextColor0'>(<%# DataBindResourceGalleryItemCount(Container.DataItem)%>)</span>
										</td>
									</tr>
								</table>
							</ItemTemplate>
						</asp:TemplateColumn>
						<asp:TemplateColumn>
							<ItemTemplate>
								<asp:Literal runat="server" Text="<%# DataBindLocationColumn(Container.DataItem) %>" ID="Literal2"/>
							</ItemTemplate>
						</asp:TemplateColumn>
						<asp:TemplateColumn>
							<ItemTemplate>
								<asp:Literal runat="server" Text="<%# DataBindLastModifiedColumn(Container.DataItem) %>" ID="Literal3"/>
							</ItemTemplate>
						</asp:TemplateColumn>
						<asp:TemplateColumn>
							<ItemTemplate>
								<asp:Literal runat="server" Text="<%# DataBindDescriptionColumn(Container.DataItem) %>" ID="Literal4"/>
							</ItemTemplate>
						</asp:TemplateColumn>
					</Columns>
				</WebAuthor:CustomDataGrid>
			</asp:PlaceHolder>
		</td>
	</tr>
	</TBODY>
</table>
