Changes for page Pages on this Wiki

Last modified by Thomas Mortagne on 2015/11/23 12:21

From version 1.1
edited by Admin
on 2009/09/09 02:00
Change comment: There is no comment for this version
To version 2.1
edited by Admin
on 2010/03/03 18:58
Change comment: Imported from XAR

Summary

Details

Page properties
Content
... ... @@ -1,19 +1,22 @@
1 1  {{velocity}}
2 -#if((!$view) || ($view == ""))
3 - #set($view = $request.getParameter("view"))
4 - #if((!$view) || ($view == ""))
5 - #set ($view = "index")
2 +#if("$!{view}" == '')
3 + #set($view = $request.getParameter('view'))
4 + #if("$!{view}" == '')
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}&amp;$!param")">$msg.get("xe.index${translationKeySuffix}")</a></li>
10 +#end
8 8  {{html}}
9 9  <div class="floatcontainer">
10 10  <ul class="xwikitabbar">
11 -<li id="xwikiindex"#if($view == "index") class="active"#end><a href="$doc.getURL("view", "view=index&amp;$!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&amp;$!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&amp;$!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&amp;$!param")">$msg.get("xe.index.attachments")</a></li>
16 -
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')
17 17  </ul>
18 18  </div>
19 19  <div class="xwikitabpanescontainer">
... ... @@ -21,23 +21,33 @@
21 21  ## ==============================================
22 22  ## If view=index then displays the index of pages
23 23  ## ==============================================
24 -#if ($view == "index")
27 +#if ($view == 'index')
25 25  {{include document="XWiki.Tableview" /}}
26 -#elseif ($view == "tree")
29 +#elseif ($view == 'tree')
27 27  ## ==============================================
28 28  ## If view=tree then displays the treeview
29 29  ## ==============================================
30 30  {{include document="XWiki.Treeview" /}}
31 -#elseif ($view == "attachments")
34 +#elseif ($view == 'attachments')
32 32  ## ==============================================
33 33  ## If view=attachments then display attachments
34 34  ## ==============================================
35 35  {{include document="XWiki.AllAttachments" /}}
36 -#else
39 +#elseif ($view == 'orphans')
37 37  ## ==============================================
38 38  ## If view=orphans then display orphans
39 39  ## ==============================================
40 40  {{include document="XWiki.OrphanedPages" /}}
44 +#elseif ($view == 'deletedDocs')
45 +## ==============================================
46 +## If view=deletedDocs then display the recycle bin
47 +## ==============================================
48 +{{include document="XWiki.DeletedDocuments" /}}
49 +#elseif ($view == 'deletedAttachments')
50 +## ==============================================
51 +## If view=deletedAttachments then display the attachment trash
52 +## ==============================================
53 +{{include document="XWiki.DeletedAttachments" /}}
41 41  #end
42 42  {{html}}
43 43  </div>