[xwiki-devs] [Proposal] Allow to provide document templates on document creation
Hi XWikiers, I've been working on the ability to provide document templates on document creation lately. It's documented on dev.xwiki.org: http://dev.xwiki.org/xwiki/bin/view/Drafts/DocumentTemplates Implementation: - New "create" xwiki action - Templates: create.vm, createinline.vm (for inline and ajax uses) - Modification in the xwiki-core-rendering-xwiki core module so that it gets the correct action (create) for broken links - New XClass: XWiki.TemplateProviderClass (with associated sheet and template), this class allow to build the list of template entries to display in the create document form. - New administration section: Templates. Allows to list existing template providers and to create new ones. I'm almost ready to commit (I only need one more day to write functional tests) and I'd really like to do it after the 2.4M1 release. WDYT ? JIRA: http://jira.xwiki.org/jira/browse/XE-672 JV.
Hi, On Thu, May 27, 2010 at 14:41, Jean-Vincent Drean <[email protected]>wrote:
Hi XWikiers,
I've been working on the ability to provide document templates on document creation lately. It's documented on dev.xwiki.org: http://dev.xwiki.org/xwiki/bin/view/Drafts/DocumentTemplates
Implementation: - New "create" xwiki action - Templates: create.vm, createinline.vm (for inline and ajax uses) - Modification in the xwiki-core-rendering-xwiki core module so that it gets the correct action (create) for broken links - New XClass: XWiki.TemplateProviderClass (with associated sheet and template), this class allow to build the list of template entries to display in the create document form. - New administration section: Templates. Allows to list existing template providers and to create new ones.
I'm almost ready to commit (I only need one more day to write functional tests) and I'd really like to do it after the 2.4M1 release. WDYT ?
I like the idea a lot. Some stuff could benefit from some polish so I think it would be great to commit what's available as it is now so that we can play with it and suggest improvements. Guillaume
JV. _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Guillaume Lerouge Product Manager - XWiki SAS Skype: wikibc Twitter: glerouge http://guillaumelerouge.com/
Looks like a pretty good idea ! +1 On Thu, May 27, 2010 at 14:41, Jean-Vincent Drean <[email protected]> wrote:
Hi XWikiers,
I've been working on the ability to provide document templates on document creation lately. It's documented on dev.xwiki.org: http://dev.xwiki.org/xwiki/bin/view/Drafts/DocumentTemplates
Implementation: - New "create" xwiki action - Templates: create.vm, createinline.vm (for inline and ajax uses) - Modification in the xwiki-core-rendering-xwiki core module so that it gets the correct action (create) for broken links - New XClass: XWiki.TemplateProviderClass (with associated sheet and template), this class allow to build the list of template entries to display in the create document form. - New administration section: Templates. Allows to list existing template providers and to create new ones.
I'm almost ready to commit (I only need one more day to write functional tests) and I'd really like to do it after the 2.4M1 release. WDYT ?
JIRA: http://jira.xwiki.org/jira/browse/XE-672
JV. _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
Hi, I have two questions : * Why not just XWiki.TemplateClass ? * Why habing a metadata that indicate which template to use ? Shouldn't the document that hosts a Template(Privder)Class be itself the said template, and that's it ? (= remove the "template to use" field) Jerome.
Hi XWikiers,
I've been working on the ability to provide document templates on document creation lately. It's documented on dev.xwiki.org: http://dev.xwiki.org/xwiki/bin/view/Drafts/DocumentTemplates
Implementation: - New "create" xwiki action - Templates: create.vm, createinline.vm (for inline and ajax uses) - Modification in the xwiki-core-rendering-xwiki core module so that it gets the correct action (create) for broken links - New XClass: XWiki.TemplateProviderClass (with associated sheet and template), this class allow to build the list of template entries to display in the create document form. - New administration section: Templates. Allows to list existing template providers and to create new ones.
I'm almost ready to commit (I only need one more day to write functional tests) and I'd really like to do it after the 2.4M1 release. WDYT ?
JIRA: http://jira.xwiki.org/jira/browse/XE-672
JV. _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On 05/27/2010 02:56 PM, Jerome Velociter wrote:
Hi,
I have two questions :
* Why not just XWiki.TemplateClass ? * Why habing a metadata that indicate which template to use ? Shouldn't the document that hosts a Template(Privder)Class be itself the said template, and that's it ? (= remove the "template to use" field)
The problem would be to remove the template object after the copy, so that not all instances become templates as well. This custom cleanup would require more changes to the core.
Jerome.
Hi XWikiers,
I've been working on the ability to provide document templates on document creation lately. It's documented on dev.xwiki.org: http://dev.xwiki.org/xwiki/bin/view/Drafts/DocumentTemplates
Implementation: - New "create" xwiki action - Templates: create.vm, createinline.vm (for inline and ajax uses) - Modification in the xwiki-core-rendering-xwiki core module so that it gets the correct action (create) for broken links - New XClass: XWiki.TemplateProviderClass (with associated sheet and template), this class allow to build the list of template entries to display in the create document form. - New administration section: Templates. Allows to list existing template providers and to create new ones.
I'm almost ready to commit (I only need one more day to write functional tests) and I'd really like to do it after the 2.4M1 release. WDYT ?
JIRA: http://jira.xwiki.org/jira/browse/XE-672
JV.
-- Sergiu Dumitriu http://purl.org/net/sergiu/
On 05/27/2010 03:00 PM, Sergiu Dumitriu wrote:
On 05/27/2010 02:56 PM, Jerome Velociter wrote:
Hi,
I have two questions :
* Why not just XWiki.TemplateClass ? * Why habing a metadata that indicate which template to use ? Shouldn't the document that hosts a Template(Privder)Class be itself the said template, and that's it ? (= remove the "template to use" field)
The problem would be to remove the template object after the copy, so that not all instances become templates as well. This custom cleanup would require more changes to the core.
But yes, I'd also prefer less documents if possible.
Jerome.
Hi XWikiers,
I've been working on the ability to provide document templates on document creation lately. It's documented on dev.xwiki.org: http://dev.xwiki.org/xwiki/bin/view/Drafts/DocumentTemplates
Implementation: - New "create" xwiki action - Templates: create.vm, createinline.vm (for inline and ajax uses) - Modification in the xwiki-core-rendering-xwiki core module so that it gets the correct action (create) for broken links - New XClass: XWiki.TemplateProviderClass (with associated sheet and template), this class allow to build the list of template entries to display in the create document form. - New administration section: Templates. Allows to list existing template providers and to create new ones.
I'm almost ready to commit (I only need one more day to write functional tests) and I'd really like to do it after the 2.4M1 release. WDYT ?
JIRA: http://jira.xwiki.org/jira/browse/XE-672
JV.
-- Sergiu Dumitriu http://purl.org/net/sergiu/
On Thu, May 27, 2010 at 14:56, Jerome Velociter <[email protected]> wrote:
Hi,
I have two questions :
* Why not just XWiki.TemplateClass ? * Why habing a metadata that indicate which template to use ? Shouldn't the document that hosts a Template(Privder)Class be itself the said template, and that's it ? (= remove the "template to use" field)
Template is not just about the content, it's supposed to also copy the metadata, objects etc... IMO the template should remain clean and copyed without having to filter anything.
Jerome.
Hi XWikiers,
I've been working on the ability to provide document templates on document creation lately. It's documented on dev.xwiki.org: http://dev.xwiki.org/xwiki/bin/view/Drafts/DocumentTemplates
Implementation: - New "create" xwiki action - Templates: create.vm, createinline.vm (for inline and ajax uses) - Modification in the xwiki-core-rendering-xwiki core module so that it gets the correct action (create) for broken links - New XClass: XWiki.TemplateProviderClass (with associated sheet and template), this class allow to build the list of template entries to display in the create document form. - New administration section: Templates. Allows to list existing template providers and to create new ones.
I'm almost ready to commit (I only need one more day to write functional tests) and I'd really like to do it after the 2.4M1 release. WDYT ?
JIRA: http://jira.xwiki.org/jira/browse/XE-672
JV. _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
On Thu, May 27, 2010 at 2:56 PM, Jerome Velociter <[email protected]> wrote:
Hi,
I have two questions :
* Why not just XWiki.TemplateClass ? * Why habing a metadata that indicate which template to use ? Shouldn't the document that hosts a Template(Privder)Class be itself the said template, and that's it ? (= remove the "template to use" field)
Yes there was those possibilities: - Adding a XWiki.TemplateClass to the document to offer has a template and remove it during the copy operation. I didn't chose it because It would have added one more bound between documents and the core. - Add a new "isTemplate" meta to XWikiDocument but it has the same drawback as 1) and it was missing extensibility (restrict the list of space is the first use case but I'm sure we'll find more).
Jerome.
Hi XWikiers,
I've been working on the ability to provide document templates on document creation lately. It's documented on dev.xwiki.org: http://dev.xwiki.org/xwiki/bin/view/Drafts/DocumentTemplates
Implementation: - New "create" xwiki action - Templates: create.vm, createinline.vm (for inline and ajax uses) - Modification in the xwiki-core-rendering-xwiki core module so that it gets the correct action (create) for broken links - New XClass: XWiki.TemplateProviderClass (with associated sheet and template), this class allow to build the list of template entries to display in the create document form. - New administration section: Templates. Allows to list existing template providers and to create new ones.
I'm almost ready to commit (I only need one more day to write functional tests) and I'd really like to do it after the 2.4M1 release. WDYT ?
JIRA: http://jira.xwiki.org/jira/browse/XE-672
JV. _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On Thu, May 27, 2010 at 2:56 PM, Jerome Velociter <[email protected]> wrote:
Hi,
I have two questions :
* Why not just XWiki.TemplateClass ? * Why habing a metadata that indicate which template to use ? Shouldn't the document that hosts a Template(Privder)Class be itself the said template, and that's it ? (= remove the "template to use" field)
Yes there was those possibilities: - Adding a XWiki.TemplateClass to the document to offer has a template and remove it during the copy operation. I didn't chose it because It would have added one more bound between documents and the core. - Add a new "isTemplate" meta to XWikiDocument but it has the same drawback as 1) and it was missing extensibility (restrict the list of space is the first use case but I'm sure we'll find more).
OK, makes sense not wanting to cleanup the template over copy. +1 for the proposal Jerome.
Jerome.
Hi XWikiers,
I've been working on the ability to provide document templates on document creation lately. It's documented on dev.xwiki.org: http://dev.xwiki.org/xwiki/bin/view/Drafts/DocumentTemplates
Implementation: - New "create" xwiki action - Templates: create.vm, createinline.vm (for inline and ajax uses) - Modification in the xwiki-core-rendering-xwiki core module so that it gets the correct action (create) for broken links - New XClass: XWiki.TemplateProviderClass (with associated sheet and template), this class allow to build the list of template entries to display in the create document form. - New administration section: Templates. Allows to list existing template providers and to create new ones.
I'm almost ready to commit (I only need one more day to write functional tests) and I'd really like to do it after the 2.4M1 release. WDYT ?
JIRA: http://jira.xwiki.org/jira/browse/XE-672
JV. _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On 05/27/2010 02:41 PM, Jean-Vincent Drean wrote:
Hi XWikiers,
I've been working on the ability to provide document templates on document creation lately. It's documented on dev.xwiki.org: http://dev.xwiki.org/xwiki/bin/view/Drafts/DocumentTemplates
Implementation: - New "create" xwiki action - Templates: create.vm, createinline.vm (for inline and ajax uses)
Doesn't this clash with the existing create.vm?
- Modification in the xwiki-core-rendering-xwiki core module so that it gets the correct action (create) for broken links - New XClass: XWiki.TemplateProviderClass (with associated sheet and template), this class allow to build the list of template entries to display in the create document form. - New administration section: Templates. Allows to list existing template providers and to create new ones.
I'm almost ready to commit (I only need one more day to write functional tests) and I'd really like to do it after the 2.4M1 release. WDYT ?
Some quick remarks: - Shouldn't the template list be in a select box, to be able to display many possible templates? Or we assume that a normal wiki should have at most 10 templates, and the user can change the display if he needs to? Or, should we automatically switch from radio list to drop down select when the number of templates goes beyond an acceptable number? - Should the list of accepted spaces be a livetable instead? - Does the modal dialog really need the highlight background? I'd rather have it simple, without the extra background.
JIRA: http://jira.xwiki.org/jira/browse/XE-672
JV.
-- Sergiu Dumitriu http://purl.org/net/sergiu/
On Thu, May 27, 2010 at 2:57 PM, Sergiu Dumitriu <[email protected]> wrote:
On 05/27/2010 02:41 PM, Jean-Vincent Drean wrote:
Hi XWikiers,
I've been working on the ability to provide document templates on document creation lately. It's documented on dev.xwiki.org: http://dev.xwiki.org/xwiki/bin/view/Drafts/DocumentTemplates
Implementation: - New "create" xwiki action - Templates: create.vm, createinline.vm (for inline and ajax uses)
Doesn't this clash with the existing create.vm?
It replaces the existing create.vm.
- Modification in the xwiki-core-rendering-xwiki core module so that it gets the correct action (create) for broken links - New XClass: XWiki.TemplateProviderClass (with associated sheet and template), this class allow to build the list of template entries to display in the create document form. - New administration section: Templates. Allows to list existing template providers and to create new ones.
I'm almost ready to commit (I only need one more day to write functional tests) and I'd really like to do it after the 2.4M1 release. WDYT ?
Some quick remarks:
- Shouldn't the template list be in a select box, to be able to display many possible templates? Or we assume that a normal wiki should have at most 10 templates, and the user can change the display if he needs to? Or, should we automatically switch from radio list to drop down select when the number of templates goes beyond an acceptable number?
At first I put it in a select box, then changed to radio. Your proposal about dynamically changing the display sounds good.
- Should the list of accepted spaces be a livetable instead?
Could be required yes.
- Does the modal dialog really need the highlight background? I'd rather have it simple, without the extra background.
It can be changed and I'm +1. JV.
On May 27, 2010, at 2:57 PM, Sergiu Dumitriu wrote:
On 05/27/2010 02:41 PM, Jean-Vincent Drean wrote:
Hi XWikiers,
I've been working on the ability to provide document templates on document creation lately. It's documented on dev.xwiki.org: http://dev.xwiki.org/xwiki/bin/view/Drafts/DocumentTemplates
Implementation: - New "create" xwiki action - Templates: create.vm, createinline.vm (for inline and ajax uses)
Doesn't this clash with the existing create.vm?
- Modification in the xwiki-core-rendering-xwiki core module so that it gets the correct action (create) for broken links - New XClass: XWiki.TemplateProviderClass (with associated sheet and template), this class allow to build the list of template entries to display in the create document form. - New administration section: Templates. Allows to list existing template providers and to create new ones.
I'm almost ready to commit (I only need one more day to write functional tests) and I'd really like to do it after the 2.4M1 release. WDYT ?
Some quick remarks:
- Shouldn't the template list be in a select box, to be able to display many possible templates? Or we assume that a normal wiki should have at most 10 templates, and the user can change the display if he needs to?
IMO a livetable for selecting the template might be good too so that it can scale, allow searching, etc
Or, should we automatically switch from radio list to drop down select when the number of templates goes beyond an acceptable number?
- Should the list of accepted spaces be a livetable instead?
big +1 ;) (indeed there can be lots of spaces) Thanks -Vincent
- Does the modal dialog really need the highlight background? I'd rather have it simple, without the extra background.
JIRA: http://jira.xwiki.org/jira/browse/XE-672
JV.
On 05/27/2010 03:41 PM, Jean-Vincent Drean wrote:
Hi XWikiers,
I've been working on the ability to provide document templates on document creation lately. It's documented on dev.xwiki.org: http://dev.xwiki.org/xwiki/bin/view/Drafts/DocumentTemplates
Implementation: - New "create" xwiki action
- Templates: create.vm, createinline.vm (for inline and ajax uses)
Are you handling http://lists.xwiki.org/pipermail/users/2010-May/020805.html ? I was going to fix it but if you changed create.vm then maybe you fixed it locally. +1 for your proposal. Thanks, Marius
- Modification in the xwiki-core-rendering-xwiki core module so that it gets the correct action (create) for broken links - New XClass: XWiki.TemplateProviderClass (with associated sheet and template), this class allow to build the list of template entries to display in the create document form. - New administration section: Templates. Allows to list existing template providers and to create new ones.
I'm almost ready to commit (I only need one more day to write functional tests) and I'd really like to do it after the 2.4M1 release. WDYT ?
JIRA: http://jira.xwiki.org/jira/browse/XE-672
JV. _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On Thu, May 27, 2010 at 3:10 PM, Marius Dumitru Florea <[email protected]> wrote:
On 05/27/2010 03:41 PM, Jean-Vincent Drean wrote:
Hi XWikiers,
I've been working on the ability to provide document templates on document creation lately. It's documented on dev.xwiki.org: http://dev.xwiki.org/xwiki/bin/view/Drafts/DocumentTemplates
Implementation: - New "create" xwiki action
- Templates: create.vm, createinline.vm (for inline and ajax uses)
Are you handling http://lists.xwiki.org/pipermail/users/2010-May/020805.html ? I was going to fix it but if you changed create.vm then maybe you fixed it locally.
I haven't fixed it, create.vm requires the page parameter to be passed.
+1 for your proposal.
Thanks, Marius
- Modification in the xwiki-core-rendering-xwiki core module so that it gets the correct action (create) for broken links - New XClass: XWiki.TemplateProviderClass (with associated sheet and template), this class allow to build the list of template entries to display in the create document form. - New administration section: Templates. Allows to list existing template providers and to create new ones.
I'm almost ready to commit (I only need one more day to write functional tests) and I'd really like to do it after the 2.4M1 release. WDYT ?
JIRA: http://jira.xwiki.org/jira/browse/XE-672
JV. _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
+1 in general. Thanks -Vincent On May 27, 2010, at 2:41 PM, Jean-Vincent Drean wrote:
Hi XWikiers,
I've been working on the ability to provide document templates on document creation lately. It's documented on dev.xwiki.org: http://dev.xwiki.org/xwiki/bin/view/Drafts/DocumentTemplates
Implementation: - New "create" xwiki action - Templates: create.vm, createinline.vm (for inline and ajax uses) - Modification in the xwiki-core-rendering-xwiki core module so that it gets the correct action (create) for broken links - New XClass: XWiki.TemplateProviderClass (with associated sheet and template), this class allow to build the list of template entries to display in the create document form. - New administration section: Templates. Allows to list existing template providers and to create new ones.
I'm almost ready to commit (I only need one more day to write functional tests) and I'd really like to do it after the 2.4M1 release. WDYT ?
JIRA: http://jira.xwiki.org/jira/browse/XE-672
JV.
On May 27, 2010, at 5:27 PM, Vincent Massol wrote:
+1 in general.
Thanks -Vincent
On May 27, 2010, at 2:41 PM, Jean-Vincent Drean wrote:
Hi XWikiers,
I've been working on the ability to provide document templates on document creation lately. It's documented on dev.xwiki.org: http://dev.xwiki.org/xwiki/bin/view/Drafts/DocumentTemplates
Implementation: - New "create" xwiki action - Templates: create.vm, createinline.vm (for inline and ajax uses) - Modification in the xwiki-core-rendering-xwiki core module so that it gets the correct action (create) for broken links - New XClass: XWiki.TemplateProviderClass (with associated sheet and template), this class allow to build the list of template entries to display in the create document form. - New administration section: Templates. Allows to list existing template providers and to create new ones.
I'm almost ready to commit (I only need one more day to write functional tests) and I'd really like to do it after the 2.4M1 release. WDYT ?
Have you taken into account these use cases: - The template requires parameters to be entered by the user - The template provider requires to run some script after the copy is done. Thanks -Vincent
JIRA: http://jira.xwiki.org/jira/browse/XE-672
JV.
participants (8)
-
Guillaume Lerouge -
Jean-Vincent Drean -
Jean-Vincent Drean -
Jerome Velociter -
Marius Dumitru Florea -
Sergiu Dumitriu -
Thomas Mortagne -
Vincent Massol