<%@ Page Language="C#" AutoEventWireup="true" Inherits="Templates" Codebehind="Templates.aspx.cs" UICulture="auto" %>
<%@ Import Namespace="System.Globalization"%>
<%@ Import Namespace="eDocument.Core.Services.Service"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
	<title><asp:Literal runat="server" text="<%$ Resources:Resource, application_title%>"/></title>
</head>
<body>
	<form id="form1" runat="server">
		<div>
			<asp:HyperLink ID="lnkMainPage" runat="server" NavigateUrl="~/Default.aspx" Text="<%$ Resources:Resource, link_main%>"/><br />
			<br />
			<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false">
				<Columns>
					<asp:HyperLinkField DataNavigateUrlFields="EdocumentTemplateID" DataNavigateUrlFormatString="Viewer.aspx?eDocumentTemplateID={0}" DataTextField="Name" HeaderText="<%$ Resources:Resource, column_name%>" />
                    <asp:BoundField DataField="SecurityLevel" HeaderText="<%$ Resources:Resource, column_securitylevel%>" />
					<%--<asp:HyperLinkField DataNavigateUrlFields="ShortName" DataNavigateUrlFormatString="Viewer.aspx?ShortName={0}" DataTextField="Name" HeaderText="<%$ Resources:Resource, column_name%>" />--%>
					<asp:BoundField DataField="CreatedOn" HeaderText="<%$ Resources:Resource, column_createdon%>" />
					<asp:BoundField DataField="Comment" HeaderText="<%$ Resources:Resource, column_description%>" />
					<asp:TemplateField HeaderText="<%$ Resources:Resource, column_language%>">
						<ItemTemplate>
							<asp:DataList ID="cultureList" runat="server" DataSource='<%# ((eDocumentTemplateListItem)Container.DataItem).SupportedCultures %>' RepeatDirection="Horizontal">
								<ItemTemplate>
									<a href="Viewer.aspx?eDocumentTemplateID=&UICulture=<%# Container.DataItem %>"><%# new CultureInfo((string)Container.DataItem).DisplayName %></a>
								</ItemTemplate>
								<SeparatorTemplate>
									,
								</SeparatorTemplate>
							</asp:DataList>
						</ItemTemplate>
					</asp:TemplateField>
				</Columns>
			</asp:GridView>
			<asp:Literal runat="server" text="<%$ Resources:Resource, text_templates%>"/>: <asp:Label ID="_lblTemplateCount" runat="server" />
		</div>
	</form>
</body>
</html>
