diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c26bc1..a487e6c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ * Updated `README.md` * Admins can now select the default worktime type to be selected in the form within the app.json `config` section via the `default_worktime_type` key. * Added function to automatically add keys to app.json after update +* Admins can now customize the look and feel of the PDF exports. Please check `README.md` `Exports` section for more information. ## v8.6 diff --git a/README.md b/README.md index 6852fea..3d81b39 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,8 @@ A demo is available here: [https://tt-demo.openducks.org](https://tt-demo.opendu **The demo is available with limited features only, e.g. the plugin system disabled.** **The demo currently does not work as intended...** +> You would like to support the project? Consider helping out with the documentation at [https://timetrackd.openducks.org](https://timetrackd.openducks.org) or by contributing to the code. + ## Installation ### Quick Install with Docker @@ -222,6 +224,15 @@ $arbeit->exportModule()->getExportModule("MyExportExportModule")->export($data); All existing export modules can be accessed with the `ExportManager` Plugin. You can specify your own CSS file within the `app.json` `exports -> pdf -> css` setting (full path) - the default is `api/v1/class/exports/modules/PDFExportModule/css/index.css` +### Custom contents + +You can use custom contents within your PDF exports by placing HTML/PHP files into `api/v1/class/exports/modules/PDFExportModule/php/`. +Two files can be placed there: + +- `user_content_ending.php`: This file is included at the end of the PDF export, e.g. for signatures or custom footers +- `user_content_starting.php`: This file is included at the beginning of the PDF export, e.g. for custom headers. +You can put normal PHP and HTML code into these files. + ## QR codes You can use the plugin `QRClock` to generate QR codes for yourself to either clock in or out. The QR code generated can be saved for later use, e.g. print it out. diff --git a/api/v1/class/exports/modules/PDFExportModule/php/.gitkeep b/api/v1/class/exports/modules/PDFExportModule/php/.gitkeep new file mode 100644 index 0000000..e69de29