Hide last authors
Admin 1.1 1 {{velocity}}
Vincent Massol 6.1 2 ##================
3 ## Find which tab to display
4 ##================
Admin 2.1 5 #if("$!{view}" == '')
6 #set($view = $request.getParameter('view'))
7 #if("$!{view}" == '')
8 #set ($view = 'index')
Admin 1.1 9 #end
10 #end
Vincent Massol 6.1 11 ##========
12 ## Set Tab Data
13 ##========
14 #set ($tabs = [
15 {'tabName' : 'index', 'idSuffix' : 'index', 'translationKey' : 'xe.index', 'document' : 'XWiki.Tableview'},
16 {'tabName' : 'tree', 'idSuffix' : 'treeview', 'translationKey' : 'xe.index.tree', 'document' : 'XWiki.Treeview'},
17 {'tabName' : 'orphans', 'idSuffix' : 'orphansview', 'translationKey' : 'xe.index.orphaned', 'document' : 'XWiki.OrphanedPages'},
18 {'tabName' : 'attachments', 'idSuffix' : 'attachments', 'translationKey' : 'xe.index.attachments', 'document' : 'XWiki.AllAttachments'},
19 {'tabName' : 'deletedDocs', 'idSuffix' : 'deletedDocs', 'translationKey' : 'xe.index.documentsTrash', 'document' : 'XWiki.DeletedDocuments'},
20 {'tabName' : 'deletedAttachments', 'idSuffix' : 'deletedAttachments', 'translationKey' : 'xe.index.attachmentsTrash', 'document' : 'XWiki.DeletedAttachments'}
21 ])
22 ##=============================================
23 ## Add External Links tab if the LinkChecker module is present.
24 ## TODO: In the future replace this hardcoded link with Interface Extensions
25 ##=============================================
26 #if($services.rendering.defaultTransformationNames.contains('linkchecker') && $services.linkchecker)
27 #set ($dummy = $tabs.add({'tabName' : 'externalLinks', 'idSuffix' : 'externalLinks', 'translationKey' : 'platform.linkchecker.indexTab', 'document' : 'XWiki.ExternalLinks'}))
Admin 2.1 28 #end
Vincent Massol 6.1 29 ##===========
30 ## Display the Tabs
31 ##===========
Admin 1.1 32 {{html}}
33 <div class="floatcontainer">
Vincent Massol 6.1 34 <ul class="xwikitabbar">
35 #foreach ($tab in $tabs)
36 <li id="xwiki$tab['idSuffix']"#if($view == $tab['tabName']) class="active"#end><a href="$doc.getURL('view', "view=$tab['tabName']&amp;$!param")">$msg.get($tab['translationKey'])</a></li>
37 #end
38 </ul>
Admin 1.1 39 </div>
40 {{/html}}
Admin 3.1 41
Vincent Massol 6.1 42 ##==========================
43 ## Include the Tab data for the selected Tab
44 ##==========================
45 {{html wiki="true"}}
46 <div class='xwikitabpanescontainer'>
47 #foreach ($tab in $tabs)
48 #if ($tab['tabName'] == $view)
49 {{include document="$tab['document']"/}}
50 #break
51 #end
Admin 1.1 52 #end
53 </div>
54 {{/html}}
55 {{/velocity}}

Get Connected