General Actions:
Log-in
Register
Wiki:
Main wiki
▼
:
Document Index
»
Space:
Blog
▼
:
Document Index
»
Page:
Management
Search
default
Page Actions:
Export
▼
:
Export as PDF
Export as RTF
Export as HTML
More actions
▼
:
Print preview
View Source
Main wiki
»
The Wiki Blog
»
Manage blogs on this wiki
Wiki source code of
Manage blogs on this wiki
Last modified by
Administrator
on 2012/03/21 17:41
Content
·
Comments
(0)
·
Annotations
(0)
·
Attachments
(0)
·
History
·
Information
Hide line numbers
1: {{include document="Blog.BlogCode"/}} 2: 3: {{velocity filter="none"}} 4: {{html clean="false" wiki="true"}} 5: #if($hasAdmin) 6: ## 7: ## 8: ## List existing blogs. 9: ## TODO: Display the number of articles in each blog 10: ## TODO: Provide some management links: delete, edit title, configure... 11: ## 12: = $msg.get('xe.blog.manage.existing') = 13: 14: #foreach($item in $xwiki.wrapDocs($xwiki.searchDocuments(", BaseObject obj where obj.name = doc.fullName and obj.className = '$blogClassname'"))) 15: #getBlogTitle($item $title) 16: #if($title != '') 17: * [[$title>>$item.fullName]] 18: #else 19: * [[$item.displayTitle>>$item.fullName]] 20: <p/> 21: #end 22: #end 23: ## 24: ## 25: ## New blog 26: ## 27: 28: = $msg.get('xe.blog.manage.createnew') = 29: 30: #set($title = "$!request.blogTitle") 31: #if($title != '') 32: #set($space = "$!request.blogSpace") 33: #if($space == '') 34: #warning($msg.get('xe.blog.manage.nospace')) 35: #else 36: #if("$!request.blogType" == 'main') 37: #set($blogDocName = "${space}.WebHome") 38: #else 39: #set($blogDocName = "${space}.Blog") 40: #end 41: #set($title = $escapetool.url($title)) 42: #set($parent = 'Main.WebHome') 43: $response.sendRedirect($xwiki.getURL($blogDocName, 'save', "parent=${parent}&title=${escapetool.url($title)}&template=${blogTemplate}&${blogClassname}_0_title=${escapetool.url($title)}&form_token=$!{request.getParameter('form_token')}")) 44: #end 45: #end 46: ## 47: ## Show the form 48: <form action="${xwiki.getURL('Blog.Management')}" id="newBlog" method="post"> 49: <div> 50: <input type="hidden" name="form_token" value="$!{services.csrf.getToken()}" /> 51: <dl> 52: <dt><label for="blogSpace">$msg.get('xe.blog.manage.space')</label></dt> 53: <dd><input type="text" name="blogSpace" id="blogSpace" value=""/></dd> 54: <dt><label for="blogTitle">$msg.get('xe.blog.manage.title')</label></dt> 55: <dd><input type="text" name="blogTitle" id="blogTitle" value="$msg.get('xe.blog.manage.blogtitle')"/></dd> 56: <dt><label for="blogType">$msg.get('xe.blog.manage.blogtype')</label></dt> 57: <dd><select name="blogType" id="blogType"> 58: <option value="inner" selected="selected">$msg.get('xe.blog.manage.inside')</option> 59: <option value="main">$msg.get('xe.blog.manage.main')</option> 60: </select></dd> 61: </dl> 62: <input type="submit" value="${escapetool.xml($msg.get('xe.blog.manage.create'))}"/> 63: </div> 64: </form> 65: #else ## !hasAdmin 66: #xwikimessageboxstart($msg.get('error') $msg.get('notallowed')) 67: #xwikimessageboxend() 68: #end 69: 70: {{/html}} 71: {{/velocity}}
Recent Blog Posts
First blog post
Blog Categories
News
(1)
Other
(0)
Personal
(0)
Blog Archive
2009
(1)