mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-12 11:24:31 +02:00
Improved documentation
This commit is contained in:
parent
1a86dd2487
commit
3a4aa6785d
13 changed files with 227 additions and 21 deletions
36
docs/usage/console_commands.md
Normal file
36
docs/usage/console_commands.md
Normal file
|
@ -0,0 +1,36 @@
|
|||
---
|
||||
title: Console commands
|
||||
layout: default
|
||||
parent: Usage
|
||||
---
|
||||
|
||||
# Console commands
|
||||
|
||||
Part-DB provides some console commands to display various information or perform some tasks.
|
||||
The commands are invoked from the main directory of Part-DB with the command `php bin/console [command]` in the context
|
||||
of the database user (so usually the webserver user), so you maybe have to use `sudo` or `su` to execute the commands.
|
||||
|
||||
You can get help for every command with the parameter `--help`. See `php bin/console` for a list of all available commands.
|
||||
|
||||
## User managment commands
|
||||
* `php bin/console partdb:users:list`: List all users of this Part-DB instance
|
||||
* `php bin/console partdb:users:set-password [username]`: Set/Changes the password of the user with the given username. This allows administrators to reset a password of a user, if he forgot it.
|
||||
* `php bin/console partdb:users:enable [username]`: Enable/Disable the user with the given username (use `--disable` to disable the user, which prevents login)
|
||||
* `php bin/console partdb:users:permissions`: View/Change the permissions of the user with the given username
|
||||
* `php bin/console partdb:users:upgrade-permissions-schema`: Upgrade the permissions schema of users to the latest version (this is normally automatically done when the user visits a page)
|
||||
* `php bin/console partdb:logs:show`: Show the most recent entries of the Part-DB event log / recent activity
|
||||
|
||||
## Currency commands
|
||||
* `php bin/console partdb:currencies:update-exchange-rates`: Update the exchange rates of all currencies from the internet)
|
||||
|
||||
## Installation/Maintenance commands
|
||||
* `php bin/console partdb:backup`: Backup the database and the attachments
|
||||
* `php bin/console partdb:version`: Display the current version of Part-DB and the used PHP version
|
||||
* `php bin/console partdb:check-requirements`: Check if the requirements for Part-DB are met (PHP version, PHP extensions, etc.) and make suggestions what could be improved
|
||||
* `partdb:migrations:convert-bbcode`: Migrate the old BBCode markup codes used in legacy Part-DB versions (< 1.0.0) to the new markdown syntax
|
||||
* `partdb:attachments:clean-unused`: Remove all attachments which are not used by any database entry (e.g. orphaned attachments)
|
||||
* `partdb:cache:clear`: Clears all caches, so the next page load will be slower, but the cache will be rebuild. This can maybe fix some issues, when the cache were corrupted. This command is also needed after changing things in the `parameters.yaml` file or upgrading Part-DB.
|
||||
|
||||
## Database commands
|
||||
* `php bin/console doctrine:migrations:migrate`: Migrate the database to the latest version
|
||||
* `php bin/console doctrine:migrations:up-to-date`: Check if the database is up-to-date
|
|
@ -1,11 +1,21 @@
|
|||
---
|
||||
title: Backup & Restore Data
|
||||
title: Labels
|
||||
layout: default
|
||||
parent: Usage
|
||||
---
|
||||
|
||||
# Labels
|
||||
|
||||
Part-DB support the generation and printing of labels for parts, part lots and storelocation.
|
||||
You can use the "Tools -> Labelgenerator" menu entry to create labels, or click the label generation link on the part.
|
||||
|
||||
You can define label templates by creating Label profiles. This way you can create many similar looking labels with for
|
||||
many parts.
|
||||
|
||||
The content of the labels is defined by the templates content field. You can use the WYSIWYG editor to create and style the content (or write HTML code).
|
||||
Using the "Label placeholder" menu in the editor, you can insert placeholders for the data of the parts.
|
||||
It will be replaced by the concrete data when the label is generated.
|
||||
|
||||
## Label placeholders
|
||||
A placeholder has the format `[[PLACEHOLDER]]` and will be filled with the concrete data by Part-DB.
|
||||
You can use the "Placeholders" dropdown in content editor, to automatically insert the placeholders.
|
||||
|
@ -20,6 +30,7 @@ You can use the "Placeholders" dropdown in content editor, to automatically inse
|
|||
| `[[DATE]]` | The current date in the selected locale | 31.12.2017 |
|
||||
| `[[TIME]]` | The current time in the selected locale | 18:34:11 |
|
||||
| `[[INSTALL_NAME]]` | The name of the current installation (see $config['partdb_title']) | Part-DB |
|
||||
| `[[INSTANCE_URL]]` | The URL of the current installation | https://demo.part-db.de |
|
||||
|
||||
### Parts
|
||||
|
||||
|
@ -45,6 +56,7 @@ You can use the "Placeholders" dropdown in content editor, to automatically inse
|
|||
| `[[CREATION_DATE]]` | The datetime when the element was created | 2/26/16, 5:38 PM |
|
||||
|
||||
### Part lot
|
||||
|
||||
| Placeholder | Description | Example |
|
||||
|---|---|---|
|
||||
| `[[LOT_ID]]` | Part lot ID | 123 |
|
||||
|
@ -56,6 +68,7 @@ You can use the "Placeholders" dropdown in content editor, to automatically inse
|
|||
| `[[LOCATION_FULL]]` | The full path of the storage location | Location -> Location A |
|
||||
|
||||
### Storelocation
|
||||
|
||||
| Placeholder | Description | Example |
|
||||
|---|---|---|
|
||||
| `[[ID]]` | ID of the storage location | |
|
||||
|
@ -69,6 +82,7 @@ You can use the "Placeholders" dropdown in content editor, to automatically inse
|
|||
| `[[CREATION_DATE]]` | The datetime when the element was created | 2/26/16, 5:38 PM |
|
||||
|
||||
## Twig mode
|
||||
|
||||
If you select "Twig" in parser mode under advanced settings, you can input a twig template in the lines field (activate source mode). You can use most of the twig tags and filters listed in [offical documentation](https://twig.symfony.com/doc/3.x/).
|
||||
|
||||
The following variables are in injected into Twig and can be accessed using `{{ variable }}` (or `{{ variable.property }}`):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue