General Actions:
Log-in
Wiki:
Courses
▼
:
Document Index
»
Space:
AnnotationCode
▼
:
Document Index
»
Page:
CreateForm
Search
Page Actions:
Export
▼
:
Export as PDF
Export as RTF
Export as HTML
More actions
▼
:
Print preview
View Source
Welcome to L3D's XWiki for Courses
»
WebHome
»
CreateForm
Wiki source code of
CreateForm
Last modified by
Administrator
on 2010/06/25 03:24
Content
·
Comments
(0)
·
Attachments
(0)
·
History
·
Information
Show line numbers
{{include document="AnnotationCode.Macros" /}} {{velocity}} #if("$!{request.wiki}" == "" || "$!{request.space}" == "" || "$!{request.page}" == "") {{warning}}$msg.get('annotations.action.create.error.notarget'){{/warning}} #else ## pretty dirtish but it's so gonna do the job: don't display this form to users which don't have the right to create annotations, instead send a nice unauthorized message #if(!$annotations.canAddAnnotation("$!{request.wiki}", "$!{request.space}", "$!{request.page}")) #set($message = $msg.get("annotations.action.create.error.unauthorized")) #if ($context.user.equals("XWiki.XWikiGuest")) #set($message = $msg.get("annotations.action.create.error.unauthorizedguest")) #end ## unauthorized, with a nice i18n message $response.sendError(401, $message) #end {{html}} ## get create a hashmap with request data about the selection #set($annData = $util.hashMap) #set($dispose = $annData.put("selection", $!request.selection)) #set($dispose = $annData.put("selectionContext", $!request.selectionContext)) #set($dispose = $annData.put("selectionOffset", $!request.selectionOffset)) ## pretend that annotation author is current user, and annotation date is now ##Even if they get sent to the server, the server will overwrite with anything's logged in in there anyway #set($dispose = $annData.put("author", $context.user)) #set($dispose = $annData.put("date", $util.date)) #displayCreateBox("$!{request.wiki}", "$!{request.space}", "$!{request.page}", $annData) {{/html}} #end {{/velocity}}
Welcome
Welcome to this XWiki!
Quick Links
DSSF 2008
DCNM 2009
HCCF 2010
Document Index
Sandbox
My Recent Modifications
ASSIGNMENTNAME