Changes for page Pages on this Wiki

Last modified by Thomas Mortagne on 2015/11/23 11:40

From version 24.1
edited by Thomas Mortagne
on 2015/11/23 11:40
Change comment: Install extension [org.xwiki.platform:xwiki-platform-index-ui-7.3]
To version 13.1
edited by Admin
on 2011/09/30 20:07
Change comment: Imported from XAR

Summary

Details

Page properties
Title
... ... @@ -1,1 +1,1 @@
1 -$services.localization.render('platform.index.documents')
1 +$msg.get("xe.index.documents")
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.ThomasMortagne
1 +XWiki.Admin
Default language
... ... @@ -1,0 +1,1 @@
1 +en
Hidden
... ... @@ -1,1 +1,1 @@
1 -true
1 +false
Content
... ... @@ -1,7 +1,4 @@
1 1  {{velocity}}
2 -##================
3 -## Find which tab to display
4 -##================
5 5  #if("$!{view}" == '')
6 6   #set($view = $request.getParameter('view'))
7 7   #if("$!{view}" == '')
... ... @@ -8,55 +8,56 @@
8 8   #set ($view = 'index')
9 9   #end
10 10  #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
8 +#macro(indexTab $tabname $idSuffix $translationKeySuffix)
9 +<li id="xwiki${idSuffix}"#if($view == $tabname) class="active"#end><a href="$doc.getURL('view', "view=${tabname}&amp;$!param")">$msg.get("xe.index${translationKeySuffix}")</a></li>
19 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 -##===========
38 38  {{html}}
39 39  <div class="floatcontainer">
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']&amp;$!param")">$services.localization.render($tab['translationKey'])</a></li>
43 -#end
44 - </ul>
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>
45 45  </div>
22 +<div class="xwikitabpanescontainer">
46 46  {{/html}}
47 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
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" /}}
58 58  #end
56 +
57 +{{html}}
59 59  </div>
60 60  {{/html}}
61 -#set($docextras=[])
62 62  {{/velocity}}