Wiki source code of Todo Macro Installation
Last modified by LudovicDubost on 2009/10/18 21:13
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | |||
2 | You can use this macro from the Wysiwyg Editor | ||
3 | |||
4 | This page allows to finish the installation of the Todo macro | ||
5 | |||
6 | {{velocity}} | ||
7 | #set($doc1 = $xwiki.getDocument("XWiki.TodoMacroService")) | ||
8 | #set($doc2 = $xwiki.getDocument("XWiki.TodoMacroGroovy")) | ||
9 | #set($doc3 = $xwiki.getDocument("XWiki.TodoListMacro")) | ||
10 | #set($doc4 = $xwiki.getDocument("XWiki.TodoMacro")) | ||
11 | #if(!$xwiki.hasProgrammingRights()) | ||
12 | #if($xwiki.hasAdminRights()) | ||
13 | #set($ok = $doc1.save()) | ||
14 | #set($ok = $doc2.save()) | ||
15 | #set($ok = $doc3.save()) | ||
16 | #set($ok = $doc4.save()) | ||
17 | #set($ok = $doc1.save()) | ||
18 | #set($ok = $doc2.save()) | ||
19 | #set($ok = $doc3.save()) | ||
20 | #set($ok = $doc4.save()) | ||
21 | {{html}} | ||
22 | #info("The TODO macro has been installed") | ||
23 | {{/html}} | ||
24 | #else | ||
25 | {{html}} | ||
26 | #warning("The TODO macro is not completely installed. You need to visit this page as an admin") | ||
27 | {{/html}} | ||
28 | #end | ||
29 | #else | ||
30 | {{html}} | ||
31 | #info("The TODO macro is installed.") | ||
32 | {{/html}} | ||
33 | #end | ||
34 | {{/velocity}} | ||
35 | |||
36 | If the TODO macro is properly installed the following todo will display properly: | ||
37 | |||
38 | {{todo status="open" priority="high"}}sample todo{{/todo}} |