forked from sachatrauwaen/OpenContent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Edit.ascx.cs
43 lines (36 loc) · 1.72 KB
/
Edit.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
#region Copyright
//
// Copyright (c) 2015-2016
// by Satrabel
//
#endregion
#region Using Statements
using System;
using DotNetNuke.Entities.Modules;
using DotNetNuke.Common;
using Satrabel.OpenContent.Components;
using Satrabel.OpenContent.Components.Alpaca;
#endregion
namespace Satrabel.OpenContent
{
public partial class Edit : PortalModuleBase
{
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
var editLayout = OpenContentControllerFactory.Instance.OpenContentGlobalSettingsController.GetEditLayout();
var bootstrap = OpenContentControllerFactory.Instance.OpenContentGlobalSettingsController.GetEditLayout() != AlpacaLayoutEnum.DNN;
bool loadBootstrap = bootstrap && OpenContentControllerFactory.Instance.OpenContentGlobalSettingsController.GetLoadBootstrap();
hlCancel.NavigateUrl = Globals.NavigateURL();
cmdSave.NavigateUrl = Globals.NavigateURL();
OpenContentSettings settings = this.OpenContentSettings();
AlpacaEngine alpaca = new AlpacaEngine(Page, ModuleContext, settings.Template.ManifestFolderUri.FolderPath, "");
alpaca.RegisterAll(bootstrap, loadBootstrap);
string itemId = Request.QueryString["id"];
AlpacaContext = new AlpacaContext(PortalId, ModuleId, itemId, ScopeWrapper.ClientID, hlCancel.ClientID, cmdSave.ClientID, hlDelete.ClientID, ddlVersions.ClientID);
AlpacaContext.Bootstrap = bootstrap;
AlpacaContext.Horizontal = OpenContentControllerFactory.Instance.OpenContentGlobalSettingsController.GetEditLayout() == AlpacaLayoutEnum.BootstrapHorizontal;
}
public AlpacaContext AlpacaContext { get; private set; }
}
}