Re: [xwiki-users] force edit inline and redirect

2016-07-01 Thread Vincent Massol

> On 01 Jul 2016, at 08:53, Pascal BASTIEN  wrote:
> 
> Are there a simple (or recommanded) way to redirect user to another page (in 
> edit mode) when he edit a page?

The only thing that comes to mind would be to have a custom skin at page level 
in which you’d override the edit.vm to do the redirect.

Thanks
-Vincent

> Thxs
> 
> ...
>> 
> 
>> En date de : Jeu 30.6.16, Pascal BASTIEN
> 
> a écrit :
>> 
>> Objet:
> force edit inline and redirect
>> À:
> "XWiki Users" 
>> Date: Jeudi 30 juin 2016, 12h08
>> 
>> Hi xwiki citizen,
>> 
>> I try to redirect to
> another page users when they edit a
>> 
> page...
>> 
>> Then I
> use this velocity code in my origin page:
>> 
>> #if
> ($xcontext.action=='edit')
>>  
> 
>> 
> $response.sendRedirect($xwiki.getURL('MySpace.MaTargetPage',
>> 'edit'))
>>#stop
>> 
> #end
>> 
>> Redirect (to
> MyOriginPage in edit mode) working well if user
>> open MyOriginPage in inline mode:
>> aka
> /bin/edit/MySpace/MyOriginPage?editor=inline
>> 
>> But my users are
> "simple user" then I try to force inline
>> mode when they click on 'Edit'
>> 
>> What I tested is:
> add an XWiki.SheetClass object to
>> 
> "MyOriginPage" with "Default Edit
> Mode"=inline ...
>> but I have a
> very  strange behaviour: it's working only
>> for "Admin" user :-(
>> 
>> With simple user,
> when I 'Edit' my Page, I obtain target
>> Page with all xwiki menu INSIDE editor
> like this ugly
>> things
>> https://snag.gy/SrkIua.jpg
>> 
>> If someone have an
> idea...
>> Thxs
>> 
>> Pascal B

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] force edit inline and redirect

2016-07-01 Thread Pascal BASTIEN
Are there a simple (or recommanded) way to redirect user to another page (in 
edit mode) when he edit a page?
Thxs

...
 >
 
 > En date de : Jeu 30.6.16, Pascal BASTIEN
 
 a écrit :
 > 
 > Objet:
 force edit inline and redirect
 > À:
 "XWiki Users" 
 > Date: Jeudi 30 juin 2016, 12h08
 > 
 > Hi xwiki citizen,
 > 
 > I try to redirect to
 another page users when they edit a
 >
 page...
 > 
 > Then I
 use this velocity code in my origin page:
 > 
 > #if
 ($xcontext.action=='edit')
 > 
 
 >
 $response.sendRedirect($xwiki.getURL('MySpace.MaTargetPage',
 > 'edit'))
 >   #stop
 >
 #end
 > 
 > Redirect (to
 MyOriginPage in edit mode) working well if user
 > open MyOriginPage in inline mode:
 > aka
 /bin/edit/MySpace/MyOriginPage?editor=inline
 > 
 > But my users are
 "simple user" then I try to force inline
 > mode when they click on 'Edit'
 > 
 > What I tested is:
 add an XWiki.SheetClass object to
 >
 "MyOriginPage" with "Default Edit
 Mode"=inline ...
 > but I have a
 very  strange behaviour: it's working only
 > for "Admin" user :-(
 > 
 > With simple user,
 when I 'Edit' my Page, I obtain target
 > Page with all xwiki menu INSIDE editor
 like this ugly
 > things
 > https://snag.gy/SrkIua.jpg
 > 
 > If someone have an
 idea...
 > Thxs
 > 
 > Pascal B
 > 
 > 
 > 
 > 
 >
 ___
 > users mailing list
 >
 users@xwiki.org
 > http://lists.xwiki.org/mailman/listinfo/users
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] force edit inline and redirect

2016-06-30 Thread Vincent Massol
hmm javadoc says:

/**
 * @return "inline" if the document should be edited in inline mode by default 
or "edit" otherwise.
 * @throws XWikiException if an error happens when computing the edit mode
 */
public String getDefaultEditMode() throws XWikiException

So that would be a bug…

Thanks
-Vincent


> On 30 Jun 2016, at 15:37, Pascal BASTIEN  wrote:
> 
> hum
> $doc.getDefaultEditMode() return 'edit' even on doc edited in inline mode by 
> default :-(
> http://maven.xwiki.org/site/docs/xwiki-javadoc-4.1.x/com/xpn/xwiki/api/Document.html#getDefaultEditMode%28%29
> 
> (I'm on xwiki 7.0.1)
> 
> 
> En date de : Jeu 30.6.16, Pascal BASTIEN  a écrit :
> 
> Objet: force edit inline and redirect
> À: "XWiki Users" 
> Date: Jeudi 30 juin 2016, 12h08
> 
> Hi xwiki citizen,
> 
> I try to redirect to another page users when they edit a
> page...
> 
> Then I use this velocity code in my origin page:
> 
> #if ($xcontext.action=='edit')
>  
> $response.sendRedirect($xwiki.getURL('MySpace.MaTargetPage',
> 'edit'))
>   #stop
> #end
> 
> Redirect (to MyOriginPage in edit mode) working well if user
> open MyOriginPage in inline mode:
> aka /bin/edit/MySpace/MyOriginPage?editor=inline
> 
> But my users are "simple user" then I try to force inline
> mode when they click on 'Edit'
> 
> What I tested is: add an XWiki.SheetClass object to
> "MyOriginPage" with "Default Edit Mode"=inline ...
> but I have a very  strange behaviour: it's working only
> for "Admin" user :-(
> 
> With simple user, when I 'Edit' my Page, I obtain target
> Page with all xwiki menu INSIDE editor like this ugly
> things
> https://snag.gy/SrkIua.jpg
> 
> If someone have an idea...
> Thxs
> 
> Pascal B
> 
> 
> 
> 
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] force edit inline and redirect

2016-06-30 Thread Pascal BASTIEN
hum
$doc.getDefaultEditMode() return 'edit' even on doc edited in inline mode by 
default :-(
http://maven.xwiki.org/site/docs/xwiki-javadoc-4.1.x/com/xpn/xwiki/api/Document.html#getDefaultEditMode%28%29

(I'm on xwiki 7.0.1)


En date de : Jeu 30.6.16, Pascal BASTIEN  a écrit :

 Objet: force edit inline and redirect
 À: "XWiki Users" 
 Date: Jeudi 30 juin 2016, 12h08
 
 Hi xwiki citizen,
 
 I try to redirect to another page users when they edit a
 page...
 
 Then I use this velocity code in my origin page:
 
 #if ($xcontext.action=='edit')
  
 $response.sendRedirect($xwiki.getURL('MySpace.MaTargetPage',
 'edit'))
   #stop
 #end
 
 Redirect (to MyOriginPage in edit mode) working well if user
 open MyOriginPage in inline mode:
 aka /bin/edit/MySpace/MyOriginPage?editor=inline
 
 But my users are "simple user" then I try to force inline
 mode when they click on 'Edit'
 
 What I tested is: add an XWiki.SheetClass object to
 "MyOriginPage" with "Default Edit Mode"=inline ...
 but I have a very  strange behaviour: it's working only
 for "Admin" user :-(
 
 With simple user, when I 'Edit' my Page, I obtain target
 Page with all xwiki menu INSIDE editor like this ugly
 things
 https://snag.gy/SrkIua.jpg
 
 If someone have an idea...
 Thxs
 
 Pascal B
 
 
 
 
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users