bug 2869, 2871, 2877, 2878 : Sweep up of cosmetic bugs requiring ADL language/transform changes.

status 2869, 2871, 2877, 2878 : resolved FIXED
This commit is contained in:
sb 2009-04-30 17:03:59 +00:00
parent e83ba2c9ac
commit bd2690ecdd
4 changed files with 149 additions and 149 deletions

View file

@ -13,7 +13,7 @@
<!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: --> <!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<!-- <!--
$Revision: 1.2 $ $Revision: 1.3 $
--> -->
<!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: --> <!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
@ -258,9 +258,8 @@ that we can allow HTML block level entities within content elements -->
foreign: this entity is part of some other system; no code will be generated foreign: this entity is part of some other system; no code will be generated
for it, although code which links to it will be generated for it, although code which links to it will be generated
--> -->
<!ELEMENT entity ( documentation?, content?, key?, <!ELEMENT entity ( documentation?, prompt*, content?, key?,
(property)*, property*, permission*, (form | page | list)*)>
permission*, (form | page | list)*)>
<!ATTLIST entity <!ATTLIST entity
name CDATA #REQUIRED name CDATA #REQUIRED
natural-key CDATA #IMPLIED natural-key CDATA #IMPLIED

View file

@ -20,8 +20,8 @@
explicitly state the permission, even if it is 'none'. explicitly state the permission, even if it is 'none'.
$Author: sb $ $Author: sb $
$Revision: 1.7 $ $Revision: 1.8 $
$Date: 2009-04-28 13:53:17 $ $Date: 2009-04-30 17:04:00 $
--> -->
<xsl:stylesheet version="1.0" <xsl:stylesheet version="1.0"
@ -74,7 +74,7 @@
* THIS FILE IS AUTOMATICALLY GENERATED AND SHOULD NOT * THIS FILE IS AUTOMATICALLY GENERATED AND SHOULD NOT
* BE MANUALLY EDITED. * BE MANUALLY EDITED.
* *
* Generated using adl2canonical.xslt <xsl:value-of select="substring('$Revision: 1.7 $', 12)"/> * Generated using adl2canonical.xslt <xsl:value-of select="substring('$Revision: 1.8 $', 12)"/>
* *
*************************************************************************** ***************************************************************************
</xsl:comment> </xsl:comment>
@ -118,7 +118,7 @@
<xsl:apply-templates select="adl:property[@name=$nkey]"/> <xsl:apply-templates select="adl:property[@name=$nkey]"/>
<xsl:apply-templates select="adl:key/adl:property"/> <xsl:apply-templates select="adl:key/adl:property"/>
</key> </key>
<xsl:apply-templates select="adl:property[not(@name=$nkey)] | adl:one-to-many | adl:many-to-many | adl:many-to-one"/> <xsl:apply-templates select="adl:prompt | adl:property[not(@name=$nkey)] | adl:one-to-many | adl:many-to-many | adl:many-to-one"/>
<xsl:variable name="entity" select="."/> <xsl:variable name="entity" select="."/>
<xsl:for-each select="//adl:group"> <xsl:for-each select="//adl:group">
@ -193,7 +193,7 @@
</documentation> </documentation>
</property> </property>
</key> </key>
<xsl:apply-templates select="adl:property | adl:one-to-many | adl:many-to-many | adl:many-to-one"/> <xsl:apply-templates select="adl:prompt | adl:property | adl:one-to-many | adl:many-to-many | adl:many-to-one"/>
<xsl:variable name="entity" select="."/> <xsl:variable name="entity" select="."/>
<xsl:for-each select="//adl:group"> <xsl:for-each select="//adl:group">

View file

@ -8,8 +8,8 @@
Transform ADL into C# entity classes Transform ADL into C# entity classes
$Author: sb $ $Author: sb $
$Revision: 1.20 $ $Revision: 1.21 $
$Date: 2009-04-28 13:44:51 $ $Date: 2009-04-30 17:04:00 $
--> -->
<!-- WARNING WARNING WARNING: Do NOT reformat this file! <!-- WARNING WARNING WARNING: Do NOT reformat this file!
@ -70,7 +70,7 @@
// (c)2007 Cygnet Solutions Ltd // (c)2007 Cygnet Solutions Ltd
// //
// Automatically generated from application description using // Automatically generated from application description using
// adl2entityclass.xsl revision <xsl:value-of select="substring( '$Revision: 1.20 $', 10)"/> // adl2entityclass.xsl revision <xsl:value-of select="substring( '$Revision: 1.21 $', 10)"/>
// //
// <xsl:value-of select="/adl:application/@revision"/> // <xsl:value-of select="/adl:application/@revision"/>
// //
@ -97,7 +97,7 @@
/// &lt;/summary&gt; /// &lt;/summary&gt;
/// &lt;remarks&gt; /// &lt;remarks&gt;
/// Automatically generated from description of group <xsl:value-of select="@name"/> /// Automatically generated from description of group <xsl:value-of select="@name"/>
/// using adl2entityclass.xsl revision <xsl:value-of select="substring( '$Revision: 1.20 $', 10)"/>. /// using adl2entityclass.xsl revision <xsl:value-of select="substring( '$Revision: 1.21 $', 10)"/>.
/// ///
/// DO NOT EDIT THIS FILE! /// DO NOT EDIT THIS FILE!
/// &lt;/remarks&gt; /// &lt;/remarks&gt;
@ -123,7 +123,7 @@
// (c)2007 Cygnet Solutions Ltd // (c)2007 Cygnet Solutions Ltd
// //
// Automatically generated from application description using // Automatically generated from application description using
// adl2entityclass.xsl revision <xsl:value-of select="substring( '$Revision: 1.20 $', 10)"/> // adl2entityclass.xsl revision <xsl:value-of select="substring( '$Revision: 1.21 $', 10)"/>
// //
// <xsl:value-of select="/adl:application/@revision"/> // <xsl:value-of select="/adl:application/@revision"/>
// //
@ -149,7 +149,7 @@
/// &lt;/summary&gt; /// &lt;/summary&gt;
/// &lt;remarks&gt; /// &lt;remarks&gt;
/// Automatically generated from description of entity <xsl:value-of select="@name"/> /// Automatically generated from description of entity <xsl:value-of select="@name"/>
/// using adl2entityclass.xsl revision <xsl:value-of select="substring( '$Revision: 1.20 $', 10)"/>. /// using adl2entityclass.xsl revision <xsl:value-of select="substring( '$Revision: 1.21 $', 10)"/>.
/// Note that manually maintained parts of this class may be defined in /// Note that manually maintained parts of this class may be defined in
/// a separate file called <xsl:value-of select="@name"/>.manual.cs, q.v. /// a separate file called <xsl:value-of select="@name"/>.manual.cs, q.v.
/// ///

View file

@ -15,8 +15,8 @@
Transform ADL into velocity view templates Transform ADL into velocity view templates
$Author: sb $ $Author: sb $
$Revision: 1.40 $ $Revision: 1.41 $
$Date: 2009-04-30 08:56:33 $ $Date: 2009-04-30 17:04:00 $
--> -->
<!-- WARNING WARNING WARNING: Do NOT reformat this file! <!-- WARNING WARNING WARNING: Do NOT reformat this file!
Whitespace (or lack of it) is significant! --> Whitespace (or lack of it) is significant! -->
@ -422,24 +422,16 @@
<table> <table>
<xsl:choose> <xsl:choose>
<xsl:when test="@properties='listed'"> <xsl:when test="@properties='listed'">
<xsl:apply-templates select="$form/adl:field|adl:auxlist|adl:verb"/> <xsl:apply-templates select="$form/adl:field|adl:auxlist"/>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:apply-templates select="$form/ancestor::adl:entity/adl:property"/> <xsl:apply-templates select="$form/ancestor::adl:entity/adl:property"/>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
</table>
<ul class="verbs">
<xsl:choose> <xsl:choose>
<xsl:when test="$authentication-layer='Database'"> <xsl:when test="$authentication-layer='Database'">
<xsl:variable name="savegroups">
<xsl:call-template name="entity-save-groups">
<xsl:with-param name="entity" select="$form/ancestor::adl:entity"/>
</xsl:call-template>
</xsl:variable>
<!-- NOTE! NOTE! NOTE! Whitespace is significant - any linefeeds inside the #if ( ) clause
cause the Velocity parser to break! -->
#if ( <xsl:for-each select="exsl:node-set( $savegroups)/*">${SecurityHelper.InGroup( "<xsl:value-of select="./@name"/>")} ||</xsl:for-each> false)
<xsl:call-template name="save-widget-row"/>
#end
<xsl:variable name="deletegroups"> <xsl:variable name="deletegroups">
<xsl:call-template name="entity-delete-groups"> <xsl:call-template name="entity-delete-groups">
<xsl:with-param name="entity" select="$form/ancestor::adl:entity"/> <xsl:with-param name="entity" select="$form/ancestor::adl:entity"/>
@ -450,13 +442,23 @@
#if ( <xsl:for-each select="exsl:node-set( $deletegroups)/*">${SecurityHelper.InGroup( "<xsl:value-of select="./@name"/>")} || </xsl:for-each> false) #if ( <xsl:for-each select="exsl:node-set( $deletegroups)/*">${SecurityHelper.InGroup( "<xsl:value-of select="./@name"/>")} || </xsl:for-each> false)
<xsl:call-template name="delete-widget-row"/> <xsl:call-template name="delete-widget-row"/>
#end #end
<xsl:variable name="savegroups">
<xsl:call-template name="entity-save-groups">
<xsl:with-param name="entity" select="$form/ancestor::adl:entity"/>
</xsl:call-template>
</xsl:variable>
<!-- NOTE! NOTE! NOTE! Whitespace is significant - any linefeeds inside the #if ( ) clause
cause the Velocity parser to break! -->
#if ( <xsl:for-each select="exsl:node-set( $savegroups)/*"> ${SecurityHelper.InGroup( "<xsl:value-of select="./@name"/>")} ||</xsl:for-each> false)
<xsl:call-template name="save-widget-row"/>
#end
</xsl:when> </xsl:when>
<xsl:when test="$authentication-layer='Application'"> <xsl:when test="$authentication-layer='Application'">
<xsl:call-template name="save-widget-row"/>
<xsl:call-template name="delete-widget-row"/> <xsl:call-template name="delete-widget-row"/>
<xsl:call-template name="save-widget-row"/>
</xsl:when> </xsl:when>
</xsl:choose> </xsl:choose>
</table> </ul>
</div> </div>
</form> </form>
</div> </div>
@ -464,38 +466,32 @@
<!-- output a complete table row containing a save widget --> <!-- output a complete table row containing a save widget -->
<xsl:template name="save-widget-row"> <xsl:template name="save-widget-row">
<tr class="actionSafe"> <li class="standard-verb actionSafe">
<td class="actionSafe" colspan="2"> <button type="submit" name="command" value="store">
<xsl:attribute name="title">
<xsl:call-template name='i18n-save-prompt'/> <xsl:call-template name='i18n-save-prompt'/>
</td> </xsl:attribute>
<td class="actionSafe" style="text-align:right"> Save
<button type="submit" name="command" value="store">Save this!</button> </button>
</td> </li>
</tr>
</xsl:template> </xsl:template>
<!-- output a complete table row containing a delete widget --> <!-- output a complete table row containing a delete widget -->
<xsl:template name="delete-widget-row"> <xsl:template name="delete-widget-row">
<tr align="left" valign="top" class="actionDangerous"> <li class="standard-verb actionDangerous">
<td class="actionDangerous" colspan="2">
#if ( $instance)
#if ( $instance.NoDeleteReason)
[ $instance.NoDeleteReason ]
#else
<xsl:call-template name="i18n-delete-prompt"/>
#end
#end
</td>
<td class="actionDangerous" style="text-align:right">
#if ( $instance) #if ( $instance)
#if ( $instance.NoDeleteReason) #if ( $instance.NoDeleteReason)
<button type="submit" disabled="disabled" title="$instance.NoDeleteReason" name="command" value="delete">Delete this!</button> <button type="submit" disabled="disabled" title="$instance.NoDeleteReason" name="command" value="delete">Delete this!</button>
#else #else
<button type="submit" name="command" value="delete">Delete this!</button> <button type="submit" name="command" value="delete">
<xsl:attribute name="title">
<xsl:call-template name="i18n-delete-prompt"/>
</xsl:attribute>
Delete this!
</button>
#end #end
#end #end
</td> </li>
</tr>
</xsl:template> </xsl:template>
<xsl:template match="adl:fieldgroup"> <xsl:template match="adl:fieldgroup">
@ -507,7 +503,6 @@
</xsl:call-template> </xsl:call-template>
</xsl:variable> </xsl:variable>
<!-- NOTE! NOTE! NOTE! Whitespace is significant - any linefeeds inside the #if ( ) clause cause the Velocity parser to break! --> <!-- NOTE! NOTE! NOTE! Whitespace is significant - any linefeeds inside the #if ( ) clause cause the Velocity parser to break! -->
<xsl:comment>If the user can't read the fieldgroup, don't output it at all.</xsl:comment>
#if ( <xsl:for-each select="exsl:node-set( $readgroups)/*"> ${SecurityHelper.InGroup( "<xsl:value-of select="./@name"/>")} ||</xsl:for-each> false) #if ( <xsl:for-each select="exsl:node-set( $readgroups)/*"> ${SecurityHelper.InGroup( "<xsl:value-of select="./@name"/>")} ||</xsl:for-each> false)
</xsl:if> </xsl:if>
@ -530,8 +525,13 @@
</xsl:call-template> </xsl:call-template>
</h3> </h3>
<table> <table>
<xsl:apply-templates select="adl:field|adl:verb|adl:auxlist"/> <xsl:apply-templates select="adl:field|adl:auxlist"/>
</table> </table>
<xsl:if test="adl:verb">
<ul class="verbs">
<xsl:apply-templates select="adl:verb"/>
</ul>
</xsl:if>
</div> </div>
<xsl:if test="$authentication-layer = 'Database'"> <xsl:if test="$authentication-layer = 'Database'">
#end #end
@ -629,31 +629,23 @@
<!-- don't emit a verb unless there is an instance for it to act on --> <!-- don't emit a verb unless there is an instance for it to act on -->
#if( $instance) #if( $instance)
#if( ! $instance.IsNew) #if( ! $instance.IsNew)
<tr> <ul>
<xsl:attribute name="class"> <xsl:attribute name="class">
<xsl:value-of select="$class"/> <xsl:value-of select="concat( 'custom-verb ', $class)"/>
</xsl:attribute>
<td colspan="2">
<xsl:attribute name="class">
<xsl:value-of select="$class"/>
</xsl:attribute>
<xsl:apply-templates select="adl:help[@locale = $locale]"/>
</td>
<td style="text-align:right">
<xsl:attribute name="class">
<xsl:value-of select="$class"/>
</xsl:attribute> </xsl:attribute>
<button name="command"> <button name="command">
<xsl:attribute name="value"> <xsl:attribute name="value">
<xsl:value-of select="@verb"/> <xsl:value-of select="@verb"/>
</xsl:attribute> </xsl:attribute>
<xsl:attribute name="title">
<xsl:apply-templates select="adl:help[@locale = $locale]"/>
</xsl:attribute>
<xsl:call-template name="showprompt"> <xsl:call-template name="showprompt">
<xsl:with-param name="node" select="."/> <xsl:with-param name="node" select="."/>
<xsl:with-param name="fallback" select="@verb"/> <xsl:with-param name="fallback" select="@verb"/>
</xsl:call-template> </xsl:call-template>
</button> </button>
</td> </ul>
</tr>
#end #end
#end #end
#end #end
@ -837,7 +829,6 @@
<xsl:if test="$authentication-layer = 'Database'"> <xsl:if test="$authentication-layer = 'Database'">
<xsl:choose> <xsl:choose>
<xsl:when test="exsl:node-set( $readgroups)/*"> <xsl:when test="exsl:node-set( $readgroups)/*">
<xsl:comment>if the user can't even read the field, don't output it at all.</xsl:comment>
#if ( <xsl:for-each select="exsl:node-set( $readgroups)/*">${SecurityHelper.InGroup( "<xsl:value-of select="./@name"/>")} || </xsl:for-each> false) #if ( <xsl:for-each select="exsl:node-set( $readgroups)/*">${SecurityHelper.InGroup( "<xsl:value-of select="./@name"/>")} || </xsl:for-each> false)
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
@ -1762,7 +1753,7 @@
Auto generated Velocity macro for <xsl:value-of select="@name"/>, Auto generated Velocity macro for <xsl:value-of select="@name"/>,
generated from ADL. generated from ADL.
Generated using adl2views.xslt <xsl:value-of select="substring( '$Revision: 1.40 $', 10)"/> Generated using adl2views.xslt <xsl:value-of select="substring( '$Revision: 1.41 $', 10)"/>
Generation parameters were: Generation parameters were:
area-name: <xsl:value-of select="$area-name"/> area-name: <xsl:value-of select="$area-name"/>
default-url: <xsl:value-of select="$default-url"/> default-url: <xsl:value-of select="$default-url"/>
@ -1810,6 +1801,7 @@
</xsl:for-each> </xsl:for-each>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
<xsl:variable name="current-entity" select="ancestor::adl:entity/@name"/>
<xsl:if test="$generate-site-navigation = 'true'"> <xsl:if test="$generate-site-navigation = 'true'">
<ul class="generatednav"> <ul class="generatednav">
<xsl:for-each select="//adl:entity[adl:list[@name='list']]"> <xsl:for-each select="//adl:entity[adl:list[@name='list']]">
@ -1821,7 +1813,13 @@
<xsl:if test="$authentication-layer = 'Database'"> <xsl:if test="$authentication-layer = 'Database'">
#if ( <xsl:for-each select="exsl:node-set( $readgroups)/*"> ${SecurityHelper.InGroup( "<xsl:value-of select="./@name"/>")} ||</xsl:for-each> false) #if ( <xsl:for-each select="exsl:node-set( $readgroups)/*"> ${SecurityHelper.InGroup( "<xsl:value-of select="./@name"/>")} ||</xsl:for-each> false)
</xsl:if> </xsl:if>
<li class="navigation"> <li>
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test="@name = $current-entity">selected-nav</xsl:when>
<xsl:otherwise>navigation</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<a> <a>
<xsl:attribute name="href"> <xsl:attribute name="href">
<xsl:choose> <xsl:choose>
@ -1843,10 +1841,13 @@
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
</xsl:attribute> </xsl:attribute>
<xsl:value-of select="@name"/> <xsl:call-template name="showprompt">
<xsl:with-param name="fallback" select="@name"/>
<xsl:with-param name="entity" select="."/>
</xsl:call-template>
</a> </a>
</li> </li>
<xsl:if test="$authentication-layer != 'Application'"> <xsl:if test="$authentication-layer = 'Database'">
#end #end
</xsl:if> </xsl:if>
</xsl:for-each> </xsl:for-each>