 | Help document XWiki code for a specific space |
| Type | Snippet |
| Developed by | Ludovic Dubost |
| License | GNU Lesser General Public License 2.1 |
The objective of this code is to help document XWiki code for a specific space (or more).
To make the best out of this snippet each code page needs to have:
- a proper title describing what this page does
- a proper parent to the home of the application code
- a small velocity comment similar to a javadoc:
For example:
#**
* Documentation page
* @type documentation
* @author ludovic
*#
The possible types are:
- class
- groovy
- sheet
- script
- skin
- template
- macro
- panel
- javascript
- styles
- translation
- ajaxservice
- documentation
- content
- mailtemplate
- alias
{{velocity filter="none"}}
#**
* Documentation page
* @type documentation
* @author ludovic
*#
#if($hasAdmin)
Here are the pages that make up the code of the application
#set($list = $util.arrayList)
#set($space = "'ExtensionCode','ExtensionCode'")
#macro(showpages $tit $sql)
=== $tit ===
#foreach($page in $xwiki.searchDocuments($sql))
#if(!$list.contains($page))
#set($ok = $list.add($page))
#set($pagedoc = $xwiki.getDocument($page))
* [[$pagedoc.displayTitle ($page)>>$page]]
#end
#end
#end
#showpages("XWiki Classes", "where doc.web in (${space}) and doc.content like '%@type class%' and doc.content not like '%TODO DELETE%' order by doc.name")
#showpages("Groovy Classes", "where doc.web in (${space}) and doc.content like '%@type groovy%' and doc.content not like '%TODO DELETE%' order by doc.name")
#showpages("Sheets", "where doc.web in (${space}) and doc.content like '%@type sheet%' and doc.content not like '%TODO DELETE%' order by doc.name")
#showpages("Scripts", "where doc.web in (${space}) and doc.content like '%@type script%' and doc.content not like '%TODO DELETE%' order by doc.name")
#showpages("Skin and Color Themes", "where doc.web in (${space}) and doc.content like '%@type skin%' and doc.content not like '%TODO DELETE%' order by doc.name")
#showpages("Page Templates and Template Providers", "where doc.web in (${space}) and doc.content like '%@type template%' and doc.content not like '%TODO DELETE%' order by doc.name")
#showpages("Macros", "where doc.web in (${space}) and doc.content like '%@type macro%' and doc.content not like '%TODO DELETE%' order by doc.name")
#showpages("Panels", "where doc.web in (${space}) and doc.content like '%@type panel%' and doc.content not like '%TODO DELETE%' order by doc.name")
#showpages("JS Extensions", "where doc.web in (${space}) and doc.content like '%@type javascript%' and doc.content not like '%TODO DELETE%' order by doc.name")
#showpages("Style Extensions", "where doc.web in (${space}) and doc.content like '%@type styles%' and doc.content not like '%TODO DELETE%' order by doc.name")
#showpages("Translations Pages", "where doc.web in (${space}) and doc.content like '%@type translation%' and doc.content not like '%TODO DELETE%' order by doc.name")
#showpages("Services", "where doc.web in (${space}) and doc.content like '%@type ajaxservice%' and doc.content not like '%TODO DELETE%' order by doc.name")
#showpages("Documentation", "where doc.web in (${space}) and doc.content like '%@type documentation%' and doc.content not like '%TODO DELETE%' order by doc.name")
#showpages("Content", "where doc.web in (${space}) and doc.content like '%@type content%' and doc.content not like '%TODO DELETE%' order by doc.name")
#showpages("Email Templates", "where doc.web in (${space}) and doc.content like '%@type mailtemplate%' and doc.content not like '%TODO DELETE%' order by doc.name")
##showpages("Pages à effacer", "where doc.web in (${space}) and doc.content like '%TODO DELETE%' order by doc.name")
#showpages("Aliases (entry points to an application)", "where doc.web in (${space}) and doc.content like '%@type alias%' and doc.content not like '%TODO DELETE%' order by doc.name")
#showpages("Other pages", "where doc.web in (${space}) and doc.content not like '%TODO DELETE%' order by doc.name")
#else
This page is not authorized
#end
{{/velocity}}