diff --git a/Koha/List/Patron.pm b/Koha/List/Patron.pm index 1847973bdd..c6f43848a3 100644 --- a/Koha/List/Patron.pm +++ b/Koha/List/Patron.pm @@ -63,7 +63,15 @@ sub GetPatronLists { return; } - delete( $params->{owner} ) if ( C4::Context->IsSuperLibrarian() ); + delete $params->{owner} if C4::Context->IsSuperLibrarian(); + + if ( my $owner = $params->{owner} ) { + delete $params->{owner}; + $params->{'-or'} = [ + owner => $owner, + shared => 1, + ]; + } my $schema = Koha::Database->new()->schema(); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/add-modify.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/add-modify.tt index 570b309bc5..23ee885598 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/add-modify.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/add-modify.tt @@ -51,6 +51,15 @@ +
  • + + [% IF list.shared %] + + [% ELSE %] + + [% END %] +
  • +
  • Owner: [% loggedinusername %]
  • diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt index f2cd32df5c..dcf3ca549f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt @@ -32,15 +32,26 @@ Name Patrons in list + Shared   [% FOREACH l IN lists %] + [% SET shared_by_other = l.owner.id != logged_in_user %] [% l.name |html%] [% l.patron_list_patrons_rs.count || 0 %] + + [% IF l.shared %] + [% IF shared_by_other %] + by [% INCLUDE 'patron-title.inc' patron=l.owner %] + [% ELSE %] + by you + [% END %] + [% END %] +