stable

Clone or download

Read-only

feat: Ability to delete image

An image can now be deleted from PDF Templates Images Library. If this image is detected as beeing used in some templates, then a warning is displayed. To do that we detect if there is a reference of the image href in the header, footer, or styling area of the templates. Part of story #38630: Export to file Change-Id: Id2c5add1d7ae909d013ed553b8e19f86ae4fd93e

Modified Files

Name
A plugins/pdftemplate/include/PdfTemplate/Admin/Image/DeleteImageController.php +83 −0 Go to diff View file
M plugins/pdftemplate/include/PdfTemplate/Admin/Image/IndexImagesController.php +2 −1 Go to diff View file
M plugins/pdftemplate/include/PdfTemplate/Admin/Image/PdfTemplateImagePresenter.php +18 −0 Go to diff View file
A plugins/pdftemplate/include/PdfTemplate/Admin/Image/UsageDetector.php +63 −0 Go to diff View file
M plugins/pdftemplate/include/PdfTemplate/Admin/Image/index.mustache +83 −0 Go to diff View file
A plugins/pdftemplate/include/PdfTemplate/Image/DeleteImage.php +26 −0 Go to diff View file
A plugins/pdftemplate/include/PdfTemplate/Image/DeleteImageFromStorage.php +26 −0 Go to diff View file
M plugins/pdftemplate/include/PdfTemplate/Image/PdfTemplateImageDao.php +11 −1 Go to diff View file
M plugins/pdftemplate/include/PdfTemplate/Image/PdfTemplateImageStorage.php +9 −1 Go to diff View file
M plugins/pdftemplate/include/pdftemplatePlugin.php +31 −0 Go to diff View file
M plugins/pdftemplate/scripts/admin/src/initiate-modals.ts +1 −1 Go to diff View file
M plugins/pdftemplate/site-content/fr_FR/LC_MESSAGES/tuleap-pdftemplate.po +20 −0 Go to diff View file
M plugins/pdftemplate/tests/integration/PdfTemplate/Image/PdfTemplateImageDaoTest.php +29 −1 Go to diff View file
A plugins/pdftemplate/tests/unit/PdfTemplate/Admin/Image/DeleteImageControllerTest.php +123 −0 Go to diff View file
A plugins/pdftemplate/tests/unit/PdfTemplate/Admin/Image/UsageDetectorTest.php +202 −0 Go to diff View file
A plugins/pdftemplate/tests/unit/PdfTemplate/Stubs/DeleteImageFromStorageStub.php +48 −0 Go to diff View file
A plugins/pdftemplate/tests/unit/PdfTemplate/Stubs/DeleteImageStub.php +48 −0 Go to diff View file