@@ -, +, @@ --- circ/circulation.pl | 6 +- installer/data/mysql/sysprefs.sql | 2 +- .../prog/en/includes/patron-article-requests.inc | 91 ++++++++++++++++++++++ .../prog/en/modules/circ/article-requests.tt | 8 +- .../prog/en/modules/circ/circulation.tt | 11 +++ .../prog/en/modules/members/moremember.tt | 10 +++ .../opac-tmpl/bootstrap/en/modules/opac-user.tt | 1 - members/moremember.pl | 5 +- 8 files changed, 124 insertions(+), 10 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/patron-article-requests.inc --- a/circ/circulation.pl +++ a/circ/circulation.pl @@ -260,7 +260,9 @@ if ($findborrower) { } # get the borrower information..... +my $patron; if ($borrowernumber) { + $patron = Koha::Patrons->find( $borrowernumber ); $borrower = GetMemberDetails( $borrowernumber, 0 ); my ( $od, $issue, $fines ) = GetMemberIssuesAndFines( $borrowernumber ); @@ -298,7 +300,6 @@ if ($borrowernumber) { finetotal => $fines ); - my $patron = Koha::Patrons->find( $borrowernumber ); if ( $patron and $patron->is_debarred ) { $template->param( 'userdebarred' => $borrower->{debarred}, @@ -596,7 +597,7 @@ my $view = $batch my @relatives; if ( $borrowernumber ) { - if ( my $patron = Koha::Patrons->find( $borrower->{borrowernumber} ) ) { + if ( $patron ) { if ( my $guarantor = $patron->guarantor ) { push @relatives, $guarantor->borrowernumber; push @relatives, $_->borrowernumber for $patron->siblings; @@ -625,6 +626,7 @@ if ($restoreduedatespec || $stickyduedate) { } $template->param( + patron => $patron, librarian_messages => $librarian_messages, patron_messages => $patron_messages, borrower => $borrower, --- a/installer/data/mysql/sysprefs.sql +++ a/installer/data/mysql/sysprefs.sql @@ -43,11 +43,11 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('AmazonLocale','US','US|CA|DE|FR|JP|UK','Use to set the Locale of your Amazon.com Web Services','Choice'), ('AnonSuggestions','0',NULL,'Set to enable Anonymous suggestions to AnonymousPatron borrowernumber','YesNo'), ('AnonymousPatron','0',NULL,'Set the identifier (borrowernumber) of the anonymous patron. Used for Suggestion and reading history privacy',''), -('AudioAlerts','0','','Enable circulation sounds during checkin and checkout in the staff interface. Not supported by all web browsers yet.','YesNo'), ('ArticleRequests', '0', NULL, 'Enables the article request feature', 'YesNo'), ('ArticleRequestsMandatoryFields', '', NULL, 'Comma delimited list of required fields for bibs where article requests rule = ''yes''', 'multiple'), ('ArticleRequestsMandatoryFieldsItemsOnly', '', NULL, 'Comma delimited list of required fields for bibs where article requests rule = ''item_only''', 'multiple'), ('ArticleRequestsMandatoryFieldsRecordOnly', '', NULL, 'Comma delimited list of required fields for bibs where article requests rule = ''bib_only''', 'multiple'), +('AudioAlerts','0','','Enable circulation sounds during checkin and checkout in the staff interface. Not supported by all web browsers yet.','YesNo'), ('AuthDisplayHierarchy','0','','Display authority hierarchies','YesNo'), ('AuthoritiesLog','1',NULL,'If ON, log edit/create/delete actions on authorities.','YesNo'), ('AuthoritySeparator','--','10','Used to separate a list of authorities in a display. Usually --','free'), --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-article-requests.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-article-requests.inc @@ -0,0 +1,91 @@ +
+[% IF patron.article_requests_current.count %] + + + + + + + + + + + + + + + + + + + + [% FOREACH ar IN patron.article_requests_current %] + + + + + + + + + + + + + + + + + + + + + + + + + + [% END %] + +
Record titlePlaced onTitleAuthorVolumeIssueDatePagesChaptersNotesStatusPickup library
+ + [% ar.biblio.title %] + [% ar.item.enumchron %] + + [% ar.biblio.author %] + [% IF ar.itemnumber %] (only [% ar.item.barcode %])[% END %] + + [% ar.created_on | $KohaDates %] + + [% ar.title %] + + [% ar.author %] + + [% ar.volume %] + + [% ar.issue %] + + [% ar.date %] + + [% ar.pages %] + + [% ar.chapters %] + + [% ar.patron_notes %] + + [% IF ar.status == 'PENDING' %] + Pending + [% ELSIF ar.status == 'PROCESSING' %] + Processing + [% ELSIF ar.status == 'COMPLETED' %] + Completed + [% ELSIF ar.status == 'CANCELED' %] + Canceled + [% END %] + + [% ar.branch.branchname %] +
+ [% ELSE %] + Patron has no current article requests. + [% END %] +
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt @@ -252,22 +252,22 @@ @@ -984,6 +991,10 @@ No patron matched [% message | html %] [% END %] +[% IF Koha.Preference('ArticleRequests') %] + [% INCLUDE 'patron-article-requests.inc' %] +[% END %] + [% ELSIF borrowernumber %]
This patron does not exist. Find another patron?
[% END %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -485,6 +485,11 @@ function validate1(date) { 0 Holds [% END %] + [% IF Koha.Preference('ArticleRequests') %] +
  • + [% patron.article_requests_current.count %] Article requests +
  • + [% END %]
  • [% debarments.size %] Restrictions
  • @@ -576,6 +581,11 @@ function validate1(date) { [% ELSE %]

    Patron has nothing on hold.

    [% END %] + +[% IF Koha.Preference('ArticleRequests') %] + [% INCLUDE 'patron-article-requests.inc' %] +[% END %] + [% END %] --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt @@ -722,7 +722,6 @@ Using this account is not recommended because some parts of Koha will not functi
    - --- a/members/moremember.pl +++ a/members/moremember.pl @@ -320,9 +320,10 @@ if (C4::Context->preference('EnhancedMessagingPreferences')) { } # in template => instutitional (A for Adult, C for children) -$template->param( $data->{'categorycode'} => 1 ); +$template->param( $data->{'categorycode'} => 1 ); $template->param( - detailview => 1, + patron => $patron, + detailview => 1, borrowernumber => $borrowernumber, othernames => $data->{'othernames'}, categoryname => $data->{'description'}, --
    Article requests ([% borrower.article_requests_current.count %] total)
    Record title