From 7f3e2d453fb346d72639d449a609698c26de52b1 Mon Sep 17 00:00:00 2001 From: Kevin Papst Date: Fri, 1 Feb 2019 16:33:55 +0100 Subject: [PATCH] updated documentation (#536) --- var/docs/invoices.md | 11 ++++++++++- var/docs/migration_v1.md | 2 -- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/var/docs/invoices.md b/var/docs/invoices.md index 54610f44..a2aafe42 100644 --- a/var/docs/invoices.md +++ b/var/docs/invoices.md @@ -51,6 +51,7 @@ Be aware of the following rules: - hide the default templates - add additional template source directories - see below in `Configure search path` to find out how +- After you created a new or updated an existing template, you might have to clear the cache with `bin/console cache:clear` to see the results ### Twig templates @@ -63,6 +64,11 @@ GitHub to find out which variables can be used or debug it with: {{ dump(model) }} ``` +The `dump()` method is only available in `dev` environment, check your `.env` if you are unsure. + +If you want more examples of the available methods for a timesheet record, you can have a look in the other existing templates, +like [the template which renders the "My times" page](https://github.com/kevinpapst/kimai2/tree/master/templates/timesheet/index.html.twig). + ### Docx templates Docx templates are powered by [PHPWord](https://github.com/PHPOffice/PHPWord) and its `TemplateProcessor`. @@ -92,9 +98,12 @@ See below in `Template variables` to find out which variables you can use in you ## Template variables +Be aware, that the following list of variables is only working for the "document" based formats, but NOT for twig templates. +Twig templates are rendered actively, it is up to the developer to calculate what is needed. + ### Global variables -You can use the following global variables in your templates: +The documents which are rendered passively (ODS, XLSX, CSV, DOCX) can use the following global variables: | Key | Description | |---|---| diff --git a/var/docs/migration_v1.md b/var/docs/migration_v1.md index 7dd86c21..45c7a6f9 100644 --- a/var/docs/migration_v1.md +++ b/var/docs/migration_v1.md @@ -4,8 +4,6 @@ Before importing your data from a Kimai v1 installation, please read the followi - Data from the existing v1 installation is only read and will never be changed - Data can only be imported from a Kimai installation with at least `v1.0.1` and database revision `1388` (check your `configuration` table) -- Kimai v1 has support for activities without project assignment, a feature which Kimai v2 doesn't support (yet) - - global activities will be transformed and created for each project which has a timesheet record linking to that activity - User-specific rates are not yet supported in Kimai 2 - fixed-rates and hourly-rates for projects and activities are imported - fixed-rates and hourly-rates and total rate for timesheet entries are imported