Browse Source

Bug 3539, Adding a systempreference to hide borrowers name on the catalogue detail page, and holds page

Squashed commit of the following:

commit e9dd6e1dee03fe3503f7995b57510f9edfe6b333
Author: Chris Cormack <chrisc@catalyst.net.nz>
Date:   Wed Aug 19 08:14:53 2009 +0000

    Version number

commit df3ee5473e79b760a91c62b96d7ce19229e0fd27
Author: Chris Cormack <chrisc@catalyst.net.nz>
Date:   Wed Aug 19 08:08:11 2009 +0000

    French systempref

commit c4b036e4e43947d7d1fb9f2e18e460788cb4e1ec
Author: Chris Cormack <chrisc@catalyst.net.nz>
Date:   Wed Aug 19 00:25:33 2009 +0000

    Code to update the database, and updating the sysprefs.sql

commit f74b942c24d5e9c33a4ec0e5ac706a0e347eb1a7
Author: Chris Cormack <chrisc@catalyst.net.nz>
Date:   Tue Aug 18 02:07:22 2009 +0000

    Now hides the name on the detail screen too

commit 53c80dbef88e360a4bbb78ecff3a6ca6ec401398
Author: Chris Cormack <chrisc@catalyst.net.nz>
Date:   Tue Aug 18 01:35:19 2009 +0000

    Allowing the librarians to choose to hide the borrowers name on holds

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
3.2.x
Chris Cormack 15 years ago
committed by Galen Charlton
parent
commit
634df1c76c
  1. 2
      admin/systempreferences.pl
  2. 7
      catalogue/detail.pl
  3. 1
      installer/data/mysql/en/mandatory/sysprefs.sql
  4. 1
      installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
  5. 7
      installer/data/mysql/updatedatabase.pl
  6. 16
      koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl
  7. 8
      koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tmpl
  8. 2
      kohaversion.pl
  9. 7
      reserve/request.pl

2
admin/systempreferences.pl

@ -206,6 +206,8 @@ $tabsysprefs{AutoEmailOpacUser} = "Patrons";
$tabsysprefs{AutoEmailPrimaryAddress} = "Patrons";
$tabsysprefs{EnhancedMessagingPreferences} = "Patrons";
$tabsysprefs{'SMSSendDriver'} = 'Patrons';
$tabsysprefs{HidePatronName} = "Patrons";
# I18N/L10N
$tabsysprefs{dateformat} = "I18N/L10N";

7
catalogue/detail.pl

@ -155,6 +155,10 @@ foreach my $item (@items) {
# checking for holds
my ($reservedate,$reservedfor,$expectedAt) = GetReservesFromItemnumber($item->{itemnumber});
my $ItemBorrowerReserveInfo = GetMemberDetails( $reservedfor, 0);
if (C4::Context->preference('HidePatronName')){
$item->{'hidepatronname'} = 1;
}
if ( defined $reservedate ) {
$item->{backgroundcolor} = 'reserved';
@ -162,7 +166,8 @@ foreach my $item (@items) {
$item->{ReservedForBorrowernumber} = $reservedfor;
$item->{ReservedForSurname} = $ItemBorrowerReserveInfo->{'surname'};
$item->{ReservedForFirstname} = $ItemBorrowerReserveInfo->{'firstname'};
$item->{ExpectedAtLibrary} = $branches->{$expectedAt}{branchname};
$item->{ExpectedAtLibrary} = $branches->{$expectedAt}{branchname};
$item->{cardnumber} = $ItemBorrowerReserveInfo->{'cardnumber'};
}
# Check the transit status

1
installer/data/mysql/en/mandatory/sysprefs.sql

@ -255,3 +255,4 @@ INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanatio
INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanation` , `type` ) VALUES ( 'InProcessingToShelvingCart', '0', '', 'If set, when any item with a location code of PROC is ''checked in'', it''s location code will be changed to CART.', 'YesNo');
INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanation` , `type` ) VALUES ( 'ReturnToShelvingCart', '0', '', 'If set, when any item is ''checked in'', it''s location code will be changed to CART.', 'YesNo');
INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanation` , `type` ) VALUES ( 'DisplayClearScreenButton', '0', '', 'If set to yes, a clear screen button will appear on the circulation page.', 'YesNo');
INSERT INTO systempreferences (variable,value,options,explanation,type)VALUES('HidePatronName', '0', '', 'If this is switched on, patrons cardnumbers will be shown instead of their name on the holds and catalogue screens', 'YesNo');

1
installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql

@ -257,3 +257,4 @@ INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanatio
INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanation` , `type` ) VALUES ( 'InProcessingToShelvingCart', '0', '', 'Si défini, quand un exemplaire avec localisation de PROC est renvoyé son code sera modifié pour CART.', 'YesNo');
INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanation` , `type` ) VALUES ( 'ReturnToShelvingCart', '0', '', 'Si défini, quand un exemplaire est renvoyé son code sera modifié pour CART.' 'YesNo');
INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanation` , `type` ) VALUES ('DisplayClearScreenButton', '0', '', 'Cette option ajoute un bouton à la page de circulation pour effacer l\'écran', 'YesNo');
INSERT INTO systempreferences (variable,value,options,explanation,type)VALUES('HidePatronName', '0', '', 'Active l''affichage du numéro des adhérents à la place de leur nom dans les pages de réservation et du catalogue.', 'YesNo');

7
installer/data/mysql/updatedatabase.pl

@ -2528,6 +2528,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
print "Upgrade to $DBversion done (added DisplayClearScreenButton system preference)\n";
}
$DBversion = '3.01.00.045';
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
$dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type)VALUES('HidePatronName', '0', '', 'If this is switched on, patrons cardnumbers will be shown instead of their name on the holds and catalogue screens', 'YesNo')");
SetVersion ($DBversion);
print "Upgrade to $DBversion done (added a preference to hide the patrons name in the staff catalog)";
}
=item DropAllForeignKeys($table)
Drop all foreign keys of the table $table

16
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl

@ -200,7 +200,13 @@ function verify_images() {
<!-- TMPL_IF name="datedue" -->
<span class="datedue">Checked out
<!-- TMPL_UNLESS NAME="NOTSAMEBRANCH" -->
to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->"><!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --></a>
to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->">
<!-- TMPL_IF NAME='hidepatronname' -->
<!-- TMPL_VAR NAME="cardnumber" -->
<!-- TMPL_ELSE -->
<!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" -->
<!-- /TMPL_IF -->
</a>
<!-- /TMPL_UNLESS -->
: due <!-- TMPL_VAR NAME="datedue" -->
</span>
@ -252,7 +258,13 @@ function verify_images() {
<!-- TMPL_ELSE -->
On hold
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="canreservefromotherbranches" -->for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="ReservedForBorrowernumber" -->"><!-- TMPL_VAR NAME="ReservedForFirstname" --> <!-- TMPL_VAR NAME="ReservedForSurname" --></a><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="canreservefromotherbranches" -->for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="ReservedForBorrowernumber" -->">
<!-- TMPL_IF NAME="hidepatronname" -->
<!-- TMPL_VAR NAME="cardnumber" -->
<!-- TMPL_ELSE -->
<!-- TMPL_VAR NAME="ReservedForFirstname" --> <!-- TMPL_VAR NAME="ReservedForSurname" -->
<!-- /TMPL_IF -->
</a><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="waitingdate" -->
at<!-- TMPL_ELSE -->expected at
<!-- /TMPL_IF --> <!-- TMPL_VAR NAME="ExpectedAtLibrary" -->

8
koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tmpl

@ -552,7 +552,13 @@ function checkMultiHold() {
</select>
</td>
<td>
<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->" ><!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --></a>
<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->" >
<!-- TMPL_IF NAME="hidename" -->
<!-- TMPL_VAR NAME="cardnumber" -->
<!-- TMPL_ELSE -->
<!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" -->
<!-- /TMPL_IF -->
</a>
</td>
<td><!-- TMPL_VAR NAME="notes" --></td>
<td><!-- TMPL_VAR NAME="date" --></td>

2
kohaversion.pl

@ -10,7 +10,7 @@
use strict;
sub kohaversion {
our $VERSION = '3.01.00.044';
our $VERSION = '3.01.00.045';
# version needs to be set this way
# so that it can be picked up by Makefile.PL
# during install

7
reserve/request.pl

@ -478,13 +478,16 @@ foreach my $biblionumber (@biblionumbers) {
# get borrowers reserve info
my $reserveborrowerinfo = GetMemberDetails( $res->{'borrowernumber'}, 0);
if (C4::Context->preference('HidePatronName')){
$reserve{'hidename'} = 1;
$reserve{'cardnumber'} = $reserveborrowerinfo->{'cardnumber'};
}
$reserve{'date'} = format_date( $res->{'reservedate'} );
$reserve{'borrowernumber'} = $res->{'borrowernumber'};
$reserve{'biblionumber'} = $res->{'biblionumber'};
$reserve{'borrowernumber'} = $res->{'borrowernumber'};
$reserve{'firstname'} = $reserveborrowerinfo->{'firstname'};
$reserve{'surname'} = $reserveborrowerinfo->{'surname'};
$reserve{'surname'} = $reserveborrowerinfo->{'surname'};
$reserve{'notes'} = $res->{'reservenotes'};
$reserve{'wait'} =
( ( defined $res->{'found'} and $res->{'found'} eq 'W' ) or ( $res->{'priority'} eq '0' ) );

Loading…
Cancel
Save