Wiki source code of KanbanMacro
Last modified by Ryan C on 2025/03/07 00:41
Hide last authors
author | version | line-number | content |
---|---|---|---|
![]() |
1.1 | 1 | The Kanban macro allows to display a Kanban using a modified version of the [[jkanban javascript library>>https://github.com/riktar/jkanban]]. |
2 | The macro can take the JSON of the kanban either from the content of the macro or from an URL. There is also the [[xwiki:Macros.AWMKanbanMacro]] allowing to display a kanban board from AppWithinMinutes data. | ||
3 | |||
4 | ##{{{ | ||
5 | {{kanban width="30%" source="" updateService="" addBoardButton="true" addItemButton="true" removeBoardButton="true" removeBoardItem="true"}} | ||
6 | [ | ||
7 | {"id":"board1","title":"To Do","color":"red","item":[{"title":"Item 1"},{"title":"Item 2"}]}, | ||
8 | {"id":"board2","title":"Working","color":"blue","item":[{"title":"Item 3"},{"title":"Item 4"}]}, | ||
9 | {"id":"board3","title":"Done","color":"green","item":[{"title":"Item 5"},{"title":"Item 6"}]} | ||
10 | ] | ||
11 | {{/kanban}} | ||
12 | }}}## | ||
13 | |||
14 | Additional parameters: | ||
15 | |||
16 | * ##width## width of each column in the kanban (default 30%) | ||
17 | * ##source## URL source of the Kanban data in JSON | ||
18 | * ##updateService## URL to update the Kanban data | ||
19 | * ##addBoardButton## display the add Board button (default true) | ||
20 | * ##addItemButton## display the add Item button (default true) | ||
21 | * ##removeBoardButton## display the remove Board button (default true) | ||
22 | * ##removeBoardItem## allow removing Item by drag and dropping them out of a board (default true) | ||
23 | |||
24 | == Example == | ||
25 | |||
26 | {{kanban}} | ||
27 | [ | ||
28 | {"id":"board1","title":"To Do","color":"red","item":[{"title":"Item 1"},{"title":"Item 2"}]}, | ||
29 | {"id":"board2","title":"Working","color":"blue","item":[{"title":"Item 3"},{"title":"Item 4"}]}, | ||
30 | {"id":"board3","title":"Done","color":"green","item":[{"title":"Item 5"},{"title":"Item 6"}]} | ||
31 | ] | ||
32 | {{/kanban}} |