<
From version < 6.1 >
edited by Admin
on 2012/03/01
To version < 12.1 >
edited by Thomas Mortagne
on 2016/09/08
>
Change comment: Install extension [org.xwiki.platform:xwiki-platform-blog-ui-8.2.1]

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.Admin
1 +XWiki.ThomasMortagne
Syntax
... ... @@ -1,1 +1,1 @@
1 -XWiki 2.0
1 +XWiki 2.1
Content
... ... @@ -1,14 +1,13 @@
1 -{{include document="Blog.BlogCode"/}}
1 +{{include reference="Blog.BlogCode"/}}
2 2  
3 -{{include document="Blog.CategoriesCode"/}}
3 +{{include reference="Blog.CategoriesCode"/}}
4 4  
5 -{{velocity filter="none"}}
6 -{{html clean="false" wiki="true"}}
5 +{{velocity}}
7 7  $xwiki.jsx.use('Blog.ManageCategories', {'mode' : 'select'})##
8 8  $xwiki.ssx.use('Blog.ManageCategories')##
9 9  #getEntryObject($doc $entryObj)
10 10  #if("$!entryObj" == '')
11 - #warning($msg.get('xe.blog.sheet.notpost'))
10 + {{warning}}{{translation key='xe.blog.sheet.notpost'/}}{{/warning}}
12 12  ## Keep testing the inline action for backward compatibility with older blog posts.
13 13  #elseif($xcontext.action != 'edit' && $xcontext.action != 'inline')
14 14   ## View mode
... ... @@ -17,26 +17,37 @@
17 17   ## displayBlog requires a list of documents, and whether to display only an extract or the full entry.
18 18   #displayBlog([$tdoc] 'single' false false)
19 19  #else
20 - <dl>
21 - <dt>$msg.get('xe.blog.sheet.title')</dt>
22 - <dd>$doc.display('title', 'edit', $entryObj)</dd>
23 - <dt>$msg.get('xe.blog.sheet.content')</dt>
24 - <dd>$doc.display('content', 'edit', $entryObj)</dd>
25 - <dt>$msg.get('xe.blog.sheet.summary')</dt>
26 - <dd>$doc.display('extract', 'edit', $entryObj)</dd>
27 - <dt>$msg.get('xe.blog.sheet.category')</dt>
28 - <dd>
29 - #displayCategoryManagementTree('' 'selectable')
30 - <div class="clearfloats"></div>
31 - </dd>
32 - </dl>
33 - #template('tagedit.vm')
34 - #isPublished($entryObj $isPublished)
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
35 35   #if($isPublished)
36 36   #if($doc.creator == $xcontext.user)
37 - #publishMessageBox($msg.get('xe.blog.sheet.publicationdate', [${doc.display('publishDate', 'view', $entryObj)}]))
47 + #publishMessageBox($services.localization.render('xe.blog.sheet.publicationdate', [${doc.display('publishDate', 'view', $entryObj)}]))
38 38   #set($hideArticle = ${doc.display('hidden', 'edit', $entryObj)})
39 - #hideMessageBox($msg.get('xe.blog.sheet.hidearticle', [${hideArticle}]))
49 + #hideMessageBox($services.localization.render('xe.blog.sheet.hidearticle', [${hideArticle}]))
40 40   #end
41 41   #else
42 42   #set($defaultDate = $xwiki.getDocument($blogPostTemplate).getObject($blogPostClassname).getProperty('publishDate').value.time)
... ... @@ -44,8 +44,9 @@
44 44   ## The publish date was not set, force it to be the creation date
45 45   $entryObj.set('publishDate', $doc.creationDate)
46 46   #end
47 - #publishMessageBox("$msg.get('xe.blog.sheet.notpublished') <label>**$msg.get('xe.blog.sheet.publish') ${doc.display('published', 'edit', $entryObj)}**</label>\\<label>$msg.get('xe.blog.sheet.setdate') ${doc.display('publishDate', 'edit', $entryObj)}</label>")
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}}
48 48   #end
49 49  #end
50 -{{/html}}
51 51  {{/velocity}}

Get Connected