Changes for page Pages on this Wiki

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

From version 18.1
edited by Sergiu Dumitriu
on 2012/12/30 02:13
Change comment: Imported from XAR
To 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]

Summary

Details

Page properties
Title
... ... @@ -1,1 +1,1 @@
1 -$msg.get("platform.index.documents")
1 +$services.localization.render('platform.index.documents')
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.Sergiu
1 +XWiki.ThomasMortagne
Content
... ... @@ -11,14 +11,20 @@
11 11  ##========
12 12  ## Set Tab Data
13 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 -])
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'})
22 22  ##=============================================
23 23  ## Add External Links tab if the LinkChecker module is present.
24 24  ## TODO: In the future replace this hardcoded link with Interface Extensions
... ... @@ -33,7 +33,7 @@
33 33  <div class="floatcontainer">
34 34   <ul class="xwikitabbar">
35 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>
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>
37 37  #end
38 38   </ul>
39 39  </div>
... ... @@ -46,10 +46,11 @@
46 46  <div class='xwikitabpanescontainer'>
47 47  #foreach ($tab in $tabs)
48 48   #if ($tab['tabName'] == $view)
49 - {{include document="$tab['document']"/}}
55 + {{include reference="$tab['document']"/}}
50 50   #break
51 51   #end
52 52  #end
53 53  </div>
54 54  {{/html}}
61 +#set($docextras=[])
55 55  {{/velocity}}