Wiki source code of Sandbox

Version 21.4 by Jip-jan Alunkel on May 11, 12:02

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