@@ -, +, @@ --- C4/Members.pm | 1 - C4/Reserves.pm | 1 + Koha/Schema/Result/Borrower.pm | 6 ++- Koha/Template/Plugin/Koha.pm | 15 ++++++ .../prog/en/modules/admin/preferences/opac.pref | 7 +++ .../prog/en/modules/admin/preferences/patrons.pref | 6 +++ .../prog/en/modules/members/memberentrygen.tt | 16 ++++++ .../prog/en/modules/members/moremember.tt | 10 ++++ .../bootstrap/en/modules/opac-memberentry.tt | 43 ++++++++++++++++ .../opac-tmpl/bootstrap/en/modules/opac-privacy.tt | 24 ++++++++- .../opac-tmpl/bootstrap/en/modules/opac-user.tt | 54 ++++++++++++++++++-- members/moremember.pl | 1 + opac/opac-privacy.pl | 38 +++++++++----- opac/opac-user.pl | 32 ++++++++---- 14 files changed, 224 insertions(+), 30 deletions(-) --- a/C4/Members.pm +++ a/C4/Members.pm @@ -115,7 +115,6 @@ BEGIN { push @EXPORT, qw( &ModMember &changepassword - &ModPrivacy ); #Delete data --- a/C4/Reserves.pm +++ a/C4/Reserves.pm @@ -266,6 +266,7 @@ sub GetReserve { my ($reserve_id) = @_; my $dbh = C4::Context->dbh; + my $query = "SELECT * FROM reserves WHERE reserve_id = ?"; my $sth = $dbh->prepare( $query ); $sth->execute( $reserve_id ); --- a/Koha/Schema/Result/Borrower.pm +++ a/Koha/Schema/Result/Borrower.pm @@ -1140,6 +1140,10 @@ __PACKAGE__->many_to_many("courses", "course_instructors", "course"); # Created by DBIx::Class::Schema::Loader v0.07040 @ 2014-12-21 23:11:08 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:49MbDhILto8NukjDlkt8sA +__PACKAGE__->belongs_to( + "guarantor", + "Koha::Schema::Result::Borrower", + { borrowernumber => "guarantorid" }, +); -# You can replace this text with custom content, and it will be preserved on regeneration 1; --- a/Koha/Template/Plugin/Koha.pm +++ a/Koha/Template/Plugin/Koha.pm @@ -23,6 +23,7 @@ use Encode qw( encode ); use base qw( Template::Plugin ); use C4::Context; +use Koha::Database; =pod @@ -59,4 +60,18 @@ sub Version { }; } +sub Find { + my ( $self, $rs, $id ) = @_; + + return unless ( $rs && $id ); + + my $resultset = Koha::Database->new()->schema()->resultset($rs); + + return unless $resultset; + + my $row = $resultset->find($id); + + return $row; +} + 1; --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref @@ -588,6 +588,13 @@ OPAC: no: "Don't allow" - patrons to choose their own privacy settings for their reading history. This requires opacreadinghistory and AnonymousPatron - + - pref: AllowPatronToSetCheckoutsVisibilityForGuarantor + default: 0 + choices: + yes: Allow + no: "Don't allow" + - patrons to choose their own privacy settings for showing the patron's checkouts to the patron's guarantor". + - - Use borrowernumber - pref: AnonymousPatron class: integer --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref @@ -135,6 +135,12 @@ Patrons: no: "Don't" - enable the ability to upload and attach arbitrary files to a borrower record. - + - pref: AllowStaffToSetCheckoutsVisibilityForGuarantor + choices: + yes: Allow + no: "Don't allow" + - staff to set the ability for a patron's checkouts to be viewed by linked patrons in the OPAC. + - - Card numbers for patrons must be - pref: CardnumberLength - "characters long. The length can be a single number to specify an exact length, a range separated by a comma (i.e., 'Min,Max'), or a maximum with no minimum (i.e., ',Max')." --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -1,5 +1,6 @@ [% USE Koha %] [% USE KohaDates %] +[% USE Koha %] [% INCLUDE 'doc-head-open.inc' %]