From e301486e94bb60cd7c5d5b51aece96729bcc5dff Mon Sep 17 00:00:00 2001 From: dev_amdtel Date: Sat, 9 Aug 2014 04:44:25 +0400 Subject: [PATCH] Account Home fix --- .../Default/Icons/create_organization_48.png | Bin 0 -> 601 bytes .../App_LocalResources/UserOrganization.ascx.resx | 3 +++ .../UserControls/OrganizationMenuControl.cs | 2 ++ .../WebsitePanel/UserOrganization.ascx.cs | 14 +++++++++++--- .../WebsitePanel.WebPortal.csproj | 1 + 5 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Icons/create_organization_48.png diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Icons/create_organization_48.png b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Icons/create_organization_48.png new file mode 100644 index 0000000000000000000000000000000000000000..5c97b86f250411222376ae5bf59c825e2748674a GIT binary patch literal 601 zcmV-f0;c_mP) zDqs!V0892;4;+9W$UlRNpbhW{JPSDj^%W(PdY}M40}uG!;si9nPd0vo9^yj30bg-m zGE~gs7mK#|TryYV96SFgoErsuwt34u;Nn5eLTjHwcxv@sgf(ksko}xtGZNvY;Zg~` z(Gex;*uobi=0}HkwE~sGJ*a_-mhVA50y%e0$v^+?Kp6pkJD6qlLl)@{v=XPq)O5jR$r7*L< zl@6i!o5g$fY>+Ix3doJlVZ0WMd0?JC#R#E$LR4Na1LAWbpv9wLtho`sCPaarC38xw zV|ZW?CgB{YCk~MR^CB}OnVu3_pI&N$I~Y1~F&A2YO}bMjP@oA6+et5^xX?r`rEgs+ z3r7W{SITa#E2TZwtU#S`1K&&iZqC!;>~Xo5)Kz!s4V^LReBIrs#Eq?6&8QKDk;Hnb zel~->n`EKQU46xB207qM@PtCIQE?u2@4y$8xVg(M+A@zw*v81A*ne>BP^c{{0u3q5 n43-CXvv@{EMn=Xrz62Nm9l_d3RtQ=200000NkvXXu0mjfo3;sU literal 0 HcmV?d00001 diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/UserOrganization.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/UserOrganization.ascx.resx index faa19b08..9db2a02d 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/UserOrganization.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/UserOrganization.ascx.resx @@ -249,4 +249,7 @@ Users + + Create Organization + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/OrganizationMenuControl.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/OrganizationMenuControl.cs index 5d01bb2a..4f537a5f 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/OrganizationMenuControl.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/OrganizationMenuControl.cs @@ -74,6 +74,8 @@ namespace WebsitePanel.Portal.UserControls public void BindMenu(MenuItemCollection items) { + if ((PackageId <= 0) || (ItemID <= 0)) + return; //Organization menu group; if (Cntx.Groups.ContainsKey(ResourceGroups.HostedOrganizations)) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserOrganization.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserOrganization.ascx.cs index 4a72bd03..a487dda2 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserOrganization.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserOrganization.ascx.cs @@ -106,13 +106,21 @@ namespace WebsitePanel.Portal ShowImg = true; - if (PackageId > 0) + if ((PackageId > 0) && (Cntx.Groups.ContainsKey(ResourceGroups.HostedOrganizations))) { MenuItemCollection items = new MenuItemCollection(); - items.Add(CreateMenuItem("OrganizationHome", "organization_home", @"Icons/organization_home_48.png")); + if (ItemID > 0) + { + items.Add(CreateMenuItem("OrganizationHome", "organization_home", @"Icons/organization_home_48.png")); + BindMenu(items); + } + else + { + items.Add(CreateMenuItem("CreateOrganization", "create_organization", @"Icons/create_organization_48.png")); + } + - BindMenu(items); UserOrgPanel.Visible = true; OrgIcons.DataSource = items; diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/WebsitePanel.WebPortal.csproj b/WebsitePanel/Sources/WebsitePanel.WebPortal/WebsitePanel.WebPortal.csproj index 2ffe738a..a28a12e2 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/WebsitePanel.WebPortal.csproj +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/WebsitePanel.WebPortal.csproj @@ -109,6 +109,7 @@ +