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
Hide line numbers
1: #set($showhistory = "no") 2: #set($showattachments = "no") 3: #set($showcomments = "no") 4: #set($showinformation = "no") 5: 6: #if($context.getUser() != "XWiki.XWikiGuest") 7: 8: #set($error = "init") 9: #set($title="") 10: #set($url="") 11: #set($citation="") 12: #set($notes="") 13: #set($tags="") 14: #set($creator="$xwiki.getUser().getUser().toString()") 15: 16: #if($request.action == "submit") 17: #set($fixedpagename = $util.clearName(${request.title})) 18: #set($fullname = "${doc.getSpace()}.${fixedpagename}") 19: 20: #if($fixedpagename == "") 21: #set($error = "notitle") 22: #elseif ($xwiki.exists($fullname)) 23: #set($error = "titleexists") 24: #set($title = $fixedpagename) 25: #else 26: #set($error = "none") 27: $xwiki.copyDocument("${doc.getSpace()}.BibliographyClassTemplate",$fullname) 28: #set($newdoc=$xwiki.getDocument($fullname)) 29: #set($bibobj = $newdoc.getObject("${doc.getSpace()}.BibliographyClass")) 30: $bibobj.set("title", ${request.title}) 31: $bibobj.set("url", ${request.url}) 32: $bibobj.set("bibinfo", ${request.citation}) 33: $bibobj.set("creator", ${request.creator}) 34: $bibobj.set("accessed", ${util.getDate()}) 35: 36: 37: #if(${request.tags} && ${request.tags.length()} > 0) 38: #set($tobj = $newdoc.getObject("XWiki.TagClass")) 39: $tobj.set("tags", "${request.tags}") 40: #end 41: 42: #if(${request.notes} && ${request.notes.length()} > 0) 43: #set($nobj = $newdoc.newObject("BBCode.PostClass")) 44: #set($dtime = $xwiki.jodatime.dateTime) 45: #set($formatter = $xwiki.jodatime.getDateTimeFormatterForPattern("dd/MM/yyyy ' ' hh:mm:ss")) 46: $nobj.set("postcontent", "${request.notes}") 47: $nobj.set("postauthor", "$xwiki.getUserName($context.getUser())") 48: $nobj.set("postdate", "$formatter.print($dtime)") 49: #end 50: 51: $newdoc.setTitle(${request.title}) 52: $newdoc.setParent("${doc.getSpace()}.BibliographyOverview") 53: $newdoc.save() 54: $response.sendRedirect($xwiki.getURL($fullname, "view", "")) 55: #end 56: #end 57: 58: #if($error != "none") 59: Use this form to add an item to the wiki for people to see and discuss. 60: * [List of all discussion items on the wiki>BibliographyOverview] 61: #if($request.title) 62: #set($title = $request.title) 63: #end 64: #if($request.url) 65: #set($url = $request.url) 66: #end 67: #if($request.citation) 68: #set($citation = $request.citation) 69: #end 70: #if($request.creator) 71: #set($creator = $request.creator) 72: #end 73: #if($request.notes) 74: #set($notes = $request.notes) 75: #end 76: #if($request.tags) 77: #set($tags = $request.tags) 78: #end 79: 80: #if($error != "init") 81: 82: #if($error == "notitle") 83: <br/> 84: <font size="3" color="red">Title is required.</font> 85: <br/> 86: #elseif($error == "titleexists") 87: <br/> 88: <font size="3" color="red">That title already exists. [See page>$fullname]</font> 89: <br/> 90: #end 91: #end 92: 93: <form action="$doc.getURL("view", "action=submit")" method="post"> 94: <div> 95: <input type="hidden" name="parent" value="XWiki.XWikiClasses"/> 96: <input type="hidden" name="template" value="XWiki.ClassTemplate"/> 97: <input type="hidden" name="sheet" value="1"/> 98: 99: <input type="hidden" name="creator" value="$creator"/> 100: 101: <table> 102: <tr> 103: <td>Title:</td> 104: <td><input type="text" name="title" value="$title"/></td> 105: </tr> 106: <tr> 107: <td>URL: (if applicable)</td> 108: <td><textarea rows="1" cols="88" name="url" value="">${util.escapeText($url)}</textarea> </td> 109: </tr> 110: </table> 111: <br/> 112: 113: 114: Full Reference: 115: <br/> 116: <textarea rows="3" cols="74" name="citation" value="">$citation</textarea> 117: <br/> 118: 119: Description of this item (optional): 120: <br/> 121: <textarea rows="6" cols="74" name="notes" value="">$notes</textarea> 122: <br/> 123: Tags (optional): <input type="text" name="tags" value="$tags"/> 124: 125: <br/> 126: <input type="submit" value="Add Item"/> 127: </div> 128: </form> 129: #end 130: 131: #else 132: #info("Please Log In To Add Items to the XWiki!") 133: #end
Quick Links
Home
Index
What's New
Blog
Calendar
Photo Albums
Sandbox
Tags
Bulletin Board
My Recent Modifications
PamelaJennings
|
rwakkary
|
HaledenSands
|
ByronLahey