Todo Macro
View and edit TODOs right from XWiki pages |
Type | XAR |
Category | |
Developed by | |
Rating | |
License | GNU Lesser General Public License 2.1 |
Table of contents
Description
The Todo macro allows to view and edit any Todo right from XWiki pages. It is a very practical and efficient way to manage tasks list.
Usage
You can insert a new Todo in 2 ways:
- Edit the page in WYSIWYG mode and add a new Todo Macro to the page:
- Write the macro code in Wiki mode:{{todo status="resolved" priority="high" assignee="ludovic"}}Publish the Todo macro{{/todo}}
Parameters definition
Name | Optional | Allowed values | Default values | Description |
---|---|---|---|---|
Assignee | yes | string | none | the name of the person assigned for the task |
Status | yes | open, resolved | open | this parameter specifies whether the task is open or resolved |
Priority | yes | low, normal, high | normal | the priority of the task |
Content | No | string | none | the name of the task |
Examples
Simple Todo
You can have a simple list of Todos that you can manipulate.
Code:
{{todo status="resolved" priority="high" assignee="ludovic"}}Finish the demo pages{{/todo}}
{{todo status="open" priority="normal" assignee="ludovic"}}Publish the application on xwiki.org{{/todo}}
{{todo status="open" priority="low" assignee="ludovic"}}Improve the todo application{{/todo}}
Result
On this page you can change the status for any Todo or mark as resolved the ones that you completed.
If you want to change the status you have to click on the little pencil icon to the right of the Todo:
Make the necessary modifications:
And then click on "Change status":
In order to mark a Todo as Resolved you just need to click on the green checkmark to the right of the Todo:
After clicking on it the green checkmark will disappear, the status will change from "open" to "resolved" and the Todo name will become strikethrough.
Advanced Todo
You can have a more advanced page of tasks where you can either hide finished todos or list all of them.
Code:
#if($request.hide)
[[See all todos>>$doc.fullName]]
#else
[[Hide finished todos>>${doc.fullName}?hide=1]]
#end
{{/velocity}}
This is a more advanced todo demo with a special button to allow to hide finished todos:
{{todo status="resolved" priority="high" assignee="ludovic"}}Finish the demo pages{{/todo}}
{{todo status="open" priority="normal" assignee="ludovic"}}Publish the application on xwiki.org{{/todo}}
{{todo status="open" priority="low" assignee="ludovic"}}Improve the todo application{{/todo}}
Result
See all todos:
Hide finished todos:
Listing Todos
There is also a macro that allows you to list all the todos in a space or in the whole Wiki.
- Edit the page in WYSIWYG mode and add a new Todo List Macro to the page:
- Write the macro code in Wiki mode:This demo shows how to list todos in a specific space:
{{todolist space="Todo" /}}
Result
Prerequisites & Installation Instructions
We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager). Note that installing Extensions when being offline is currently not supported and you'd need to use some complex manual method.
You can also use the following manual method, which is useful if this extension cannot be installed with the Extension Manager or if you're using an old version of XWiki that doesn't have the Extension Manager:
- Log in the wiki with a user having Administration rights
- Go to the Administration page and select the Import category
- Follow the on-screen instructions to upload the downloaded XAR
- Click on the uploaded XAR and follow the instructions
- You'll also need to install all dependent Extensions that are not already installed in your wiki
Visit XWiki.TodoMacroInstall after importing the XAR file. The TODO samples are on the Todo.WebHome page.
Release Notes
v1.0
First version of the TODO macro