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
|
@ -9,8 +9,8 @@
|
||||||
Transform ADL into (partial) controller classes
|
Transform ADL into (partial) controller classes
|
||||||
|
|
||||||
$Author: sb $
|
$Author: sb $
|
||||||
$Revision: 1.41 $
|
$Revision: 1.42 $
|
||||||
$Date: 2009-05-11 15:01:49 $
|
$Date: 2009-05-12 14:29:12 $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- WARNING WARNING WARNING: Do NOT reformat this file!
|
<!-- WARNING WARNING WARNING: Do NOT reformat this file!
|
||||||
|
@ -72,7 +72,7 @@
|
||||||
//
|
//
|
||||||
// Automatically generated abstract super class for controllers for the
|
// Automatically generated abstract super class for controllers for the
|
||||||
// <xsl:value-of select="/adl:application/@name"/> application; generated using
|
// <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"/>
|
// <xsl:value-of select="/adl:application/@revision"/>
|
||||||
//
|
//
|
||||||
|
@ -182,7 +182,7 @@
|
||||||
//
|
//
|
||||||
// Controller for auto-generated forms for editing <xsl:value-of select="@name"/>s
|
// Controller for auto-generated forms for editing <xsl:value-of select="@name"/>s
|
||||||
// Automatically generated from application description using
|
// 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.
|
// 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)"/>>();
|
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 */
|
/* 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) {
|
if ( ! withSearchCriteria) {
|
||||||
showRecords = <xsl:value-of select="$records-per-page"/>;
|
showRecords = <xsl:value-of select="$records-per-page"/>;
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
Transform ADL into velocity view templates
|
Transform ADL into velocity view templates
|
||||||
|
|
||||||
$Author: sb $
|
$Author: sb $
|
||||||
$Revision: 1.58 $
|
$Revision: 1.59 $
|
||||||
$Date: 2009-05-11 15:01:49 $
|
$Date: 2009-05-12 14:29:12 $
|
||||||
-->
|
-->
|
||||||
<!-- 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! -->
|
||||||
|
@ -178,8 +178,9 @@
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!-- the guts of the maybe-delete form, whether or not we're using an empty layout -->
|
<!-- the guts of the maybe-delete form, whether or not we're using an empty layout -->
|
||||||
<xsl:template name="maybe-delete">
|
<xsl:template name="maybe-delete">
|
||||||
<xsl:param name="entity"/>
|
<xsl:param name="entity"/>
|
||||||
|
<div class="content">
|
||||||
<form action="delete.rails" method="post">
|
<form action="delete.rails" method="post">
|
||||||
<xsl:for-each select="$entity/adl:key/adl:property">
|
<xsl:for-each select="$entity/adl:key/adl:property">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
|
@ -210,16 +211,16 @@
|
||||||
<table>
|
<table>
|
||||||
<tr align="left" valign="top" class="actionDangerous">
|
<tr align="left" valign="top" class="actionDangerous">
|
||||||
<td class="actionDangerous">
|
<td class="actionDangerous">
|
||||||
<xsl:call-template name="i18n-really-delete"/>
|
<xsl:call-template name="i18n-really-delete"/>
|
||||||
</td>
|
</td>
|
||||||
<td class="widget">
|
<td class="widget">
|
||||||
<select name="reallydelete">
|
<select name="reallydelete">
|
||||||
<option value="false">
|
<option value="false">
|
||||||
<xsl:call-template name="i18n-really-delete-no"/>
|
<xsl:call-template name="i18n-really-delete-no"/>
|
||||||
</option>
|
</option>
|
||||||
<option value="true">
|
<option value="true">
|
||||||
<xsl:call-template name="i18n-really-delete-yes"/>
|
<xsl:call-template name="i18n-really-delete-yes"/>
|
||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
<td class="actionDangerous" style="text-align:right">
|
<td class="actionDangerous" style="text-align:right">
|
||||||
|
@ -228,7 +229,8 @@
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
</xsl:template>
|
</div>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
<!-- layout of forms -->
|
<!-- layout of forms -->
|
||||||
<xsl:template match="adl:form" mode="non-empty-layout">
|
<xsl:template match="adl:form" mode="non-empty-layout">
|
||||||
|
@ -1820,7 +1822,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.58 $', 10)"/>
|
Generated using adl2views.xslt <xsl:value-of select="substring( '$Revision: 1.59 $', 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"/>
|
||||||
|
|
Loading…
Reference in a new issue