@ -5,12 +5,12 @@
@using Volo.Abp.AspNetCore.Mvc.UI.Packages.Clipboard
@using Volo.Abp.AspNetCore.Mvc.UI.Packages.MalihuCustomScrollbar
@using Volo.Abp.AspNetCore.Mvc.UI.Packages.Popper
@using Volo.Docs.Pages.Documents.Shared.DocumentNotFoundComponent
@using Volo.Abp.AspNetCore.Mvc.UI.Packages.Prismjs
@using Volo.Abp.AspNetCore.Mvc.UI.Theming
@using Volo.Docs
@using Volo.Docs.Localization
@using Volo.Docs.Pages.Documents.Project
@using Volo.Docs.Pages.Documents.Shared.ErrorComponent
@inject IThemeManager ThemeManager
@inject IPageLayout PageLayout
@inject IHtmlLocalizer<DocsResource> L
@ -39,9 +39,10 @@
<abp-script src="/Pages/Documents/Project/bootstrap-toc.js" />
<abp-script src="/Pages/Documents/Shared/Scripts/vs.js" />
<abp-script src="/Pages/Documents/Project/index.js" />
<abp-script src="/Pages/Documents/Shared/ErrorComponent/error.js" />
</abp-script-bundle>
}
@if (Model.DocumentFound )
@if (Model.LoadSuccess )
{
<div class="docs-page" data-spy="scroll" data-target="#docs-sticky-index">
<div class="row justify-content-end">
@ -152,11 +153,11 @@
<label class="input-group-text"><i class="fa fa-filter"></i></label>
</div>
<input class="form-control"
id="filter"
type="search"
data-search-url="@Model."
placeholder="@L["FilterTopics"].Value"
<input class="form-control"
id="filter"
type="search"
data-search-url="@Model."
placeholder="@L["FilterTopics"].Value"
aria-label="Filter">
</div>
</div>
@ -171,11 +172,11 @@
<label class="input-group-text"><i class="fa fa-search"></i></label>
</div>
<input class="form-control"
id="fullsearch"
type="search"
data-fullsearch-url="/search/@Model.LanguageCode/@Model.ProjectName/@Model.Version/"
placeholder="@L["FullSearch"].Value"
<input class="form-control"
id="fullsearch"
type="search"
data-fullsearch-url="/search/@Model.LanguageCode/@Model.ProjectName/@Model.Version/"
placeholder="@L["FullSearch"].Value"
aria-label="Filter">
</div>
</div>
@ -225,8 +226,8 @@
@if (!string.IsNullOrEmpty(Model.Document.EditLink))
{
<a href="@Model.Document.EditLink" target="_blank">
<i class="fa fa-edit"></i>
@(L["Edit"])
<i class="fa fa-edit"></i>
@(L["Edit"])
<span class="for-desktop">(@L["LastEditTime"]: @Model.Document.LastUpdatedTime.ToShortDateString())</span>
</a>
}
@ -348,14 +349,31 @@
}
else
{
@(await Component.InvokeAsync<DocumentNotFoundViewComponent>(new
{
model = new DocumentNotFoundPageModel
if (!Model.ProjectFound)
{
@(await Component.InvokeAsync<ErrorViewComponent>(new
{
model = new ErrorPageModel
{
RedirectUrl = Model.DocumentsUrlPrefix,
ErrorCode = "404",
ErrorMessage = L.GetString("ProjectNotFound")
}
}))
}
if (!Model.DocumentFound)
{
@(await Component.InvokeAsync<ErrorViewComponent>(new
{
ProjectName = Model.ProjectName,
DocumentName = Model.DocumentName,
LanguageCode = Model.LanguageCode,
Version = Model.Version,
}
}))
}
model = new ErrorPageModel
{
RedirectUrl = Model.DocumentsUrlPrefix + Model.LanguageCode + "/" + Model.ProjectName + "/"
+ (Model.LatestVersionInfo.IsSelected ? DocsAppConsts.Latest : Model.Version),
ErrorCode = "404",
ErrorMessage = L.GetString("DocumentNotFound"),
AutoRedirect = !Model.DocumentName.IsNullOrWhiteSpace()
}
}))
}
}