Wiki source code of Sandbox

Version 21.3 by Jip-jan Alunkel on May 11, 12:01

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