Merge pull request #60 from oqtane/master

sync
This commit is contained in:
Shaun Walker 2020-10-25 13:11:01 -04:00 committed by GitHub
commit 15aa2c2e47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 63 additions and 21 deletions

View File

@ -1,5 +1,5 @@
@namespace Oqtane.Modules.Controls
@inherits ModuleControlBase
@namespace Oqtane.Modules.Controls
@inherits LocalizableComponent
@if (_visible)
{
@ -17,9 +17,9 @@
<div class="modal-footer">
@if (!string.IsNullOrEmpty(Action))
{
<button type="button" class="@Class" @onclick="Confirm">@((MarkupString)_iconSpan) @Action</button>
<button type="button" class="@Class" @onclick="Confirm">@((MarkupString)_iconSpan) @Localize(Action)</button>
}
<button type="button" class="btn btn-secondary" @onclick="DisplayModal">Cancel</button>
<button type="button" class="btn btn-secondary" @onclick="DisplayModal">@Localize("Cancel")</button>
</div>
</div>
</div>
@ -76,6 +76,8 @@
protected override void OnParametersSet()
{
base.OnParametersSet();
if (string.IsNullOrEmpty(Text))
{
Text = Action;
@ -95,6 +97,12 @@
_iconSpan = $"<span class=\"oi oi-{IconName}\"></span>&nbsp;";
}
if (IsLocalizable)
{
Header = Localize(nameof(Header));
Message = Localize(nameof(Message));
}
_authorized = IsAuthorized();
}

View File

@ -1,5 +1,5 @@
@namespace Oqtane.Modules.Controls
@inherits ModuleControlBase
@namespace Oqtane.Modules.Controls
@inherits LocalizableComponent
<div class="d-flex">
<div>
@ -41,4 +41,16 @@
_heading = (!string.IsNullOrEmpty(Heading)) ? Heading : Name;
_expanded = (!string.IsNullOrEmpty(Expanded)) ? Expanded : "false";
}
protected override void OnParametersSet()
{
base.OnParametersSet();
if (IsLocalizable)
{
_heading = !string.IsNullOrEmpty(Heading)
? Localize(nameof(Heading))
: Localize(nameof(Name));
}
}
}

View File

@ -1,5 +1,5 @@
@namespace Oqtane.Modules.Controls
@inherits ModuleControlBase
@namespace Oqtane.Modules.Controls
@inherits LocalizableComponent
@if (Name == Parent.ActiveTab)
{
@ -32,4 +32,26 @@ else
base.OnInitialized();
Parent.AddTabPanel((TabPanel)this);
}
protected override void OnParametersSet()
{
base.OnParametersSet();
if (IsLocalizable)
{
if (string.IsNullOrEmpty(Heading))
{
Name = Localize(nameof(Name));
}
else
{
Heading = Localize(nameof(Heading));
}
}
}
public string DisplayHeading()
{
return (string.IsNullOrEmpty(Heading)) ? Name : Heading;
}
}

View File

@ -1,4 +1,4 @@
@namespace Oqtane.Modules.Controls
@namespace Oqtane.Modules.Controls
@inherits ModuleControlBase
<CascadingValue Value="this">
@ -11,13 +11,13 @@
@if (tabPanel.Name == ActiveTab)
{
<a class="nav-link active" data-toggle="tab" href="#@tabPanel.Name" role="tab" @onclick:preventDefault="true">
@DisplayHeading(tabPanel.Name, tabPanel.Heading)
@tabPanel.DisplayHeading()
</a>
}
else
{
<a class="nav-link" data-toggle="tab" href="#@tabPanel.Name" role="tab" @onclick:preventDefault="true">
@DisplayHeading(tabPanel.Name, tabPanel.Heading)
@tabPanel.DisplayHeading()
</a>
}
</li>
@ -57,9 +57,4 @@
}
StateHasChanged();
}
private string DisplayHeading(string Name, string Heading)
{
return (string.IsNullOrEmpty(Heading)) ? Name : Heading;
}
}

View File

@ -12,7 +12,7 @@ Please note that this project is owned by the .NET Foundation and is governed by
# Getting Started
**Using the latest repository source code:**
**Using the latest repository source code ( ie. version 2.0.0 ):**
- Install **[.NET 5 RC2 SDK (v5.0.100-rc.2.20479.15)](https://dotnet.microsoft.com/download/dotnet/5.0)**.
@ -43,15 +43,18 @@ Please note that this project is owned by the .NET Foundation and is governed by
- If you are getting started with Oqtane, a [series of videos](https://www.youtube.com/watch?v=JPfUZPlRRCE&list=PLYhXmd7yV0elLNLfQwZBUlM7ZSMYPTZ_f) are available which explain how to install the product, interact with the user interface, and develop custom modules.
# Documentation
There is a separate [Documentation repository](https://github.com/oqtane/oqtane.docs) which contains a variety of types of documentation for Oqtane, including API documentation that is auto generated using Docfx. The contents of the repository is published to Githib Pages and is available at [https://docs.oqtane.org](https://docs.oqtane.org/)
# 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.
V.2.0.0 ( estimated release date Nov 10, 2020 )
- [ ] Migrate to .NET 5
- [ ] Static Localization ( ie. labels, help text, etc.. )
- [ ] Migration to .NET 5
- [x] Static Localization ( ie. labels, help text, etc.. )
- [ ] Admin UI markup optimization
V1.0.0 (MVP) - Released in conjunction with .NET Core 3.2 ( May 2020 )
V.1.x - Initial version released in conjunction with .NET Core 3.2 ( May 2020 )
- [x] Multi-Tenant ( Shared Database & Isolated Database )
- [x] Modular Architecture
- [x] Headless API with Swagger Support
@ -66,8 +69,10 @@ V1.0.0 (MVP) - Released in conjunction with .NET Core 3.2 ( May 2020 )
- [x] Recycle Bin
- [x] Scheduled Jobs ( Background Processing )
- [x] Notifications / Email Delivery
- [x] Auto-Upgrade Framework
- [x] Seamless Upgrade Experience
- [x] Progressive Web Application Support
- [x] JavaScript Lazy Loading
- [x] CSS Dynamic/Lazy Loading
Future Consideration
- [ ] DB Migrations for framework installation/upgrade