stable

Clone or download

Read-only

feat: PDF template creation

Admin can now create a PDF template. This template will be used if it is the first one. You will have to hack the database to delete or reorganize your templates. The new template comes with default css prefilled. Preview button is not implemented yet but will allow to test if the current settings match the expectations. General styling code (css) is syntax highlighted thanks to CodeMirror. Part of story #38630: Export to file Change-Id: I3ce6d08d6446668af24c1744c580d2ca11bc0bea

Modified Files

Name
A plugins/pdftemplate/db/install.sql +9 −0 Go to diff View file
A plugins/pdftemplate/db/mysql/202407100455_add_pdftemplate_table.php +47 −0 Go to diff View file
A plugins/pdftemplate/db/uninstall.sql +1 −0 Go to diff View file
R plugins/pdftemplate/tests/unit/PdfTemplate/PdfTemplateCollectionRetrieverTest.php Go to diff View file
A plugins/pdftemplate/include/PdfTemplate/Admin/CSRFTokenProvider.php +28 −0 Go to diff View file
A plugins/pdftemplate/include/PdfTemplate/Admin/CheckCSRFMiddleware.php +42 −0 Go to diff View file
A plugins/pdftemplate/include/PdfTemplate/Admin/CreatePdfTemplateController.php +87 −0 Go to diff View file
A plugins/pdftemplate/include/PdfTemplate/Admin/DisplayPdfTemplateCreationFormController.php +73 −0 Go to diff View file
M plugins/pdftemplate/include/PdfTemplate/Admin/IndexPdfTemplateController.php +11 −19 Go to diff View file
A plugins/pdftemplate/include/PdfTemplate/Admin/RejectNonNonPdfTemplateManagerMiddleware.php +49 −0 Go to diff View file
A plugins/pdftemplate/include/PdfTemplate/Admin/UserCanManageTemplatesChecker.php +48 −0 Go to diff View file
A plugins/pdftemplate/include/PdfTemplate/Admin/create.mustache +73 −0 Go to diff View file
M plugins/pdftemplate/include/PdfTemplate/Admin/index.mustache +18 −7 Go to diff View file
A plugins/pdftemplate/include/PdfTemplate/CreateTemplate.php +28 −0 Go to diff View file
A plugins/pdftemplate/include/PdfTemplate/PdfTemplateDao.php +69 −0 Go to diff View file
R plugins/pdftemplate/include/PdfTemplate/PdfTemplateCollectionRetriever.php Go to diff View file
M plugins/pdftemplate/include/pdftemplatePlugin.php +64 −6 Go to diff View file
M plugins/pdftemplate/scripts/admin/package.json +3 −1 Go to diff View file
M plugins/pdftemplate/scripts/admin/pnpm-lock.yaml +30 −0 Go to diff View file
M plugins/pdftemplate/scripts/admin/src/admin.scss +20 −0 Go to diff View file
M plugins/pdftemplate/scripts/admin/src/index.ts +5 −0 Go to diff View file
A plugins/pdftemplate/scripts/admin/src/initiate-code-editors.ts +34 −0 Go to diff View file
M plugins/pdftemplate/site-content/fr_FR/LC_MESSAGES/tuleap-pdftemplate.po +23 −5 Go to diff View file
A plugins/pdftemplate/tests/integration/PdfTemplate/PdfTemplateDaoTest.php +46 −0 Go to diff View file
A plugins/pdftemplate/tests/unit/PdfTemplate/Admin/CheckCSRFMiddlewareTest.php +53 −0 Go to diff View file
A plugins/pdftemplate/tests/unit/PdfTemplate/Admin/CreatePdfTemplateControllerTest.php +106 −0 Go to diff View file
A plugins/pdftemplate/tests/unit/PdfTemplate/Admin/DisplayPdfTemplateCreationFormControllerTest.php +108 −0 Go to diff View file
M plugins/pdftemplate/tests/unit/PdfTemplate/Admin/IndexPdfTemplateControllerTest.php +14 −3 Go to diff View file
A plugins/pdftemplate/tests/unit/PdfTemplate/Admin/RejectNonNonPdfTemplateManagerMiddlewareTest.php +107 −0 Go to diff View file
A plugins/pdftemplate/tests/unit/PdfTemplate/Stubs/CSRFTokenProviderStub.php +43 −0 Go to diff View file
A plugins/pdftemplate/tests/unit/PdfTemplate/Stubs/CreateTemplateStub.php +59 −0 Go to diff View file
R plugins/pdftemplate/tests/unit/PdfTemplate/Admin/RenderAPresenterStub.php Go to diff View file
A plugins/pdftemplate/tests/unit/PdfTemplate/Stubs/RetrieveAllTemplatesStub.php +54 −0 Go to diff View file
A src/common/Export/Pdf/Template/Identifier/InvalidPdfTemplateIdentifierStringException.php +31 −0 Go to diff View file
A src/common/Export/Pdf/Template/Identifier/PdfTemplateIdentifier.php +50 −0 Go to diff View file
A src/common/Export/Pdf/Template/Identifier/PdfTemplateIdentifierFactory.php +57 −0 Go to diff View file
M src/common/Export/Pdf/Template/PdfTemplate.php +3 −0 Go to diff View file
M tests/integration/bin/setup.sh +1 −0 Go to diff View file