|
|
|
@ -1,5 +1,11 @@ |
|
|
|
@page |
|
|
|
@using Microsoft.AspNetCore.Mvc.Localization |
|
|
|
@using Microsoft.AspNetCore.Mvc.TagHelpers |
|
|
|
@using Microsoft.Extensions.Options |
|
|
|
@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Alert |
|
|
|
@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Blockquote |
|
|
|
@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Grid |
|
|
|
@using Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers |
|
|
|
@using Volo.Abp.AspNetCore.Mvc.UI.Layout |
|
|
|
@using Volo.Abp.AspNetCore.Mvc.UI.Packages.Anchor |
|
|
|
@using Volo.Abp.AspNetCore.Mvc.UI.Packages.Clipboard |
|
|
|
@ -8,13 +14,14 @@ |
|
|
|
@using Volo.Abp.AspNetCore.Mvc.UI.Packages.Prismjs |
|
|
|
@using Volo.Abp.AspNetCore.Mvc.UI.Theming |
|
|
|
@using Volo.Docs |
|
|
|
@using Volo.Docs.Areas.Documents.TagHelpers |
|
|
|
@using Volo.Docs.Localization |
|
|
|
@using Volo.Docs.Pages.Documents.Project |
|
|
|
@using Volo.Docs.Pages.Documents.Shared.ErrorComponent |
|
|
|
@using Volo.Docs.Pages.Shared.Components.Head |
|
|
|
@inject IThemeManager ThemeManager |
|
|
|
@inject IPageLayout PageLayout |
|
|
|
@inject IHtmlLocalizer<DocsResource> L |
|
|
|
@inject IOptions<DocsWebGoogleTranslationOptions> DocsWebOptions |
|
|
|
|
|
|
|
@model IndexModel |
|
|
|
@{ |
|
|
|
@ -36,7 +43,7 @@ |
|
|
|
} |
|
|
|
|
|
|
|
@section scripts { |
|
|
|
|
|
|
|
|
|
|
|
@if (Model.LoadSuccess) |
|
|
|
{ |
|
|
|
<abp-script-bundle name="@typeof(IndexModel).FullName"> |
|
|
|
@ -50,6 +57,23 @@ |
|
|
|
<abp-script src="/Pages/Documents/Shared/Scripts/vs.js"/> |
|
|
|
<abp-script src="/Pages/Documents/Project/index.js"/> |
|
|
|
</abp-script-bundle> |
|
|
|
if (DocsWebOptions.Value.UseGoogleTranslation) |
|
|
|
{ |
|
|
|
<script type="text/javascript"> |
|
|
|
function googleTranslateElementInit() { |
|
|
|
new google.translate.TranslateElement({ |
|
|
|
pageLanguage: 'en', |
|
|
|
autoDisplay: false, |
|
|
|
disableAutoTranslation: true, |
|
|
|
includedLanguages: '@string.Join(",", DocsWebOptions.Value.IncludedLanguages)', |
|
|
|
floatPosition: 0, |
|
|
|
layout: google.translate.TranslateElement.InlineLayout.HORIZONTAL |
|
|
|
}, |
|
|
|
'google_translate_element'); |
|
|
|
} |
|
|
|
</script> |
|
|
|
<script type="text/javascript" src="https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script> |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
@ -96,6 +120,13 @@ |
|
|
|
|
|
|
|
<div class="docs-tree-list"> |
|
|
|
<div class="row gx-2 mb-2 "> |
|
|
|
@if (DocsWebOptions.Value.UseGoogleTranslation) |
|
|
|
{ |
|
|
|
<div> |
|
|
|
<span class="google_translate_text">Google Translate</span> |
|
|
|
<div id="google_translate_element" class="mb-3"></div> |
|
|
|
</div> |
|
|
|
} |
|
|
|
@if (Model.ShowProjectsCombobox && Model.ProjectSelectItems.Count > 1) |
|
|
|
{ |
|
|
|
<div class="col-12 mb-2"> |
|
|
|
@ -341,7 +372,7 @@ |
|
|
|
var rowCount = count / maxCellCount + (count % maxCellCount > 0 ? 1 : 0); |
|
|
|
var cellSize = 12 / (count > maxCellCount ? maxCellCount : count); |
|
|
|
var latestCellSize = 12 / count - (rowCount - 1) * maxCellCount; |
|
|
|
|
|
|
|
|
|
|
|
string BuildParameterDivClass(int index) |
|
|
|
{ |
|
|
|
var row = index / maxCellCount; |
|
|
|
@ -349,7 +380,7 @@ |
|
|
|
var currentCellSize = isLastRow ? latestCellSize : cellSize; |
|
|
|
return $"col-12 col-lg-{currentCellSize} mb-lg-{(isLastRow ? "0" : "2")} {(index == count - 1 ? "" : "mb-2")}"; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
for (var i = 0; i < count; ++i) |
|
|
|
{ |
|
|
|
var parameter = Model.DocumentPreferences.Parameters[i]; |
|
|
|
@ -391,11 +422,11 @@ |
|
|
|
</abp-alert> |
|
|
|
} |
|
|
|
@Html.Raw(Model.Document.Content) |
|
|
|
|
|
|
|
|
|
|
|
@if (Model.DocumentNavigationsDto.HasValues) |
|
|
|
{ |
|
|
|
<hr class="my-4"/> |
|
|
|
|
|
|
|
|
|
|
|
<div class="row navigation"> |
|
|
|
<div class="col-6"> |
|
|
|
@if (Model.DocumentNavigationsDto.HasPrevious) |
|
|
|
|