Account Home Organization module
|
@ -1,5 +1,7 @@
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio 2010
|
# Visual Studio 2013
|
||||||
|
VisualStudioVersion = 12.0.21005.1
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{BB38798E-1528-493C-868E-005102316536}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{BB38798E-1528-493C-868E-005102316536}"
|
||||||
ProjectSection(SolutionItems) = preProject
|
ProjectSection(SolutionItems) = preProject
|
||||||
..\..\LICENSE.txt = ..\..\LICENSE.txt
|
..\..\LICENSE.txt = ..\..\LICENSE.txt
|
||||||
|
@ -36,4 +38,7 @@ Global
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
|
GlobalSection(Performance) = preSolution
|
||||||
|
HasPerformanceSessions = true
|
||||||
|
EndGlobalSection
|
||||||
EndGlobal
|
EndGlobal
|
||||||
|
|
|
@ -88,51 +88,46 @@
|
||||||
</ModuleData>
|
</ModuleData>
|
||||||
|
|
||||||
<ModuleData id="SpaceIcons">
|
<ModuleData id="SpaceIcons">
|
||||||
<Icon pageID="SpaceDomains" resourceGroup="OS" imageUrl="icons/world_48.png" />
|
<Group pageID="SpaceHome" title="System">
|
||||||
<Icon pageID="SpaceWeb" disabled="True" imageUrl="icons/location_48.png">
|
<Icon pageID="SpaceDomains" resourceGroup="OS" imageUrl="icons/domains_48.png" />
|
||||||
<MenuItems>
|
<Icon pageID="SpaceFtpAccounts" resourceGroup="FTP" imageUrl="icons/ftp_48.png"/>
|
||||||
<MenuItem pageID="SpaceWebSites" resourceGroup="Web" />
|
<Icon pageID="SpaceFileManager" resourceGroup="OS" quota="OS.FileManager" imageUrl="icons/filemanager_48.png"/>
|
||||||
<MenuItem pageID="SpaceWebIPAddresses" resourceGroup="Web" />
|
<Icon pageID="SpaceApplicationsInstaller" resourceGroup="OS" quota="OS.AppInstaller" imageUrl="icons/applicationsinstaller_48.png"/>
|
||||||
<MenuItem pageID="SpaceSharedSSL" resourceGroup="OS" quota="Web.SharedSSL" />
|
<Icon pageID="SpaceScheduledTasks" resourceGroup="OS" quota="OS.ScheduledTasks" imageUrl="icons/scheduledtasks_48.png"/>
|
||||||
<MenuItem pageID="SpaceAdvancedStatistics" resourceGroup="Statistics" />
|
</Group>
|
||||||
</MenuItems>
|
<Group pageID="SpaceWeb" title="Web & Applications">
|
||||||
</Icon>
|
<Icon pageID="SpaceWebSites" resourceGroup="Web" imageUrl="icons/websites_48.png" />
|
||||||
<Icon pageID="SpaceFtpAccounts" resourceGroup="FTP" imageUrl="icons/folder_up_48.png"/>
|
<Icon pageID="SpaceWebIPAddresses" resourceGroup="Web" imageUrl="icons/webipaddresses_48.png" />
|
||||||
<Icon pageID="SpaceFileManager" resourceGroup="OS" quota="OS.FileManager" imageUrl="icons/cabinet_48.png"/>
|
<Icon pageID="SpaceSharedSSL" resourceGroup="OS" quota="Web.SharedSSL" imageUrl="icons/sharedssl_48.png" />
|
||||||
<Icon pageID="SpaceDatabases" disabled="True" imageUrl="icons/database2_48.png">
|
<Icon pageID="SpaceAdvancedStatistics" resourceGroup="Statistics" imageUrl="icons/advancedstatistics_48.png" />
|
||||||
<MenuItems>
|
<Icon pageID="SpaceWebApplicationsGallery" resourceGroup="Web" quota="Web.WebAppGallery" imageUrl="icons/webapplicationsgallery_48.png"/>
|
||||||
<MenuItem pageID="SpaceMsSql2000" resourceGroup="MsSQL2000"/>
|
</Group>
|
||||||
<MenuItem pageID="SpaceMsSql2005" resourceGroup="MsSQL2005"/>
|
<Group pageID="SpaceMail" title="Email" resourceGroup="Mail" >
|
||||||
<MenuItem pageID="SpaceMsSql2008" resourceGroup="MsSQL2008"/>
|
<Icon pageID="SpaceMailAccounts" quota="Mail.Accounts" imageUrl="icons/mail_accounts_48.png"/>
|
||||||
<MenuItem pageID="SpaceMsSql2012" resourceGroup="MsSQL2012"/>
|
<Icon pageID="SpaceMailForwardings" quota="Mail.Forwardings" imageUrl="icons/mail_forwardings_48.png"/>
|
||||||
<MenuItem pageID="SpaceMySql4" resourceGroup="MySQL4"/>
|
<Icon pageID="SpaceMailGroups" quota="Mail.Groups" imageUrl="icons/mail_groups_48.png"/>
|
||||||
<MenuItem pageID="SpaceMySql5" resourceGroup="MySQL5"/>
|
<Icon pageID="SpaceMailLists" quota="Mail.Lists" imageUrl="icons/mail_lists_48.png"/>
|
||||||
<MenuItem pageID="SpaceOdbc" resourceGroup="OS" quota="OS.ODBC"/>
|
<Icon pageID="SpaceMailDomains" resourceGroup="Mail" imageUrl="icons/mail_domains_48.png"/>
|
||||||
</MenuItems>
|
</Group>
|
||||||
</Icon>
|
<Group pageID="SpaceDatabases" title="Databases" disabled="True">
|
||||||
<Icon pageID="SpaceMail" resourceGroup="Mail" disabled="True" imageUrl="icons/mail_48.png">
|
<Icon pageID="SpaceMsSql2000" resourceGroup="MsSQL2000" imageUrl="icons/mssql_48.png"/>
|
||||||
<MenuItems>
|
<Icon pageID="SpaceMsSql2005" resourceGroup="MsSQL2005" imageUrl="icons/mssql_48.png"/>
|
||||||
<MenuItem pageID="SpaceMailAccounts" quota="Mail.Accounts"/>
|
<Icon pageID="SpaceMsSql2008" resourceGroup="MsSQL2008" imageUrl="icons/mssql_48.png"/>
|
||||||
<MenuItem pageID="SpaceMailForwardings" quota="Mail.Forwardings"/>
|
<Icon pageID="SpaceMsSql2012" resourceGroup="MsSQL2012" imageUrl="icons/mssql_48.png"/>
|
||||||
<MenuItem pageID="SpaceMailGroups" quota="Mail.Groups"/>
|
<Icon pageID="SpaceMySql4" resourceGroup="MySQL4" imageUrl="icons/mysql_48.png"/>
|
||||||
<MenuItem pageID="SpaceMailLists" quota="Mail.Lists"/>
|
<Icon pageID="SpaceMySql5" resourceGroup="MySQL5" imageUrl="icons/mysql_48.png"/>
|
||||||
<MenuItem pageID="SpaceMailDomains" resourceGroup="Mail"/>
|
<Icon pageID="SpaceOdbc" resourceGroup="OS" quota="OS.ODBC" imageUrl="icons/odbc_48.png"/>
|
||||||
</MenuItems>
|
</Group>
|
||||||
</Icon>
|
<Group pageID="SpaceHome" title="VPS" disabled="True">
|
||||||
<Icon pageID="SpaceSharePoint" resourceGroup="SharePoint" disabled="True" imageUrl="icons/colors_48.png">
|
<Icon pageID="SpaceVPS" resourceGroup="VPS" imageUrl="icons/vps_48.png" />
|
||||||
<MenuItems>
|
<Icon pageID="SpaceVPSForPC" resourceGroup="VPSForPC" imageUrl="icons/vpsforpc_48.png" />
|
||||||
<MenuItem pageID="SpaceSharePointSites"/>
|
</Group>
|
||||||
<MenuItem pageID="SpaceSharePointUsers"/>
|
<!--
|
||||||
</MenuItems>
|
<Group pageID="SpaceSharePoint" resourceGroup="SharePoint" disabled="True">
|
||||||
</Icon>
|
<Icon pageID="SpaceSharePointSites" imageUrl="icons/colors_48.png"/>
|
||||||
<Icon pageID="SpaceVPS" resourceGroup="VPS" imageUrl="images/vps/servers_48.png" />
|
<Icon pageID="SpaceSharePointUsers" imageUrl="icons/colors_48.png"/>
|
||||||
<Icon pageID="SpaceVPSForPC" resourceGroup="VPSForPC" imageUrl="images/vps/icon-home-botbar-cloud.png" />
|
</Group>
|
||||||
<Icon pageID="SpaceExchangeServer" resourceGroup="Hosted Organizations" imageUrl="icons/enterprise.png"/>
|
-->
|
||||||
<Icon pageID="SpaceWebApplicationsGallery" resourceGroup="Web" quota="Web.WebAppGallery" imageUrl="icons/dvd_disc_48.png"/>
|
|
||||||
<Icon pageID="SpaceApplicationsInstaller" resourceGroup="OS" quota="OS.AppInstaller" imageUrl="icons/dvd_disc_48.png"/>
|
|
||||||
<Icon pageID="SpaceScheduledTasks" resourceGroup="OS" quota="OS.ScheduledTasks" imageUrl="icons/calendar_month_2_clock_48.png"/>
|
|
||||||
<!--MenuItem url="http://phpmysqladmin.com" title="phpMyAdmin" target="_blank"
|
|
||||||
resourceGroup="MySQL4"/-->
|
|
||||||
</ModuleData>
|
</ModuleData>
|
||||||
|
|
||||||
<ModuleData id="HostedSolutionMenu">
|
<ModuleData id="HostedSolutionMenu">
|
||||||
|
|
|
@ -54,11 +54,6 @@
|
||||||
<Control key="create_space" src="WebsitePanel/UserCreateSpace.ascx" title="UserCreateSpace" type="View" icon="sphere_add_48.png" />
|
<Control key="create_space" src="WebsitePanel/UserCreateSpace.ascx" title="UserCreateSpace" type="View" icon="sphere_add_48.png" />
|
||||||
</Controls>
|
</Controls>
|
||||||
</ModuleDefinition>
|
</ModuleDefinition>
|
||||||
<ModuleDefinition id="UserOrganization">
|
|
||||||
<Controls>
|
|
||||||
<Control key="" src="WebsitePanel/UserOrganization.ascx" title="Organization" type="View" />
|
|
||||||
</Controls>
|
|
||||||
</ModuleDefinition>
|
|
||||||
<ModuleDefinition id="UserNotes">
|
<ModuleDefinition id="UserNotes">
|
||||||
<Controls>
|
<Controls>
|
||||||
<Control key="" src="WebsitePanel/UserAccountNotes.ascx" title="UserAccountNotes" type="View" />
|
<Control key="" src="WebsitePanel/UserAccountNotes.ascx" title="UserAccountNotes" type="View" />
|
||||||
|
|
|
@ -38,7 +38,6 @@
|
||||||
<Module moduleDefinitionID="UserSpaces" title="UserSpaces" container="Browse.ascx" viewRoles="Administrator,Reseller,PlatformCSR,ResellerCSR,PlatformHelpdesk,ResellerHelpdesk,User" icon="sphere_48.png">
|
<Module moduleDefinitionID="UserSpaces" title="UserSpaces" container="Browse.ascx" viewRoles="Administrator,Reseller,PlatformCSR,ResellerCSR,PlatformHelpdesk,ResellerHelpdesk,User" icon="sphere_48.png">
|
||||||
<ModuleData ref="SpaceIcons"/>
|
<ModuleData ref="SpaceIcons"/>
|
||||||
</Module>
|
</Module>
|
||||||
<Module moduleDefinitionID="UserOrganization" title="UserOrganization" container="Browse.ascx" viewRoles="Administrator,Reseller,PlatformCSR,ResellerCSR,PlatformHelpdesk,ResellerHelpdesk,User" icon="sphere_48.png" />
|
|
||||||
<Module moduleDefinitionID="UserNotes" title="UserNotes" container="Browse.ascx" viewRoles="Administrator,Reseller,PlatformCSR,ResellerCSR,PlatformHelpdesk,ResellerHelpdesk" icon="notes_48.png" />
|
<Module moduleDefinitionID="UserNotes" title="UserNotes" container="Browse.ascx" viewRoles="Administrator,Reseller,PlatformCSR,ResellerCSR,PlatformHelpdesk,ResellerHelpdesk" icon="notes_48.png" />
|
||||||
</Content>
|
</Content>
|
||||||
<Content id="RightPane">
|
<Content id="RightPane">
|
||||||
|
|
After Width: | Height: | Size: 597 B |
After Width: | Height: | Size: 587 B |
After Width: | Height: | Size: 674 B |
After Width: | Height: | Size: 660 B |
After Width: | Height: | Size: 660 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 246 B |
After Width: | Height: | Size: 438 B |
After Width: | Height: | Size: 331 B |
After Width: | Height: | Size: 582 B |
After Width: | Height: | Size: 420 B |
After Width: | Height: | Size: 420 B |
After Width: | Height: | Size: 420 B |
After Width: | Height: | Size: 420 B |
After Width: | Height: | Size: 420 B |
After Width: | Height: | Size: 491 B |
After Width: | Height: | Size: 568 B |
After Width: | Height: | Size: 777 B |
After Width: | Height: | Size: 597 B |
After Width: | Height: | Size: 1,018 B |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 5.2 KiB |
After Width: | Height: | Size: 587 B |
After Width: | Height: | Size: 597 B |
After Width: | Height: | Size: 597 B |
|
@ -46,19 +46,16 @@ namespace WebsitePanel.Portal.UserControls
|
||||||
public class OrganizationMenuControl : WebsitePanelModuleBase
|
public class OrganizationMenuControl : WebsitePanelModuleBase
|
||||||
{
|
{
|
||||||
|
|
||||||
virtual public string ImagePath
|
|
||||||
{
|
|
||||||
get { return String.Concat("~/", DefaultPage.THEMES_FOLDER, "/", Page.Theme, "/"); }
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual public int PackageId
|
virtual public int PackageId
|
||||||
{
|
{
|
||||||
get { return PanelSecurity.PackageId; }
|
get { return PanelSecurity.PackageId; }
|
||||||
|
set { }
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual public int ItemID
|
virtual public int ItemID
|
||||||
{
|
{
|
||||||
get { return PanelRequest.ItemID; }
|
get { return PanelRequest.ItemID; }
|
||||||
|
set { }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -194,7 +191,7 @@ namespace WebsitePanel.Portal.UserControls
|
||||||
private void PrepareExchangeMenu(MenuItemCollection exchangeItems, bool hideItems)
|
private void PrepareExchangeMenu(MenuItemCollection exchangeItems, bool hideItems)
|
||||||
{
|
{
|
||||||
if (Utils.CheckQouta(Quotas.EXCHANGE2007_MAILBOXES, Cntx))
|
if (Utils.CheckQouta(Quotas.EXCHANGE2007_MAILBOXES, Cntx))
|
||||||
exchangeItems.Add(CreateMenuItem("Mailboxes", "mailboxes", @"Icons/accounting_mail_48.png"));
|
exchangeItems.Add(CreateMenuItem("Mailboxes", "mailboxes", @"Icons/mailboxes_48.png"));
|
||||||
|
|
||||||
if (ShortMenu) return;
|
if (ShortMenu) return;
|
||||||
|
|
||||||
|
@ -260,8 +257,8 @@ namespace WebsitePanel.Portal.UserControls
|
||||||
|
|
||||||
private void PrepareCRMMenu(MenuItemCollection crmItems)
|
private void PrepareCRMMenu(MenuItemCollection crmItems)
|
||||||
{
|
{
|
||||||
crmItems.Add(CreateMenuItem("CRMOrganization", "CRMOrganizationDetails", @"Images/crm_48.png"));
|
crmItems.Add(CreateMenuItem("CRMOrganization", "CRMOrganizationDetails", @"Icons/crm_orgs_48.png"));
|
||||||
crmItems.Add(CreateMenuItem("CRMUsers", "CRMUsers", @"Images/crm_48.png"));
|
crmItems.Add(CreateMenuItem("CRMUsers", "CRMUsers", @"Icons/crm_users_48.png"));
|
||||||
|
|
||||||
if (ShortMenu) return;
|
if (ShortMenu) return;
|
||||||
|
|
||||||
|
@ -291,8 +288,8 @@ namespace WebsitePanel.Portal.UserControls
|
||||||
|
|
||||||
private void PrepareCRM2013Menu(MenuItemCollection crmItems)
|
private void PrepareCRM2013Menu(MenuItemCollection crmItems)
|
||||||
{
|
{
|
||||||
crmItems.Add(CreateMenuItem("CRMOrganization", "CRMOrganizationDetails", @"Images/crm_48.png"));
|
crmItems.Add(CreateMenuItem("CRMOrganization", "CRMOrganizationDetails", @"Icons/crm_orgs_48.png"));
|
||||||
crmItems.Add(CreateMenuItem("CRMUsers", "CRMUsers", @"Images/crm_48.png"));
|
crmItems.Add(CreateMenuItem("CRMUsers", "CRMUsers", @"Icons/crm_users_48.png"));
|
||||||
|
|
||||||
if (ShortMenu) return;
|
if (ShortMenu) return;
|
||||||
|
|
||||||
|
@ -323,7 +320,7 @@ namespace WebsitePanel.Portal.UserControls
|
||||||
|
|
||||||
private void PrepareBlackBerryMenu(MenuItemCollection bbItems)
|
private void PrepareBlackBerryMenu(MenuItemCollection bbItems)
|
||||||
{
|
{
|
||||||
bbItems.Add(CreateMenuItem("BlackBerryUsers", "blackberry_users", @"Images/blackberry48.png"));
|
bbItems.Add(CreateMenuItem("BlackBerryUsers", "blackberry_users", @"Icons/blackberry_users_48.png"));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void PrepareSharePointMenuRoot(MenuItemCollection items)
|
private void PrepareSharePointMenuRoot(MenuItemCollection items)
|
||||||
|
@ -349,7 +346,7 @@ namespace WebsitePanel.Portal.UserControls
|
||||||
|
|
||||||
private void PrepareSharePointMenu(MenuItemCollection spItems)
|
private void PrepareSharePointMenu(MenuItemCollection spItems)
|
||||||
{
|
{
|
||||||
spItems.Add(CreateMenuItem("SiteCollections", "sharepoint_sitecollections", @"Images/Exchange/storage_limits_48.png"));
|
spItems.Add(CreateMenuItem("SiteCollections", "sharepoint_sitecollections", @"Icons/sharepoint_sitecollections_48.png"));
|
||||||
|
|
||||||
if (ShortMenu) return;
|
if (ShortMenu) return;
|
||||||
|
|
||||||
|
@ -406,7 +403,7 @@ namespace WebsitePanel.Portal.UserControls
|
||||||
|
|
||||||
private void PrepareLyncMenu(MenuItemCollection lyncItems)
|
private void PrepareLyncMenu(MenuItemCollection lyncItems)
|
||||||
{
|
{
|
||||||
lyncItems.Add(CreateMenuItem("LyncUsers", "lync_users", @"Images/lync48.png"));
|
lyncItems.Add(CreateMenuItem("LyncUsers", "lync_users", @"Icons/lync_users_48.png"));
|
||||||
|
|
||||||
if (ShortMenu) return;
|
if (ShortMenu) return;
|
||||||
|
|
||||||
|
@ -443,7 +440,7 @@ namespace WebsitePanel.Portal.UserControls
|
||||||
|
|
||||||
private void PrepareEnterpriseStorageMenu(MenuItemCollection enterpriseStorageItems)
|
private void PrepareEnterpriseStorageMenu(MenuItemCollection enterpriseStorageItems)
|
||||||
{
|
{
|
||||||
enterpriseStorageItems.Add(CreateMenuItem("EnterpriseStorageFolders", "enterprisestorage_folders", @"Images/folder_48.png"));
|
enterpriseStorageItems.Add(CreateMenuItem("EnterpriseStorageFolders", "enterprisestorage_folders", @"Icons/enterprisestorage_folders_48.png"));
|
||||||
|
|
||||||
if (ShortMenu) return;
|
if (ShortMenu) return;
|
||||||
|
|
||||||
|
@ -457,7 +454,7 @@ namespace WebsitePanel.Portal.UserControls
|
||||||
return CreateMenuItem(text, key, null);
|
return CreateMenuItem(text, key, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private MenuItem CreateMenuItem(string text, string key, string img)
|
virtual protected MenuItem CreateMenuItem(string text, string key, string img)
|
||||||
{
|
{
|
||||||
MenuItem item = new MenuItem();
|
MenuItem item = new MenuItem();
|
||||||
|
|
||||||
|
@ -468,9 +465,9 @@ namespace WebsitePanel.Portal.UserControls
|
||||||
if (ShowImg)
|
if (ShowImg)
|
||||||
{
|
{
|
||||||
if (img==null)
|
if (img==null)
|
||||||
item.ImageUrl = ImagePath + "Icons/tool_48.png";
|
item.ImageUrl = PortalUtils.GetThemedIcon("Icons/tool_48.png");
|
||||||
else
|
else
|
||||||
item.ImageUrl = ImagePath + img;
|
item.ImageUrl = PortalUtils.GetThemedIcon(img);
|
||||||
}
|
}
|
||||||
|
|
||||||
return item;
|
return item;
|
||||||
|
|
|
@ -48,50 +48,20 @@ namespace WebsitePanel.Portal
|
||||||
{
|
{
|
||||||
public partial class UserOrganization : OrganizationMenuControl
|
public partial class UserOrganization : OrganizationMenuControl
|
||||||
{
|
{
|
||||||
private void FindDefaultOrg()
|
|
||||||
{
|
|
||||||
DataSet rawPackages = new PackagesHelper().GetMyPackages();
|
|
||||||
if (rawPackages.Tables.Count<1) return;
|
|
||||||
|
|
||||||
DataTable packages = rawPackages.Tables[0];
|
|
||||||
|
|
||||||
for(int i=0;i<packages.Rows.Count;i++)
|
|
||||||
{
|
|
||||||
int pId = (int)packages.Rows[i]["PackageID"];
|
|
||||||
DataTable orgs = new OrganizationsHelper().GetOrganizations(pId, false);
|
|
||||||
|
|
||||||
for(int j=0;j<orgs.Rows.Count;j++)
|
|
||||||
{
|
|
||||||
DataRow org = orgs.Rows[j];
|
|
||||||
int iId = (int)org["ItemID"];
|
|
||||||
|
|
||||||
if (packageId==0)
|
|
||||||
{
|
|
||||||
packageId = pId;
|
|
||||||
itemID = iId;
|
|
||||||
}
|
|
||||||
|
|
||||||
object isDefault = org["IsDefault"];
|
|
||||||
if (isDefault is bool)
|
|
||||||
{
|
|
||||||
if ((bool)isDefault)
|
|
||||||
{
|
|
||||||
packageId = pId;
|
|
||||||
itemID = iId;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int packageId = 0;
|
int packageId = 0;
|
||||||
override public int PackageId
|
override public int PackageId
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
// test
|
||||||
|
//return 1;
|
||||||
return packageId;
|
return packageId;
|
||||||
}
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
packageId = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int itemID = 0;
|
int itemID = 0;
|
||||||
|
@ -99,6 +69,32 @@ namespace WebsitePanel.Portal
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
// test
|
||||||
|
//return 1;
|
||||||
|
if (itemID != 0) return itemID;
|
||||||
|
if (PackageId == 0) return 0;
|
||||||
|
|
||||||
|
DataTable orgs = new OrganizationsHelper().GetOrganizations(PackageId, false);
|
||||||
|
|
||||||
|
for (int j = 0; j < orgs.Rows.Count; j++)
|
||||||
|
{
|
||||||
|
DataRow org = orgs.Rows[j];
|
||||||
|
int iId = (int)org["ItemID"];
|
||||||
|
|
||||||
|
if (itemID == 0)
|
||||||
|
itemID = iId;
|
||||||
|
|
||||||
|
object isDefault = org["IsDefault"];
|
||||||
|
if (isDefault is bool)
|
||||||
|
{
|
||||||
|
if ((bool)isDefault)
|
||||||
|
{
|
||||||
|
itemID = iId;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return itemID;
|
return itemID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -106,8 +102,6 @@ namespace WebsitePanel.Portal
|
||||||
|
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
FindDefaultOrg();
|
|
||||||
|
|
||||||
ShortMenu = true;
|
ShortMenu = true;
|
||||||
ShowImg = true;
|
ShowImg = true;
|
||||||
|
|
||||||
|
@ -127,6 +121,23 @@ namespace WebsitePanel.Portal
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override MenuItem CreateMenuItem(string text, string key, string img)
|
||||||
|
{
|
||||||
|
string PID_SPACE_EXCHANGE_SERVER = "SpaceExchangeServer";
|
||||||
|
|
||||||
|
MenuItem item = new MenuItem();
|
||||||
|
|
||||||
|
item.Text = GetLocalizedString("Text." + text);
|
||||||
|
item.NavigateUrl = PortalUtils.NavigatePageURL( PID_SPACE_EXCHANGE_SERVER, "ItemID", ItemID.ToString(),
|
||||||
|
PortalUtils.SPACE_ID_PARAM + "=" + PackageId, DefaultPage.CONTROL_ID_PARAM + "=" + key
|
||||||
|
/*, DefaultPage.MODULE_ID_PARAM + "=" + */ );
|
||||||
|
|
||||||
|
if (img == null)
|
||||||
|
item.ImageUrl = PortalUtils.GetThemedIcon("Icons/tool_48.png");
|
||||||
|
else
|
||||||
|
item.ImageUrl = PortalUtils.GetThemedIcon(img);
|
||||||
|
|
||||||
|
return item;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -2,6 +2,7 @@
|
||||||
<%@ Import Namespace="WebsitePanel.Portal" %>
|
<%@ Import Namespace="WebsitePanel.Portal" %>
|
||||||
<%@ Register Src="UserControls/ServerDetails.ascx" TagName="ServerDetails" TagPrefix="uc3" %>
|
<%@ Register Src="UserControls/ServerDetails.ascx" TagName="ServerDetails" TagPrefix="uc3" %>
|
||||||
<%@ Register Src="UserControls/Comments.ascx" TagName="Comments" TagPrefix="uc4" %>
|
<%@ Register Src="UserControls/Comments.ascx" TagName="Comments" TagPrefix="uc4" %>
|
||||||
|
<%@ Register Src="UserOrganization.ascx" TagName="UserOrganization" TagPrefix="wsp" %>
|
||||||
<%@ Import Namespace="WebsitePanel.Portal" %>
|
<%@ Import Namespace="WebsitePanel.Portal" %>
|
||||||
|
|
||||||
|
|
||||||
|
@ -16,12 +17,19 @@
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<div class="IconsBlock">
|
<div class="IconsBlock">
|
||||||
<div class="IconsTitle">
|
<div class="IconsTitle">
|
||||||
<asp:hyperlink id=lnkEdit runat="server" NavigateUrl='<%# GetSpaceHomePageUrl((int)Eval("PackageID")) %>'>
|
<asp:hyperlink id="lnkEdit" runat="server" NavigateUrl='<%# GetSpaceHomePageUrl((int)Eval("PackageID")) %>'>
|
||||||
<%# Eval("PackageName") %>
|
<%# Eval("PackageName") %>
|
||||||
</asp:hyperlink>
|
</asp:hyperlink>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<asp:DataList ID="PackageIcons" runat="server" DataSource='<%# GetIconsDataSource((int)Eval("PackageID")) %>'
|
|
||||||
|
<asp:Repeater ID="PackageGroups" runat="server" DataSource='<%# GetIconsDataSource((int)Eval("PackageID")) %>' >
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:hyperlink id="lnkGroup" runat="server">
|
||||||
|
<%# Eval("Text") %>
|
||||||
|
</asp:hyperlink>
|
||||||
|
|
||||||
|
<asp:DataList ID="PackageIcons" runat="server" DataSource='<%# GetIconMenuItems(Eval("ChildItems")) %>'
|
||||||
CellSpacing="1" RepeatColumns="5" RepeatDirection="Horizontal">
|
CellSpacing="1" RepeatColumns="5" RepeatDirection="Horizontal">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Panel ID="IconPanel" runat="server" CssClass="Icon">
|
<asp:Panel ID="IconPanel" runat="server" CssClass="Icon">
|
||||||
|
@ -42,7 +50,15 @@
|
||||||
PopupPosition="Right" HoverCssClass="Icon Hover"></ajaxToolkit:HoverMenuExtender>
|
PopupPosition="Right" HoverCssClass="Icon Hover"></ajaxToolkit:HoverMenuExtender>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:DataList>
|
</asp:DataList>
|
||||||
|
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:Repeater>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<asp:Panel ID="OrgPanel" runat="server" Visible='<%# IsOrgPanelVisible((int)Eval("PackageID")) %>'>
|
||||||
|
<asp:hyperlink ID="linkOrg" runat="server" NavigateUrl='<%# GetOrgPageUrl((int)Eval("PackageID")) %>' meta:resourcekey="linkOrg" Text="Hosted Organization" />
|
||||||
|
<wsp:UserOrganization ID="UserOrganization" runat="server" PackageId='<%# (int)Eval("PackageID") %>' />
|
||||||
|
</asp:Panel>
|
||||||
</div>
|
</div>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:Repeater>
|
</asp:Repeater>
|
||||||
|
|
|
@ -53,7 +53,7 @@ namespace WebsitePanel.Portal
|
||||||
bool isUser = PanelSecurity.SelectedUser.Role == UserRole.User;
|
bool isUser = PanelSecurity.SelectedUser.Role == UserRole.User;
|
||||||
|
|
||||||
// load icons data
|
// load icons data
|
||||||
xmlIcons = this.Module.SelectNodes("Icon");
|
xmlIcons = this.Module.SelectNodes("Group");
|
||||||
|
|
||||||
if (isUser && xmlIcons != null)
|
if (isUser && xmlIcons != null)
|
||||||
{
|
{
|
||||||
|
@ -84,6 +84,12 @@ namespace WebsitePanel.Portal
|
||||||
{
|
{
|
||||||
return PortalUtils.GetSpaceHomePageUrl(spaceId);
|
return PortalUtils.GetSpaceHomePageUrl(spaceId);
|
||||||
}
|
}
|
||||||
|
public string GetOrgPageUrl(int spaceId)
|
||||||
|
{
|
||||||
|
string PID_SPACE_EXCHANGE_SERVER = "SpaceExchangeServer";
|
||||||
|
return NavigatePageURL(PID_SPACE_EXCHANGE_SERVER, PortalUtils.SPACE_ID_PARAM, spaceId.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
protected void odsPackages_Selected(object sender, ObjectDataSourceStatusEventArgs e)
|
protected void odsPackages_Selected(object sender, ObjectDataSourceStatusEventArgs e)
|
||||||
{
|
{
|
||||||
|
@ -124,6 +130,8 @@ namespace WebsitePanel.Portal
|
||||||
return items;
|
return items;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public MenuItemCollection GetIconMenuItems(object menuItems)
|
public MenuItemCollection GetIconMenuItems(object menuItems)
|
||||||
{
|
{
|
||||||
return (MenuItemCollection)menuItems;
|
return (MenuItemCollection)menuItems;
|
||||||
|
@ -134,6 +142,13 @@ namespace WebsitePanel.Portal
|
||||||
return ((MenuItemCollection)menuItems).Count > 0;
|
return ((MenuItemCollection)menuItems).Count > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool IsOrgPanelVisible(int packageId)
|
||||||
|
{
|
||||||
|
PackageContext cntx = PackagesHelper.GetCachedPackageContext(packageId);
|
||||||
|
return cntx.Groups.ContainsKey(ResourceGroups.HostedOrganizations);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private MenuItem CreateMenuItem(PackageContext cntx, XmlNode xmlNode)
|
private MenuItem CreateMenuItem(PackageContext cntx, XmlNode xmlNode)
|
||||||
{
|
{
|
||||||
string pageId = GetXmlAttribute(xmlNode, "pageID");
|
string pageId = GetXmlAttribute(xmlNode, "pageID");
|
||||||
|
@ -181,7 +196,9 @@ namespace WebsitePanel.Portal
|
||||||
}
|
}
|
||||||
|
|
||||||
// process nested menu items
|
// process nested menu items
|
||||||
XmlNodeList xmlMenuNodes = xmlNode.SelectNodes("MenuItems/MenuItem");
|
XmlNodeList xmlMenuNodes = xmlNode.SelectNodes("Icon");
|
||||||
|
if (xmlMenuNodes.Count==0)
|
||||||
|
xmlMenuNodes = xmlNode.SelectNodes("MenuItems/MenuItem");
|
||||||
foreach (XmlNode xmlMenuNode in xmlMenuNodes)
|
foreach (XmlNode xmlMenuNode in xmlMenuNodes)
|
||||||
{
|
{
|
||||||
MenuItem menuItem = CreateMenuItem(cntx, xmlMenuNode);
|
MenuItem menuItem = CreateMenuItem(cntx, xmlMenuNode);
|
||||||
|
@ -189,6 +206,9 @@ namespace WebsitePanel.Portal
|
||||||
item.ChildItems.Add(menuItem);
|
item.ChildItems.Add(menuItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// test
|
||||||
|
//return item;
|
||||||
|
|
||||||
if (display && !(disabled && item.ChildItems.Count == 0))
|
if (display && !(disabled && item.ChildItems.Count == 0))
|
||||||
return item;
|
return item;
|
||||||
|
|
||||||
|
|
|
@ -1,31 +1,3 @@
|
||||||
// Copyright (c) 2014, Outercurve Foundation.
|
|
||||||
// All rights reserved.
|
|
||||||
//
|
|
||||||
// Redistribution and use in source and binary forms, with or without modification,
|
|
||||||
// are permitted provided that the following conditions are met:
|
|
||||||
//
|
|
||||||
// - Redistributions of source code must retain the above copyright notice, this
|
|
||||||
// list of conditions and the following disclaimer.
|
|
||||||
//
|
|
||||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
|
||||||
// this list of conditions and the following disclaimer in the documentation
|
|
||||||
// and/or other materials provided with the distribution.
|
|
||||||
//
|
|
||||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
|
||||||
// contributors may be used to endorse or promote products derived from this
|
|
||||||
// software without specific prior written permission.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
||||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
|
||||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
|
||||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// This code was generated by a tool.
|
// This code was generated by a tool.
|
||||||
|
|