-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCLRibbonbar.ascx.cs
62 lines (54 loc) · 1.92 KB
/
CLRibbonbar.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
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using DotNetNuke.UI.Skins;
using DotNetNuke.Entities.Users;
using DotNetNuke.Web.Client.ClientResourceManagement;
using DotNetNuke.Web.Client;
namespace Satrabel.DNN.CL
{
public partial class CLRibbonbar : SkinObjectBase
{
protected void Page_Load(object sender, EventArgs e)
{
pAll.Visible = false;
if ((Request.IsAuthenticated))
{
UserInfo user = UserController.GetCurrentUserInfo();
if (((user != null)))
{
bool isAdmin = user.IsInRole(PortalSettings.AdministratorRoleName);
if (isAdmin &&
!PortalSettings.ActiveTab.IsSuperTab &&
PortalSettings.ActiveTab.TabID != PortalSettings.AdminTabId &&
PortalSettings.ActiveTab.ParentId != PortalSettings.AdminTabId)
{
pAll.Visible = true;
}
}
}
//if (IsPageAdmin())
if (pAll.Visible)
{
var JSPath = HttpContext.Current.IsDebuggingEnabled
? "~/DesktopModules/CLTools/js/CLTools.js"
: "~/DesktopModules/CLTools/js/CLTools.js";
ClientResourceManager.RegisterScript(Page, JSPath);
ClientResourceManager.RegisterStyleSheet(Page, "~/DesktopModules/CLTools/module.css", FileOrder.Css.ModuleCss);
if (!Page.IsPostBack)
{
}
CLControl1.BindAll(PortalSettings.ActiveTab.TabID);
}
}
}
}