mirror of https://github.com/abpframework/abp.git
committed by
GitHub
222 changed files with 6882 additions and 801 deletions
File diff suppressed because it is too large
@ -0,0 +1,44 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
#nullable disable |
|||
|
|||
namespace Migrations |
|||
{ |
|||
/// <inheritdoc />
|
|||
public partial class add_pdf_file : Migration |
|||
{ |
|||
/// <inheritdoc />
|
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.CreateTable( |
|||
name: "DocsProjectPdfFiles", |
|||
columns: table => new |
|||
{ |
|||
ProjectId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
FileName = table.Column<string>(type: "nvarchar(450)", nullable: false), |
|||
Version = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
LanguageCode = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_DocsProjectPdfFiles", x => new { x.ProjectId, x.FileName }); |
|||
table.ForeignKey( |
|||
name: "FK_DocsProjectPdfFiles_DocsProjects_ProjectId", |
|||
column: x => x.ProjectId, |
|||
principalTable: "DocsProjects", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
} |
|||
|
|||
/// <inheritdoc />
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropTable( |
|||
name: "DocsProjectPdfFiles"); |
|||
} |
|||
} |
|||
} |
|||
@ -1,3 +1,3 @@ |
|||
{ |
|||
"ConnectionString": "Server=localhost;Database=VoloDocs;Trusted_Connection=True;TrustServerCertificate=True" |
|||
"ConnectionString": "Server=localhost;Database=VoloDocs;Trusted_Connection=True;TrustServerCertificate=True", |
|||
} |
|||
@ -0,0 +1,12 @@ |
|||
using System; |
|||
|
|||
namespace Volo.Docs.Admin.Projects; |
|||
|
|||
public class DeletePdfFileInput |
|||
{ |
|||
public Guid ProjectId { get; set; } |
|||
|
|||
public string Version { get; set; } |
|||
|
|||
public string LanguageCode { get; set; } |
|||
} |
|||
@ -0,0 +1,9 @@ |
|||
using System; |
|||
using Volo.Abp.Application.Dtos; |
|||
|
|||
namespace Volo.Docs.Admin.Projects; |
|||
|
|||
public class GetPdfFilesInput : PagedAndSortedResultRequestDto |
|||
{ |
|||
public Guid ProjectId { get; set; } |
|||
} |
|||
@ -0,0 +1,14 @@ |
|||
using System; |
|||
|
|||
namespace Volo.Docs.Admin.Projects; |
|||
|
|||
[Serializable] |
|||
public class ProjectPdfFileDto |
|||
{ |
|||
public virtual Guid ProjectId { get; set; } |
|||
public virtual string FileName { get; set; } |
|||
public virtual string Version { get; set; } |
|||
public virtual string LanguageCode { get; set; } |
|||
public virtual DateTime CreationTime { get; set; } |
|||
public virtual DateTime? LastModificationTime { get; set; } |
|||
} |
|||
File diff suppressed because it is too large
@ -0,0 +1,47 @@ |
|||
@page |
|||
@using Microsoft.AspNetCore.Mvc.Localization |
|||
@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal |
|||
@using Volo.Docs.Admin.Pages.Docs.Admin.Projects; |
|||
@using Volo.Docs.Localization |
|||
@model GeneratePdfModal |
|||
@inject IHtmlLocalizer<DocsResource> L |
|||
@{ |
|||
Layout = null; |
|||
} |
|||
|
|||
<abp-modal> |
|||
<abp-modal-header title="@(L["GeneratePdf"].Value + " - " + Model.ViewModel.ShortName)"></abp-modal-header> |
|||
<abp-modal-body> |
|||
<input id="ProjectId" name="ProjectId" value="@Model.ViewModel.ProjectId" hidden/> |
|||
<input id="ShortName" name="ShortName" value="@Model.ViewModel.ShortName" hidden/> |
|||
<div class="mb-3"> |
|||
<label class="form-label" for="Version">@L["Version"]</label> |
|||
<select name="Version" id="Version" class="form-select mt-2"> |
|||
@foreach (var version in Model.ViewModel.Versions) |
|||
{ |
|||
<option value="@version.Value">@version.Value</option> |
|||
} |
|||
</select> |
|||
</div> |
|||
<div class="mb-3"> |
|||
<label class="form-label" for="Language">@L["Language"]</label> |
|||
<select name="Language" id="Language" class="form-select mt-2"> |
|||
@foreach (var language in Model.ViewModel.Languages) |
|||
{ |
|||
<option value="@language.Value">@language.Value</option> |
|||
} |
|||
</select> |
|||
</div> |
|||
<div class="form-check mb-3"> |
|||
<label class="form-check-label" for="ForceToGenerate"> |
|||
<input id="ForceToGenerate" type="checkbox" class="form-check-input" /> |
|||
@L["ForceToGenerateNewPdf"] |
|||
</label> |
|||
</div> |
|||
</abp-modal-body> |
|||
<abp-modal-footer buttons="@(AbpModalButtons.None)"> |
|||
<button type="button" class="btn btn-sm btn-link" data-bs-dismiss="modal">@L["Close"]</button> |
|||
<button type="button" class="btn btn-sm btn-outline-primary" id="GenerateBtn" data-busy-text="@L["Generating"].Value"><span>@L["GeneratePdf"]</span></button> |
|||
<button type="button" class="btn btn-sm btn-primary" id="GenerateAndDownloadPdfBtn">@L["GenerateAndDownloadPdf"]</button> |
|||
</abp-modal-footer> |
|||
</abp-modal> |
|||
@ -0,0 +1,62 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Microsoft.AspNetCore.Mvc.Rendering; |
|||
using Volo.Docs.Admin.Projects; |
|||
using Volo.Docs.Common.Documents; |
|||
using Volo.Docs.Common.Projects; |
|||
using Volo.Docs.Projects; |
|||
|
|||
namespace Volo.Docs.Admin.Pages.Docs.Admin.Projects; |
|||
|
|||
public class GeneratePdfModal : DocsAdminPageModel |
|||
{ |
|||
protected IDocumentPdfGeneratorAppService DocumentPdfGeneratorAppService { get; } |
|||
protected IProjectAppService ProjectAppService { get; } |
|||
protected IProjectAdminAppService ProjectAdminAppService { get; } |
|||
|
|||
public GeneratePdfViewModel ViewModel { get; set; } |
|||
|
|||
public GeneratePdfModal( |
|||
IDocumentPdfGeneratorAppService documentPdfGeneratorAppService, |
|||
IProjectAppService projectAppService, |
|||
IProjectAdminAppService projectAdminAppService) |
|||
{ |
|||
DocumentPdfGeneratorAppService = documentPdfGeneratorAppService; |
|||
ProjectAppService = projectAppService; |
|||
ProjectAdminAppService = projectAdminAppService; |
|||
} |
|||
|
|||
public virtual async Task<IActionResult> OnGetAsync(Guid id) |
|||
{ |
|||
var project = await ProjectAdminAppService.GetAsync(id); |
|||
var versions = await ProjectAppService.GetVersionsAsync(project.ShortName); |
|||
if(versions.Items.Count == 0) |
|||
{ |
|||
versions.Items = |
|||
[ |
|||
new VersionInfoDto { Name = ProjectConsts.Latest, DisplayName = ProjectConsts.Latest } |
|||
]; |
|||
} |
|||
var languages = await ProjectAppService.GetLanguageListAsync(project.ShortName, versions.Items.FirstOrDefault()?.Name); |
|||
ViewModel = new GeneratePdfViewModel |
|||
{ |
|||
ProjectId = id, |
|||
ShortName = project.ShortName, |
|||
Versions = versions.Items.Select(x => new SelectListItem(x.DisplayName, x.Name)).ToList(), |
|||
Languages = languages.Languages.Select(x => new SelectListItem(x.DisplayName, x.Code)).ToList() |
|||
}; |
|||
|
|||
return Page(); |
|||
} |
|||
|
|||
public class GeneratePdfViewModel |
|||
{ |
|||
public Guid ProjectId { get; set; } |
|||
public string ShortName { get; set; } |
|||
public List<SelectListItem> Versions { get; set; } |
|||
public List<SelectListItem> Languages { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,41 @@ |
|||
@page |
|||
@using Microsoft.AspNetCore.Mvc.Localization |
|||
@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal |
|||
@using Volo.Docs.Localization |
|||
@model Volo.Docs.Admin.Pages.Docs.Admin.Projects.ManagePdfFiles |
|||
@inject IHtmlLocalizer<DocsResource> L |
|||
|
|||
@{ |
|||
Layout = null; |
|||
} |
|||
|
|||
<abp-modal size="@(AbpModalSize.Large)"> |
|||
<abp-modal-header title="@L["ManagePdfFiles"].Value"></abp-modal-header> |
|||
<abp-modal-body> |
|||
<abp-card> |
|||
<abp-card-header> |
|||
<abp-row> |
|||
<abp-column size-md="_12" class="text-end"> |
|||
<abp-button button-type="Primary" icon="plus" text="@L["GeneratePdf"].Value" id="GeneratePdfBtn" /> |
|||
</abp-column> |
|||
</abp-row> |
|||
</abp-card-header> |
|||
<abp-card-body> |
|||
<abp-table id="ProjectPdfFilesTable" class="nowrap"> |
|||
<thead> |
|||
<tr> |
|||
<th>@L["Actions"]</th> |
|||
<th>@L["FileName"]</th> |
|||
<th>@L["Version"]</th> |
|||
<th>@L["LanguageCode"]</th> |
|||
<th>@L["CreationTime"]</th> |
|||
<th>@L["LastUpdateTime"]</th> |
|||
</tr> |
|||
</thead> |
|||
</abp-table> |
|||
</abp-card-body> |
|||
</abp-card> |
|||
</abp-modal-body> |
|||
<abp-modal-footer buttons="@(AbpModalButtons.Close|AbpModalButtons.Save)"> |
|||
</abp-modal-footer> |
|||
</abp-modal> |
|||
@ -0,0 +1,14 @@ |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Authorization; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
|
|||
namespace Volo.Docs.Admin.Pages.Docs.Admin.Projects; |
|||
|
|||
[Authorize(DocsAdminPermissions.Projects.Default)] |
|||
public class ManagePdfFiles : DocsAdminPageModel |
|||
{ |
|||
public virtual Task<IActionResult> OnGet() |
|||
{ |
|||
return Task.FromResult<IActionResult>(Page()); |
|||
} |
|||
} |
|||
@ -0,0 +1,81 @@ |
|||
var abp = abp || {}; |
|||
$(function () { |
|||
abp.modals.projectGeneratePdf = function () { |
|||
|
|||
var l = abp.localization.getResource('Docs'); |
|||
var projectAppService = volo.docs.projects.docsProject; |
|||
var pdfGeneratorAppService = volo.docs.documents.docsDocumentPdfGenerator; |
|||
var projectAdminAppService = volo.docs.admin.projectsAdmin; |
|||
|
|||
var initModal = function (publicApi, args) { |
|||
|
|||
}; |
|||
|
|||
$("#Versions").change(function () { |
|||
var shortname = $("#ShortName").val(); |
|||
var version = $("#Version").val(); |
|||
projectAppService.getLanguageList(shortname, version).done(function (result) { |
|||
$("#Language").empty(); |
|||
$.each(result.languages, function (index, item) { |
|||
$("#Language").append($(`<option value="${item.code}">${item.displayName}</option>`)); |
|||
}); |
|||
}); |
|||
}) |
|||
|
|||
$("#GenerateBtn").click(function () { |
|||
var $btn = $(this); |
|||
$btn.buttonBusy(true); |
|||
$("#GenerateAndDownloadPdfBtn").buttonBusy(true); |
|||
var input = { |
|||
projectId: $("#ProjectId").val(), |
|||
version: $("#Version").val(), |
|||
languageCode: $("#Language").val(), |
|||
} |
|||
|
|||
function generatePdf(input) { |
|||
pdfGeneratorAppService.generatePdf(input, { |
|||
abpHandleError : false, |
|||
error: function (jqXHR) { |
|||
if (jqXHR.status === 200) { |
|||
abp.message.success(l('PdfFileDeletedSuccessfully')); |
|||
$btn.buttonBusy(false); |
|||
$("#GenerateAndDownloadPdfBtn").buttonBusy(false); |
|||
} else { |
|||
abp.ajax.handleErrorStatusCode(jqXHR.status); |
|||
} |
|||
} |
|||
}); |
|||
} |
|||
if(shouldForceToGenerate(input)){ |
|||
projectAdminAppService.deletePdfFile(input).done(() =>{ |
|||
generatePdf(input); |
|||
}); |
|||
}else{ |
|||
generatePdf(input); |
|||
} |
|||
}) |
|||
|
|||
$("#GenerateAndDownloadPdfBtn").click(function () { |
|||
var input = { |
|||
projectId: $("#ProjectId").val(), |
|||
version: $("#Version").val(), |
|||
languageCode: $("#Language").val(), |
|||
} |
|||
if(shouldForceToGenerate(input)){ |
|||
projectAdminAppService.deletePdfFile(input).done(() =>{ |
|||
window.open(abp.appPath + 'api/docs/documents/pdf' + abp.utils.buildQueryString([{ name: 'projectId', value: input.projectId }, { name: 'version', value: input.version }, { name: 'languageCode', value: input.languageCode }]), '_blank'); |
|||
}); |
|||
}else{ |
|||
window.open(abp.appPath + 'api/docs/documents/pdf' + abp.utils.buildQueryString([{ name: 'projectId', value: input.projectId }, { name: 'version', value: input.version }, { name: 'languageCode', value: input.languageCode }]), '_blank'); |
|||
} |
|||
}) |
|||
|
|||
function shouldForceToGenerate(input) { |
|||
return $("#ForceToGenerate").is(":checked"); |
|||
} |
|||
|
|||
return { |
|||
initModal: initModal, |
|||
}; |
|||
}; |
|||
}); |
|||
@ -0,0 +1,94 @@ |
|||
var abp = abp || {}; |
|||
$(function () { |
|||
abp.modals.projectManagePdfFiles = function () { |
|||
|
|||
var l = abp.localization.getResource('Docs'); |
|||
var projectAdminAppService = volo.docs.admin.projectsAdmin; |
|||
|
|||
var _generatePdfModal = new abp.ModalManager({ |
|||
viewUrl: abp.appPath + 'Docs/Admin/Projects/GeneratePdf', |
|||
modalClass: 'projectGeneratePdf', |
|||
}); |
|||
|
|||
var initModal = function (publicApi, args) { |
|||
var _dataTable = $('#ProjectPdfFilesTable').DataTable( |
|||
abp.libs.datatables.normalizeConfiguration({ |
|||
processing: true, |
|||
serverSide: true, |
|||
scrollX: true, |
|||
paging: true, |
|||
searching: false, |
|||
autoWidth: false, |
|||
scrollCollapse: true, |
|||
order: [[2, 'desc']], |
|||
ajax: abp.libs.datatables.createAjax( |
|||
volo.docs.admin.projectsAdmin.getPdfFiles, |
|||
{ |
|||
projectId : args.projectId |
|||
} |
|||
), |
|||
columnDefs: [ |
|||
{ |
|||
rowAction: { |
|||
items: [ |
|||
{ |
|||
text: l('Delete'), |
|||
confirmMessage: function (data) { |
|||
return l('PdfFileDeletionWarningMessage', data.record.fileName); |
|||
}, |
|||
action: function (data) { |
|||
projectAdminAppService.deletePdfFile({ |
|||
projectId: data.record.projectId, |
|||
version: data.record.version, |
|||
languageCode: data.record.languageCode |
|||
}).then(() => { |
|||
_dataTable.ajax.reloadEx(); |
|||
abp.notify.success(l('PdfGeneratedSuccessfully')); |
|||
}) |
|||
}, |
|||
} |
|||
], |
|||
}, |
|||
}, |
|||
{ |
|||
target: 1, |
|||
data: 'fileName', |
|||
}, |
|||
{ |
|||
target: 2, |
|||
data: 'version', |
|||
}, |
|||
{ |
|||
target: 3, |
|||
data: 'languageCode', |
|||
}, |
|||
{ |
|||
target: 4, |
|||
data: `creationTime`, |
|||
dataFormat: "datetime" |
|||
}, |
|||
{ |
|||
target: 5, |
|||
data: `lastModificationTime`, |
|||
dataFormat: "datetime" |
|||
} |
|||
], |
|||
}) |
|||
); |
|||
|
|||
$('#GeneratePdfBtn').click(function () { |
|||
_generatePdfModal.open({ |
|||
Id: args.projectId, |
|||
}); |
|||
}); |
|||
|
|||
_generatePdfModal.onClose(function () { |
|||
_dataTable.ajax.reloadEx(); |
|||
}); |
|||
}; |
|||
|
|||
return { |
|||
initModal: initModal, |
|||
}; |
|||
}; |
|||
}); |
|||
@ -0,0 +1,68 @@ |
|||
/* This file is automatically generated by ABP framework to use MVC Controllers from javascript. */ |
|||
|
|||
|
|||
// module docs-common
|
|||
|
|||
(function(){ |
|||
|
|||
// controller volo.docs.documents.docsDocumentPdfGenerator
|
|||
|
|||
(function(){ |
|||
|
|||
abp.utils.createNamespace(window, 'volo.docs.documents.docsDocumentPdfGenerator'); |
|||
|
|||
volo.docs.documents.docsDocumentPdfGenerator.generatePdf = function(input, ajaxParams) { |
|||
return abp.ajax($.extend(true, { |
|||
url: abp.appPath + 'api/docs/documents/pdf' + abp.utils.buildQueryString([{ name: 'projectId', value: input.projectId }, { name: 'version', value: input.version }, { name: 'languageCode', value: input.languageCode }]) + '', |
|||
type: 'GET' |
|||
}, ajaxParams)); |
|||
}; |
|||
|
|||
})(); |
|||
|
|||
// controller volo.docs.projects.docsProject
|
|||
|
|||
(function(){ |
|||
|
|||
abp.utils.createNamespace(window, 'volo.docs.projects.docsProject'); |
|||
|
|||
volo.docs.projects.docsProject.getList = function(ajaxParams) { |
|||
return abp.ajax($.extend(true, { |
|||
url: abp.appPath + 'api/docs/projects', |
|||
type: 'GET' |
|||
}, ajaxParams)); |
|||
}; |
|||
|
|||
volo.docs.projects.docsProject.get = function(shortName, ajaxParams) { |
|||
return abp.ajax($.extend(true, { |
|||
url: abp.appPath + 'api/docs/projects/' + shortName + '', |
|||
type: 'GET' |
|||
}, ajaxParams)); |
|||
}; |
|||
|
|||
volo.docs.projects.docsProject.getDefaultLanguageCode = function(shortName, version, ajaxParams) { |
|||
return abp.ajax($.extend(true, { |
|||
url: abp.appPath + 'api/docs/projects/' + shortName + '/defaultLanguage' + abp.utils.buildQueryString([{ name: 'version', value: version }]) + '', |
|||
type: 'GET' |
|||
}, { dataType: 'text' }, ajaxParams)); |
|||
}; |
|||
|
|||
volo.docs.projects.docsProject.getVersions = function(shortName, ajaxParams) { |
|||
return abp.ajax($.extend(true, { |
|||
url: abp.appPath + 'api/docs/projects/' + shortName + '/versions', |
|||
type: 'GET' |
|||
}, ajaxParams)); |
|||
}; |
|||
|
|||
volo.docs.projects.docsProject.getLanguageList = function(shortName, version, ajaxParams) { |
|||
return abp.ajax($.extend(true, { |
|||
url: abp.appPath + 'api/docs/projects/' + shortName + '/' + version + '/languageList', |
|||
type: 'GET' |
|||
}, ajaxParams)); |
|||
}; |
|||
|
|||
})(); |
|||
|
|||
})(); |
|||
|
|||
|
|||
@ -0,0 +1,33 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
<Import Project="..\..\..\..\configureawait.props" /> |
|||
<Import Project="..\..\..\..\common.props" /> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFrameworks>netstandard2.0;netstandard2.1;net8.0;net9.0</TargetFrameworks> |
|||
<AssemblyName>Volo.Docs.Common.Application.Contracts</AssemblyName> |
|||
<PackageId>Volo.Docs.Common.Application.Contracts</PackageId> |
|||
<GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest> |
|||
<RootNamespace /> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<EmbeddedResource Include="Volo\Docs\Common\Localization\Resources\Docs\ApplicationContracts\*.json" /> |
|||
<Content Remove="Volo\Docs\Common\Localization\Resources\Docs\ApplicationContracts\*.json" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\Volo.Docs.Domain.Shared\Volo.Docs.Domain.Shared.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.Ddd.Application.Contracts\Volo.Abp.Ddd.Application.Contracts.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.Authorization.Abstractions\Volo.Abp.Authorization.Abstractions.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<Folder Include="Volo\Docs\Common\Localization\Resources\Docs\" /> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -0,0 +1,31 @@ |
|||
using Volo.Abp.Application; |
|||
using Volo.Abp.Authorization; |
|||
using Volo.Abp.Localization; |
|||
using Volo.Abp.Modularity; |
|||
using Volo.Abp.VirtualFileSystem; |
|||
using Volo.Docs.Localization; |
|||
|
|||
namespace Volo.Docs.Common; |
|||
|
|||
[DependsOn( |
|||
typeof(DocsDomainSharedModule), |
|||
typeof(AbpDddApplicationContractsModule), |
|||
typeof(AbpAuthorizationAbstractionsModule) |
|||
)] |
|||
public class DocsCommonApplicationContractsModule : AbpModule |
|||
{ |
|||
public override void ConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
Configure<AbpVirtualFileSystemOptions>(options => |
|||
{ |
|||
options.FileSets.AddEmbedded<DocsCommonApplicationContractsModule>(); |
|||
}); |
|||
|
|||
Configure<AbpLocalizationOptions>(options => |
|||
{ |
|||
options.Resources |
|||
.Get<DocsResource>() |
|||
.AddVirtualJson("Volo/Docs/Common/Localization/Resources/Docs/ApplicationContracts"); |
|||
}); |
|||
} |
|||
} |
|||
@ -0,0 +1,21 @@ |
|||
using Volo.Abp.Authorization.Permissions; |
|||
using Volo.Abp.Localization; |
|||
using Volo.Docs.Localization; |
|||
|
|||
namespace Volo.Docs.Common |
|||
{ |
|||
public class DocsCommonPermissionDefinitionProvider : PermissionDefinitionProvider |
|||
{ |
|||
public override void Define(IPermissionDefinitionContext context) |
|||
{ |
|||
var group = context.AddGroup(DocsCommonPermissions.GroupName, L("Permission:DocumentManagement.Common")); |
|||
|
|||
group.AddPermission(DocsCommonPermissions.Projects.PdfGeneration, L("Permission:PdfGeneration")); |
|||
} |
|||
|
|||
private static LocalizableString L(string name) |
|||
{ |
|||
return LocalizableString.Create<DocsResource>(name); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,19 @@ |
|||
using Volo.Abp.Reflection; |
|||
|
|||
namespace Volo.Docs.Common |
|||
{ |
|||
public class DocsCommonPermissions |
|||
{ |
|||
public const string GroupName = "Docs.Common"; |
|||
|
|||
public static class Projects |
|||
{ |
|||
public const string PdfGeneration = GroupName + ".PdfGeneration"; |
|||
} |
|||
|
|||
public static string[] GetAll() |
|||
{ |
|||
return ReflectionHelper.GetPublicConstantsRecursively(typeof(DocsCommonPermissions)); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,9 @@ |
|||
namespace Volo.Docs.Common |
|||
{ |
|||
public static class DocsCommonRemoteServiceConsts |
|||
{ |
|||
public const string RemoteServiceName = "AbpDocsCommon"; |
|||
|
|||
public const string ModuleName = "docs-common"; |
|||
} |
|||
} |
|||
@ -0,0 +1,12 @@ |
|||
using System; |
|||
|
|||
namespace Volo.Docs.Common.Documents; |
|||
|
|||
public class DocumentPdfGeneratorInput |
|||
{ |
|||
public Guid ProjectId { get; set; } |
|||
|
|||
public string Version { get; set; } |
|||
|
|||
public string LanguageCode { get; set; } |
|||
} |
|||
@ -0,0 +1,10 @@ |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.Application.Services; |
|||
using Volo.Abp.Content; |
|||
|
|||
namespace Volo.Docs.Common.Documents; |
|||
|
|||
public interface IDocumentPdfGeneratorAppService : IApplicationService |
|||
{ |
|||
Task<IRemoteStreamContent> GeneratePdfAsync(DocumentPdfGeneratorInput input); |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
{ |
|||
"culture": "ar", |
|||
"texts": { |
|||
"Permission:DocumentManagement.Common": "إدارة المستندات العامة", |
|||
"Permission:PdfGeneration": "إنشاء ملفات PDF" |
|||
} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
{ |
|||
"culture": "cs", |
|||
"texts": { |
|||
"Permission:DocumentManagement.Common": "Správa dokumentů", |
|||
"Permission:PdfGeneration": "Generování PDF" |
|||
} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
{ |
|||
"culture": "de-DE", |
|||
"texts": { |
|||
"Permission:DocumentManagement.Common": "Dokumentenverwaltung", |
|||
"Permission:PdfGeneration": "PDF-Generierung" |
|||
} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
{ |
|||
"culture": "de", |
|||
"texts": { |
|||
"Permission:DocumentManagement.Common": "Dokumentenverwaltung", |
|||
"Permission:PdfGeneration": "PDF-Generierung" |
|||
} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
{ |
|||
"culture": "el", |
|||
"texts": { |
|||
"Permission:DocumentManagement.Common": "Διαχείριση Εγγράφων", |
|||
"Permission:PdfGeneration": "Δημιουργία PDF" |
|||
} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
{ |
|||
"culture": "en-GB", |
|||
"texts": { |
|||
"Permission:DocumentManagement.Common": "Document Management Common", |
|||
"Permission:PdfGeneration": "PDF Generation" |
|||
} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
{ |
|||
"culture": "en", |
|||
"texts": { |
|||
"Permission:DocumentManagement.Common": "Document Management Common", |
|||
"Permission:PdfGeneration": "PDF Generation" |
|||
} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
{ |
|||
"culture": "es", |
|||
"texts": { |
|||
"Permission:DocumentManagement.Common": "Gestión de documentos comunes", |
|||
"Permission:PdfGeneration": "Generación de PDF" |
|||
} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
{ |
|||
"culture": "fi", |
|||
"texts": { |
|||
"Permission:DocumentManagement.Common": "Tiedostonhallinta", |
|||
"Permission:PdfGeneration": "PDF-generointi" |
|||
} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
{ |
|||
"culture": "fr", |
|||
"texts": { |
|||
"Permission:DocumentManagement.Common": "Gestion des documents communs", |
|||
"Permission:PdfGeneration": "Génération de PDF" |
|||
} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
{ |
|||
"culture": "hi", |
|||
"texts": { |
|||
"Permission:DocumentManagement.Common": "सामान्य दस्तावेज़ प्रबंधन", |
|||
"Permission:PdfGeneration": "PDF उत्पन्न करना" |
|||
} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
{ |
|||
"culture": "hr", |
|||
"texts": { |
|||
"Permission:DocumentManagement.Common": "Upravljanje zajedničkih dokumenata", |
|||
"Permission:PdfGeneration": "Generiranje PDF-a" |
|||
} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
{ |
|||
"culture": "hu", |
|||
"texts": { |
|||
"Permission:DocumentManagement.Common": "Általános dokumentumkezelés", |
|||
"Permission:PdfGeneration": "PDF generálás" |
|||
} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
{ |
|||
"culture": "is", |
|||
"texts": { |
|||
"Permission:DocumentManagement.Common": "Almennir skjöl", |
|||
"Permission:PdfGeneration": "Breyta í PDF" |
|||
} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
{ |
|||
"culture": "it", |
|||
"texts": { |
|||
"Permission:DocumentManagement.Common": "Gestione documenti comuni", |
|||
"Permission:PdfGeneration": "Generazione PDF" |
|||
} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
{ |
|||
"culture": "nl", |
|||
"texts": { |
|||
"Permission:DocumentManagement.Common": "Algemene documentbeheer", |
|||
"Permission:PdfGeneration": "PDF-generatie" |
|||
} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
{ |
|||
"culture": "pl-PL", |
|||
"texts": { |
|||
"Permission:DocumentManagement.Common": "Zarządzanie dokumentami", |
|||
"Permission:PdfGeneration": "Generowanie PDF" |
|||
} |
|||
} |
|||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue