<%@ Page language="c#" Codebehind="Tokens.aspx.cs" AutoEventWireup="false" Inherits="CommunityServer.ControlPanel.Blogs.TokensPage" %>
<%@ Register TagPrefix="CP" Namespace="CommunityServer.ControlPanel.Controls" Assembly="CommunityServer.Web" %>
<%@ Register TagPrefix="CS" Namespace="CommunityServer.Controls" Assembly="CommunityServer.Controls" %>
<%@ Import Namespace = "CommunityServer.Components" %>
<%@ Import Namespace = "CommunityServer.Blogs.Components" %>
<%@ Import Namespace = "CommunityServer.ControlPanel" %>
<cp:controlpanelselectednavigation selectednavitem="TextParts" runat="server" id="SelectedNavigation1" />
<cs:mpcontainer runat="server" id="MPContainer" thememasterfile="BlogControlPanelMaster.ascx">
<cs:mpcontent id="DescriptionRegion" runat="server">
	<cp:resourcelabel id="title" runat="server" resourcename="CP_Blog_TextParts_Title"></cp:resourcelabel>
</cs:mpcontent>
<cs:mpcontent id="TaskRegion" runat="Server">

<script>
function refreshPage(res)
{
    refresh();
}
</script>

<DIV class="CommonDescription">
	<CP:ResourceControl runat="server" ResourceName="CP_Blog_TextParts_SubTitle" />
</DIV>
			
<p class="PanelSaveButton">
	<cp:modallink id="NewTextPart" runat="Server" resourcename="CP_Blog_TextParts_NewTextPart" height="300"
		width="400" url="TokenForm.aspx" cssclass="CommonTextButtonBig" CallBack="refreshCallback"></cp:modallink>
</p>			
			
<div class="CommonListArea">
<asp:Repeater runat = "Server" id = "theTokens">
<HeaderTemplate>
	<table id="CommentListing" cellSpacing="0" cellPadding="0" border="0" width="100%">
    <thead>
        <tr>
        <th class="CommonListHeaderLeftMost" ><cp:resourcecontrol runat="server" resourcename="CP_Blog_GridCol_Name" ID="Resourcecontrol3" NAME="Resourcecontrol3"/></th>
        <th class="CommonListHeader"><cp:resourcecontrol runat="server" resourcename="CP_Blog_GridCol_Link" ID="Resourcecontrol4" NAME="Resourcecontrol4"/></th>
        <th class="CommonListHeader"><cp:resourcecontrol runat="server" resourcename="CP_Blog_GridCol_Text" ID="Resourcecontrol5" NAME="Resourcecontrol4"/></th>
        <th class="CommonListHeader"><cp:resourcecontrol runat="server" resourcename="CP_Blog_GridCol_Actions" ID="Resourcecontrol7" NAME="Resourcecontrol4"/></th>
        </tr>
    </thead>
</HeaderTemplate>
<ItemTemplate>
	<tr>
	<td class="CommonListCellLeftMost"><%# DataBinder.Eval(Container.DataItem,"Token")%></td>
	<td class="CommonListCell"><a href="<%# DataBinder.Eval(Container.DataItem,"Link")%>"><%# DataBinder.Eval(Container.DataItem,"Link")%></a></td>
	<td class="CommonListCell"><%# DataBinder.Eval(Container.DataItem,"Text") %></td>
	<td  class="CommonListCell" nowrap="true">
	<a href="javascript:Telligent_Modal.Open('TokenForm.aspx?TokenID=<%# DataBinder.Eval(Container.DataItem,"TokenID") %>', 400, 300, refreshCallback);" class="CommonTextButton"><CP:ResourceControl runat="Server" resourcename="CP_Blog_GridCol_Edit" /></a>
	<CP:ResourceLinkButton CommandArgument='<%# DataBinder.Eval(Container.DataItem, "TokenID")%>' CommandName="Delete" Runat="server" ID = "DeleteButton" ResourceName="CP_Blog_GridCol_Delete" CssClass="CommonTextButton" /></td>
	</tr>
</ItemTemplate>
<AlternatingItemTemplate>
	<tr class="AltListRow">
	<td class="CommonListCellLeftMost"><%# DataBinder.Eval(Container.DataItem,"Token")%></td>
	<td class="CommonListCell"><a href="<%# DataBinder.Eval(Container.DataItem,"Link")%>"><%# DataBinder.Eval(Container.DataItem,"Link")%></a></td>
	<td class="CommonListCell"><%# DataBinder.Eval(Container.DataItem,"Text") %></td>
	<td  class="CommonListCell" nowrap="true">
	<a href="javascript:Telligent_Modal.Open('TokenForm.aspx?TokenID=<%# DataBinder.Eval(Container.DataItem,"TokenID") %>', 400, 300, refreshCallback);" class="CommonTextButton"><CP:ResourceControl runat="Server" resourcename="CP_Blog_GridCol_Edit" /></a>
	<CP:ResourceLinkButton CommandArgument='<%# DataBinder.Eval(Container.DataItem, "TokenID")%>' CommandName="Delete" Runat="server" ID = "Linkbutton1" ResourceName="CP_Blog_GridCol_Delete" CssClass="CommonTextButton" /></td>
	</tr>
</AlternatingItemTemplate>

<FooterTemplate>
	</table>
</FooterTemplate>
</asp:Repeater>

</div>
</cs:mpcontent>
</cs:mpcontainer>
