quick search: "Users" to "Account Home", Users in top

This commit is contained in:
doctogonzo 2015-05-18 10:15:02 +02:00
parent b4d3284c4a
commit de801dcc33
2 changed files with 20 additions and 3 deletions

View file

@ -5289,6 +5289,9 @@
<data name="UserItemType.ExchangeAccount" xml:space="preserve">
<value>Exchange Account</value>
</data>
<data name="UserItemType.Users" xml:space="preserve">
<value>Account Home</value>
</data>
<data name="Error.WEB_PUB_DISABLE" xml:space="preserve">
<value>Could not disable access to Web Publishing feature for the account specified</value>
</data>

View file

@ -101,7 +101,7 @@ namespace WebsitePanel.WebPortal
obj["TextSearch"] = row["PackageName"].ToString();
obj["ItemID"] = row["ItemID"].ToString();
obj["PackageID"] = row["PackageID"].ToString();
obj["FullType"] = "Space";
obj["FullType"] = GetTypeDisplayName("Space");
obj["AccountID"] = row["AccountID"].ToString();
dataList.Add(obj);
}
@ -117,16 +117,21 @@ namespace WebsitePanel.WebPortal
String.Format("%{0}%", filterValue), 0, 0, "", iNumResults, columnType, fullType);
DataTable dt = dsObjectItems.Tables[2];
List<Dictionary<string, string>> dataList = new List<Dictionary<string, string>>();
int currUser = 0;
for (int i = 0; i < dt.Rows.Count; ++i)
{
DataRow row = dt.Rows[i];
string type = row["FullType"].ToString();
Dictionary<string, string> obj = new Dictionary<string, string>();
obj["ColumnType"] = row["ColumnType"].ToString();
obj["TextSearch"] = row["TextSearch"].ToString();
obj["ItemID"] = row["ItemID"].ToString();
obj["PackageID"] = row["PackageID"].ToString();
obj["FullType"] = row["FullType"].ToString();
obj["FullType"] = GetTypeDisplayName(type);
obj["AccountID"] = row["AccountID"].ToString();
if (String.Equals(type, "Users"))
dataList.Insert(currUser++, obj);
else
dataList.Add(obj);
}
@ -136,5 +141,14 @@ namespace WebsitePanel.WebPortal
context.Response.Write(json);
}
}
protected const string ModuleName = "WebsitePanel";
protected string GetTypeDisplayName(string type)
{
return PortalUtils.GetSharedLocalizedString(ModuleName, "ServiceItemType." + type)
?? PortalUtils.GetSharedLocalizedString(ModuleName, "UserItemType." + type)
?? type;
}
}
};