Changes for page Pages on this Wiki
Last modified by Thomas Mortagne on 2015/11/23 11:40
From version 14.1
edited by Caleb James DeLisle
on 2011/09/30 20:58
on 2011/09/30 20:58
Change comment:
Imported from XAR
Summary
-
Page properties (3 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 -$msg.get(" xe.index.documents")1 +$msg.get("platform.index.documents") - Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. CalebJamesDeLisle1 +XWiki.ThomasMortagne - Content
-
... ... @@ -1,4 +1,7 @@ 1 1 {{velocity}} 2 +##================ 3 +## Find which tab to display 4 +##================ 2 2 #if("$!{view}" == '') 3 3 #set($view = $request.getParameter('view')) 4 4 #if("$!{view}" == '') ... ... @@ -5,56 +5,48 @@ 5 5 #set ($view = 'index') 6 6 #end 7 7 #end 8 -#macro(indexTab $tabname $idSuffix $translationKeySuffix) 9 -<li id="xwiki${idSuffix}"#if($view == $tabname) class="active"#end><a href="$doc.getURL('view', "view=${tabname}&$!param")">$msg.get("xe.index${translationKeySuffix}")</a></li> 11 +##======== 12 +## Set Tab Data 13 +##======== 14 +#set ($tabs = [ 15 + {'tabName' : 'index', 'idSuffix' : 'index', 'translationKey' : 'platform.index', 'document' : 'XWiki.Tableview'}, 16 + {'tabName' : 'tree', 'idSuffix' : 'treeview', 'translationKey' : 'platform.index.tree', 'document' : 'XWiki.Treeview'}, 17 + {'tabName' : 'orphans', 'idSuffix' : 'orphansview', 'translationKey' : 'platform.index.orphaned', 'document' : 'XWiki.OrphanedPages'}, 18 + {'tabName' : 'attachments', 'idSuffix' : 'attachments', 'translationKey' : 'platform.index.attachments', 'document' : 'XWiki.AllAttachments'}, 19 + {'tabName' : 'deletedDocs', 'idSuffix' : 'deletedDocs', 'translationKey' : 'platform.index.documentsTrash', 'document' : 'XWiki.DeletedDocuments'}, 20 + {'tabName' : 'deletedAttachments', 'idSuffix' : 'deletedAttachments', 'translationKey' : 'platform.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'})) 10 10 #end 29 +##=========== 30 +## Display the Tabs 31 +##=========== 11 11 {{html}} 12 12 <div class="floatcontainer"> 13 -<ul class="xwikitabbar"> 14 -#indexTab('index', 'index', '') 15 -#indexTab('tree', 'treeview', '.tree') 16 -#indexTab('orphans', 'orphansview', '.orphaned') 17 -#indexTab('attachments', 'attachments', '.attachments') 18 -#indexTab('deletedDocs', 'deletedDocs', '.documentsTrash') 19 -#indexTab('deletedAttachments', 'deletedAttachments', '.attachmentsTrash') 20 -</ul> 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']&$!param")">$msg.get($tab['translationKey'])</a></li> 37 +#end 38 + </ul> 21 21 </div> 22 -<div class="xwikitabpanescontainer"> 23 23 {{/html}} 24 24 25 -## ============================================== 26 -## If view=index then displays the index of pages 27 -## ============================================== 28 -#if ($view == 'index') 29 -{{include document="XWiki.Tableview" /}} 30 -#elseif ($view == 'tree') 31 -## ============================================== 32 -## If view=tree then displays the treeview 33 -## ============================================== 34 -{{include document="XWiki.Treeview" /}} 35 -#elseif ($view == 'attachments') 36 -## ============================================== 37 -## If view=attachments then display attachments 38 -## ============================================== 39 -{{include document="XWiki.AllAttachments" /}} 40 -#elseif ($view == 'orphans') 41 -## ============================================== 42 -## If view=orphans then display orphans 43 -## ============================================== 44 -{{include document="XWiki.OrphanedPages" /}} 45 -#elseif ($view == 'deletedDocs') 46 -## ============================================== 47 -## If view=deletedDocs then display the recycle bin 48 -## ============================================== 49 -{{include document="XWiki.DeletedDocuments" /}} 50 -#elseif ($view == 'deletedAttachments') 51 -## ============================================== 52 -## If view=deletedAttachments then display the attachment trash 53 -## ============================================== 54 -{{include document="XWiki.DeletedAttachments" /}} 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 55 55 #end 56 - 57 -{{html}} 58 58 </div> 59 59 {{/html}} 60 60 {{/velocity}}