sub manualinvoice {
my ( $borrowernumber, $itemnum, $desc, $type, $amount, $note ) = @_;
- my $manager_id = C4::Context->userenv->{'number'};
+ my $manager_id = 0;
+ $manager_id = C4::Context->userenv->{'number'} if C4::Context->userenv;
my $dbh = C4::Context->dbh;
my $notifyid = 0;
my $insert;
branchaddress2,branchaddress3,branchzip,branchcity,branchstate,
branchcountry,branchphone,branchfax,branchemail,
branchurl,branchip,branchprinter,branchnotes)
- VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
+ VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
";
my $sth = $dbh->prepare($query);
$sth->execute(
# Note: sort will override rank
my $sort_by;
foreach my $sort (@sort_by) {
- if ( $sort eq "author_az" ) {
+ if ( $sort eq "author_az" || $sort eq "author_asc" ) {
$sort_by .= "1=1003 <i ";
}
- elsif ( $sort eq "author_za" ) {
+ elsif ( $sort eq "author_za" || $sort eq "author_dsc" ) {
$sort_by .= "1=1003 >i ";
}
elsif ( $sort eq "popularity_asc" ) {
elsif ( $sort eq "acqdate_dsc" ) {
$sort_by .= "1=32 >i ";
}
- elsif ( $sort eq "title_az" ) {
+ elsif ( $sort eq "title_az" || $sort eq "title_asc" ) {
$sort_by .= "1=4 <i ";
}
- elsif ( $sort eq "title_za" ) {
+ elsif ( $sort eq "title_za" || $sort eq "title_dsc" ) {
$sort_by .= "1=4 >i ";
}
else {
# sort the hash and return the same structure as GetRecords (Zebra querying)
my $result_hash;
my $numbers = 0;
- if ( $ordering eq 'author_za' ) { # sort by author desc
+ if ( $ordering eq 'author_za' || $ordering eq 'author_dsc' ) { # sort by author desc
foreach my $key ( sort { $b cmp $a } ( keys %result ) ) {
$result_hash->{'RECORDS'}[ $numbers++ ] =
$result{$key}->as_usmarc();
utf8_arrayref($vars->{$k});
}
elsif (ref($vars->{$k}) eq 'HASH'){
- uft8_hashref($vars->{$k});
+ utf8_hashref($vars->{$k});
}
else {
utf8::encode($vars->{$k}) if utf8::is_utf8($vars->{$k});
$query or die "No query";
$template or die "No template";
$template->param( { loggedinuser => $loggedinuser } );
+ my $edit;
+ my $shelves;
my @paramsloop;
my $totitems;
my $shelfoff = ( $query->param('shelfoff') ? $query->param('shelfoff') : 1 );
my ( $shelfnumber2, $shelfname, $owner, $category, $sortfield ) = GetShelf($shelfnumber);
my $member = GetMember( 'borrowernumber' => $owner );
my $ownername = defined($member) ? $member->{firstname} . " " . $member->{surname} : '';
+ $edit = 1;
$template->param(
edit => 1,
shelfnumber => $shelfnumber2,
$stay = 0;
}
$showadd = 1;
- $stay and $template->param( shelves => 1 );
+ $stay and $template->param( shelves => 1 ) and $shelves = 1;
last SWITCH;
}
}
$qhash{$_} = $query->param($_) if $query->param($_);
}
( scalar keys %qhash ) and $url .= '?' . join '&', map { "$_=$qhash{$_}" } keys %qhash;
- if ( $query->param('viewshelf') ) {
+ if ( $shelfnumber ) {
$template->param( { pagination_bar => pagination_bar( $url, ( int( $totitems / $shelflimit ) ) + ( ( $totitems % $shelflimit ) > 0 ? 1 : 0 ), $itemoff, "itemoff" ) } );
} else {
$template->param(
"BiblioDefaultView" . C4::Context->preference("BiblioDefaultView") => 1,
csv_profiles => GetCsvProfilesLoop()
);
- if ( $template->param('viewshelf')
- or $template->param('shelves')
- or $template->param('edit') ) {
+ if ( $shelfnumber
+ or $shelves
+ or $edit ) {
$template->param( vseflag => 1 );
}
- if ($template->param('shelves') or # note: this part looks duplicative, but is intentional
- $template->param('edit')
+ if ($shelves or # note: this part looks duplicative, but is intentional
+ $edit
) {
$template->param( seflag => 1 );
}
my $errorXml = '';
# Check if the xml, xsd exists and is validated
- my $dir = C4::Context->config('intrahtdocs') . '/prog/' . $template->param('lang') . '/modules/cataloguing/value_builder/';
+ my $dir = C4::Context->config('intrahtdocs') . '/prog/' . $template->{lang} . '/modules/cataloguing/value_builder/';
if (-r $dir . 'marc21_field_006.xml') {
my $doc = XML::LibXML->new->parse_file($dir . 'marc21_field_006.xml');
if (-r $dir . 'marc21_field_CF.xsd') {
$result = "$dateentered" . "t xxu||||| |||| 00| 0 eng d" unless $result;
my $errorXml = '';
# Check if the xml, xsd exists and is validated
- my $dir = C4::Context->config('intrahtdocs') . '/prog/' . $template->param('lang') . '/modules/cataloguing/value_builder/';
+ my $dir = C4::Context->config('intrahtdocs') . '/prog/' . $template->{lang} . '/modules/cataloguing/value_builder/';
if (-r $dir . 'marc21_field_008.xml') {
my $doc = XML::LibXML->new->parse_file($dir . 'marc21_field_008.xml');
if (-r $dir . 'marc21_field_CF.xsd') {
--- /dev/null
+#!/usr/bin/perl
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with Koha; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+=head1 SYNOPSIS
+
+This plugin is used to map isbn/editor with collection.
+It need :
+ in thesaurus, a category named EDITORS
+ in this category, datas must be entered like following :
+ isbn separator editor separator collection.
+ for example :
+ 2204 -- Cerf -- Cogitatio fidei
+ 2204 -- Cerf -- Le Magistere de l'Eglise
+ 2204 -- Cerf -- Lectio divina
+ 2204 -- Cerf -- Lire la Bible
+ 2204 -- Cerf -- Pour lire
+ 2204 -- Cerf -- Sources chretiennes
+
+ when the user clic on ... on 225a line, the popup shows the list of collections from the selected editor
+ if the biblio has no isbn, then the search if done on editor only
+ If the biblio ha an isbn, the search is done on isbn and editor. It's faster.
+
+=over 2
+
+=cut
+
+use strict;
+
+#use warnings; FIXME - Bug 2505
+use C4::Auth;
+use CGI;
+use C4::Context;
+
+use C4::AuthoritiesMarc;
+use C4::Output;
+
+=head1
+
+plugin_parameters : other parameters added when the plugin is called by the dopop function
+
+=cut
+
+sub plugin_parameters {
+ my ( $dbh, $record, $tagslib, $i, $tabloop ) = @_;
+ return "";
+}
+
+sub plugin_javascript {
+ my ( $dbh, $record, $tagslib, $field_number, $tabloop ) = @_;
+ my $function_name = $field_number;
+ my $res = "
+ <script type=\"text/javascript\">
+ function Focus$function_name(subfield_managed) {
+ return 1;
+ }
+
+ function Blur$function_name(subfield_managed) {
+ return 1;
+ }
+
+ function Clic$function_name(index) {
+ window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_210c_bis.pl&index=\"+index,\"unimarc210c\",'width=500,height=400,toolbar=false,scrollbars=no');
+ }
+ </script>
+";
+
+ return ( $function_name, $res );
+}
+
+sub plugin {
+ my ($input) = @_;
+ my $index = $input->param('index');
+ my $result = $input->param('result');
+ my $editor_found = $input->param('editor_found');
+ my $authoritysep = C4::Context->preference("authoritysep");
+ warn Data::Dumper::Dumper $index;
+
+ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
+ { template_name => "cataloguing/value_builder/unimarc_field_210c_bis.tmpl",
+ query => $input,
+ type => "intranet",
+ authnotrequired => 0,
+ flagsrequired => { editcatalogue => '*' },
+ debug => 1,
+ }
+ );
+
+ $template->param(
+ index => $index,
+ );
+ output_html_with_http_headers $input, $cookie, $template->output;
+}
+
+1;
--- /dev/null
+#!/usr/bin/perl
+
+# This software is placed under the gnu General Public License, v2 (http://www.gnu.org/licenses/gpl.html)
+
+# Copyright 2007 Tamil s.a.r.l.
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with Koha; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+=head1 ysearch.pl
+
+
+=cut
+
+use strict;
+
+#use warnings; FIXME - Bug 2505
+use CGI;
+use C4::Context;
+use C4::Auth qw/check_cookie_auth/;
+
+my $input = new CGI;
+my $query = $input->param('query');
+my $table = $input->param('table');
+my $field = $input->param('field');
+
+# Prevent from disclosing data
+die() unless ($table eq "biblioitems");
+
+binmode STDOUT, ":utf8";
+print $input->header( -type => 'text/plain', -charset => 'UTF-8' );
+
+my ( $auth_status, $sessionID ) = check_cookie_auth( $input->cookie('CGISESSID'), { cataloguing => '*' } );
+if ( $auth_status ne "ok" ) {
+ exit 0;
+}
+
+my $dbh = C4::Context->dbh;
+my $sql = qq(SELECT distinct $field
+ FROM $table
+ WHERE $field LIKE ? OR $field LIKE ? or $field LIKE ?);
+$sql .= qq( ORDER BY $field);
+my $sth = $dbh->prepare($sql);
+$sth->execute("$query%", "% $query%", "%-$query%");
+
+while ( my $rec = $sth->fetchrow_hashref ) {
+ print nsb_clean($rec->{$field}) . "\n";
+}
+
+sub nsb_clean {
+ my $NSB = '\x88' ; # NSB : begin Non Sorting Block
+ my $NSE = '\x89' ; # NSE : Non Sorting Block end
+ my $NSB2 = '\x98' ; # NSB : begin Non Sorting Block
+ my $NSE2 = '\x9C' ; # NSE : Non Sorting Block end
+ # handles non sorting blocks
+ my ($string) = @_ ;
+ $_ = $string ;
+ s/$NSB//g ;
+ s/$NSE//g ;
+ s/$NSB2//g ;
+ s/$NSE2//g ;
+ $string = $_ ;
+
+ return($string) ;
+}
+
$template->param( fineborrowernumber => $borrower->{'borrowernumber'} );
}
}
-
+
+ if (C4::Context->preference("WaitingNotifyAtCheckin") ) {
+ #Check for waiting holds
+ my @reserves = GetReservesFromBorrowernumber($borrower->{'borrowernumber'});
+ my $waiting_holds;
+ foreach my $num_res (@reserves) {
+ if ( $num_res->{'found'} eq 'W' && $num_res->{'branchcode'} eq $userenv_branch) {
+ $waiting_holds++;
+ }
+ }
+ if ($waiting_holds > 0) {
+ $template->param(
+ waiting_holds => $waiting_holds,
+ holdsborrowernumber => $borrower->{'borrowernumber'},
+ );
+ }
+ }
}
elsif ( !$messages->{'BadBarcode'} ) {
$input{duedate} = 0;
March 22 2011 Koha 3.2.6 released
March 31 2011 Doug Dearden becomes the 138th developer to have a patch pushed
April 8 2011 Mark Gavillet becomes the 139th developer to have a patch pushed
+April 9 2011 Frederic Durand becomes the 140th developer to have a patch pushed
+April 9 2011 Jonathan Druart becomes the 141st developer to have a patch pushed
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('FinesLog',1,'If ON, log fines',NULL,'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('hidelostitems',0,'If ON, disables display of\"lost\" items in OPAC.','','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('hide_marc',0,'If ON, disables display of MARC fields, subfield codes & indicators (still shows data)',NULL,'YesNo');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('WaitingNotifyAtCheckin',0,'If ON, notify librarians of waiting holds for the patron whose items they are checking in.',NULL,'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('IndependantBranches',0,'If ON, increases security between libraries',NULL,'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('insecure',0,'If ON, bypasses all authentication. Be careful!',NULL,'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('IntranetBiblioDefaultView','normal','Choose the default detail view in the staff interface; choose between normal, labeled_marc, marc or isbd','normal|marc|isbd|labeled_marc','Choice');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('FinesLog',1,'If ON, log fines',NULL,'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('hidelostitems',0,'If ON, disables display of\"lost\" items in OPAC.','','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('hide_marc',0,'If ON, disables display of MARC fields, subfield codes & indicators (still shows data)',NULL,'YesNo');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('WaitingNotifyAtCheckin',0,'If ON, notify librarians of waiting holds for the patron whose items they are checking in.',NULL,'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('IndependantBranches',0,'If ON, increases security between libraries',NULL,'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('insecure',0,'If ON, bypasses all authentication. Be careful!',NULL,'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('IntranetBiblioDefaultView','normal','Choose the default detail view in the staff interface; choose between normal, labeled_marc, marc or isbd','normal|marc|isbd|labeled_marc','Choice');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('gist', '0', 'Ce paramètre définit le taux de TVA. Attention : ce n''est pas un % mais un nombre (0.055 et pas 5.5%) Laisser à 0 si vous ne récupérez pas la TVA, ce qui est le cas de la plupart des bibliothèques françaises', '', 'Integer');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('hidelostitems', '0', 'Si ce paramètre est activé, l''OPAC n''affichera pas les notices pour lesquelles le ou les exemplaires sont marqués "perdus"', '', 'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('hide_marc', '0', 'Si ce paramètre est positionné, les code des champs et sous-champs MARC sont cachés, on ne voit que les libellés.', '', 'YesNo');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('WaitingNotifyAtCheckin',0,'If ON, notify librarians of waiting holds for the patron whose items they are checking in.',NULL,'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('IndependantBranches', '0', 'Si ce paramètre est à "Oui", chaque site est indépendant au niveau de ses acquisitions, de son catalogage, de l''inscription de ses lecteurs...', '', 'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('insecure', '0', 'Ce paramètre, s''il est positionné à "Oui", permet d''utiliser Koha sans mot de passe. A utiliser avec précaution. Devrait être à "Non" normalement', '', 'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('intranetcolorstylesheet', '', 'Ce paramètre permet de définir un jeu de couleur alternatif dans l''interface professionnelle', '50', 'free');
insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('GoogleJackets','1','','Se ON, visualizza le copertine usando Google Books','YesNo');
insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('hidelostitems','0','','Se ON, viene disabilitata la visualizzazione nell\'OPAC delle copie perse.','YesNo');
insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('hide_marc','0','','Se su ON, disabilita la visualizzazione dei campi del MARC, codici di sottocampi e indicatori (mostra ancora i dati)','YesNo');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('WaitingNotifyAtCheckin',0,'If ON, notify librarians of waiting holds for the patron whose items they are checking in.',NULL,'YesNo');
insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('HomeOrHoldingBranch','holdingbranch','holdingbranch|homebranch','Se IndependantBranches e\' settata su ON, allora il sitema legge questa variabile. Se questa variabile e\' sul valore \'homebranch\' quando arriva una copia di un\'altra biblioteca si puo\' registare la restituzione dove la copia e\' arrivata. Se invece vale \'holdingbranch\', allora non si puo fare la restituzione ma solo prenderla e inviarla alla biblioteca di appartenenza; là verrà fatta la restituzione ','Choice');
insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('IndependantBranches','0','','Se è ON, aumenta il livello di sicurezza tra le biblioteche','YesNo');
insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('insecure','0','','Se è su ON, tutte le richieste di autenticazioni vengono aggirate. Attenzione!','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsField','','The MARC field/subfield that contains alternate holdings information for bibs taht do not have items attached (e.g. 852abchi for libraries converting from MARC Magician).',NULL,'free');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsSeparator','','The string to use to separate subfields in alternate holdings displays.',NULL,'free');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/O pacHiddenItems.txt for more informations.','','Textarea');
+
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('FinesLog',1,'If ON, log fines',NULL,'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('hidelostitems',0,'If ON, disables display of\"lost\" items in OPAC.','','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('hide_marc',0,'If ON, disables display of MARC fields, subfield codes & indicators (still shows data)',NULL,'YesNo');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('WaitingNotifyAtCheckin',0,'If ON, notify librarians of waiting holds for the patron whose items they are checking in.',NULL,'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('IndependantBranches',0,'If ON, increases security between libraries',NULL,'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('insecure',0,'If ON, bypasses all authentication. Be careful!',NULL,'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('IntranetBiblioDefaultView','normal','Choose the default detail view in the staff interface; choose between normal, labeled_marc, marc or isbd','normal|marc|isbd|labeled_marc','Choice');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('FinesLog',1,'If ON, log fines',NULL,'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('hidelostitems',0,'If ON, disables display of\"lost\" items in OPAC.','','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('hide_marc',0,'If ON, disables display of MARC fields, subfield codes & indicators (still shows data)',NULL,'YesNo');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('WaitingNotifyAtCheckin',0,'If ON, notify librarians of waiting holds for the patron whose items they are checking in.',NULL,'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('IndependantBranches',0,'If ON, increases security between libraries',NULL,'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('insecure',0,'If ON, bypasses all authentication. Be careful!',NULL,'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('IntranetBiblioDefaultView','normal','IntranetBiblioDefaultView','normal|marc|isbd|labeled_marc','Choice');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsField','','The MARC field/subfield that contains alternate holdings information for bibs taht do not have items attached (e.g. 852abchi for libraries converting from MARC Magician).',NULL,'free');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsSeparator','','The string to use to separate subfields in alternate holdings displays.',NULL,'free');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','','Textarea');
+
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('FinesLog',1,'If ON, log fines',NULL,'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('hidelostitems',0,'If ON, disables display of\"lost\" items in OPAC.','','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('hide_marc',0,'If ON, disables display of MARC fields, subfield codes & indicators (still shows data)',NULL,'YesNo');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('WaitingNotifyAtCheckin',0,'If ON, notify librarians of waiting holds for the patron whose items they are checking in.',NULL,'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('IndependantBranches',0,'If ON, increases security between libraries',NULL,'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('insecure',0,'If ON, bypasses all authentication. Be careful!',NULL,'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('IntranetBiblioDefaultView','normal','IntranetBiblioDefaultView','normal|marc|isbd|labeled_marc','Choice');
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
$dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('TraceSubjectSubdivisions', 1, 'Create searches on all subdivisions for subject tracings.','1','YesNo')");
print "Upgrade to $DBversion done ( include subdivisions when generating subject tracing searches )\n";
+}
+
+$DBversion = "3.03.00.XXX";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('WaitingNotifyAtCheckin',0,'If ON, notify librarians of waiting holds for the patron whose items they are checking in.',NULL,'YesNo');");
+ print "Upgrade to $DBversion done (Add syspref WaitingNotifyAtCheckin)\n";
SetVersion ($DBversion);
}
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
print "Upgrade to $DBversion done (Remove spaces and dashes from message_attribute names)\n";
$dbh->do("UPDATE message_attributes SET message_name = 'Item_Due' WHERE message_name='Item Due'");
- $dbh->do("UPDATE message_attributes SET message_name = 'Advance_Notice' WHERE message_name='Advance_Notice'");
+ $dbh->do("UPDATE message_attributes SET message_name = 'Advance_Notice' WHERE message_name='Advance Notice'");
$dbh->do("UPDATE message_attributes SET message_name = 'Hold_Filled' WHERE message_name='Hold Filled'");
$dbh->do("UPDATE message_attributes SET message_name = 'Item_Check_in' WHERE message_name='Item Check-in'");
$dbh->do("UPDATE message_attributes SET message_name = 'Item_Checkout' WHERE message_name='Item Checkout'");
[% FOREACH auth_cats_loo IN auth_cats_loop %]
{ text: _("Plan by [% auth_cats_loo.authcat %] "),
url: "/cgi-bin/koha/admin/aqplan.pl?budget_period_id=[% auth_cats_loo.budget_period_id %]&authcat=[% auth_cats_loo.authcat %]"
- [% UNLESS ( auth_cats_loo.CAN_user_acquisition_planning_manage ) %], id:'disabled' [% END %]
+ [% UNLESS ( CAN_user_acquisition_planning_manage ) %], id:'disabled' [% END %]
},
[% END %]
[% END %]
[% ELSE %]
<tr>
[% END %]
- <td>[% IF ( loop_supplier.CAN_user_acquisition_order_manage ) %]
+ <td>[% IF ( CAN_user_acquisition_order_manage ) %]
[% IF ( loop_supplier.active ) %]
<a href="basketheader.pl?booksellerid=[% loop_supplier.supplierid %]&op=add_form">New basket</a>
[% ELSE %]
<th>Copyright</th>
<th colspan="2"> </th>
</tr>
- [% FOREACH resultsloo IN resultsloop %]
+ [% FOREACH biblio IN resultsloop %]
<tr>
<td>
- <p><span class="title">[% resultsloo.title |html %]</span>
- [% IF ( resultsloo.author ) %] by <span class="author">[% resultsloo.author %]</span>,[% END %]</p>
- <p>[% IF ( resultsloo.isbn ) %] [% resultsloo.isbn %][% END %]
- [% IF ( resultsloo.pages ) %] - [% resultsloo.pages %][% END %]
- [% IF ( resultsloo.notes ) %] : [% resultsloo.notes %][% END %]
- [% IF ( resultsloo.size ) %] ; [% resultsloo.size %][% END %]
+ <p><span class="title">[% biblio.title |html %]</span>
+ [% IF ( biblio.author ) %] by <span class="author">[% biblio.author %]</span>,[% END %]</p>
+ <p>[% IF ( biblio.isbn ) %] [% biblio.isbn %][% END %]
+ [% IF ( biblio.pages ) %] - [% biblio.pages %][% END %]
+ [% IF ( biblio.notes ) %] : [% biblio.notes %][% END %]
+ [% IF ( biblio.size ) %] ; [% biblio.size %][% END %]
</p>
</td>
<td>
- [% resultsloo.publishercode %]
- [% IF ( resultsloo.place ) %] ; [% resultsloo.place %][% END %]
+ [% biblio.publishercode %]
+ [% IF ( biblio.place ) %] ; [% biblio.place %][% END %]
</td>
<td>
- [% resultsloo.copyrightdate %]
+ [% biblio.copyrightdate %]
</td>
<td>
- <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% resultsloo.biblionumber %]" title="MARC" rel="gb_page_center[600,500]">View MARC</a>
+ <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% biblio.biblionumber %]" title="MARC" rel="gb_page_center[600,500]">View MARC</a>
</td>
<td>
- <a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=[% resultsloo.booksellerid %]&basketno=[% resultsloo.basketno %]&biblionumber=[% resultsloo.biblionumber %]" title="Order this one">
+ <a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=[% biblio.booksellerid %]&basketno=[% basketno %]&biblionumber=[% biblio.biblionumber %]" title="Order this one">
Order
</a>
</td>
yes: Notify
no: "Don't notify"
- librarians of overdue fines on the items they are checking in.
+ -
+ - pref: WaitingNotifyAtCheckin
+ choices:
+ yes: Notify
+ no: "Don't notify"
+ - librarians of waiting holds for the patron whose items they are checking in.
-
- pref: FilterBeforeOverdueReport
choices:
<!-- BOOLEAN SEARCH OPTIONS -->
<fieldset>
<legend>Search For: </legend>
- [% FOREACH search_boxes_loo IN search_boxes_loop %]
- [% IF ( search_boxes_loo.search_boxes_label ) %]<div style="text-indent: 4.5em;">[% ELSE %]<div>[% END %]
- [% IF ( search_boxes_loo.expanded_options ) %]
- [% IF ( search_boxes_loo.boolean ) %]
+ [% FOREACH search_box IN search_boxes_loop %]
+ [% IF ( search_boxes_label ) %]<div style="text-indent: 4.5em;">[% ELSE %]<div>[% END %]
+ [% IF ( expanded_options ) %]
+ [% IF ( search_box.boolean ) %]
<select name="op">
<option value="and" selected="selected">and</option>
<option value="or">or</option>
[% END %]
[% INCLUDE 'search_indexes.inc' %]
<input type="text" size="30" name="q" title="Enter search terms" value="" />
- [% IF ( search_boxes_loo.expanded_options ) %]
- [% IF ( search_boxes_loo.add_field ) %]
+ [% IF ( expanded_options ) %]
+ [% IF ( search_box.add_field ) %]
<a href="JavaScript:add_field();" id="ButtonPlus" title="Add another field">[+]</a>
[% END %]
- [% IF ( search_boxes_loo.scan_index ) %]
- <label for="scan">Scan Indexes</label><input type="checkbox" name="scan" id="scan" value="1" />
- [% END %]
+ [% IF ( search_box.scan_index ) %]
+ <label for="scan">Scan Indexes</label><input type="checkbox" name="scan" id="scan" value="1" />
+ [% END %]
[% END %]
</div>
[% END %]
[% FOREACH ITEM_DAT IN ITEM_DATA %]
<div class="yui-g">
<h3 id="item[% ITEM_DAT.itemnumber %]">Barcode [% ITEM_DAT.barcode %] [% IF ( ITEM_DAT.notforloantext ) %][% ITEM_DAT.notforloantext %] [% END %]</h3>
- <div class="listgroup"><h4>Item Information [% IF ( ITEM_DAT.CAN_user_editcatalogue_edit_catalogue ) %][% UNLESS ( ITEM_DAT.nomod ) %]
- [% IF ( ITEM_DAT.CAN_user_editcatalogue_edit_items ) %]
+ <div class="listgroup"><h4>Item Information [% IF ( CAN_user_editcatalogue_edit_catalogue ) %][% UNLESS ( ITEM_DAT.nomod ) %]
+ [% IF ( CAN_user_editcatalogue_edit_items ) %]
<a href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% ITEM_DAT.biblionumber %]&itemnumber=[% ITEM_DAT.itemnumber %]">[Edit Item]</a>
[% END %]
[% END %][% END %]</h4>
<li><span class="label">Current Renewals:</span> [% ITEM_DAT.renewals %] </li>
[% IF ( ITEM_DAT.itemlostloop ) %]
<li><span class="label">Lost Status:</span>
- [% IF ( ITEM_DAT.CAN_user_circulate ) %]
+ [% IF ( CAN_user_circulate ) %]
<form action="updateitem.pl" method="post">
<input type="hidden" name="biblionumber" value="[% ITEM_DAT.biblionumber %]" />
<input type="hidden" name="biblioitemnumber" value="[% ITEM_DAT.biblioitemnumber %]" />
[% END %]
[% IF ( ITEM_DAT.itemdamagedloop ) %]
<li><span class="label">Damaged Status:</span>
- [% IF ( ITEM_DAT.CAN_user_circulate ) %]
+ [% IF ( CAN_user_circulate ) %]
<form action="updateitem.pl" method="post">
<input type="hidden" name="biblionumber" value="[% ITEM_DAT.biblionumber %]" />
<input type="hidden" name="biblioitemnumber" value="[% ITEM_DAT.biblioitemnumber %]" />
</li>
[% END %]
<li><span class="label">Withdrawn?:</span>[% IF ( ITEM_DAT.wthdrawn ) %]Yes[% ELSE %]No[% END %]
- [% IF ( ITEM_DAT.CAN_user_circulate ) %]
+ [% IF ( CAN_user_circulate ) %]
<form action="updateitem.pl" method="post">
<input type="hidden" name="biblionumber" value="[% ITEM_DAT.biblionumber %]" />
<input type="hidden" name="biblioitemnumber" value="[% ITEM_DAT.biblioitemnumber %]" />
<ol class="bibliodetails">
<li><span class="label">
- [% IF ( ITEM_DAT.CAN_user_editcatalogue_edit_catalogue ) %]
+ [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]
Accession Date:</span>
[% IF ( ITEM_DAT.basketno ) %]
<li><span class="label">Paid for?:</span> [% ITEM_DAT.paidfor %] </li>
<li><span class="label">Serial enumeration:</span> [% ITEM_DAT.enumchron %] </li>
<li><span class="label">Public Note:</span>
- [% IF ( ITEM_DAT.CAN_user_editcatalogue_edit_items ) %]
+ [% IF ( CAN_user_editcatalogue_edit_items ) %]
<form class="inline" action="updateitem.pl" method="post"><input type="hidden" name="biblionumber" value="[% ITEM_DAT.biblionumber %]" />
<input type="hidden" name="biblioitemnumber" value="[% ITEM_DAT.biblioitemnumber %]" /><input type="hidden" name="itemnumber" value="[% ITEM_DAT.itemnumber %]" />
<textarea name="itemnotes" rows="2" cols="30">[% ITEM_DAT.itemnotes %]</textarea><input type="submit" name="submit" class="submit" value="Update" />
</td>
<td> <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% resultsloo.biblionumber %]" title="MARC" rel="gb_page_center[600,500]">MARC</a> | <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&id=[% resultsloo.biblionumber %]" title="MARC" rel="gb_page_center[600,500]">Card</a>
</td>
- [% IF ( resultsloo.CAN_user_editcatalogue_edit_catalogue ) %]<td><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% resultsloo.biblionumber %]">Edit biblio</a></td>[% END %]
- [% IF ( resultsloo.CAN_user_editcatalogue_edit_items ) %]<td><a href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% resultsloo.biblionumber %]">Add/Edit Items</a></td>[% END %]
+ [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]<td><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% resultsloo.biblionumber %]">Edit biblio</a></td>[% END %]
+ [% IF ( CAN_user_editcatalogue_edit_items ) %]<td><a href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% resultsloo.biblionumber %]">Add/Edit Items</a></td>[% END %]
</tr>
[% END %]
</table>
<td> <a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.id %]" title="MARC" rel="gb_page_center[600,500]">MARC</a> | <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&importid=[% breeding_loo.id %]" title="MARC" rel="gb_page_center[600,500]">Card</a>
</td>
<td>
- <a href="/cgi-bin/koha/cataloguing/addbiblio.pl?breedingid=[% breeding_loo.id %]" [% UNLESS ( breeding_loo.CAN_user_editcatalogue_edit_catalogue ) %] class="disabled" onclick="return false;"[% END %]>Add biblio</a>
+ <a href="/cgi-bin/koha/cataloguing/addbiblio.pl?breedingid=[% breeding_loo.id %]" [% UNLESS ( CAN_user_editcatalogue_edit_catalogue ) %] class="disabled" onclick="return false;"[% END %]>Add biblio</a>
</td>
</tr>
[% END %]
</tr>
[% FOREACH item_loo IN item_loop %]
<tr id="row[% item_loo.itemnumber %]">
- [% IF ( item_loo.nomod ) %] <td colspan="2"> </td>[% ELSE %]<td><a href="additem.pl?op=edititem&biblionumber=[% item_loo.biblionumber %]&itemnumber=[% item_loo.itemnumber %]#edititem">Edit</a></td>
+ [% IF ( item_loo.nomod ) %] <td colspan="2"> </td>[% ELSE %]<td><a href="additem.pl?op=edititem&biblionumber=[% biblionumber %]&itemnumber=[% item_loo.itemnumber %]#edititem">Edit</a></td>
<td><a class="delete" href="/cgi-bin/koha/cataloguing/additem.pl?op=delitem&biblionumber=[% item_loo.biblionumber %]&itemnumber=[% item_loo.itemnumber %]" onclick="confirm_deletion([% item_loo.biblionumber %],[% item_loo.itemnumber %]); return false;">Delete</a></td>[% END %]
[% FOREACH item_valu IN item_loo.item_value %]
<td>[% item_valu.field |html %]</td>
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD Xhtml 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>UNIMARC_Field 225a builder</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <script type="text/javascript" src="[% yuipath %]/utilities/utilities.js"></script>
+ <script type="text/javascript" src="[% yuipath %]/datasource/datasource.js"></script>
+ <script type="text/javascript" src="[% yuipath %]/autocomplete/autocomplete-min.js"></script>
+ <link rel="stylesheet" type="text/css" href="[% themelang %]/css/staff-global.css" />
+
+</head>
+<body>
+<div id="header_search">
+<script type="text/javascript">
+//<![CDATA[
+YAHOO.util.Event.onContentReady("header_search", function() {
+ new function() {
+ // Define a custom formatter function
+ this.fnCustomFormatter = function(oResultItem, sQuery) {
+ var name = oResultItem[0];
+ var aMarkup = [
+ "<div class=\"sample-result\">",
+ name,
+ "<\/div>"];
+ return (aMarkup.join(""));
+ };
+
+ // Instantiate one XHR DataSource and define schema as an array:
+ // ["Record Delimiter",
+ // "Field Delimiter"]
+ this.oACDS = new YAHOO.widget.DS_XHR("/cgi-bin/koha/cataloguing/ysearch.pl", ["\n", "\t"]);
+ this.oACDS.scriptQueryAppend = "table=biblioitems&field=publishercode";
+ this.oACDS.responseType = YAHOO.widget.DS_XHR.TYPE_FLAT;
+ this.oACDS.maxCacheEntries = 60;
+ this.oACDS.queryMatchSubset = false;
+
+ // Instantiate first AutoComplete
+ var myInput = document.getElementById('findvalue');
+ var myContainer = document.getElementById('yvaluecontainer');
+ this.oAutoComp = new YAHOO.widget.AutoComplete(myInput,myContainer,this.oACDS);
+ //this.oAutoComp.delimChar = ";";
+ this.oAutoComp.queryDelay = 1;
+ this.oAutoComp.formatResult = this.fnCustomFormatter;
+ this.oAutoComp.maxResultsDisplayed = 1000;
+}
+});
+//]]>
+</script>
+ <div id="mainbloc">
+
+<div id="plugin">
+<div class="autocomplete">
+ <form name="f_pop" onsubmit="javascript:report()" action="">
+ <div id="borrowerautocomplete" class="autocomplete">
+ <input autocomplete="off" id="findvalue" name="findvalue" size="40" class="focus" type="text" /><br /><br />
+ <input id="ysearchsubmit" type="submit" class="submit" value="Submit" />
+ <div id="yvaluecontainer"></div>
+ </div>
+ </form>
+ </div>
+</div>
+</div>
+ <script type="text/javascript">
+ function report() {
+ var doc = opener.document;
+ var field = doc.getElementById("[% index %]");
+ field.value = document.f_pop.findvalue.value;
+
+ window.close();
+ return false;
+ }
+ </script>
+</body>
+</html>
</div>
[% END %]
+<!-- Patron has waiting holds -->
+[% IF ( waiting_holds ) %]
+ <div class="dialog alert">
+ <h3>Patron has [% waiting_holds %] hold(s) waiting for pickup.</h3>
+ <p><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% holdsborrowernumber %]">Checkout holds</a>.</p>
+ </div>
+[% END %]
+
[% IF ( wrongbranch ) %]
<div class="dialog alert"><h3>Cannot Check In</h3><p>This item must be checked in at its home library. <strong>NOT CHECKED IN</strong></p>
[% FOREACH koha_new IN koha_news %]
<div class="newsitem" id="news[% koha_new.idnew %]"><h4>[% koha_new.title %]</h4>
<p>[% koha_new.new %]</p>
- <p class="newsfooter"> Posted on [% koha_new.newdate %] [% IF ( koha_new.CAN_user_tools ) %]
+ <p class="newsfooter"> Posted on [% koha_new.newdate %] [% IF ( CAN_user_tools ) %]
<a href="/cgi-bin/koha/tools/koha-news.pl?op=add_form&id=[% koha_new.idnew %]">Edit</a> | <a href="/cgi-bin/koha/tools/koha-news.pl?op=del&ids=[% koha_new.idnew %]">Delete</a> | <a href="/cgi-bin/koha/tools/koha-news.pl?op=add_form">New</a>[% END %]</p></div>
[% END %]
</div><!-- /koha-news -->
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/print.css" />
<script language="javascript">
+ function printThenClose() {
window.print();
window.close();
+ }
</script>
</head>
-<body>
+<body onload="printThenClose();">
<div id="receipt">
<link rel="shortcut icon" href="[% IF ( IntranetFavicon ) %][% IntranetFavicon %][% ELSE %][% themelang %]/includes/favicon.ico[% END %]" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/printreceiptinvoice.css" />
<script language="javascript">
+ function printThenClose() {
window.print();
window.close();
+ }
</script>
</head>
-<body>
+<body onload="printThenClose();">
<div id="receipt">
<!-- The table with the account items -->
<link rel="shortcut icon" href="[% IF ( IntranetFavicon ) %][% IntranetFavicon %][% ELSE %][% themelang %]/includes/favicon.ico[% END %]" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/printreceiptinvoice.css" />
<script language="javascript">
+ function printThenClose() {
window.print();
window.close();
+ }
</script>
</head>
-<body>
+<body onload="printThenClose();">
<div id="receipt">
<!-- The table with the account items -->
</td>
<td>
<a href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% savedreport.id %]&phase=Show%20SQL">Show</a>
- [% IF ( savedreport.CAN_user_reports_create_reports ) %]
+ [% IF ( CAN_user_reports_create_reports ) %]
<a href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% savedreport.id %]&phase=Edit%20SQL">Edit</a>
[% END %]
</td>
<td><a href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% savedreport.id %]&phase=Run%20this%20report">Run</a>
<a href="/cgi-bin/koha/tools/scheduler.pl?id=[% savedreport.id %]">Schedule</a></td>
- [% IF ( savedreport.CAN_user_reports_create_reports ) %]
+ [% IF ( CAN_user_reports_create_reports ) %]
<td><a class="confirmdelete" title="Delete this saved report" href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% savedreport.id %]&phase=Delete%20Saved">Delete</a></td>
[% END %]
</tr>
<caption><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblioloo.biblionumber %]">[% biblioloo.title |html %]</a></caption>
[% END %]
<tr>
- [% IF ( biblioloo.CAN_user_reserveforothers_modify_holds_priority ) %]
+ [% IF ( CAN_user_reserveforothers_modify_holds_priority ) %]
<th>Priority</th>
<th> </th>
[% ELSE %]
<th>Expiration</th>
<th>Pick up Library</th>
<th>Details</th>
- [% IF ( biblioloo.CAN_user_reserveforothers_modify_holds_priority ) %]
+ [% IF ( CAN_user_reserveforothers_modify_holds_priority ) %]
<th><img src="/intranet-tmpl/[% biblioloo.theme %]/img/go-bottom.png" border="0" alt="Toggle Set to Lowest Priority" /></th>
[% END %]
<th> </th>
<option value="W" selected="selected">Waiting</option>
[% END %]
[% END %]
- [% IF ( reserveloo.CAN_user_reserveforothers_modify_holds_priority ) %][% FOREACH optionloo IN reserveloo.optionloop %]
+ [% IF ( CAN_user_reserveforothers_modify_holds_priority ) %][% FOREACH optionloo IN reserveloo.optionloop %]
[% IF ( optionloo.selected ) %]<option value="[% optionloo.num %]" selected="selected">[% optionloo.num %]</option>[% ELSE %]<option value="[% optionloo.num %]">[% optionloo.num %]</option>[% END %]
[% END %][% ELSE %]<option value=""></option>[% END %]
<option value="del">del</option>
</select>
</td>
- [% IF ( reserveloo.CAN_user_reserveforothers_modify_holds_priority ) %]
+ [% IF ( CAN_user_reserveforothers_modify_holds_priority ) %]
<td style="white-space:nowrap;">
<a title="Move Hold Up" href="request.pl?action=move&where=up&borrowernumber=[% reserveloo.borrowernumber %]&biblionumber=[% reserveloo.biblionumber %]&date=[% reserveloo.date %]">
<img src="/intranet-tmpl/[% reserveloo.theme %]/img/go-up.png" border="0" alt="Go up" />
[% END %]
</td>
- [% IF ( reserveloo.CAN_user_reserveforothers_modify_holds_priority ) %]
+ [% IF ( CAN_user_reserveforothers_modify_holds_priority ) %]
<td>
<a title="Toggle Lowest Priority" href="request.pl?action=setLowestPriority&borrowernumber=[% reserveloo.borrowernumber %]&biblionumber=[% reserveloo.biblionumber %]&date=[% reserveloo.date %]">
[% IF ( reserveloo.lowestPriority ) %]
[% IF ( subscription.cannotedit ) %]
[% ELSE %]
- [% IF ( subscription.CAN_user_serials_receive_serials ) %]<a href="/cgi-bin/koha/serials/serials-edit.pl?subscriptionid=[% subscription.subscriptionid %]&serstatus=1,3,7">Serial receive</a>[% END %]
+ [% IF ( CAN_user_serials_receive_serials ) %]<a href="/cgi-bin/koha/serials/serials-edit.pl?subscriptionid=[% subscription.subscriptionid %]&serstatus=1,3,7">Serial receive</a>[% END %]
[% END %]
</td>
</tr>
[% FOREACH not_deleted_loo IN not_deleted_loop %]
<tr>
<td>[% not_deleted_loo.itemnumber %]</td>
- <td>[% IF ( not_deleted_loo.CAN_user_editcatalogue_edit_items ) %]<a href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% not_deleted_loo.biblionumber %]&itemnumber=[% not_deleted_loo.itemnumber %]">[% not_deleted_loo.barcode %]</a>[% ELSE %][% not_deleted_loo.barcode %][% END %]</td>
+ <td>[% IF ( CAN_user_editcatalogue_edit_items ) %]<a href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% not_deleted_loo.biblionumber %]&itemnumber=[% not_deleted_loo.itemnumber %]">[% not_deleted_loo.barcode %]</a>[% ELSE %][% not_deleted_loo.barcode %][% END %]</td>
<td>[% IF ( not_deleted_loo.book_on_loan ) %]Item is checked out[% ELSIF ( not_deleted_loo.book_reserved ) %]Item has a waiting hold[% END %]</td>
</tr>
[% END %]
<ul>
[% FOREACH simple_items_displa IN simple_items_display %]
<li>
- [% IF ( simple_items_displa.CAN_user_editcatalogue_edit_items ) %]<a href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% simple_items_displa.biblionumber %]&itemnumber=[% simple_items_displa.itemnumber %]">[% simple_items_displa.barcode %]</a>[% ELSE %][% simple_items_displa.barcode %][% END %]
+ [% IF ( CAN_user_editcatalogue_edit_items ) %]<a href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% simple_items_displa.biblionumber %]&itemnumber=[% simple_items_displa.itemnumber %]">[% simple_items_displa.barcode %]</a>[% ELSE %][% simple_items_displa.barcode %][% END %]
</li>
[% END %]
</ul>
<!-- BOOLEAN SEARCH OPTIONS -->
<div id="booleansearch" class="container"><fieldset>
<legend>Search for:</legend>
- [% FOREACH search_boxes_loo IN search_boxes_loop %]
+ [% FOREACH search_box IN search_boxes_loop %]
<p>
- [% IF ( search_boxes_loo.expanded_options ) %]
- [% IF ( search_boxes_loo.boolean ) %]
+ [% IF ( expanded_options ) %]
+ [% IF ( search_box.boolean ) %]
<select name="op">
<option value="and" selected="selected">and</option>
<option value="or">or</option>
</select>
[% END %]
[% END %]
- [% IF ( search_boxes_loo.expanded_options ) %][% search_boxes_loo.left_content %][% END %]
+ [% IF ( expanded_options ) %][% left_content %][% END %]
<select name="idx">
<option value="kw">Keyword</option>
<option value="su,wrdl">Subject</option>
<option value="su,phr"> Subject Phrase</option>
[% END %]
<option value="ti">Title</option>
-[% IF ( search_boxes_loo.expanded_options ) %]
+[% IF ( expanded_options ) %]
<option value="ti,phr"> Title Phrase</option>
<option value="se,wrdl">Series Title</option>
<option value="callnum">Call Number</option>
[% END %]
<option value="au,wrdl">Author</option>
-[% IF ( search_boxes_loo.expanded_options ) %]
+[% IF ( expanded_options ) %]
<option value="au,phr"> Author Phrase</option>
<option value="cpn,wrdl"> Corporate Name</option>
<option value="cfn,wrdl"> Conference Name</option>
<option value="pn,wrdl"> Personal Name</option>
<option value="pn,phr"> Personal Name Phrase</option>
[% END %]
-[% IF ( search_boxes_loo.expanded_options ) %]
+[% IF ( expanded_options ) %]
<option value="nt">Notes/Comments</option>
<option value="curriculum">Curriculum</option>
[% END %]
<option value="pb,wrdl">Publisher</option>
<option value="pl,wrdl">Publisher Location</option>
-[% IF ( search_boxes_loo.expanded_options ) %]
+[% IF ( expanded_options ) %]
<option value="sn">Standard Number</option>
<option value="nb"> ISBN</option>
<option value="ns"> ISSN</option>
<option value="bc">Barcode</option>
</select>
<input type="text" size="30" name="q" title="Enter search terms" value="" />
-[% IF ( search_boxes_loo.expanded_options ) %]
- <!-- [% IF ( search_boxes_loo.scan_index ) %]<input type="checkbox" name="scan" id="scan" value="1" /> Scan Indexes[% END %] -->
- [% IF ( search_boxes_loo.add_field ) %]<a href="JavaScript:add_field();" id="ButtonPlus" title="Add another field">[+]</a>[% END %]
+[% IF ( expanded_options ) %]
+ <!-- [% IF ( search_box.scan_index ) %]<input type="checkbox" name="scan" id="scan" value="1" /> Scan Indexes[% END %] -->
+ [% IF ( search_box.add_field ) %]<a href="JavaScript:add_field();" id="ButtonPlus" title="Add another field">[+]</a>[% END %]
[% END %]
</p>
[% END %]
<fieldset>
<!-- PUB RANGE OPTION -->
<legend>Publication Date Range:</legend>
-<span>For example: 1999-2001. You could also use "-1987" for everything published before 1987 or "2008minus" for everything published after 2008.</span>
+<span>For example: 1999-2001. You could also use "-1987" for everything published before 1987 or "2008-" for everything published after 2008.</span>
<input type="text" size="30" name="limit-yr" title="Enter search terms" value="" />
</fieldset>
<!-- /PUB RANGE OPTION -->
<div class="yui-b"><div class="yui-g">
<div id="userreadingrecord" class="container">
<!--CONTENT-->
-<h3><a href="/cgi-bin/koha/opac-user.pl">[% firstname %] [% surname %]'s account</a> <img src="[% themelang %]../../images/caret.gif" width="16" height="16" alt=">" border="0" /> Checkout History</h3>
+<h3><a href="/cgi-bin/koha/opac-user.pl">[% FOREACH BORROWER_INF IN BORROWER_INFO %][% BORROWER_INF.firstname %] [% BORROWER_INF.surname %][% END %]'s account</a> <img src="[% themelang %]../../images/caret.gif" width="16" height="16" alt=">" border="0" /> Checkout History</h3>
[% UNLESS ( count ) %]
You have never borrowed anything from this library.
</span>
</td>
[% ELSE %]
- [% UNLESS ( bibitemloo.none_available ) %]<td> </td>[% END %]
+ [% UNLESS ( none_available ) %]<td> </td>[% END %]
[% END %]
[% IF ( bibitemloo.holdable ) %]<td>[% ELSE %]<td colspan="5">[% END %]
<a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% bibitemloo.biblionumber %]">[% bibitemloo.title |html %][% IF ( bibitemloo.subtitle ) %] [% FOREACH subtitl IN bibitemloo.subtitle %][% subtitl.subfield %][% END %][% END %]</a>
</td>
[% END %][% END %]
[% IF ( bibitemloo.holdable ) %]
- [% IF ( bibitemloo.showpriority ) %]
+ [% IF ( showpriority ) %]
<td>
[% bibitemloo.rank %] out of [% bibitemloo.reservecount %]
</td>[% END %][% END %]
- [% IF ( bibitemloo.reserve_in_future ) %]
+ [% IF ( reserve_in_future ) %]
[% IF ( bibitemloo.holdable ) %]<td>
<input name="reserve_date_[% bibitemloo.biblionumber %]" id="reserve_date_[% bibitemloo.biblionumber %]" size="10">
<script language="JavaScript" type="text/javascript">
<a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('expiration_date_[% bibitemloo.biblionumber %]').value='';return false;">Clear Date</a></p>
</td>[% END %]
- [% IF ( bibitemloo.holdable ) %][% IF ( bibitemloo.OPACItemHolds ) %]
+ [% IF ( bibitemloo.holdable ) %][% IF ( OPACItemHolds ) %]
<td class="place_on_type" style="display:none">
<table>
<tr>
</td>
[% END %][% END %]
- [% UNLESS ( bibitemloo.singleBranchMode ) %]
+ [% UNLESS ( singleBranchMode ) %]
[% IF ( bibitemloo.holdable ) %]
- [% IF ( bibitemloo.choose_branch ) %]
+ [% IF ( choose_branch ) %]
<td>
<select name="branch" id="branch_[% bibitemloo.biblionumber %]"
[% UNLESS ( bibitemloo.holdable ) %]disabled="disabled"[% END %] >
[% END %]
</tr>
- [% IF ( bibitemloo.OPACItemHolds ) %]
+ [% IF ( OPACItemHolds ) %]
[% IF ( bibitemloo.holdable ) %]
<tr class="copiesrow" id="copiesrow_[% bibitemloo.biblionumber %]">
<td colspan="1">
</td>
[% END %]
<td>[% itemLoo.barcode %]</td>
- [% UNLESS ( itemLoo.singleBranchMode ) %]
+ [% UNLESS ( singleBranchMode ) %]
<td>[% itemLoo.homeBranchName %]</td>
<td>[% itemLoo.holdingBranchName %]</td>
[% END %]
[% FOREACH BORROWER_INF IN BORROWER_INFO %]
<h2>Hello, [% BORROWER_INF.firstname %] [% BORROWER_INF.surname %] <span class="hint">(<a href="/cgi-bin/koha/opac-main.pl?logout.x=1">Click here</a> if you're not [% BORROWER_INF.title %] [% BORROWER_INF.firstname %] [% BORROWER_INF.surname %])</span></h2>
- [% IF ( BORROWER_INF.patronupdate ) %]<div class="dialog message"><h3>Thank you!</h3><p>Your corrections have been submitted to the library, and a staff member will update your record as soon as possible.</p></div>[% END %]
+ [% IF ( patronupdate ) %]<div class="dialog message"><h3>Thank you!</h3><p>Your corrections have been submitted to the library, and a staff member will update your record as soon as possible.</p></div>[% END %]
[% IF ( BORROWER_INF.flagged ) %]
<li><a href="/cgi-bin/koha/opac-user.pl#opac-user-checkouts">Checked Out</a></li>
[% IF ( overdues_count ) %]<li><a href="/cgi-bin/koha/opac-user.pl#opac-user-overdues">Overdue</a></li>[% END %]
[% IF ( OPACFinesTab ) %]
- [% IF ( amountoverfive ) %]<li><a href="/cgi-bin/koha/opac-user.pl#opac-user-fines">Fines</a></li>[% END %]
- [% IF ( amountoverzero ) %]<li><a href="/cgi-bin/koha/opac-user.pl#opac-user-fines">Fines</a></li>[% END %]
- [% IF ( amountlessthanzero ) %]<li><a href="/cgi-bin/koha/opac-user.pl#opac-user-fines">Credits</a></li>[% END %]
+ [% IF ( BORROWER_INF.amountoverfive ) %]<li><a href="/cgi-bin/koha/opac-user.pl#opac-user-fines">Fines</a></li>[% END %]
+ [% IF ( BORROWER_INF.amountoverzero ) %]<li><a href="/cgi-bin/koha/opac-user.pl#opac-user-fines">Fines</a></li>[% END %]
+ [% IF ( BORROWER_INF.amountlessthanzero ) %]<li><a href="/cgi-bin/koha/opac-user.pl#opac-user-fines">Credits</a></li>[% END %]
[% END %]
[% IF ( waiting_count ) %][% IF ( BORROWER_INF.atdestination ) %]<li><a href="/cgi-bin/koha/opac-user.pl#opac-user-waiting">Waiting</a></li>[% END %][% END %]
[% IF ( reserves_count ) %]<li><a href="/cgi-bin/koha/opac-user.pl#opac-user-holds">Holds</a></li>[% END %]
[% END %]</td>
[% END %]
[% END %]
-[% IF ( ISSUE.OPACFinesTab ) %]
+[% IF ( OPACFinesTab ) %]
<td>[% IF ( ISSUE.charges ) %]Yes[% ELSE %]No[% END %]</td>
[% END %]
- [% IF ( ISSUE.OPACMySummaryhtml ) %]
- <td>[% ISSUE.MySummaryhtml %]</td>
+ [% IF ( OPACMySummaryhtml ) %]
+ <td>[% MySummaryhtml %]</td>
[% END %]
</tr>
[% END %]</tbody>
[% ELSE %]No renewals left
[% END %]
</td>[% END %][% END %]
-[% IF ( OVERDUE.OPACFinesTab ) %]
+[% IF ( OPACFinesTab ) %]
<td>[% IF ( OVERDUE.charges ) %]Yes[% ELSE %]No[% END %]</td>
[% END %]
</tr>
<td>[% RESERVE.reservedate %]</td>
<td>[% IF ( RESERVE.expirationdate ) %][% RESERVE.expirationdate %][% ELSE %]Never Expires[% END %]</td>
<td>[% RESERVE.branch %]</td>
- [% IF ( RESERVE.showpriority ) %]
+ [% IF ( showpriority ) %]
<td>[% RESERVE.priority %] </td>
[% END %]
<td>
use strict;
sub kohaversion {
- our $VERSION = '3.03.00.051';
+ our $VERSION = '3.03.00.XXX';
# version needs to be set this way
# so that it can be picked up by Makefile.PL
# during install
message_queue => $message_queue,
DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
borrowernumber => $borrowernumber,
- branchcode => $borrower->{'branchcode'},
branchname => GetBranchName($borrower->{'branchcode'}),
dateformat => C4::Context->preference("dateformat"),
categoryname => $borrower->{'description'},
#$messaging_preferences->{'SMSnumber'}{'value'} = defined $borrower->{'smsalertnumber'}
# ? $borrower->{'smsalertnumber'} : $borrower->{'mobile'};
-$template->param( BORROWER_INFO => [ $borrower ],
+$template->param( %{ $borrower } );
+$template->param(
messagingview => 1,
is_child => ($borrower->{'category_type'} eq 'C'),
);
# Getting the messages
my $queued_messages = C4::Letters::GetQueuedMessages({borrowernumber => $borrowernumber});
+$template->param( %{$borrower} );
$template->param(
QUEUED_MESSAGES => $queued_messages,
- BORROWER_INFO => [ $borrower ],
- firstname => $borrower->{'firstname'},
- surname => $borrower->{'surname'},
borrowernumber => $borrowernumber,
sentnotices => 1
);
output_html_with_http_headers $input, $cookie, $template->output;
-
-
my ( $input_marc_file, $number, $offset) = ('',0,0);
my ($version, $delete, $test_parameter, $skip_marc8_conversion, $char_encoding, $verbose, $commit, $fk_off,$format,$biblios,$authorities,$keepids,$match, $isbn_check, $logfile);
my ($sourcetag,$sourcesubfield,$idmapfl);
+my $cleanisbn = 1;
$|=1;
'x:s' => \$sourcetag,
'y:s' => \$sourcesubfield,
'idmap:s' => \$idmapfl,
+ 'cleanisbn!' => \$cleanisbn,
);
$biblios=!$authorities||$biblios;
# from because we don't have access to the original blob. Note
# that the staging import can deal with this condition (via
# C4::Charset::MarcToUTF8Record) because it doesn't use MARC::Batch.
- $i++;
next;
}
# skip if we get an empty record (that is MARC valid, but will result in AddBiblio failure
}
my $isbn;
# remove trailing - in isbn (only for biblios, of course)
- if ($biblios) {
- if ($marcFlavour eq 'UNIMARC') {
- if (my $f010 = $record->field('010')) {
- $isbn = $f010->subfield('a');
- $isbn =~ s/-//g;
- $f010->update('a' => $isbn);
- }
- } else {
- if (my $f020 = $record->field('020')) {
- if ($isbn = $f020->subfield('a')) {
- $isbn =~ s/-//g;
- $f020->update('a' => $isbn);
- }
- }
+ if ($biblios && $cleanisbn) {
+ my $tag = $marcFlavour eq 'UNIMARC' ? '010' : '020';
+ my $field = $record->field($tag);
+ my $isbn = $field && $field->subfield('a');
+ if ( $isbn ) {
+ $isbn =~ s/-//g;
+ $field->update('a' => $isbn);
}
}
my $id;
biblio is not added. It's another method to deduplicate. B<-match> & B<-isbn>
can be both set.
+=item B<-cleanisbn>
+
+Clean ISBN fields from entering biblio records, ie removes hyphens. By default,
+ISBN are cleaned. --nocleanisbn will keep ISBN unchanged.
+
=item B<-x>=I<TAG>
Source bib I<TAG> for reporting the source bib number
if ($format =~ /(rss|atom|opensearchdescription)/) {
$template_name = 'opac-opensearch.tmpl';
}
-elsif ($build_grouped_results) {
+elsif (@params && $build_grouped_results) {
$template_name = 'opac-results-grouped.tmpl';
}
elsif ((@params>=1) || ($cgi->param("q")) || ($cgi->param('multibranchlimit')) || ($cgi->param('limit-yr')) ) {
my $minlocation=$input->param('minlocation') || '';
my $maxlocation=$input->param('maxlocation');
$maxlocation=$minlocation.'Z' unless ( $maxlocation || ! $minlocation );
-my $location=$input->param('location');
+my $location=$input->param('location') || '';
my $itemtype=$input->param('itemtype'); # FIXME note, template does not currently supply this
my $ignoreissued=$input->param('ignoreissued');
my $datelastseen = $input->param('datelastseen');
$offset=0 unless $offset;
my $pagesize = $input->param('pagesize');
$pagesize=50 unless $pagesize;
-my $branchcode = $input->param('branchcode');
+my $branchcode = $input->param('branchcode') || '';
my $branch = $input->param('branch');
my $op = $input->param('op');
my $res; #contains the results loop
@branch_loop = sort {$a->{branchname} cmp $b->{branchname}} @branch_loop;
my @authorised_value_list;
-my $authorisedvalue_categories;
+my $authorisedvalue_categories = '';
my $frameworks = getframeworks();
for my $fwk (keys %$frameworks){
for my $authvfield (@$statuses) {
$staton->{$authvfield->{fieldname}} = [];
for my $authval (@{$authvfield->{values}}){
- if ( $input->param('status-' . $authvfield->{fieldname} . '-' . $authval->{id}) eq 'on' ){
+ if ( defined $input->param('status-' . $authvfield->{fieldname} . '-' . $authval->{id}) && $input->param('status-' . $authvfield->{fieldname} . '-' . $authval->{id}) eq 'on' ){
push @{$staton->{$authvfield->{fieldname}}}, $authval->{id};
}
}
}
}
if ($markseen or $op) {
- $res = GetItemsForInventory( $minlocation, $maxlocation, $location, $ignoreissued, $itemtype, $datelastseen, $branchcode, $branch, $offset, $pagesize, $staton );
+ $res = GetItemsForInventory( $minlocation, $maxlocation, $location, $itemtype, $ignoreissued, $datelastseen, $branchcode, $branch, $offset, $pagesize, $staton );
$template->param(loop =>$res,
nextoffset => ($offset+$pagesize),
prevoffset => ($offset?$offset-$pagesize:0),
);
}
- if ( ( ( $input->param('compareinv2barcd') eq 'on' ) && ( scalar @brcditems != scalar @$res ) ) && length($uploadbarcodes) > 0 ){
+ if ( defined $input->param('compareinv2barcd') && ( ( $input->param('compareinv2barcd') eq 'on' ) && ( scalar @brcditems != scalar @$res ) ) && length($uploadbarcodes) > 0 ){
if ( scalar @brcditems > scalar @$res ){
for my $brcditem (@brcditems) {
if (! grep(/$brcditem->{barcode}/, @$res) ){
}
}
-if ($input->param('CSVexport') eq 'on'){
+if (defined $input->param('CSVexport') && $input->param('CSVexport') eq 'on'){
eval {use Text::CSV};
my $csv = Text::CSV->new or
die Text::CSV->error_diag ();