pull/473/head
Alper Ebicoglu 6 years ago
parent e67939357c
commit 8f79d87def

@ -3,7 +3,11 @@
"texts": {
"Documents": "Documents",
"BackToWebsite": "Back to website",
"Version": "Version"
"Version": "Version",
"Edit": "Edit",
"InThisDocument": "In this document",
"GoToTop": "Go to top",
"Projects": "Project(s)",
"NoProjectWarning": "There are no projects yet!"
}
}

@ -3,7 +3,11 @@
"texts": {
"Documents": "Dökümanlar",
"BackToWebsite": "Ana sayafaya dön",
"Version": "Versiyon"
"Version": "Versiyon",
"Edit": "Düzenle",
"InThisDocument": "Bu dökümanda",
"GoToTop": "En üste çık",
"Projects": "Proje(ler)",
"NoProjectWarning": "Hiç proje yok!"
}
}

@ -1,7 +1,10 @@
@page
@using Castle.Core.Internal
@using Microsoft.AspNetCore.Mvc.Localization
@using Volo.Docs
@using Volo.Docs.Localization
@using Volo.Docs.Pages.Documents
@inject IHtmlLocalizer<DocsResource> L
@model IndexModel
@{
}
@ -16,12 +19,12 @@
@if (Model.Projects.IsNullOrEmpty())
{
<div class="alert alert-secondary text-center" role="alert">
There are no projects yet!
@L["NoProjectWarning"]
</div>
}
@if (Model.Projects.Count > 0)
{
<h1>Project(s)</h1>
<h1>@L["Projects"]</h1>
<p>
<ul style="list-style-type: upper-roman;">
@foreach (var project in Model.Projects)

@ -19,20 +19,19 @@ namespace Volo.Docs.Pages.Documents
public async Task<IActionResult> OnGet()
{
var result = await _projectAppService.GetListAsync();
var listResult = await _projectAppService.GetListAsync();
if (result.Items.Count == 1)
if (listResult.Items.Count == 1)
{
var project = result.Items[0];
return RedirectToPage("./Project/Index", new
{
projectName = project.ShortName,
projectName = listResult.Items[0].ShortName,
version = DocsAppConsts.DefaultVersion.Version,
documentName = project.DefaultDocumentName
documentName = listResult.Items[0].DefaultDocumentName
});
}
Projects = result.Items;
Projects = listResult.Items;
return Page();
}
}

@ -114,7 +114,7 @@
<div class="docs-link-btns">
@if (!string.IsNullOrEmpty(Model.Document.EditLink))
{
<a href="@Model.Document.EditLink" target="_blank"> <i class="fa fa-edit"></i> Edit @*TODO: localize*@</a>
<a href="@Model.Document.EditLink" target="_blank"> <i class="fa fa-edit"></i> @L["Edit"]</a>
}
</div>
@ -134,12 +134,12 @@
<div class="docs-inner-anchors mt-2">
<nav class="navbar p-0 pt-2" data-toggle="toc">
<h5>In this article</h5>
<h5>@L["InThisDocument"]</h5>
</nav>
<div class="row">
<div class="col mt-4 p-0">
<a href="javascript:;" class="scroll-top-btn"><i class="fa fa-chevron-up"></i> Go to Top</a>
<a href="javascript:;" class="scroll-top-btn"><i class="fa fa-chevron-up"></i> @L["GoToTop"]</a>
</div>
</div>
</div>

@ -69,13 +69,14 @@ namespace Volo.Docs.Pages.Documents.Project
ProjectFormat = projectDto.Format;
DocumentNameWithExtension = DocumentName + "." + projectDto.Format;
var versions = await _documentAppService.GetVersions(projectDto.ShortName, projectDto.DefaultDocumentName,
projectDto.ExtraProperties, projectDto.DocumentStoreType, DocumentNameWithExtension);
Versions = versions.Select(v => new VersionInfo(v, v)).ToList();
if (string.Equals(Version, DocsAppConsts.LatestVersion, StringComparison.OrdinalIgnoreCase))
{
LatestVersionInfo.IsSelected = true;
@ -107,8 +108,8 @@ namespace Volo.Docs.Pages.Documents.Project
Navigation = await _documentAppService.GetNavigationDocumentAsync(ProjectName, Version, false);
Navigation.ConvertItems();
}
}
}
Loading…
Cancel
Save