-
Notifications
You must be signed in to change notification settings - Fork 1
/
LocalizationEditor.ascx
193 lines (188 loc) · 10.4 KB
/
LocalizationEditor.ascx
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="LocalizationEditor.ascx.vb" Inherits="DNNEurope.Modules.LocalizationEditor.LocalizationEditor" %>
<%@ Register TagPrefix="dnn" Namespace="DotNetNuke.UI.WebControls" Assembly="DotNetNuke" %>
<%@ Register TagPrefix="dnn" TagName="Label" Src="~/controls/LabelControl.ascx" %>
<script language="javascript">
function confirmSend() {
return confirm('<%=LocalizeString("SendConfirm") %>');
}
</script>
<asp:PlaceHolder ID="plhLocales" runat="server" />
<asp:Panel ID="pnlLocaleRequest" runat="server">
<div class="genericLocale"><%=(New System.Globalization.CultureInfo(Locale)).NativeName %></div>
<ul class="dnnActions dnnClear">
<li><a href="<%=DotNetNuke.Common.NavigateUrl() %>" class="CommandButton"><%=LocalizeString("Back")%></a></li>
</ul>
<asp:Panel runat="server" ID="pnlCorePackages">
<h3><%=LocalizeString("CorePackages")%></h3>
<asp:DataList runat="server" ID="dlCorePackages">
<HeaderTemplate>
<table cellpadding="4" cellspacing="1">
<tr align="left">
<th>
<asp:Label runat="server" ID="lblPackageCP" resourcekey="lblPackage" />
</th>
<th>
<asp:Label runat="server" ID="lblLastVersion2CP" resourcekey="lblLastVersion" />
</th>
<th colspan="2"> </th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr align="left">
<td>
<%#DataBinder.Eval(Container.DataItem, "FriendlyName")%>
</td>
<td>
<%#DataBinder.Eval(Container.DataItem, "LastPackVersion")%>
</td>
<td>
<a href="<%=ResolveUrl("~/DesktopModules/DNNEurope/LocalizationEditor/Pack.aspx")%>?ObjectId=<%#DataBinder.Eval(Container.DataItem, "ObjectId")%>&Version=<%#DataBinder.Eval(Container.DataItem, "LastPackVersion")%>&Locale=<%=Locale%>"
title="<%=LocalizeString("Download") %>"
style="display: <%#IIF(DataBinder.Eval(Container.DataItem, "PercentComplete")>0,"block","none")%>" class="iconLink">
<span class="entypoIcon icon16" title="<%=LocalizeString("Download") %>">💾</span>
</a>
</td>
<td>
<a href="<%#GetObjectUrl(DataBinder.Eval(Container.DataItem, "ObjectId"))%>"
title="<%=LocalizeString("OtherVersions") %>" class="iconLink">
<span class="entypoIcon icon16" title="<%=LocalizeString("OtherVersions") %>"></span>
</a>
</td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:DataList>
</asp:Panel>
<asp:Panel runat="server" ID="pnlPackages">
<h3><%=LocalizeString("Packages")%></h3>
<asp:DataList runat="server" ID="dlPackages">
<HeaderTemplate>
<table cellpadding="4" cellspacing="1">
<tr align="left">
<th>
<asp:Label runat="server" ID="lblPackage" resourcekey="lblPackage" />
</th>
<th align="center">
<asp:Label runat="server" ID="lblLastVersion2" resourcekey="lblLastVersion" />
</th>
<th colspan="2"> </th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr align="left">
<td>
<%#DataBinder.Eval(Container.DataItem, "FriendlyName")%>
</td>
<td align="center">
<%#DataBinder.Eval(Container.DataItem, "LastPackVersion")%>
</td>
<td>
<a href="<%=ResolveUrl("~/DesktopModules/DNNEurope/LocalizationEditor/Pack.aspx")%>?ObjectId=<%#DataBinder.Eval(Container.DataItem, "ObjectId")%>&Version=<%#DataBinder.Eval(Container.DataItem, "LastPackVersion")%>&Locale=<%=Locale%>"
title="<%=LocalizeString("Download") %>"
style="display: <%#IIF(DataBinder.Eval(Container.DataItem, "PercentComplete")>0,"block","none")%>" class="iconLink">
<span class="entypoIcon icon16" title="<%=LocalizeString("Download") %>">💾</span>
</a>
</td>
<td>
<a href="<%#GetObjectUrl(DataBinder.Eval(Container.DataItem, "ObjectId"))%>"
title="<%=LocalizeString("OtherVersions") %>" class="iconLink">
<span class="entypoIcon icon16" title="<%=LocalizeString("OtherVersions") %>"></span>
</a>
</td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:DataList>
</asp:Panel>
<h3><%=LocalizeString("Components")%></h3>
<asp:DataList runat="server" ID="dlObjects">
<HeaderTemplate>
<table cellpadding="4" cellspacing="1">
<tr align="left">
<th>
<asp:Label runat="server" ID="lblObjects" resourcekey="lblObjects" />
</th>
<th align="center">
<asp:Label runat="server" ID="lblLastVersion" resourcekey="lblLastVersion" />
</th>
<th align="center" style="display: <%#IIF(IsEditor Or IsAdmin,"block","none")%>">
<asp:Label runat="server" ID="lblNrKeys" resourcekey="lblNrKeys" />
</th>
<th>
<asp:Label runat="server" ID="lblLocaleAction" resourcekey="lblLocaleAction" />
</th>
<th colspan="3"> </th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr align="left">
<td>
<%#DataBinder.Eval(Container.DataItem, "FriendlyName")%>
</td>
<td align="center">
<%#DataBinder.Eval(Container.DataItem, "LastVersion")%>
</td>
<%If IsEditor Or IsAdmin Then%>
<td align="center">
<%#DataBinder.Eval(Container.DataItem, "LastVersionTextCount")%>
</td>
<%End If%>
<td align="center">
<%#GetObjectLocalePerctComplete(Container.DataItem)%>
</td>
<td>
<a href="<%=ResolveUrl("~/DesktopModules/DNNEurope/LocalizationEditor/Pack.aspx")%>?ObjectId=<%#DataBinder.Eval(Container.DataItem, "ObjectId")%>&Version=<%#DataBinder.Eval(Container.DataItem, "LastVersion")%>&Locale=<%=Locale%>"
title="<%=LocalizeString("Download") %>" style="display: <%#IIF(DataBinder.Eval(Container.DataItem, "TextCount")>0,"block","none")%>" class="iconLink">
<span class="entypoIcon icon16" title="<%=LocalizeString("Download") %>">💾</span>
</a>
</td>
<td>
<a href="<%#GetObjectUrl(DataBinder.Eval(Container.DataItem, "ObjectId"))%>"
title="<%=LocalizeString("OtherVersions") %>" class="iconLink">
<span class="entypoIcon icon16" title="<%=LocalizeString("OtherVersions") %>"></span>
</a>
</td>
<td>
<%#GetEditColumn(Container.DataItem)%>
</td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:DataList>
</asp:Panel>
<p style="margin-top: 20px;">
<asp:LinkButton ID="cmdUploadPack" runat="server" CausesValidation="false" Visible="false" Text="📤" CssClass="entypoButton" />
<asp:LinkButton ID="cmdManageObjects" runat="server" CausesValidation="false" Visible="false" Text="" CssClass="entypoButton" />
<asp:LinkButton ID="cmdManagePermissions" runat="server" CausesValidation="false" Visible="false" Text="👥" CssClass="entypoButton" />
<asp:LinkButton ID="cmdManagePartners" runat="server" CausesValidation="false" Visible="false" Text="🕪" CssClass="entypoButton" />
<asp:LinkButton ID="cmdClearCaches" runat="server" CausesValidation="false" Visible="false" Text="" CssClass="entypoButton" />
<asp:LinkButton ID="cmdCube" runat="server" CausesValidation="false" Visible="false" Text="" CssClass="entypoButton" />
<a href="#" id="cmdService" runat="server" class="entypoButton" title='<%= LocalizeString("lbService") %>'>🕫</a>
</p>
<script type="text/javascript">
(function ($, Sys) {
$(document).ready(function () {
<% If UserPermissions.Count > 0 Then %>
var $dialogConnections = $('<div class="dnnDialog"></div>')
.html('<div class="dialogLine"><span><%= LocalizeJSString("ServiceUrl") %></span><input type="text" value="http://<%= Request.Url.Host & DotNetNuke.Common.Globals.ApplicationPath & String.Format("/DesktopModules/DNNEurope/LocalizationEditor/API?tabid={0}&moduleid={1}", TabId, ModuleId) %>" /></div><h3><%= LocalizeJSString("AccessKeys") %></h3><% For Each up As DNNEurope.Modules.LocalizationEditor.Entities.Permissions.PermissionInfo In UserPermissions %><div class="dialogLine"><span><%= up.Locale %></span><input type="text" value="<%= up.PermissionId %>-<%= up.AccessKey %>" /></div><% Next %>')
.dialog({
autoOpen: false,
resizable: false,
dialogClass: 'dnnFormPopup dnnClear',
title: '<%= LocalizeJSString("TranslatorAccess") %>',
width: 500
});
$('#<%=cmdService.ClientId %>').click(function () {
$dialogConnections.dialog('open');
return false;
});
<% End If %>
});
}(jQuery, window.Sys));
</script>