General Actions:
Log-in
Wiki:
CreativeIT
▼
:
Document Index
»
Space:
BBCode
▼
:
Document Index
»
Page:
TopicClassSheetBibItem
Search
Page Actions:
Export
▼
:
Export as PDF
Export as RTF
Export as HTML
More actions
▼
:
Print preview
View Source
TopicClassSheetBibItem
Wiki source code of
TopicClassSheetBibItem
Last modified by
Holger Dick
on 2010/07/16 11:17
Content
·
Comments
(0)
·
Attachments
(0)
·
History
·
Information
Hide line numbers
1: 2: #set ($showattachments = "no") 3: #set ($showcomments = "no") 4: 5: <style type="text/css"> 6: #includeTopic('BBCode.Skin') 7: </style> 8: 9: {pre} 10: <script type="text/javascript"> 11: function quote(id) { 12: $('BBCode.PostClass_postcontent').value = "-quote:"+id+"-" + $('BBCode.PostClass_postcontent').value; 13: } 14: 15: function setquote() { 16: var s = $('BBCode.PostClass_postcontent').value 17: var matches = s.match(/-quote:message[0-9]*-/); 18: for (var i=0; i < matches.length; i++) { 19: var oldmatch = matches[i]; 20: var newmatch = matches[i].replace(/-quote:(message[0-9]*)-/, "$1"); 21: s = s.replace(oldmatch, "<blockquote>" + $(newmatch).innerHTML + "</blockquote>"); 22: } 23: $('BBCode.PostClass_postcontent').value = s; 24: return false; 25: //return cancelCancelEdit(); 26: } 27: </script> 28: {/pre} 29: 30: #if($request.parent && $request.parent!="") #set($parent=$request.parent) #else #set($parent=$doc.parent) #end 31: <input type="hidden" name="parent" value="$parent" /> 32: 33: #set($class = $doc.getObject("BBCode.TopicClass").xWikiClass) 34: #if($class) 35: 36: <input type="hidden" name="title" value="" /> 37: 38: <div class="bbbigbox"> 39: 40: #if ($context.action == 'inline') 41: $msg.bb_entertopictitle<br /> $doc.display('topictitle') 42: 43: $msg.bb_entertopicdescription<br /> $doc.display('topicdescription') 44: 45: #template('tagedit.vm') 46: 47: #set($newtopictitle = $request.nicetopictitle) 48: #if($newtopictitle) 49: #set($newtopictitle = $newtopictitle.replaceAll('"',"'")) 50: <script type="text/javascript"> 51: var nicetopictitle = "${newtopictitle}"; 52: {pre} 53: document.forms.inline["BBCode.TopicClass_0_topictitle"].value = nicetopictitle; 54: document.forms.inline["title"].value = nicetopictitle; 55: {/pre} 56: </script> 57: #end 58: 59: #if($doc.isNew() == 'false') 60: #set($title = $doc.getValue('topictitle', $doc.getObject('BBCode.TopicClass'))) 61: <script type="text/javascript"> 62: var nicetopictitle = "${title}"; 63: {pre} 64: document.forms.inline["title"].value = nicetopictitle; 65: {/pre} 66: </script> 67: #end 68: 69: #else 70: 71: 72: #set($CategoryAddress = $doc.getParent()) 73: 74: #set($postindex = 0) 75: 76: <table class="topictable"> 77: 78: <tr> 79: <th> $msg.bb_author </th> 80: <th> #if ($doc.getValue('topictitle', $doc.getObject('BBCode.TopicClass')) != "") $doc.display('topictitle') #else $doc.name #end #if ($doc.getValue('topicdescription', $doc.getObject('BBCode.TopicClass')) != "") - <span class="bbdatatext">$doc.display('topicdescription') </span> #end </th> 81: </tr> 82: 83: #set($postclass = $doc.getObjects('BBCode.PostClass')) 84: 85: #set($tagClass = $xwiki.getClass("XWiki.TagClass")) 86: #set($tagsProp = $tagClass.tags) 87: #set($sep = $tagsProp.getProperty("separator").getValue()) 88: #set ($tags = $doc.tags.split("${sep}")) 89: #set($existingTags = $xwiki.arrayList) 90: #foreach($tag in $tags) 91: #set($discard = $existingTags.add($tag)) 92: #end 93: 94: <tr> 95: <td colspan="2"> 96: <div class="tags"> 97: #if ($existingTags.size()>0 && $existingTags.get(0).length()>0) 98: <span class="bbdatatext"> $msg.bb_itemtags 99: #foreach ($tag in $existingTags) 100: <a href='$xwiki.getURL("WebHome")?tag=$tag'> $tag </a> 101: #end 102: </span> 103: #end 104: </div> 105: #set($currently_message = "$msg.bb_thereis_plural $postclass.size() $msg.bb_messagesonbibitem_plural") 106: #if($postclass.size() == 1) 107: #set($currently_message = "$msg.bb_thereis $postclass.size() $msg.bb_messagesonbibitem") 108: #end 109: <span class="bbdatatext"> $currently_message </span> 110: </td> 111: </tr> 112: 113: #foreach($item in $postclass) 114: #set ($postauthor = $xwiki.getUserName($doc.display('postauthor', $item), true)) 115: #if ($doc.getValue('postcontent', $item) != '') 116: #set ($postindex = $postindex + 1) 117: 118: <tr class="#if($postindex % 2 == 0) evenpost #end"> 119: <td id="posttd"> 120: #set ($localpostauthor = $doc.display('postauthor', $item)) 121: #set ($index = $localpostauthor.indexOf(":")) 122: #set ($index = $index + 1) 123: #set ($localpostauthor = $localpostauthor.substring($index)) 124: <div class="avatar"> 125: <a href="$xwiki.getURL($localpostauthor)"> #useravatar($localpostauthor) </a><br /> 126: $postauthor<br /> 127: #if($context.user == $doc.display('postauthor', $item) || $xwiki.hasAdminRights() == 'true') <a class="red" href="$doc.getURL("objectremove", "classname=BBCode.PostClass&classid=${item.number}&xredirect=${request.getRequestURL()}")">$msg.bb_deletethismessage</a> #end #end 128: </div></td> 129: <td id="posttd"> <div id="message$item.number"> <span class="bbdatatext"> <a name=$postindex href="#$postindex">$postindex</a> - $msg.bb_postedon $doc.display('postdate', $item) $msg.bb_by $postauthor </span> - <a href="#postmessage" onclick="quote('message$item.number')"> $msg.bb_quotemessage </a> 130: <hr size="1" /> 131: <div class="postcontent"> 132: $doc.display('postcontent', $item) 133: </div></div> 134: </td> 135: </tr> 136: 137: #end 138: 139: <tr> 140: <td> </td> 141: <td> 142: #if ($context.user == 'XWiki.XWikiGuest') 143: <span class="bbdatatext"> $msg.bb_needloginmessage </span> 144: #else 145: #set ($lastpostid = $postclass.size() + 1) 146: <span class="bbsmalltitle"> <a name=postmessage href="#postmessage"> $msg.bb_postmessage </a> </span> 147: <form method="post" action="$doc.getURL("objectadd")" onsubmit="setquote();"> 148: <input type="hidden" name="xredirect" value="$doc.getURL()#$lastpostid" /> 149: <input type="hidden" name="classname" value="BBCode.PostClass" /> 150: <input type="hidden" name="BBCode.PostClass_postauthor" value="$context.user" /> 151: <textarea rows="10" cols="65" id="BBCode.PostClass_postcontent" name="BBCode.PostClass_postcontent" /></textarea><br /> 152: <input type="submit" value="$msg.bb_postyourmessage" /> 153: </form> 154: #end 155: </td> 156: </tr> 157: </table> 158: 159: #end 160: 161: </div> 162: 163: #else 164: 165: #end
Quick Links
Home
Index
What's New
Blog
Calendar
Photo Albums
Sandbox
Tags
Bulletin Board
My Recent Modifications
PamelaJennings
|
rwakkary
|
HaledenSands
|
ByronLahey