|
|
@ -57,6 +57,8 @@ namespace Volo.Docs.Pages.Documents.Project |
|
|
public List<SelectListItem> LanguageSelectListItems { get; set; } |
|
|
public List<SelectListItem> LanguageSelectListItems { get; set; } |
|
|
|
|
|
|
|
|
public string DocumentNameWithExtension { get; private set; } |
|
|
public string DocumentNameWithExtension { get; private set; } |
|
|
|
|
|
|
|
|
|
|
|
public string DocumentPageTitle { get; private set; } |
|
|
|
|
|
|
|
|
public DocumentWithDetailsDto Document { get; private set; } |
|
|
public DocumentWithDetailsDto Document { get; private set; } |
|
|
|
|
|
|
|
|
@ -195,6 +197,7 @@ namespace Volo.Docs.Pages.Documents.Project |
|
|
|
|
|
|
|
|
await SetNavigationAsync(); |
|
|
await SetNavigationAsync(); |
|
|
SetLanguageSelectListItems(); |
|
|
SetLanguageSelectListItems(); |
|
|
|
|
|
SetDocumentPageTitle(); |
|
|
|
|
|
|
|
|
return Page(); |
|
|
return Page(); |
|
|
} |
|
|
} |
|
|
@ -459,12 +462,18 @@ namespace Volo.Docs.Pages.Documents.Project |
|
|
Version = Version |
|
|
Version = Version |
|
|
} |
|
|
} |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
catch (DocumentNotFoundException) //TODO: What if called on a remote service which may return 404
|
|
|
catch (DocumentNotFoundException) //TODO: What if called on a remote service which may return 404
|
|
|
{ |
|
|
{ |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void SetDocumentPageTitle() |
|
|
|
|
|
{ |
|
|
|
|
|
DocumentPageTitle = Navigation.FindNavigation(DocumentNameWithExtension)?.Text ?? DocumentName?.Replace("-", " "); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
public string CreateVersionLink(VersionInfoViewModel latestVersion, string version, string documentName = null) |
|
|
public string CreateVersionLink(VersionInfoViewModel latestVersion, string version, string documentName = null) |
|
|
{ |
|
|
{ |
|
|
|