Refactoring (#314)

* Refactoring

* Refactoring

* Check for a valid email.

* Fixed missing character.

* Moved logic to  the Utilities class.

* Rename template .sql file

* Modified null and empty string check.

* Check for a valid email.

* Fixed missing character.

* Moved logic to  the Utilities class.

* Added Favicon support, Progressive Web App support, page title and url support, and private/public user registration options

* Refactoring

* Refactoring

* Check for a valid email.

* Moved logic to  the Utilities class.

Co-authored-by: Aubrey <aubrey.b@treskcow.tech>
Co-authored-by: MIchael Atwood <matwood@dragonmastery.com>
Co-authored-by: Shaun Walker <shaun.walker@siliqon.com>
This commit is contained in:
Hisham Bin Ateya
2020-03-31 17:21:05 +03:00
committed by GitHub
parent c9baa2bb56
commit 66ad089088
82 changed files with 958 additions and 829 deletions

View File

@ -1,28 +1,29 @@
@namespace Oqtane.Themes.Controls
@inherits ThemeControlBase
@if (breadcrumbs != "")
@if (breadcrumbs != string.Empty)
{
@((MarkupString)breadcrumbs)
}
@code {
string breadcrumbs = "";
string breadcrumbs = string.Empty;
protected override void OnParametersSet()
{
breadcrumbs = "";
int? pageid = PageState.Page.PageId;
breadcrumbs = string.Empty;
var pageid = PageState.Page.PageId;
for (int i = PageState.Pages.Count - 1; i >= 0; i--)
{
Page p = PageState.Pages[i];
var p = PageState.Pages[i];
if (p.PageId == pageid)
{
breadcrumbs = "<li class=\"breadcrumb-item" + ((p.PageId == PageState.Page.PageId) ? " active" : "") +
breadcrumbs = "<li class=\"breadcrumb-item" + ((p.PageId == PageState.Page.PageId) ? " active" : string.Empty) +
"\"><a href=\"" + NavigateUrl(p.Path) + "\">" + p.Name + "</a></li>" + breadcrumbs;
pageid = p.ParentId;
}
}
if (breadcrumbs != "")
{
breadcrumbs = "<ol class=\"breadcrumb\">" + breadcrumbs + "</ol>";