From fc65b249fc0eaa184aa858c0fe81646033215878 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 15 Feb 2018 15:06:04 -0300 Subject: [PATCH] Bug 18789: Use the patron variable in circulation.[pl|tt] Signed-off-by: Josef Moravec --- circ/circulation.pl | 2 - .../prog/en/includes/patron-search.inc | 2 +- .../prog/en/modules/circ/circulation.tt | 52 +++++++++++----------- 3 files changed, 27 insertions(+), 29 deletions(-) diff --git a/circ/circulation.pl b/circ/circulation.pl index a64844e..1b26521 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -609,8 +609,6 @@ if ( $patron ) { my $av = Koha::AuthorisedValues->search({ category => 'ROADTYPE', authorised_value => $patron->streettype }); my $roadtype = $av->count ? $av->next->lib : ''; $template->param( - %{ $patron->unblessed }, - borrower => $patron->unblessed, roadtype => $roadtype, patron => $patron, categoryname => $patron->category->description, diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc index f8c7ec9..84e67a3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc @@ -165,5 +165,5 @@ var CAN_user_borrowers_edit_borrowers = "[% CAN_user_borrowers_edit_borrowers %]"; var NorwegianPatronDBEnable = "[% NorwegianPatronDBEnable %]"; var CATCODE_MULTI = "[% CATCODE_MULTI %]"; - var borrowernumber = "[% borrowernumber %]"; + var borrowernumber = "[% patron.borrowernumber %]"; 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 92489bf..6afdc19 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -10,7 +10,7 @@ [% INCLUDE 'doc-head-open.inc' %] [% SET destination = "circ" %] Koha › Circulation -[% IF borrowernumber and borrower%] +[% IF patron %] › Checking out to [% INCLUDE 'patron-title.inc' invert_name = 1 no_html = 1 %] [% END %] @@ -24,7 +24,7 @@ [% INCLUDE 'circ-search.inc' %] @@ -326,7 +326,7 @@ [% IF ( fast_cataloging ) %] [% IF ( CAN_user_editcatalogue_fast_cataloging ) %] - Add record using fast cataloging + Add record using fast cataloging [% END %] [% END %] @@ -437,7 +437,7 @@ [% END %] - + @@ -487,7 +487,7 @@ No patron matched [% message | html %] -[% IF borrowernumber and borrower %] +[% IF patron %]
[% IF privacy == 2 AND NOT Koha.Preference('AnonymousPatron') %] @@ -597,7 +597,7 @@ No patron matched [% message | html %]
- + @@ -655,7 +655,7 @@ No patron matched [% message | html %] [% IF ( warndeparture ) %]
  • Expiration: Patron's card will expire soon. - Patron's card expires on [% expiry | $KohaDates %] Renew or Edit Details + Patron's card expires on [% expiry | $KohaDates %] Renew or Edit Details
  • [% END %] @@ -668,7 +668,7 @@ No patron matched [% message | html %] [% IF ( expired ) %]
  • Expiration: Patron's card has expired. - [% IF ( expiry ) %]Patron's card expired on [% expiry | $KohaDates %][% END %] Renew or Edit Details + [% IF ( expiry ) %]Patron's card expired on [% expiry | $KohaDates %][% END %] Renew or Edit Details
  • [% END %] @@ -700,9 +700,9 @@ No patron matched [% message | html %] [% END %]
    View restrictions - [% IF (noissues && borrowernumber && CAN_user_circulate_force_checkout) %] + [% IF (noissues && patron && CAN_user_circulate_force_checkout) %] - Override restriction temporarily + Override restriction temporarily [% END %] @@ -902,7 +902,7 @@ No patron matched [% message | html %]
    - + [% IF Koha.Preference('AutoResumeSuspendedHolds') %] @@ -916,7 +916,7 @@ No patron matched [% message | html %]
    - + @@ -934,12 +934,12 @@ No patron matched [% message | html %] [% ELSIF borrowernumber %]
    This patron does not exist. Find another patron?
    -[% END %] +[% END %] [% END %] [% IF Koha.Preference('CircSidebar') %] [% UNLESS ( borrowers ) %] - [% IF not( borrowernumber and borrower ) %] + [% IF not( borrowernumber and patron ) %]
    [% INCLUDE 'circ-nav.inc' %]
    @@ -949,7 +949,7 @@ No patron matched [% message | html %] [% UNLESS ( borrowers ) %] - [% IF borrowernumber and borrower %] + [% IF borrowernumber and patron %]
    [% INCLUDE 'circ-menu.inc' %]
    @@ -988,7 +988,7 @@ No patron matched [% message | html %] var MSG_DT_LOADING_RECORDS = _("Loading... you may continue scanning."); var interface = "[% interface %]"; var theme = "[% theme %]"; - var borrowernumber = "[% borrowernumber %]"; + var borrowernumber = "[% patron.borrowernumber %]"; var branchcode = "[% branch %]"; var exports_enabled = "[% Koha.Preference('ExportCircHistory') %]"; var AllowRenewalLimitOverride = [% (CAN_user_circulate_override_renewals && Koha.Preference('AllowRenewalLimitOverride') )? 1: 0 %]; @@ -1013,15 +1013,15 @@ No patron matched [% message | html %] columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'issues-table', 'json' ) %] - [% IF borrowernumber and borrower %] - if($.cookie("holdfor") != [% borrowernumber %]){ + [% IF borrowernumber and patron %] + if($.cookie("holdfor") != [% patron.borrowernumber %]){ $.removeCookie("holdfor", { path: '/' }); } [% ELSE %] $.removeCookie("holdfor", { path: '/' }); [% END %] - [% UNLESS ( borrowernumber ) %][% UNLESS ( borrowers ) %]window.onload=function(){ $('#findborrower').focus(); };[% END %][% END %] + [% UNLESS ( patron.borrowernumber ) %][% UNLESS ( borrowers ) %]window.onload=function(){ $('#findborrower').focus(); };[% END %][% END %] // On-site checkout function toggle_onsite_checkout(){ @@ -1061,7 +1061,7 @@ No patron matched [% message | html %] if ( $('#clubs-tab').length ) { $('#clubs-tab-link').on('click', function() { $('#clubs-tab').text(_("Loading...")); - $('#clubs-tab').load('/cgi-bin/koha/clubs/patron-clubs-tab.pl?borrowernumber=[% borrowernumber %]'); + $('#clubs-tab').load('/cgi-bin/koha/clubs/patron-clubs-tab.pl?borrowernumber=[% patron.borrowernumber %]'); }); } -- 2.1.4