[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha C4/AuthoritiesMarc.pm koha-tmpl/intranet-t... [rel_2_2]
From: |
paul poulain |
Subject: |
[Koha-cvs] koha C4/AuthoritiesMarc.pm koha-tmpl/intranet-t... [rel_2_2] |
Date: |
Mon, 31 Jul 2006 13:29:14 +0000 |
CVSROOT: /cvsroot/koha
Module name: koha
Branch: rel_2_2
Changes by: paul poulain <tipaul> 06/07/31 13:29:14
Modified files:
C4 : AuthoritiesMarc.pm
koha-tmpl/intranet-tmpl/default/en/acqui.simple: addbiblio.tmpl
koha-tmpl/intranet-tmpl/default/en/authorities: auth_finder.tmpl
authorities-home.tmpl
koha-tmpl/opac-tmpl/css/en: opac-dictionary.tmpl
Log message:
- adding a 3rd option to authority search (search on $a of on all
subfields of main entry)
- removing automatic % add at the end of a search & adding a warning
for the user
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/AuthoritiesMarc.pm?cvsroot=koha&only_with_tag=rel_2_2&r1=1.9.2.19&r2=1.9.2.20
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/acqui.simple/addbiblio.tmpl?cvsroot=koha&only_with_tag=rel_2_2&r1=1.33.2.29&r2=1.33.2.30
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/authorities/auth_finder.tmpl?cvsroot=koha&only_with_tag=rel_2_2&r1=1.6.2.4&r2=1.6.2.5
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/authorities/authorities-home.tmpl?cvsroot=koha&only_with_tag=rel_2_2&r1=1.3.2.3&r2=1.3.2.4
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/en/opac-dictionary.tmpl?cvsroot=koha&only_with_tag=rel_2_2&r1=1.1.2.5&r2=1.1.2.6
Patches:
Index: C4/AuthoritiesMarc.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/AuthoritiesMarc.pm,v
retrieving revision 1.9.2.19
retrieving revision 1.9.2.20
diff -u -b -r1.9.2.19 -r1.9.2.20
--- C4/AuthoritiesMarc.pm 31 Jul 2006 10:15:42 -0000 1.9.2.19
+++ C4/AuthoritiesMarc.pm 31 Jul 2006 13:29:14 -0000 1.9.2.20
@@ -81,19 +81,26 @@
}
my ($tag_to_report) = $sth->fetchrow;
$mainentrytag = $tag_to_report;
- for (my $i=0;$i<$#{$tags};$i++) {
- if (@$tags[$i] eq "mainentry") {
- @$tags[$i] = $tag_to_report."a";
- }
- }
-
- # "Normal" statements
# quote marc fields/subfields
for (my $i=0;$i<=$#{$tags};$i++) {
if (@$tags[$i]) {
@$tags[$i] = $dbh->quote(@$tags[$i]);
}
}
+ for (my $i=0;$i<$#{$tags};$i++) {
+ if (@$tags[$i] eq "'mainentry'") {
+ @$tags[$i]="'";
+ foreach ('a'..'z') {
+ @$tags[$i] .= $tag_to_report.$_."','";
+ }
+ chop @$tags[$i];
+ chop @$tags[$i];
+ }
+ if (@$tags[$i] eq '\'$a\'') {
+ @$tags[$i] = "'".$tag_to_report.'a\'';
+ }
+ }
+
my @normal_tags = ();
my @normal_and_or = ();
my @normal_operator = ();
@@ -330,14 +337,14 @@
if ($nb_active==1) {
if (@$operator[$i] eq "start") {
$sql_tables .= "auth_subfield_table as
m$nb_table,";
- $sql_where1 .= "(m1.subfieldvalue like
".$dbh->quote("@$value[$i]%");
+ $sql_where1 .= "(m1.subfieldvalue like
".$dbh->quote("@$value[$i]");
if (@$tags[$i]) {
$sql_where1 .=" and
concat(m1.tag,m1.subfieldcode) in (@$tags[$i])";
}
$sql_where1.=")";
} elsif (@$operator[$i] eq "contains") {
$sql_tables .= "auth_word as m$nb_table,";
- $sql_where1 .= "(m1.word like
".$dbh->quote("@$value[$i]%");
+ $sql_where1 .= "(m1.word like
".$dbh->quote("@$value[$i]");
if (@$tags[$i]) {
$sql_where1 .=" and
m1.tagsubfield in (@$tags[$i])";
}
@@ -355,7 +362,7 @@
if (@$operator[$i] eq "start") {
$nb_table++;
$sql_tables .= "auth_subfield_table as
m$nb_table,";
- $sql_where1 .= "@$and_or[$i]
(m$nb_table.subfieldvalue like ".$dbh->quote("@$value[$i]%");
+ $sql_where1 .= "@$and_or[$i]
(m$nb_table.subfieldvalue like ".$dbh->quote("@$value[$i]");
if (@$tags[$i]) {
$sql_where1 .=" and
concat(m$nb_table.tag,m$nb_table.subfieldcode) in (@$tags[$i])";
}
@@ -365,14 +372,14 @@
if (@$and_or[$i] eq 'and') {
$nb_table++;
$sql_tables .= "auth_word as
m$nb_table,";
- $sql_where1 .= "@$and_or[$i]
(m$nb_table.word like ".$dbh->quote("@$value[$i]%");
+ $sql_where1 .= "@$and_or[$i]
(m$nb_table.word like ".$dbh->quote("@$value[$i]");
if (@$tags[$i]) {
$sql_where1 .=" and
m$nb_table.tagsubfield in(@$tags[$i])";
}
$sql_where1.=")";
$sql_where2 .=
"m1.authid=m$nb_table.authid and ";
} else {
- $sql_where1 .= "@$and_or[$i]
(m$nb_table.word like ".$dbh->quote("@$value[$i]%");
+ $sql_where1 .= "@$and_or[$i]
(m$nb_table.word like ".$dbh->quote("@$value[$i]");
if (@$tags[$i]) {
$sql_where1 .=" and
concat(m$nb_table.tag,m$nb_table.subfieldid) in (@$tags[$i])";
}
@@ -1303,8 +1310,12 @@
=cut
-# $Id: AuthoritiesMarc.pm,v 1.9.2.19 2006/07/31 10:15:42 hdl Exp $
+# $Id: AuthoritiesMarc.pm,v 1.9.2.20 2006/07/31 13:29:14 tipaul Exp $
# $Log: AuthoritiesMarc.pm,v $
+# Revision 1.9.2.20 2006/07/31 13:29:14 tipaul
+# - adding a 3rd option to authority search (search on $a of on all subfields
of main entry)
+# - removing automatic % add at the end of a search & adding a warning for the
user
+#
# Revision 1.9.2.19 2006/07/31 10:15:42 hdl
# BugFixing : MARCdetail : displayin field values with ESCAPE=HTML (in order
to manage '<''>' characters)
#
Index: koha-tmpl/intranet-tmpl/default/en/acqui.simple/addbiblio.tmpl
===================================================================
RCS file:
/cvsroot/koha/koha/koha-tmpl/intranet-tmpl/default/en/acqui.simple/addbiblio.tmpl,v
retrieving revision 1.33.2.29
retrieving revision 1.33.2.30
diff -u -b -r1.33.2.29 -r1.33.2.30
--- koha-tmpl/intranet-tmpl/default/en/acqui.simple/addbiblio.tmpl 25 Jul
2006 12:33:45 -0000 1.33.2.29
+++ koha-tmpl/intranet-tmpl/default/en/acqui.simple/addbiblio.tmpl 31 Jul
2006 13:29:14 -0000 1.33.2.30
@@ -244,7 +244,7 @@
}
function Dopop(link,i) {
defaultvalue=document.forms['f'].field_value[i].value;
- newin=window.open(link+"&result="+defaultvalue,"value
builder",'width=550,height=550,toolbar=false,scrollbars=yes');
+ newin=window.open(link+"&result="+defaultvalue,"value
builder",'width=700,height=550,toolbar=false,scrollbars=yes');
}
function PopupZ3950() {
@@ -297,7 +297,7 @@
// alert("X"+X);
Y=X.parentNode.getAttribute("id");
// alert("tagid"+Y);
- newin=window.open("../authorities/auth_finder.pl?authtypecode="+
authtype+ "&tagid="+Y, "value
builder",'width=550,height=550,toolbar=false,scrollbars=yes');
+ newin=window.open("../authorities/auth_finder.pl?authtypecode="+
authtype+ "&tagid="+Y, "value
builder",'width=700,height=550,toolbar=false,scrollbars=yes');
}
Index: koha-tmpl/intranet-tmpl/default/en/authorities/auth_finder.tmpl
===================================================================
RCS file:
/cvsroot/koha/koha/koha-tmpl/intranet-tmpl/default/en/authorities/auth_finder.tmpl,v
retrieving revision 1.6.2.4
retrieving revision 1.6.2.5
diff -u -b -r1.6.2.4 -r1.6.2.5
--- koha-tmpl/intranet-tmpl/default/en/authorities/auth_finder.tmpl 7 Apr
2006 11:39:43 -0000 1.6.2.4
+++ koha-tmpl/intranet-tmpl/default/en/authorities/auth_finder.tmpl 31 Jul
2006 13:29:14 -0000 1.6.2.5
@@ -15,29 +15,41 @@
<input type="hidden" name="authtypecode" value="<!--
TMPL_VAR NAME="authtypecode" -->">
</p>
<p>
- <label class="label100">Main entry</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="">
+ <label class="label100">Main entry ($a only)</label>
<select name="operator">
- <option value="start">start by</option>
<option value="contains">contains</option>
+ <option value="start">start by</option>
</select>
- <input type="hidden" name="index" value="<!-- TMPL_VAR
NAME="index" -->">
- <input type="hidden" name="tagid" value="<!-- TMPL_VAR
NAME="tagid" -->">
+ <input type="text" name="value" value="<!-- TMPL_VAR
NAME="value" -->">
+ <input type="hidden" name="marclist" value="$a">
+ <input type="hidden" name="and_or" value="and">
+ <input type="hidden" name="excluding" value="">
</p>
<p>
- <label class="label100">Anywhere</label><input
type="text" name="value">
- <input type="hidden" name="marclist" value="">
+ <label class="label100">Main entry</label>
+ <select name="operator">
+ <option value="contains">contains</option>
+ <option value="start">start by</option>
+ </select>
+ <input type="text" name="value" value="<!-- TMPL_VAR
NAME="value" -->">
+ <input type="hidden" name="marclist" value="mainentry">
<input type="hidden" name="and_or" value="and">
<input type="hidden" name="excluding" value="">
+ </p>
+ <p>
+ <label class="label100">Anywhere</label>
<select name="operator">
<option value="contains">contains</option>
<option value="start">start by</option>
</select>
+ <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="">
<input type="hidden" name="index" value="<!-- TMPL_VAR
NAME="index" -->">
<input type="hidden" name="tagid" value="<!-- TMPL_VAR
NAME="tagid" -->">
</p>
+ <p>(add % at the end of your word if you want to use right-truncation
: theor% will find theory & theories)</p>
<p>
<input type="submit" value="Start search" class="button
authority">
</p>
Index: koha-tmpl/intranet-tmpl/default/en/authorities/authorities-home.tmpl
===================================================================
RCS file:
/cvsroot/koha/koha/koha-tmpl/intranet-tmpl/default/en/authorities/authorities-home.tmpl,v
retrieving revision 1.3.2.3
retrieving revision 1.3.2.4
diff -u -b -r1.3.2.3 -r1.3.2.4
--- koha-tmpl/intranet-tmpl/default/en/authorities/authorities-home.tmpl
23 Sep 2005 09:49:22 -0000 1.3.2.3
+++ koha-tmpl/intranet-tmpl/default/en/authorities/authorities-home.tmpl
31 Jul 2006 13:29:14 -0000 1.3.2.4
@@ -18,27 +18,39 @@
</select>
</h2>
<p>
- <label class="label100">Main entry</label>
+ <label class="label100">Main entry ($a only)</label>
+ <select name="operator">
+ <option value="contains">contains</option>
+ <option value="start">start by</option>
+ </select>
<input type="text" name="value" value="<!-- TMPL_VAR
NAME="value" -->">
- <input type="hidden" name="marclist" value="mainentry">
+ <input type="hidden" name="marclist" value="$a">
<input type="hidden" name="and_or" value="and">
<input type="hidden" name="excluding" value="">
+ </p>
+ <p>
+ <label class="label100">Main entry</label>
<select name="operator">
<option value="contains">contains</option>
<option value="start">start by</option>
</select>
- </p>
- <p>
- <label class="label100">Anywhere</label>
<input type="text" name="value" value="<!-- TMPL_VAR
NAME="value" -->">
- <input type="hidden" name="marclist" value="">
+ <input type="hidden" name="marclist" value="mainentry">
<input type="hidden" name="and_or" value="and">
<input type="hidden" name="excluding" value="">
+ </p>
+ <p>
+ <label class="label100">Anywhere</label>
<select name="operator">
<option value="contains">contains</option>
<option value="start">start by</option>
</select>
+ <input type="text" name="value" value="<!-- TMPL_VAR
NAME="value" -->">
+ <input type="hidden" name="marclist" value="">
+ <input type="hidden" name="and_or" value="and">
+ <input type="hidden" name="excluding" value="">
</p>
+ <p>(add % at the end of your word if you want to use right-truncation
: <b>theor%</b> will find theory & theories)</p>
<p>
<input type="submit" value="Start search" class="button
authority">
</p>
Index: koha-tmpl/opac-tmpl/css/en/opac-dictionary.tmpl
===================================================================
RCS file: /cvsroot/koha/koha/koha-tmpl/opac-tmpl/css/en/opac-dictionary.tmpl,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -u -b -r1.1.2.5 -r1.1.2.6
--- koha-tmpl/opac-tmpl/css/en/opac-dictionary.tmpl 14 Jun 2006 15:42:50
-0000 1.1.2.5
+++ koha-tmpl/opac-tmpl/css/en/opac-dictionary.tmpl 31 Jul 2006 13:29:14
-0000 1.1.2.6
@@ -15,6 +15,7 @@
<input type="hidden" name="type" value="<!--
TMPL_VAR Name="type" -->">
<input type="hidden" name="index" value="<!--
TMPL_VAR Name="anindex" ESCAPE="URL" -->">
</p>
+ <p>(add % at the end of your word if you want to use
right-truncation : <b>theor%</b> will find theory & theories)</p>
</div>
</form>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] koha C4/AuthoritiesMarc.pm koha-tmpl/intranet-t... [rel_2_2],
paul poulain <=