General Actions:
Log-in
Wiki:
L3D's Wiki
▼
:
Document Index
»
Space:
Blog
▼
:
Document Index
»
Page:
BlogPostSheet
Search
Page Actions:
Export
▼
:
Export as PDF
Export as RTF
Export as HTML
More actions
▼
:
Print preview
View Source
Welcome to your wiki
»
Wiki blog
»
XClass representing a blog entry
»
Sheet for displaying blog entries
Wiki source code of
Sheet for displaying blog entries
Last modified by
Administrator
on 2008/11/20 16:17
Content
·
Comments
(0)
·
Attachments
(0)
·
History
·
Information
Show line numbers
#includeMacros("Blog.BlogCode") #includeMacros("Blog.CategoriesCode") #getEntryObject($doc $entryObj) #if("$!entryObj" == '') #warning("This is not a blog post!") #elseif($context.action != 'inline') ## View mode #isPublished($entryObj $isPublished) #isHidden($entryObj $isHidden) ## displayBlog requires a list of documents, and whether to display only an extract or the full entry. #displayBlog([$doc.fullName] 'single' false) #else <dl> <dt>Title:</dt> <dd>$doc.display("title", "edit", $entryObj)</dd> <dt>Content:</dt> <dd>$doc.display("content", "edit", $entryObj)</dd> <dt>Summary (optional):</dt> <dd>$doc.display("extract", "edit", $entryObj)</dd> <dt>Category:</dt> <dd> #getCategoriesHierarchy('' $tree) <div id="blog_category_container"> #displayCategoriesHierarchy($tree 'selectable')</div> #showCreateCategoryBox($tree) </dd> </dl> #template('tagedit.vm') #isPublished($entryObj $isPublished) #if($isPublished) #if($doc.creator == $context.user) #publishMessageBox("This article was published on ${doc.display('publishDate', 'view', $entryObj)}") #hideMessageBox("Hide article $doc.display('hidden', 'edit', $entryObj)") #end #else #set($defaultDate = $xwiki.getDocument($blogPostTemplate).getObject($blogPostClassname).getProperty('publishDate').value.time) #if($entryObj.getProperty('publishDate').value.time == $defaultDate) ## The publish date was not set, force it to be the creation date $entryObj.set('publishDate', $doc.creationDate) #end #publishMessageBox("This article is not published yet. <label>*Publish ${doc.display('published', 'edit', $entryObj)}*</label>\\<label>Set the publication date to: ${doc.display('publishDate', 'edit', $entryObj)}</label>") #end #set($newtitle = $request.title) #if($newtitle) #set($newtitle = $newtitle.replaceAll('"',"'")) <script type="text/javascript"> {pre} ## TODO: Set the correct date. This does not work since the current form buttons break onsumbit events. ## Event.observe(document.getElementById('${formname}'), 'submit', function(evt) {alert(this); alert(evt); return false;}, true); var title = "${newtitle}"; document.forms.inline["${entryObj.getxWikiClass().getName()}_${entryObj.number}_title"].value = title; {/pre} </script> #end #end
Quick Links
L3D Calendar
Wiki Dashboard
Document Index
Blog
Sandbox