Wiki source code of Sandbox

Version 23.82 by Jip-jan Alunkel on May 13, 19:50

Show last authors
1 {{velocity}}
2 {{html}}
3
4 <!-- Button trigger modal -->
5 <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal">
6 Launch demo modal
7 </button>
8
9 <!-- Modal -->
10 <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
11 <div class="modal-dialog" role="document">
12 <div class="modal-content">
13 <div class="modal-header">
14 <h5 class="modal-title" id="exampleModalLabel">Modal title</h5>
15 <button type="button" class="close" data-dismiss="modal" aria-label="Close">
16 <span aria-hidden="true">&times;</span>
17 </button>
18 </div>
19 <div class="modal-body">
20 ...
21 </div>
22 <div class="modal-footer">
23 <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
24 <button type="button" class="btn btn-primary">Save changes</button>
25 </div>
26 </div>
27 </div>
28 </div>
29
30 #if($xcontext.user != 'XWiki.XWikiGuest')
31 #if($request.fromlog == "true")
32 #*
33 * De pagina is geladen t.g.v. submit van het login formulier. Aangezien de
34 * loginpagina in de header besloten ligt en daarmee dus beschikbaar is op
35 * iedere pagina is er geen noodzaak meer voor een redirect.
36 *
37 * --> Een bevestiging van login wordt gedaan.
38 *#
39 <div class="alert alert-success fadeInOut" role="alert" id="loggedInMsg">You have logged in.</div>
40 #end
41 #*
42 * De gebruiker is ingelogd.
43 *
44 * --> Een logout link plaatsen
45 *#
46 #if($xcontext.inactiveUserReference)
47 <a href="$xwiki.getURL($xcontext.inactiveUserReference, 'view')" class="brand-user" id="tmUser">$!xwiki.getUserName($xcontext.inactiveUserReference, false)</a>
48 #else
49 <a href="$xwiki.getURL($xcontext.user, 'view')" class="brand-user" id="tmUser">$!xwiki.getUserName($xcontext.user, false)</a>
50 #end
51 #set($relURL = $xwiki.getURL($services.model.resolveDocument('', 'default', $doc.documentReference.extractReference('document'))))
52 #set($queryStr = $request.queryString)
53 #set($qsArray = $queryStr.split("&"))
54 #set($qs = "")
55 #set($count = 0)
56 #foreach($kvPair in $qsArray)
57 #if($kvPair != "fromlog=true")
58 #if($count > 0)
59 #set($qs = "${qs}&")
60 #end
61 #set($qs = "${qs}${kvPair}")
62 #set($count = $count + 1)
63 #end
64 #end
65 #if($qs == "")
66 #set($xr = "${relURL}")
67 #else
68 #set($xr = "${relURL}?${qs}")
69 #end
70 <a href="$xwiki.getURL('XWiki.XWikiLogout', 'logout', "xredirect=${xr}")" id="tmLogout" rel="nofollow">$services.icon.renderHTML('log-out') $escapetool.xml($services.localization.render('logout'))</a>
71 #if($request.fromlog == "true")
72 #end
73 #else
74 #*
75 * De gebruiker is niet ingelogd.
76 *
77 * --> Een login link plaatsen met het login formulier
78 *#
79 #set($relURL = $xwiki.getURL($services.model.resolveDocument('', 'default', $doc.documentReference.extractReference('document'))))
80 #set($queryStr = $request.queryString)
81 #set($qsArray = $queryStr.split("&"))
82 #set($qs = "")
83 #set($count = 0)
84 #foreach($kvPair in $qsArray)
85 #if($kvPair != "fromlog=true")
86 #if($count > 0)
87 #set($qs = "${qs}&")
88 #end
89 #set($qs = "${qs}${kvPair}")
90 #set($count = $count + 1)
91 #end
92 #end
93 #if($qs == "")
94 #set($xr = "${relURL}?fromlog=true")
95 #else
96 #set($xr = "${relURL}?${qs}&fromlog=true")
97 #end
98 [Open login modal]
99
100
101 <form id="loginForm" action="${xwiki.getURL("xwiki:XWiki.XWikiLogin","loginsubmit")}" method="post" class="xform">
102 <input type="hidden" name="$!{services.csrf.getToken()}" value="xlogin" />
103 #if($xcontext.user != 'XWiki.XWikiGuest')
104 <input type="hidden" name="logged_in" value="true" />
105 #end
106 #set($xrURL = "${xr}")
107 <input type="hidden" name="xredirect" value="${xrURL}" />
108 #if("$!request.srid" != '')
109 <input type="hidden" name="srid" value="$!escapetool.xml($request.srid)" />
110 #end
111 <input type="hidden" name="form_token" value="$!{services.csrf.getToken()}" />
112
113 #xwikimessageboxstart($services.localization.render('login') '')
114 #set($message = $xcontext.message)
115 #if($message)
116 <!-- previous login errors -->
117 #error($services.localization.render($message))
118 #end
119 #set($authFailureStrategyMessage = $services.security.authentication.getErrorMessage($request.j_username))
120 #if ("$!authFailureStrategyMessage" != '')
121 #error($authFailureStrategyMessage)
122 #end
123 #set ($supplementaryForm = $services.security.authentication.getForm($request.j_username))
124 <label for="j_username">$services.localization.render('username')</label>
125 #set ($forgotUsernameURL = $services.security.authentication.getAuthenticationURL('retrieveusername', $NULL))
126 #if("$!forgotUsernameURL" != "")
127 <span class="xAdditional"><a href="$forgotUsernameURL" tabindex="500">$services.localization.render('xe.admin.forgotUsername.loginMessage')</a></span>
128 #end
129 <span class="input-group">
130 <span class="input-group-addon">$services.icon.renderHTML('user')</span>
131 <input class="form-control" type="text" id="j_username" size="60" name="j_username" value="" tabindex="100"/>
132 </span>
133 <label for="j_password">$services.localization.render('password')</label>
134 #set ($resetPasswordUrl = $services.security.authentication.getAuthenticationURL('resetpassword', $NULL))
135 #if("$!resetPasswordUrl" != '')
136 <span class="xAdditional"><a href="$resetPasswordUrl" tabindex="600">$services.localization.render('xe.admin.passwordReset.loginMessage')</a></span>
137 #end
138 <span class="input-group">
139 <span class="input-group-addon">$services.icon.renderHTML('lock')</span>
140 <input type="password" id="j_password" size="60" name="j_password" value="" tabindex="200"/>
141 </span>
142 <label class="xHint" for="rememberme">
143 <input id="rememberme" type="checkbox" name="j_rememberme" value="true" tabindex="300"/> $services.localization.render('remembermeonthiscomp')
144 </label>
145 #if ("$!supplementaryForm" != "")
146 <div id="dedicated-auth-failures-field">
147 $supplementaryForm
148 </div>
149 #end
150 <input type="submit" class="btn btn-primary col-xs-12" value="$services.localization.render('login')" tabindex="400"/>
151 #xwikimessageboxend()
152 </form>
153
154 ## Ensure that the username field of the login form has the focus to make it easy for users to log in quickly
155 <script>
156 document.forms.loginForm.j_username.focus();
157 </script>
158 ## #template("endpage.vm")
159 #end
160 <script>
161 function removeParam(url, parameter) {
162 const replacer = (m, p1, p2) => (p1 === '?' && p2 === '&' ? '?' : p2 || '');
163 return url.replace(new RegExp(`([?&])${parameter}=[^&#]+([&#])?`), replacer);
164 }
165 const nextURL = removeParam(document.URL, "fromlog"),
166 nextTitle = document.title,
167 nextState = {};
168 window.history.replaceState(nextState, nextTitle, nextURL);
169 setTimeout(function(){
170 document.getElementById('loggedInMsg').remove();
171 }, 6000);
172 </script>
173
174 {{/html}}
175 {{/velocity}}
176
177
178 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!
179
180 {{info}}
181 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.
182 {{/info}}
183
184 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.
185
186 Here are a number of test pages you can play with:
187
188 * [[Sandbox Test Page 1>>Sandbox.TestPage1]]
189 * [[Sandbox Test Page 2>>Sandbox.TestPage2]]
190 * [[Sandbox Test Page 3>>Sandbox.TestPage3]]
191
192 Below is a demonstration of the [[XWiki Syntax>>XWiki.XWikiSyntax]] you can use in wiki pages (headings, images, tables).
193
194 = Headings =
195
196 XWiki offers 6 levels of headings. You can use them to structure your pages.
197
198 == Level 2 Heading ==
199
200 === Level 3 Heading ===
201
202 ==== Level 4 Heading 4 ====
203
204 ===== Level 5 Heading 5 =====
205
206 ====== Level 6 Heading 6 ======
207
208 = Styles =
209
210 Basic styles are supported in XWiki:
211
212 * **Text in Bold**
213 * //Text in Italics//
214 * __Text in Underline__
215 * --Text in Strikethrough--
216 * Text in ,,subscript,,
217 * Text in ^^superscript^^
218
219 = Lists =
220
221 You can create various types of lists in your wiki pages:
222
223 == Unordered list ==
224
225 * Level 1
226 ** Level 2
227 *** Level 3
228 ** Level 2
229 * Level 1
230
231 == Numbered list ==
232
233 1. Item
234 11. Subitem
235 111. Item
236 1. Subitem
237
238 == Mixed list ==
239
240 1. Item 1
241 11. Item 2
242 11*. Item 3
243 11*. Item 4
244 1. Item 5
245
246 = Tables =
247
248 You can create tables right into wiki pages:
249
250 == Table with headers in the top row ==
251
252 |= table header |= table header |= table header
253 | cell | cell | cell
254 | cell | cell | cell
255
256 == Table with headers in the top row and left column ==
257
258 |= table header |= table header |= table header
259 |= table header | cell | cell
260 |= table header | cell | cell
261
262 = Links =
263
264 XWiki allows you to create links to other pages in your wiki or on the web:
265
266 * [[WebHome]] -> links to the homepage of the current space
267 * [[Sandbox Home>>WebHome]] -> links can have labels
268 * [[Wiki Home>>Main.WebHome]] -> a link can use the SpaceName.PageName format to link to a page located in another space
269 * [[http://www.xwiki.org]] -> you can link to wiki pages or to external websites
270 * [[XWiki.org Website>>http://www.xwiki.org]] -> link labels work for exernal links too
271
272 You can also create links to attachments:
273
274 attach:XWikiLogo.png
275
276 = Images =
277
278 You can insert images in your wiki pages:
279
280 [[image:XWikiLogo.png]]
281
282 = Macros =
283
284 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:
285
286 == Warning Macro ==
287
288 This macro allows you to draw users' attention to a specific piece of information:
289
290 == Table of Contents ==
291
292 This macro automatically generates a table of contents of your wiki page based on headings:
293
294 {{toc/}}