bug 2921 : The earlier change to diable paging on search results resulted in a division by zero error when there were no search results. Now fixed.
This commit is contained in:
parent
ba7e48348a
commit
9fac74f803
transforms
|
@ -9,8 +9,8 @@
|
|||
Transform ADL into (partial) controller classes
|
||||
|
||||
$Author: sb $
|
||||
$Revision: 1.41 $
|
||||
$Date: 2009-05-11 15:01:49 $
|
||||
$Revision: 1.42 $
|
||||
$Date: 2009-05-12 14:29:12 $
|
||||
-->
|
||||
|
||||
<!-- WARNING WARNING WARNING: Do NOT reformat this file!
|
||||
|
@ -72,7 +72,7 @@
|
|||
//
|
||||
// Automatically generated abstract super class for controllers for the
|
||||
// <xsl:value-of select="/adl:application/@name"/> application; generated using
|
||||
// adl2controllerclasses.xslt version <xsl:value-of select="substring( '$Revision: 1.41 $', 10)"/>
|
||||
// adl2controllerclasses.xslt version <xsl:value-of select="substring( '$Revision: 1.42 $', 10)"/>
|
||||
//
|
||||
// <xsl:value-of select="/adl:application/@revision"/>
|
||||
//
|
||||
|
@ -182,7 +182,7 @@
|
|||
//
|
||||
// Controller for auto-generated forms for editing <xsl:value-of select="@name"/>s
|
||||
// Automatically generated from application description using
|
||||
// adl2controllerclasses.xslt version <xsl:value-of select="substring( '$Revision: 1.41 $', 10)"/>
|
||||
// adl2controllerclasses.xslt version <xsl:value-of select="substring( '$Revision: 1.42 $', 10)"/>
|
||||
//
|
||||
// This file is automatically generated; DO NOT EDIT IT.
|
||||
//
|
||||
|
@ -772,7 +772,8 @@
|
|||
IList<<xsl:value-of select="concat( $entityns, '.', @name)"/>> instances = search.List<<xsl:value-of select="concat( $entityns, '.', @name)"/>>();
|
||||
|
||||
/* bug 2921: suppress pagination when searching, as we can't fold the search params into the pagination */
|
||||
int showRecords = instances.Count;
|
||||
/* if no instances, set showRecords to one else we get a division by zero error */
|
||||
int showRecords = instances.Count > 0? instances.Count: 1;
|
||||
|
||||
if ( ! withSearchCriteria) {
|
||||
showRecords = <xsl:value-of select="$records-per-page"/>;
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
Transform ADL into velocity view templates
|
||||
|
||||
$Author: sb $
|
||||
$Revision: 1.58 $
|
||||
$Date: 2009-05-11 15:01:49 $
|
||||
$Revision: 1.59 $
|
||||
$Date: 2009-05-12 14:29:12 $
|
||||
-->
|
||||
<!-- WARNING WARNING WARNING: Do NOT reformat this file!
|
||||
Whitespace (or lack of it) is significant! -->
|
||||
|
@ -178,8 +178,9 @@
|
|||
</xsl:template>
|
||||
|
||||
<!-- the guts of the maybe-delete form, whether or not we're using an empty layout -->
|
||||
<xsl:template name="maybe-delete">
|
||||
<xsl:param name="entity"/>
|
||||
<xsl:template name="maybe-delete">
|
||||
<xsl:param name="entity"/>
|
||||
<div class="content">
|
||||
<form action="delete.rails" method="post">
|
||||
<xsl:for-each select="$entity/adl:key/adl:property">
|
||||
<xsl:choose>
|
||||
|
@ -210,16 +211,16 @@
|
|||
<table>
|
||||
<tr align="left" valign="top" class="actionDangerous">
|
||||
<td class="actionDangerous">
|
||||
<xsl:call-template name="i18n-really-delete"/>
|
||||
</td>
|
||||
<xsl:call-template name="i18n-really-delete"/>
|
||||
</td>
|
||||
<td class="widget">
|
||||
<select name="reallydelete">
|
||||
<option value="false">
|
||||
<xsl:call-template name="i18n-really-delete-no"/>
|
||||
</option>
|
||||
<xsl:call-template name="i18n-really-delete-no"/>
|
||||
</option>
|
||||
<option value="true">
|
||||
<xsl:call-template name="i18n-really-delete-yes"/>
|
||||
</option>
|
||||
<xsl:call-template name="i18n-really-delete-yes"/>
|
||||
</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="actionDangerous" style="text-align:right">
|
||||
|
@ -228,7 +229,8 @@
|
|||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</xsl:template>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<!-- layout of forms -->
|
||||
<xsl:template match="adl:form" mode="non-empty-layout">
|
||||
|
@ -1820,7 +1822,7 @@
|
|||
Auto generated Velocity macro for <xsl:value-of select="@name"/>,
|
||||
generated from ADL.
|
||||
|
||||
Generated using adl2views.xslt <xsl:value-of select="substring( '$Revision: 1.58 $', 10)"/>
|
||||
Generated using adl2views.xslt <xsl:value-of select="substring( '$Revision: 1.59 $', 10)"/>
|
||||
Generation parameters were:
|
||||
area-name: <xsl:value-of select="$area-name"/>
|
||||
default-url: <xsl:value-of select="$default-url"/>
|
||||
|
|
Loading…
Reference in a new issue