You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by eg...@apache.org on 2004/03/01 15:11:42 UTC
cvs commit: cocoon-lenya/src/webapp/lenya/pubs/default/lenya/content/authoring create.xsp
egli 2004/03/01 06:11:42
Modified: src/webapp/lenya/pubs/default/lenya/xslt/authoring
create.xsl
src/webapp/lenya/pubs/default/lenya/content/authoring
create.xsp
Log:
Restrict language selection to the languages specified for this
publication using a html form select.
Revision Changes Path
1.9 +18 -3 cocoon-lenya/src/webapp/lenya/pubs/default/lenya/xslt/authoring/create.xsl
Index: create.xsl
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/pubs/default/lenya/xslt/authoring/create.xsl,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- create.xsl 14 Feb 2004 16:32:42 -0000 1.8
+++ create.xsl 1 Mar 2004 14:11:42 -0000 1.9
@@ -98,9 +98,7 @@
<tr>
<td class="lenya-entry-caption">Navigation Title*: </td><td><input class="lenya-form-element" type="text" name="properties.create.child-name"/></td>
</tr>
- <tr>
- <td class="lenya-entry-caption">Language*:</td><td><input class="lenya-form-element" type="text" name="properties.create.language" value="{/parent-child/dc:language}"/></td>
- </tr>
+ <xsl:apply-templates select="allowedLanguages"/>
<tr>
<td class="lenya-entry-caption">Creator:</td><td><input class="lenya-form-element" type="text" name="properties.create.creator" value="{/parent-child/dc:creator}"/></td>
</tr>
@@ -131,6 +129,23 @@
</div>
</div>
</xsl:if>
+ </xsl:template>
+
+ <xsl:template match="allowedLanguages">
+ <tr>
+ <td class="lenya-entry-caption">Language*:</td>
+ <td>
+ <select class="lenya-form-element" name="properties.create.language">
+ <xsl:apply-templates select="allowedLanguage"/>
+ </select>
+ </td>
+ </tr>
+ </xsl:template>
+
+ <xsl:template match="allowedLanguage">
+ <option>
+ <xsl:value-of select="."/>
+ </option>
</xsl:template>
<xsl:template match="exception">
1.5 +9 -1 cocoon-lenya/src/webapp/lenya/pubs/default/lenya/content/authoring/create.xsp
Index: create.xsp
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/pubs/default/lenya/content/authoring/create.xsp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- create.xsp 12 Aug 2003 14:32:35 -0000 1.4
+++ create.xsp 1 Mar 2004 14:11:42 -0000 1.5
@@ -32,9 +32,17 @@
}
Publication pub = (Publication) <input:get-attribute module="page-envelope" as="object" name="publication"/>;
-
+
</xsp:logic>
+ <allowedLanguages>
+ <xsp:logic>
+ String[] languages = pub.getLanguages();
+ for (int i = 0; i < languages.length; i++) {
+ <allowedLanguage><xsp:expr>languages[i]</xsp:expr></allowedLanguage>
+ }
+ </xsp:logic>
+ </allowedLanguages>
<parentid><xsp:expr>parentId</xsp:expr></parentid>
<referer><xsp-request:get-uri/></referer>
<doctype><xsp:expr><xsp-request:get-parameter name="doctype"/></xsp:expr></doctype>
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-cvs-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-cvs-help@cocoon.apache.org