Bug 18403: Use patron-title.inc when hidepatronname is used
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 5 Apr 2017 19:43:41 +0000 (16:43 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 12 Feb 2018 18:41:38 +0000 (15:41 -0300)
commit5f80977875ff124d411f2cd89de4a944fa9c27af
treed4b345f965b3e4bea0321389922a2e6fc3b9df3e
parente09ed656af5f75a82ccfa29318081e217618c32d
Bug 18403: Use patron-title.inc when hidepatronname is used

There is already a HidePatronName syspref to hide patron's information
on bibliographic
record detail pages and the hold list.

Test plan:
With the HidePatronName enabled, make sure the patron's information are
hidden from
the catalogue and hold list pages. If the logged in user is not allowed
to see the
patron's info, no link and no cardnumber will be displayed
With he HidePatronName disabled, make sure the patron's information are
displayed
if the logged in user is allowed to see the patron's info.

Technical note:
This patch improves the existing patron-title.inc include file to
display patron's
information. Using it everywhere patron's details are displayed will
permit to
homogenise the way they are displayed. The file takes now a patron
object (what
should be, in the future, the only way to use it), that way we can call
the new
method on it to know if patron's information can be shown by the logged
in used.

NOTE: I am not sure this syspref makes sense anymore. Should not we
remove it?

Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/Hold.pm
catalogue/detail.pl
catalogue/moredetail.pl
koha-tmpl/intranet-tmpl/prog/en/includes/patron-title.inc
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt
reserve/request.pl