Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Changelog
## 0.9

Edits to Work with newer Versions of Kimai2

## 0.8

Expand Down
10 changes: 5 additions & 5 deletions Export/ZipRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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);
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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/).
14 changes: 3 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
@@ -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": [
{
Expand All @@ -21,8 +14,7 @@
],
"extra": {
"kimai": {
"require": "1.6",
"version": "0.8",
"require": 20000,
"name": "ZipProjectRendererBundle"
}
}
Expand Down