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