updated documentation (#536)
This commit is contained in:
@@ -51,6 +51,7 @@ Be aware of the following rules:
|
|||||||
- hide the default templates
|
- hide the default templates
|
||||||
- add additional template source directories
|
- add additional template source directories
|
||||||
- see below in `Configure search path` to find out how
|
- 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
|
### Twig templates
|
||||||
|
|
||||||
@@ -63,6 +64,11 @@ GitHub to find out which variables can be used or debug it with:
|
|||||||
{{ dump(model) }}
|
{{ 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
|
||||||
|
|
||||||
Docx templates are powered by [PHPWord](https://github.com/PHPOffice/PHPWord) and its `TemplateProcessor`.
|
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
|
## 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
|
### 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 |
|
| Key | Description |
|
||||||
|---|---|
|
|---|---|
|
||||||
|
|||||||
@@ -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 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)
|
- 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
|
- 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 for projects and activities are imported
|
||||||
- fixed-rates and hourly-rates and total rate for timesheet entries are imported
|
- fixed-rates and hourly-rates and total rate for timesheet entries are imported
|
||||||
|
|||||||
Reference in New Issue
Block a user