Merge pull request #607 from chlupac/SiteRouterFix

small fixes
This commit is contained in:
Shaun Walker 2020-06-12 13:04:44 -04:00 committed by GitHub
commit 1a0e8f7e19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 9 deletions

View File

@ -90,7 +90,8 @@
if (!string.IsNullOrEmpty(IconName)) if (!string.IsNullOrEmpty(IconName))
{ {
_iconSpan = $"<span class=\"oi oi-{IconName}\"></span>&nbsp;"; _iconSpan = $"<span class=\"oi oi-{IconName}\"></span>{(IconOnly?"":"&nbsp")}";
} }
_url = EditUrl(Action, _parameters); _url = EditUrl(Action, _parameters);

View File

@ -361,22 +361,28 @@
string panes = ""; string panes = "";
Type themetype = Type.GetType(page.ThemeType); Type themetype = Type.GetType(page.ThemeType);
if (themetype != null)
{
var themeobject = Activator.CreateInstance(themetype) as IThemeControl; var themeobject = Activator.CreateInstance(themetype) as IThemeControl;
if (themeobject != null) if (themeobject != null)
{ {
panes = themeobject.Panes; panes = themeobject.Panes;
page.Resources = ManagePageResources(page.Resources, themeobject.Resources); page.Resources = ManagePageResources(page.Resources, themeobject.Resources);
} }
}
if (!string.IsNullOrEmpty(page.LayoutType)) if (!string.IsNullOrEmpty(page.LayoutType))
{ {
Type layouttype = Type.GetType(page.LayoutType); Type layouttype = Type.GetType(page.LayoutType);
if (layouttype != null)
{
var layoutobject = Activator.CreateInstance(layouttype) as ILayoutControl; var layoutobject = Activator.CreateInstance(layouttype) as ILayoutControl;
if (layoutobject != null) if (layoutobject != null)
{ {
panes = layoutobject.Panes; panes = layoutobject.Panes;
} }
} }
}
page.Panes = panes.Replace(";", ",").Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList(); page.Panes = panes.Replace(";", ",").Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList();
} }

View File

@ -75,7 +75,7 @@ namespace Oqtane.Controllers
private User Filter(User user) private User Filter(User user)
{ {
if (user != null && !User.IsInRole(Constants.AdminRole) && User.Identity.Name != user.Username) if (user != null && !User.IsInRole(Constants.AdminRole) && User.Identity.Name?.ToLower() != user.Username.ToLower())
{ {
user.DisplayName = ""; user.DisplayName = "";
user.Email = ""; user.Email = "";