updated namespaces, improved page management,
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
@using Oqtane.Services
|
||||
@using Oqtane.Models;
|
||||
@using Oqtane.Security
|
||||
@using Oqtane.Client.Modules.Controls
|
||||
@namespace Oqtane.Modules.Admin.Dashboard
|
||||
@inherits ModuleBase
|
||||
@inject IPageService PageService
|
||||
@inject IUserService UserService
|
||||
@ -22,7 +22,8 @@
|
||||
}
|
||||
}
|
||||
</ul>
|
||||
<br /><br />
|
||||
<br />
|
||||
<br />
|
||||
|
||||
@code {
|
||||
List<Page> pages;
|
@ -5,6 +5,7 @@
|
||||
@using Oqtane.Services
|
||||
@using Oqtane.Providers
|
||||
@using Oqtane.Shared
|
||||
@namespace Oqtane.Modules.Admin.Login
|
||||
@inherits ModuleBase
|
||||
@inject IUriHelper UriHelper
|
||||
@inject IJSRuntime jsRuntime
|
||||
|
@ -1,8 +1,9 @@
|
||||
@using Microsoft.AspNetCore.Components.Routing
|
||||
@using Oqtane.Client.Modules.Controls
|
||||
@using Oqtane.Modules.Controls
|
||||
@using Oqtane.Modules
|
||||
@using Oqtane.Services
|
||||
@using Oqtane.Shared
|
||||
@namespace Oqtane.Modules.Admin.ModuleDefinitions
|
||||
@inherits ModuleBase
|
||||
@inject IUriHelper UriHelper
|
||||
@inject IFileService FileService
|
||||
|
@ -1,9 +1,9 @@
|
||||
@using Oqtane.Services
|
||||
@using Oqtane.Models
|
||||
@using Oqtane.Modules
|
||||
@using Oqtane.Client.Modules.Controls
|
||||
@using Oqtane.Modules.Controls
|
||||
@namespace Oqtane.Modules.Admin.ModuleDefinitions
|
||||
@inherits ModuleBase
|
||||
|
||||
@inject IModuleDefinitionService ModuleDefinitionService
|
||||
|
||||
@if (moduledefinitions == null)
|
||||
|
@ -4,7 +4,8 @@
|
||||
@using Oqtane.Modules
|
||||
@using Oqtane.Shared
|
||||
@using Oqtane.Security
|
||||
@using Oqtane.Client.Modules.Controls
|
||||
@using Oqtane.Modules.Controls
|
||||
@namespace Oqtane.Modules.Admin.ModuleSettings
|
||||
@inherits ModuleBase
|
||||
@inject IUriHelper UriHelper
|
||||
@inject IThemeService ThemeService
|
||||
|
@ -1,10 +1,11 @@
|
||||
@using Microsoft.AspNetCore.Components.Routing
|
||||
@using Oqtane.Client.Modules.Controls
|
||||
@using Oqtane.Modules.Controls
|
||||
@using Oqtane.Models
|
||||
@using Oqtane.Services
|
||||
@using Oqtane.Modules
|
||||
@using Oqtane.Shared
|
||||
@using Oqtane.Security
|
||||
@namespace Oqtane.Modules.Admin.Pages
|
||||
@inherits ModuleBase
|
||||
@inject IUriHelper UriHelper
|
||||
@inject IPageService PageService
|
||||
@ -21,34 +22,44 @@
|
||||
<input class="form-control" @bind="@name" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="Name" class="control-label">Path: </label>
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control" @bind="@path" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="Name" class="control-label">Parent: </label>
|
||||
</td>
|
||||
<td>
|
||||
<select class="form-control" @bind="@parentid">
|
||||
<option value=""><Select Parent></option>
|
||||
@foreach (Page page in PageState.Pages)
|
||||
<select class="form-control" @onchange="@(e => ParentChanged(e))">
|
||||
<option value=""><Site Root></option>
|
||||
@foreach (Page page in pages)
|
||||
{
|
||||
<option value="@(page.PageId)">@(page.Name)</option>
|
||||
<option value="@(page.PageId)">@(new string('-',page.Level * 2))@(page.Name)</option>
|
||||
}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="Name" class="control-label">Order: </label>
|
||||
<label for="Name" class="control-label">Insert: </label>
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control" @bind="@order" />
|
||||
<select class="form-control" @bind="@insert">
|
||||
<option value="<<">At Beginning</option>
|
||||
@if (children != null && children.Count > 0)
|
||||
{
|
||||
<option value="<">Before</option>
|
||||
<option value=">">After</option>
|
||||
}
|
||||
<option value=">>" selected>At End</option>
|
||||
</select>
|
||||
@if (children != null && children.Count > 0 && (insert == "<" || insert == ">"))
|
||||
{
|
||||
<select class="form-control" @bind="@childid">
|
||||
<option value="-1"><Select Page></option>
|
||||
@foreach (Page page in children)
|
||||
{
|
||||
<option value="@(page.PageId)">@(page.Name)</option>
|
||||
}
|
||||
</select>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -129,10 +140,12 @@
|
||||
Dictionary<string, string> themes = new Dictionary<string, string>();
|
||||
Dictionary<string, string> panelayouts = new Dictionary<string, string>();
|
||||
|
||||
List<Page> pages;
|
||||
string name;
|
||||
string path;
|
||||
string parentid;
|
||||
string order = "";
|
||||
string insert;
|
||||
List<Page> children;
|
||||
int childid = -1;
|
||||
string isnavigation = "True";
|
||||
string editmode = "False";
|
||||
string themetype;
|
||||
@ -146,6 +159,9 @@
|
||||
{
|
||||
try
|
||||
{
|
||||
pages = PageState.Pages.Where(item => item.IsNavigation).ToList();
|
||||
children = PageState.Pages.Where(item => item.ParentId == null && item.IsNavigation).OrderBy(item => item.Order).ToList();
|
||||
|
||||
themes = ThemeService.GetThemeTypes(PageState.Themes);
|
||||
panelayouts = ThemeService.GetPaneLayoutTypes(PageState.Themes);
|
||||
|
||||
@ -160,23 +176,63 @@
|
||||
}
|
||||
}
|
||||
|
||||
private void ParentChanged(UIChangeEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
parentid = (string)e.Value;
|
||||
if (string.IsNullOrEmpty(parentid))
|
||||
{
|
||||
children = PageState.Pages.Where(item => item.ParentId == null && item.IsNavigation).OrderBy(item => item.Order).ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
children = PageState.Pages.Where(item => item.ParentId == int.Parse(parentid) && item.IsNavigation).OrderBy(item => item.Order).ToList();
|
||||
}
|
||||
StateHasChanged();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
message = ex.Message;
|
||||
}
|
||||
}
|
||||
|
||||
private async Task SavePage()
|
||||
{
|
||||
try
|
||||
{
|
||||
Page page = new Page();
|
||||
page.SiteId = PageState.Page.SiteId;
|
||||
page.Name = name;
|
||||
if (string.IsNullOrEmpty(parentid))
|
||||
{
|
||||
page.ParentId = null;
|
||||
page.Path = page.Name.ToLower();
|
||||
}
|
||||
else
|
||||
{
|
||||
page.ParentId = Int32.Parse(parentid);
|
||||
Page parent = PageState.Pages.Where(item => item.ParentId == page.ParentId).FirstOrDefault();
|
||||
page.Path = parent.Path + "/" + page.Name.ToLower();
|
||||
}
|
||||
Page child;
|
||||
switch (insert)
|
||||
{
|
||||
case "<<":
|
||||
page.Order = 0;
|
||||
break;
|
||||
case "<":
|
||||
child = PageState.Pages.Where(item => item.PageId == childid).FirstOrDefault();
|
||||
page.Order = child.Order - 1;
|
||||
break;
|
||||
case ">":
|
||||
child = PageState.Pages.Where(item => item.PageId == childid).FirstOrDefault();
|
||||
page.Order = child.Order + 1;
|
||||
break;
|
||||
case ">>":
|
||||
page.Order = int.MaxValue;
|
||||
break;
|
||||
}
|
||||
page.Name = name;
|
||||
page.Path = path;
|
||||
page.Order = (order == null ? 1 : Int32.Parse(order));
|
||||
page.IsNavigation = (isnavigation == null ? true : Boolean.Parse(isnavigation));
|
||||
page.EditMode = (editmode == null ? true : Boolean.Parse(editmode));
|
||||
page.ThemeType = themetype;
|
||||
@ -195,20 +251,15 @@
|
||||
page.Panes = (string)property.GetValue(Activator.CreateInstance(type), null);
|
||||
page.Permissions = permissiongrid.GetPermissions();
|
||||
await PageService.AddPageAsync(page);
|
||||
await PageService.UpdatePageOrderAsync(page.SiteId, page.ParentId);
|
||||
|
||||
PageState.Reload = Constants.ReloadSite;
|
||||
if (PageState.Page.Name == "Page Management")
|
||||
{
|
||||
UriHelper.NavigateTo(NavigateUrl());
|
||||
}
|
||||
else
|
||||
{
|
||||
UriHelper.NavigateTo(NavigateUrl(path));
|
||||
}
|
||||
UriHelper.NavigateTo(NavigateUrl());
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
message = ex.Message;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,10 +1,11 @@
|
||||
@using Microsoft.AspNetCore.Components.Routing
|
||||
@using Oqtane.Client.Modules.Controls
|
||||
@using Oqtane.Modules.Controls
|
||||
@using Oqtane.Models
|
||||
@using Oqtane.Services
|
||||
@using Oqtane.Modules
|
||||
@using Oqtane.Shared
|
||||
@using Oqtane.Security
|
||||
@namespace Oqtane.Modules.Admin.Pages
|
||||
@inherits ModuleBase
|
||||
@inject IUriHelper UriHelper
|
||||
@inject IPageService PageService
|
||||
@ -43,14 +44,6 @@
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="Name" class="control-label">Order: </label>
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control" @bind="@order" readonly />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="Name" class="control-label">Navigation? </label>
|
||||
@ -136,7 +129,6 @@
|
||||
string name;
|
||||
string path;
|
||||
string parentid;
|
||||
string order;
|
||||
string isnavigation;
|
||||
string editmode;
|
||||
string themetype;
|
||||
@ -163,8 +155,6 @@
|
||||
{
|
||||
name = page.Name;
|
||||
path = page.Path;
|
||||
|
||||
order = page.Order.ToString();
|
||||
isnavigation = page.IsNavigation.ToString();
|
||||
editmode = page.EditMode.ToString();
|
||||
themetype = page.ThemeType;
|
||||
|
@ -1,10 +1,11 @@
|
||||
@using Microsoft.AspNetCore.Components.Routing
|
||||
@using Oqtane.Client.Modules.Controls
|
||||
@using Oqtane.Modules.Controls
|
||||
@using Oqtane.Models
|
||||
@using Oqtane.Services
|
||||
@using Oqtane.Modules
|
||||
@using Oqtane.Shared
|
||||
@using Oqtane.Security
|
||||
@namespace Oqtane.Modules.Admin.Pages
|
||||
@inherits ModuleBase
|
||||
@inject IUriHelper UriHelper
|
||||
@inject IPageService PageService
|
||||
@ -26,7 +27,7 @@
|
||||
<label for="Name" class="control-label">Path: </label>
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control" @bind="@path" />
|
||||
<input class="form-control" @bind="@path" readonly />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -34,21 +35,40 @@
|
||||
<label for="Name" class="control-label">Parent: </label>
|
||||
</td>
|
||||
<td>
|
||||
<select class="form-control" @bind="@parentid">
|
||||
<option value=""><Select Parent></option>
|
||||
@foreach (Page page in PageState.Pages)
|
||||
<select class="form-control" @onchange="@(e => ParentChanged(e))">
|
||||
<option value=""><Site Root></option>
|
||||
@foreach (Page page in pages)
|
||||
{
|
||||
<option value="@(page.PageId)">@(page.Name)</option>
|
||||
<option value="@(page.PageId)">@(new string('-', page.Level * 2))@(page.Name)</option>
|
||||
}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="Name" class="control-label">Order: </label>
|
||||
<label for="Name" class="control-label">Move : </label>
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control" @bind="@order" />
|
||||
<select class="form-control" @bind="@insert">
|
||||
<option value=""><Maintain Current Location></option>
|
||||
<option value="<<">To Beginning</option>
|
||||
@if (children != null && children.Count > 0)
|
||||
{
|
||||
<option value="<">Before</option>
|
||||
<option value=">">After</option>
|
||||
}
|
||||
<option value=">>" selected>To End</option>
|
||||
</select>
|
||||
@if (children != null && children.Count > 0 && (insert == "<" || insert == ">"))
|
||||
{
|
||||
<select class="form-control" @bind="@childid">
|
||||
<option value="-1"><Select Page></option>
|
||||
@foreach (Page page in children)
|
||||
{
|
||||
<option value="@(page.PageId)">@(page.Name)</option>
|
||||
}
|
||||
</select>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -132,11 +152,14 @@
|
||||
Dictionary<string, string> themes = new Dictionary<string, string>();
|
||||
Dictionary<string, string> panelayouts = new Dictionary<string, string>();
|
||||
|
||||
List<Page> pages;
|
||||
int PageId;
|
||||
string name;
|
||||
string path;
|
||||
string parentid;
|
||||
string order;
|
||||
string insert = "";
|
||||
List<Page> children;
|
||||
int childid = -1;
|
||||
string isnavigation;
|
||||
string editmode;
|
||||
string themetype;
|
||||
@ -154,6 +177,9 @@
|
||||
{
|
||||
try
|
||||
{
|
||||
pages = PageState.Pages.Where(item => item.IsNavigation).ToList();
|
||||
children = PageState.Pages.Where(item => item.ParentId == null && item.IsNavigation).OrderBy(item => item.Order).ToList();
|
||||
|
||||
themes = ThemeService.GetThemeTypes(PageState.Themes);
|
||||
panelayouts = ThemeService.GetPaneLayoutTypes(PageState.Themes);
|
||||
|
||||
@ -171,7 +197,6 @@
|
||||
{
|
||||
parentid = page.ParentId.ToString();
|
||||
}
|
||||
order = page.Order.ToString();
|
||||
isnavigation = page.IsNavigation.ToString();
|
||||
editmode = page.EditMode.ToString();
|
||||
themetype = page.ThemeType;
|
||||
@ -190,23 +215,67 @@
|
||||
}
|
||||
}
|
||||
|
||||
private void ParentChanged(UIChangeEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
parentid = (string)e.Value;
|
||||
if (string.IsNullOrEmpty(parentid))
|
||||
{
|
||||
children = PageState.Pages.Where(item => item.ParentId == null && item.IsNavigation).OrderBy(item => item.Order).ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
children = PageState.Pages.Where(item => item.ParentId == int.Parse(parentid) && item.IsNavigation).OrderBy(item => item.Order).ToList();
|
||||
}
|
||||
StateHasChanged();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
message = ex.Message;
|
||||
}
|
||||
}
|
||||
|
||||
private async Task SavePage()
|
||||
{
|
||||
try
|
||||
{
|
||||
Page page = PageState.Page;
|
||||
int? currentparentid = page.ParentId;
|
||||
page.PageId = Int32.Parse(PageState.QueryString["id"]);
|
||||
page.Name = name;
|
||||
if (string.IsNullOrEmpty(parentid))
|
||||
{
|
||||
page.ParentId = null;
|
||||
page.Path = page.Name.ToLower();
|
||||
}
|
||||
else
|
||||
{
|
||||
page.ParentId = Int32.Parse(parentid);
|
||||
Page parent = PageState.Pages.Where(item => item.ParentId == page.ParentId).FirstOrDefault();
|
||||
page.Path = parent.Path + "/" + page.Name.ToLower();
|
||||
}
|
||||
if (insert != "")
|
||||
{
|
||||
Page child;
|
||||
switch (insert)
|
||||
{
|
||||
case "<<":
|
||||
page.Order = 0;
|
||||
break;
|
||||
case "<":
|
||||
child = PageState.Pages.Where(item => item.PageId == childid).FirstOrDefault();
|
||||
page.Order = child.Order - 1;
|
||||
break;
|
||||
case ">":
|
||||
child = PageState.Pages.Where(item => item.PageId == childid).FirstOrDefault();
|
||||
page.Order = child.Order + 1;
|
||||
break;
|
||||
case ">>":
|
||||
page.Order = int.MaxValue;
|
||||
break;
|
||||
}
|
||||
}
|
||||
page.Name = name;
|
||||
page.Path = path;
|
||||
page.Order = (order == null ? 1 : Int32.Parse(order));
|
||||
page.IsNavigation = (isnavigation == null ? true : Boolean.Parse(isnavigation));
|
||||
page.EditMode = (editmode == null ? true : Boolean.Parse(editmode));
|
||||
page.ThemeType = themetype;
|
||||
@ -225,16 +294,11 @@
|
||||
page.Panes = (string)property.GetValue(Activator.CreateInstance(type), null);
|
||||
page.Permissions = permissiongrid.GetPermissions();
|
||||
await PageService.UpdatePageAsync(page);
|
||||
await PageService.UpdatePageOrderAsync(page.SiteId, page.ParentId);
|
||||
await PageService.UpdatePageOrderAsync(page.SiteId, currentparentid);
|
||||
|
||||
PageState.Reload = Constants.ReloadSite;
|
||||
if (PageState.Page.Name == "Page Management")
|
||||
{
|
||||
UriHelper.NavigateTo(NavigateUrl());
|
||||
}
|
||||
else
|
||||
{
|
||||
UriHelper.NavigateTo(NavigateUrl(path));
|
||||
}
|
||||
UriHelper.NavigateTo(NavigateUrl());
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
@ -1,15 +1,12 @@
|
||||
@using Oqtane.Client.Modules.Controls
|
||||
@using Oqtane.Modules.Controls
|
||||
@using Oqtane.Services
|
||||
@using Oqtane.Models
|
||||
@using Oqtane.Modules
|
||||
@using Oqtane.Shared
|
||||
@namespace Oqtane.Modules.Admin.Pages
|
||||
@inherits ModuleBase
|
||||
@inject IPageService PageService
|
||||
|
||||
@if (PageState.Pages == null)
|
||||
{
|
||||
<p><em>Loading...</em></p>
|
||||
}
|
||||
else
|
||||
@if (PageState.Pages != null)
|
||||
{
|
||||
<ActionLink Action="Add" Text="Add Page" />
|
||||
<table class="table table-borderless">
|
||||
@ -17,7 +14,6 @@ else
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
<th>Path</th>
|
||||
<th>Name</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -27,14 +23,14 @@ else
|
||||
<tr>
|
||||
<td><ActionLink Action="Edit" Parameters="@($"id=" + page.PageId.ToString())" /></td>
|
||||
<td><ActionLink Action="Delete" Parameters="@($"id=" + page.PageId.ToString())" Class="btn btn-danger" /></td>
|
||||
<td>@(page.Path)</td>
|
||||
<td>@(page.Name)</td>
|
||||
<td>@(new string('-', page.Level * 2))@(page.Name)</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
}
|
||||
|
||||
@code {
|
||||
public override SecurityAccessLevel SecurityAccessLevel { get { return SecurityAccessLevel.Admin; } }
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,9 @@
|
||||
@using Microsoft.AspNetCore.Components.Routing
|
||||
@using Oqtane.Client.Modules.Controls
|
||||
@using Oqtane.Modules.Controls
|
||||
@using Oqtane.Modules
|
||||
@using Oqtane.Models
|
||||
@using Oqtane.Services
|
||||
@namespace Oqtane.Modules.Admin.Profile
|
||||
@inherits ModuleBase
|
||||
@inject IUriHelper UriHelper
|
||||
@inject IUserService UserService
|
||||
|
@ -2,6 +2,7 @@
|
||||
@using Oqtane.Modules
|
||||
@using Oqtane.Models
|
||||
@using Oqtane.Services
|
||||
@namespace Oqtane.Modules.Admin.Register
|
||||
@inherits ModuleBase
|
||||
@inject IUriHelper UriHelper
|
||||
@inject IUserService UserService
|
||||
|
@ -1,7 +1,8 @@
|
||||
@using Oqtane.Services
|
||||
@using Oqtane.Models
|
||||
@using Oqtane.Modules
|
||||
@using Oqtane.Client.Modules.Controls
|
||||
@using Oqtane.Modules.Controls
|
||||
@namespace Oqtane.Modules.Admin.Roles
|
||||
@inherits ModuleBase
|
||||
@inject IRoleService RoleService
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
@using Oqtane.Modules
|
||||
@using Oqtane.Shared
|
||||
@using Oqtane.Security
|
||||
@namespace Oqtane.Modules.Admin.Sites
|
||||
@inherits ModuleBase
|
||||
@inject IUriHelper UriHelper
|
||||
@inject ITenantService TenantService
|
||||
@ -13,52 +14,52 @@
|
||||
|
||||
@if (tenants == null)
|
||||
{
|
||||
<p><em>Loading...</em></p>
|
||||
<p><em>Loading...</em></p>
|
||||
}
|
||||
else
|
||||
{
|
||||
<table class="table table-borderless">
|
||||
<tr>
|
||||
<td>
|
||||
<label for="Name" class="control-label">Tenant: </label>
|
||||
</td>
|
||||
<td>
|
||||
<select class="form-control" @bind="@tenantid">
|
||||
<option value=""><Select Tenant></option>
|
||||
@foreach (Tenant tenant in tenants)
|
||||
{
|
||||
<option value="@tenant.TenantId">@tenant.Name</option>
|
||||
}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="Name" class="control-label">Name: </label>
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control" @bind="@name" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="Name" class="control-label">Alias: </label>
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control" @bind="@url" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="Name" class="control-label">Logo: </label>
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control" @bind="@logo" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<button type="button" class="btn btn-success" @onclick="@SaveSite">Save</button>
|
||||
<NavLink class="btn btn-secondary" href="@NavigateUrl()">Cancel</NavLink>
|
||||
<table class="table table-borderless">
|
||||
<tr>
|
||||
<td>
|
||||
<label for="Name" class="control-label">Tenant: </label>
|
||||
</td>
|
||||
<td>
|
||||
<select class="form-control" @bind="@tenantid">
|
||||
<option value=""><Select Tenant></option>
|
||||
@foreach (Tenant tenant in tenants)
|
||||
{
|
||||
<option value="@tenant.TenantId">@tenant.Name</option>
|
||||
}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="Name" class="control-label">Name: </label>
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control" @bind="@name" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="Name" class="control-label">Alias: </label>
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control" @bind="@url" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="Name" class="control-label">Logo: </label>
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control" @bind="@logo" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<button type="button" class="btn btn-success" @onclick="@SaveSite">Save</button>
|
||||
<NavLink class="btn btn-secondary" href="@NavigateUrl()">Cancel</NavLink>
|
||||
}
|
||||
|
||||
@code {
|
||||
@ -98,7 +99,7 @@ else
|
||||
p.Path = "";
|
||||
p.Order = 1;
|
||||
p.IsNavigation = true;
|
||||
p.ThemeType = "Oqtane.Client.Themes.Theme1.Theme1, Oqtane.Client"; // TODO: should not hardcode
|
||||
p.ThemeType = PageState.Site.DefaultThemeType;
|
||||
p.LayoutType = "";
|
||||
p.Icon = "";
|
||||
Type type = Type.GetType(p.ThemeType);
|
||||
|
@ -1,7 +1,8 @@
|
||||
@using Oqtane.Services
|
||||
@using Oqtane.Models
|
||||
@using Oqtane.Modules
|
||||
@using Oqtane.Client.Modules.Controls
|
||||
@using Oqtane.Modules.Controls
|
||||
@namespace Oqtane.Modules.Admin.Sites
|
||||
@inherits ModuleBase
|
||||
|
||||
@inject ISiteService SiteService
|
||||
|
@ -1,6 +1,7 @@
|
||||
@using Oqtane.Services
|
||||
@using Oqtane.Models
|
||||
@using Oqtane.Modules
|
||||
@namespace Oqtane.Modules.Admin.Themes
|
||||
@inherits ModuleBase
|
||||
|
||||
@inject IThemeService ThemeService
|
||||
|
@ -1,7 +1,8 @@
|
||||
@using Oqtane.Services
|
||||
@using Oqtane.Models
|
||||
@using Oqtane.Modules
|
||||
@using Oqtane.Client.Modules.Controls
|
||||
@using Oqtane.Modules.Controls
|
||||
@namespace Oqtane.Modules.Admin.Users
|
||||
@inherits ModuleBase
|
||||
|
||||
@inject IUserService UserService
|
||||
|
Reference in New Issue
Block a user