All,
A space selection combo box could be useful.
I've revised the New Page panel code (see below) to provide functionality to
create a new page or space based upon a page template (from a Template space
or where ever). Its not perfect, but maybe it can help. If you or anyone can
do any better then let me know! Paste it into the New Page panel code area
to see it work.
Also I'd like a pop up (or something) to appear when a user clicks on a ?
link so they can select a template to base the new page on - but I don't
know how that could be coded.
Creating a series of page from a template page (by reading the template
pages the top level template page) would also be a good feature or having a
template space from which to create new space e.g. template project
spaces/pages which can be reused for new projects, etc.
Best Regards,
Richard
Revised New Page panel code:
#if($hasedit)
#panelheader($msg.get("Create"))
<form method="post" action="$doc.getURL("view",
"xpage=create")"
onsubmit="cancelCancelEdit()">
<br>Create:
<div class="left">
<select name="tocreate" class="panelselect">
<option value="page">New Page\*</option>
<option value="space">New Space</option>
<option value="post">New Blog Post</option>
</select>
</div>
#set($spaces = $xwiki.spaces)
#set($currentspace = "Templates")
#set($currentdoc = "-- N/A --")
#if ($request.sourcedoc && $request.sourcedoc.indexOf(".") > 0)
#set($currentspace =
$request.sourcedoc.substring(0,$request.sourcedoc.indexOf(".")))
#set($index = $request.sourcedoc.indexOf(".") + 1)
#set($currentdoc = $request.sourcedoc.substring($index))
#end
#if ($request.selspace) #set($currentspace = $request.selspace) #end
<br><div class="left">Space:</div><br>
<select
name="selspace"
onchange="location='?selspace=' + this.value;">
<option
value="$!{request.selspace}">$!{request.selspace}</option>
#foreach($space in $spaces)
#if ($space == $currentspace)
<option value="${space}" selected>${space}</option>
#else
<option value="${space}">${space}</option>
#end
#end
</select>
<br>Page Template:
<select name="template">
<option value="" selected="selected">-- N/A
--</option>
#foreach($subdoc in $xwiki.getSpaceDocsName("$currentspace"))
#if ($currentdoc == ${subdoc})
<option value="${currentspace}.${subdoc}"
selected>$subdoc</option>
#else
#if ($request.selspace)
<option
value="${request.selspace}.${subdoc}">$subdoc</option>
#else
<option
value="${currentspace}.${subdoc}">$subdoc</option>
#end
#end
#end
</select>
<br>Page/Space Name:
<div class="left">
<input type="text" name="title" value="Title"
class="panelinput"
style="margin:left;" onfocus="if(this.value=='Title')
this.value=''"
onblur="if(this.value=='') this.value='Title'"/>
</div>
<div class="padded centered" style="text-align:center;">
<input type="submit" class="button" style="margin:left;"
value="$msg.get("create")"/>
</div>
<p style="font-size:0.75em;padding-left:8px;">*New pages are created in
current space</p>
</form>
#panelfooter()
#end
-----Original Message-----
From: notifications-bounces(a)xwiki.org
[mailto:notifications-bounces@xwiki.org]On Behalf Of Vincent Massol
(JIRA)
Sent: 01 October 2007 11:33
To: notifications(a)xwiki.org
Subject: [xwiki-notifications] [Issue] Updated: (XAPANELS-22) Add space
selection combo box to the "Create" Panel
[
http://jira.xwiki.org/jira/browse/XAPANELS-22?page=com.atlassian.jira.plugin
.system.issuetabpanels:all-tabpanel ]
Vincent Massol updated XAPANELS-22:
-----------------------------------
Fix Version/s: 1.2 M2
(was: 1.2 M1)
Add space selection combo box to the
"Create" Panel
---------------------------------------------------
Key: XAPANELS-22
URL:
http://jira.xwiki.org/jira/browse/XAPANELS-22
Project: XWiki Panels Application
Issue Type: Improvement
Affects Versions: 1.0 RC4
Reporter: Vincent Massol
Fix For: 1.2 M2
Right now it's very difficult for new user to find out how to create a
page in
a given space.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.xwiki.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
_______________________________________________
notifications mailing list
notifications(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/notifications
Thales UK Ltd (Wells) DISCLAIMER: The information contained in this e-mail
is confidential. It may also be legally privileged. It is intended only for
the stated addressee(s) and access to it by any other person is
unauthorised. If you are not an addressee, you must not disclose, copy,
circulate or in any other way use or rely on the information contained in
this e-mail. Such unauthorised use may be unlawful. We may monitor all
e-mail communications through our networks. If you have received this e-mail
in error, please inform us immediately on +44 (0) 1749 672081 and delete it
and all copies from your system. We accept no responsibility for changes to
any e-mail which occur after it has been sent. Attachments to this e-mail
may contain software viruses which could damage your system. We therefore
recommend you virus-check all attachments before opening. A business of
Thales UK Ltd. Registered Office: 2 Dashwood Lang Road, The Bourne Business
Park, Addlestone, Weybridge, Surrey KT15 2NX Registered in England No.
868273