MARC search fixes and improvements. Now, ALL searches are indexed and should be very fast with any statement.
a few improvments, and it will be useable even with a NON-MARC installation of koha.
This commit is contained in:
parent
09fbc6d33a
commit
aa5bc6d084
|
|
@ -79,7 +79,7 @@ circulation.src ="<TMPL_VAR NAME='themelang'>/images/front-mouseover-circulation
|
|||
<td background="" colspan=5><a href="/cgi-bin/koha/loadmodules.pl?module=search&type=intranet" onMouseOver="if(document.images)document.search.src='<TMPL_VAR NAME='themelang'>/images/front-mouseover-search.gif'" onMouseOut="if(document.images)document.search.src='<TMPL_VAR NAME='themelang'>/images/front-search.gif'"><img src="<TMPL_VAR NAME='themelang'>/images/front-search.gif" width=320 height=37 name="search"
|
||||
hspace=0 vspace=0 border=0></a></td>
|
||||
</tr>
|
||||
<FORM ACTION="/cgi-bin/koha/search.pl" method=post>
|
||||
<FORM ACTION="/cgi-bin/koha/loadmodules.pl" method=post>
|
||||
<tr valign=top >
|
||||
<td background="" rowspan=3 align="right" colspan=5>
|
||||
<img src="/images/holder.gif"
|
||||
|
|
@ -90,6 +90,8 @@ circulation.src ="<TMPL_VAR NAME='themelang'>/images/front-mouseover-circulation
|
|||
<td></td>
|
||||
<td></td>
|
||||
<td background="" colspan=3>
|
||||
<input type="hidden" name="module" value="search">
|
||||
<input type="hidden" name="type" value="intranet">
|
||||
<input type=text size="27" name="keyword"><input type=reset value="clr"><br>
|
||||
|
||||
<font size=1 face="arial,helvetica" ><b>Type in the box and press the enter key.</b><br>
|
||||
|
|
@ -111,7 +113,7 @@ circulation.src ="<TMPL_VAR NAME='themelang'>/images/front-mouseover-circulation
|
|||
<form action="/cgi-bin/koha/member.pl" method=post >
|
||||
<td background="" colspan=4>
|
||||
<a href="/cgi-bin/koha/members-home.pl" onMouseOver="if(document.images)document.member.src='<TMPL_VAR NAME='themelang'>/images/front-mouseover-member.gif'" onMouseOut="if(document.images)document.member.src='<TMPL_VAR NAME='themelang'>/images/front-member.gif'">
|
||||
<img src="<TMPL_VAR NAME='themelang'>/images/front-member.gif" width=304 height=37 name="member"
|
||||
<img src="<TMPL_VAR NAME='themelang'>/images/front-member.gif" width=304 height=37 name="member"
|
||||
hspace=0 vspace=0 border=0>
|
||||
</td>
|
||||
|
||||
|
|
|
|||
|
|
@ -12,19 +12,16 @@
|
|||
|
||||
<center>
|
||||
|
||||
<table border=0 cellspacing=0 cellpadding=2>
|
||||
<table border=0 cellspacing=0 cellpadding=2 width="90%">
|
||||
<thead>
|
||||
<tr
|
||||
<TMPL_IF NAME="opac">
|
||||
bgcolor=#99cccc background=/images/background-opac.gif
|
||||
<TMPL_ELSE>
|
||||
background="/images/background-mem.gif"
|
||||
bgcolor="#ad11ad"
|
||||
</TMPL_IF>
|
||||
>
|
||||
<!--
|
||||
<th colspan=5>Result</th>
|
||||
-->
|
||||
<th>Biblio#</th>
|
||||
<th>Biblio #</th>
|
||||
<th>Author</th>
|
||||
<th>Title</th>
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -17,9 +17,10 @@
|
|||
<table border=0 cellspacing=0 cellpadding=2>
|
||||
<tr
|
||||
<TMPL_IF NAME="opac">
|
||||
bgcolor="#ad11ad"
|
||||
bgcolor="#99cccc" background="/images/background-opac.gif"
|
||||
<TMPL_ELSE>
|
||||
background="/images/background-mem.gif"
|
||||
bgcolor="#ad11ad"
|
||||
</TMPL_IF>
|
||||
>
|
||||
<th colspan=6>Search</th>
|
||||
|
|
@ -34,15 +35,6 @@
|
|||
|
||||
<!-- 000000000000000000000000000000000000000000000000000000 -->
|
||||
<tr>
|
||||
<td rowspan=3
|
||||
<TMPL_IF NAME="opac">
|
||||
bgcolor=#99cccc background=/images/background-opac.gif
|
||||
<TMPL_ELSE>
|
||||
background="/images/background-mem.gif"
|
||||
</TMPL_IF>
|
||||
align=center valign=center>
|
||||
<b>0</b>
|
||||
</td>
|
||||
<td>
|
||||
<input type=hidden name="and_or" value="">
|
||||
</td>
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@ SWITCH: {
|
|||
if ($module eq 'somethingelse') { somethingelse(); last SWITCH; }
|
||||
}
|
||||
|
||||
|
||||
sub acquisitions {
|
||||
my $aq_type = C4::Context->preference("acquisitions") || "normal";
|
||||
# Get the acquisition preference. This should be:
|
||||
|
|
@ -55,12 +54,21 @@ sub acquisitions {
|
|||
sub catalogue_search {
|
||||
my $marc_p = C4::Context->boolean_preference("marc");
|
||||
$marc_p = 1 unless defined $marc_p;
|
||||
my $keyword=$input->param('keyword');
|
||||
my $query = new CGI;
|
||||
my $type = $query->param('type');
|
||||
if ($marc_p) {
|
||||
print $input->redirect("/cgi-bin/koha/search.marc/search.pl?type=$type");
|
||||
if ($keyword) {
|
||||
if ($marc_p) {
|
||||
print $input->redirect("/cgi-bin/koha/search.marc/search.pl?type=$type");
|
||||
} else {
|
||||
print $input ->redirect("/cgi-bin/koha/search.pl?keyword=$keyword");
|
||||
}
|
||||
} else {
|
||||
print $input ->redirect("/cgi-bin/koha/catalogue-home.pl");
|
||||
if ($marc_p) {
|
||||
print $input->redirect("/cgi-bin/koha/search.marc/search.pl?type=$type");
|
||||
} else {
|
||||
print $input ->redirect("/cgi-bin/koha/catalogue-home.pl");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@ use C4::Koha; # XXX subfield_is_koha_internal_p
|
|||
my $query=new CGI;
|
||||
my $type=$query->param('type');
|
||||
my $op = $query->param('op');
|
||||
#$type="opac" unless $type;
|
||||
|
||||
my $dbh = C4::Context->dbh;
|
||||
|
||||
|
|
@ -58,8 +57,8 @@ if ($op eq "do_search") {
|
|||
push @tags, substr($marc,0,3);
|
||||
push @subfields, substr($marc,3,1);
|
||||
}
|
||||
my @results = catalogsearch($dbh, \@tags, \@subfields, \@and_or,
|
||||
\@excluding, \@operator, \@value,
|
||||
my @results = catalogsearch($dbh, \@tags, \@subfields, \@and_or,
|
||||
\@excluding, \@operator, \@value,
|
||||
$startfrom, 20);
|
||||
($template, $loggedinuser, $cookie)
|
||||
= get_template_and_user({template_name => "search.marc/result.tmpl",
|
||||
|
|
|
|||
Loading…
Reference in New Issue