View | Details | Raw Unified | Return to bug 9303
Collapse All | Expand All

(-)a/C4/Members.pm (-1 lines)
Lines 115-121 BEGIN { Link Here
115
    push @EXPORT, qw(
115
    push @EXPORT, qw(
116
        &ModMember
116
        &ModMember
117
        &changepassword
117
        &changepassword
118
         &ModPrivacy
119
    );
118
    );
120
119
121
    #Delete data
120
    #Delete data
(-)a/C4/Reserves.pm (+1 lines)
Lines 266-271 sub GetReserve { Link Here
266
    my ($reserve_id) = @_;
266
    my ($reserve_id) = @_;
267
267
268
    my $dbh = C4::Context->dbh;
268
    my $dbh = C4::Context->dbh;
269
269
    my $query = "SELECT * FROM reserves WHERE reserve_id = ?";
270
    my $query = "SELECT * FROM reserves WHERE reserve_id = ?";
270
    my $sth = $dbh->prepare( $query );
271
    my $sth = $dbh->prepare( $query );
271
    $sth->execute( $reserve_id );
272
    $sth->execute( $reserve_id );
(-)a/Koha/Schema/Result/Borrower.pm (-1 / +5 lines)
Lines 1140-1145 __PACKAGE__->many_to_many("courses", "course_instructors", "course"); Link Here
1140
# Created by DBIx::Class::Schema::Loader v0.07040 @ 2014-12-21 23:11:08
1140
# Created by DBIx::Class::Schema::Loader v0.07040 @ 2014-12-21 23:11:08
1141
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:49MbDhILto8NukjDlkt8sA
1141
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:49MbDhILto8NukjDlkt8sA
1142
1142
1143
__PACKAGE__->belongs_to(
1144
    "guarantor",
1145
    "Koha::Schema::Result::Borrower",
1146
    { borrowernumber => "guarantorid" },
1147
);
1143
1148
1144
# You can replace this text with custom content, and it will be preserved on regeneration
1145
1;
1149
1;
(-)a/Koha/Template/Plugin/Koha.pm (+15 lines)
Lines 23-28 use Encode qw( encode ); Link Here
23
use base qw( Template::Plugin );
23
use base qw( Template::Plugin );
24
24
25
use C4::Context;
25
use C4::Context;
26
use Koha::Database;
26
27
27
=pod
28
=pod
28
29
Lines 59-62 sub Version { Link Here
59
    };
60
    };
60
}
61
}
61
62
63
sub Find {
64
    my ( $self, $rs, $id ) = @_;
65
66
    return unless ( $rs && $id );
67
68
    my $resultset = Koha::Database->new()->schema()->resultset($rs);
69
70
    return unless $resultset;
71
72
    my $row = $resultset->find($id);
73
74
    return $row;
75
}
76
62
1;
77
1;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (+7 lines)
Lines 588-593 OPAC: Link Here
588
                  no: "Don't allow"
588
                  no: "Don't allow"
589
            - patrons to choose their own privacy settings for their reading history.  This requires opacreadinghistory and AnonymousPatron
589
            - patrons to choose their own privacy settings for their reading history.  This requires opacreadinghistory and AnonymousPatron
590
        -
590
        -
591
            - pref: AllowPatronToSetCheckoutsVisibilityForGuarantor
592
              default: 0
593
              choices:
594
                  yes: Allow
595
                  no: "Don't allow"
596
            - patrons to choose their own privacy settings for showing the patron's checkouts to the patron's guarantor".
597
        -
591
            - Use borrowernumber
598
            - Use borrowernumber
592
            - pref: AnonymousPatron
599
            - pref: AnonymousPatron
593
              class: integer
600
              class: integer
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref (+6 lines)
Lines 135-140 Patrons: Link Here
135
               no: "Don't"
135
               no: "Don't"
136
         - enable the ability to upload and attach arbitrary files to a borrower record.
136
         - enable the ability to upload and attach arbitrary files to a borrower record.
137
     -
137
     -
138
         - pref: AllowStaffToSetCheckoutsVisibilityForGuarantor
139
           choices:
140
               yes: Allow
141
               no: "Don't allow"
142
         - staff to set the ability for a patron's checkouts to be viewed by linked patrons in the OPAC.
143
     -
138
         - Card numbers for patrons must be
144
         - Card numbers for patrons must be
139
         - pref: CardnumberLength
145
         - pref: CardnumberLength
140
         - "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')."
146
         - "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 (+16 lines)
Lines 1-5 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% USE KohaDates %]
2
[% USE KohaDates %]
3
[% USE Koha %]
3
[% INCLUDE 'doc-head-open.inc' %]
4
[% INCLUDE 'doc-head-open.inc' %]
4
<title>Koha &rsaquo; Patrons &rsaquo; 
5
<title>Koha &rsaquo; Patrons &rsaquo; 
5
[% IF ( opadd ) %]Add[% ELSIF ( opduplicate ) %]Duplicate[% ELSE %] Modify[% END %] [% IF ( categoryname ) %] [% categoryname %] patron[% ELSE %][% IF ( I ) %] Organization patron[% END %][% IF ( A ) %] Adult patron[% END %][% IF ( C ) %] Child patron[% END %][% IF ( P ) %] Professional patron[% END %][% IF ( S ) %] Staff patron[% END %][% END %][% UNLESS ( opadd ) %] [% surname %], [% firstname %][% END %]</title>
6
[% IF ( opadd ) %]Add[% ELSIF ( opduplicate ) %]Duplicate[% ELSE %] Modify[% END %] [% IF ( categoryname ) %] [% categoryname %] patron[% ELSE %][% IF ( I ) %] Organization patron[% END %][% IF ( A ) %] Adult patron[% END %][% IF ( C ) %] Child patron[% END %][% IF ( P ) %] Professional patron[% END %][% IF ( S ) %] Staff patron[% END %][% END %][% UNLESS ( opadd ) %] [% surname %], [% firstname %][% END %]</title>
Lines 1185-1190 Link Here
1185
			[% END %]
1186
			[% END %]
1186
	  [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_password_mismatch ) %]<span class="required">Passwords do not match</span>[% END %]
1187
	  [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_password_mismatch ) %]<span class="required">Passwords do not match</span>[% END %]
1187
		</li>
1188
		</li>
1189
        [% IF guarantorid && Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %]
1190
            <li>
1191
                <label for="privacy_guarantor_checkouts">Show checkouts to guarantor</label>
1192
                <select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts">
1193
                    [% IF privacy_guarantor_checkouts %]
1194
                        <option value="0">No</option>
1195
                        <option value="1" selected>Yes</option>
1196
                    [% ELSE %]
1197
                        <option value="0" selected>No</option>
1198
                        <option value="1">Yes</option>
1199
                    [% END %]
1200
                </select>
1201
                <div class="hint">Allow guarantor of this patron to view this patron's checkouts from the OPAC</div>
1202
            </li>
1203
        [% END %]
1188
		</ol>
1204
		</ol>
1189
		</fieldset>
1205
		</fieldset>
1190
        [% END # hide fieldset %][% END %]
1206
        [% END # hide fieldset %][% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt (+10 lines)
Lines 347-352 function validate1(date) { Link Here
347
         [% IF ( privacy1 ) %]Default[% END %]
347
         [% IF ( privacy1 ) %]Default[% END %]
348
         [% IF ( privacy2 ) %]Never[% END %]
348
         [% IF ( privacy2 ) %]Never[% END %]
349
    </li>[% END %]
349
    </li>[% END %]
350
351
    <li>
352
        <span class="label">Show checkouts to guarantor</span>
353
        [% IF privacy_guarantor_checkouts %]
354
            Yes
355
        [% ELSE %]
356
            No
357
        [% END %]
358
    </li>
359
350
    [% IF ( sort1 ) %]<li><span class="label">Sort field 1:</span>[% lib1 %]</li>[% END %]
360
    [% IF ( sort1 ) %]<li><span class="label">Sort field 1:</span>[% lib1 %]</li>[% END %]
351
    [% IF ( sort2 ) %]<li><span class="label">Sort field 2:</span>[% lib2 %]</li>[% END %]
361
    [% IF ( sort2 ) %]<li><span class="label">Sort field 2:</span>[% lib2 %]</li>[% END %]
352
    <li><span class="label">Username: </span>[% userid %]</li>
362
    <li><span class="label">Username: </span>[% userid %]</li>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt (+43 lines)
Lines 54-59 Link Here
54
                    <div class="alert">You typed in the wrong characters in the box before submitting. Please try again.</div>
54
                    <div class="alert">You typed in the wrong characters in the box before submitting. Please try again.</div>
55
                [% END %]
55
                [% END %]
56
56
57
                [% IF borrower.guarantorid && !Koha.Preference('OPACPrivacy') && Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %]
58
                    <fieldset class="rows" id="memberentry_privacy">
59
                        <legend id="privacy_legend">Privacy</legend>
60
                        <ol>
61
                            <li>
62
                                <label>Allow your guarantor to view your current checkouts?</label>
63
                                <select id="privacy_guarantor_checkouts">
64
                                    <option value="0">No</option>
65
                                    [% IF borrower.privacy_guarantor_checkouts %]
66
                                        <option value="1" selected="selected">Yes</option>
67
                                    [% ELSE %]
68
                                        <option value="1">Yes</option>
69
                                    [% END %]
70
                                </select>
71
                                <span class="hint">
72
                                    <a id="update_privacy_guarantor_checkouts" href="#" class="btn">Update</a>
73
                                    <span id="update_privacy_guarantor_checkouts_message" class="alert" style="display:none"></span>
74
                                </span>
75
                                <span class="hint">
76
                                    [% SET g = Koha.Find('Borrower',borrower.guarantorid) %]
77
                                    Your guarantor is <i>[% g.firstname %] [% g.surname %]</i>
78
                                </span>
79
                            </li>
80
                        </ol>
81
                    </fieldset>
82
                [% END %]
83
57
                <form method="post" action="/cgi-bin/koha/opac-memberentry.pl" id="memberentry-form">
84
                <form method="post" action="/cgi-bin/koha/opac-memberentry.pl" id="memberentry-form">
58
85
59
                [% UNLESS hidden.defined('branchcode') %]
86
                [% UNLESS hidden.defined('branchcode') %]
Lines 796-801 Link Here
796
            [% ELSE %]
823
            [% ELSE %]
797
                $( "#borrower_dateofbirth" ).datepicker({ yearRange: "c-120:c" });
824
                $( "#borrower_dateofbirth" ).datepicker({ yearRange: "c-120:c" });
798
            [% END %]
825
            [% END %]
826
827
            [% IF borrower.guarantorid && !Koha.Preference('OPACPrivacy') && Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %]
828
                $('#update_privacy_guarantor_checkouts').click( function() {
829
                    $.post( "/cgi-bin/koha/svc/patron/show_checkouts_to_relatives", { privacy_guarantor_checkouts: $('#privacy_guarantor_checkouts').val() })
830
                     .done(function( data ) {
831
                         var message;
832
                         if ( data.success ) {
833
                             message = _("Your setting has been updated!");
834
                         } else {
835
                             message = _("Unable to update your setting!");
836
                         }
837
838
                         $('#update_privacy_guarantor_checkouts_message').fadeIn("slow").text( message ).delay( 5000 ).fadeOut("slow");
839
                     });
840
                });
841
            [% END %]
799
        });
842
        });
800
    //]]>
843
    //]]>
801
    </script>
844
    </script>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-privacy.tt (-2 / +22 lines)
Lines 48-54 Link Here
48
                                <input type="hidden" name="op" value="update_privacy" />
48
                                <input type="hidden" name="op" value="update_privacy" />
49
                                    <fieldset>
49
                                    <fieldset>
50
                                    <label for="privacy">Please choose your privacy rule:</label>
50
                                    <label for="privacy">Please choose your privacy rule:</label>
51
                                    <div class="input-append">
51
                                    <div>
52
                                        <select name="privacy" id="privacy">
52
                                        <select name="privacy" id="privacy">
53
                                            [% IF ( privacy0 ) %]
53
                                            [% IF ( privacy0 ) %]
54
                                                <option value="0" selected="selected" class="privacy0">Forever</option>
54
                                                <option value="0" selected="selected" class="privacy0">Forever</option>
Lines 66-73 Link Here
66
                                                <option value="2" class="privacy2">Never</option>
66
                                                <option value="2" class="privacy2">Never</option>
67
                                            [% END %]
67
                                            [% END %]
68
                                        </select>
68
                                        </select>
69
                                        <button type="Submit" class="btn">Submit</button>
70
                                    </div>
69
                                    </div>
70
71
                                    [% SET b = Koha.Find('Borrower', borrower.borrowernumber) %]
72
                                    [% IF b.guarantorid && Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %]
73
                                        <div>
74
                                            <label for="privacy_guarantor_checkouts">Allow your guarantor to view your current checkouts?</label>
75
                                            <select name="privacy_guarantor_checkouts">
76
                                                [% IF borrower.privacy_guarantor_checkouts %]
77
                                                    <option value="0">No</option>
78
                                                    <option value="1" selected>Yes</option>
79
                                                [% ELSE %]
80
                                                    <option value="0" selected>No</option>
81
                                                    <option value="1">Yes</option>
82
                                                [% END %]
83
                                            </select>
84
                                            <span class="hint">
85
                                                Your guarantor is <i>[% b.guarantor.firstname %] [% b.guarantor.surname %]</i>
86
                                            </span>
87
                                        </div>
88
                                    [% END %]
89
90
                                    <button type="Submit" class="btn">Save</button>
71
                                </fieldset>
91
                                </fieldset>
72
                            </form>
92
                            </form>
73
                        <h2>Immediate deletion</h2>
93
                        <h2>Immediate deletion</h2>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt (-3 / +51 lines)
Lines 1-5 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% USE KohaDates %]
2
[% USE KohaDates %]
3
[% USE EncodeUTF8 %]
3
4
4
[% INCLUDE 'doc-head-open.inc' %]
5
[% INCLUDE 'doc-head-open.inc' %]
5
[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Your library home
6
[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Your library home
Lines 104-109 Link Here
104
                    <div id="opac-user-views" class="toptabs">
105
                    <div id="opac-user-views" class="toptabs">
105
                        <ul>
106
                        <ul>
106
                            <li><a href="#opac-user-checkouts">Checked out ([% issues_count %])</a></li>
107
                            <li><a href="#opac-user-checkouts">Checked out ([% issues_count %])</a></li>
108
                            [% IF relatives %]<li><a href="#opac-user-relative-issues">Relatives' checkouts</a></li>[% END %]
107
                            [% IF ( overdues_count ) %]<li><a href="#opac-user-overdues">Overdue ([% overdues_count %])</a></li>[% END %]
109
                            [% IF ( overdues_count ) %]<li><a href="#opac-user-overdues">Overdue ([% overdues_count %])</a></li>[% END %]
108
                            [% IF ( OPACFinesTab ) %]
110
                            [% IF ( OPACFinesTab ) %]
109
                                [% IF ( BORROWER_INF.amountoverfive ) %]<li><a href="#opac-user-fines">Fines ([% BORROWER_INF.amountoutstanding %])</a></li>[% END %]
111
                                [% IF ( BORROWER_INF.amountoverfive ) %]<li><a href="#opac-user-fines">Fines ([% BORROWER_INF.amountoutstanding %])</a></li>[% END %]
Lines 132-138 Link Here
132
                                                [% IF ( show_barcode ) %]
134
                                                [% IF ( show_barcode ) %]
133
                                                    <th>Barcode</th>
135
                                                    <th>Barcode</th>
134
                                                [% END %]
136
                                                [% END %]
135
                                                    <th>Call No.</th>
137
                                                    <th>Call number</th>
136
                                                [% IF ( OpacRenewalAllowed && !( borrower.is_expired && borrower.BlockExpiredPatronOpacActions ) ) %]
138
                                                [% IF ( OpacRenewalAllowed && !( borrower.is_expired && borrower.BlockExpiredPatronOpacActions ) ) %]
137
                                                    <th class="nosort">Renew</th>
139
                                                    <th class="nosort">Renew</th>
138
                                                [% END %]
140
                                                [% END %]
Lines 365-370 Link Here
365
                            </div> <!-- /#opac-user-waiting -->
367
                            </div> <!-- /#opac-user-waiting -->
366
                        [% END # waiting_count && atdestination %]
368
                        [% END # waiting_count && atdestination %]
367
369
370
                        [% IF relatives %]
371
                            <div id="opac-user-relative-issues">
372
                                <table id="opac-user-relative-issues-table" class="table table-bordered table-striped">
373
                                    <thead>
374
                                        <tr>
375
                                            <th class="anti-the">Title</th>
376
                                            <th>Due</th>
377
                                            <th>Barcode</th>
378
                                            <th>Call number</th>
379
                                            <th class="psort">Relative</th>
380
                                        </tr>
381
                                    </thead>
382
383
                                    <tbody>
384
                                        [% FOREACH r IN relatives %]
385
                                            [% FOREACH i IN r.issues %]
386
                                                <tr>
387
                                                    <td>
388
                                                        <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% i.item.biblio.biblionumber %]">
389
                                                            [% i.item.biblio.title | $EncodeUTF8 %]
390
                                                        </a>
391
                                                    </td>
392
393
                                                    <td>
394
                                                        [% i.date_due | $KohaDates %]
395
                                                    </td>
396
397
                                                    <td>
398
                                                        [% i.item.barcode %]
399
                                                    </td>
400
401
                                                    <td>
402
                                                        [% i.item.itemcallnumber | $EncodeUTF8 %]
403
                                                    </td>
404
405
                                                    <td>
406
                                                        [% r.firstname | $EncodeUTF8 %] [% r.surname | $EncodeUTF8 %]
407
                                                    </td>
408
                                                </tr>
409
                                            [% END %]
410
                                        [% END %]
411
                                    </tbody>
412
                                </table>
413
                            </div>
414
                        [% END %]
368
415
369
                        [% IF ( overdues_count ) %]
416
                        [% IF ( overdues_count ) %]
370
                            <div id="opac-user-overdues">
417
                            <div id="opac-user-overdues">
Lines 377-383 Link Here
377
                                            <th class="anti-the">Title</th>
424
                                            <th class="anti-the">Title</th>
378
                                            [% UNLESS ( item_level_itypes ) %]<th>Item type</th> [% END %]
425
                                            [% UNLESS ( item_level_itypes ) %]<th>Item type</th> [% END %]
379
                                            [% IF ( show_barcode ) %]<th>Barcode</th>[% END %]
426
                                            [% IF ( show_barcode ) %]<th>Barcode</th>[% END %]
380
                                            <th>Call no.</th>
427
                                            <th>Call number</th>
381
                                            <th class="title-string psort">Due</th>
428
                                            <th class="title-string psort">Due</th>
382
                                            [% IF ( OpacRenewalAllowed ) %]
429
                                            [% IF ( OpacRenewalAllowed ) %]
383
                                                <th class="nosort">Renew</th>
430
                                                <th class="nosort">Renew</th>
Lines 686-692 Link Here
686
            $(".js-hide").hide();
733
            $(".js-hide").hide();
687
            $(".modal-nojs").addClass("modal").addClass("hide").removeClass("modal-nojs");
734
            $(".modal-nojs").addClass("modal").addClass("hide").removeClass("modal-nojs");
688
            $(".suspend-until").prop("readonly",1);
735
            $(".suspend-until").prop("readonly",1);
689
            var dTables = $("#checkoutst,#holdst,#overduest");
736
737
            var dTables = $("#checkoutst,#holdst,#overduest,#opac-user-relative-issues-table");
690
            dTables.each(function(){
738
            dTables.each(function(){
691
                var thIndex = $(this).find("th.psort").index();
739
                var thIndex = $(this).find("th.psort").index();
692
                $(this).dataTable($.extend(true, {}, dataTablesDefaults, {
740
                $(this).dataTable($.extend(true, {}, dataTablesDefaults, {
(-)a/members/moremember.pl (+1 lines)
Lines 376-381 $template->param( Link Here
376
    is_child        => ($category_type eq 'C'),
376
    is_child        => ($category_type eq 'C'),
377
    samebranch     => $samebranch,
377
    samebranch     => $samebranch,
378
    quickslip		  => $quickslip,
378
    quickslip		  => $quickslip,
379
    privacy_guarantor_checkouts => $data->{'privacy_guarantor_checkouts'},
379
    activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
380
    activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
380
    AutoResumeSuspendedHolds => C4::Context->preference('AutoResumeSuspendedHolds'),
381
    AutoResumeSuspendedHolds => C4::Context->preference('AutoResumeSuspendedHolds'),
381
    SuspendHoldsIntranet => C4::Context->preference('SuspendHoldsIntranet'),
382
    SuspendHoldsIntranet => C4::Context->preference('SuspendHoldsIntranet'),
(-)a/opac/opac-privacy.pl (-14 / +24 lines)
Lines 47-64 my ( $template, $borrowernumber, $cookie ) = get_template_and_user( Link Here
47
    }
47
    }
48
);
48
);
49
49
50
my $op = $query->param("op");
50
my $op                         = $query->param("op");
51
my $privacy = $query->param("privacy");
51
my $privacy                    = $query->param("privacy");
52
my $privacy_guarantor_checkouts = $query->param("privacy_guarantor_checkouts");
52
53
53
if ($op eq "update_privacy")
54
if ( $op eq "update_privacy" ) {
54
{
55
    ModMember(
55
    ModPrivacy($borrowernumber,$privacy);
56
        borrowernumber             => $borrowernumber,
56
    $template->param('privacy_updated' => 1);
57
        privacy                    => $privacy,
58
        privacy_guarantor_checkouts => $privacy_guarantor_checkouts,
59
    );
60
    $template->param( 'privacy_updated' => 1 );
57
}
61
}
58
if ($op eq "delete_record") {
62
elsif ( $op eq "delete_record" ) {
63
59
    # delete all reading records for items returned
64
    # delete all reading records for items returned
60
    # uses a hardcoded date ridiculously far in the future
65
    # uses a hardcoded date ridiculously far in the future
61
    my ($rows,$err_history_not_deleted) = AnonymiseIssueHistory('2999-12-12',$borrowernumber);
66
    my ( $rows, $err_history_not_deleted ) =
67
      AnonymiseIssueHistory( '2999-12-12', $borrowernumber );
68
62
    # confirm the user the deletion has been done
69
    # confirm the user the deletion has been done
63
    if ( !$err_history_not_deleted ) {
70
    if ( !$err_history_not_deleted ) {
64
        $template->param( 'deleted' => 1 );
71
        $template->param( 'deleted' => 1 );
Lines 67-80 if ($op eq "delete_record") { Link Here
67
        $template->param( 'err_history_not_deleted' => 1 );
74
        $template->param( 'err_history_not_deleted' => 1 );
68
    }
75
    }
69
}
76
}
77
70
# get borrower privacy ....
78
# get borrower privacy ....
71
my ( $borr ) = GetMemberDetails( $borrowernumber );
79
my $borrower = GetMemberDetails( $borrowernumber );
72
80
73
$template->param( 'Ask_data'       => '1',
81
$template->param(
74
                    'privacy'.$borr->{'privacy'} => 1,
82
    'Ask_data'                         => 1,
75
                    'firstname' => $borr->{'firstname'},
83
    'privacy' . $borrower->{'privacy'} => 1,
76
                    'surname' => $borr->{'surname'},
84
    'privacyview'                      => 1,
77
                    'privacyview' => 1,
85
    'borrower'                         => $borrower,
86
    'surname'                          => $borrower->{surname},
87
    'firstname'                        => $borrower->{firstname},
78
);
88
);
79
89
80
output_html_with_http_headers $query, $cookie, $template->output;
90
output_html_with_http_headers $query, $cookie, $template->output;
(-)a/opac/opac-user.pl (-10 / +23 lines)
Lines 36-41 use C4::Letters; Link Here
36
use C4::Branch; # GetBranches
36
use C4::Branch; # GetBranches
37
use Koha::DateUtils;
37
use Koha::DateUtils;
38
use Koha::Borrower::Debarments qw(IsDebarred);
38
use Koha::Borrower::Debarments qw(IsDebarred);
39
use Koha::Database;
39
40
40
use constant ATTRIBUTE_SHOW_BARCODE => 'SHOW_BCODE';
41
use constant ATTRIBUTE_SHOW_BARCODE => 'SHOW_BCODE';
41
42
Lines 382-399 if ( $borr->{'opacnote'} ) { Link Here
382
  );
383
  );
383
}
384
}
384
385
386
if (   C4::Context->preference('AllowPatronToSetCheckoutsVisibilityForGuarantor')
387
    || C4::Context->preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') )
388
{
389
    my @relatives =
390
      Koha::Database->new()->schema()->resultset("Borrower")->search(
391
        {
392
            privacy_guarantor_checkouts => 1,
393
            'me.guarantorid'           => $borrowernumber
394
        },
395
        { prefetch => [ { 'issues' => { 'item' => 'biblio' } } ] }
396
      );
397
    $template->param( relatives => \@relatives );
398
}
399
385
$template->param(
400
$template->param(
386
    bor_messages_loop    => GetMessages( $borrowernumber, 'B', 'NONE' ),
401
    borrower           => $borr,
402
    bor_messages_loop  => GetMessages( $borrowernumber, 'B', 'NONE' ),
387
    waiting_count      => $wcount,
403
    waiting_count      => $wcount,
388
    patronupdate => $patronupdate,
404
    patronupdate       => $patronupdate,
389
    OpacRenewalAllowed => C4::Context->preference("OpacRenewalAllowed"),
405
    OpacRenewalAllowed => C4::Context->preference("OpacRenewalAllowed"),
390
    userview => 1,
406
    userview           => 1,
391
);
407
    SuspendHoldsOpac   => C4::Context->preference('SuspendHoldsOpac'),
392
408
    OpacHoldNotes      => C4::Context->preference('OpacHoldNotes'),
393
$template->param(
409
    AutoResumeSuspendedHolds =>
394
    SuspendHoldsOpac => C4::Context->preference('SuspendHoldsOpac'),
410
      C4::Context->preference('AutoResumeSuspendedHolds'),
395
    AutoResumeSuspendedHolds => C4::Context->preference('AutoResumeSuspendedHolds'),
396
    OpacHoldNotes => C4::Context->preference('OpacHoldNotes'),
397
);
411
);
398
412
399
output_html_with_http_headers $query, $cookie, $template->output;
413
output_html_with_http_headers $query, $cookie, $template->output;
400
- 

Return to bug 9303