Wiki source code of Sandbox

Version 26.3 by Jip-jan Alunkel on maio 13, 23:42

Show last authors
1 {{velocity}}
2 {{html}}
3
4 #if($xcontext.user != 'XWiki.XWikiGuest')
5 #if($request.fromlog == "true")
6 #*
7 * De pagina is geladen t.g.v. submit van het login formulier. Aangezien de
8 * loginpagina in de header besloten ligt en daarmee dus beschikbaar is op
9 * iedere pagina is er geen noodzaak meer voor een redirect.
10 *
11 * --> Een bevestiging van login wordt gedaan.
12 *#
13 <div class="alert alert-success fadeInOut" role="alert" id="loggedInMsg">You have logged in.</div>
14 #end
15 #*
16 * De gebruiker is ingelogd.
17 *
18 * --> Een logout link plaatsen
19 *#
20 #if($xcontext.inactiveUserReference)
21 <a href="$xwiki.getURL($xcontext.inactiveUserReference, 'view')" class="brand-user" id="tmUser">$!xwiki.getUserName($xcontext.inactiveUserReference, false)</a>
22 #else
23 <a href="$xwiki.getURL($xcontext.user, 'view')" class="brand-user" id="tmUser">$!xwiki.getUserName($xcontext.user, false)</a>
24 #end
25 #set($relURL = $xwiki.getURL($services.model.resolveDocument('', 'default', $doc.documentReference.extractReference('document'))))
26 #set($queryStr = $request.queryString)
27 #set($qsArray = $queryStr.split("&"))
28 #set($qs = "")
29 #set($count = 0)
30 #foreach($kvPair in $qsArray)
31 #if($kvPair != "fromlog=true")
32 #if($count > 0)
33 #set($qs = "${qs}&")
34 #end
35 #set($qs = "${qs}${kvPair}")
36 #set($count = $count + 1)
37 #end
38 #end
39 #if($qs == "")
40 #set($xr = "${relURL}")
41 #else
42 #set($xr = "${relURL}?${qs}")
43 #end
44 <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>
45 #if($request.fromlog == "true")
46 #end
47 #else
48 #*
49 * De gebruiker is niet ingelogd.
50 *
51 * --> Een login link plaatsen met het login formulier
52 *#
53 #set($relURL = $xwiki.getURL($services.model.resolveDocument('', 'default', $doc.documentReference.extractReference('document'))))
54 #set($queryStr = $request.queryString)
55 #set($qsArray = $queryStr.split("&"))
56 #set($qs = "")
57 #set($count = 0)
58 #foreach($kvPair in $qsArray)
59 #if($kvPair != "fromlog=true")
60 #if($count > 0)
61 #set($qs = "${qs}&")
62 #end
63 #set($qs = "${qs}${kvPair}")
64 #set($count = $count + 1)
65 #end
66 #end
67 #if($qs == "")
68 #set($xr = "${relURL}?fromlog=true")
69 #else
70 #set($xr = "${relURL}?${qs}&fromlog=true")
71 #end
72
73
74 <!-- Button trigger modal -->
75 <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal">
76 Launch demo modal
77 </button>
78
79 <!-- Modal -->
80 <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
81 <div class="modal-dialog" role="document">
82 <div class="modal-content">
83 <div class="modal-header">
84 <h5 class="modal-title" id="exampleModalLabel">Modal title</h5>
85 <button type="button" class="close" data-dismiss="modal" aria-label="Close">
86 <span aria-hidden="true">&times;</span>
87 </button>
88 </div>
89 <div class="modal-body">
90 <form id="loginForm" action="${xwiki.getURL("xwiki:XWiki.XWikiLogin","loginsubmit")}" method="post" class="xform">
91 <input type="hidden" name="$!{services.csrf.getToken()}" value="xlogin" />
92 #if($xcontext.user != 'XWiki.XWikiGuest')
93 <input type="hidden" name="logged_in" value="true" />
94 #end
95 #set($xrURL = "${xr}")
96 <input type="hidden" name="xredirect" value="${xrURL}" />
97 #if("$!request.srid" != '')
98 <input type="hidden" name="srid" value="$!escapetool.xml($request.srid)" />
99 #end
100 <input type="hidden" name="form_token" value="$!{services.csrf.getToken()}" />
101
102 #xwikimessageboxstart($services.localization.render('login') '')
103 #set($message = $xcontext.message)
104 #if($message)
105 <!-- previous login errors -->
106 #error($services.localization.render($message))
107 #end
108 #set($authFailureStrategyMessage = $services.security.authentication.getErrorMessage($request.j_username))
109 #if ("$!authFailureStrategyMessage" != '')
110 #error($authFailureStrategyMessage)
111 #end
112 #set ($supplementaryForm = $services.security.authentication.getForm($request.j_username))
113 <label for="j_username">$services.localization.render('username')</label>
114 #set ($forgotUsernameURL = $services.security.authentication.getAuthenticationURL('retrieveusername', $NULL))
115 #if("$!forgotUsernameURL" != "")
116 <span class="xAdditional"><a href="$forgotUsernameURL" tabindex="500">$services.localization.render('xe.admin.forgotUsername.loginMessage')</a></span>
117 #end
118 <span class="input-group">
119 <span class="input-group-addon">$services.icon.renderHTML('user')</span>
120 <input class="form-control" type="text" id="j_username" size="60" name="j_username" value="" tabindex="100"/>
121 </span>
122 <label for="j_password">$services.localization.render('password')</label>
123 #set ($resetPasswordUrl = $services.security.authentication.getAuthenticationURL('resetpassword', $NULL))
124 #if("$!resetPasswordUrl" != '')
125 <span class="xAdditional"><a href="$resetPasswordUrl" tabindex="600">$services.localization.render('xe.admin.passwordReset.loginMessage')</a></span>
126 #end
127 <span class="input-group">
128 <span class="input-group-addon">$services.icon.renderHTML('lock')</span>
129 <input type="password" id="j_password" size="60" name="j_password" value="" tabindex="200"/>
130 </span>
131 <label class="xHint" for="rememberme">
132 <input id="rememberme" type="checkbox" name="j_rememberme" value="true" tabindex="300"/> $services.localization.render('remembermeonthiscomp')
133 </label>
134 #if ("$!supplementaryForm" != "")
135 <div id="dedicated-auth-failures-field">
136 $supplementaryForm
137 </div>
138 #end
139 <input type="submit" class="btn btn-primary col-xs-12" value="$services.localization.render('login')" tabindex="400"/>
140 #xwikimessageboxend()
141 </form>
142
143 ## Ensure that the username field of the login form has the focus to make it easy for users to log in quickly
144 <script>
145 document.forms.loginForm.j_username.focus();
146 </script>
147 ## #template("endpage.vm")
148 </div>
149 <div class="modal-footer">
150 <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
151 <button type="button" class="btn btn-primary">Save changes</button>
152 </div>
153 </div>
154 </div>
155 </div>
156 #end
157 <script>
158 function removeParam(url, parameter) {
159 const replacer = (m, p1, p2) => (p1 === '?' && p2 === '&' ? '?' : p2 || '');
160 return url.replace(new RegExp(`([?&])${parameter}=[^&#]+([&#])?`), replacer);
161 }
162 const nextURL = removeParam(document.URL, "fromlog"),
163 nextTitle = document.title,
164 nextState = {};
165 window.history.replaceState(nextState, nextTitle, nextURL);
166 if(document.getElementById('loggedInMsg')) {
167 setTimeout(function(){
168 document.getElementById('loggedInMsg').remove();
169 }, 6000);
170 }
171 </script>
172
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/}}