Wiki source code of Sandbox

Version 21.2 by Jip-jan Alunkel on May 11, 12:00

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