Wiki source code of Sandbox

Version 22.2 by Jip-jan Alunkel on maio 11, 13:42

Show last authors
1
2 {{velocity}}
3 {{html}}
4
5 $doc.documentReference.extractReference('WIKI')<br />
6 $xwiki.getURL($services.model.resolveDocument('', 'default', $doc.documentReference.extractReference('WIKI')))<br />
7
8 current: $!{services.csrf.getToken()}<br />
9 #set($token = "$!{request.getParameter('form_token')}")
10 requested: $request.getParameter("$!{services.csrf.getToken()}")<br />
11 #set($requested = "$!(request.getParameter('${token}'))")
12 #if($xcontext.user != 'XWiki.XWikiGuest')
13 #*
14 * De gebruiker is ingelogd.
15 *
16 * --> Een logout link plaatsen
17 *#
18 [logout]
19 ## #if($request.xredirect)
20 #if($requested == "xlogin")
21 #*
22 * De pagina is geladen t.g.v. submit van het login formulier. Aangezien de
23 * loginpagina in de header besloten ligt en daarmee dus beschikbaar is op
24 * iedere pagina is er geen noodzaak meer voor een redirect.
25 *
26 * --> Een bevestiging van login wordt gedaan.
27 *#
28 ## $response.sendRedirect($request.xredirect)
29 #else
30 #*
31 *
32 *#
33 ## $response.sendRedirect($xwiki.getURL($services.model.resolveDocument('', 'default', $doc.documentReference.extractReference('WIKI'))))
34 #end
35 ###elseif($doc.fullName != 'XWiki.XWikiLogin')
36 ## #set($qs = "$!{request.queryString}")
37 ## #if(!$request.getParameter('xredirect'))
38 ## #set($qs = "xredirect=$escapetool.url($doc.getURL('view'))&${qs}")
39 ## #end
40 ## $response.sendRedirect($xwiki.getURL('XWiki.XWikiLogin', 'login', $qs))
41 #else
42 ## Login page
43 ##template("startpage.vm")
44 ##<div class="main layoutsubsection">
45 ##<div id="mainContentArea">
46 #*
47 * De gebruiker is niet ingelogd.
48 *
49 * --> Een login link plaatsen met het login formulier
50 *#
51 <form id="loginForm" action="$doc.getURL('loginsubmit')" method="post" class="xform">
52 <input type="hidden" name="$!{services.csrf.getToken()}" value="xlogin" />
53 #if($xcontext.user != 'XWiki.XWikiGuest')
54 <input type="hidden" name="logged_in" value="true" />
55 #end
56 <input type="hidden" name="xredirect" value="$!{escapetool.xml($request.xredirect)}"/>
57 #if("$!request.srid" != '')
58 <input type="hidden" name="srid" value="$!escapetool.xml($request.srid)"/>
59 #end
60 <input type="hidden" name="form_token" value="$!{services.csrf.getToken()}"/>
61
62 #xwikimessageboxstart($services.localization.render('login') '')
63 #set($message = $xcontext.message)
64 #if($message)
65 <!-- previous login errors -->
66 #error($services.localization.render($message))
67 #end
68 #set($authFailureStrategyMessage = $services.security.authentication.getErrorMessage($request.j_username))
69 #if ("$!authFailureStrategyMessage" != '')
70 #error($authFailureStrategyMessage)
71 #end
72 #set ($supplementaryForm = $services.security.authentication.getForm($request.j_username))
73 <label for="j_username">$services.localization.render('username')</label>
74 #set ($forgotUsernameURL = $services.security.authentication.getAuthenticationURL('retrieveusername', $NULL))
75 #if("$!forgotUsernameURL" != "")
76 <span class="xAdditional"><a href="$forgotUsernameURL" tabindex="500">$services.localization.render('xe.admin.forgotUsername.loginMessage')</a></span>
77 #end
78 <span class="input-group">
79 <span class="input-group-addon">$services.icon.renderHTML('user')</span>
80 <input class="form-control" type="text" id="j_username" size="60" name="j_username" value="" tabindex="100"/>
81 </span>
82 <label for="j_password">$services.localization.render('password')</label>
83 #set ($resetPasswordUrl = $services.security.authentication.getAuthenticationURL('resetpassword', $NULL))
84 #if("$!resetPasswordUrl" != '')
85 <span class="xAdditional"><a href="$resetPasswordUrl" tabindex="600">$services.localization.render('xe.admin.passwordReset.loginMessage')</a></span>
86 #end
87 <span class="input-group">
88 <span class="input-group-addon">$services.icon.renderHTML('lock')</span>
89 <input type="password" id="j_password" size="60" name="j_password" value="" tabindex="200"/>
90 </span>
91 <label class="xHint" for="rememberme">
92 <input id="rememberme" type="checkbox" name="j_rememberme" value="true" tabindex="300"/> $services.localization.render('remembermeonthiscomp')
93 </label>
94 #if ("$!supplementaryForm" != "")
95 <div id="dedicated-auth-failures-field">
96 $supplementaryForm
97 </div>
98 #end
99 <input type="submit" class="btn btn-primary col-xs-12" value="$services.localization.render('login')" tabindex="400"/>
100 #xwikimessageboxend()
101 </form>
102
103 ## Ensure that the username field of the login form has the focus to make it easy for users to log in quickly
104 <script type="javascript">
105 //<![CDATA[
106 document.forms.loginForm.j_username.focus();
107 //]]>
108 </script>
109 ## #template("endpage.vm")
110 #end
111
112 {{/html}}
113 {{/velocity}}
114
115
116 The sandbox is a part of your wiki that you can freely modify. It's meant to let you practice editing. You will discover how page editing works and create new pages. Simply click on **Edit** to get started!
117
118 {{info}}
119 Don't worry about overwriting or losing stuff when editing the page, you can always roll back to the first version of the page from the "History" tab at the bottom of the page.
120 {{/info}}
121
122 If you want to give a look to the underlying [[XWiki Syntax>>XWiki.XWikiSyntax]], you can click on "Wiki code" in the "Show" menu or click on the "Source" tab when editing the page.
123
124 Here are a number of test pages you can play with:
125
126 * [[Sandbox Test Page 1>>Sandbox.TestPage1]]
127 * [[Sandbox Test Page 2>>Sandbox.TestPage2]]
128 * [[Sandbox Test Page 3>>Sandbox.TestPage3]]
129
130 Below is a demonstration of the [[XWiki Syntax>>XWiki.XWikiSyntax]] you can use in wiki pages (headings, images, tables).
131
132 = Headings =
133
134 XWiki offers 6 levels of headings. You can use them to structure your pages.
135
136 == Level 2 Heading ==
137
138 === Level 3 Heading ===
139
140 ==== Level 4 Heading 4 ====
141
142 ===== Level 5 Heading 5 =====
143
144 ====== Level 6 Heading 6 ======
145
146 = Styles =
147
148 Basic styles are supported in XWiki:
149
150 * **Text in Bold**
151 * //Text in Italics//
152 * __Text in Underline__
153 * --Text in Strikethrough--
154 * Text in ,,subscript,,
155 * Text in ^^superscript^^
156
157 = Lists =
158
159 You can create various types of lists in your wiki pages:
160
161 == Unordered list ==
162
163 * Level 1
164 ** Level 2
165 *** Level 3
166 ** Level 2
167 * Level 1
168
169 == Numbered list ==
170
171 1. Item
172 11. Subitem
173 111. Item
174 1. Subitem
175
176 == Mixed list ==
177
178 1. Item 1
179 11. Item 2
180 11*. Item 3
181 11*. Item 4
182 1. Item 5
183
184 = Tables =
185
186 You can create tables right into wiki pages:
187
188 == Table with headers in the top row ==
189
190 |= table header |= table header |= table header
191 | cell | cell | cell
192 | cell | cell | cell
193
194 == Table with headers in the top row and left column ==
195
196 |= table header |= table header |= table header
197 |= table header | cell | cell
198 |= table header | cell | cell
199
200 = Links =
201
202 XWiki allows you to create links to other pages in your wiki or on the web:
203
204 * [[WebHome]] -> links to the homepage of the current space
205 * [[Sandbox Home>>WebHome]] -> links can have labels
206 * [[Wiki Home>>Main.WebHome]] -> a link can use the SpaceName.PageName format to link to a page located in another space
207 * [[http://www.xwiki.org]] -> you can link to wiki pages or to external websites
208 * [[XWiki.org Website>>http://www.xwiki.org]] -> link labels work for exernal links too
209
210 You can also create links to attachments:
211
212 attach:XWikiLogo.png
213
214 = Images =
215
216 You can insert images in your wiki pages:
217
218 [[image:XWikiLogo.png]]
219
220 = Macros =
221
222 Macros allow you to make wiki content look better and to add additional features to your wiki. Here are 2 examples of how macros can be used in wiki pages:
223
224 == Warning Macro ==
225
226 This macro allows you to draw users' attention to a specific piece of information:
227
228 == Table of Contents ==
229
230 This macro automatically generates a table of contents of your wiki page based on headings:
231
232 {{toc/}}