Files
wekan/client/components/rules/rulesActions.jade
T
Lauri Ojansivu 0bc06c801b Pick rule variables from a list instead of typing them.
The trigger and action editors have an "Insert variable" list with the
card's people, card, list and board names and one {customField:Name} per
custom field of the board. Picking one inserts it at the caret of the text
field last focused. Admin-only fields are not offered, since rules do not
read them, and neither is a name the token syntax cannot spell.

Thanks to chessboards and xet7 !

Fixes #3195.
2026-09-29 18:45:10 +03:00

31 lines
1.2 KiB
Plaintext

template(name="rulesActions")
h2
i.fa.fa-magic
| {{_ 'r-rule' }} "{{ruleNameStr}}" - {{_ 'r-add-action'}}
.triggers-content
.triggers-body
.triggers-side-menu
ul
li.active.js-set-board-actions
i.fa.fa-bar-chart
li.js-set-card-actions
i.fa.fa-file-text-o
li.js-set-checklist-actions
i.fa.fa-check
li.js-set-mail-actions
| @
.triggers-main-body
+ruleVariablePicker
if $eq currentActions.get 'board'
+boardActions(ruleName=data.ruleName triggerVar=data.triggerVar ruleId=data.ruleId)
else if $eq currentActions.get 'card'
+cardActions(ruleName=data.ruleName triggerVar=data.triggerVar ruleId=data.ruleId)
else if $eq currentActions.get 'checklist'
+checklistActions(ruleName=data.ruleName triggerVar=data.triggerVar ruleId=data.ruleId)
else if $eq currentActions.get 'mail'
+mailActions(ruleName=data.ruleName triggerVar=data.triggerVar ruleId=data.ruleId)
div.rules-back
button.primary.wide.js-goback(type="submit")
i.fa.fa-arrow-left
| {{_ 'back'}}