@@ -, +, @@ page for a user. works as expected --- circ/circulation.pl | 6 +- .../en/includes/patron-restrictions-tab.inc | 81 +++++++++++++++++++ .../prog/en/includes/restriction-types.inc | 10 +++ .../prog/en/modules/circ/circulation.tt | 4 +- 4 files changed, 95 insertions(+), 6 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/patron-restrictions-tab.inc create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/restriction-types.inc --- a/circ/circulation.pl +++ a/circ/circulation.pl @@ -44,7 +44,6 @@ use CGI::Session; use Koha::AuthorisedValues; use Koha::CsvProfiles; use Koha::Patrons; -use Koha::Patron::Debarments qw( GetDebarments ); use Koha::DateUtils qw( dt_from_string ); use Koha::Patron::Restriction::Types; use Koha::Plugins; @@ -625,10 +624,9 @@ my $has_modifications = Koha::Patron::Modifications->search( { borrowernumber => $template->param( debt_confirmed => $debt_confirmed, SpecifyDueDate => $duedatespec_allow, - PatronAutoComplete => C4::Context->preference("PatronAutoComplete"), - debarments => scalar GetDebarments({ borrowernumber => $borrowernumber }), + PatronAutoComplete => C4::Context->preference("PatronAutoComplete"), todaysdate => dt_from_string()->set(hour => 23)->set(minute => 59), - restriction_types => scalar Koha::Patron::Restriction::Types->keyed_on_code(), + restriction_types => scalar Koha::Patron::Restriction::Types->search(), has_modifications => $has_modifications, override_high_holds => $override_high_holds, nopermission => scalar $query->param('nopermission'), --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-restrictions-tab.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-restrictions-tab.inc @@ -0,0 +1,81 @@ +[% USE raw %] +[% USE Koha %] +[% PROCESS 'restriction-types.inc' %] +
Patron is currently unrestricted.
+ [% ELSE %] +Type | +Comment | +Expiration | +Created | + [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %] ++ [% END %] + |
---|---|---|---|---|
+ [% PROCESS restriction_type_description restriction_type=restriction.type %] + | ++ [% IF restriction.comment.search('OVERDUES_PROCESS') %] + Restriction added by overdues process [% restriction.comment.remove('OVERDUES_PROCESS ') | $raw %] + [% ELSE %] + [% restriction.comment | $raw %] + [% END %] + | +[% IF restriction.expiration %] [% restriction.expiration | $KohaDates %] [% ELSE %] Indefinite [% END %] | +[% restriction.created | $KohaDates %] | + [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %] ++ + Remove + + | + [% END %] +