ThemeService Improvements
Centralized the code used to determine the available themes, panes, and containers. This isn't the most "ideal" way to handle this. However, it does improve the management of the code by centralizing the logic for theme selection. Future PR's development might improve this more.
This commit is contained in:
@ -84,14 +84,7 @@
|
||||
{
|
||||
//TODO: Move this to shared component. This is used in this control Add, Edit, and Delete controls as well
|
||||
moduledefinitions = await ModuleDefinitionService.GetModuleDefinitionsAsync();
|
||||
List<Theme> themes = await ThemeService.GetThemesAsync();
|
||||
foreach (Theme theme in themes)
|
||||
{
|
||||
foreach (string container in theme.ContainerControls.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries))
|
||||
{
|
||||
containers.Add(container, theme.Name + " - " + @Utilities.GetTypeNameClass(container));
|
||||
}
|
||||
}
|
||||
containers = ThemeService.CalculateSelectableContainers(await ThemeService.GetThemesAsync());
|
||||
List<Module> modules = await ModuleService.GetModulesAsync(PageState.Site.SiteId, Constants.PageManagementModule);
|
||||
pagemanagementmoduleid = modules.FirstOrDefault().ModuleId;
|
||||
if (UserService.IsAuthorized(PageState.User, PageState.Page.EditPermissions))
|
||||
|
Reference in New Issue
Block a user