Merge branch 'new/enh/bug_5917' into kcmaster
authorChris Cormack <chrisc@catalyst.net.nz>
Thu, 14 Apr 2011 01:36:57 +0000 (13:36 +1200)
committerChris Cormack <chrisc@catalyst.net.nz>
Thu, 14 Apr 2011 01:36:57 +0000 (13:36 +1200)
48 files changed:
C4/Accounts.pm
C4/Branch.pm
C4/Search.pm
C4/Templates.pm
C4/VirtualShelves/Page.pm
cataloguing/value_builder/marc21_field_006.pl
cataloguing/value_builder/marc21_field_008.pl
cataloguing/value_builder/unimarc_field_210c_bis.pl [new file with mode: 0755]
cataloguing/ysearch.pl [new file with mode: 0755]
circ/returns.pl
docs/history.txt
installer/data/mysql/de-DE/mandatory/sysprefs.sql
installer/data/mysql/en/mandatory/sysprefs.sql
installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
installer/data/mysql/it-IT/necessari/sysprefs.sql
installer/data/mysql/pl-PL/mandatory/sysprefs.sql
installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql
installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql
installer/data/mysql/updatedatabase.pl
koha-tmpl/intranet-tmpl/prog/en/includes/budgets-admin-toolbar.inc
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_210c_bis.tt [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt
koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt
koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt
koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt
koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-home.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt
koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tt
koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tt
koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt
koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt
kohaversion.pl
members/messaging.pl
members/notices.pl
misc/migration_tools/bulkmarcimport.pl
opac/opac-search.pl
tools/inventory.pl

index 9540b44..32054f4 100644 (file)
@@ -352,7 +352,8 @@ should be the empty string.
 
 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;
index 817aa38..abcdbd6 100644 (file)
@@ -206,7 +206,7 @@ sub ModBranch {
             branchaddress2,branchaddress3,branchzip,branchcity,branchstate,
             branchcountry,branchphone,branchfax,branchemail,
             branchurl,branchip,branchprinter,branchnotes)
-            VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
+            VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
         ";
         my $sth    = $dbh->prepare($query);
         $sth->execute(
index a8d6625..ab7cb59 100644 (file)
@@ -359,10 +359,10 @@ sub getRecords {
         # 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" ) {
@@ -389,10 +389,10 @@ sub getRecords {
             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 {
@@ -2286,7 +2286,7 @@ sub NZorder {
     # 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();
index 54ad9fd..ea11aee 100644 (file)
@@ -108,7 +108,7 @@ sub output {
             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});
index df7054e..cb55b9c 100644 (file)
@@ -57,6 +57,8 @@ sub shelfpage ($$$$$) {
     $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 );
@@ -163,6 +165,7 @@ sub shelfpage ($$$$$) {
                 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,
@@ -312,7 +315,7 @@ sub shelfpage ($$$$$) {
                 $stay = 0;
             }
             $showadd = 1;
-            $stay and $template->param( shelves => 1 );
+            $stay and $template->param( shelves => 1 ) and $shelves = 1;
             last SWITCH;
         }
     }
@@ -359,7 +362,7 @@ sub shelfpage ($$$$$) {
         $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(
@@ -373,13 +376,13 @@ sub shelfpage ($$$$$) {
         "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 );
     }
index 6a4445a..7b55a0a 100755 (executable)
@@ -86,7 +86,7 @@ sub plugin {
 
     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') {
index 8b5db26..5b8a7e5 100755 (executable)
@@ -100,7 +100,7 @@ sub plugin {
     $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') {
diff --git a/cataloguing/value_builder/unimarc_field_210c_bis.pl b/cataloguing/value_builder/unimarc_field_210c_bis.pl
new file mode 100755 (executable)
index 0000000..420fa8f
--- /dev/null
@@ -0,0 +1,110 @@
+#!/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;
diff --git a/cataloguing/ysearch.pl b/cataloguing/ysearch.pl
new file mode 100755 (executable)
index 0000000..5cd0205
--- /dev/null
@@ -0,0 +1,78 @@
+#!/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) ;
+}
+
index e954a3b..5a0cc09 100755 (executable)
@@ -249,7 +249,23 @@ if ($barcode) {
                 $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;
index 482d4d6..008441c 100644 (file)
@@ -539,3 +539,5 @@ March 17 2011       Sophie Meynieux becomes the 137th developer to have a patch pushed
 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
index dd75477..5e62df8 100755 (executable)
@@ -35,6 +35,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
 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');
index 8b90a24..8c94d08 100755 (executable)
@@ -35,6 +35,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
 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');
index 552bf80..311f961 100755 (executable)
@@ -37,6 +37,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
 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');
index f17318b..b6ecc99 100755 (executable)
@@ -65,6 +65,7 @@ insert into `systempreferences` (`variable`, `value`, `options`, `explanation`,
 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');
@@ -297,3 +298,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
 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');
+
index 31821fe..24a2a03 100755 (executable)
@@ -35,6 +35,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
 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');
index 58b51cd..585fa8b 100755 (executable)
@@ -47,6 +47,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
 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');
@@ -364,3 +365,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
 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');
+
index 9074432..3de76fa 100755 (executable)
@@ -46,6 +46,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
 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');
index aba0696..3baefc8 100755 (executable)
@@ -4132,6 +4132,12 @@ $DBversion = '3.03.00.032';
 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);
 }
 
@@ -4297,7 +4303,7 @@ $DBversion = "3.03.00.051";
 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'");    
index 5c796ee..da64ca4 100644 (file)
@@ -60,7 +60,7 @@
                 [% 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 %]
index a54a99d..842f75d 100644 (file)
@@ -58,7 +58,7 @@
         [% 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 %]&amp;op=add_form">New basket</a>
                     [% ELSE %]
index 9d24e63..44b7b3c 100644 (file)
        <th>Copyright</th>
        <th colspan="2">&nbsp;</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 %]&amp;basketno=[% resultsloo.basketno %]&amp;biblionumber=[% resultsloo.biblionumber %]" title="Order this one">
+            <a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=[% biblio.booksellerid %]&amp;basketno=[% basketno %]&amp;biblionumber=[% biblio.biblionumber %]" title="Order this one">
                 Order
             </a>
             </td>
index 9e74e4a..03c4c10 100644 (file)
@@ -66,6 +66,12 @@ Circulation:
                   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:
index c7d34d5..bfa5179 100644 (file)
 <!-- 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 %]
index 2a67599..86c8a3f 100644 (file)
@@ -43,8 +43,8 @@
     [% 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&amp;biblionumber=[% ITEM_DAT.biblionumber %]&amp;itemnumber=[% ITEM_DAT.itemnumber %]">[Edit Item]</a>
          [% END %]
          [% END %][% END %]</h4>
@@ -71,7 +71,7 @@
             <li><span class="label">Current Renewals:</span> [% ITEM_DAT.renewals %]&nbsp;</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 %]&nbsp;</li>
             <li><span class="label">Serial enumeration:</span> [% ITEM_DAT.enumchron %]&nbsp;</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" />
index 8a533ba..f5e3712 100644 (file)
@@ -98,8 +98,8 @@
                 </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&amp;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&amp;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 %]
index 89957fb..a74d677 100644 (file)
@@ -207,7 +207,7 @@ function set_to_today(id, force) {
             </tr>
                 [% FOREACH item_loo IN item_loop %]
                 <tr id="row[% item_loo.itemnumber %]">
-                    [% IF ( item_loo.nomod ) %] <td colspan="2">&nbsp;</td>[% ELSE %]<td><a href="additem.pl?op=edititem&amp;biblionumber=[% item_loo.biblionumber %]&amp;itemnumber=[% item_loo.itemnumber %]#edititem">Edit</a></td>
+                    [% IF ( item_loo.nomod ) %] <td colspan="2">&nbsp;</td>[% ELSE %]<td><a href="additem.pl?op=edititem&amp;biblionumber=[% biblionumber %]&amp;itemnumber=[% item_loo.itemnumber %]#edititem">Edit</a></td>
                     <td><a class="delete" href="/cgi-bin/koha/cataloguing/additem.pl?op=delitem&amp;biblionumber=[% item_loo.biblionumber %]&amp;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>
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_210c_bis.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_210c_bis.tt
new file mode 100644 (file)
index 0000000..2a68566
--- /dev/null
@@ -0,0 +1,75 @@
+<!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>
index c80a89f..a766bcc 100644 (file)
@@ -66,6 +66,14 @@ function Dopop(link) {
     </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>
index e83f20e..e43e164 100644 (file)
             [% 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&amp;id=[% koha_new.idnew %]">Edit</a> | <a href="/cgi-bin/koha/tools/koha-news.pl?op=del&amp;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 -->
index aa76755..4a85ccb 100644 (file)
@@ -5,11 +5,13 @@
  <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">
 
index f1a661d..7625260 100644 (file)
@@ -4,11 +4,13 @@
 <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 -->
index d2933df..a712e83 100644 (file)
@@ -4,11 +4,13 @@
 <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 -->
index 68e65e9..31fd512 100644 (file)
@@ -171,13 +171,13 @@ canned reports and writing custom SQL reports.</p>
 </td>
     <td>
         <a href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% savedreport.id %]&amp;phase=Show%20SQL">Show</a> 
-        [% IF ( savedreport.CAN_user_reports_create_reports ) %]
+        [% IF ( CAN_user_reports_create_reports ) %]
             &nbsp; <a href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% savedreport.id %]&amp;phase=Edit%20SQL">Edit</a>
         [% END %]
     </td>
 <td><a href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% savedreport.id %]&amp;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 %]&amp;phase=Delete%20Saved">Delete</a></td>
     [% END %]
 </tr>
index 43b6cd1..2c392b0 100644 (file)
@@ -570,7 +570,7 @@ function checkMultiHold() {
           <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>&nbsp;</th>
         [% ELSE %]
@@ -582,7 +582,7 @@ function checkMultiHold() {
        <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>&nbsp;</th>
@@ -600,14 +600,14 @@ function checkMultiHold() {
             <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&amp;where=up&amp;borrowernumber=[% reserveloo.borrowernumber %]&amp;biblionumber=[% reserveloo.biblionumber %]&amp;date=[% reserveloo.date %]">
                        <img src="/intranet-tmpl/[% reserveloo.theme %]/img/go-up.png" border="0" alt="Go up" />
@@ -699,7 +699,7 @@ function checkMultiHold() {
     [% 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&amp;borrowernumber=[% reserveloo.borrowernumber %]&amp;biblionumber=[% reserveloo.biblionumber %]&amp;date=[% reserveloo.date %]"> 
                        [% IF ( reserveloo.lowestPriority ) %]
index 207f831..56a8214 100644 (file)
@@ -129,7 +129,7 @@ Serials updated :
                 [% IF ( subscription.cannotedit ) %]
                   &nbsp;        
                 [% ELSE %]
-                  [% IF ( subscription.CAN_user_serials_receive_serials ) %]<a href="/cgi-bin/koha/serials/serials-edit.pl?subscriptionid=[% subscription.subscriptionid %]&amp;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 %]&amp;serstatus=1,3,7">Serial receive</a>[% END %]
                 [% END %]
                 </td>
             </tr>
index 20d04a7..21013f5 100644 (file)
@@ -162,7 +162,7 @@ for( x=0; x<allColumns.length; x++ ){
                    [% 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&amp;biblionumber=[% not_deleted_loo.biblionumber %]&amp;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&amp;biblionumber=[% not_deleted_loo.biblionumber %]&amp;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 %]
index 5fcd283..461b6bc 100644 (file)
@@ -100,7 +100,7 @@ for( x=0; x<allColumns.length; x++ ){
     <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&amp;biblionumber=[% simple_items_displa.biblionumber %]&amp;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&amp;biblionumber=[% simple_items_displa.biblionumber %]&amp;itemnumber=[% simple_items_displa.itemnumber %]">[% simple_items_displa.barcode %]</a>[% ELSE %][% simple_items_displa.barcode %][% END %]
   </li>
     [% END %]
     </ul>
index f302a67..1c9381d 100644 (file)
     <!-- 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>
@@ -57,7 +57,7 @@
             </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>
@@ -65,7 +65,7 @@
             <option value="su,phr">&nbsp;&nbsp;&nbsp;&nbsp; Subject Phrase</option>
 [% END %]
             <option value="ti">Title</option>
-[% IF ( search_boxes_loo.expanded_options ) %]
+[% IF ( expanded_options ) %]
             <option value="ti,phr">&nbsp;&nbsp;&nbsp;&nbsp; Title Phrase</option>
             <option value="se,wrdl">Series Title</option>
             <option value="callnum">Call Number</option>
@@ -73,7 +73,7 @@
 [% END %]
             <option value="au,wrdl">Author</option>
             
-[% IF ( search_boxes_loo.expanded_options ) %]
+[% IF ( expanded_options ) %]
             <option value="au,phr">&nbsp;&nbsp;&nbsp;&nbsp; Author Phrase</option>
             <option value="cpn,wrdl">&nbsp;&nbsp;&nbsp;&nbsp; Corporate Name</option>
             <option value="cfn,wrdl">&nbsp;&nbsp;&nbsp;&nbsp; Conference Name</option>
             <option value="pn,wrdl">&nbsp;&nbsp;&nbsp;&nbsp; Personal Name</option>
             <option value="pn,phr">&nbsp;&nbsp;&nbsp;&nbsp; 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">&nbsp;&nbsp;&nbsp;&nbsp; ISBN</option>
             <option value="ns">&nbsp;&nbsp;&nbsp;&nbsp; ISSN</option>
@@ -98,9 +98,9 @@
             <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 -->
index 21dace9..2734fde 100644 (file)
@@ -22,7 +22,7 @@ $(document).ready(function(){
        <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="&gt;" 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="&gt;" border="0" /> Checkout History</h3>
 
 [% UNLESS ( count ) %]
 You have never borrowed anything from this library.
index 742851d..4b72bc9 100644 (file)
                         </span>
                                        </td>
                       [% ELSE %]
-                                         [% UNLESS ( bibitemloo.none_available ) %]<td>&nbsp;</td>[% END %]
+                                         [% UNLESS ( none_available ) %]<td>&nbsp;</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 %]
index c6bc33a..8e394e2 100644 (file)
@@ -95,7 +95,7 @@ $.tablesorter.addParser({
     [% 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 ) %]
@@ -121,9 +121,9 @@ $.tablesorter.addParser({
             <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 %]
@@ -260,11 +260,11 @@ $.tablesorter.addParser({
                         [% 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>
@@ -345,7 +345,7 @@ $.tablesorter.addParser({
 [% ELSE %]No renewals left
 [% END %]
 </td>[% END %][% END %]
-[% IF ( OVERDUE.OPACFinesTab ) %]
+[% IF ( OPACFinesTab ) %]
 <td>[% IF ( OVERDUE.charges ) %]Yes[% ELSE %]No[% END %]</td>
 [% END %]
 </tr>
@@ -391,7 +391,7 @@ $.tablesorter.addParser({
                 <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>
index bde751d..8330459 100644 (file)
@@ -16,7 +16,7 @@ the kohaversion is divided in 4 parts :
 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
index ef9cfa4..8791dcf 100755 (executable)
@@ -84,7 +84,6 @@ $template->param( messagingview               => 1,
                   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'},
@@ -94,7 +93,8 @@ $template->param( messagingview               => 1,
 #$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'),
                 );
index f6680d5..088d5a8 100755 (executable)
@@ -51,16 +51,12 @@ $template->param( picture => 1 ) if $picture;
 
 # 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;
 
-
-
index 1d31382..ddfa5e0 100755 (executable)
@@ -34,6 +34,7 @@ binmode(STDOUT, ":utf8");
 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;
 
@@ -59,6 +60,7 @@ GetOptions(
     'x:s' => \$sourcetag,
     'y:s' => \$sourcesubfield,
     'idmap:s' => \$idmapfl,
+    'cleanisbn!'     => \$cleanisbn,
 );
 $biblios=!$authorities||$biblios;
 
@@ -176,7 +178,6 @@ RECORD: while (  ) {
         # 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
@@ -197,20 +198,13 @@ RECORD: while (  ) {
     }
     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;
@@ -519,6 +513,11 @@ If set, a search will be done on isbn, and, if the same isbn is found, the
 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
index 778c7ca..7531513 100755 (executable)
@@ -66,7 +66,7 @@ my $build_grouped_results = C4::Context->preference('OPACGroupResults');
 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')) ) {
index f8903e5..cc7e8a7 100755 (executable)
@@ -39,7 +39,7 @@ use C4::Circulation;
 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');
@@ -48,7 +48,7 @@ my $markseen = $input->param('markseen');
 $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
@@ -74,7 +74,7 @@ for my $branch_hash (keys %$branches) {
 
 @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){
@@ -106,7 +106,7 @@ my $staton = {};                                                            #authorized values that are ticked
 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};
         }
     }
@@ -185,13 +185,13 @@ if ( ! ($uploadbarcodes && length($uploadbarcodes)>0 ) || ( $input->param('compa
         }
     }
     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) ){
@@ -212,7 +212,7 @@ if ( ! ($uploadbarcodes && length($uploadbarcodes)>0 ) || ( $input->param('compa
     }
 }
 
-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 ();