Skip to content

Commit

Permalink
unify snippet location
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpapst committed Jul 27, 2024
1 parent 1be932d commit 936ed08
Show file tree
Hide file tree
Showing 28 changed files with 37 additions and 44 deletions.
2 changes: 1 addition & 1 deletion _docu_versioned/1.14/export.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Be aware of the following rules:
- You can hide the default templates by setting the key `kimai.export.defaults` to an empty array / null

After you created a new or updated an existing template, you have to clear the cache to see the results:
{% include cache-refresh.html %}
{% include snippets/cache-refresh.md %}

Please copy & paste one of [default templates]({{ site.kimai_v2_repo }}/tree/main/templates/export/renderer) to `var/export/`
as starting point and rename it afterwards.
Expand Down
2 changes: 1 addition & 1 deletion _docu_versioned/1.30.0/plugin-custom-content.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ That's how the **alert / warning message** looks like. You can even include _mar
By default, these are assigned to each user with the role `ROLE_SUPER_ADMIN`.
{% include store-howto-permissions.md %}
{% include snippets/store-howto-permissions.md %}
2 changes: 1 addition & 1 deletion _docu_versioned/1.30.0/plugin-expenses.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ The following restrictions are in place for accessing other user's data:
- users that own the `view_expense` permission but NOT `view_other_timesheet` will only see own expenses
- the visible data for non-admin users (permission `view_all_data`) is limited by team assignments

{% include store-howto-permissions.md %}
{% include snippets/store-howto-permissions.md %}
2 changes: 1 addition & 1 deletion _docu_versioned/1.30.0/plugin-import.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,4 @@ Kimai only supports imports for GT exports from the languages english and german

By default, these are assigned to each user with the role `ROLE_SUPER_ADMIN`.

{% include store-howto-permissions.md %}
{% include snippets/store-howto-permissions.md %}
4 changes: 2 additions & 2 deletions _docu_versioned/1.30.0/synology.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ php81 bin/console kimai:update
chown -R :http .
```

{% include upgrading-note.html %}
{% include snippets/upgrading-note.md %}

### Update without git

Expand All @@ -219,7 +219,7 @@ cd /volume1/web/
mv kimai kimai-backup
mv kimai-{{ site.kimai_v2_version }} kimai
```
{% include upgrading-note.html %}
{% include snippets/upgrading-note.md %}

## SSO with Synology Directory Server

Expand Down
2 changes: 1 addition & 1 deletion _documentation/absence.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ Administrators require the `contract_other_profile` permission to see the `Contr
| view_other_absence | Switch the user in the`Absence` screen. Also influences the visibility of absence entries in the calendar. |
{: .table }

{% include store-howto-permissions.md %}
{% include snippets/store-howto-permissions.md %}
2 changes: 1 addition & 1 deletion _documentation/backups.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ mysqldump --single-transaction -u kimai2 -p -h 127.0.0.1 kimai2 > ~/kimai2-`date

Now refresh your cache:

{% include cache-refresh.html %}
{% include snippets/cache-refresh.md %}

At this step: test Kimai again and don't proceed before it works as expected!

Expand Down
2 changes: 1 addition & 1 deletion _documentation/cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ of the following tasks within Kimai you need to reload its cache:
Kimai not only caches configuration files, but also the list of installed bundles and other information which are
time-consuming to calculate and which should not be evaluated on every request.

{% include cache-refresh.html %}
{% include snippets/cache-refresh.md %}

It might be necessary to execute these commands as webserver user,
read the [Installation docs]({% link _documentation/installation.md %}) for more details.
Expand Down
2 changes: 1 addition & 1 deletion _documentation/contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,4 @@ This booking is only there for information purposes.
| create_booking_contract | Allows to create manual time bookings. |
{: .table }

{% include store-howto-permissions.md %}
{% include snippets/store-howto-permissions.md %}
2 changes: 1 addition & 1 deletion _documentation/export.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Be aware of the following rules:
- You can hide the default templates by setting the key `kimai.export.defaults` to an empty array / null

After you created a new or updated an existing template, you have to clear the cache to see the results:
{% include cache-refresh.html %}
{% include snippets/cache-refresh.md %}

Please copy & paste one of [default templates]({{ site.kimai_v2_repo }}/tree/main/templates/export/renderer) to `var/export/`
as starting point and rename it afterwards.
Expand Down
2 changes: 1 addition & 1 deletion _documentation/plugin-audit-trail.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ Please note: `audit_own_timesheet` are only available via team timesheets, audit

By default, these are assigned to each user with the role `ROLE_SUPER_ADMIN`.

{% include store-howto-permissions.md %}
{% include snippets/store-howto-permissions.md %}
2 changes: 1 addition & 1 deletion _documentation/plugin-custom-content.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ That's how the **alert / warning message** looks like. You can even include _mar

By default, these are assigned to each user with the role `ROLE_SUPER_ADMIN`.

{% include store-howto-permissions.md %}
{% include snippets/store-howto-permissions.md %}
2 changes: 1 addition & 1 deletion _documentation/plugin-custom-fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,4 @@ So a role name like `Manager` does not work, it must be `ROLE_MANAGER`.

By default, these are assigned to each user with the role `ROLE_SUPER_ADMIN`.

{% include store-howto-permissions.md %}
{% include snippets/store-howto-permissions.md %}
2 changes: 1 addition & 1 deletion _documentation/plugin-expenses.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ The following restrictions are in place for accessing other user's data:
- users that own the `view_expense` permission but NOT `view_other_timesheet` will only see own expenses
- the visible data for non-admin users (permission `view_all_data`) is limited by team assignments

{% include store-howto-permissions.md %}
{% include snippets/store-howto-permissions.md %}
2 changes: 1 addition & 1 deletion _documentation/plugin-import.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,4 +217,4 @@ Kimai only supports imports for GT exports from the languages english and german

By default, these are assigned to each user with the role `ROLE_SUPER_ADMIN`.

{% include store-howto-permissions.md %}
{% include snippets/store-howto-permissions.md %}
2 changes: 1 addition & 1 deletion _documentation/plugin-kiosk.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ This bundle introduces new permissions, which limit access to certain functions:

By default, these are granted to each user with the role `ROLE_SUPER_ADMIN`.

{% include store-howto-permissions.md %}
{% include snippets/store-howto-permissions.md %}
2 changes: 1 addition & 1 deletion _documentation/plugin-task-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ This bundle introduces new permissions, which limit access to certain functions:

A pre-configured permission set for all default user roles is applied by the plugin, please adjust them to your needs.

{% include store-howto-permissions.md %}
{% include snippets/store-howto-permissions.md %}

The following restrictions are in place for accessing other user's data:
- can only be seen by users who own the `view_other_timesheet`
Expand Down
2 changes: 1 addition & 1 deletion _documentation/plugin-translation.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ The edit dialog allows to change your custom translation:

By default, these are assigned to each user with the role `ROLE_SUPER_ADMIN`.

{% include store-howto-permissions.md %}
{% include snippets/store-howto-permissions.md %}
2 changes: 1 addition & 1 deletion _documentation/public-holiday.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ The `contract_other_profile` permission is required to see the `Contract` menu,
| edit_public_holidays | Allows to configure public holidays. By default given to `Administrator` and `Super Administrator` |
{: .table }

{% include store-howto-permissions.md %}
{% include snippets/store-howto-permissions.md %}
4 changes: 2 additions & 2 deletions _documentation/synology.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ php81 bin/console kimai:update
chown -R :http .
```

{% include upgrading-note.html %}
{% include snippets/upgrading-note.md %}

### Update without git

Expand All @@ -219,7 +219,7 @@ cd /volume1/web/
mv kimai kimai-backup
mv kimai-{{ site.kimai_v2_version }} kimai
```
{% include upgrading-note.html %}
{% include snippets/upgrading-note.md %}

## SSO with Synology Directory Server

Expand Down
2 changes: 1 addition & 1 deletion _documentation/updates.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ bin/console kimai:update
Remember to adjust the file permissions if necessary.
{% include snippets/file-permissions.md %}

{% include upgrading-note.html %}
{% include snippets/upgrading-note.md %}

That's it, Kimai is running the most current version. Enjoy the latest time-tracking features!

Expand Down
18 changes: 0 additions & 18 deletions _includes/cache-refresh.html

This file was deleted.

2 changes: 1 addition & 1 deletion _includes/plugins/custom-css.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ This bundle allows you to add custom CSS rules to Kimai.

By default, these are assigned to each user with the role `ROLE_SUPER_ADMIN`.

{% include store-howto-permissions.md %}
{% include snippets/store-howto-permissions.md %}
11 changes: 11 additions & 0 deletions _includes/snippets/cache-refresh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{% note "How to reload Kimai cache" %}
```plaintext
bin/console kimai:reload --env=prod
```

It is not advised, but in case the above command fails you could try:

```plaintext
rm -r var/cache/prod/*
```
{% endnote %}
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion _includes/store-plugin-installation.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ <h3>{{ site.data[page.lang].translation.clear-cache }}</h3>
Call these commands from the Kimai directory:
</p>

{% include cache-refresh.html %}
{% include snippets/cache-refresh.md %}

<p>You might have to set file permissions afterwards:</p>

Expand Down
2 changes: 1 addition & 1 deletion _plugins/note.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def render(context)
site = context.registers[:site]
converter = site.find_converter_instance(Jekyll::Converters::Markdown)
output = converter.convert(super(context))
return "<div class=\"card mb-3\">
return "<div class=\"card border-primary mb-3\">
<p class=\"card-title bg-faded-primary p-1 mb-1\"><strong><i class=\"bx bxs-info-circle ms-2 me-2 text-primary fs-5\"></i>#{@title}</strong></p>
<div class=\"card-body m-0 pb-0 pt-3 px-3\">#{output}</div>
</div>"
Expand Down

0 comments on commit 936ed08

Please sign in to comment.