bug 2278 - fix results pagination in auth_finder
authorGalen Charlton <galen.charlton@liblime.com>
Thu, 26 Jun 2008 21:16:16 +0000 (16:16 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Thu, 26 Jun 2008 21:20:06 +0000 (16:20 -0500)
Fix same as for 2205 - the orderby parameter is
currently required for authority searches.

Also set default results per page to 20 instead of
19.

No documentation changes.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
authorities/auth_finder.pl
koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tmpl

index f68c18a..49bb0b5 100755 (executable)
@@ -63,7 +63,7 @@ if ( $op eq "do_search" ) {
     my $orderby   = $query->param('orderby');
 
     $resultsperpage = $query->param('resultsperpage');
-    $resultsperpage = 19 if ( !defined $resultsperpage );
+    $resultsperpage = 20 if ( !defined $resultsperpage );
 
     my ( $results, $total ) =
       SearchAuthorities( \@marclist, \@and_or, \@excluding, \@operator, \@value,
index e63e4b9..98c0938 100644 (file)
@@ -23,7 +23,7 @@ function jumpfull(page)
        <!-- TMPL_INCLUDE NAME="auth-finder-search.inc" -->
        <!-- TMPL_IF name="total" --><div id="resultnumber">
             <!-- TMPL_IF name="displayprev" -->
-                    <a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" --><!-- TMPL_LOOP name="searchdata"-->&amp;<!-- TMPL_VAR name="term" -->=<!-- TMPL_VAR name="val"--><!-- /TMPL_LOOP -->&amp;op=do_search&amp;type=intranet&amp;index=<!-- TMPL_VAR name="index" -->&amp;tagid=<!-- TMPL_VAR name="tagid" -->">
+                    <a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" --><!-- TMPL_LOOP name="searchdata"-->&amp;<!-- TMPL_VAR name="term" -->=<!-- TMPL_VAR name="val"--><!-- /TMPL_LOOP -->&amp;op=do_search&amp;type=intranet&amp;index=<!-- TMPL_VAR name="index" -->&amp;tagid=<!-- TMPL_VAR name="tagid" -->&amp;orderby=<!-- TMPL_VAR name="orderby" -->">
                         &lt;&lt;
                     </a>
                 <!-- /TMPL_IF -->
@@ -31,12 +31,12 @@ function jumpfull(page)
                     <!-- TMPL_IF name="highlight" -->
                         <!-- TMPL_VAR NAME="number" -->
                     <!-- TMPL_ELSE -->
-                        <a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfrom" -->&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" --><!-- TMPL_LOOP name="searchdata"-->&amp;<!-- TMPL_VAR name="term" -->=<!-- TMPL_VAR name="val"--><!-- /TMPL_LOOP -->&amp;op=do_search&amp;type=intranet&amp;index=<!-- TMPL_VAR name="index" -->&amp;tagid=<!-- TMPL_VAR name="tagid" -->">
+                        <a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfrom" -->&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" --><!-- TMPL_LOOP name="searchdata"-->&amp;<!-- TMPL_VAR name="term" -->=<!-- TMPL_VAR name="val"--><!-- /TMPL_LOOP -->&amp;op=do_search&amp;type=intranet&amp;index=<!-- TMPL_VAR name="index" -->&amp;tagid=<!-- TMPL_VAR name="tagid" -->>&amp;orderby=<!-- TMPL_VAR name="orderby" -->">
                             <!-- TMPL_VAR NAME="number" --></a>
                     <!-- /TMPL_IF -->
                 <!-- /TMPL_LOOP -->
                 <!-- TMPL_IF name="displaynext" -->
-                    <a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" --><!-- TMPL_LOOP name="searchdata"-->&amp;<!-- TMPL_VAR name="term" -->=<!-- TMPL_VAR name="val"--><!-- /TMPL_LOOP -->&amp;op=do_search&amp;type=intranet&amp;index=<!-- TMPL_VAR name="index" -->&amp;tagid=<!-- TMPL_VAR name="tagid" -->">
+                    <a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" --><!-- TMPL_LOOP name="searchdata"-->&amp;<!-- TMPL_VAR name="term" -->=<!-- TMPL_VAR name="val"--><!-- /TMPL_LOOP -->&amp;op=do_search&amp;type=intranet&amp;index=<!-- TMPL_VAR name="index" -->&amp;tagid=<!-- TMPL_VAR name="tagid" -->>&amp;orderby=<!-- TMPL_VAR name="orderby" -->">
                         &gt;&gt;</a>
                 <!-- /TMPL_IF -->
             <div>
@@ -76,7 +76,7 @@ function jumpfull(page)
         </div>
         <div id="resultnumber">
             <!-- TMPL_IF name="displayprev" -->
-                    <a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" --><!-- TMPL_LOOP name="searchdata"-->&amp;<!-- TMPL_VAR name="term" -->=<!-- TMPL_VAR name="val"--><!-- /TMPL_LOOP -->&amp;op=do_search&amp;type=intranetamp;&amp;index=<!-- TMPL_VAR name="index" -->&amp;tagid=<!-- TMPL_VAR name="tagid" -->">
+                    <a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" --><!-- TMPL_LOOP name="searchdata"-->&amp;<!-- TMPL_VAR name="term" -->=<!-- TMPL_VAR name="val"--><!-- /TMPL_LOOP -->&amp;op=do_search&amp;type=intranetamp;&amp;index=<!-- TMPL_VAR name="index" -->&amp;tagid=<!-- TMPL_VAR name="tagid" -->>&amp;orderby=<!-- TMPL_VAR name="orderby" -->">
                         &lt;&lt;
                     </a>
                 <!-- /TMPL_IF -->
@@ -84,12 +84,12 @@ function jumpfull(page)
                     <!-- TMPL_IF name="highlight" -->
                         <!-- TMPL_VAR NAME="number" -->
                     <!-- TMPL_ELSE -->
-                        <a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfrom" -->&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" --><!-- TMPL_LOOP name="searchdata"-->&amp;<!-- TMPL_VAR name="term" -->=<!-- TMPL_VAR name="val"--><!-- /TMPL_LOOP -->&amp;op=do_search&amp;type=intranet&amp;index=<!-- TMPL_VAR name="index" -->&amp;tagid=<!-- TMPL_VAR name="tagid" -->">
+                        <a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfrom" -->&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" --><!-- TMPL_LOOP name="searchdata"-->&amp;<!-- TMPL_VAR name="term" -->=<!-- TMPL_VAR name="val"--><!-- /TMPL_LOOP -->&amp;op=do_search&amp;type=intranet&amp;index=<!-- TMPL_VAR name="index" -->&amp;tagid=<!-- TMPL_VAR name="tagid" -->>&amp;orderby=<!-- TMPL_VAR name="orderby" -->">
                             <!-- TMPL_VAR NAME="number" --></a>
                     <!-- /TMPL_IF -->
                 <!-- /TMPL_LOOP -->
                 <!-- TMPL_IF name="displaynext" -->
-                    <a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" --><!-- TMPL_LOOP name="searchdata"-->&<!-- TMPL_VAR name="term" -->=<!-- TMPL_VAR name="val"--><!-- /TMPL_LOOP -->&amp;op=do_search&amp;type=intranet&amp;index=<!-- TMPL_VAR name="index" -->&amp;tagid=<!-- TMPL_VAR name="tagid" -->">
+                    <a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" --><!-- TMPL_LOOP name="searchdata"-->&<!-- TMPL_VAR name="term" -->=<!-- TMPL_VAR name="val"--><!-- /TMPL_LOOP -->&amp;op=do_search&amp;type=intranet&amp;index=<!-- TMPL_VAR name="index" -->&amp;tagid=<!-- TMPL_VAR name="tagid" -->>&amp;orderby=<!-- TMPL_VAR name="orderby" -->">
                         &gt;&gt;</a>
                 <!-- /TMPL_IF -->
         </div><!-- /TMPL_IF -->