<
From version < 15.1 >
edited by Vincent Massol
on 2016/03/08
To version < 16.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.VincentMassol
1 +XWiki.ThomasMortagne
Content
... ... @@ -33,18 +33,33 @@
33 33   #elseif (!$xwiki.getDocument($name).isNew())
34 34   #blog__actionResponseError(409, 'xe.blog.manageCategories.create.error.alreadyExists', [])
35 35   #else
36 - #set($title = $escapetool.url($title))
37 - #set($newCategoryParent = $escapetool.url($request.newCategoryParent))
38 38   #if($request.ajax)
37 + #set($redirectParams = {
38 + 'xpage': 'plain',
39 + 'display': 'list',
40 + 'root': "$!{request.newCategoryParent}",
41 + 'entry': "$!{request.entry}",
42 + 'entryObjNb': "$!{request.entryObjNb}"
43 + })
39 39   #if("$!{request.mode}" == 'select')
40 - #set($xredirect = $doc.getURL('view', "xpage=plain&display=list&listType=selectable&root=${newCategoryParent}&entry=$!{request.entry}&entryObjNb=$!{request.entryObjNb}"))
41 - #else
42 - #set($xredirect = $doc.getURL('view', "xpage=plain&display=list&root=${newCategoryParent}&entry=$!{request.entry}&entryObjNb=$!{request.entryObjNb}"))
43 - #end
45 + #set($discard = $redirectParams.put('listType', 'selectable'))
46 + #end
47 + #set($xredirect = $doc.getURL('view', $escapetool.url($redirectParams)))
44 44   #else ## request.ajax
45 - #set($xredirect = $doc.getURL('view', "entry=$!{request.entry}&entryObjNb=$!{request.entryObjNb}"))
49 + #set($xredirect = $doc.getURL('view', $escapetool.url({
50 + 'entry': "$!{request.entry}",
51 + 'entryObjNb': "$!{request.entryObjNb}"
52 + })))
46 46   #end
47 - $response.sendRedirect($xwiki.getURL($name, 'save', "template=${blogCategoryTemplate}&parent=${newCategoryParent}&${blogCategoryClassname}_0_name=${title}&${blogCategoryClassname}_0_description=&xredirect=${escapetool.url($xredirect)}&xhidden=1&form_token=$!{services.csrf.getToken()}"))
54 + $response.sendRedirect($xwiki.getURL($name, 'save', $escapetool.url({
55 + 'template': "${blogCategoryTemplate}",
56 + 'parent': "${request.newCategoryParent}",
57 + "${blogCategoryClassname}_0_name": $title,
58 + "${blogCategoryClassname}_0_description": '',
59 + 'xredirect': $xredirect,
60 + 'xhidden': 1,
61 + 'form_token': "$!{services.csrf.getToken()}"
62 + })))
48 48   #end ## empty title
49 49  #end
50 50  #####################################################

Get Connected