Toggle navigation
Log-in
Wiki Index
Page Index
User Index
Application Index
Blog
Wiki source code of
Last modified by superadmin on 2016/07/29 17:18
Export
Print preview
View Source
Siblings
Content
Comments
Attachments
History
Information
×
Export
Export as PDF
Export as HTML
Cancel
Hide line numbers
1: {{include reference="Blog.BlogCode"/}} 2: 3: {{include reference="Blog.CategoriesCode"/}} 4: 5: {{velocity}} 6: $xwiki.jsx.use('Blog.ManageCategories', {'mode' : 'select'})## 7: $xwiki.ssx.use('Blog.ManageCategories')## 8: #getEntryObject($doc $entryObj) 9: #if("$!entryObj" == '') 10: {{warning}}{{translation key='xe.blog.sheet.notpost'/}}{{/warning}} 11: ## Keep testing the inline action for backward compatibility with older blog posts. 12: #elseif($xcontext.action != 'edit' && $xcontext.action != 'inline') 13: ## View mode 14: #isPublished($entryObj $isPublished) 15: #isHidden($entryObj $isHidden) 16: ## displayBlog requires a list of documents, and whether to display only an extract or the full entry. 17: #displayBlog([$tdoc] 'single' false false) 18: #else 19: #if ("$!request.title" != '') 20: ## Use the page title specified on the request, if available, as blog post title. This is needed for instance when 21: ## we create the blog post using the Create Page wizard with the blog post template provider (the user is specifying 22: ## the page title). 23: #set ($discard = $entryObj.set('title', $request.title)) 24: #end 25: ; {{translation key='xe.blog.sheet.title'/}} 26: : $doc.display('title', 'edit', $entryObj) 27: ; {{translation key='xe.blog.sheet.content'/}} 28: : $doc.display('content', 'edit', $entryObj) 29: ; {{translation key='xe.blog.sheet.summary'/}} 30: : $doc.display('extract', 'edit', $entryObj) 31: ; {{translation key='xe.blog.sheet.category'/}} 32: : ((({{html clean="false" wiki="true"}}#displayCategoryManagementTree('' 'selectable'){{/html}} (% class="clearfloats" %)((()))))) 33: #if ($doc.isNew()) 34: ## We're creating a new blog post. We handle this case differently because #isPublished returns true when the 35: ## property is not set (object missing) and thus the new blog post will appear as published. See also the comment 36: ## from the else branch below. 37: #set ($isPublished = false) 38: #else 39: ## We're editing an existing blog post. We need to check the original document because the current one can have 40: ## unsaved changes, which happens for instance after returning from preview. 41: #set ($originalDocument = $xwiki.getDocument($doc.documentReference)) 42: #getEntryObject($originalDocument $originalEntryObj) 43: #isPublished($originalEntryObj $isPublished) 44: #end 45: #if($isPublished) 46: #if($doc.creator == $xcontext.user) 47: #publishMessageBox($services.localization.render('xe.blog.sheet.publicationdate', [${doc.display('publishDate', 'view', $entryObj)}])) 48: #set($hideArticle = ${doc.display('hidden', 'edit', $entryObj)}) 49: #hideMessageBox($services.localization.render('xe.blog.sheet.hidearticle', [${hideArticle}])) 50: #end 51: #else 52: #set($defaultDate = $xwiki.getDocument($blogPostTemplate).getObject($blogPostClassname).getProperty('publishDate').value.time) 53: #if($entryObj.getProperty('publishDate').value.time == $defaultDate) 54: ## The publish date was not set, force it to be the creation date 55: $entryObj.set('publishDate', $doc.creationDate) 56: #end 57: {{html clean="false" wiki="true"}} 58: #publishMessageBox("$services.localization.render('xe.blog.sheet.notpublished') <label>**$services.localization.render('xe.blog.sheet.publish') ${doc.display('published', 'edit', $entryObj)}**</label>\\<label>$services.localization.render('xe.blog.sheet.setdate') ${doc.display('publishDate', 'edit', $entryObj)}</label>") 59: {{/html}} 60: #end 61: #end 62: {{/velocity}}
Applications
Blog
Dashboard
Sandbox
More applications
Navigation
Recent Blog Posts
WajunPCの評価記事、NECの再生PC
ジーンディコードのぺーじ
ストレスに強い人の特徴
国立感染症研究所
CDC発表
研究所流出説
茶番かも!?
コロナまとめ 2021-0523sun
病床数と5類についての意見メモ
本日のリアル管理栄養士のお言葉
Blog Categories
KVM
(1)
News
(4)
Other
(0)
Personal
(15)
Serverなど
(0)
Windows
(0)
firewall
(1)
routing
(1)
中学、高校の数学・物理の復習
(4)
中学、高校、大学の数学・物理・化学の復習
(3)
Blog Archive
2009
(1)
2016
(4)
2017
(1)
2021
(23)
2022
(2)