Changes for page AWMKanbanMacro
Summary
Details
- Page properties
-
- Content
-
... ... @@ -3,14 +3,15 @@ 3 3 Example: 4 4 5 5 ##{{{ 6 -{{awmkanban app="Help.Applications.Movies" category="databaseList1" columns="staticList1,boolean1" xwql="obj.boolean1=0" /}} 6 +{{awmkanban app="Help.Applications.Movies" category="databaseList1" displayedCategoryColumns="Help.Applications.Contributors.Charlie Chaplin" columns="staticList1,boolean1" xwql="obj.boolean1=0" /}} 7 7 }}}## 8 8 9 -* ##app or className## application or className for which to build the kanban board 10 -* ##category## field to use to break down the kanban board 11 -* ##xwql## additional xwql to restrict the query 12 -* ##title## field to display the title 13 -* ##columns## additional columns to display 9 +* ##app or className## - application or className for which to build the kanban board 10 +* ##category## - class field used to group the kanban board into columns 11 +* ##displayedCategoryColumns## - only display these values of the `category` field as columns 12 +* ##xwql## - additional xwql to restrict the query 13 +* ##title## - field to display the title 14 +* ##columns## - the class fields to display as a description in each card 14 14 15 15 Examples: 16 16 ... ... @@ -18,6 +18,10 @@ 18 18 19 19 {{awmkanban app="Help.Applications.Movies" category="databaseList1" columns="staticList1,boolean1"/}} 20 20 22 +== Kanban of Movies showing the director field, only showing a subset of directors== 23 + 24 +{{awmkanban app="Help.Applications.Movies" category="databaseList1" displayedCategoryColumns="Help.Applications.Contributors.Charlie Chaplin" columns="staticList1,boolean1"/}} 25 + 21 21 == Kanban of Movies by genre showing the director field only comedy movies == 22 22 23 23 {{awmkanban app="Help.Applications.Movies" category="databaseList1" columns="staticList1,boolean1" xwql="obj.boolean1=0"/}}
- XWiki.WikiMacroClass[1]
-
- Macro code
-
... ... @@ -27,9 +27,17 @@ 27 27 ## We don't override the xwql variable in case it was defined externally by another macro calling this one (e.g. TaskManager.KanbanBoardMacro). 28 28 #set($xwql = "") 29 29 #end 30 +#if ($xcontext.macro.params.colors) 31 + #set($colors = $xcontext.macro.params.colors) 32 +#else 33 + ## We set as default the original colors: green,blue,orange,yellow,red 34 + #set($colors = "#8C4,#0AC,#F91,#FC3,#E43") 35 +#end 36 +#set ($displayedCategoryColumns = "$!xcontext.macro.params.displayedCategoryColumns") 37 + 30 30 #set($width = "$xcontext.macro.params.width") 31 -#set($source = $xwiki.getDocument("Macros.KanbanAWMSource").getURL("get", "xpage=plain&outputSyntax=plain&className=${escapetool.url($className)}&category=${escapetool.url($category)}&title=${escapetool.url($title)}&columns=${escapetool.url($columns)}&xwql=${escapetool.url($xwql)}")) 32 -#set($awmupdatepath = "/objects/${className}/0/properties/${category}/") 39 +#set($source = $xwiki.getDocument("Macros.KanbanAWMSource").getURL("get", "xpage=plain&outputSyntax=plain&className=${escapetool.url($className)}&category=${escapetool.url($category)}&displayedCategoryColumns=${escapetool.url($displayedCategoryColumns)}&title=${escapetool.url($title)}&columns=${escapetool.url($columns)}&xwql=${escapetool.url($xwql)}&colors=${escapetool.url($colors)}")) 40 +#set($awmupdatepath = "/objects/${className}/0/properties/${category}/") 33 33 {{kanban source="${source}" updateService="" addBoardButton="false" addItemButton="false" removeBoardButton="false" removeItemButton="false" awmupdatepath="${awmupdatepath}" width="${width}" /}} 34 34 {{/velocity}} 35 35
- XWiki.WikiMacroParameterClass[9]
-
- Parameter description
-
... ... @@ -1,1 +1,1 @@ 1 - Columnstouse to display additional data1 +The class properties to display in each card description as additional data (comma separated values)
- XWiki.WikiMacroParameterClass[11]
-
- Parameter description
-
... ... @@ -1,0 +1,1 @@ 1 +List of colors separated by commas, each color corresponds to a column. - Parameter name
-
... ... @@ -1,0 +1,1 @@ 1 +colors
- XWiki.WikiMacroParameterClass[12]
-
- Parameter description
-
... ... @@ -1,0 +1,1 @@ 1 +Have only these category values as board columns, i.e. for 'ToDo,InProgress' (comma separated values) you will only have 2 kanban columns. Note that these should be values accepted by the specified category property. - Parameter mandatory
-
... ... @@ -1,0 +1,1 @@ 1 +No - Parameter name
-
... ... @@ -1,0 +1,1 @@ 1 +displayedCategoryColumns