This repository has been archived by the owner on Feb 19, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AdminSnippets.aspx
executable file
·101 lines (87 loc) · 6.32 KB
/
AdminSnippets.aspx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<%@ Page Title="" Language="C#" MasterPageFile="~/Admin.master" AutoEventWireup="true" CodeBehind="AdminSnippets.aspx.cs" Inherits="ScrewTurn.Wiki.AdminSnippets" ValidateRequest="false" culture="auto" meta:resourcekey="PageResource1" uiculture="auto" %>
<%@ Register TagPrefix="st" TagName="ProviderSelector" Src="~/ProviderSelector.ascx" %>
<%@ Register TagPrefix="st" TagName="Editor" Src="~/Editor.ascx" %>
<asp:Content ID="ctnHead" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="ctnSnippetsTemplates" ContentPlaceHolderID="cphAdmin" runat="server">
<h2 class="sectiontitle"><asp:Literal ID="lblSnippetsTemplates" runat="server" Text="Snippets and Templates" EnableViewState="False" meta:resourcekey="lblSnippetsTemplatesResource1" /></h2>
<asp:Panel ID="pnlList" runat="server" meta:resourcekey="pnlListResource1">
<asp:Button ID="btnNewTemplate" runat="server" Text="New Template" CssClass="rightaligned" OnClick="btnNewTemplate_Click" meta:resourcekey="btnNewTemplateResource1" />
<asp:Button ID="btnNewSnippet" runat="server" Text="New Snippet" CssClass="rightaligned" OnClick="btnNewSnippet_Click" meta:resourcekey="btnNewSnippetResource1" />
<div id="SnippetsListContainerDiv">
<asp:Repeater ID="rptSnippetsTemplates" runat="server"
OnDataBinding="rptSnippetsTemplates_DataBinding" OnItemCommand="rptSnippetsTemplates_ItemCommand">
<HeaderTemplate>
<table cellpadding="0" cellspacing="0" class="generic">
<thead>
<tr class="tableheader">
<th><asp:Literal ID="lblType" runat="server" EnableViewState="False" meta:resourcekey="lblTypeResource1" Text="Type" /></th>
<th><asp:Literal ID="lblName" runat="server" EnableViewState="False" meta:resourcekey="lblNameResource1" Text="Name" /></th>
<th><asp:Literal ID="lblParameters" runat="server" EnableViewState="False" meta:resourcekey="lblParametersResource1" Text="Params" /></th>
<th><asp:Literal ID="lblProvider" runat="server" EnableViewState="False" meta:resourcekey="lblProviderResource1" Text="Provider" /></th>
<th> </th>
</tr>
</thead>
<tbody>
</HeaderTemplate>
<ItemTemplate>
<tr class='tablerow<%# Eval("AdditionalClass") %>'>
<td><%# Eval("Type") %></td>
<td><%# Eval("Name") %></td>
<td><%# Eval("ParameterCount") %></td>
<td><%# Eval("Provider") %></td>
<td><asp:LinkButton ID="btnSelect" runat="server" CommandArgument='<%# Eval("DistinguishedName") %>' CommandName="Select" meta:resourcekey="btnSelectResource2" Text="Select" ToolTip="Edit or delete this item" /></td>
</tr>
</ItemTemplate>
<AlternatingItemTemplate>
<tr class='tablerowalternate<%# Eval("AdditionalClass") %>'>
<td><%# Eval("Type") %></td>
<td><%# Eval("Name") %></td>
<td><%# Eval("ParameterCount") %></td>
<td><%# Eval("Provider") %></td>
<td><asp:LinkButton ID="btnSelect" runat="server" CommandArgument='<%# Eval("DistinguishedName") %>' CommandName="Select" meta:resourcekey="btnSelectResource1" Text="Select" ToolTip="Edit or delete this item" /></td>
</tr>
</AlternatingItemTemplate>
<FooterTemplate>
</tbody>
</table>
</FooterTemplate>
</asp:Repeater>
</div>
</asp:Panel>
<asp:Panel ID="pnlEditElement" runat="server" Visible="False" meta:resourcekey="pnlEditElementResource1">
<div id="EditSnippetDiv">
<h2 class="separator">
<asp:Literal ID="lblEditTitleSnippet" runat="server" Text="Snippet Details" meta:resourcekey="lblEditTitleSnippetResource1" />
<asp:Literal ID="lblEditTitleTemplate" runat="server" Text="Template Details" meta:resourcekey="lblEditTitleTemplateResource1" />
</h2>
<asp:Literal ID="lblEditSnippetWarning" runat="server" Visible="false" meta:resourcekey="lblEditSnippetWarningResource1"
Text="<div class='warning' style='float: right;'>You are now editing a snippet. After you are done,<br />it is <b>strongly</b> suggested to rebuild the search engine index in the <i>Admin Home</i> page.</div>" />
<asp:Literal ID="lblProvider" runat="server" Text="Provider" EnableViewState="False" meta:resourcekey="lblProviderResource2" /><br />
<st:ProviderSelector ID="providerSelector" runat="server" ExcludeReadOnly="true" ProviderType="Pages" /><br />
<asp:Literal ID="lblName" runat="server" Text="Name" EnableViewState="False" meta:resourcekey="lblNameResource2" /><br />
<asp:TextBox ID="txtName" runat="server" CssClass="textbox" ValidationGroup="snippet" meta:resourcekey="txtNameResource1" />
<asp:RequiredFieldValidator ID="rfvName" runat="server" ErrorMessage="Name is required"
CssClass="resulterror" ControlToValidate="txtName" Display="Dynamic" ValidationGroup="snippet" meta:resourcekey="rfvNameResource1" />
<asp:CustomValidator ID="cvName" runat="server" ErrorMessage="Invalid Snippet Name"
CssClass="resulterror" ControlToValidate="txtName" Display="Dynamic" ValidationGroup="snippet"
OnServerValidate="cvName_ServerValidate" meta:resourcekey="cvNameResource1" />
<br /><br />
<st:Editor ID="editor" runat="server" />
<div id="ButtonsDiv">
<asp:Button ID="btnSave" runat="server" Text="Save Item" ToolTip="Save modifications"
CssClass="button" Visible="False" ValidationGroup="snippet" OnClick="btnSave_Click" meta:resourcekey="btnSaveResource1" />
<asp:Button ID="btnCreate" runat="server" Text="Create Item" ToolTip="Save the new Item"
CssClass="button" ValidationGroup="snippet" OnClick="btnCreate_Click" meta:resourcekey="btnCreateResource1" />
<asp:Button ID="btnDelete" runat="server" Text="Delete" ToolTip="Delete the Item"
CssClass="button" Visible="False" CausesValidation="False" OnClick="btnDelete_Click"
ValidationGroup="account" OnClientClick="javascript:return RequestConfirm();" meta:resourcekey="btnDeleteResource1" />
<asp:Button ID="btnCancel" runat="server" Text="Cancel" ToolTip="Cancel and return to the items list"
CssClass="button" CausesValidation="False" ValidationGroup="account" OnClick="btnCancel_Click" meta:resourcekey="btnCancelResource1" />
<asp:Label ID="lblResult" runat="server" meta:resourcekey="lblResultResource1" />
</div>
</div>
</asp:Panel>
<asp:HiddenField ID="txtCurrentElement" runat="server" />
<div style="clear: both;"></div>
</asp:Content>