fix for #577
authortipaul <tipaul>
Tue, 21 Oct 2003 15:47:06 +0000 (15:47 +0000)
committertipaul <tipaul>
Tue, 21 Oct 2003 15:47:06 +0000 (15:47 +0000)
admin/authorised_values.pl
admin/marctagstructure.pl
koha-tmpl/intranet-tmpl/default/en/parameters/authorised_values.tmpl
koha-tmpl/intranet-tmpl/default/en/parameters/marctagstructure.tmpl
koha-tmpl/intranet-tmpl/default/fr/parameters/authorised_values.tmpl
koha-tmpl/intranet-tmpl/default/fr/parameters/marctagstructure.tmpl

index 16f9fff..5e78c66 100755 (executable)
@@ -65,7 +65,7 @@ my ($template, $borrowernumber, $cookie)
                             flagsrequired => {parameters => 1},
                             debug => 1,
                             });
-my $pagesize=20;
+my $pagesize=5;
 my $op = $input->param('op');
 
 if ($op) {
@@ -187,13 +187,18 @@ if ($op eq 'add_form') {
 
        if ($offset>0) {
                my $prevpage = $offset-$pagesize;
-               $template->param(previous => "<a href=\"$script_name?offset=$prevpage&searchfield=$searchfield\">");
+               $template->param(isprevpage => $offset,
+                                               prevpage=> $prevpage,
+                                               searchfield => $searchfield,
+                                               script_name => $script_name,
+                );
        }
        if ($offset+$pagesize<$count) {
                my $nextpage =$offset+$pagesize;
-               $template->param(next => "<a href=\"$script_name?offset=$nextpage&searchfield=$searchfield\">");
-
-
+               $template->param(nextpage =>$nextpage,
+                                               searchfield => $searchfield,
+                                               script_name => $script_name,
+               );
        }
 } #---- END $OP eq DEFAULT
 
index 0af03e8..5f25f80 100755 (executable)
@@ -192,11 +192,18 @@ if ($op eq 'add_form') {
        $template->param(loop => \@loop_data);
        if ($offset>0) {
                my $prevpage = $offset-$pagesize;
-               $template->param(previous => "<a href=\"$script_name?offset=".$prevpage.'">');
+               $template->param(isprevpage => $offset,
+                                               prevpage=> $prevpage,
+                                               searchfield => $searchfield,
+                                               script_name => $script_name,
+                );
        }
        if ($offset+$pagesize<$count) {
                my $nextpage =$offset+$pagesize;
-               $template->param(next => "<a href=\"$script_name?offset=".$nextpage.'">');
+               $template->param(nextpage =>$nextpage,
+                                               searchfield => $searchfield,
+                                               script_name => $script_name,
+               );
        }
 } #---- END $OP eq DEFAULT
 
index 28ee361..6a08ff4 100644 (file)
@@ -75,17 +75,23 @@ the subfield is not entered through a free field, but though a list of authorise
 <form action='<TMPL_VAR name="script_name">' method=post>
 <input type=hidden name=op value=add_form>
 </table>
-<table width=40%>
-       <tr>
-               <td width=50%><TMPL_VAR name="previous"></td>
-               <td width=50%><TMPL_VAR name="next"></td>
-       </tr>
-</table>
 
 <table width=40%>
        <tr>
-               <td width=50%><TMPL_IF name="previous"><TMPL_VAR name="previous"><input type=image src="<TMPL_VAR name="interface">/<TMPL_VAR name="theme">/images/1leftarrow.png" title="previous" ALT="previous" BORDER=0></a></TMPL_IF></td>
-               <td width=50%><TMPL_IF name="next"><TMPL_VAR name="next"><input type=image src="<TMPL_VAR name="interface">/<TMPL_VAR name="theme">/images/1rightarrow.png" title="next" ALT="next" BORDER=0></a></TMPL_IF></td>
+               <td width=50%>
+                       <TMPL_IF name="isprevpage">
+                               <a href="<TMPL_VAR name="script_name">?offset=<TMPL_VAR name="prevpage">&searchfield=<TMPL_VAR name="searchfield">">
+                               <input type=image src="<TMPL_VAR name="interface">/<TMPL_VAR name="theme">/images/1leftarrow.png" title="previous" ALT="previous" BORDER=0>
+                               </a>
+                       </TMPL_IF>
+               </td>
+               <td width=50%>
+                       <TMPL_IF name="nextpage">
+                               <a href="<TMPL_VAR name="script_name">?offset=<TMPL_VAR name="nextpage">&searchfield=<TMPL_VAR name="searchfield">">
+                                       <input type=image src="<TMPL_VAR name="interface">/<TMPL_VAR name="theme">/images/1rightarrow.png" title="next" ALT="next" BORDER=0>
+                               </a>
+                       </TMPL_IF>
+               </td>
        </tr>
 </table>
 <form action='<TMPL_VAR name="script_name">' method=post>
index 4f2532e..c5fcdc4 100644 (file)
                <td width="33%">
                        <input type=submit class="button" value="Add Tag" title="Add Tag" alt="Add Tag" >
                </td>
-               <td width=33%><TMPL_IF name="previous"><TMPL_VAR name="previous"><input type=image src="<TMPL_VAR name="interface">/<TMPL_VAR name="theme">/images/1leftarrow.png" title="previous" ALT="previous" BORDER=0></a></TMPL_IF></td>
-               <td width=33%><TMPL_IF name="next"><TMPL_VAR name="next"><input type=image src="<TMPL_VAR name="interface">/<TMPL_VAR name="theme">/images/1rightarrow.png" title="next" ALT="next" BORDER=0></a></TMPL_IF></td>
+               <td width=33%>
+                       <TMPL_IF name="isprevpage">
+                               <a href="<TMPL_VAR name="script_name">?offset=<TMPL_VAR name="prevpage">&searchfield=<TMPL_VAR name="searchfield">">
+                               <input type=image src="<TMPL_VAR name="interface">/<TMPL_VAR name="theme">/images/1leftarrow.png" title="previous" ALT="previous" BORDER=0>
+                               </a>
+                       </TMPL_IF>
+               </td>
+               <td width=33%>
+                       <TMPL_IF name="nextpage">
+                               <a href="<TMPL_VAR name="script_name">?offset=<TMPL_VAR name="nextpage">&searchfield=<TMPL_VAR name="searchfield">">
+                                       <input type=image src="<TMPL_VAR name="interface">/<TMPL_VAR name="theme">/images/1rightarrow.png" title="next" ALT="next" BORDER=0>
+                               </a>
+                       </TMPL_IF>
+               </td>
        </tr>
 </table>
 </form>
index b28a5ae..1764a31 100644 (file)
@@ -80,17 +80,23 @@ n'est pas renseign
 <form action='<TMPL_VAR name="script_name">' method=post>
 <input type=hidden name=op value=add_form>
 </form></table>
-<table width=40%>
-       <tr>
-               <td width=50%><TMPL_VAR name="previous"></td>
-               <td width=50%><TMPL_VAR name="next"></td>
-       </tr>
-</table>
 
 <table width=40%>
        <tr>
-               <td width=50%><TMPL_IF name="previous"><TMPL_VAR name="previous"><input type=image src="<TMPL_VAR name="interface">/<TMPL_VAR name="theme">/images/1leftarrow.png" title="previous" ALT="previous" BORDER=0></a></TMPL_IF></td>
-               <td width=50%><TMPL_IF name="next"><TMPL_VAR name="next"><input type=image src="<TMPL_VAR name="interface">/<TMPL_VAR name="theme">/images/1rightarrow.png" title="next" ALT="next" BORDER=0></a></TMPL_IF></td>
+               <td width=50%>
+                       <TMPL_IF name="isprevpage">
+                               <a href="<TMPL_VAR name="script_name">?offset=<TMPL_VAR name="prevpage">&searchfield=<TMPL_VAR name="searchfield">">
+                               <input type=image src="<TMPL_VAR name="interface">/<TMPL_VAR name="theme">/images/1leftarrow.png" title="previous" ALT="previous" BORDER=0>
+                               </a>
+                       </TMPL_IF>
+               </td>
+               <td width=50%>
+                       <TMPL_IF name="nextpage">
+                               <a href="<TMPL_VAR name="script_name">?offset=<TMPL_VAR name="nextpage">&searchfield=<TMPL_VAR name="searchfield">">
+                                       <input type=image src="<TMPL_VAR name="interface">/<TMPL_VAR name="theme">/images/1rightarrow.png" title="next" ALT="next" BORDER=0>
+                               </a>
+                       </TMPL_IF>
+               </td>
        </tr>
 </table>
 
index fdf8b2b..6e95e6d 100644 (file)
                <td width="33%">
                        <input type=image src="<TMPL_VAR name="interface">/<TMPL_VAR name="theme">/images/filenew.png" title="Ajouter" ALT="Add" BORDER=0 >
                </td>
-               <td width=33%><TMPL_IF name="previous"><TMPL_VAR name="previous"><input type=image src="<TMPL_VAR name="interface">/<TMPL_VAR name="theme">/images/1leftarrow.png" title="Prec" ALT="Prec" BORDER=0 ></a></TMPL_IF></td>
-               <td width=33%><TMPL_IF name="next"><TMPL_VAR name="next"><input type=image src="<TMPL_VAR name="interface">/<TMPL_VAR name="theme">/images/1rightarrow.png" title="Suivant" ALT="Suivant" BORDER=0></a></TMPL_IF></td>
+               <td width=33%>
+                       <TMPL_IF name="isprevpage">
+                               <a href="<TMPL_VAR name="script_name">?offset=<TMPL_VAR name="prevpage">&searchfield=<TMPL_VAR name="searchfield">">
+                               <input type=image src="<TMPL_VAR name="interface">/<TMPL_VAR name="theme">/images/1leftarrow.png" title="previous" ALT="previous" BORDER=0>
+                               </a>
+                       </TMPL_IF>
+               </td>
+               <td width=33%>
+                       <TMPL_IF name="nextpage">
+                               <a href="<TMPL_VAR name="script_name">?offset=<TMPL_VAR name="nextpage">&searchfield=<TMPL_VAR name="searchfield">">
+                                       <input type=image src="<TMPL_VAR name="interface">/<TMPL_VAR name="theme">/images/1rightarrow.png" title="next" ALT="next" BORDER=0>
+                               </a>
+                       </TMPL_IF>
+               </td>
        </tr>
 </table>
 </form>