Files
wekan/client/components/rules/rulesMain.jade
T
Lauri Ojansivu 34d9817110 Rules page: Back to the board.
The Rules page lost its Back with its own sidebar; only the trigger, action
and rule details pages kept one, to the rules list, so the way back to the
board was the Board View menu. The rules list and its Workflow, Bots,
Blocks and History views now have a Back link to the board at the top. The
three sub-pages keep their own Back and show no second one.

Thanks to mimZD and xet7 !

Fixes #6852.
2026-11-02 00:07:42 +02:00

48 lines
2.1 KiB
Plaintext

//- The Rules page had its own sidebar, holding only Back and its views. It uses
the board's own right sidebar now, like the board itself: its views are in
Board Settings under Rules (client/components/sidebar/sidebar.jade), and a
board view picked in the Board View menu goes back to the board.
models/lib/pageSidebar.js
template(name="rulesMain")
.wrapper
.rules-page(class=currentBoard.colorClass)
//- #6852: the way back to the board. The trigger, action and rule
details pages have their own Back, to the rules list, so this one is
shown only where there is none - two Backs going to two places would
be one too many.
if showBackToBoard
.rules-back-to-board
a.js-rules-back-to-board(href="{{pathFor 'board' id=currentBoard._id slug=currentBoard.slug}}" title="{{currentBoard.title}}")
i.fa.fa-arrow-left
| {{_ 'back'}}
//- #2217: who may edit sees every view; a member a board shows its Rules
to reads the rules list and rule details, with no control that
changes a rule; anybody else sees nothing (client/lib/rulesAccess.js).
if($eq rulesAccess 'edit')
if($eq rulesCurrentTab.get 'rulesList')
if isWorkflowView
+rulesWorkflow
else if isBotsView
+rulesBots
else if isBlocksView
+rulesBlocks
else if isRulesHistoryView
+historyTable(scope="board" scopeId=rulesBoardId group="rules")
else
+ruleSuggestions
+rulesList
if($eq rulesCurrentTab.get 'trigger')
+rulesTriggers(ruleName=ruleName triggerVar=triggerVar ruleId=editingRuleId)
if($eq rulesCurrentTab.get 'action')
+rulesActions(ruleName=ruleName triggerVar=triggerVar ruleId=editingRuleId)
if($eq rulesCurrentTab.get 'ruleDetails')
+ruleDetails(ruleId=ruleId)
else if($eq rulesAccess 'read')
if($eq rulesCurrentTab.get 'ruleDetails')
+ruleDetails(ruleId=ruleId)
else
+rulesList
else
p.quiet {{_ 'r-rules-not-shown'}}
+sidebar