|
|
|
@ -22,7 +22,7 @@ |
|
|
|
@inject IThemeManager ThemeManager |
|
|
|
@inject IPageLayout PageLayout |
|
|
|
@inject IHtmlLocalizer<DocsResource> L |
|
|
|
@inject IOptions<DocsWebGoogleOptions> DocsWebOptions |
|
|
|
@inject IOptions<DocsWebGoogleOptions> DocsWebGoogleOptions |
|
|
|
|
|
|
|
@model IndexModel |
|
|
|
@{ |
|
|
|
@ -58,15 +58,15 @@ |
|
|
|
<abp-script src="/Pages/Documents/Shared/Scripts/vs.js"/> |
|
|
|
<abp-script src="/Pages/Documents/Project/index.js"/> |
|
|
|
</abp-script-bundle> |
|
|
|
if (DocsWebOptions.Value.EnableGoogleTranslation) |
|
|
|
if (DocsWebGoogleOptions.Value.EnableGoogleTranslate) |
|
|
|
{ |
|
|
|
<script type="text/javascript"> |
|
|
|
function googleTranslateElementInit() { |
|
|
|
new google.translate.TranslateElement({ |
|
|
|
pageLanguage: '@DocsWebOptions.Value.GetCultureLanguageCode(CultureInfo.CurrentUICulture)', |
|
|
|
pageLanguage: '@DocsWebGoogleOptions.Value.GetCultureLanguageCode(CultureInfo.CurrentUICulture)', |
|
|
|
autoDisplay: false, |
|
|
|
disableAutoTranslation: true, |
|
|
|
includedLanguages: '@string.Join(",", DocsWebOptions.Value.IncludedLanguages)', |
|
|
|
includedLanguages: '@string.Join(",", DocsWebGoogleOptions.Value.IncludedLanguages)', |
|
|
|
layout: google.translate.TranslateElement.InlineLayout.HORIZONTAL |
|
|
|
}, 'google_translate_element'); |
|
|
|
} |
|
|
|
@ -86,9 +86,9 @@ |
|
|
|
</script> |
|
|
|
<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script> |
|
|
|
} |
|
|
|
if (DocsWebOptions.Value.EnableGoogleProgrammableSearchEngine) |
|
|
|
if (DocsWebGoogleOptions.Value.EnableGoogleProgrammableSearchEngine) |
|
|
|
{ |
|
|
|
<script async src="https://cse.google.com/cse.js?cx=@DocsWebOptions.Value.GoogleSearchEngineId"></script> |
|
|
|
<script async src="https://cse.google.com/cse.js?cx=@DocsWebGoogleOptions.Value.GoogleSearchEngineId"></script> |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
@ -218,7 +218,7 @@ |
|
|
|
} |
|
|
|
</div> |
|
|
|
|
|
|
|
@if (DocsWebOptions.Value.EnableGoogleTranslation) |
|
|
|
@if (DocsWebGoogleOptions.Value.EnableGoogleTranslate) |
|
|
|
{ |
|
|
|
<div class="docs-version mt-2 skiptranslate"> |
|
|
|
<span>@L["GoogleTranslate"]</span> |
|
|
|
@ -323,7 +323,7 @@ |
|
|
|
</div> |
|
|
|
} |
|
|
|
|
|
|
|
@if (DocsWebOptions.Value.EnableGoogleProgrammableSearchEngine) |
|
|
|
@if (DocsWebGoogleOptions.Value.EnableGoogleProgrammableSearchEngine) |
|
|
|
{ |
|
|
|
<div class="gcse-search"></div> |
|
|
|
} |
|
|
|
|