Wiki source code of Sandbox

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

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