-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathView.ascx.cs
63 lines (57 loc) · 2.66 KB
/
View.ascx.cs
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
#region
using System;
using Cross.Modules.ChildPageList.Common;
using DotNetNuke.Entities.Modules;
using DotNetNuke.Entities.Modules.Actions;
using DotNetNuke.Security;
using DotNetNuke.Services.Exceptions;
using DotNetNuke.Services.Localization;
#endregion
namespace Cross.Modules.ChildPageList
{
public partial class View : PortalModuleBase, IActionable
{
public ModuleActionCollection ModuleActions
{
get
{
ModuleActionCollection actions = new ModuleActionCollection
{
{
GetNextActionID(), Localization.GetString(ModuleActionType.AddContent, LocalResourceFile),
ModuleActionType.AddContent, "",
"", EditUrl(), false, SecurityAccessLevel.Edit, true, false
},
{
GetNextActionID(), Localization.GetString("OnlineHelp.Text", LocalResourceFile),
ModuleActionType.OnlineHelp, "", "",
"http://www.DnnModules.cn", false, SecurityAccessLevel.Edit, true, true
}
};
return actions;
}
}
protected void Page_Load(object sender, EventArgs e)
{
try
{
string defaultListTemplate = Constants.DEFAULT_LIST_TEMPLATE;
if (!string.IsNullOrEmpty((string) ModuleConfiguration.ModuleSettings[Constants.LIST_TEMPLATE]))
{
defaultListTemplate = Convert.ToString(ModuleConfiguration.ModuleSettings[Constants.LIST_TEMPLATE]);
if (defaultListTemplate.IndexOf("List_Standard", StringComparison.OrdinalIgnoreCase) >= 0)
{
defaultListTemplate = Constants.DEFAULT_LIST_TEMPLATE;
}
}
var objListTemplate = (PortalModuleBase) LoadControl("Template/" + defaultListTemplate);
objListTemplate.ModuleConfiguration = ModuleConfiguration;
phTemplate.Controls.Add(objListTemplate);
}
catch (Exception exc)
{
Exceptions.ProcessModuleLoadException(this, exc);
}
}
}
}