General Actions:
Log-in
Wiki:
CreativeIT
▼
:
Document Index
»
Space:
CreativityAndCogntion
▼
:
Document Index
»
Page:
BibliographyForm
Search
Page Actions:
Export
▼
:
Export as PDF
Export as RTF
Export as HTML
More actions
▼
:
Print preview
View Source
Item of Interest Form
Wiki source code of
Item of Interest Form
Last modified by
Holger Dick
on 2010/07/15 14:55
Content
·
Comments
(0)
·
Attachments
(0)
·
History
·
Information
Show line numbers
#set($showhistory = "no") #set($showattachments = "no") #set($showcomments = "no") #set($showinformation = "no") #if($context.getUser() != "XWiki.XWikiGuest") #set($error = "init") #set($title="") #set($url="") #set($citation="") #set($notes="") #set($tags="") #set($creator="$xwiki.getUser().getUser().toString()") #if($request.action == "submit") #set($fixedpagename = $util.clearName(${request.title})) #set($fullname = "${doc.getSpace()}.${fixedpagename}") #if($fixedpagename == "") #set($error = "notitle") #elseif ($xwiki.exists($fullname)) #set($error = "titleexists") #set($title = $fixedpagename) #else #set($error = "none") $xwiki.copyDocument("${doc.getSpace()}.BibliographyClassTemplate",$fullname) #set($newdoc=$xwiki.getDocument($fullname)) #set($bibobj = $newdoc.getObject("${doc.getSpace()}.BibliographyClass")) $bibobj.set("title", ${request.title}) $bibobj.set("url", ${request.url}) $bibobj.set("bibinfo", ${request.citation}) $bibobj.set("creator", ${request.creator}) $bibobj.set("accessed", ${util.getDate()}) #if(${request.tags} && ${request.tags.length()} > 0) #set($tobj = $newdoc.getObject("XWiki.TagClass")) $tobj.set("tags", "${request.tags}") #end #if(${request.notes} && ${request.notes.length()} > 0) #set($nobj = $newdoc.newObject("BBCode.PostClass")) #set($dtime = $xwiki.jodatime.dateTime) #set($formatter = $xwiki.jodatime.getDateTimeFormatterForPattern("dd/MM/yyyy ' ' hh:mm:ss")) $nobj.set("postcontent", "${request.notes}") $nobj.set("postauthor", "$xwiki.getUserName($context.getUser())") $nobj.set("postdate", "$formatter.print($dtime)") #end $newdoc.setTitle(${request.title}) $newdoc.setParent("${doc.getSpace()}.BibliographyOverview") $newdoc.save() $response.sendRedirect($xwiki.getURL($fullname, "view", "")) #end #end #if($error != "none") Use this form to add an item to the wiki for people to see and discuss. * [List of all discussion items on the wiki>BibliographyOverview] #if($request.title) #set($title = $request.title) #end #if($request.url) #set($url = $request.url) #end #if($request.citation) #set($citation = $request.citation) #end #if($request.creator) #set($creator = $request.creator) #end #if($request.notes) #set($notes = $request.notes) #end #if($request.tags) #set($tags = $request.tags) #end #if($error != "init") #if($error == "notitle") <br/> <font size="3" color="red">Title is required.</font> <br/> #elseif($error == "titleexists") <br/> <font size="3" color="red">That title already exists. [See page>$fullname]</font> <br/> #end #end <form action="$doc.getURL("view", "action=submit")" method="post"> <div> <input type="hidden" name="parent" value="XWiki.XWikiClasses"/> <input type="hidden" name="template" value="XWiki.ClassTemplate"/> <input type="hidden" name="sheet" value="1"/> <input type="hidden" name="creator" value="$creator"/> <table> <tr> <td>Title:</td> <td><input type="text" name="title" value="$title"/></td> </tr> <tr> <td>URL: (if applicable)</td> <td><textarea rows="1" cols="88" name="url" value="">${util.escapeText($url)}</textarea> </td> </tr> </table> <br/> Full Reference: <br/> <textarea rows="3" cols="74" name="citation" value="">$citation</textarea> <br/> Description of this item (optional): <br/> <textarea rows="6" cols="74" name="notes" value="">$notes</textarea> <br/> Tags (optional): <input type="text" name="tags" value="$tags"/> <br/> <input type="submit" value="Add Item"/> </div> </form> #end #else #info("Please Log In To Add Items to the XWiki!") #end
Quick Links
Home
Index
What's New
Blog
Calendar
Photo Albums
Sandbox
Tags
Bulletin Board
My Recent Modifications
PamelaJennings
|
rwakkary
|
HaledenSands
|
ByronLahey