Merge branch 'bug_7896' into 3.12-master
authorJared Camins-Esakov <jcamins@cpbibliography.com>
Sun, 2 Dec 2012 14:40:48 +0000 (09:40 -0500)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Sun, 2 Dec 2012 14:40:48 +0000 (09:40 -0500)
17 files changed:
C4/SIP/ILS/Item.pm
C4/SIP/ILS/Patron.pm
C4/SIP/ILS/Transaction/Checkin.pm
C4/SIP/ILS/Transaction/Checkout.pm
C4/SIP/ILS/Transaction/FeePayment.pm
C4/SIP/ILS/Transaction/Hold.pm
C4/SIP/ILS/Transaction/Renew.pm
C4/SIP/ILS/Transaction/RenewAll.pm
acqui/parcel.pl
circ/circulation-home.pl
koha-tmpl/intranet-tmpl/prog/en/css/addbiblio.css
koha-tmpl/intranet-tmpl/prog/en/includes/page-numbers.inc
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt
koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt
koha-tmpl/opac-tmpl/prog/en/includes/page-numbers.inc

index 6bf7192..ba85cd7 100644 (file)
@@ -22,14 +22,7 @@ use C4::Circulation;
 use C4::Members;
 use C4::Reserves;
 
-use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
-
-BEGIN {
-    $VERSION = 3.07.00.049;
-       require Exporter;
-       @ISA = qw(Exporter);
-       @EXPORT_OK = qw();
-}
+our $VERSION = 3.07.00.049;
 
 =head1 EXAMPLE
 
@@ -140,7 +133,7 @@ my %fields = (
 );
 
 sub next_hold {
-    my $self = shift or return;
+    my $self = shift;
     # use Data::Dumper; warn "next_hold() hold_shelf: " . Dumper($self->{hold_shelf}); warn "next_hold() pending_queue: " . $self->{pending_queue};
     foreach (@{$self->hold_shelf}) {    # If this item was taken from the hold shelf, then that reserve still governs
         next unless ($_->{itemnumber} and $_->{itemnumber} == $self->{itemnumber});
@@ -168,7 +161,7 @@ sub hold_patron_id {
 
 }
 sub hold_patron_name {
-    my $self = shift or return;
+    my $self = shift;
     my $borrowernumber = (@_ ? shift: $self->hold_patron_id()) or return;
     my $holder = GetMember(borrowernumber=>$borrowernumber);
     unless ($holder) {
@@ -186,7 +179,7 @@ sub hold_patron_name {
 }
 
 sub hold_patron_bcode {
-    my $self = shift or return;
+    my $self = shift;
     my $borrowernumber = (@_ ? shift: $self->hold_patron_id()) or return;
     my $holder = GetMember(borrowernumber => $borrowernumber);
     if ($holder) {
@@ -257,9 +250,11 @@ sub sip_circulation_status {
 }
 
 sub sip_security_marker {
+    my $self = shift;
     return '02';       # FIXME? 00-other; 01-None; 02-Tattle-Tape Security Strip (3M); 03-Whisper Tape (3M)
 }
 sub sip_fee_type {
+    my $self = shift;
     return '01';    # FIXME? 01-09 enumerated in spec.  We just use O1-other/unknown.
 }
 
@@ -354,7 +349,7 @@ sub _barcode_to_borrowernumber {
     return $member->{borrowernumber};
 }
 sub barcode_is_borrowernumber {    # because hold_queue only has borrowernumber...
-    my $self = shift;   # not really used
+    my $self = shift;
     my $barcode = shift;
     my $number  = shift or return;    # can't be zero
     return unless defined $barcode; # might be 0 or 000 or 000000
index d3a9762..69389eb 100644 (file)
@@ -23,13 +23,7 @@ use C4::Reserves;
 use C4::Branch qw(GetBranchName);
 use Digest::MD5 qw(md5_base64);
 
-use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
-
-BEGIN {
-    $VERSION = 3.07.00.049;
-       @ISA = qw(Exporter);
-       @EXPORT_OK = qw(invalid_patron);
-}
+our $VERSION = 3.07.00.049;
 
 our $kp;       # koha patron
 
@@ -253,7 +247,7 @@ sub drop_hold {
 # from the SIP request.  Note those incoming values are 1-indexed, not 0-indexed.
 #
 sub x_items {
-    my $self      = shift or return;
+    my $self      = shift;
     my $array_var = shift or return;
     my ($start, $end) = @_;
        $self->{$array_var} or return [];
@@ -268,28 +262,28 @@ sub x_items {
 # List of outstanding holds placed
 #
 sub hold_items {
-    my $self = shift or return;
+    my $self = shift;
     return $self->x_items('hold_items', @_);
 }
 
 sub overdue_items {
-    my $self = shift or return;
+    my $self = shift;
     return $self->x_items('overdue_items', @_);
 }
 sub charged_items {
-    my $self = shift or return;
+    my $self = shift;
     return $self->x_items('items', @_);
 }
 sub fine_items {
-    my $self = shift or return;
+    my $self = shift;
     return $self->x_items('fine_items', @_);
 }
 sub recall_items {
-    my $self = shift or return;
+    my $self = shift;
     return $self->x_items('recall_items', @_);
 }
 sub unavail_holds {
-    my $self = shift or return;
+    my $self = shift;
     return $self->x_items('unavail_holds', @_);
 }
 
@@ -321,16 +315,16 @@ sub inet_privileges {
 }
 
 sub fee_limit {
-    my $self = shift;
+    my $self = shift;
     return C4::Context->preference("noissuescharge") || 5;
 }
 
 sub excessive_fees {
-    my $self = shift or return;
+    my $self = shift;
     return ($self->fee_amount and $self->fee_amount > $self->fee_limit);
 }
 sub excessive_fines {
-    my $self = shift or return;
+    my $self = shift;
     return $self->excessive_fees;   # excessive_fines is the same thing as excessive_fees for Koha
 }
     
@@ -346,10 +340,12 @@ sub library_name {
 #
 
 sub invalid_patron {
+    my $self = shift;
     return "Please contact library staff";
 }
 
 sub charge_denied {
+    my $self = shift;
     return "Please contact library staff";
 }
 
index 47bd85d..49ce926 100644 (file)
@@ -17,7 +17,7 @@ use C4::Reserves qw( ModReserveAffect );
 use C4::Items qw( ModItemTransfer );
 use C4::Debug;
 
-our @ISA = qw(ILS::Transaction);
+use parent qw(ILS::Transaction);
 
 my %fields = (
     magnetic => 0,
index da7a1b0..c61eca6 100644 (file)
@@ -20,13 +20,11 @@ use C4::Circulation;
 use C4::Members;
 use C4::Reserves qw(ModReserveFill);
 use C4::Debug;
+use parent qw(ILS::Transaction);
 
-use vars qw($VERSION @ISA $debug);
+our $debug;
 
-BEGIN {
-    $VERSION = 3.07.00.049;
-       @ISA = qw(ILS::Transaction);
-}
+our $VERSION = 3.07.00.049;
 
 # Most fields are handled by the Transaction superclass
 my %fields = (
index 19bdd04..52619f4 100644 (file)
@@ -22,9 +22,8 @@ use strict;
 
 use C4::Accounts qw(recordpayment);
 use ILS;
-use base qw(ILS::Transaction);
+use parent qw(ILS::Transaction);
 
-use vars qw($VERSION @ISA $debug);
 
 our $debug   = 0;
 our $VERSION = 3.07.00.049;
index 3352c1c..a2ca13e 100644 (file)
@@ -12,13 +12,10 @@ use ILS::Transaction;
 use C4::Reserves;      # AddReserve
 use C4::Members;       # GetMember
 use C4::Biblio;                # GetBiblioFromItemNumber GetBiblioItemByBiblioNumber
+use parent qw(ILS::Transaction);
 
-use vars qw($VERSION @ISA);
 
-BEGIN {
-    $VERSION = 3.07.00.049;
-           @ISA = qw(ILS::Transaction);
-}
+our $VERSION = 3.07.00.049;
 
 my %fields = (
        expiration_date => 0,
index 1f0f567..aa300d4 100644 (file)
@@ -12,7 +12,7 @@ use ILS;
 use C4::Circulation;
 use C4::Members;
 
-use base qw(ILS::Transaction);
+use parent qw(ILS::Transaction);
 
 my %fields = (
     renewal_ok => 0,
index c7be96b..7cdb4bb 100644 (file)
@@ -12,7 +12,7 @@ use ILS::Item;
 
 use C4::Members qw( GetMember );
 
-use base qw(ILS::Transaction::Renew);
+use parent qw(ILS::Transaction::Renew);
 
 my %fields = (
     renewed   => [],
index 0e0f41b..15578a9 100755 (executable)
@@ -333,7 +333,6 @@ $template->param(
     booksellerid          => $bookseller->{id},
     countreceived         => $countlines,
     loop_received         => \@loop_received,
-    booksellerid          => $booksellerid,
     loop_orders           => \@loop_orders,
     book_foot_loop        => \@book_foot_loop,
     totalprice            => sprintf($cfstr, $totalprice),
index 842f8d9..5eee81b 100755 (executable)
@@ -25,7 +25,7 @@ use C4::Context;
 use C4::Koha;
 
 my $query = new CGI;
-my ($template, $loggedinuser, $cookie)
+my ($template, $loggedinuser, $cookie, $flags)
 = get_template_and_user({template_name => "circ/circulation-home.tmpl",
                                query => $query,
                                type => "intranet",
@@ -37,5 +37,8 @@ my ($template, $loggedinuser, $cookie)
 my $fa = getframeworkinfo('FA');
 $template->param( fast_cataloging => 1 ) if (defined $fa);
 
+# Checking if the transfer page needs to be displayed
+$template->param( display_transfer => 1 ) if ( ($flags->{'superlibrarian'} == 1) || (C4::Context->preference("IndependantBranches") == 0) );
+
 
 output_html_with_http_headers $query, $cookie, $template->output;
index d35a471..79ceb48 100644 (file)
@@ -155,4 +155,12 @@ a.tagnum {
 .floating {
        -webkit-box-shadow: 0px 3px 2px 0px rgba(0, 0, 0, .5);
        box-shadow: 0px 3px 2px 0px rgba(0, 0, 0, .5);
+}
+
+tr.active td {
+    background-color: #FFFFCC;
+}
+
+tr.active.highlight td {
+    background-color: #FEF4B4;
 }
\ No newline at end of file
index 6909e1c..a0f6abb 100644 (file)
@@ -1,6 +1,6 @@
 [% IF ( PAGE_NUMBERS ) %]<div class="pages">
     <!-- Row of numbers corresponding to search result pages -->
-        [% IF ( previous_page_offset ) %]<a class="nav" href="/cgi-bin/koha/catalogue/search.pl?[% query_cgi |html %][% limit_cgi |html %]&amp;offset=[% previous_page_offset %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by %][% END %]">&lt;&lt; Previous</a>[% END %]
+        [% IF ( previous_page_offset.defined ) %]<a class="nav" href="/cgi-bin/koha/catalogue/search.pl?[% query_cgi |html %][% limit_cgi |html %]&amp;offset=[% previous_page_offset %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by %][% END %]">&lt;&lt; Previous</a>[% END %]
     [% FOREACH PAGE_NUMBER IN PAGE_NUMBERS %][% IF ( PAGE_NUMBER.highlight ) %]<span class="current">[% PAGE_NUMBER.pg %]</span>[% ELSE %]        <a class="nav" href="/cgi-bin/koha/catalogue/search.pl?[% query_cgi |html %][% limit_cgi |html %]&amp;offset=[% PAGE_NUMBER.offset %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by %][% END %]">[% PAGE_NUMBER.pg %]</a>[% END %]
     [% END %]
         [% IF ( next_page_offset ) %]<a class="nav" href="/cgi-bin/koha/catalogue/search.pl?[% query_cgi |html %][% limit_cgi |html %]&amp;offset=[% next_page_offset %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by %][% END %]">Next &gt;&gt;</a>[% END %]
index 833e606..eade72f 100644 (file)
            </ol>
                <fieldset class="action">
         <input type="hidden" value="search" name="op" />
-        <input type="hidden" value="[% booksellerid %]" name="booksellerid" />
-        <input type="hidden" value="[% invoice %]" name="invoice" />
-        <input type="hidden" value="[% invoicedatereceived %]" name="datereceived" />
+        <input type="hidden" value="[% invoiceid %]" name="invoiceid" />
         <input type="submit" value="Filter" />
-        <a href="/cgi-bin/koha/acqui/parcel.pl?booksellerid=[% booksellerid %]&amp;invoice=[% invoice %]&amp;op=new&amp;datereceived=[% formatteddatereceived %]">Clear</a>
+        <a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoiceid %]">Clear</a>
                </fieldset>
 
 
index f8a0506..244f92f 100644 (file)
 
   <div id="budgetsTabs" class="toptabs">
     <ul>
-        <li><a href="#active">Active Budgets</a></li>
-        <li><a href="#inactive">Inactive Budgets</a></li>
+        <li><a href="#active">Active budgets</a></li>
+        <li><a href="#inactive">Inactive budgets</a></li>
     </ul>
 
     <div id="active">
                 <td>
                   <a href="[% script_name %]?op=add_form&amp;budget_period_id=[% period_active.budget_period_id |html %]">Edit</a>
                   <a href="[% script_name %]?op=delete_confirm&amp;budget_period_id=[% period_active.budget_period_id %]">Delete</a>
-                  <a href="/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&amp;budget_period_id=[% period_active.budget_period_id %]">Add Fund</a>
+                  <a href="/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&amp;budget_period_id=[% period_active.budget_period_id %]">Add fund</a>
                 </td>
                 </tr>
               [% END %]
index 2c33df8..0222046 100644 (file)
@@ -87,8 +87,8 @@ function confirm_deletion(biblionumber,itemnumber) {
 
 $(document).ready(function() {
     $("#cataloguing_additem_itemlist  tr").hover(
-        function () {$(this).attr("class","highlight");},
-        function () {$(this).attr("class",""         );}
+        function () {$(this).addClass("highlight");},
+        function () {$(this).removeClass("highlight");}
     );
 });
 //]]>
@@ -131,7 +131,11 @@ $(document).ready(function() {
                 [% END %]
             </tr>
                 [% FOREACH item_loo IN item_loop %]
+                [% IF ( item_loo.itemnumber == itemnumber) %]
+                <tr id="row[% item_loo.itemnumber %]" class="active">
+                [% ELSE %]
                 <tr id="row[% item_loo.itemnumber %]">
+                [% END %]
                     [% IF ( item_loo.nomod ) %] <td colspan="2">&nbsp;</td>[% ELSE %][% IF ( item_loo.hostitemflag ) %]<td><a href="additem.pl?op=edititem&amp;biblionumber=[% item_loo.hostbiblionumber %]&amp;itemnumber=[% item_loo.itemnumber %]#edititem">Edit in host</a></td>
 <td><a class="delete" href="/cgi-bin/koha/cataloguing/additem.pl?op=delinkitem&amp;biblionumber=[% biblionumber %]&amp;hostitemnumber=[% item_loo.itemnumber %]">Delink</a></td>
 [% ELSE %]<td><a href="additem.pl?op=edititem&amp;biblionumber=[% biblionumber %]&amp;itemnumber=[% item_loo.itemnumber %]#edititem">Edit</a></td>
@@ -197,8 +201,8 @@ $(document).ready(function() {
     -->
 
     <input type="submit" name="add_submit" value="Add item" onclick="return Check(this.form)" />
-    <input type="submit" name="add_duplicate_submit" value="Add &amp; Duplicate" onclick="return Check(this.form)" />
-    <input type="submit" name="add_multiple_copies" value="Add Multiple Copies" onclick="javascript:this.nextSibling.style.visibility='visible';document.f.number_of_copies.focus(); return false;" /><span id="add_multiple_copies_span" style="visibility:hidden">
+    <input type="submit" name="add_duplicate_submit" value="Add &amp; duplicate" onclick="return Check(this.form)" />
+    <input type="submit" name="add_multiple_copies" value="Add multiple copies" onclick="javascript:this.nextSibling.style.visibility='visible';document.f.number_of_copies.focus(); return false;" /><span id="add_multiple_copies_span" style="visibility:hidden">
        <label for="number_of_copies">Number of copies to add : </label>
        <input type="text" id="number_of_copies" name="number_of_copies" value="" size="2" />
        <input type="submit" id="add_multiple_copies_submit" name="add_multiple_copies_submit" value="Add" onclick="javascript:return Check(this.form) &amp;&amp; CheckMultipleAdd(this.form.number_of_copies.value);" />
@@ -208,7 +212,7 @@ $(document).ready(function() {
     <input type="hidden" name="tag" value="[% itemtagfield %]" />
     <input type="hidden" name="subfield" value="[% itemtagsubfield %]" />
     <input type="hidden" name="field_value" value="[% itemnumber %]" />
-    <input type="submit" value="Save Changes" onclick="return Check(this.form)" />
+    <input type="submit" value="Save changes" onclick="return Check(this.form)" />
     [% END %]</fieldset>
     
     <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
index 8b4ad57..631158f 100644 (file)
@@ -19,7 +19,9 @@
        <ul>
         <li><a href="/cgi-bin/koha/circ/circulation.pl">Check out</a></li>
         <li><a href="/cgi-bin/koha/circ/returns.pl">Check in</a></li>
+    [% IF ( display_transfer ) %]
                <li><a href="/cgi-bin/koha/circ/branchtransfers.pl">Transfer</a></li>
+    [% END %]
        [% IF ( AutoLocation ) %][% ELSE %][% IF ( IndependantBranches ) %][% ELSE %]<li><a href="/cgi-bin/koha/circ/selectbranchprinter.pl">Set library</a></li>[% END %][% END %]
        [% IF ( fast_cataloging ) %]
            [% IF ( CAN_user_editcatalogue_fast_cataloging ) %]
index 935d943..33d5a3e 100644 (file)
@@ -1,6 +1,6 @@
 [% IF ( PAGE_NUMBERS ) %]<div class="pages">
     <!-- Row of numbers corresponding to search result pages -->
-        [% IF ( previous_page_offset ) %]<a class="nav" href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]&amp;offset=[% previous_page_offset %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by |html %][% END %]">&lt;&lt; Previous</a>[% END %]
+        [% IF ( previous_page_offset.defined ) %]<a class="nav" href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]&amp;offset=[% previous_page_offset %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by |html %][% END %]">&lt;&lt; Previous</a>[% END %]
     [% FOREACH PAGE_NUMBER IN PAGE_NUMBERS %][% IF ( PAGE_NUMBER.highlight ) %]<span class="current">[% PAGE_NUMBER.pg %]</span>[% ELSE %]        <a class="nav" href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]&amp;offset=[% PAGE_NUMBER.offset %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by |html%][% END %]">[% PAGE_NUMBER.pg %]</a>[% END %]
     [% END %]
         [% IF ( next_page_offset ) %]<a class="nav" href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]&amp;offset=[% next_page_offset %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by |html %][% END %]">Next &gt;&gt;</a>[% END %] </div>[% END %]