General Actions:
Log-in
Wiki:
Courses
▼
:
Document Index
»
Space:
BBCode
▼
:
Document Index
»
Page:
TopicAClassSheet
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
»
XWiki Space
»
Data types
»
TopicClass
»
TopicAClassSheet
Wiki source code of
TopicAClassSheet
Last modified by
Hal Eden
on 2010/09/06 14:35
Content
·
Comments
(0)
·
Attachments
(0)
·
History
·
Information
Hide line numbers
1: ## 2: ## Disable footer 3: ## 4: #set ($docextras = []) 5: ## 6: ## Include style 7: ## 8: $xwiki.ssx.use("XWiki.XWikiUserSheet")## 9: $xwiki.ssx.use('Main.Dashboard')## 10: $xwiki.ssx.use("BBCode.Skin") 11: $xwiki.jsx.use("BBCode.Skin") 12: #if($request.parent && $request.parent!="") #set($parent=$request.parent) #else #set($parent=$doc.parent) #end 13: <input type="hidden" name="parent" value="$parent" /> 14: #set($class = $doc.getObject("BBCode.TopicClass").xWikiClass) 15: <input type="hidden" name="title" value="" /> 16: <input type="hidden" name="BBCode.PostClass_0_postauthor" value="$context.user" /> 17: <div class="bbbigbox"> 18: #if ($context.action == 'inline') 19: ## 20: ## Edit topic 21: ## 22: $msg.bb_entertopictitle<br /> $doc.display('topictitle')<br/> 23: $msg.get("bb_entertopiccontent")<br/> 24: $doc.display("postcontent") 25: #set($newtopictitle = $request.nicetopictitle) 26: #if($newtopictitle) 27: #set($newtopictitle = $newtopictitle.replaceAll('"',"'")) 28: <script type="text/javascript"> 29: var nicetopictitle = "${newtopictitle}"; 30: {pre} 31: document.forms.inline["BBCode.TopicClass_0_topictitle"].value = nicetopictitle; 32: document.forms.inline["title"].value = nicetopictitle; 33: {/pre} 34: </script> 35: #end 36: #if($doc.isNew() == 'false') 37: #set($title = $doc.getValue('topictitle', $doc.getObject('BBCode.TopicClass'))) 38: <script type="text/javascript"> 39: var nicetopictitle = "${title}"; 40: {pre} 41: document.forms.inline["title"].value = nicetopictitle; 42: {/pre} 43: </script> 44: #end 45: #else 46: ## 47: ## Topic title 48: ## 49: #if("$parent" != "") 50: #set($parentDoc = $xwiki.getDocument("$parent")) 51: <span class="topic-category"> 52: #if("$parentDoc.getDisplayTitle()" != "") 53: $msg.get("bb_topiccategory") <a href="$parentDoc.getURL('view')">$parentDoc.getDisplayTitle()</a> 54: #else 55: $msg.get("bb_topiccategory") <a href="$parentDoc.getURL('view')">$parentDoc.name</a> 56: #end 57: </span> 58: #end 59: #set($username = $xwiki.getUserName($doc.fullName, false)) 60: <h1>Wall of $username</h1> 61: #set($postclass = $doc.getObjects('BBCode.PostClass')) 62: <table class="topictable"> 63: ## 64: ## Loop over posts 65: ## 66: #foreach($item in $postclass) 67: #set ($postauthor = $xwiki.getUserName($doc.display('postauthor', $item), true)) 68: #if ($doc.getValue('postcontent', $item) != '') 69: <tr class="#if($postindex % 2 == 0) evenpost #end"> 70: <td id="posttd"> 71: #set ($localpostauthor = $doc.display('postauthor', $item)) 72: #set ($index = $localpostauthor.indexOf(":")) 73: #set ($index = $index + 1) 74: #set ($localpostauthor = $localpostauthor.substring($index)) 75: <div class="postauthor">$postauthor</div> 76: <div class="avatar"> 77: <a href="$xwiki.getURL($localpostauthor)">#useravatar($localpostauthor)</a><br /> 78: #end 79: </div></td> 80: <td id="posttd"> <div id="message$item.number"> 81: <textarea id="quotecontent$item.number" style="display:none">$item.getProperty("postcontent").getValue()</textarea> 82: <script type="text/javascript"> 83: var quote$item.number = XWiki.bulletinboard.addQuote($("quotecontent$item.number").value, "$xwiki.getLocalUserName($doc.display('postauthor', $item), false)", "$doc.display('postdate', $item)"); 84: </script> 85: <span class="bbdatatext">Posted on: $doc.display('postdate', $item) - <a name=$velocityCount href="#$velocityCount"><img src="$xwiki.getSkinFile("icons/silk/link_go.gif")" title="Direct link to post #$velocityCount" /></a> - <a href="#" onclick="XWiki.bulletinboard.insertInReply(XWiki.bulletinboard.getQuote(quote$item.number)); XWiki.bulletinboard.jumpToReply(); return false;"><img src="$xwiki.getSkinFile("icons/silk/comment_add.gif")" title="Quote this message" /></a> #if(($context.user == $doc.display('postauthor', $item) || $xwiki.hasAdminRights() == 'true') && $velocityCount > 1) - <a href="$doc.getURL('objectremove', 'classname=BBCode.PostClass&classid=${item.number}&xredirect=${request.getRequestURL()}')"><img src="$xwiki.getSkinFile("icons/silk/bin.gif")" title="$msg.bb_deletethismessage" /></a> #end </span> 86: ##<hr size="1" /> 87: <div class="postcontent"> 88: $doc.display('postcontent', $item) 89: </div></div> 90: </td> 91: </tr> 92: #end 93: <tr> 94: <td> </td> 95: <td> 96: #if ($context.user == 'XWiki.XWikiGuest') 97: <span class="bbdatatext"> Please log in to read and write on the wall </span> 98: #else 99: #set ($lastpostid = $postclass.size() + 1) 100: <a id="reply"></a> 101: <span class="bbsmalltitle"> <a name=postmessage href="#postmessage"> Write on the wall</a> </span> 102: <form method="post" action="$doc.getURL("objectadd")" class="postreply"> 103: <input type="hidden" name="xredirect" value="$doc.getURL()#$lastpostid" /> 104: <input type="hidden" name="classname" value="BBCode.PostClass" /> 105: <input type="hidden" name="BBCode.PostClass_postauthor" value="$context.user" /> 106: <textarea rows="10" cols="65" id="BBCode.PostClass_postcontent" name="BBCode.PostClass_postcontent" /></textarea><br /> 107: <input id="BBCode.PostClass_postbutton" type="submit" value="Post!" /> 108: </form> 109: #end 110: </td> 111: </tr> 112: </table> 113: #end 114: </div>
Search
Search query
Quick Links
DSSF 2008
DCNM 2009
HCCF 2010
Document Index
Sandbox
My Recent Modifications
ASSIGNMENTNAME