mirror of https://github.com/abpframework/abp.git
12 changed files with 274 additions and 19 deletions
@ -1,7 +1,16 @@ |
|||
// This file is part of ProjectsAdminClientProxy, you can customize it here
|
|||
// ReSharper disable once CheckNamespace
|
|||
|
|||
using System.Collections.Generic; |
|||
using System.Threading.Tasks; |
|||
using Volo.Docs.Admin.Projects; |
|||
|
|||
namespace Volo.Docs.Admin.ClientProxies; |
|||
|
|||
public partial class ProjectsAdminClientProxy |
|||
{ |
|||
public async Task<FilterComboboxValuesDto> GetFilterComboboxAsync() |
|||
{ |
|||
return await this.RequestAsync<FilterComboboxValuesDto>(nameof(GetFilterComboboxAsync)); |
|||
} |
|||
} |
|||
|
|||
@ -1,14 +1,35 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Authorization; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Newtonsoft.Json; |
|||
using Volo.Docs.Admin.Documents; |
|||
using Volo.Docs.Admin.Projects; |
|||
using Volo.Docs.Documents.Filter; |
|||
|
|||
namespace Volo.Docs.Admin.Pages.Docs.Admin.Documents; |
|||
|
|||
[Authorize(DocsAdminPermissions.Projects.Default)] |
|||
public class IndexModel : DocsAdminPageModel |
|||
{ |
|||
public virtual Task<IActionResult> OnGet() |
|||
private readonly IDocumentAdminAppService _documentAdminAppService; |
|||
public FilterItems FilterItems { get; set; } |
|||
|
|||
public IndexModel(IDocumentAdminAppService documentAdminAppService) |
|||
{ |
|||
_documentAdminAppService = documentAdminAppService; |
|||
} |
|||
|
|||
|
|||
public string ToJson(object obj) |
|||
{ |
|||
return JsonConvert.SerializeObject(obj); |
|||
} |
|||
public virtual async Task<IActionResult> OnGet() |
|||
{ |
|||
return Task.FromResult<IActionResult>(Page()); |
|||
FilterItems = await _documentAdminAppService.GetFilterItemsAsync(); |
|||
return Page(); |
|||
} |
|||
} |
|||
} |
|||
|
|||
@ -0,0 +1,29 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
|
|||
namespace Volo.Docs.Documents.Filter; |
|||
|
|||
public class FilterItems |
|||
{ |
|||
public IEnumerable<FilterProjectItem> Projects { get; set; } |
|||
public IEnumerable<FilterVersionItem> Versions { get; set; } |
|||
public IEnumerable<FilterLanguageCodeItem> Languages { get; set; } |
|||
public IEnumerable<string> Formats { get; set; } |
|||
} |
|||
public class FilterProjectItem |
|||
{ |
|||
public Guid Id { get; set; } |
|||
public string Name { get; set; } |
|||
} |
|||
public class FilterVersionItem |
|||
{ |
|||
public string Version { get; set; } |
|||
public IEnumerable<Guid> ProjectIds { get; set; } |
|||
public IEnumerable<string> Languages { get; set; } |
|||
} |
|||
public class FilterLanguageCodeItem |
|||
{ |
|||
public string Code { get; set; } |
|||
public IEnumerable<Guid> ProjectIds { get; set; } |
|||
public IEnumerable<string> Versions { get; set; } |
|||
} |
|||
Loading…
Reference in new issue