commit
15236d78d4
@ -20,7 +20,7 @@ else
|
||||
</Header>
|
||||
<Row>
|
||||
<td><ActionLink Action="Edit" Parameters="@($"id=" + context.AliasId.ToString())" /></td>
|
||||
<td><ActionDialog Header="Delete Site" Message="@("Are You Sure You Wish To Delete The " + context.Name + " Site?")" Action="Delete" Security="SecurityAccessLevel.Host" Class="btn btn-danger" OnClick="@(async () => await DeleteSite(context))" /></td>
|
||||
<td><ActionDialog Header="Delete Site" Message="@("Are You Sure You Wish To Delete The " + context.Name + " Site?")" Action="Delete" Security="SecurityAccessLevel.Host" Class="btn btn-danger" OnClick="@(async () => await DeleteSite(context))" Disabled="sites.Count == 1" /></td>
|
||||
<td><a href="@(scheme + context.Name)">@context.Name</a></td>
|
||||
</Row>
|
||||
</Pager>
|
||||
|
@ -28,7 +28,14 @@
|
||||
}
|
||||
@if (authorized)
|
||||
{
|
||||
<button class="@Class" @onclick="DisplayModal">@Text</button>
|
||||
if (Disabled)
|
||||
{
|
||||
<button class="@Class" disabled @onclick="DisplayModal">@Text</button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<button class="@Class" @onclick="DisplayModal">@Text</button>
|
||||
}
|
||||
}
|
||||
|
||||
@code {
|
||||
@ -36,13 +43,13 @@
|
||||
public string Header { get; set; } // required
|
||||
|
||||
[Parameter]
|
||||
public string Message { get; set; } // required
|
||||
public string Message { get; set; } // required
|
||||
|
||||
[Parameter]
|
||||
public string Text { get; set; } // optional - defaults to Action if not specified
|
||||
|
||||
[Parameter]
|
||||
public string Action { get; set; } // optional
|
||||
public string Action { get; set; } // optional
|
||||
|
||||
[Parameter]
|
||||
public SecurityAccessLevel? Security { get; set; } // optional - can be used to explicitly specify SecurityAccessLevel
|
||||
@ -50,6 +57,9 @@
|
||||
[Parameter]
|
||||
public string Class { get; set; } // optional
|
||||
|
||||
[Parameter]
|
||||
public bool Disabled { get; set; } // optional
|
||||
|
||||
[Parameter]
|
||||
public string EditMode { get; set; } // optional - specifies if a user must be in edit mode to see the action - default is true
|
||||
|
||||
|
@ -4,7 +4,14 @@
|
||||
|
||||
@if (authorized)
|
||||
{
|
||||
<NavLink class="@classname" href="@url" style="@style">@text</NavLink>
|
||||
if (Disabled)
|
||||
{
|
||||
<NavLink class="@classname" href="@url" style="@style" disabled>@text</NavLink>
|
||||
}
|
||||
else
|
||||
{
|
||||
<NavLink class="@classname" href="@url" style="@style">@text</NavLink>
|
||||
}
|
||||
}
|
||||
|
||||
@code {
|
||||
@ -26,6 +33,9 @@
|
||||
[Parameter]
|
||||
public string Style { get; set; } // optional
|
||||
|
||||
[Parameter]
|
||||
public bool Disabled { get; set; } // optional
|
||||
|
||||
[Parameter]
|
||||
public string EditMode { get; set; } // optional - specifies if a user must be in edit mode to see the action - default is true
|
||||
|
||||
|
@ -190,7 +190,10 @@
|
||||
{
|
||||
page = pages.Where(item => item.Path == path).FirstOrDefault();
|
||||
reload = Reload.Page;
|
||||
editmode = page.EditMode;
|
||||
if (page!=null)
|
||||
{
|
||||
editmode = page.EditMode;
|
||||
}
|
||||
}
|
||||
|
||||
user = null;
|
||||
|
@ -301,7 +301,7 @@
|
||||
|
||||
private async Task AddModule()
|
||||
{
|
||||
if (UserSecurity.IsAuthorized(PageState.User, "Edit", PageState.Page.Permissions))
|
||||
if (UserSecurity.IsAuthorized(PageState.User, "Edit", PageState.Page.Permissions) && !string.IsNullOrWhiteSpace(moduledefinitionname) && moduledefinitionname != "-")
|
||||
{
|
||||
if (moduletype == "new")
|
||||
{
|
||||
|
@ -87,8 +87,15 @@ namespace Oqtane.Controllers
|
||||
[Authorize(Roles = Constants.HostRole)]
|
||||
public void Delete(int id)
|
||||
{
|
||||
Sites.DeleteSite(id);
|
||||
logger.Log(LogLevel.Information, this, LogFunction.Delete, "Site Deleted {SiteId}", id);
|
||||
if (Sites.GetSites().Count() > 1)
|
||||
{
|
||||
Sites.DeleteSite(id);
|
||||
logger.Log(LogLevel.Information, this, LogFunction.Delete, "Site Deleted {SiteId}", id);
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.Log(LogLevel.Warning, this, LogFunction.Delete, "Unable to delete the root site.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -142,10 +142,13 @@ namespace Oqtane.Repository
|
||||
}
|
||||
|
||||
public void DeleteSite(int siteId)
|
||||
{
|
||||
Site site = db.Site.Find(siteId);
|
||||
db.Site.Remove(site);
|
||||
db.SaveChanges();
|
||||
{
|
||||
if (db.Site.Count() > 1)
|
||||
{
|
||||
var site = db.Site.Find(siteId);
|
||||
db.Site.Remove(site);
|
||||
db.SaveChanges();
|
||||
}
|
||||
}
|
||||
|
||||
private void CreateSite(Site site)
|
||||
|
@ -2,4 +2,4 @@
|
||||
"ConnectionStrings": {
|
||||
"DefaultConnection": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
30
README.md
30
README.md
@ -7,9 +7,9 @@ Oqtane uses Blazor, a new web framework for .NET Core that lets you build intera
|
||||
|
||||
**To get started with Oqtane:**
|
||||
|
||||
1. Oqtane is currently compatible with **[.NET Core 3.1](https://dotnet.microsoft.com/download/dotnet-core/3.1)**.
|
||||
1. Install **[.NET Core 3.1 SDK](https://dotnet.microsoft.com/download/dotnet-core/3.1)**.
|
||||
|
||||
2. Install the latest edition of [Visual Studio 2019](https://visualstudio.com/vs/) (version 16.4 or higher) with the **ASP.NET and web development** workload. Installing the latest edition will also install the latest version of .NET Core 3.1.
|
||||
2. Install the latest edition of [Visual Studio 2019](https://visualstudio.com/vs/) (version 16.4 or higher) with the **ASP.NET and web development** workload. If you do not have a SQL Server installation available already and you wish to use LocalDB for development, you must also install the **.NET desktop development workload**.
|
||||
|
||||
3. Download or Clone the Oqtane source code to your local system. Open the **Oqtane.sln** solution file. If you want to develop using **server-side** Blazor (which includes a full debugging experience in Visual Studio) you should choose to Build the solution using the default Debug configuration. If you want to develop using **client-side** Blazor (WebAssembly) you should first choose the "Wasm" configuration option in the Visual Studio toolbar and then Build.
|
||||
|
||||
@ -18,6 +18,29 @@ Oqtane uses Blazor, a new web framework for .NET Core that lets you build intera
|
||||
# Roadmap
|
||||
This project is a work in progress and the schedule for implementing enhancements is dependent upon the availability of community members who are willing/able to assist.
|
||||
|
||||
V1 (MVP)
|
||||
- Multi-Tenant ( Shared Database & Isolated Database ) **done**
|
||||
- Modular Architecture / Headless API **done**
|
||||
- Dynamic Page Compositing Model / Site & Page Management **done**
|
||||
- Authentication / User Management / Profile Management **done**
|
||||
- Authorization / Roles Management / Granular Permissions **done**
|
||||
- Dynamic Routing **done**
|
||||
- Extensibility via Custom Modules **done**
|
||||
- Extensibility via Custom Themes **done**
|
||||
- Event Logging **done**
|
||||
- Folder / File Management **done**
|
||||
- Recycle Bin **done**
|
||||
- Scheduled Jobs ( Background Processing ) **done**
|
||||
- Notifications / Email Delivery **done**
|
||||
- Auto-Upgrade Framework **done**
|
||||
|
||||
V.Next
|
||||
- Optional Encryption of Settings Values ( ie. via an IsSecure flag )
|
||||
- Localization
|
||||
- Migrate to Code-Behind Pattern ( *.razor.cs )
|
||||
- Generic Repository Pattern
|
||||
- JwT token authentication
|
||||
|
||||
# Background
|
||||
Oqtane was created by [Shaun Walker](https://www.linkedin.com/in/shaunbrucewalker/) and is inspired by the DotNetNuke web application framework. Initially created as a proof of concept, Oqtane is a native Blazor application written from the ground up using modern .NET Core technology. It is a modular application framework offering a fully dynamic page compositing model, multi-site support, designer friendly templates (skins), and extensibility via third party modules.
|
||||
|
||||
@ -55,3 +78,6 @@ Control panel for adding, editing, and deleting pages as well as adding new modu
|
||||
|
||||

|
||||
|
||||
Admin dashboard for accessing the variuous administrative features of the framework:
|
||||
|
||||

|
||||
|
Reference in New Issue
Block a user