Change Skin -> Theme

To better align with commonly used terminology in industry renamed all references from Skin -> Theme.
This commit is contained in:
Mitchel Sellers
2019-05-12 23:38:58 -05:00
parent 54b769381b
commit f4aa88a529
47 changed files with 336 additions and 334 deletions

View File

@ -6,7 +6,7 @@
@using Oqtane.Client.Modules.Controls
@inherits ModuleBase
@inject IUriHelper UriHelper
@inject ISkinService SkinService
@inject IThemeService ThemeService
@inject IModuleService ModuleService
@inject IPageModuleService PageModuleService
@ -80,12 +80,12 @@
protected override async Task OnInitAsync()
{
title = ModuleState.Title;
List<Skin> Skins = await SkinService.GetSkinsAsync();
foreach (Skin skin in Skins)
List<Theme> Themes = await ThemeService.GetThemesAsync();
foreach (Theme theme in Themes)
{
foreach (string container in skin.ContainerControls.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries))
foreach (string container in theme.ContainerControls.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries))
{
containers.Add(container, skin.Name + " - " + @Utilities.GetTypeNameClass(container));
containers.Add(container, theme.Name + " - " + @Utilities.GetTypeNameClass(container));
}
}
containertype = ModuleState.ContainerType;

View File

@ -7,7 +7,7 @@
@inherits ModuleBase
@inject IUriHelper UriHelper
@inject IPageService PageService
@inject ISkinService SkinService
@inject IThemeService ThemeService
<table class="form-group">
<tr>
@ -61,14 +61,14 @@
</tr>
<tr>
<td>
<label for="Name" class="control-label">Skin: </label>
<label for="Name" class="control-label">Theme: </label>
</td>
<td>
<select class="form-control" bind="@skintype">
<option value="">&lt;Select Skin&gt;</option>
@foreach (KeyValuePair<string, string> skin in skins)
<select class="form-control" bind="@themetype">
<option value="">&lt;Select Theme&gt;</option>
@foreach (KeyValuePair<string, string> item in themes)
{
<option value="@skin.Key">@skin.Value</option>
<option value="@item.Key">@item.Value</option>
}
</select>
</td>
@ -118,7 +118,7 @@
@functions {
public override SecurityAccessLevelEnum SecurityAccessLevel { get { return SecurityAccessLevelEnum.Admin; } }
Dictionary<string, string> skins = new Dictionary<string, string>();
Dictionary<string, string> themes = new Dictionary<string, string>();
Dictionary<string, string> panelayouts = new Dictionary<string, string>();
string name;
@ -126,7 +126,7 @@
string parentid;
string order = "";
string isnavigation = "True";
string skintype;
string themetype;
string layouttype = "";
string icon = "";
string viewpermissions = "All Users";
@ -134,16 +134,16 @@
protected override async Task OnInitAsync()
{
List<Skin> Skins = await SkinService.GetSkinsAsync();
foreach (Skin skin in Skins)
List<Theme> Themes = await ThemeService.GetThemesAsync();
foreach (Theme theme in Themes)
{
foreach (string skincontrol in skin.SkinControls.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries))
foreach (string themecontrol in theme.ThemeControls.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries))
{
skins.Add(skincontrol, skin.Name + " - " + @Utilities.GetTypeNameClass(skincontrol));
themes.Add(themecontrol, theme.Name + " - " + @Utilities.GetTypeNameClass(themecontrol));
}
foreach (string panelayout in skin.PaneLayouts.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries))
foreach (string panelayout in theme.PaneLayouts.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries))
{
panelayouts.Add(panelayout, skin.Name + " - " + @Utilities.GetTypeNameClass(panelayout));
panelayouts.Add(panelayout, theme.Name + " - " + @Utilities.GetTypeNameClass(panelayout));
}
}
}
@ -164,7 +164,7 @@
p.Path = path;
p.Order = (order == null ? 1 : Int32.Parse(order));
p.IsNavigation = (isnavigation == null ? true : Boolean.Parse(isnavigation));
p.SkinType = skintype;
p.ThemeType = themetype;
p.LayoutType = (layouttype == null ? "" : layouttype);
p.Icon = (icon == null ? "" : icon);
Type type;
@ -174,7 +174,7 @@
}
else
{
type = Type.GetType(skintype);
type = Type.GetType(themetype);
}
System.Reflection.PropertyInfo property = type.GetProperty("Panes");
p.Panes = (string)property.GetValue(Activator.CreateInstance(type), null);

View File

@ -7,7 +7,7 @@
@inherits ModuleBase
@inject IUriHelper UriHelper
@inject IPageService PageService
@inject ISkinService SkinService
@inject IThemeService ThemeService
<table class="form-group">
<tr>
@ -61,14 +61,14 @@
</tr>
<tr>
<td>
<label for="Name" class="control-label">Skin: </label>
<label for="Name" class="control-label">Theme: </label>
</td>
<td>
<select class="form-control" bind="@skintype">
<option value="">&lt;Select Skin&gt;</option>
@foreach (KeyValuePair<string, string> skin in skins)
<select class="form-control" bind="@themetype">
<option value="">&lt;Select Theme&gt;</option>
@foreach (KeyValuePair<string, string> item in themes)
{
<option value="@skin.Key">@skin.Value</option>
<option value="@item.Key">@item.Value</option>
}
</select>
</td>
@ -118,7 +118,7 @@
@functions {
public override SecurityAccessLevelEnum SecurityAccessLevel { get { return SecurityAccessLevelEnum.Admin; } }
Dictionary<string, string> skins = new Dictionary<string, string>();
Dictionary<string, string> themes = new Dictionary<string, string>();
Dictionary<string, string> panelayouts = new Dictionary<string, string>();
int PageId;
@ -127,7 +127,7 @@
string parentid;
string order;
string isnavigation;
string skintype;
string themetype;
string layouttype;
string icon;
string viewpermissions;
@ -135,16 +135,16 @@
protected override async Task OnInitAsync()
{
List<Skin> Skins = await SkinService.GetSkinsAsync();
foreach (Skin skin in Skins)
List<Theme> Themes = await ThemeService.GetThemesAsync();
foreach (Theme theme in Themes)
{
foreach (string skincontrol in skin.SkinControls.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries))
foreach (string themecontrol in theme.ThemeControls.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries))
{
skins.Add(skincontrol, skin.Name + " - " + @Utilities.GetTypeNameClass(skincontrol));
themes.Add(themecontrol, theme.Name + " - " + @Utilities.GetTypeNameClass(themecontrol));
}
foreach (string panelayout in skin.PaneLayouts.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries))
foreach (string panelayout in theme.PaneLayouts.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries))
{
panelayouts.Add(panelayout, skin.Name + " - " + @Utilities.GetTypeNameClass(panelayout));
panelayouts.Add(panelayout, theme.Name + " - " + @Utilities.GetTypeNameClass(panelayout));
}
}
@ -157,7 +157,7 @@
order = p.Order.ToString();
isnavigation = p.IsNavigation.ToString();
skintype = p.SkinType;
themetype = p.ThemeType;
layouttype = p.LayoutType;
icon = p.Icon;
viewpermissions = p.ViewPermissions;

View File

@ -7,7 +7,7 @@
@inherits ModuleBase
@inject IUriHelper UriHelper
@inject IPageService PageService
@inject ISkinService SkinService
@inject IThemeService ThemeService
<table class="form-group">
<tr>
@ -61,14 +61,14 @@
</tr>
<tr>
<td>
<label for="Name" class="control-label">Skin: </label>
<label for="Name" class="control-label">Theme: </label>
</td>
<td>
<select class="form-control" bind="@skintype">
<option value="">&lt;Select Skin&gt;</option>
@foreach (KeyValuePair<string, string> skin in skins)
<select class="form-control" bind="@themetype">
<option value="">&lt;Select Theme&gt;</option>
@foreach (KeyValuePair<string, string> item in themes)
{
<option value="@skin.Key">@skin.Value</option>
<option value="@item.Key">@item.Value</option>
}
</select>
</td>
@ -118,7 +118,7 @@
@functions {
public override SecurityAccessLevelEnum SecurityAccessLevel { get { return SecurityAccessLevelEnum.Admin; } }
Dictionary<string, string> skins = new Dictionary<string, string>();
Dictionary<string, string> themes = new Dictionary<string, string>();
Dictionary<string, string> panelayouts = new Dictionary<string, string>();
int PageId;
@ -127,7 +127,7 @@
string parentid;
string order;
string isnavigation;
string skintype;
string themetype;
string layouttype;
string icon;
string viewpermissions;
@ -135,16 +135,16 @@
protected override async Task OnInitAsync()
{
List<Skin> Skins = await SkinService.GetSkinsAsync();
foreach (Skin skin in Skins)
List<Theme> Themes = await ThemeService.GetThemesAsync();
foreach (Theme theme in Themes)
{
foreach (string skincontrol in skin.SkinControls.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries))
foreach (string themeControl in theme.ThemeControls.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries))
{
skins.Add(skincontrol, skin.Name + " - " + @Utilities.GetTypeNameClass(skincontrol));
themes.Add(themeControl, theme.Name + " - " + @Utilities.GetTypeNameClass(themeControl));
}
foreach (string panelayout in skin.PaneLayouts.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries))
foreach (string panelayout in theme.PaneLayouts.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries))
{
panelayouts.Add(panelayout, skin.Name + " - " + @Utilities.GetTypeNameClass(panelayout));
panelayouts.Add(panelayout, theme.Name + " - " + @Utilities.GetTypeNameClass(panelayout));
}
}
@ -164,7 +164,7 @@
}
order = p.Order.ToString();
isnavigation = p.IsNavigation.ToString();
skintype = p.SkinType;
themetype = p.ThemeType;
layouttype = p.LayoutType;
icon = p.Icon;
viewpermissions = p.ViewPermissions;
@ -188,7 +188,7 @@
p.Path = path;
p.Order = (order == null ? 1 : Int32.Parse(order));
p.IsNavigation = (isnavigation == null ? true : Boolean.Parse(isnavigation));
p.SkinType = skintype;
p.ThemeType = themetype;
p.LayoutType = (layouttype == null ? "" : layouttype);
p.Icon = (icon == null ? "" : icon);
Type type;
@ -198,7 +198,7 @@
}
else
{
type = Type.GetType(skintype);
type = Type.GetType(themetype);
}
System.Reflection.PropertyInfo property = type.GetProperty("Panes");
p.Panes = (string)property.GetValue(Activator.CreateInstance(type), null);

View File

@ -1,12 +1,11 @@
@using Oqtane.Services
@using Oqtane.Models
@using Oqtane.Modules
@using Oqtane.Client.Modules.Controls
@inherits ModuleBase
@inject ISkinService SkinService
@inject IThemeService ThemeService
@if (Skins == null)
@if (Themes == null)
{
<p><em>Loading...</em></p>
}
@ -19,10 +18,10 @@ else
</tr>
</thead>
<tbody>
@foreach (var Skin in Skins)
@foreach (var theme in Themes)
{
<tr>
<td>@Skin.Name</td>
<td>@theme.Name</td>
</tr>
}
</tbody>
@ -32,10 +31,10 @@ else
@functions {
public override SecurityAccessLevelEnum SecurityAccessLevel { get { return SecurityAccessLevelEnum.Host; } }
List<Skin> Skins;
List<Theme> Themes;
protected override async Task OnInitAsync()
{
Skins = await SkinService.GetSkinsAsync();
Themes = await ThemeService.GetThemesAsync();
}
}