|
|
|
@ -110,10 +110,21 @@ namespace Volo.Docs.Pages.Documents.Project
|
|
|
|
|
VersionSelectItems = Versions.Select(v => new SelectListItem
|
|
|
|
|
{
|
|
|
|
|
Text = v.DisplayText,
|
|
|
|
|
Value = "/documents/" + ProjectName + "/" + v.Version + "/" + DocumentName,
|
|
|
|
|
Value = CreateLink(v.Version, DocumentName),
|
|
|
|
|
Selected = v.IsSelected
|
|
|
|
|
}).ToList();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string CreateLink(string version, string documentName = null)
|
|
|
|
|
{
|
|
|
|
|
var link = "/" + DocsAppConsts.WebsiteLinkFirstSegment + "/" + ProjectName + "/" + version;
|
|
|
|
|
|
|
|
|
|
if (documentName != null)
|
|
|
|
|
{
|
|
|
|
|
link += "/" + DocumentName;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return link;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private VersionInfo GetLatestVersion()
|
|
|
|
@ -126,7 +137,7 @@ namespace Volo.Docs.Pages.Documents.Project
|
|
|
|
|
return latestVersion;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private string GetSpecificVersionOrLatest()
|
|
|
|
|
public string GetSpecificVersionOrLatest()
|
|
|
|
|
{
|
|
|
|
|
return Document.Version == LatestVersionInfo.Version ?
|
|
|
|
|
DocsAppConsts.LatestVersion :
|
|
|
|
|