From 95605a2d16a4cff8f4e95fa5a0593f0ffa3dacab Mon Sep 17 00:00:00 2001 From: Srdjan Date: Wed, 15 Jun 2016 15:40:03 +1200 Subject: [PATCH] bug 14803: KOHA.Checkouts js object * Use javascript to: - update fines/checkouts info - show/hide checkouts form and messages * Created svc/patron/fines --- circ/circulation.pl | 10 --- .../prog/en/includes/blocked-fines.inc | 22 ++++--- .../prog/en/includes/checkouts-table.inc | 7 +- .../prog/en/modules/circ/circulation.tt | 76 ++++++++-------------- .../prog/en/modules/members/moremember.tt | 5 +- koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 40 ++++++++++++ members/moremember.pl | 2 - svc/patron/fines | 45 +++++++++++++ 8 files changed, 129 insertions(+), 78 deletions(-) create mode 100755 svc/patron/fines diff --git a/circ/circulation.pl b/circ/circulation.pl index fad8623..086810b 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -263,10 +263,6 @@ if ($findborrower) { # get the borrower information..... if ($borrowernumber) { $patron = Koha::Patrons->find( $borrowernumber ); - my $overdues = $patron->get_overdues; - my $issues = $patron->checkouts; - my $balance = $patron->account->balance; - # if the expiry date is before today ie they have expired if ( $patron->is_expired ) { @@ -286,11 +282,6 @@ if ($borrowernumber) { $template->param("returnbeforeexpiry" => 1); } } - $template->param( - overduecount => $overdues->count, - issuecount => $issues->count, - finetotal => $balance, - ); if ( $patron and $patron->is_debarred ) { $template->param( @@ -415,7 +406,6 @@ if (@$barcodes) { ); } - # FIXME If the issue is confirmed, we launch another time checkouts->count, now display the issue count after issue $patron = Koha::Patrons->find( $borrowernumber ); $template_params->{issuecount} = $patron->checkouts->count; diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/blocked-fines.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/blocked-fines.inc index 1cbe84f..5fba935 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/blocked-fines.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/blocked-fines.inc @@ -1,13 +1,19 @@ -[% USE Price %] -[% SET NoIssuesCharge = Koha.Preference('noissuescharge') %] -[% IF fines and fines > 0 %] -
  • + + +
  • -[% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc index b34089d..4feaa15 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc @@ -1,6 +1,6 @@ [% USE Koha %]
    - [% IF ( issuecount ) %] + +
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index ed054ae..5979e0f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -20,12 +20,16 @@ [% INCLUDE 'strings.inc' %] [% INCLUDE 'datatables.inc' %] [% INCLUDE 'columns_settings.inc' %] +[% show_barcode_input = (Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce')) || !noissues || forceallow %] + [% INCLUDE 'timepicker.inc' %] - -