diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f47b24..88c903a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,7 @@ # Changelog +## 0.9 + +Edits to Work with newer Versions of Kimai2 ## 0.8 diff --git a/Export/ZipRenderer.php b/Export/ZipRenderer.php index 629a990..b46cbaa 100644 --- a/Export/ZipRenderer.php +++ b/Export/ZipRenderer.php @@ -6,10 +6,10 @@ use App\Export\RendererInterface; use App\Repository\Query\TimesheetQuery; use Symfony\Component\HttpFoundation\Response; -use App\Export\ExportContext; +use App\Pdf\PdfContext; use App\Project\ProjectStatisticService; use App\Utils\FileHelper; -use App\Utils\HtmlToPdfConverter; +use App\Pdf\HtmlToPdfConverter; use Twig\Environment; use PhpOffice\PhpWord\Shared\ZipArchive; @@ -141,8 +141,8 @@ private function replaceBadFilenameChars($filename): string { public function render(array $timesheets, TimesheetQuery $query): Response { - $context = new ExportContext(); - $context->setOption('filename', 'kimai-export'); + $context = new PdfContext(); + $context->setOption('filename', 'etronet-baubericht'); $projects = array(); @@ -199,7 +199,7 @@ public function render(array $timesheets, TimesheetQuery $query): Response $filename = $context->getOption('filename'); if (empty($filename)) { - $filename = 'kimai-export'; + $filename = 'etronet-baubericht'; } $filename = FileHelper::convertToAsciiFilename($filename); diff --git a/README.md b/README.md index ecd2b5a..a14bd63 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # ZipProjectRendererBundle A Kimai 2 plugin that allows to create a separate PDF file per project for several selected projects in the export. The PDF-Files which are then packed into a zip archive that is downloaded. +This Plugin was originally created by Jens Seldes from gbs-it.de and edited to work with newer Versions of Kimai. ## Installation @@ -29,6 +30,7 @@ This bundle does not require any special permissions. This bundle stores the files to be created in the system temp directory. [PHP function sys_get_temp_dir()] Make sure that this directory is writable for your web server. The files are automatically deleted after download. -## Screenshot +## Usage +In the Export section you will see a new button called "zip" to export your projects seperately + -Screenshots are available [on the shop page] (https://www.kimai.org/store/). diff --git a/composer.json b/composer.json index 5c8cbe1..4d7d758 100644 --- a/composer.json +++ b/composer.json @@ -1,16 +1,9 @@ { "name": "gbs-it/zip-projectrenderer-plugin", "description": "A Kimai 2 plugin that allows to create a separate PDF file per project for several selected projects in the export. The PDF-Files which are then packed into a zip archive that is downloaded.", - "homepage": ""https://www.kimai.org/store/", + "homepage": "https://www.kimai.org/store/", "type": "kimai-plugin", - "version": "0.8", - "keywords": [ - "kimai", - "kimai-plugin" - ], - "require": { - "kimai/kimai2-composer": "*" - }, + "version": "0.9", "license": "MIT", "authors": [ { @@ -21,8 +14,7 @@ ], "extra": { "kimai": { - "require": "1.6", - "version": "0.8", + "require": 20000, "name": "ZipProjectRendererBundle" } }