recipes
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
recipes [2020/06/01 13:13] – emozolyak | recipes [2021/08/05 13:35] – emozolyak | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | {{ :: | ||
======Recipes====== | ======Recipes====== | ||
Line 7: | Line 8: | ||
* Recipe list can be used as a handy tool for analysing user choice from different options. In this case recipe names in the list or category serve as a placeholders for the selection listbox. The selected id is returned to the lua script which then can process the selection. | * Recipe list can be used as a handy tool for analysing user choice from different options. In this case recipe names in the list or category serve as a placeholders for the selection listbox. The selected id is returned to the lua script which then can process the selection. | ||
- | ===== Recipe setup ===== | + | ===== Recipes page===== |
- | The recipe management menu resided | + | The recipe management menu resides |
{{ :: | {{ :: | ||
- | The main spots of the recipe management | + | The main spots of the recipe management |
- Import/ | - Import/ | ||
- Add recipe button | - Add recipe button | ||
Line 21: | Line 22: | ||
- Common (non-locked) recipe list. | - Common (non-locked) recipe list. | ||
- Edit/ | - Edit/ | ||
- | |||
{{ :: | {{ :: | ||
- | Recipes can have sub-categories, | ||
- | {{ :recipes2.png?direct |category}} | + | ===== Recipe setup===== |
+ | |||
+ | The //Basic// tab: | ||
+ | ***Title** - this title will be seen in the selection lists and setup page | ||
+ | ***Description** - user comments for the recipe | ||
+ | ***Disable** checkbox - hides this recipe from the list | ||
+ | ***Lock** - prevent the recipe from editing by non-admin users | ||
+ | ***Registers 1..4 / Value / Description** - this set of the registers will be initialized with the respective values upon invoking recipe. The description given here will be used to show the comments in the quick edit window (right on the dashboard) | ||
+ | ***Delete** button deletes the register //n// from the list | ||
+ | ***Add register to recipe** button expands the list with a new entry | ||
+ | |||
+ | {{ :: | ||
+ | |||
+ | The // | ||
+ | {{ :: | ||
+ | |||
+ | ===== Using recipe on the dashboard ===== | ||
+ | |||
+ | When placing a recipes selection listbox on a dashboard, there are some specific attributes you must specify: | ||
+ | |||
+ | * // | ||
+ | * The // | ||
+ | * '// | ||
+ | * '// | ||
+ | |||
+ | |||
+ | {{ :: | ||
- | And also be available | + | If the user has right to edit the recipe, he can do this right in the selectoin box: |
- | {{ :recipes3.png? | + | {{ quick_rcp_apply_edit.gif |}} |
- | When placing a list of recipes | + | ===== Using recipes |
- | * Category of recipes, | + | To apply recipes |
- | | + | |
- | | + | |
- | | + | |
- | {{ :recipe4.png?direct |dashboard}} | + | <code lua> |
+ | function main (userId) | ||
+ | local id = GetReg(" | ||
+ | ApplyRecipe(id, | ||
+ | AddInfoMessage(" | ||
+ | end | ||
+ | </ | ||
- | To apply recipes within scripts, the **ApplyRecipe (recipeId, userId)** function is used. [[working_with_recipes|See here]]. After it is executed, if a list is displayed on one of the dashboards, the contents of the recipe from the ApplyRecipe function, you must also write the recipe number in the register tied to the list - to synchronize the display of the list. | + | {{ recipe_in_scripts.gif |}} |
recipes.txt · Last modified: 2022/01/15 15:41 by 127.0.0.1