[Koha-cvs] koha C4/AuthoritiesMarc.pm C4/Biblioadd.pm C4/S... [rel_TG]

Tumer Garip tgarip at neu.edu.tr
Fri Mar 30 02:14:43 CEST 2007


CVSROOT:	/sources/koha
Module name:	koha
Branch:		rel_TG
Changes by:	Tumer Garip <tgarip1957>	07/03/30 00:14:42

Modified files:
	C4             : AuthoritiesMarc.pm Biblioadd.pm Search.pm 
	authorities    : auth_finder.pl auth_linker.pl 
	                 authorities-home.pl authorities.pl 
	                 blinddetail-linker.pl 
	koha-tmpl/intranet-tmpl/default/en/authorities: auth_finder.tmpl 
	                                                auth_linker.tmpl 
	                                                authorities-home.tmpl 
	                                                authorities.tmpl 
	                                                blinddetail-linker.tmpl 
	                                                linkresultlist-auth.tmpl 
	                                                searchresultlist-auth.tmpl 
	                                                searchresultlist.tmpl 

Log message:
	Authorities cleaned to use the Search.pm API

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/AuthoritiesMarc.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.37.2.4&r2=1.37.2.5
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Biblioadd.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.1.2.2&r2=1.1.2.3
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Search.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.126.2.2&r2=1.126.2.3
http://cvs.savannah.gnu.org/viewcvs/koha/authorities/auth_finder.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.12.2.2&r2=1.12.2.3
http://cvs.savannah.gnu.org/viewcvs/koha/authorities/auth_linker.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2.2.2&r2=1.2.2.3
http://cvs.savannah.gnu.org/viewcvs/koha/authorities/authorities-home.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.15.2.2&r2=1.15.2.3
http://cvs.savannah.gnu.org/viewcvs/koha/authorities/authorities.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.18.2.4&r2=1.18.2.5
http://cvs.savannah.gnu.org/viewcvs/koha/authorities/blinddetail-linker.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3.2.2&r2=1.3.2.3
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/authorities/auth_finder.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.10.2.1&r2=1.10.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/authorities/auth_linker.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1.2.1&r2=1.1.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/authorities/authorities-home.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.7.2.1&r2=1.7.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/authorities/authorities.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.12.2.1&r2=1.12.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/authorities/blinddetail-linker.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1.2.1&r2=1.1.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/authorities/linkresultlist-auth.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1.2.1&r2=1.1.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/authorities/searchresultlist-auth.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.10.2.1&r2=1.10.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/authorities/searchresultlist.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.11.2.1&r2=1.11.2.2

Patches:
Index: C4/AuthoritiesMarc.pm
===================================================================
RCS file: /sources/koha/koha/C4/AuthoritiesMarc.pm,v
retrieving revision 1.37.2.4
retrieving revision 1.37.2.5
diff -u -b -r1.37.2.4 -r1.37.2.5
--- C4/AuthoritiesMarc.pm	28 Mar 2007 20:25:10 -0000	1.37.2.4
+++ C4/AuthoritiesMarc.pm	30 Mar 2007 00:14:42 -0000	1.37.2.5
@@ -20,9 +20,8 @@
 require Exporter;
 use C4::Context;
 use C4::Koha;
-use Encode;
 use C4::Biblio;
-
+use C4::Search;
 use vars qw($VERSION @ISA @EXPORT);
 
 # set the version for version checking
@@ -51,6 +50,8 @@
 	&ZEBRAdelauthority
 	&ZEBRA_readyauthority
  );
+##declare dbh globally;
+my $dbh=C4::Context->dbh;
 
 sub AUTHfind_marc_from_kohafield {
     my ( $dbh, $kohafield,$authtypecode ) = @_;
@@ -64,104 +65,19 @@
 }
 sub authoritysearch {
 ## This routine requires rewrite--TG
-	my ($dbh, $tags, $operator, $value, $offset,$length,$authtypecode,$dictionary) = @_;
+	my ($kohafields, $relation, $value,$and_or, $startfrom, $number_of_results,$authtypecode,$dictionary) = @_;
 ###Dictionary flag used to set what to show in summary;
-	my $query;
-	my $attr;
-	my $server;
-	my $mainentrytag;
-	##first set the authtype search and may be multiple authorities( linked authorities)
-	my $n=0;
-	my @authtypecode;
-				my @auths=split / /,$authtypecode ;
-				my ($attrfield)=MARCfind_attr_from_kohafield("authtypecode");
-				foreach my  $auth (@auths){
-				$query .=$attrfield." ".$auth." "; ##No truncation on authtype
-				push @authtypecode ,$auth;
-				$n++;
-				}
-			if ($n>1){
-			 $query= "\@or ".$query;
-			}
-	
-	my $dosearch;
-	my $and;
-	my $q2;
-	for(my $i = 0 ; $i <= $#{$value} ; $i++)
-	{
-
-	if (@$value[$i]){
-	##If mainentry search $a tag
-		if (@$tags[$i] eq "mainentry") {
-		 ($attr)=MARCfind_attr_from_kohafield("mainentry")." ";		
-		}else{
-		($attr) =MARCfind_attr_from_kohafield("allentry")." ";
-		}
-		if (@$operator[$i] eq 'phrase') {
-			 $attr.="  \@attr 4=1  \@attr 5=100  \@attr 6=3 ";##Phrase, No truncation,all of subfield field must match
-		
-		} else {
-		
-			 $attr .=" \@attr 4=6  \@attr 5=1  ";## Word list, right truncated, anywhere
-		}		 
-	
-		
-		$and .=" \@and " ;
-		$attr =$attr."\"".@$value[$i]."\"";
-		$q2 .=$attr;
-	$dosearch=1;		
-	}#if value		
-		
-	}## value loop
-##Add how many queries generated
-$query= $and.$query.$q2;
-#warn $query;
-
-$offset=0 unless $offset;
-my $counter = $offset;
-$length=10 unless $length;
-my @oAuth;
-my $i;
- $oAuth[0]=C4::Context->Zconn("authorityserver","xml","F");
-my ($mainentry)=MARCfind_attr_from_kohafield("mainentry");
-my ($allentry)=MARCfind_attr_from_kohafield("allentry");
-
-$query="\@attr 2=102 \@or \@or ".$query." \@attr 7=1 ".$mainentry." 0 \@attr 7=1 ".$allentry." 1"; ## sort on mainfield and subfields
-
-
-my $oAResult;
- $oAResult= $oAuth[0]->search_pqf($query) ; 
-while (($i = ZOOM::event(\@oAuth)) != 0) {
-    my $ev = $oAuth[$i-1]->last_event();
-#   warn("Authority ", $i-1, ": event $ev (", ZOOM::event_str($ev), ")\n");
-    last if $ev == ZOOM::Event::ZEND;
-}
- my($error, $errmsg, $addinfo, $diagset) = $oAuth[0]->error_x();
-    if ($error) {
-	warn  "oAuth error: $errmsg ($error) $addinfo $diagset\n";
-	goto NOLUCK;
-    }
-
-
-my $nbresults;
- $nbresults=$oAResult->size();
-my $nremains=$nbresults;	
-	my @result = ();
-	my @finalresult = ();
 
+my ($nbresults, at results) =ZEBRAsearch_kohafields($kohafields,$value, $relation,"lc-subject-heading <i", $and_or, 0,"",$startfrom, $number_of_results,"intranet","","authorityserver");
+my @finalresult;
 if ($nbresults>0){
-
 ##Find authid and linkid fields
+my $separator=C4::Context->preference('authoritysep');
 
-
-while (($counter < $nbresults) && ($counter < ($offset + $length))) {
+foreach my $authrecord(@results) {
 ##Here we have to extract MARC record and $authid from ZEBRA AUTHORITIES
-my $rec=$oAResult->record($counter);
-my $marcdata=$rec->raw();
-my $authrecord=Encode::decode("utf8",$marcdata);
-$authrecord=XML_xml2hash_onerecord($authrecord);		
+		
 my @linkids;	
-my $separator=C4::Context->preference('authoritysep');
 my $linksummary=" ".$separator;	
 my $authid=XML_readline_onerecord($authrecord,"authid","authorities");	
 my @linkid=XML_readline_asarray($authrecord,"linkid","authorities");##May have many linked records	
@@ -183,34 +99,21 @@
  $summary=getdictsummary($dbh,$authrecord,$authid,$authtypecode);
 }
 my $toggle;
-	if ($counter % 2) {
-		$toggle="#ffffcc";
-	} else {
-		$toggle="white";
-	}
+
 my %newline;
 	$newline{'toggle'}=$toggle;	
 	$newline{summary} = $summary;
 	$newline{authid} = $authid;
 	$newline{linkid} = $linkid[0];
-	$newline{even} = $counter % 2;
-	$counter++;
-	push @finalresult, \%newline;
-	}## while counter
-
 
-for (my $z=0; $z<($nbresults<$length?$nbresults:$length); $z++){
-		$finalresult[$z]{used}=AUTHcount_usage($finalresult[$z]{authid});
-	
- }# all $z's
+	$newline{used}=AUTHcount_usage($authid);
+	push @finalresult, \%newline;
+}## foreach
 
 
 }## if nbresult
-NOLUCK:
-$oAResult->destroy();
-$oAuth[0]->destroy();
 
-	return (\@finalresult, $nbresults);
+	return ( $nbresults, at finalresult);
 }
 
 
@@ -842,7 +745,6 @@
 my $zebraxml=auth_collection_header();
 $zebraxml.=$authxml;
 $zebraxml.="</collection>";
-$zebraxml=Encode::encode("utf8",$zebraxml);
 return $zebraxml;
 }
 sub auth_collection_header {
@@ -870,7 +772,7 @@
 
 =cut
 
-# $Id: AuthoritiesMarc.pm,v 1.37.2.4 2007/03/28 20:25:10 tgarip1957 Exp $
+# $Id: AuthoritiesMarc.pm,v 1.37.2.5 2007/03/30 00:14:42 tgarip1957 Exp $
 
 # Revision 1.30  2006/09/06 16:21:03  tgarip1957
 # Clean up before final commits

Index: C4/Biblioadd.pm
===================================================================
RCS file: /sources/koha/koha/C4/Attic/Biblioadd.pm,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -b -r1.1.2.2 -r1.1.2.3
--- C4/Biblioadd.pm	28 Mar 2007 02:50:28 -0000	1.1.2.2
+++ C4/Biblioadd.pm	30 Mar 2007 00:14:42 -0000	1.1.2.3
@@ -24,9 +24,6 @@
 use MARC::Record;
 use MARC::File::USMARC;
 use C4::Biblio;
-use Data::Dumper;
-#use vars qw( $tagslib);
-use vars qw( $authorised_values_sth);
 
 my $format="USMARC";
 $format="UNIMARC" if (C4::Context->preference('marcflavour') eq 'UNIMARC');
@@ -49,6 +46,8 @@
 &build_hidden_data
 );
 
+my $dbh=C4::Context->dbh;
+
 =item MARCfindbreeding
 
     $record = MARCfindbreeding($dbh, $breedingid,$frameworkcode);
@@ -210,7 +209,6 @@
 =cut
 sub create_input  {
 	my ($tag,$subfield,$value,$i,$tabloop,$rec,$authorised_values_sth,$id,$tagslib,$authority) = @_;	
-	my $dbh=C4::Context->dbh;
 	$value =~ s/"/&quot;/g;
 	my %subfield_data;
 	$subfield_data{id}=$id;
@@ -228,10 +226,10 @@
 	# it's an  authority field
 	} elsif ($tagslib->{$tag}->{$subfield}->{authtypecode} && !$authority) {
 		
-		$subfield_data{marc_value}="<input onblur=\"this.style.backgroundColor='#ffffff';\" onfocus=\"this.style.backgroundColor='#ffffff;'\"\" tabindex=\"1\" type=\"text\"   name=\"field_value\" id=\"field_value$id\" value=\"$value\" size=\"40\" maxlength=\"255\" DISABLE READONLY> <a  style=\"cursor: help;\" href=\"javascript:Dopop('../authorities/auth_finder.pl?authtypecode=".$tagslib->{$tag}->{$subfield}->{authtypecode}."&index=$id',$id);\">...</a>";
+		$subfield_data{marc_value}="<input onblur=\"this.style.backgroundColor='#ffffff';\" onfocus=\"this.style.backgroundColor='#ffffff;'\"\" tabindex=\"1\" type=\"text\"   name=\"field_value\" id=\"field_value$id\" value=\"$value\" size=\"40\" maxlength=\"255\" DISABLE READONLY> <a  style=\"cursor: help;\" href=\"javascript:Dopop('/cgi-bin/koha/authorities/auth_finder.pl?authtypecode=".$tagslib->{$tag}->{$subfield}->{authtypecode}."&index=$id',$id);\">...</a>";
 	# it's a plugin field
 	} elsif ($tagslib->{$tag}->{$subfield}->{link} && $authority) {
-		$subfield_data{marc_value}="<input onblur=\"this.style.backgroundColor='#ffffff';\" onfocus=\"this.style.backgroundColor='#ffffff;'\" tabindex=\"1\" type=\"text\" name=\"field_value\" id=\"field_value$id\" value=\"$value\" size=\"40\" maxlength=\"255\" DISABLE READONLY> <a  style=\"cursor: help;\" href=\"javascript:Dopop('../authorities/auth_linker.pl?index=$id',$id);\">...</a>";
+		$subfield_data{marc_value}="<input onblur=\"this.style.backgroundColor='#ffffff';\" onfocus=\"this.style.backgroundColor='#ffffff;'\" tabindex=\"1\" type=\"text\" name=\"field_value\" id=\"field_value$id\" value=\"$value\" size=\"40\" maxlength=\"255\" DISABLE READONLY> <a  style=\"cursor: help;\" href=\"javascript:Dopop('/cgi-bin/koha/authorities/auth_linker.pl?index=$id',$id);\">...</a>";
 	
 	} elsif ($tagslib->{$tag}->{$subfield}->{'value_builder'}) {
 		# opening plugin. Just check wether we are on a developper computer on a production one

Index: C4/Search.pm
===================================================================
RCS file: /sources/koha/koha/C4/Search.pm,v
retrieving revision 1.126.2.2
retrieving revision 1.126.2.3
diff -u -b -r1.126.2.2 -r1.126.2.3
--- C4/Search.pm	25 Mar 2007 23:46:14 -0000	1.126.2.2
+++ C4/Search.pm	30 Mar 2007 00:14:42 -0000	1.126.2.3
@@ -29,7 +29,7 @@
 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
 
 # set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.126.2.2 $' =~ /\d+/g;
+$VERSION = do { my @v = '$Revision: 1.126.2.3 $' =~ /\d+/g;
           shift(@v) . "." . join("_", map {sprintf "%03d", $_ } @v); };
 
 =head1 NAME
@@ -80,10 +80,10 @@
 
 
 sub ZEBRAsearch_kohafields{
-my ($kohafield,$value, $relation,$sort, $and_or, $fordisplay,$reorder,$startfrom,$number_of_results,$searchfrom,$searchtype)=@_;
+my ($kohafield,$value, $relation,$sort, $and_or, $fordisplay,$reorder,$startfrom,$number_of_results,$searchfrom,$searchtype,$server)=@_;
 return (0,undef) unless (@$value[0]);
 
-my $server="biblioserver";
+$server="biblioserver" unless $server;
 my @results;
 my $attr;
 my $query;
@@ -173,7 +173,8 @@
 
 		my $xmlrecord=$oResult->record($ri)->raw();
 		$xmlrecord=Encode::decode("utf8",$xmlrecord);
-			 $xmlrecord=XML_xml2hash($xmlrecord);
+			 $xmlrecord=XML_xml2hash($xmlrecord) if $server eq "biblioserver";
+			 $xmlrecord=XML_xml2hash_onerecord($xmlrecord) if $server eq "authorityserver";
 			$z++;
 
 			push @results,$xmlrecord;

Index: authorities/auth_finder.pl
===================================================================
RCS file: /sources/koha/koha/authorities/auth_finder.pl,v
retrieving revision 1.12.2.2
retrieving revision 1.12.2.3
diff -u -b -r1.12.2.2 -r1.12.2.3
--- authorities/auth_finder.pl	26 Mar 2007 02:19:21 -0000	1.12.2.2
+++ authorities/auth_finder.pl	30 Mar 2007 00:14:42 -0000	1.12.2.3
@@ -23,10 +23,10 @@
 use CGI;
 use C4::Auth;
 use C4::Context;
-use C4::Search;
 use C4::Interface::CGI::Output;
 use C4::AuthoritiesMarc;
 use C4::Koha; # XXX subfield_is_koha_internal_p
+use POSIX qw(ceil floor);
 
 my $query=new CGI;
 my $op = $query->param('op');
@@ -36,7 +36,21 @@
 my $dbh = C4::Context->dbh;
 
 my $startfrom=$query->param('startfrom');
+my $authid=$query->param('authid');
 $startfrom=0 if(!defined $startfrom);
+my $number_of_results=$query->param('number_of_results');
+ $number_of_results = 10 unless $number_of_results;
+my @forminputs;		#this is for the links to navigate among the results
+my %search;
+my @fields = ('value', 'kohafield', 'and_or', 'relation',);
+foreach my $field (@fields) {
+	$search{$field} = $query->param($field);
+	my @fieldvalue = $query->param($field);
+	foreach my $fvalue (@fieldvalue) {
+		push @forminputs, { field=>$field ,value=> $fvalue};
+		
+	  }
+}
 my ($template, $loggedinuser, $cookie);
 my $resultsperpage;
 
@@ -53,15 +67,15 @@
 }
 
 if ($op eq "do_search") {
-	my @marclist = $query->param('marclist');
-	
-	my @operator = $query->param('operator');
+	my @kohafield = $query->param('kohafield');
+	my @and_or=$query->param('and_or');
+	my @relation = $query->param('relation');
 	my @value = $query->param('value');
 
 	$resultsperpage= $query->param('resultsperpage');
-	$resultsperpage = 10 ;
-
-	my ($results,$total) = authoritysearch($dbh, \@marclist, \@operator, \@value,$startfrom*$resultsperpage, $resultsperpage,$authtypecode);# $orderby);
+	$resultsperpage = 10 unless $resultsperpage;
+	my @tags;
+	my ($count, at results) = authoritysearch( \@kohafield, \@relation, \@value,\@and_or,$startfrom, $number_of_results,$authtypecode) ;
 
 	($template, $loggedinuser, $cookie)
 		= get_template_and_user({template_name => "authorities/searchresultlist-auth.tmpl",
@@ -74,60 +88,81 @@
 				});
 
 	# multi page display gestion
-	my $displaynext=0;
-	my $displayprev=$startfrom;
-	if(($total - (($startfrom+1)*($resultsperpage))) > 0 ) {
-		$displaynext = 1;
-	}
-
-	my @field_data = ();
-
-
-	my @marclist_ini = $query->param('marclist'); # get marclist again, as the previous one has been modified by catalogsearch (mainentry replaced by field name
-	for(my $i = 0 ; $i <= $#marclist ; $i++) {
-		push @field_data, { term => "marclist", val=>$marclist_ini[$i] };
-		push @field_data, { term => "operator", val=>$operator[$i] };
-		push @field_data, { term => "value", val=>$value[$i] };
-	}
-
-	my @numbers = ();
-
-	if ($total>$resultsperpage) {
-		for (my $i=1; $i<$total/$resultsperpage+1; $i++) {
-			if ($i<16) {
-	    		my $highlight=0;
-	    		($startfrom==($i-1)) && ($highlight=1);
-	    		push @numbers, { number => $i,
-					highlight => $highlight ,
-					searchdata=> \@field_data,
-					startfrom => ($i-1)};
+	#this is to show the images numbers to navigate among the results, if it has to show the number highlighted or not
+	$template->param(numrecords => $count);
+	# the result number to star to show
+	$template->param(startfrom => $startfrom);
+	$template->param(beginning => $startfrom+1) if $count>0;
+	$template->param(result => \@results);
+	# the result number to end to show
+	my $num = scalar(@results) - 1;
+	($startfrom+$num<=$count) ? ($template->param(endat => $startfrom+$num+1)) : ($template->param(endat => $count));
+
+	my $numbers;
+	@$numbers = ();
+	my $pg = 1;
+	if (defined($query->param('pg'))) {
+		$pg = $query->param('pg');
+	}
+	my $start = 0;
+	
+	$start = ($pg - 1) * $number_of_results;
+	my $pages = ceil($count / $number_of_results);
+	my $total_pages = ceil($count / $number_of_results);
+
+	if ($pg > 1) {
+		my $url = $pg - 1;
+		push @$numbers, { number => "&lt;&lt;",  forminputs=>\@forminputs,
+					      highlight => 0 , 
+					      startfrom => 1, 
+					      pg => '1' };
+		push @$numbers, { number => "&lt;", 
+						  highlight => 0 , forminputs=>\@forminputs,
+						  startfrom => ($url-1)*$number_of_results+1, 
+						  pg => $url };
+	}
+	my $current_ten = $pg / 10;
+	if ($current_ten == 0) {
+		 $current_ten = 0.1;           # In case it´s in ten = 0
 			}
+	my $from = $current_ten * 10; # Calculate the initial page
+	my $end_ten = $from + 9;
+	my $to;
+	if ($pages > $end_ten) {
+		$to = $end_ten;
+	} else {
+		$to = $pages;
     	}
+	for (my $i = $from; $i <= $to ; $i++) {
+		if ($i == $pg) {   
+			if ($count > $number_of_results) {
+				push @$numbers, { number => $i, 
+								  highlight => 1 , forminputs=>\@forminputs,
+								  startfrom => ($i-1)*$number_of_results , 
+								  pg => $i };
 	}
-
-	my $from = $startfrom*$resultsperpage+1;
-	my $to;
-
- 	if($total < (($startfrom+1)*$resultsperpage)) {
-		$to = $total;
 	} else {
-		$to = (($startfrom+1)*$resultsperpage);
+			push @$numbers, { number => $i, 
+							  highlight => 0 , forminputs=>\@forminputs,
+							  startfrom => ($i-1)*$number_of_results , 
+							  pg => $i };
+		}
+	}	        					
+	if ($pg < $pages) {
+		my $url = $pg + 1;
+		push @$numbers, { number => "&gt;", 
+						  highlight => 0 , forminputs=>\@forminputs,
+						  startfrom => ($url-1)*$number_of_results, 
+						  pg => $url };
+		push @$numbers, { number => "&gt;&gt;", 
+						  highlight => 0 , forminputs=>\@forminputs,
+						  startfrom => ($total_pages-1)*$number_of_results, 
+						  pg => $total_pages};
 	}
-	$template->param(result => $results) if $results;
+	$template->param(numbers =>$numbers,
+			);
 	$template->param(index => $query->param('index')."");
-	$template->param(startfrom=> $startfrom,
-							displaynext=> $displaynext,
-							displayprev=> $displayprev,
-							resultsperpage => $resultsperpage,
-							startfromnext => $startfrom+1,
-							startfromprev => $startfrom-1,
-					      		  index => $index,
-							searchdata=>\@field_data,
-							total=>$total,
-							from=>$from,
-							to=>$to,
-							numbers=>\@numbers,
-							authtypecode =>$authtypecode,
+	$template->param(	authtypecode =>$authtypecode,
 							resultstring =>$value[0],
 							);
 } else {

Index: authorities/auth_linker.pl
===================================================================
RCS file: /sources/koha/koha/authorities/auth_linker.pl,v
retrieving revision 1.2.2.2
retrieving revision 1.2.2.3
diff -u -b -r1.2.2.2 -r1.2.2.3
--- authorities/auth_linker.pl	26 Mar 2007 02:19:21 -0000	1.2.2.2
+++ authorities/auth_linker.pl	30 Mar 2007 00:14:42 -0000	1.2.2.3
@@ -23,22 +23,35 @@
 use CGI;
 use C4::Auth;
 use C4::Context;
-use C4::Search;
 
 use C4::Interface::CGI::Output;
 use C4::AuthoritiesMarc;
 use C4::Koha; # XXX subfield_is_koha_internal_p
+use POSIX qw(ceil floor);
 
 my $query=new CGI;
 my $op = $query->param('op');
 my $authtypecode = $query->param('authtypecode');
 my $index = $query->param('index');
-# my $category = $query->param('category');
 my $resultstring = $query->param('result');
 my $dbh = C4::Context->dbh;
 
 my $startfrom=$query->param('startfrom');
+my $authid=$query->param('authid');
 $startfrom=0 if(!defined $startfrom);
+my $number_of_results=$query->param('number_of_results');
+ $number_of_results = 10 unless $number_of_results;
+my @forminputs;		#this is for the links to navigate among the results
+my %search;
+my @fields = ('value', 'kohafield', 'and_or', 'relation',);
+foreach my $field (@fields) {
+	$search{$field} = $query->param($field);
+	my @fieldvalue = $query->param($field);
+	foreach my $fvalue (@fieldvalue) {
+		push @forminputs, { field=>$field ,value=> $fvalue};
+		
+	  }
+}
 my ($template, $loggedinuser, $cookie);
 my $resultsperpage;
 
@@ -55,16 +68,15 @@
 }
 
 if ($op eq "do_search") {
-	my @marclist = $query->param('marclist');
-	
-	my @operator = $query->param('operator');
+	my @kohafield = $query->param('kohafield');
+	my @and_or=$query->param('and_or');
+	my @relation = $query->param('relation');
 	my @value = $query->param('value');
 
 	$resultsperpage= $query->param('resultsperpage');
-	$resultsperpage = 10 if(!defined $resultsperpage);
-
-	my ($results,$total) = authoritysearch($dbh, \@marclist, \@operator, \@value,$startfrom*$resultsperpage, $resultsperpage,$authtypecode) ;
-
+	$resultsperpage = 10 unless $resultsperpage;
+	my @tags;
+	my ($count, at results) = authoritysearch( \@kohafield, \@relation, \@value,\@and_or,$startfrom, $number_of_results,$authtypecode) ;
 
 	($template, $loggedinuser, $cookie)
 		= get_template_and_user({template_name => "authorities/linkresultlist-auth.tmpl",
@@ -77,60 +89,81 @@
 				});
 
 	# multi page display gestion
-	my $displaynext=0;
-	my $displayprev=$startfrom;
-	if(($total - (($startfrom+1)*($resultsperpage))) > 0 ) {
-		$displaynext = 1;
-	}
-
-	my @field_data = ();
-
-
-	my @marclist_ini = $query->param('marclist'); # get marclist again, as the previous one has been modified by authoritysearch (mainentry replaced by field name
-	for(my $i = 0 ; $i <= $#marclist ; $i++) {
-		push @field_data, { term => "marclist", val=>$marclist_ini[$i] };
-		push @field_data, { term => "operator", val=>$operator[$i] };
-		push @field_data, { term => "value", val=>$value[$i] };
-	}
-
-	my @numbers = ();
-
-	if ($total>$resultsperpage) {
-		for (my $i=1; $i<$total/$resultsperpage+1; $i++) {
-			if ($i<16) {
-	    		my $highlight=0;
-	    		($startfrom==($i-1)) && ($highlight=1);
-	    		push @numbers, { number => $i,
-					highlight => $highlight ,
-					searchdata=> \@field_data,
-					startfrom => ($i-1)};
+	#this is to show the images numbers to navigate among the results, if it has to show the number highlighted or not
+	$template->param(numrecords => $count);
+	# the result number to star to show
+	$template->param(startfrom => $startfrom);
+	$template->param(beginning => $startfrom+1) if $count>0;
+	$template->param(result => \@results);
+	# the result number to end to show
+	my $num = scalar(@results) - 1;
+	($startfrom+$num<=$count) ? ($template->param(endat => $startfrom+$num+1)) : ($template->param(endat => $count));
+
+	my $numbers;
+	@$numbers = ();
+	my $pg = 1;
+	if (defined($query->param('pg'))) {
+		$pg = $query->param('pg');
+	}
+	my $start = 0;
+	
+	$start = ($pg - 1) * $number_of_results;
+	my $pages = ceil($count / $number_of_results);
+	my $total_pages = ceil($count / $number_of_results);
+
+	if ($pg > 1) {
+		my $url = $pg - 1;
+		push @$numbers, { number => "&lt;&lt;",  forminputs=>\@forminputs,
+					      highlight => 0 , 
+					      startfrom => 1, 
+					      pg => '1' };
+		push @$numbers, { number => "&lt;", 
+						  highlight => 0 , forminputs=>\@forminputs,
+						  startfrom => ($url-1)*$number_of_results+1, 
+						  pg => $url };
+	}
+	my $current_ten = $pg / 10;
+	if ($current_ten == 0) {
+		 $current_ten = 0.1;           # In case it´s in ten = 0
 			}
+	my $from = $current_ten * 10; # Calculate the initial page
+	my $end_ten = $from + 9;
+	my $to;
+	if ($pages > $end_ten) {
+		$to = $end_ten;
+	} else {
+		$to = $pages;
     	}
+	for (my $i = $from; $i <= $to ; $i++) {
+		if ($i == $pg) {   
+			if ($count > $number_of_results) {
+				push @$numbers, { number => $i, 
+								  highlight => 1 , forminputs=>\@forminputs,
+								  startfrom => ($i-1)*$number_of_results , 
+								  pg => $i };
 	}
-
-	my $from = $startfrom*$resultsperpage+1;
-	my $to;
-
- 	if($total < (($startfrom+1)*$resultsperpage)) {
-		$to = $total;
 	} else {
-		$to = (($startfrom+1)*$resultsperpage);
+			push @$numbers, { number => $i, 
+							  highlight => 0 , forminputs=>\@forminputs,
+							  startfrom => ($i-1)*$number_of_results , 
+							  pg => $i };
+		}
+	}	        					
+	if ($pg < $pages) {
+		my $url = $pg + 1;
+		push @$numbers, { number => "&gt;", 
+						  highlight => 0 , forminputs=>\@forminputs,
+						  startfrom => ($url-1)*$number_of_results, 
+						  pg => $url };
+		push @$numbers, { number => "&gt;&gt;", 
+						  highlight => 0 , forminputs=>\@forminputs,
+						  startfrom => ($total_pages-1)*$number_of_results, 
+						  pg => $total_pages};
 	}
-	$template->param(result => $results) if $results;
-	$template->param(index => $query->param('index')."");
-	$template->param(startfrom=> $startfrom,
-							displaynext=> $displaynext,
-							displayprev=> $displayprev,
-							resultsperpage => $resultsperpage,
-							startfromnext => $startfrom+1,
-							startfromprev => $startfrom-1,
-					        		index => $index,
-							searchdata=>\@field_data,
-							total=>$total,
-							from=>$from,
-							to=>$to,
-							numbers=>\@numbers,
-							authtypecode =>$authtypecode,
+	$template->param(numbers =>$numbers,
+			);
+	$template->param(index => $query->param('index'));
+	$template->param(	authtypecode =>$authtypecode,
 							resultstring =>$value[0],
 							);
 } else {
@@ -145,7 +178,6 @@
 
 	$template->param(index=>$query->param('index')."",
 					resultstring => $resultstring,
-				
 					);
 }
 

Index: authorities/authorities-home.pl
===================================================================
RCS file: /sources/koha/koha/authorities/authorities-home.pl,v
retrieving revision 1.15.2.2
retrieving revision 1.15.2.3
diff -u -b -r1.15.2.2 -r1.15.2.3
--- authorities/authorities-home.pl	26 Mar 2007 02:19:21 -0000	1.15.2.2
+++ authorities/authorities-home.pl	30 Mar 2007 00:14:42 -0000	1.15.2.3
@@ -25,7 +25,7 @@
 use C4::Interface::CGI::Output;
 use C4::AuthoritiesMarc;
 use C4::Koha; # XXX subfield_is_koha_internal_p
-use C4::Biblio;
+use POSIX qw(ceil floor);
 
 
 my $query=new CGI;
@@ -37,6 +37,19 @@
 my $startfrom=$query->param('startfrom');
 my $authid=$query->param('authid');
 $startfrom=0 if(!defined $startfrom);
+my $number_of_results=$query->param('number_of_results');
+ $number_of_results = 10 unless $number_of_results;
+my @forminputs;		#this is for the links to navigate among the results
+my %search;
+my @fields = ('value', 'kohafield', 'and_or', 'relation',);
+foreach my $field (@fields) {
+	$search{$field} = $query->param($field);
+	my @fieldvalue = $query->param($field);
+	foreach my $fvalue (@fieldvalue) {
+		push @forminputs, { field=>$field ,value=> $fvalue};
+		
+	  }
+}
 my ($template, $loggedinuser, $cookie);
 my $resultsperpage;
 
@@ -53,15 +66,15 @@
 
 
 if ($op eq "do_search") {
-	my @marclist = $query->param('marclist');
-	
-	my @operator = $query->param('operator');
+	my @kohafield = $query->param('kohafield');
+	my @and_or=$query->param('and_or');
+	my @relation = $query->param('relation');
 	my @value = $query->param('value');
 
 	$resultsperpage= $query->param('resultsperpage');
 	$resultsperpage = 10 unless $resultsperpage;
 	my @tags;
-	my ($results,$total) = authoritysearch($dbh, \@marclist, \@operator, \@value,$startfrom*$resultsperpage, $resultsperpage,$authtypecode) ;
+	my ($count, at results) = authoritysearch( \@kohafield, \@relation, \@value,\@and_or,$startfrom, $number_of_results,$authtypecode) ;
 	($template, $loggedinuser, $cookie)
 		= get_template_and_user({template_name => "authorities/searchresultlist.tmpl",
 				query => $query,
@@ -74,64 +87,79 @@
 				});
 
 	# multi page display gestion
-	my $displaynext=0;
-	my $displayprev=$startfrom;
-	if(($total - (($startfrom+1)*($resultsperpage))) > 0 ){
-		$displaynext = 1;
-	}
-
-	my @field_data = ();
-
-	# we must get parameters once again. Because if there is a mainentry, it has been replaced by something else during the search, thus the links next/previous would not work anymore 
-	my @marclist_ini = $query->param('marclist');
-	for(my $i = 0 ; $i <= $#marclist ; $i++)
-	{
-		push @field_data, { term => "marclist", val=>$marclist_ini[$i] };
-		push @field_data, { term => "operator", val=>$operator[$i] };
-		push @field_data, { term => "value", val=>$value[$i] };
-	}
-
-	my @numbers = ();
-
-	if ($total>$resultsperpage)
-	{
-		for (my $i=1; $i<$total/$resultsperpage+1; $i++)
-		{
-			if ($i<31)
-			{
-	    		my $highlight=0;
-	    		($startfrom==($i-1)) && ($highlight=1);
-	    		push @numbers, { number => $i,
-					highlight => $highlight ,
-					searchdata=> \@field_data,
-					startfrom => ($i-1)};
+	#this is to show the images numbers to navigate among the results, if it has to show the number highlighted or not
+	$template->param(numrecords => $count);
+	# the result number to star to show
+	$template->param(startfrom => $startfrom);
+	$template->param(beginning => $startfrom+1) if $count>0;
+	$template->param(result => \@results);
+	# the result number to end to show
+	my $num = scalar(@results) - 1;
+	($startfrom+$num<=$count) ? ($template->param(endat => $startfrom+$num+1)) : ($template->param(endat => $count));
+
+	my $numbers;
+	@$numbers = ();
+	my $pg = 1;
+	if (defined($query->param('pg'))) {
+		$pg = $query->param('pg');
+	}
+	my $start = 0;
+	
+	$start = ($pg - 1) * $number_of_results;
+	my $pages = ceil($count / $number_of_results);
+	my $total_pages = ceil($count / $number_of_results);
+
+	if ($pg > 1) {
+		my $url = $pg - 1;
+		push @$numbers, { number => "&lt;&lt;",  forminputs=>\@forminputs,
+					      highlight => 0 , 
+					      startfrom => 1, 
+					      pg => '1' };
+		push @$numbers, { number => "&lt;", 
+						  highlight => 0 , forminputs=>\@forminputs,
+						  startfrom => ($url-1)*$number_of_results+1, 
+						  pg => $url };
+	}
+	my $current_ten = $pg / 10;
+	if ($current_ten == 0) {
+		 $current_ten = 0.1;           # In case it´s in ten = 0
 			}
+	my $from = $current_ten * 10; # Calculate the initial page
+	my $end_ten = $from + 9;
+	my $to;
+	if ($pages > $end_ten) {
+		$to = $end_ten;
+	} else {
+		$to = $pages;
     	}
+	for (my $i = $from; $i <= $to ; $i++) {
+		if ($i == $pg) {   
+			if ($count > $number_of_results) {
+				push @$numbers, { number => $i, 
+								  highlight => 1 , forminputs=>\@forminputs,
+								  startfrom => ($i-1)*$number_of_results , 
+								  pg => $i };
 	}
-
-	my $from = $startfrom*$resultsperpage+1;
-	my $to;
-
- 	if($total < (($startfrom+1)*$resultsperpage))
-	{
-		$to = $total;
 	} else {
-		$to = (($startfrom+1)*$resultsperpage);
+			push @$numbers, { number => $i, 
+							  highlight => 0 , forminputs=>\@forminputs,
+							  startfrom => ($i-1)*$number_of_results , 
+							  pg => $i };
+		}
+	}	        					
+	if ($pg < $pages) {
+		my $url = $pg + 1;
+		push @$numbers, { number => "&gt;", 
+						  highlight => 0 , forminputs=>\@forminputs,
+						  startfrom => ($url-1)*$number_of_results, 
+						  pg => $url };
+		push @$numbers, { number => "&gt;&gt;", 
+						  highlight => 0 , forminputs=>\@forminputs,
+						  startfrom => ($total_pages-1)*$number_of_results, 
+						  pg => $total_pages};
 	}
-	$template->param(result => $results) if $results;
-	$template->param(
-							startfrom=> $startfrom,
-							displaynext=> $displaynext,
-							displayprev=> $displayprev,
-							resultsperpage => $resultsperpage,
-							startfromnext => $startfrom+1,
-							startfromprev => $startfrom-1,
-							searchdata=>\@field_data,
-							total=>$total,
-							from=>$from,
-							to=>$to,
-							numbers=>\@numbers,
-							authtypecode=>$authtypecode,
+#	push @$numbers,{forminputs=>@forminputs};
+	$template->param(numbers =>$numbers,
 							);
 
 } elsif ($op eq "delete") {

Index: authorities/authorities.pl
===================================================================
RCS file: /sources/koha/koha/authorities/authorities.pl,v
retrieving revision 1.18.2.4
retrieving revision 1.18.2.5
diff -u -b -r1.18.2.4 -r1.18.2.5
--- authorities/authorities.pl	28 Mar 2007 20:25:10 -0000	1.18.2.4
+++ authorities/authorities.pl	30 Mar 2007 00:14:42 -0000	1.18.2.5
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: authorities.pl,v 1.18.2.4 2007/03/28 20:25:10 tgarip1957 Exp $
+# $Id: authorities.pl,v 1.18.2.5 2007/03/30 00:14:42 tgarip1957 Exp $
 
 # Copyright 2000-2002 Katipo Communications
 #
@@ -94,11 +94,12 @@
 	# build indicator hash.
 	my @ind_tag = $input->param('ind_tag');
 	my @indicator = $input->param('indicator');
+	my @tagindex=$input->param('tagindex');
 ## check for malformed xml -- non UTF-8 like (MARC8) will break xml without warning
 ### This usually happens with data coming from other Z3950 servers
 ## Slows the saving process so comment out at your own risk
 eval{
- $xml = MARChtml2xml(\@tags,\@subfields,\@values,\@indicator,\@ind_tag);	
+ $xml = MARChtml2xml(\@tags,\@subfields,\@values,\@indicator,\@ind_tag,\@tagindex);	
 };
 
  if ($@){
@@ -149,7 +150,8 @@
 	# build indicator hash.
 	my @ind_tag = $input->param('ind_tag');
 	my @indicator = $input->param('indicator');
-	my $xml = MARChtml2xml(\@tags,\@subfields,\@values,\@indicator,\@ind_tag);
+	my @tagindex=$input->param('tagindex');
+	my $xml = MARChtml2xml(\@tags,\@subfields,\@values,\@indicator,\@ind_tag, at tagindex);
 	$xml='<?xml version="1.0" encoding="UTF-8"?>'.$xml;
 	my $xmlhash=XML_xml2hash_onerecord($xml);
 	# adding an empty field

Index: authorities/blinddetail-linker.pl
===================================================================
RCS file: /sources/koha/koha/authorities/blinddetail-linker.pl,v
retrieving revision 1.3.2.2
retrieving revision 1.3.2.3
diff -u -b -r1.3.2.2 -r1.3.2.3
--- authorities/blinddetail-linker.pl	26 Mar 2007 02:19:21 -0000	1.3.2.2
+++ authorities/blinddetail-linker.pl	30 Mar 2007 00:14:42 -0000	1.3.2.3
@@ -42,22 +42,13 @@
 use C4::Context;
 use C4::Interface::CGI::Output;
 use CGI;
-use C4::Search;
 use C4::Koha;
-use C4::Biblio;
 my $query=new CGI;
 
 my $dbh=C4::Context->dbh;
 
 my $authid = $query->param('authid');
 my $index = $query->param('index');
-my $authtypecode=$query->param('authtypecode');
- $authtypecode = &AUTHfind_authtypecode($dbh,$authid) if !$authtypecode;
-my $tagslib = &AUTHgettagslib($dbh,1,$authtypecode);
-my ($linkidfield,$linkidsubfield)=MARCfind_marc_from_kohafield("linkid","authorities");
-my $auth_type = AUTHgetauth_type($authtypecode);
-
-my $record =XMLgetauthorityhash($dbh,$authid);
 # open template
 my ($template, $loggedinuser, $cookie)
 		= get_template_and_user({template_name => "authorities/blinddetail-linker.tmpl",
@@ -72,28 +63,8 @@
 my @loop_data =();
 my $tag;
 my @loop_data =();
-if ($authid) {
+if (!$authid) {
 
-#	foreach my $field ($record->field($auth_type->{auth_tag_to_report})) {
-#			my @subfields_data;
-#			my @subf=$field->subfields;
-#		# loop through each subfield
-#		for my $i (0..$#subf) {
-#			$subf[$i][0] = "@" unless $subf[$i][0];
-#			my %subfield_data;
-#			$subfield_data{marc_value}=$subf[$i][1];
-#			$subfield_data{marc_subfield}=$subf[$i][0];
-#			$subfield_data{marc_tag}=$field->tag();
-#			push(@subfields_data, \%subfield_data);
-#		}
-#		if ($#subfields_data>=0) {
-#			my %tag_data;
-#			$tag_data{tag}=$field->tag().' -'. $tagslib->{$field->tag()}->{lib};
-#			$tag_data{subfield} = \@subfields_data;
-#			push (@loop_data, \%tag_data);
-#		}
-#	}
-} else {
 # authid is empty => the user want to empty the entry.
 	my @subfields_data;
 	foreach my $subfield ('0'..'9') {
@@ -120,6 +91,6 @@
 
 
 
-$template->param(authid => $authid?$authid:"",linkidsubfield=>$linkidsubfield, linkidfield=>$linkidfield,index => $index);
+$template->param(authid =>  $authid?$authid:"",index => $index);
 output_html_with_http_headers $query, $cookie, $template->output;
 

Index: koha-tmpl/intranet-tmpl/default/en/authorities/auth_finder.tmpl
===================================================================
RCS file: /sources/koha/koha/koha-tmpl/intranet-tmpl/default/en/authorities/Attic/auth_finder.tmpl,v
retrieving revision 1.10.2.1
retrieving revision 1.10.2.2
diff -u -b -r1.10.2.1 -r1.10.2.2
--- koha-tmpl/intranet-tmpl/default/en/authorities/auth_finder.tmpl	26 Mar 2007 02:19:21 -0000	1.10.2.1
+++ koha-tmpl/intranet-tmpl/default/en/authorities/auth_finder.tmpl	30 Mar 2007 00:14:42 -0000	1.10.2.2
@@ -13,39 +13,32 @@
 	<input type="hidden" name="type" value="author">
 	<input type="hidden" name="nbstatements" value="<!-- TMPL_VAR NAME="nbstatements" -->">
 	<input type="hidden" name="index" value="<!-- TMPL_VAR NAME="index" -->">
-	<div id="bloc25">
-		<h2 class="authority">Search on</h2>
-		<p>
-			<label class="label100">Authority type</label>
+<div class="data"><table>
+<caption>Authority search</caption>
+<tr><th><label class="label100">Authority type</label><td>
 			<!-- TMPL_VAR NAME="authtypecode" -->
 			<input type="hidden" name="authtypecode" value="<!-- TMPL_VAR NAME="authtypecode" -->">
-		</p>
-		<p>
-			<label class="label100">Main heading(a)</label><input type="text" name="value" value="<!-- TMPL_VAR name="resultstring" -->">
-			<input type="hidden" name="marclist" value="mainentry">
-			<input type="hidden" name="and_or" value="and">
-			<input type="hidden" name="excluding" value="">
-			<select name="operator">
-				<option value="all">All words</option>
-				<option value="phrase">Phrase</option>
-			</select>
-			<input type="hidden" name="index" value="<!-- TMPL_VAR NAME="index" -->">
-		</p>
-		<p>
-			<label class="label100">Sub heading</label><input type="text" name="value">
-			<input type="hidden" name="marclist" value="">
-			<input type="hidden" name="and_or" value="and">
-			<input type="hidden" name="excluding" value="">
-			<select name="operator">
-				<option value="all">All words</option>
-				<option value="phrase">Phrase</option>
-			</select>
 			
-		</p>
+	</td></tr><input type="hidden" name="and_or" value="@and" />
+<tr><th><label id="mainentry">Main entry</label></th><td><select name="relation" id="mainentry">
+				<option value="@attr 4=6 @attr 5=102">All words--with wildcards</option>
+				<option value="@attr 4=6 @attr 5=100">All words--no wildcards</option>
+				<option value="@attr 4=1 ">Phrase</option>
+			</select> <input type="text" name="value" value="<!-- TMPL_VAR name="resultstring" -->" />
+			<input type="hidden" name="kohafield" value="mainentry" />
+			
+			</td></tr>			
+<tr><th><label for="anywhere">Anywhere</label></th><td><input type="hidden" name="and_or" value="@and" /><select name="relation" id="anywhere">
+				<option value="@attr 4=6 @attr 5=102">All words--with wildcards</option>
+				<option value="@attr 4=6 @attr 5=100">All words--no wildcards</option>
+				<option value="@attr 4=1">Phrase</option>
+			</select> <input type="text" name="value" value="<!-- TMPL_VAR NAME="value" -->">
+			<input type="hidden" name="kohafield" value="allentry">
+			
+			</td></tr></table></div>
 		<p>
-			<input type="submit" value="Start search" class="button authority">
+			<input type="submit" value="Start search" class="submit">
 		</p>
-	</div>
 </form>
 </div>
 

Index: koha-tmpl/intranet-tmpl/default/en/authorities/auth_linker.tmpl
===================================================================
RCS file: /sources/koha/koha/koha-tmpl/intranet-tmpl/default/en/authorities/Attic/auth_linker.tmpl,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -b -r1.1.2.1 -r1.1.2.2
--- koha-tmpl/intranet-tmpl/default/en/authorities/auth_linker.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
+++ koha-tmpl/intranet-tmpl/default/en/authorities/auth_linker.tmpl	30 Mar 2007 00:14:42 -0000	1.1.2.2
@@ -11,45 +11,37 @@
 	<input type="hidden" name="op" value="do_search">
 	<input type="hidden" name="type" value="author">
 	<input type="hidden" name="nbstatements" value="<!-- TMPL_VAR NAME="nbstatements" -->">
-	<div id="bloc25">
-		<h2 class="authority">Search on</h2>
-		<p>
-			
-<label for="authtypecode">Authority type</label></th><td><select id="authtypecode" name="authtypecode">
+	<input type="hidden" name="index" value="<!-- TMPL_VAR NAME="index" -->">
+<div class="data"><table>
+<caption>Authority search</caption>
+<tr><th><label class="label100">Authority type</label><td>
+			<input type="hidden" name="kohafield" value="authtypecode" /><input type="hidden" name="relation" value="@attr 5=100" />
+			<select id="authtypecode" name="value"  >
 			<!-- TMPL_LOOP NAME="authtypesloop" -->
-				<option value="<!-- TMPL_VAR NAME="value" -->" <!-- TMPL_IF name="selected" -->selected<!-- /TMPL_IF -->>
+				<option value="<!-- TMPL_VAR NAME="value" -->" >
 					<!-- TMPL_VAR NAME="authtypetext" -->
 				</option>
-			<!-- /TMPL_LOOP -->
-			</select>
+			<!-- /TMPL_LOOP --></select>
+	</td></tr><input type="hidden" name="and_or" value="@and" />
+<tr><th><label id="mainentry">Main entry</label></th><td><select name="relation" id="mainentry">
+				<option value="@attr 4=6 @attr 5=102">All words--with wildcards</option>
+				<option value="@attr 4=6 @attr 5=100">All words--no wildcards</option>
+				<option value="@attr 4=1 ">Phrase</option>
+			</select> <input type="text" name="value" value="<!-- TMPL_VAR name="resultstring" -->" />
+			<input type="hidden" name="kohafield" value="mainentry" />
 			
-		</p>
-		<p>
-			<label class="label100">Main heading(a)</label><input type="text" name="value" value="<!-- TMPL_VAR name="resultstring" -->">
-			<input type="hidden" name="marclist" value="mainentry">
-			<input type="hidden" name="and_or" value="and">
-			<input type="hidden" name="excluding" value="">
-			<select name="operator">
-				<option value="all">All words</option>
-				<option value="phrase">Phrase</option>
-			</select>
-			<input type="hidden" name="index" value="<!-- TMPL_VAR NAME="index" -->">
-		</p>
-		<p>
-			<label class="label100">Sub heading</label><input type="text" name="value">
-			<input type="hidden" name="marclist" value="">
-			<input type="hidden" name="and_or" value="and">
-			<input type="hidden" name="excluding" value="">
-			<select name="operator">
-				<option value="all">All words</option>
-				<option value="phrase">Phrase</option>
-			</select>
-			<input type="hidden" name="index" value="<!-- TMPL_VAR NAME="index" -->">
-		</p>
+			</td></tr>			
+<tr><th><label for="anywhere">Anywhere</label></th><td><input type="hidden" name="and_or" value="@and" /><select name="relation" id="anywhere">
+				<option value="@attr 4=6 @attr 5=102">All words--with wildcards</option>
+				<option value="@attr 4=6 @attr 5=100">All words--no wildcards</option>
+				<option value="@attr 4=1">Phrase</option>
+			</select> <input type="text" name="value" value="<!-- TMPL_VAR NAME="value" -->">
+			<input type="hidden" name="kohafield" value="allentry">
+			
+			</td></tr></table></div>
 		<p>
-			<input type="submit" value="Start search" class="button authority">
+			<input type="submit" value="Start search" class="submit">
 		</p>
-	</div>
 </form>
 </div>
 

Index: koha-tmpl/intranet-tmpl/default/en/authorities/authorities-home.tmpl
===================================================================
RCS file: /sources/koha/koha/koha-tmpl/intranet-tmpl/default/en/authorities/Attic/authorities-home.tmpl,v
retrieving revision 1.7.2.1
retrieving revision 1.7.2.2
diff -u -b -r1.7.2.1 -r1.7.2.2
--- koha-tmpl/intranet-tmpl/default/en/authorities/authorities-home.tmpl	26 Mar 2007 02:19:21 -0000	1.7.2.1
+++ koha-tmpl/intranet-tmpl/default/en/authorities/authorities-home.tmpl	30 Mar 2007 00:14:42 -0000	1.7.2.2
@@ -13,25 +13,27 @@
 	<input type="hidden" name="nbstatements" value="<!-- TMPL_VAR NAME="nbstatements" -->" />
 <div class="data"><table>
 <caption>Authority search</caption>
-<tr><th><label for="authtypecode">Authority type</label></th><td><select id="authtypecode" name="authtypecode"  >
+<tr><th><label for="authtypecode">Authority type</label></th><td><input type="hidden" name="kohafield" value="authtypecode" /><input type="hidden" name="relation" value="@attr 5=100" /><select id="authtypecode" name="value"  >
 			<!-- TMPL_LOOP NAME="authtypesloop" -->
 				<option value="<!-- TMPL_VAR NAME="value" -->" >
 					<!-- TMPL_VAR NAME="authtypetext" -->
 				</option>
 			<!-- /TMPL_LOOP -->
-			</select></td></tr>
-<tr><th><label id="mainentry">Main entry</label></th><td><select name="operator" id="mainentry">
-				<option value="all">All words</option>
-				<option value="phrase">Phrase</option>
+			</select></td></tr><input type="hidden" name="and_or" value="@and" />
+<tr><th><label id="mainentry">Main entry</label></th><td><select name="relation" id="mainentry">
+				<option value="@attr 4=6 @attr 5=102">All words--with wildcards</option>
+				<option value="@attr 4=6 @attr 5=100">All words--no wildcards</option>
+				<option value="@attr 4=1 ">Phrase</option>
 			</select> <input type="text" name="value" value="<!-- TMPL_VAR NAME="value" -->" />
-			<input type="hidden" name="marclist" value="mainentry" />
+			<input type="hidden" name="kohafield" value="mainentry" />
 			
 			</td></tr>			
-<tr><th><label for="anywhere">Anywhere</label></th><td><select name="operator" id="anywhere">
-				<option value="all">All words</option>
-				<option value="phrase">Phrase</option>
+<tr><th><label for="anywhere">Anywhere</label></th><td><input type="hidden" name="and_or" value="@and" /><select name="relation" id="anywhere">
+				<option value="@attr 4=6 @attr 5=102">All words--with wildcards</option>
+				<option value="@attr 4=6 @attr 5=100">All words--no wildcards</option>
+				<option value="@attr 4=1">Phrase</option>
 			</select> <input type="text" name="value" value="<!-- TMPL_VAR NAME="value" -->">
-			<input type="hidden" name="marclist" value="">
+			<input type="hidden" name="kohafield" value="allentry">
 			
 			</td></tr></table></div>
 		<p>

Index: koha-tmpl/intranet-tmpl/default/en/authorities/authorities.tmpl
===================================================================
RCS file: /sources/koha/koha/koha-tmpl/intranet-tmpl/default/en/authorities/Attic/authorities.tmpl,v
retrieving revision 1.12.2.1
retrieving revision 1.12.2.2
diff -u -b -r1.12.2.1 -r1.12.2.2
--- koha-tmpl/intranet-tmpl/default/en/authorities/authorities.tmpl	26 Mar 2007 02:19:21 -0000	1.12.2.1
+++ koha-tmpl/intranet-tmpl/default/en/authorities/authorities.tmpl	30 Mar 2007 00:14:42 -0000	1.12.2.2
@@ -41,7 +41,6 @@
         <!--  /TMPL_LOOP -->
 	</div>
 
-
 <! -- RESET PAGINATION -->
 <!-- TMPL_LOOP name="BIG_LOOP" -->
 <!-- hide every tab except the 1st -->
@@ -52,12 +51,12 @@
 <!-- /TMPL_IF -->
 <!-- TMPL_UNLESS name="number" -->
     <!-- show duplicate warning on tab 0 only -->
-<!-- TMPL_IF name="duplicateauthid" -->
+        <!-- TMPL_IF name="duplicatebiblionumber" -->
 			<div class="error">
-				<p>Is this a duplicate of <a href="detail.pl?authid=<!-- TMPL_VAR name="duplicateauthid" -->&nonav=<!-- TMPL_VAR name="nonav" -->" onclick="openWindow('detail.pl?nonav=<!-- TMPL_VAR name="nonav" -->&authid=<!-- TMPL_VAR name="duplicateauthid" -->&popup=1', ''; return false;)"><!-- TMPL_VAR name="duplicateauthvalue" --></a>?</p>
-				
+                        <p>Is this a duplicate of <a href="../catalogue/MARCdetail.pl?biblionumber=<!-- TMPL_VAR name="duplicatebiblionumber" -->" onclick="openWindow('../catalogue/MARCdetail.pl?biblionumber=<!-- TMPL_VAR name="duplicatebiblionumber" -->&popup=1', 'Duplicatebiblio'); return false;"><!-- TMPL_VAR name="duplicatetitle" --></a>?</p>
+                        <p>You must either :</p>
 				<ul>
-					
+                            <li>If it <em>is</em> a duplicate, <a href="additem.pl?biblionumber=<!-- TMPL_VAR name="duplicatebiblionumber" -->">Edit Items</a> of the existing record.</li>
 					<li>If not, click to <input type="hidden" value="0" id="confirm_not_duplicate" name="confirm_not_duplicate" /> <a href="#" onclick="confirmnotdup(); return false;">Confirm it's not a duplicate</a></li>
 				</ul>
 			</div>
@@ -93,7 +92,7 @@
                 <!-- /TMPL_UNLESS -->
                 <!-- TMPL_UNLESS name="hide_marc" -->
                     <img style="cursor: crosshair; color: grey; font-size: 80%;" <!-- TMPL_IF NAME="fixedfield" --> style="display:none;" <!-- /TMPL_IF --> src="<!-- TMPL_VAR NAME="themelang" -->/images/up.png" onclick="upSubfield('subfield<!-- TMPL_VAR NAME="tag" --><!-- TMPL_VAR name="index" -->')"/>
-                        <input title="<!-- TMPL_VAR NAME="marc_lib_plain" -->" style=" <!-- TMPL_IF NAME="fixedfield" -->display:none; <!-- /TMPL_IF -->border:0;" type="text" name="subfield" value="<!-- TMPL_VAR NAME="subfield" -->" size="1" maxlength="1" class="flat" DISABLE READONLY tabindex=-1 />
+                        <input title="<!-- TMPL_VAR NAME="marc_lib_plain" -->" style=" <!-- TMPL_IF NAME="fixedfield" -->display:none; <!-- /TMPL_IF -->border:0;" type="text" name="subfield" id="subfield<!--TMPL_VAR NAME="id"-->"  value="<!-- TMPL_VAR NAME="subfield" -->" size="1" maxlength="1" class="flat" DISABLE READONLY tabindex=-1 />
                 <!-- TMPL_ELSE -->
                     <input type="hidden" name="subfield" id="subfield<!--TMPL_VAR NAME="id"-->" value="<!-- TMPL_VAR NAME="subfield" -->"/>
                 <!-- /TMPL_UNLESS -->
@@ -107,6 +106,7 @@
                 <!-- TMPL_IF NAME="repeatable" -->
                     <a style="cursor: crosshair; color: grey; font-size: 80%;" onclick="cloneSubfield('subfield<!-- TMPL_VAR NAME="tag" --><!-- TMPL_VAR name="index" -->')">+</a>
                 <!-- /TMPL_IF -->
+	 <input type="hidden" name="tagindex" value="<!-- TMPL_VAR NAME="id" -->"/>
                 <input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="tag" -->"/>
                 <input type="hidden" name="subfieldYYY" value="<!-- TMPL_VAR NAME="subfield" -->" size="2" maxlength="1"/>
                 <input type="hidden" name="mandatory" value="<!-- TMPL_VAR NAME="mandatory" -->"/>
@@ -294,7 +294,7 @@
  <!-- /TMPL_IF -->
  trigger = original.getElementsByTagName('a')[0];
  if (trigger) {
- 	trigger.parentNode.removeChild(trigger);
+// 	trigger.parentNode.removeChild(trigger);
  }
  clonetrigger = clone.getElementsByTagName('a')[0];
  clonetrigger.setAttribute("onclick","cloneSubfield('" + index + index + "')");

Index: koha-tmpl/intranet-tmpl/default/en/authorities/blinddetail-linker.tmpl
===================================================================
RCS file: /sources/koha/koha/koha-tmpl/intranet-tmpl/default/en/authorities/Attic/blinddetail-linker.tmpl,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -b -r1.1.2.1 -r1.1.2.2
--- koha-tmpl/intranet-tmpl/default/en/authorities/blinddetail-linker.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
+++ koha-tmpl/intranet-tmpl/default/en/authorities/blinddetail-linker.tmpl	30 Mar 2007 00:14:42 -0000	1.1.2.2
@@ -6,15 +6,15 @@
 
 function go()
 {
-var index_start = <!-- TMPL_VAR NAME="index" -->;
-var whichfield = opener.opener.document.f.tag[index_start].value;
-i=index_start
+var i= <!-- TMPL_VAR NAME="index" -->;
+//var whichfield = opener.opener.document.f.tag[index_start].value;
+var fields=opener.opener.document.getElementById('field_value'+i);
 //try to fill authid as linkid to be used for linking authorities
 //opener.opener.document.f.linkid.value="<!-- TMPL_VAR NAME="authid"-->";
 
 // go forward, until reaching the end of the field.
-				opener.opener.document.f.field_value[i].value = "<!-- TMPL_VAR NAME="authid" -->";
-
+//				opener.opener.document.f.field_value(<!-- TMPL_VAR NAME="index" -->).value = "<!-- TMPL_VAR NAME="authid" -->";
+fields.value="<!-- TMPL_VAR NAME="authid" -->";
 	opener.close();
 	self.close();
 	return false;

Index: koha-tmpl/intranet-tmpl/default/en/authorities/linkresultlist-auth.tmpl
===================================================================
RCS file: /sources/koha/koha/koha-tmpl/intranet-tmpl/default/en/authorities/Attic/linkresultlist-auth.tmpl,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -b -r1.1.2.1 -r1.1.2.2
--- koha-tmpl/intranet-tmpl/default/en/authorities/linkresultlist-auth.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
+++ koha-tmpl/intranet-tmpl/default/en/authorities/linkresultlist-auth.tmpl	30 Mar 2007 00:14:42 -0000	1.1.2.2
@@ -3,35 +3,23 @@
 
 <div id="main">
 	<h1 class="authority">Authority search results</h1>
-		<div id="resultnumber">
-			<p>
-				<!-- TMPL_IF name="displayprev" -->
-					<a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&amp;&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->&and_or=and&operator=any&value=<!-- TMPL_VAR NAME="resultstring" -->&op=do_search&type=intranet&stype=author&index=<!-- TMPL_VAR NAME="index" -->">
-						<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/prev.gif"  border="0">
-					</a>
-				<!-- /TMPL_IF -->
+<div id="pages" >
+    <!-- Row of numbers corresponding to search result pages -->
+    <div align="center">Results <b><!-- TMPL_VAR NAME="beginning" --></b> - <b><!-- TMPL_VAR NAME="endat" --></b> of <b><!-- TMPL_VAR NAME="numrecords" --></b> records.</div>
+
 				<!-- TMPL_LOOP NAME="numbers" -->
-					<!-- TMPL_IF name="highlight" -->
-						<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/<!-- TMPL_VAR NAME="number" -->-highlight.gif">
+		<!-- TMPL_IF NAME="highlight" -->
+		    <span class="current">
+		    <!-- TMPL_VAR NAME="number" -->
+	        </span>
 					<!-- TMPL_ELSE -->
-						<a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfrom" -->&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->&and_or=and&operator=any&value=<!-- TMPL_VAR NAME="resultstring" -->&op=do_search&type=intranet&stype=author&index=<!-- TMPL_VAR NAME="index" -->">
-							<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/<!-- TMPL_VAR NAME="number" -->.gif" border="0"></a>
+		    <span class="pages">
+	        <a class="pages"  href="auth_linker.pl?op=do_search&amp;startfrom=<!-- TMPL_VAR NAME="startfrom" --><!-- TMPL_LOOP NAME="forminputs" -->&amp;<!-- TMPL_VAR NAME="field" -->=<!-- TMPL_VAR NAME="value" ESCAPE="HTML" --><!-- /TMPL_LOOP -->&amp;pg=<!-- TMPL_VAR NAME="pg" -->&amp:index=<!--TMPL_VAR NAME="index"-->&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->"><!-- TMPL_VAR NAME="number" --></a>
+	        </span>
 					<!-- /TMPL_IF -->
 				<!-- /TMPL_LOOP -->
-				<!-- TMPL_IF name="displaynext" -->
-					<a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&amp;&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->&and_or=and&operator=any&value=<!-- TMPL_VAR NAME="resultstring" -->&op=do_search&type=intranet&stype=author&index=<!-- TMPL_VAR NAME="index" -->">
-						<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/next.gif" border="0"></a>
-				<!-- /TMPL_IF -->
-			</p>
-			<p>
-				<!-- TMPL_IF name="total" -->
-					&nbsp;<b>Results <!-- TMPL_VAR NAME="from" --> to <!-- TMPL_VAR NAME="to" --> of <!-- TMPL_VAR NAME="total" --></b><br><br>
-				<!-- TMPL_ELSE -->
-					&nbsp;No results found.<br>
-				<!-- /TMPL_IF -->
-			</p>
-		</div>
-		<div id="resultlist">
+    
+</div>		<div id="resultlist">
 			<table>
 				<tr>
 					<th class="authority">Summary</th>
@@ -52,34 +40,14 @@
 						<td><!-- TMPL_VAR NAME="summary" --></td>
 						<td><!-- TMPL_VAR NAME="used" --> times</td>
 						<td>
-							<a href="javascript:jumpfull('blinddetail-linker.pl?authid=<!-- TMPL_VAR NAME="authid" -->&amp;index=<!-- TMPL_VAR NAME="index" -->')"><img src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/arrow.gif" width="16" height="16" hspace="0" vspace="0" border="0"></a>
+							<a href="javascript:jumpfull('blinddetail-linker.pl?authid=<!-- TMPL_VAR NAME="authid" -->&amp;index=<!-- TMPL_VAR NAME="index" -->')"><img src="<!-- TMPL_VAR NAME="themelang" -->/../images/arrow.gif" width="16" height="16" hspace="0" vspace="0" border="0"></a>
 						</td>
 							</tr>
 				<!-- /TMPL_LOOP -->
 			</table>
 	
 		</div>
-		<div id="resultnumber">
-			<p>
-				<!-- TMPL_IF name="displayprev" -->
-					<a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&amp;&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->&and_or=and&operator=contains&value=<!-- TMPL_VAR NAME="resultstring" -->&op=do_search&type=intranet&stype=author">
-						<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/prev.gif" border="0">
-					</a>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_LOOP NAME="numbers" -->
-					<!-- TMPL_IF name="highlight" -->
-						<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/<!-- TMPL_VAR NAME="number" -->-highlight.gif">
-					<!-- TMPL_ELSE -->
-						<a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfrom" -->&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->&and_or=and&operator=contains&value=<!-- TMPL_VAR NAME="resultstring" -->&op=do_search&type=intranet&stype=author">
-							<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/<!-- TMPL_VAR NAME="number" -->.gif" border="0"></a>
-					<!-- /TMPL_IF -->
-				<!-- /TMPL_LOOP -->
-				<!-- TMPL_IF name="displaynext" -->
-					<a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&amp;&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->&and_or=and&operator=contains&value=<!-- TMPL_VAR NAME="resultstring" -->&op=do_search&type=intranet&stype=author">
-						<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/next.gif" border="0"></a>
-				<!-- /TMPL_IF -->
-			</p>
-		</div>	
+		
 		<a href="auth_linker.pl?index=<!-- TMPL_VAR NAME="index" -->">Search again</a>
 	</div>
 </div>

Index: koha-tmpl/intranet-tmpl/default/en/authorities/searchresultlist-auth.tmpl
===================================================================
RCS file: /sources/koha/koha/koha-tmpl/intranet-tmpl/default/en/authorities/Attic/searchresultlist-auth.tmpl,v
retrieving revision 1.10.2.1
retrieving revision 1.10.2.2
diff -u -b -r1.10.2.1 -r1.10.2.2
--- koha-tmpl/intranet-tmpl/default/en/authorities/searchresultlist-auth.tmpl	26 Mar 2007 02:19:21 -0000	1.10.2.1
+++ koha-tmpl/intranet-tmpl/default/en/authorities/searchresultlist-auth.tmpl	30 Mar 2007 00:14:42 -0000	1.10.2.2
@@ -4,34 +4,23 @@
 
 <div id="main">
 	<h1 class="authority">Authority search results</h1>
-		<div id="resultnumber">
-			<p>
-				<!-- TMPL_IF name="displayprev" -->
-					<a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&amp;&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->&and_or=and&operator=any&value=<!-- TMPL_VAR NAME="resultstring" -->&op=do_search&type=intranet&stype=author&index=<!-- TMPL_VAR NAME="index" -->">
-						<img src="<!-- TMPL_VAR NAME="themelang" -->/../images/numbers/prev.gif"  border="0">
-					</a>
-				<!-- /TMPL_IF -->
+			<div id="pages" >
+    <!-- Row of numbers corresponding to search result pages -->
+    <div align="center">Results <b><!-- TMPL_VAR NAME="beginning" --></b> - <b><!-- TMPL_VAR NAME="endat" --></b> of <b><!-- TMPL_VAR NAME="numrecords" --></b> records.</div>
+
 				<!-- TMPL_LOOP NAME="numbers" -->
-					<!-- TMPL_IF name="highlight" -->
-						<img src="<!-- TMPL_VAR NAME="themelang" -->/../images/numbers/<!-- TMPL_VAR NAME="number" -->-highlight.gif">
+		<!-- TMPL_IF NAME="highlight" -->
+		    <span class="current">
+		    <!-- TMPL_VAR NAME="number" -->
+	        </span>
 					<!-- TMPL_ELSE -->
-						<a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfrom" -->&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->&and_or=and&operator=any&value=<!-- TMPL_VAR NAME="resultstring" -->&op=do_search&type=intranet&stype=author&index=<!-- TMPL_VAR NAME="index" -->">
-							<img src="<!-- TMPL_VAR NAME="themelang" -->/../images/numbers/<!-- TMPL_VAR NAME="number" -->.gif" border="0"></a>
+		    <span class="pages">
+	        <a class="pages"  href="auth-finder.pl?op=do_search&amp;startfrom=<!-- TMPL_VAR NAME="startfrom" --><!-- TMPL_LOOP NAME="forminputs" -->&amp;<!-- TMPL_VAR NAME="field" -->=<!-- TMPL_VAR NAME="value" ESCAPE="HTML" --><!-- /TMPL_LOOP -->&amp;pg=<!-- TMPL_VAR NAME="pg" -->&amp:index=<!--TMPL_VAR NAME=index"-->&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->"><!-- TMPL_VAR NAME="number" --></a>
+	        </span>
 					<!-- /TMPL_IF -->
 				<!-- /TMPL_LOOP -->
-				<!-- TMPL_IF name="displaynext" -->
-					<a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&amp;&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->&and_or=and&operator=any&value=<!-- TMPL_VAR NAME="resultstring" -->&op=do_search&type=intranet&stype=author&index=<!-- TMPL_VAR NAME="index" -->">
-						<img src="<!-- TMPL_VAR NAME="themelang" -->/../images/numbers/next.gif" border="0"></a>
-				<!-- /TMPL_IF -->
-			</p>
-			<p>
-				<!-- TMPL_IF name="total" -->
-					&nbsp;<b>Results <!-- TMPL_VAR NAME="from" --> to <!-- TMPL_VAR NAME="to" --> of <!-- TMPL_VAR NAME="total" --></b><br><br>
-				<!-- TMPL_ELSE -->
-					&nbsp;No results found.<br>
-				<!-- /TMPL_IF -->
-			</p>
-		</div>
+    
+</div>
 		<div id="resultlist">
 			<table>
 				<tr>
@@ -53,7 +42,7 @@
 						<td><!-- TMPL_VAR NAME="summary" --></td>
 						<td><!-- TMPL_VAR NAME="used" --> times</td>
 						<td>
-							<a href="javascript:jumpfull('blinddetail-biblio-search.pl?authid=<!-- TMPL_VAR NAME="authid" -->&amp;index=<!-- TMPL_VAR NAME="index" -->')"><img src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/../images/arrow.gif" width="16" height="16" hspace="0" vspace="0" border="0"></a>
+							<a href="javascript:jumpfull('blinddetail-biblio-search.pl?authid=<!-- TMPL_VAR NAME="authid" -->&amp;index=<!-- TMPL_VAR NAME="index" -->')"><img src="<!-- TMPL_VAR NAME="themelang" -->/../images/arrow.gif" width="16" height="16" hspace="0" vspace="0" border="0"></a>
 						</td>
 						<td> <a href="/cgi-bin/koha/authorities/authorities.pl?nonav=<!-- TMPL_VAR NAME="nonav" -->&authid=<!-- TMPL_VAR NAME="authid" -->&index=<!-- TMPL_VAR NAME="index" -->&authtypecode=<!-- TMPL_VAR name="authtypecode" -->">Edit<a/></td>
 					</tr>
@@ -61,27 +50,7 @@
 			</table>
 	
 		</div>
-		<div id="resultnumber">
-			<p>
-				<!-- TMPL_IF name="displayprev" -->
-					<a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&amp;&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->&and_or=and&operator=contains&value=<!-- TMPL_VAR NAME="resultstring" -->&op=do_search&type=intranet&stype=author">
-						<img src="<!-- TMPL_VAR NAME="themelang" -->/../images/numbers/prev.gif" border="0">
-					</a>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_LOOP NAME="numbers" -->
-					<!-- TMPL_IF name="highlight" -->
-						<img src="/intranet-tmpl/default/../images/numbers/<!-- TMPL_VAR NAME="number" -->-highlight.gif">
-					<!-- TMPL_ELSE -->
-						<a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfrom" -->&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->&and_or=and&operator=contains&value=<!-- TMPL_VAR NAME="resultstring" -->&op=do_search&type=intranet&stype=author">
-							<img src="<!-- TMPL_VAR NAME="themelang" -->/../images/numbers/<!-- TMPL_VAR NAME="number" -->.gif" border="0"></a>
-					<!-- /TMPL_IF -->
-				<!-- /TMPL_LOOP -->
-				<!-- TMPL_IF name="displaynext" -->
-					<a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&amp;&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->&and_or=and&operator=contains&value=<!-- TMPL_VAR NAME="resultstring" -->&op=do_search&type=intranet&stype=author">
-						<img src="<!-- TMPL_VAR NAME="themelang" -->/numbers/next.gif" border="0"></a>
-				<!-- /TMPL_IF -->
-			</p>
-		</div><a href="auth_finder.pl?index=<!-- TMPL_VAR NAME="index" -->&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->">Search again</a>	
+			<a href="auth_finder.pl?index=<!-- TMPL_VAR NAME="index" -->&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->">Search again</a>	
 	</div>
 </div>
 

Index: koha-tmpl/intranet-tmpl/default/en/authorities/searchresultlist.tmpl
===================================================================
RCS file: /sources/koha/koha/koha-tmpl/intranet-tmpl/default/en/authorities/Attic/searchresultlist.tmpl,v
retrieving revision 1.11.2.1
retrieving revision 1.11.2.2
diff -u -b -r1.11.2.1 -r1.11.2.2
--- koha-tmpl/intranet-tmpl/default/en/authorities/searchresultlist.tmpl	26 Mar 2007 02:19:21 -0000	1.11.2.1
+++ koha-tmpl/intranet-tmpl/default/en/authorities/searchresultlist.tmpl	30 Mar 2007 00:14:42 -0000	1.11.2.2
@@ -6,36 +6,23 @@
 
 <div id="main">
 	<h1 class="authority">Authority search results</h1>
-	<div id="resultnumber">
-		<p>
-			<!-- TMPL_IF name="displayprev" -->
-				<a href="authorities-home.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&amp;<!-- TMPL_LOOP NAME="searchdata" --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR NAME="val" ESCAPE=URL -->&amp;<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=intranet&amp;stype=author&amp;op=do_search&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->">
-					<img src="<!-- TMPL_VAR NAME="themelang" -->/../images/numbers/prev.gif" border="0">
-				</a>
-			<!-- /TMPL_IF -->
+	<div id="pages" >
+    <!-- Row of numbers corresponding to search result pages -->
+    <div align="center">Results <b><!-- TMPL_VAR NAME="beginning" --></b> - <b><!-- TMPL_VAR NAME="endat" --></b> of <b><!-- TMPL_VAR NAME="numrecords" --></b> records.</div>
+
 			<!-- TMPL_LOOP NAME="numbers" -->
-				<!-- TMPL_IF name="highlight" -->
-					<img src="<!-- TMPL_VAR NAME="themelang" -->/../images/numbers/<!-- TMPL_VAR NAME="number" -->-highlight.gif">
+		<!-- TMPL_IF NAME="highlight" -->
+		    <span class="current">
+		    <!-- TMPL_VAR NAME="number" -->
+	        </span>
 				<!-- TMPL_ELSE -->
-					<a href="authorities-home.pl?startfrom=<!-- TMPL_VAR NAME="startfrom" -->&amp;<!-- TMPL_LOOP NAME="searchdata" --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR NAME="val" ESCAPE=URL -->&amp;<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=intranet&amp;stype=author&amp;op=do_search&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->">
-						<img src="<!-- TMPL_VAR NAME="themelang" -->/../images/numbers/<!-- TMPL_VAR NAME="number" -->.gif" border="0">
-					</a>
+		    <span class="pages">
+	        <a class="pages"  href="authorities-home.pl?op=do_search&amp;startfrom=<!-- TMPL_VAR NAME="startfrom" --><!-- TMPL_LOOP NAME="forminputs" -->&amp;<!-- TMPL_VAR NAME="field" -->=<!-- TMPL_VAR NAME="value" ESCAPE="HTML" --><!-- /TMPL_LOOP -->&amp;pg=<!-- TMPL_VAR NAME="pg" -->"><!-- TMPL_VAR NAME="number" --></a>
+	        </span>
 				<!-- /TMPL_IF -->
 			<!-- /TMPL_LOOP -->
-			<!-- TMPL_IF name="displaynext" -->
-				<a href="authorities-home.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&amp;<!-- TMPL_LOOP NAME="searchdata" --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR NAME="val" ESCAPE=URL -->&amp;<!-- /TMPL_LOOP -->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=intranet&amp;stype=author&amp;op=do_search&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->">
-					<img src="<!-- TMPL_VAR NAME="themelang" -->/../images/numbers/next.gif" border="0">
-				</a>
-				<!-- /TMPL_IF -->
-		</p>
-		<p>
-			<!-- TMPL_IF name="total" -->
-			&nbsp;<b>Results <!-- TMPL_VAR NAME="from" --> to <!-- TMPL_VAR NAME="to" --> of <!-- TMPL_VAR NAME="total" --></b><br><br>
-			<!-- TMPL_ELSE -->
-			&nbsp;No results found.<br>
-			<!-- /TMPL_IF -->
-		</p>
-	</div>
+    
+</div>
 	<div id="resultlist">
 		<table>
 			<tr>
@@ -60,34 +47,12 @@
 			<!-- /TMPL_LOOP -->
 		</table>
 	</div>
-	<div id="resultnumber">
-		<p>
-			<!-- TMPL_IF name="displayprev" -->
-				<a href="authorities-home.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&amp;<!-- TMPL_LOOP NAME="searchdata" --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR NAME="val" ESCAPE=URL -->&amp;<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=intranet&amp;stype=author&amp;op=do_search&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->">
-					<img src="<!-- TMPL_VAR NAME="themelang" -->/../images/numbers/prev.gif" border="0">
-				</a>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_LOOP NAME="numbers" -->
-				<!-- TMPL_IF name="highlight" -->
-					<img src="<!-- TMPL_VAR NAME="themelang" -->/../images/numbers/<!-- TMPL_VAR NAME="number" -->-highlight.gif">
-				<!-- TMPL_ELSE -->
-					<a href="authorities-home.pl?startfrom=<!-- TMPL_VAR NAME="startfrom" -->&amp;<!-- TMPL_LOOP NAME="searchdata" --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR NAME="val" ESCAPE=URL -->&amp;<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=intranet&amp;stype=author&amp;op=do_search&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->">
-						<img src="<!-- TMPL_VAR NAME="themelang" -->/../images/numbers/<!-- TMPL_VAR NAME="number" -->.gif" border="0">
-					</a>
-				<!-- /TMPL_IF -->
-			<!-- /TMPL_LOOP -->
-			<!-- TMPL_IF name="displaynext" -->
-				<a href="authorities-home.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&amp;<!-- TMPL_LOOP NAME="searchdata" --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR NAME="val" ESCAPE=URL -->&amp;<!-- /TMPL_LOOP -->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=intranet&amp;stype=author&amp;op=do_search&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->">
-					<img src="<!-- TMPL_VAR NAME="themelang" -->/../images/numbers/next.gif" border="0">
-				</a>
-				<!-- /TMPL_IF -->
-		</p>
-	</div>	
+<!--TMPL_IF NAME="numrecords-->	
 <form name"m" id="m">
 
 From:<input type="text" size="10" name="mergefrom" id="mergefrom" value=""/>&nbsp;&nbsp;To:<input type="text" size="10" id="mergeto" name="mergeto" value=""/>
 <input type="button" class="submit" value="Merge" onclick="do_merge(); return false;" /></form>
-					
+<!--/TMPL_IF-->					
 </div>
 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
 





More information about the Koha-cvs mailing list