BUG FIXING : 210$c is now searching EDITORS
authorHenri-Damien LAURENT <henridamien@koha-fr.org>
Fri, 5 Oct 2007 07:50:08 +0000 (02:50 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Sat, 6 Oct 2007 00:38:15 +0000 (19:38 -0500)
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
cataloguing/value_builder/unimarc_field_210c.pl
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_210c.tmpl

index ec318fa..6230b5b 100755 (executable)
@@ -172,7 +172,7 @@ my ($input) = @_;
         # builds tag and subfield arrays
         my @tags;
     
-        my ($results,$total) = authoritysearch($dbh, \@tags,\@and_or,
+        my ($results,$total) = SearchAuthorities( \@tags,\@and_or,
                                             \@excluding, \@operator, \@value,
                                             $startfrom*$resultsperpage, $resultsperpage,$authtypecode);# $orderby);
     
@@ -215,14 +215,13 @@ my ($input) = @_;
             $to = (($startfrom+1)*$resultsperpage);
         }
         $template->param(result => $results) if $results;
-        $template->param(index => $query->param('index'));
+        $template->param('index' => $query->param('index'));
         $template->param(startfrom=> $startfrom,
                                 displaynext=> $displaynext,
                                 displayprev=> $displayprev,
                                 resultsperpage => $resultsperpage,
                                 startfromnext => $startfrom+1,
                                 startfromprev => $startfrom-1,
-                                index => $index,
                                 total=>$total,
                                 from=>$from,
                                 to=>$to,
index 25eec12..0527708 100644 (file)
@@ -5,7 +5,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     <h1 class="authority">Authority search results</h1>
     <div id="bloc25">
-        <form name="f" method="post" action="cataloguing/plugin_launcher.pl">
+        <form name="f" method="post" action="plugin_launcher.pl">
             <input type="hidden" name="plugin_name" value="unimarc_field_210c.pl">
             <input type="hidden" name="op" value="do_search">
             <input type="hidden" name="type" value="intranet">
                 </p>
                 <p>
                     <label class="label100">Search value</label><input type="text" name="value" value="<!-- TMPL_VAR name="resultstring" -->">
+                    <input type="hidden" name="index" value="<!--TMPL_VAR Name="index"-->">
                     <input type="hidden" name="authtypecode" value="EDITORS">
-                    <input type="hidden" name="marclist" value="">
-                    <input type="hidden" name="and_or" value="and">
-                    <input type="hidden" name="excluding" value="">
-                    <input type="hidden" name="operator" value="contains">
-                    <input type="hidden" name="index" value="<!-- TMPL_VAR NAME="index" -->">
+                    <input type="hidden" name="q" value="<!-- TMPL_VAR NAME="index" -->">
                 </p>
                 <p>
                 <input type="submit" value="Start search" class="button authority">
@@ -44,7 +41,7 @@
                         <img src="/intranet-tmpl/default/images/numbers/<!-- TMPL_VAR NAME="number" -->-highlight.gif">
                     <!-- TMPL_ELSE -->
                         <a href="cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_210c.pl&amp;startfrom=<!-- TMPL_VAR NAME="startfrom" -->&amp;authtypecode=EDITORS&and_or=and&operator=contains&value=<!-- TMPL_VAR NAME="resultstring" -->&op=do_search&type=intranet&index=<!-- TMPL_VAR name="index" -->">
-                            <img src="/intranet-tmpl/default/images/numbers/<!-- TMPL_VAR NAME="number" -->.gif" border="0"></a>
+                            <img  src="/intranet-tmpl/default/images/numbers/<!-- TMPL_VAR NAME="number" -->.gif" border="0"></a>
                     <!-- /TMPL_IF -->
                 <!-- /TMPL_LOOP -->
                 <!-- TMPL_IF name="displaynext" -->
@@ -72,7 +69,7 @@
                         <td><!-- TMPL_VAR NAME="summary" --></td>
                         <td><!-- TMPL_VAR NAME="used" --> times</td>
                         <td>
-                            <a href='javascript:report(<!-- TMPL_VAR NAME="index" -->,"<!-- TMPL_VAR name="summary" -->")'><img src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/arrow.gif" width="32" hspace="0" vspace="0" border="0"></a>
+                            <a href="javascript:report('<!-- TMPL_VAR NAME="index" -->','<!-- TMPL_VAR name="summary" ESCAPE=JS -->')"><img alt="choose" src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/arrow.gif" width="32" hspace="0" vspace="0" border="0"></a>
                         </td>
                     </tr>
                 <!-- /TMPL_LOOP -->
@@ -110,7 +107,7 @@ function report(index,summary)
     var regexp= /(\d* -+ *)(.*)/;
     var result=summary.match(regexp);
     var doc   = opener.document; 
-    var field = doc.getElementById("<!-- TMPL_VAR NAME='index'-->");
+    var field = doc.getElementById(index);
 
     field.value = result[2];
     self.close();