diff --git a/src/Controller/DashboardController.php b/src/Controller/DashboardController.php
index b489866e..8f38d94a 100644
--- a/src/Controller/DashboardController.php
+++ b/src/Controller/DashboardController.php
@@ -102,9 +102,7 @@ class DashboardController extends Controller
'header' => 'dashboard.all',
'widgets' => [
"{{ widgets.info_box_counter('stats.durationThisMonth', timesheetGlobal.durationThisMonth|duration(true), 'far fa-hourglass', 'blue') }}",
- //"{{ widgets.info_box_counter('stats.amountThisMonth', timesheetGlobal.amountThisMonth|money, 'money', 'green') }}",
"{{ widgets.info_box_counter('stats.durationTotal', timesheetGlobal.durationTotal|duration(true), 'far fa-hourglass', 'yellow') }}",
- //"{{ widgets.info_box_counter('stats.amountTotal', timesheetGlobal.amountTotal|money, 'money', 'red') }}",
"{{ widgets.info_box_counter('stats.activeRecordings', timesheetGlobal.activeCurrently, 'far fa-hourglass', 'red', path('admin_timesheet', {'state': " . TimesheetQuery::STATE_RUNNING . '})) }}',
],
];
@@ -123,6 +121,15 @@ class DashboardController extends Controller
return $widgets;
}
+ $widgets[] = [
+ 'id' => 'alluser.money_stats',
+ 'header' => '',
+ 'widgets' => [
+ "{{ widgets.info_box_counter('stats.amountThisMonth', timesheetGlobal.amountThisMonth|money, 'far fa-money-bill-alt', 'green') }}",
+ "{{ widgets.info_box_counter('stats.amountTotal', timesheetGlobal.amountTotal|money, 'far fa-money-bill-alt', 'red') }}",
+ ],
+ ];
+
$widgets[] = [
'id' => 'admin.stats',
'header' => 'dashboard.admin',
diff --git a/templates/user/profile.html.twig b/templates/user/profile.html.twig
index ad079ab8..315526e5 100644
--- a/templates/user/profile.html.twig
+++ b/templates/user/profile.html.twig
@@ -143,23 +143,25 @@
{{ 'stats.durationThisMonth'|trans }} {{ stats.durationThisMonth|duration }}
+ {% if is_granted('ROLE_ADMIN') %}
{{ 'stats.amountThisMonth'|trans }} {{ stats.amountThisMonth|money }}
+ {% endif %}
{{ 'stats.durationTotal'|trans }} {{ stats.durationTotal|duration }}
+ {% if is_granted('ROLE_ADMIN') %}
{{ 'stats.amountTotal'|trans }} {{ stats.amountTotal|money }}
+ {% endif %}
- {# Follow #}
-
{% endmacro %}
diff --git a/var/docs/developers.md b/var/docs/developers.md
index 66e30b8a..2d4103f5 100644
--- a/var/docs/developers.md
+++ b/var/docs/developers.md
@@ -33,10 +33,6 @@ yarn install
To rebuild all assets you have to execute:
```bash
-yarn run dev
-```
-or
-```bash
yarn run prod
```
@@ -60,6 +56,11 @@ bin/console kimai:test-unit
bin/console kimai:test-integration
```
+Or you simply run all tests with:
+```bash
+bin/phpunit
+```
+
## Check your code styles
You can run the code sniffer with a built-in command like that:
@@ -88,7 +89,6 @@ We try to keep the number of language files small, in order to make it easier to
The files in `translations/` as a quick overview:
-- `AvanzuAdminTheme` is only meant for translating strings from the original theme
- `exceptions` only holds translations of error pages and exception handlers
- `flashmessages` hold all success and error messages, that will be shown as results from action calls after page reload
- `messages` holds most of the visible application translations (like all the static UI elements and form translations)
@@ -143,22 +143,21 @@ For more details check the [official menu subscriber](../../src/EventSubscriber/
We use twig globals to render the control sidebar tabs, so adding one is as easy as adding a new config entry:
```yaml
-twig:
- globals:
- kimai_context:
- control_sidebar:
- # these are the official tabs
- settings:
- icon: gears
- controller: 'App\Controller\SidebarController::settingsAction'
- home:
- icon: question-circle-o
- template: sidebar/home.html.twig
-
+admin_lte:
+ options:
+ control_sidebar:
+ # these are the "official" Kimai tabs
+ settings:
+ icon: "fas fa-cogs"
+ controller: 'App\Controller\SidebarController::settingsAction'
+ home:
+ icon: "fas fa-question-circle"
+ template: sidebar/home.html.twig
```
-You have to define the `icon` (font-awesome without the `fa-` prefix) to be used and one of `controller` action or `template`.
-Both follow the default naming syntax and you can easily link your bundle here instead of the app controller or templates.
-You should NOT add them in `config/packages/kimai.yaml` but in your own bundle config, otherwise they might get lost in a Kimai update.
+You have to define the `icon` (FontAwesome 5) to be used and one of: `controller` action or twig `template`.
+Both follow the default naming syntax and you can link your bundle here instead of the app controller or templates.
+You should NOT add them in `config/packages/kimai.yaml` but in your own bundle or the `local.yaml` [config](configurations.md),
+otherwise they might get lost during an update.
## Adding invoice renderer
diff --git a/var/docs/installation.md b/var/docs/installation.md
index 01e001e8..e06af58e 100644
--- a/var/docs/installation.md
+++ b/var/docs/installation.md
@@ -28,10 +28,10 @@ git clone https://github.com/kevinpapst/kimai2.git
cd kimai2/
```
-Create the `.env` file, using the `prod` environment and SQLite as database:
+Create the `.env` file (as copy from `.env.dist`), using the `prod` environment and SQLite as database:
```
+# you need all settings from .env.dist, but these two need to be adjusted!
APP_ENV=prod
-APP_SECRET=insert_a_random_secret_string_for_production
DATABASE_URL=sqlite:///%kernel.project_dir%/var/data/kimai.sqlite
```
The file `var/data/kimai.sqlite` will hold all your data, so make sure to include it in your backups!
@@ -45,6 +45,7 @@ composer install --no-dev
Create the database schemas:
```bash
bin/console doctrine:schema:create
+bin/console doctrine:migrations:version --add --all
```
And create your first user with the following command. You will be asked to enter a password afterwards.
@@ -67,12 +68,11 @@ composer install
The default installation uses a SQLite database, so there is no need to create a database for your first tests.
Our default settings will work out-of-the-box, but you might want to adjust the `.env` values to your needs.
-You can configure your database through your environment (e.g. Webserver, Cloud-Provider) or in your `.env` file:
+You can configure your database in your `.env` file, e.g.:
```
DATABASE_PREFIX=kimai2_
DATABASE_URL=sqlite:///%kernel.project_dir%/var/data/kimai.sqlite
APP_ENV=dev
-APP_SECRET=some_random_secret_string_for_your_installation
```
The next commands will create the database and the schema: