Changes for page Pages on this Wiki
Last modified by qwerty on 2018/09/26 12:32
Summary
-
Page properties (5 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 -$ msg.get("xe.index.documents")1 +$services.localization.render('platform.index.documents') - Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. Admin1 +xwiki:XWiki.Thomas - Default language
-
... ... @@ -1,1 +1,0 @@ 1 -en - Hidden
-
... ... @@ -1,1 +1,1 @@ 1 - false1 +true - Content
-
... ... @@ -1,45 +1,62 @@ 1 1 {{velocity}} 2 -#if((!$view) || ($view == "")) 3 - #set($view = $request.getParameter("view")) 4 - #if((!$view) || ($view == "")) 5 - #set ($view = "index") 2 +##================ 3 +## Find which tab to display 4 +##================ 5 +#if("$!{view}" == '') 6 + #set($view = $request.getParameter('view')) 7 + #if("$!{view}" == '') 8 + #set ($view = 'index') 6 6 #end 7 7 #end 11 +##======== 12 +## Set Tab Data 13 +##======== 14 +#set($tabs = []) 15 +#macro(addAllDocsTab $tab) 16 + #if($xwiki.hasAccessLevel('view', "$!xcontext.user", $tab.get('document'))) 17 + #set($discard = $tabs.add($tab)) 18 + #end 19 +#end 20 +#addAllDocsTab({'tabName' : 'index', 'idSuffix' : 'index', 'translationKey' : 'platform.index', 'document' : 'XWiki.Tableview'}) 21 +#addAllDocsTab({'tabName' : 'tree', 'idSuffix' : 'treeview', 'translationKey' : 'platform.index.tree', 'document' : 'XWiki.Treeview'}) 22 +#if ($services.parentchild.isParentChildMechanismEnabled()) 23 + #addAllDocsTab({'tabName' : 'orphans', 'idSuffix' : 'orphansview', 'translationKey' : 'platform.index.orphaned', 'document' : 'XWiki.OrphanedPages'}) 24 +#end 25 +#addAllDocsTab({'tabName' : 'attachments', 'idSuffix' : 'attachments', 'translationKey' : 'platform.index.attachments', 'document' : 'XWiki.AllAttachments'}) 26 +#addAllDocsTab({'tabName' : 'deletedDocs', 'idSuffix' : 'deletedDocs', 'translationKey' : 'platform.index.documentsTrash', 'document' : 'XWiki.DeletedDocuments'}) 27 +#addAllDocsTab({'tabName' : 'deletedAttachments', 'idSuffix' : 'deletedAttachments', 'translationKey' : 'platform.index.attachmentsTrash', 'document' : 'XWiki.DeletedAttachments'}) 28 +##============================================= 29 +## Add External Links tab if the LinkChecker module is present. 30 +## TODO: In the future replace this hardcoded link with Interface Extensions 31 +##============================================= 32 +#if($services.rendering.defaultTransformationNames.contains('linkchecker') && $services.linkchecker) 33 + #set ($dummy = $tabs.add({'tabName' : 'externalLinks', 'idSuffix' : 'externalLinks', 'translationKey' : 'platform.linkchecker.indexTab', 'document' : 'XWiki.ExternalLinks'})) 34 +#end 35 +##=========== 36 +## Display the Tabs 37 +##=========== 8 8 {{html}} 9 9 <div class="floatcontainer"> 10 -<ul class="xwikitabbar"> 11 -<li id="xwikiindex"#if($view == "index") class="active"#end><a href="$doc.getURL("view", "view=index&$!param")">$msg.get("xe.index")</a></li> 12 - 13 -<li id="xwikitreeview"#if($view == "tree") class="active"#end><a href="$doc.getURL("view", "view=tree&$!param")">$msg.get("xe.index.tree")</a></li> 14 -<li id="xwikiorphansview"#if($view == "orphans") class="active"#end><a href="$doc.getURL("view", "view=orphans&$!param")">$msg.get("xe.index.orphaned")</a></li> 15 -<li id="xwikiattachments"#if($view == "attachments") class="active"#end><a href="$doc.getURL("view", "view=attachments&$!param")">$msg.get("xe.index.attachments")</a></li> 16 - 17 -</ul> 40 + <ul class="xwikitabbar"> 41 +#foreach ($tab in $tabs) 42 + <li id="xwiki$tab['idSuffix']"#if($view == $tab['tabName']) class="active"#end><a href="$doc.getURL('view', "view=$tab['tabName']&$!param")">$services.localization.render($tab['translationKey'])</a></li> 43 +#end 44 + </ul> 18 18 </div> 19 -<div class="xwikitabpanescontainer"> 20 20 {{/html}} 21 -## ============================================== 22 -## If view=index then displays the index of pages 23 -## ============================================== 24 -#if ($view == "index") 25 -{{include document="XWiki.Tableview" /}} 26 -#elseif ($view == "tree") 27 -## ============================================== 28 -## If view=tree then displays the treeview 29 -## ============================================== 30 -{{include document="XWiki.Treeview" /}} 31 -#elseif ($view == "attachments") 32 -## ============================================== 33 -## If view=attachments then display attachments 34 -## ============================================== 35 -{{include document="XWiki.AllAttachments" /}} 36 -#else 37 -## ============================================== 38 -## If view=orphans then display orphans 39 -## ============================================== 40 -{{include document="XWiki.OrphanedPages" /}} 47 + 48 +##========================== 49 +## Include the Tab data for the selected Tab 50 +##========================== 51 +{{html wiki="true"}} 52 +<div class='xwikitabpanescontainer'> 53 +#foreach ($tab in $tabs) 54 + #if ($tab['tabName'] == $view) 55 + {{include reference="$tab['document']"/}} 56 + #break 57 + #end 41 41 #end 42 -{{html}} 43 43 </div> 44 44 {{/html}} 61 +#set($docextras=[]) 45 45 {{/velocity}}