Re: [xwiki-users] Including a page from another space and having access to its objects
Hi, On Wed, Aug 25, 2010 at 04:01, Radek Rekas radek.re...@evalua.com.au wrote: Is it possible to include a page and have it execute as if it was still in that space (rather than in the parent pages space)? For example I have a News space and its WebHome page looks for documents with news post objects in that space. When I include News.WebHome from Main.WebHome it only sees news posts that are in the Main space rather than in the News space. With {{include}} macro you have a context handling parameters which is used to indicate what is the current document when including the document: * context=current is the default and basically mean that the included document (News.WebHome) content is executed in the context of the includer document (Main.WebHome) * context=new means that the included document (News.WebHome) is executed in a new isolated context in which it's the current document, i.e. it renders exactly like you where going to /bin/view/News/ See http://code.xwiki.org/xwiki/bin/view/Macros/IncludeMacro20 for more. Many thanks Radek Rekas ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users -- Thomas Mortagne ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Including a page from another space and having access to its objects
try using {{include document=News.WebHome context=new/}} Radek Rekas wrote: Is it possible to include a page and have it execute as if it was still in that space (rather than in the parent pages space)? For example I have a News space and its WebHome page looks for documents with news post objects in that space. When I include News.WebHome from Main.WebHome it only sees news posts that are in the Main space rather than in the News space. Many thanks Radek Rekas ___ 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] Permissions for the bottom Xwiki panel??
Making the panel not show up for guests means editing a template file which shows that panel. If I recall, the template you need to edit is called docextra.vm and you'll want to make an if statement something like this. #if($xcontext.getUser() != 'XWiki.XWikiGuest') ## the part which makes the panels show #end Caleb Kaya Saman wrote: Hi, is there a way to give user permissions on the bottom panel that has: Annotations Comments Attachments History Information in it?? What I'd like to do is give read/write permissions to all signed up users and then deny all other guest users access so that if a guest goes into the site the panel doesn't even show? I'm using the toucan skin and have found this which is too dramatic as it disables the the comments panel altogether: http://www.mail-archive.com/users@xwiki.org/msg00864.html I tried searching under the Panels home but couldn't find any names correlating to the above panel. also. Thanks, Kaya ___ 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] RES: RES: Calendar Application on XE 2.4 not working properly
Hi, The solution that I told you about is like this: In a separate page, let's say 'Main.MyCalendar', paste this piece of code that is copied from 'XWiki.CalendarSheet' (I also added 2.0 wiki syntax but this is mandatory - you can keep the 1.0 syntax): {{velocity}} $xwiki.ssx.use('XWiki.CalendarSheet') #set($cview = $xwiki.calendar) #set($cparams = $cview.calendarParams) #if($request.month) $cparams.put(month, $request.get(month)) #end #if($request.year) $cparams.put(year, $request.get(year)) #end #set($rqcategories = $util.arrayList) #foreach($rqcateg in $request.get(category).split(,)) #if(!$rqcateg.trim().equals()) #set($discard = $rqcategories.add($rqcateg.trim())) #end #end $cparams.put(categories, $rqcategories) {{html wiki=true}} [[Add New EventMain.EventCalendar]] $cview.getHTMLCalendar($cparams, $xwiki.getDocument('Main.EventCalendar'), ) {{/html}} {{/velocity}} Now, in 'XWiki.CalendarSheet' just remove the lines that you've put in 'Main.MyCalendar'. You can also remove the piece of code that lists the current event (the '#foreach($event in $doc.getObjects(XWiki.CalendarEvent))' block), depending on what you want to display in the form page. And finally, in 'XWiki.CalendarSheet' change the action of the creation form: form action=$xwiki.getDocument('Main.MyCalendar').getURL('objectadd') method=get (this will allow adding calendar events to the 'Main.MyCalendar' page) and the redirect url: input type=hidden name=xredirect value=${xwiki.getDocument('Main.MyCalendar').getURL('view')} / (this will redirect to the 'Main.MyCalendar' page after submitting the creation form) This way you don't need extra JavaScript code to hide parts of the code and your application is modular. Raluca. On Wed, Aug 25, 2010 at 5:24 AM, Lockie loc...@gmail.com wrote: I worked out a way to hide the form in a way so that the user doesn't have to go to another page to fill it out. It hides the div and provides a link to reveal it, so I guess it could be used for anything. I thought I'd just share it for future reference. Go to XWiki.CalendarSheet and EditObjects then add a JavaScriptExtension object with the following properties: Name: (blank) Code: function toggle() { var ele = document.getElementById(toggleText); var text = document.getElementById(displayText); if(ele.style.display == block) { ele.style.display = none; text.innerHTML = Click to view and create events...; } else { ele.style.display = block; text.innerHTML = Hide form; } } Use this extension: Always on this wiki Parse content: No Caching policy: Default Then edit CalendarSheet in Source mode (Note: I converted mine from 1.0 syntax to 2.0 previously) and add these lines straight after $cview.getHTMLCalendar($cparams, ): Click to view events and make events... div id=toggleText style=display: none Remove the ? from href above. Don't forget the /div tag at the end: #end /div {{/html}} {{/velocity}} And I think that ends my questions about the calendar Cheers, Lockie. -- View this message in context: http://xwiki.475771.n2.nabble.com/Calendar-Application-on-XE-2-4-not-working-properly-tp5420827p5459543.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ 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] RES: RES: Calendar Application on XE 2.4 not working properly
On Wed, Aug 25, 2010 at 10:26 AM, Raluca Stavro raluca.moro...@xwiki.com wrote: Hi, The solution that I told you about is like this: In a separate page, let's say 'Main.MyCalendar', paste this piece of code that is copied from 'XWiki.CalendarSheet' (I also added 2.0 wiki syntax but this is mandatory - you can keep the 1.0 syntax): {{velocity}} $xwiki.ssx.use('XWiki.CalendarSheet') #set($cview = $xwiki.calendar) #set($cparams = $cview.calendarParams) #if($request.month) $cparams.put(month, $request.get(month)) #end #if($request.year) $cparams.put(year, $request.get(year)) #end #set($rqcategories = $util.arrayList) #foreach($rqcateg in $request.get(category).split(,)) #if(!$rqcateg.trim().equals()) #set($discard = $rqcategories.add($rqcateg.trim())) #end #end $cparams.put(categories, $rqcategories) {{html wiki=true}} [[Add New EventMain.EventCalendar]] $cview.getHTMLCalendar($cparams, $xwiki.getDocument('Main.EventCalendar'), ) {{/html}} {{/velocity}} For your case ignore all starting from here. The next explanations are for the case where you want to add events to another page than 'Main.EventCalendar'. Raluca. Now, in 'XWiki.CalendarSheet' just remove the lines that you've put in 'Main.MyCalendar'. You can also remove the piece of code that lists the current event (the '#foreach($event in $doc.getObjects(XWiki.CalendarEvent))' block), depending on what you want to display in the form page. And finally, in 'XWiki.CalendarSheet' change the action of the creation form: form action=$xwiki.getURL('Main.MyCalendar', 'objectadd') method=get (this will allow adding calendar events to the 'Main.MyCalendar' page) and the redirect url: input type=hidden name=xredirect value=${xwiki.getURL('Main.MyCalendar', 'view')} / (this will redirect to the 'Main.MyCalendar' page after submitting the creation form) This way you don't need extra JavaScript code to hide parts of the code and your application is modular. Raluca. On Wed, Aug 25, 2010 at 5:24 AM, Lockie loc...@gmail.com wrote: I worked out a way to hide the form in a way so that the user doesn't have to go to another page to fill it out. It hides the div and provides a link to reveal it, so I guess it could be used for anything. I thought I'd just share it for future reference. Go to XWiki.CalendarSheet and EditObjects then add a JavaScriptExtension object with the following properties: Name: (blank) Code: function toggle() { var ele = document.getElementById(toggleText); var text = document.getElementById(displayText); if(ele.style.display == block) { ele.style.display = none; text.innerHTML = Click to view and create events...; } else { ele.style.display = block; text.innerHTML = Hide form; } } Use this extension: Always on this wiki Parse content: No Caching policy: Default Then edit CalendarSheet in Source mode (Note: I converted mine from 1.0 syntax to 2.0 previously) and add these lines straight after $cview.getHTMLCalendar($cparams, ): Click to view events and make events... div id=toggleText style=display: none Remove the ? from href above. Don't forget the /div tag at the end: #end /div {{/html}} {{/velocity}} And I think that ends my questions about the calendar Cheers, Lockie. -- View this message in context: http://xwiki.475771.n2.nabble.com/Calendar-Application-on-XE-2-4-not-working-properly-tp5420827p5459543.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ 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] Permissions for the bottom Xwiki panel??
Hi, You can also modify 'view.vm' template and test if the current user is guest or not before displaying 'docextra.vm'. For the toucan skin, this is what you should do in 'view.vm' template: ... #if($displayDocExtra !$isGuest) #template(docextra.vm) div class=clearfloats/div #end ... For more information about how to modify a template see http://platform.xwiki.org/xwiki/bin/view/DevGuide/Skins#HD.OverridingtheSkincomponents . Raluca. On Wed, Aug 25, 2010 at 10:17 AM, Caleb James DeLisle calebdeli...@lavabit.com wrote: Making the panel not show up for guests means editing a template file which shows that panel. If I recall, the template you need to edit is called docextra.vm and you'll want to make an if statement something like this. #if($xcontext.getUser() != 'XWiki.XWikiGuest') ## the part which makes the panels show #end Caleb Kaya Saman wrote: Hi, is there a way to give user permissions on the bottom panel that has: Annotations Comments Attachments History Information in it?? What I'd like to do is give read/write permissions to all signed up users and then deny all other guest users access so that if a guest goes into the site the panel doesn't even show? I'm using the toucan skin and have found this which is too dramatic as it disables the the comments panel altogether: http://www.mail-archive.com/users@xwiki.org/msg00864.html I tried searching under the Panels home but couldn't find any names correlating to the above panel. also. Thanks, Kaya ___ 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 ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] [myxwiki] new wiki request
Can you please create a new wiki? brief description: I want to use this wiki for save my particular informations. user name: lumarjr server name: lumarjr.myxwiki.org Thank you, Lumar ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] DatePicker application doezn't work on Firefox 3.5, 3.6
Big thanks! Now DatePicker working great in Firefox! Also I closed ticket on jira - http://jira.xwiki.org/jira/browse/XE-696 (a few days ago I created jira-ticket for this situation). -- View this message in context: http://xwiki.475771.n2.nabble.com/DatePicker-application-doezn-t-work-on-Firefox-3-5-3-6-tp5442693p5463279.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] XWQL in DatabaseLists
When I create my own class with propertie with have type=DatabaseList - often, I cannot use simpe XWiki Class Name - I need to specify HibernateQuery. Unfortunately, I cannot use XWQL, only HQL I tried to put my XWQL query in a field of HibernateQuery - but no result (XWQL query was tested and is ok). For the developers - Are you planning to implement XWQL in a DatabaseLists? It will be great, because XWQL is more simple, shortly and naturally supporting XWiki data model! Or, maybe right now exists some possibilities to use XWQL in a DatabaseLists? -- Thanks beforehand! Eugen Colesnicov -- View this message in context: http://xwiki.475771.n2.nabble.com/XWQL-in-DatabaseLists-tp5463335p5463335.html 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] [myxwiki] new wiki request
On 08/25/2010 11:00 PM, lu...@inf.ufsc.br wrote: Can you please create a new wiki? brief description: I want to use this wiki for save my particular informations. user name: lumarjr server name: lumarjr.myxwiki.org Your wiki is ready. -- Sergiu Dumitriu http://purl.org/net/sergiu/ ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Different image in each panel header
Okay I found out HTML/CSS works. Example: #panelheader ('Panel Headerdiv id=imagepanel /xwiki/skins/colibri/logo.png /div') Think that answers my question. :) Lockie. -- View this message in context: http://xwiki.475771.n2.nabble.com/Different-image-in-each-panel-header-tp5463865p5464327.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users