Re: [xwiki-users] Displaying Panel items

2007-11-05 Thread V. Harikrishnan Nair

That's perfect ! Thanks, Vito, I should've noticed that...



Vitantonio Messa wrote:
> 
> V. Harikrishnan Nair wrote:
>> Thanks for the help, Ricardo. Here's the code -
>> ---
>> #panelheader('Quick Links')
>> * [Home>Amrita IIS.WebHome]
>> * [PMT Discussions>Amrita IIS.PMT_Discussions]
>> * [Class Editor>XWiki.XWikiClasses]
>> * [PMT>PMT.PMTemplateTestClass]
>> * [PMT Test form>Amrita IIS.Form_PMT_Test]
>> 
>> #if ($xwiki.hasAdminRights())
>> For Admins:
>> * [Admin Center>XWiki.WebHome]
>> * [What's New>Main.Dashboard]  $xwiki.getURL( 
>> $xwiki.getSkinFile('icons/black-rss-mini3.png')  
>> #end
>> 
>> #set($user = $xwiki.getUser())
>> #if($user.isUserInGroup("XWiki.Editors"))
>> Editor Group
>> * [Editor's page>Amrita IIS.Editor]
>> #end 
>> 
>> 
>>  $xwiki.getDocument( (Edit
>> this panel) 
>> #end
>> #panelfooter()
>> 
>> ---
>> 
>> 
>> Ricardo Rodríguez wrote:
>>> V. Harikrishnan Nair wrote:
 hi Vito, 
 hi Ricardo,

  I implemented the code as :
   
 #set($user = $xwiki.getUser())
 #if($user.isUserInGroup('XWiki.Editors'))
 Editor Group
 * [Editor's page>Amrita IIS.Editor]
 #end  

 But I got a really weird error -

 Error number 4001 in 4: Error while parsing velocity page
 Panels.QuickLinks
 Wrapped Exception: Encountered "#endrn" at line 26, column 1 of
 Panels.QuickLinks
 Was expecting one of:
  
 "(" …
  …
  …
  …
 "##" …
 "\" …
 "
 " …
  …
 "#" …
 "#" …
  …
  …
  …
  …
  …
  …
  …
  …
  …
 "{" …
 "}" ...

 I checked everything but it simply would not work...


 - Harikrishnan
>>> Hi Harikrishnan,
>>>
>>> I've tried your code here and it works without a glitch.
>>>
>>> The error you get is at line 26, so it is not possible for us to know if 
>>> one of the five code lines included in your message is the offending
>>> one.
>>>
>>> Please, could you post here your whole Panels.QuickLinks to see if it is 
>>> possible for us to reproduce the error?
>>>
>>> Best,
>>>
>>> -- 
>>> Ricardo Rodríguez
>>> Your XEN ICT Team
>>>
>>> ___
>>> users mailing list
>>> users@xwiki.org
>>> http://lists.xwiki.org/mailman/listinfo/users
>>>
>>>
>> 
> 
> Hi Harikrishnan,
> 
> the problem is in the last "#end": there no "#if" related to it.
> Try to delete it and the panel should work fine.
> 
> Vito
> 
> 
> -- 
> Vitantonio Messa
> +358 46 889 48 49 - [EMAIL PROTECTED]
> COSS - The Finnish Centre for Open Source Solutions
> @ Technology Centre Hermia Ltd.
> Hermiankatu 1, FIN-33720 Tampere, FINLAND
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Displaying-Panel-items-tf4749669.html#a13601636
Sent from the XWiki- Users mailing list archive at Nabble.com.

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


Re: [xwiki-users] Displaying Panel items

2007-11-05 Thread Vitantonio Messa
V. Harikrishnan Nair wrote:
> Thanks for the help, Ricardo. Here's the code -
> ---
> #panelheader('Quick Links')
> * [Home>Amrita IIS.WebHome]
> * [PMT Discussions>Amrita IIS.PMT_Discussions]
> * [Class Editor>XWiki.XWikiClasses]
> * [PMT>PMT.PMTemplateTestClass]
> * [PMT Test form>Amrita IIS.Form_PMT_Test]
> 
> #if ($xwiki.hasAdminRights())
> For Admins:
> * [Admin Center>XWiki.WebHome]
> * [What's New>Main.Dashboard]  $xwiki.getURL( 
> $xwiki.getSkinFile('icons/black-rss-mini3.png')  
> #end
> 
> #set($user = $xwiki.getUser())
> #if($user.isUserInGroup("XWiki.Editors"))
> Editor Group
> * [Editor's page>Amrita IIS.Editor]
> #end 
> 
> 
>  $xwiki.getDocument( (Edit
> this panel) 
> #end
> #panelfooter()
> 
> ---
> 
> 
> Ricardo Rodríguez wrote:
>> V. Harikrishnan Nair wrote:
>>> hi Vito, 
>>> hi Ricardo,
>>>
>>>  I implemented the code as :
>>>   
>>> #set($user = $xwiki.getUser())
>>> #if($user.isUserInGroup('XWiki.Editors'))
>>> Editor Group
>>> * [Editor's page>Amrita IIS.Editor]
>>> #end  
>>>
>>> But I got a really weird error -
>>>
>>> Error number 4001 in 4: Error while parsing velocity page
>>> Panels.QuickLinks
>>> Wrapped Exception: Encountered "#endrn" at line 26, column 1 of
>>> Panels.QuickLinks
>>> Was expecting one of:
>>>  
>>> "(" …
>>>  …
>>>  …
>>>  …
>>> "##" …
>>> "\" …
>>> "
>>> " …
>>>  …
>>> "#" …
>>> "#" …
>>>  …
>>>  …
>>>  …
>>>  …
>>>  …
>>>  …
>>>  …
>>>  …
>>>  …
>>> "{" …
>>> "}" ...
>>>
>>> I checked everything but it simply would not work...
>>>
>>>
>>> - Harikrishnan
>> Hi Harikrishnan,
>>
>> I've tried your code here and it works without a glitch.
>>
>> The error you get is at line 26, so it is not possible for us to know if 
>> one of the five code lines included in your message is the offending one.
>>
>> Please, could you post here your whole Panels.QuickLinks to see if it is 
>> possible for us to reproduce the error?
>>
>> Best,
>>
>> -- 
>> Ricardo Rodríguez
>> Your XEN ICT Team
>>
>> ___
>> users mailing list
>> users@xwiki.org
>> http://lists.xwiki.org/mailman/listinfo/users
>>
>>
> 

Hi Harikrishnan,

the problem is in the last "#end": there no "#if" related to it.
Try to delete it and the panel should work fine.

Vito


-- 
Vitantonio Messa
+358 46 889 48 49 - [EMAIL PROTECTED]
COSS - The Finnish Centre for Open Source Solutions
@ Technology Centre Hermia Ltd.
Hermiankatu 1, FIN-33720 Tampere, FINLAND
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Displaying Panel items

2007-11-05 Thread V. Harikrishnan Nair

Thanks for the help, Ricardo. Here's the code -
---
#panelheader('Quick Links')
* [Home>Amrita IIS.WebHome]
* [PMT Discussions>Amrita IIS.PMT_Discussions]
* [Class Editor>XWiki.XWikiClasses]
* [PMT>PMT.PMTemplateTestClass]
* [PMT Test form>Amrita IIS.Form_PMT_Test]

#if ($xwiki.hasAdminRights())
For Admins:
* [Admin Center>XWiki.WebHome]
* [What's New>Main.Dashboard]  $xwiki.getURL( 
$xwiki.getSkinFile('icons/black-rss-mini3.png')  
#end

#set($user = $xwiki.getUser())
#if($user.isUserInGroup("XWiki.Editors"))
Editor Group
* [Editor's page>Amrita IIS.Editor]
#end 


 $xwiki.getDocument( (Edit
this panel) 
#end
#panelfooter()

---


Ricardo Rodríguez wrote:
> 
> V. Harikrishnan Nair wrote:
>> hi Vito, 
>> hi Ricardo,
>>
>>  I implemented the code as :
>>   
>> #set($user = $xwiki.getUser())
>> #if($user.isUserInGroup('XWiki.Editors'))
>> Editor Group
>> * [Editor's page>Amrita IIS.Editor]
>> #end  
>>
>> But I got a really weird error -
>>
>> Error number 4001 in 4: Error while parsing velocity page
>> Panels.QuickLinks
>> Wrapped Exception: Encountered "#endrn" at line 26, column 1 of
>> Panels.QuickLinks
>> Was expecting one of:
>>  
>> "(" …
>>  …
>>  …
>>  …
>> "##" …
>> "\" …
>> "
>> " …
>>  …
>> "#" …
>> "#" …
>>  …
>>  …
>>  …
>>  …
>>  …
>>  …
>>  …
>>  …
>>  …
>> "{" …
>> "}" ...
>>
>> I checked everything but it simply would not work...
>>
>>
>> - Harikrishnan
> 
> Hi Harikrishnan,
> 
> I've tried your code here and it works without a glitch.
> 
> The error you get is at line 26, so it is not possible for us to know if 
> one of the five code lines included in your message is the offending one.
> 
> Please, could you post here your whole Panels.QuickLinks to see if it is 
> possible for us to reproduce the error?
> 
> Best,
> 
> -- 
> Ricardo Rodríguez
> Your XEN ICT Team
> 
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Displaying-Panel-items-tf4749669.html#a13600550
Sent from the XWiki- Users mailing list archive at Nabble.com.

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


Re: [xwiki-users] Displaying Panel items

2007-11-05 Thread Your XEN ICT Team - Ricardo Rodriguez
V. Harikrishnan Nair wrote:
> hi Vito, 
> hi Ricardo,
>
>  I implemented the code as :
>   
> #set($user = $xwiki.getUser())
> #if($user.isUserInGroup('XWiki.Editors'))
> Editor Group
> * [Editor's page>Amrita IIS.Editor]
> #end  
>
> But I got a really weird error -
>
> Error number 4001 in 4: Error while parsing velocity page Panels.QuickLinks
> Wrapped Exception: Encountered "#endrn" at line 26, column 1 of
> Panels.QuickLinks
> Was expecting one of:
>  
> "(" …
>  …
>  …
>  …
> "##" …
> "\" …
> "
> " …
>  …
> "#" …
> "#" …
>  …
>  …
>  …
>  …
>  …
>  …
>  …
>  …
>  …
> "{" …
> "}" ...
>
> I checked everything but it simply would not work...
>
>
> - Harikrishnan

Hi Harikrishnan,

I've tried your code here and it works without a glitch.

The error you get is at line 26, so it is not possible for us to know if 
one of the five code lines included in your message is the offending one.

Please, could you post here your whole Panels.QuickLinks to see if it is 
possible for us to reproduce the error?

Best,

-- 
Ricardo Rodríguez
Your XEN ICT Team

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


Re: [xwiki-users] Displaying Panel items

2007-11-05 Thread V. Harikrishnan Nair

hi Vito, 
hi Ricardo,

 I implemented the code as :
  
#set($user = $xwiki.getUser())
#if($user.isUserInGroup('XWiki.Editors'))
Editor Group
* [Editor's page>Amrita IIS.Editor]
#end  

But I got a really weird error -

Error number 4001 in 4: Error while parsing velocity page Panels.QuickLinks
Wrapped Exception: Encountered "#endrn" at line 26, column 1 of
Panels.QuickLinks
Was expecting one of:
 
"(" …
 …
 …
 …
"##" …
"\" …
"
" …
 …
"#" …
"#" …
 …
 …
 …
 …
 …
 …
 …
 …
 …
"{" …
"}" ...

I checked everything but it simply would not work...


- Harikrishnan


Ricardo Rodríguez wrote:
> 
> Vitantonio Messa wrote:
>> Hi,
>>
>> it is possible. Instead of checking if the current user has 
>> administrator rights, you can check if he is in the group you want.
>>
>> There was a discussion about that some days ago on the mailing list. 
>> Look for it, if I remember right there was also the code you need.
>>
>> Vito
>>
>>
>>
>> V. Harikrishnan Nair wrote:
>>   
>>> Hi.
>>>
>>>   It is seen that Panel items can be hidden from users other than the
>>> Admins
>>> using this statement -> #if ($xwiki.hasAdminRights()), right ? 
>>>
>>>   Is it possible to be able to display certain Panel items to certain
>>> user
>>> groups ? If so, how ?
>>>
>>> Harikrishnan
>>> 
>>
>>   
> Just to ease the task. To show/hide a panel for the current user:
> 
> #set ($user = $xwiki.getUser())
> #if($user.isUserInGroup("XWiki.YourGroup"))
> ...
> #end
> 
> HTH,
> 
> -- 
> Ricardo Rodríguez
> Your XEN ICT Team
> 
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Displaying-Panel-items-tf4749669.html#a13592796
Sent from the XWiki- Users mailing list archive at Nabble.com.

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


Re: [xwiki-users] Displaying Panel items

2007-11-05 Thread Your XEN ICT Team - Ricardo Rodriguez
Vitantonio Messa wrote:
> Hi,
>
> it is possible. Instead of checking if the current user has 
> administrator rights, you can check if he is in the group you want.
>
> There was a discussion about that some days ago on the mailing list. 
> Look for it, if I remember right there was also the code you need.
>
> Vito
>
>
>
> V. Harikrishnan Nair wrote:
>   
>> Hi.
>>
>>   It is seen that Panel items can be hidden from users other than the Admins
>> using this statement -> #if ($xwiki.hasAdminRights()), right ? 
>>
>>   Is it possible to be able to display certain Panel items to certain user
>> groups ? If so, how ?
>>
>> Harikrishnan
>> 
>
>   
Just to ease the task. To show/hide a panel for the current user:

#set ($user = $xwiki.getUser())
#if($user.isUserInGroup("XWiki.YourGroup"))
...
#end

HTH,

-- 
Ricardo Rodríguez
Your XEN ICT Team

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


Re: [xwiki-users] Displaying Panel items

2007-11-04 Thread Vitantonio Messa
Hi,

it is possible. Instead of checking if the current user has 
administrator rights, you can check if he is in the group you want.

There was a discussion about that some days ago on the mailing list. 
Look for it, if I remember right there was also the code you need.

Vito



V. Harikrishnan Nair wrote:
> Hi.
> 
>   It is seen that Panel items can be hidden from users other than the Admins
> using this statement -> #if ($xwiki.hasAdminRights()), right ? 
> 
>   Is it possible to be able to display certain Panel items to certain user
> groups ? If so, how ?
> 
> Harikrishnan

-- 
Vitantonio Messa
+358 46 889 48 49 - [EMAIL PROTECTED]
COSS - The Finnish Centre for Open Source Solutions
@ Technology Centre Hermia Ltd.
Hermiankatu 1, FIN-33720 Tampere, FINLAND
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Displaying Panel items

2007-11-04 Thread V. Harikrishnan Nair

Hi.

  It is seen that Panel items can be hidden from users other than the Admins
using this statement -> #if ($xwiki.hasAdminRights()), right ? 

  Is it possible to be able to display certain Panel items to certain user
groups ? If so, how ?

Harikrishnan
-- 
View this message in context: 
http://www.nabble.com/Displaying-Panel-items-tf4749669.html#a13581426
Sent from the XWiki- Users mailing list archive at Nabble.com.

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