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

(-)a/C4/Members.pm (-26 lines)
Lines 112-118 BEGIN { Link Here
112
    push @EXPORT, qw(
112
    push @EXPORT, qw(
113
        &ModMember
113
        &ModMember
114
        &changepassword
114
        &changepassword
115
         &ModPrivacy
116
    );
115
    );
117
116
118
    #Delete data
117
    #Delete data
Lines 2216-2246 sub GetBorrowersNamesAndLatestIssue { Link Here
2216
    return $results;
2215
    return $results;
2217
}
2216
}
2218
2217
2219
=head2 ModPrivacy
2220
2221
=over 4
2222
2223
my $success = ModPrivacy( $borrowernumber, $privacy );
2224
2225
Update the privacy of a patron.
2226
2227
return :
2228
true on success, false on failure
2229
2230
=back
2231
2232
=cut
2233
2234
sub ModPrivacy {
2235
    my $borrowernumber = shift;
2236
    my $privacy = shift;
2237
    return unless defined $borrowernumber;
2238
    return unless $borrowernumber =~ /^\d+$/;
2239
2240
    return ModMember( borrowernumber => $borrowernumber,
2241
                      privacy        => $privacy );
2242
}
2243
2244
=head2 AddMessage
2218
=head2 AddMessage
2245
2219
2246
  AddMessage( $borrowernumber, $message_type, $message, $branchcode );
2220
  AddMessage( $borrowernumber, $message_type, $message, $branchcode );
(-)a/Koha/Schema/Result/Issue.pm (-50 / +30 lines)
Lines 1-21 Link Here
1
use utf8;
2
package Koha::Schema::Result::Issue;
1
package Koha::Schema::Result::Issue;
3
2
4
# Created by DBIx::Class::Schema::Loader
3
# Created by DBIx::Class::Schema::Loader
5
# DO NOT MODIFY THE FIRST PART OF THIS FILE
4
# DO NOT MODIFY THE FIRST PART OF THIS FILE
6
5
7
=head1 NAME
8
9
Koha::Schema::Result::Issue
10
11
=cut
12
13
use strict;
6
use strict;
14
use warnings;
7
use warnings;
15
8
16
use base 'DBIx::Class::Core';
9
use base 'DBIx::Class::Core';
17
10
18
=head1 TABLE: C<issues>
11
12
=head1 NAME
13
14
Koha::Schema::Result::Issue
19
15
20
=cut
16
=cut
21
17
Lines 23-28 __PACKAGE__->table("issues"); Link Here
23
19
24
=head1 ACCESSORS
20
=head1 ACCESSORS
25
21
22
=head2 issue_id
23
24
  data_type: 'integer'
25
  is_auto_increment: 1
26
  is_nullable: 0
27
26
=head2 borrowernumber
28
=head2 borrowernumber
27
29
28
  data_type: 'integer'
30
  data_type: 'integer'
Lines 38-44 __PACKAGE__->table("issues"); Link Here
38
=head2 date_due
40
=head2 date_due
39
41
40
  data_type: 'datetime'
42
  data_type: 'datetime'
41
  datetime_undef_if_invalid: 1
42
  is_nullable: 1
43
  is_nullable: 1
43
44
44
=head2 branchcode
45
=head2 branchcode
Lines 56-68 __PACKAGE__->table("issues"); Link Here
56
=head2 returndate
57
=head2 returndate
57
58
58
  data_type: 'datetime'
59
  data_type: 'datetime'
59
  datetime_undef_if_invalid: 1
60
  is_nullable: 1
60
  is_nullable: 1
61
61
62
=head2 lastreneweddate
62
=head2 lastreneweddate
63
63
64
  data_type: 'datetime'
64
  data_type: 'datetime'
65
  datetime_undef_if_invalid: 1
66
  is_nullable: 1
65
  is_nullable: 1
67
66
68
=head2 return
67
=head2 return
Lines 79-141 __PACKAGE__->table("issues"); Link Here
79
=head2 timestamp
78
=head2 timestamp
80
79
81
  data_type: 'timestamp'
80
  data_type: 'timestamp'
82
  datetime_undef_if_invalid: 1
83
  default_value: current_timestamp
81
  default_value: current_timestamp
84
  is_nullable: 0
82
  is_nullable: 0
85
83
86
=head2 issuedate
84
=head2 issuedate
87
85
88
  data_type: 'datetime'
86
  data_type: 'datetime'
89
  datetime_undef_if_invalid: 1
90
  is_nullable: 1
87
  is_nullable: 1
91
88
92
=cut
89
=cut
93
90
94
__PACKAGE__->add_columns(
91
__PACKAGE__->add_columns(
92
  "issue_id",
93
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
95
  "borrowernumber",
94
  "borrowernumber",
96
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
95
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
97
  "itemnumber",
96
  "itemnumber",
98
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
97
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
99
  "date_due",
98
  "date_due",
100
  {
99
  { data_type => "datetime", is_nullable => 1 },
101
    data_type => "datetime",
102
    datetime_undef_if_invalid => 1,
103
    is_nullable => 1,
104
  },
105
  "branchcode",
100
  "branchcode",
106
  { data_type => "varchar", is_nullable => 1, size => 10 },
101
  { data_type => "varchar", is_nullable => 1, size => 10 },
107
  "issuingbranch",
102
  "issuingbranch",
108
  { data_type => "varchar", is_nullable => 1, size => 18 },
103
  { data_type => "varchar", is_nullable => 1, size => 18 },
109
  "returndate",
104
  "returndate",
110
  {
105
  { data_type => "datetime", is_nullable => 1 },
111
    data_type => "datetime",
112
    datetime_undef_if_invalid => 1,
113
    is_nullable => 1,
114
  },
115
  "lastreneweddate",
106
  "lastreneweddate",
116
  {
107
  { data_type => "datetime", is_nullable => 1 },
117
    data_type => "datetime",
118
    datetime_undef_if_invalid => 1,
119
    is_nullable => 1,
120
  },
121
  "return",
108
  "return",
122
  { data_type => "varchar", is_nullable => 1, size => 4 },
109
  { data_type => "varchar", is_nullable => 1, size => 4 },
123
  "renewals",
110
  "renewals",
124
  { data_type => "tinyint", is_nullable => 1 },
111
  { data_type => "tinyint", is_nullable => 1 },
125
  "timestamp",
112
  "timestamp",
126
  {
113
  {
127
    data_type => "timestamp",
114
    data_type     => "timestamp",
128
    datetime_undef_if_invalid => 1,
129
    default_value => \"current_timestamp",
115
    default_value => \"current_timestamp",
130
    is_nullable => 0,
116
    is_nullable   => 0,
131
  },
117
  },
132
  "issuedate",
118
  "issuedate",
133
  {
119
  { data_type => "datetime", is_nullable => 1 },
134
    data_type => "datetime",
135
    datetime_undef_if_invalid => 1,
136
    is_nullable => 1,
137
  },
138
);
120
);
121
__PACKAGE__->set_primary_key("issue_id");
139
122
140
=head1 RELATIONS
123
=head1 RELATIONS
141
124
Lines 151-162 __PACKAGE__->belongs_to( Link Here
151
  "borrowernumber",
134
  "borrowernumber",
152
  "Koha::Schema::Result::Borrower",
135
  "Koha::Schema::Result::Borrower",
153
  { borrowernumber => "borrowernumber" },
136
  { borrowernumber => "borrowernumber" },
154
  {
137
  { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" },
155
    is_deferrable => 1,
156
    join_type     => "LEFT",
157
    on_delete     => "CASCADE",
158
    on_update     => "CASCADE",
159
  },
160
);
138
);
161
139
162
=head2 itemnumber
140
=head2 itemnumber
Lines 171-187 __PACKAGE__->belongs_to( Link Here
171
  "itemnumber",
149
  "itemnumber",
172
  "Koha::Schema::Result::Item",
150
  "Koha::Schema::Result::Item",
173
  { itemnumber => "itemnumber" },
151
  { itemnumber => "itemnumber" },
174
  {
152
  { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" },
175
    is_deferrable => 1,
176
    join_type     => "LEFT",
177
    on_delete     => "CASCADE",
178
    on_update     => "CASCADE",
179
  },
180
);
153
);
181
154
182
155
183
# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21
156
# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-11-06 14:03:30
184
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZEh31EKBmURMKxDxI+H3EA
157
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:x90AnyA32VcLbXMb7hfA9g
185
158
186
__PACKAGE__->belongs_to(
159
__PACKAGE__->belongs_to(
187
  "borrower",
160
  "borrower",
Lines 190-193 __PACKAGE__->belongs_to( Link Here
190
  { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" },
163
  { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" },
191
);
164
);
192
165
166
__PACKAGE__->belongs_to(
167
  "item",
168
  "Koha::Schema::Result::Item",
169
  { itemnumber => "itemnumber" },
170
  { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" },
171
);
172
193
1;
173
1;
(-)a/installer/data/mysql/kohastructure.sql (+3 lines)
Lines 265-270 CREATE TABLE `borrowers` ( -- this table includes information about your patrons Link Here
265
  `altcontactphone` varchar(50) default NULL, -- the phone number for the alternate contact for the patron/borrower
265
  `altcontactphone` varchar(50) default NULL, -- the phone number for the alternate contact for the patron/borrower
266
  `smsalertnumber` varchar(50) default NULL, -- the mobile phone number where the patron/borrower would like to receive notices (if SNS turned on)
266
  `smsalertnumber` varchar(50) default NULL, -- the mobile phone number where the patron/borrower would like to receive notices (if SNS turned on)
267
  `privacy` integer(11) DEFAULT '1' NOT NULL, -- patron/borrower's privacy settings related to their reading history
267
  `privacy` integer(11) DEFAULT '1' NOT NULL, -- patron/borrower's privacy settings related to their reading history
268
  `privacy_relative_checkouts` tinyint(1) NOT NULL DEFAULT '0', -- controls if relatives can see this patron's checkouts
268
  UNIQUE KEY `cardnumber` (`cardnumber`),
269
  UNIQUE KEY `cardnumber` (`cardnumber`),
269
  PRIMARY KEY `borrowernumber` (`borrowernumber`),
270
  PRIMARY KEY `borrowernumber` (`borrowernumber`),
270
  KEY `categorycode` (`categorycode`),
271
  KEY `categorycode` (`categorycode`),
Lines 1107-1112 CREATE TABLE `import_items` ( Link Here
1107
1108
1108
DROP TABLE IF EXISTS `issues`;
1109
DROP TABLE IF EXISTS `issues`;
1109
CREATE TABLE `issues` ( -- information related to check outs or issues
1110
CREATE TABLE `issues` ( -- information related to check outs or issues
1111
  `issue_id` int(11) NOT NULL AUTO_INCREMENT, -- primary key for issues table
1110
  `borrowernumber` int(11), -- foreign key, linking this to the borrowers table for the patron this item was checked out to
1112
  `borrowernumber` int(11), -- foreign key, linking this to the borrowers table for the patron this item was checked out to
1111
  `itemnumber` int(11), -- foreign key, linking this to the items table for the item that was checked out
1113
  `itemnumber` int(11), -- foreign key, linking this to the items table for the item that was checked out
1112
  `date_due` datetime default NULL, -- datetime the item is due (yyyy-mm-dd hh:mm::ss)
1114
  `date_due` datetime default NULL, -- datetime the item is due (yyyy-mm-dd hh:mm::ss)
Lines 1118-1123 CREATE TABLE `issues` ( -- information related to check outs or issues Link Here
1118
  `renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed
1120
  `renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed
1119
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
1121
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
1120
  `issuedate` datetime default NULL, -- date the item was checked out or issued
1122
  `issuedate` datetime default NULL, -- date the item was checked out or issued
1123
  PRIMARY KEY (`issue_id`),
1121
  KEY `issuesborridx` (`borrowernumber`),
1124
  KEY `issuesborridx` (`borrowernumber`),
1122
  KEY `itemnumber_idx` (`itemnumber`),
1125
  KEY `itemnumber_idx` (`itemnumber`),
1123
  KEY `branchcode_idx` (`branchcode`),
1126
  KEY `branchcode_idx` (`branchcode`),
(-)a/installer/data/mysql/updatedatabase.pl (+12 lines)
Lines 7743-7748 if(CheckVersion($DBversion)) { Link Here
7743
    SetVersion($DBversion);
7743
    SetVersion($DBversion);
7744
}
7744
}
7745
7745
7746
$DBversion = "3.15.00.XXX";
7747
if(CheckVersion($DBversion)) {
7748
    $dbh->do(q{
7749
        ALTER TABLE borrowers ADD privacy_relative_checkouts BOOLEAN NOT NULL DEFAULT '0'
7750
    });
7751
    $dbh->do(q{
7752
        ALTER TABLE issues ADD issue_id INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST
7753
    });
7754
    print "Upgrade to $DBversion done (Bug 9303 - relative's checkouts in the opac)\n";
7755
    SetVersion($DBversion);
7756
}
7757
7746
=head1 FUNCTIONS
7758
=head1 FUNCTIONS
7747
7759
7748
=head2 TableExists($table)
7760
=head2 TableExists($table)
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-privacy.tt (-2 / +19 lines)
Lines 35-41 Link Here
35
    </div>
35
    </div>
36
    <form action="/cgi-bin/koha/opac-privacy.pl" method="post" id="opac-privacy-update-form">
36
    <form action="/cgi-bin/koha/opac-privacy.pl" method="post" id="opac-privacy-update-form">
37
            <input type="hidden" name="op" value="update_privacy" />
37
            <input type="hidden" name="op" value="update_privacy" />
38
            <label for:"privacy">Please choose your privacy rule:</label>
38
39
            <label for="privacy">Please choose your privacy rule:</label>
39
            <select name="privacy">
40
            <select name="privacy">
40
                [% IF ( privacy0 ) %]
41
                [% IF ( privacy0 ) %]
41
                    <option value="0" selected="1" class="privacy0">Forever</option>
42
                    <option value="0" selected="1" class="privacy0">Forever</option>
Lines 53-59 Link Here
53
                    <option value="2" class="privacy2">Never</option>
54
                    <option value="2" class="privacy2">Never</option>
54
                [% END %]
55
                [% END %]
55
            </select>
56
            </select>
56
            <input type="Submit" value="Submit" />
57
58
            <p/>
59
60
            <label for="privacy_relative_checkouts">Allow relatives to view your current checkouts?</label>
61
            <select name="privacy_relative_checkouts">
62
                [% IF borrower.privacy_relative_checkouts %]
63
                    <option value="0">No</option>
64
                    <option value="1" selected>Yes</option>
65
                [% ELSE %]
66
                    <option value="0" selected>No</option>
67
                    <option value="1">Yes</option>
68
                [% END %]
69
            </select>
70
71
            <p/>
72
73
            <input type="Submit" value="Save" />
57
        </form>
74
        </form>
58
        <h2>Immediate deletion</h2>
75
        <h2>Immediate deletion</h2>
59
        <form action="/cgi-bin/koha/opac-privacy.pl" method="post" id="opac-privacy-delete-form">
76
        <form action="/cgi-bin/koha/opac-privacy.pl" method="post" id="opac-privacy-delete-form">
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt (-1 / +49 lines)
Lines 1-5 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% USE KohaDates %]
2
[% USE KohaDates %]
3
[% USE EncodeUTF8 %]
3
[% INCLUDE 'doc-head-open.inc' %]
4
[% INCLUDE 'doc-head-open.inc' %]
4
[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Your library home
5
[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Your library home
5
[% INCLUDE 'doc-head-close.inc' %]
6
[% INCLUDE 'doc-head-close.inc' %]
Lines 14-20 var MSG_CONFIRM_RESUME_HOLDS = _("Are you sure you want to resume all suspended Link Here
14
            $(function() {
15
            $(function() {
15
            $('#opac-user-views').tabs();
16
            $('#opac-user-views').tabs();
16
17
17
        var dTables = $("#checkoutst,#holdst,#overduest");
18
        var dTables = $("#checkoutst,#holdst,#overduest,#opac-user-relative-issues-table");
18
        dTables.each(function(){
19
        dTables.each(function(){
19
            var thIndex = $(this).find("th.psort").index();
20
            var thIndex = $(this).find("th.psort").index();
20
            $(this).dataTable($.extend(true, {}, dataTablesDefaults, {
21
            $(this).dataTable($.extend(true, {}, dataTablesDefaults, {
Lines 117-122 var MSG_CONFIRM_RESUME_HOLDS = _("Are you sure you want to resume all suspended Link Here
117
<div id="opac-user-views" class="toptabs">
118
<div id="opac-user-views" class="toptabs">
118
        <ul>
119
        <ul>
119
            <li><a href="#opac-user-checkouts">Checked out</a></li>
120
            <li><a href="#opac-user-checkouts">Checked out</a></li>
121
            [% IF relatives %]<li><a href="#opac-user-relative-issues">Relatives' checkouts</a></li>[% END %]
120
            [% IF ( overdues_count ) %]<li><a href="#opac-user-overdues">Overdue</a></li>[% END %]
122
            [% IF ( overdues_count ) %]<li><a href="#opac-user-overdues">Overdue</a></li>[% END %]
121
[% IF ( OPACFinesTab ) %]
123
[% IF ( OPACFinesTab ) %]
122
            [% IF ( BORROWER_INF.amountoverfive ) %]<li><a href="#opac-user-fines">Fines</a></li>[% END %]
124
            [% IF ( BORROWER_INF.amountoverfive ) %]<li><a href="#opac-user-fines">Fines</a></li>[% END %]
Lines 285-290 var MSG_CONFIRM_RESUME_HOLDS = _("Are you sure you want to resume all suspended Link Here
285
        [% END %]
287
        [% END %]
286
    [% END %]
288
    [% END %]
287
289
290
    [% IF relatives %]
291
        <div id="opac-user-relative-issues">
292
            <table id="opac-user-relative-issues-table">
293
                <thead>
294
                    <tr>
295
                        <th class="anti-the">Title</th>
296
                        <th>Due</th>
297
                        <th>Barcode</th>
298
                        <th>Call No.</th>
299
                        <th class="psort">Relative</th>
300
                    </tr>
301
                </thead>
302
303
                <tbody>
304
                    [% FOREACH r IN relatives %]
305
                        [% FOREACH i IN r.issues %]
306
                            <tr>
307
                                <td>
308
                                    <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% i.item.biblio.biblionumber %]">
309
                                        [% i.item.biblio.title | $EncodeUTF8 %]
310
                                    </a>
311
                                </td>
312
313
                                <td>
314
                                    [% i.date_due | $KohaDates %]
315
                                </td>
316
317
                                <td>
318
                                    [% i.item.barcode %]
319
                                </td>
320
321
                                <td>
322
                                    [% i.itemcallnumber | $EncodeUTF8 %]
323
                                </td>
324
325
                                <td>
326
                                    [% r.firstname | $EncodeUTF8 %] [% r.surname | $EncodeUTF8 %]
327
                                </td>
328
                            </tr>
329
                        [% END %]
330
                    [% END %]
331
                </tbody>
332
            </table>
333
        </div>
334
    [% END %]
335
288
[% IF ( overdues_count ) %]
336
[% IF ( overdues_count ) %]
289
<div id="opac-user-overdues"><table id="overduest">
337
<div id="opac-user-overdues"><table id="overduest">
290
<caption>Overdues <span class="count">([% overdues_count %] total)</span></caption>
338
<caption>Overdues <span class="count">([% overdues_count %] total)</span></caption>
(-)a/opac/opac-privacy.pl (-14 / +24 lines)
Lines 40-57 my ( $template, $borrowernumber, $cookie ) = get_template_and_user( Link Here
40
    }
40
    }
41
);
41
);
42
42
43
my $op = $query->param("op");
43
my $op                         = $query->param("op");
44
my $privacy = $query->param("privacy");
44
my $privacy                    = $query->param("privacy");
45
my $privacy_relative_checkouts = $query->param("privacy_relative_checkouts");
45
46
46
if ($op eq "update_privacy")
47
if ( $op eq "update_privacy" ) {
47
{
48
    ModMember(
48
    ModPrivacy($borrowernumber,$privacy);
49
        borrowernumber             => $borrowernumber,
49
    $template->param('privacy_updated' => 1);
50
        privacy                    => $privacy,
51
        privacy_relative_checkouts => $privacy_relative_checkouts,
52
    );
53
    $template->param( 'privacy_updated' => 1 );
50
}
54
}
51
if ($op eq "delete_record") {
55
elsif ( $op eq "delete_record" ) {
56
52
    # delete all reading records for items returned
57
    # delete all reading records for items returned
53
    # uses a hardcoded date ridiculously far in the future
58
    # uses a hardcoded date ridiculously far in the future
54
    my ($rows,$err_history_not_deleted) = AnonymiseIssueHistory('2999-12-12',$borrowernumber);
59
    my ( $rows, $err_history_not_deleted ) =
60
      AnonymiseIssueHistory( '2999-12-12', $borrowernumber );
61
55
    # confirm the user the deletion has been done
62
    # confirm the user the deletion has been done
56
    if ( !$err_history_not_deleted ) {
63
    if ( !$err_history_not_deleted ) {
57
        $template->param( 'deleted' => 1 );
64
        $template->param( 'deleted' => 1 );
Lines 60-73 if ($op eq "delete_record") { Link Here
60
        $template->param( 'err_history_not_deleted' => 1 );
67
        $template->param( 'err_history_not_deleted' => 1 );
61
    }
68
    }
62
}
69
}
70
63
# get borrower privacy ....
71
# get borrower privacy ....
64
my ( $borr ) = GetMemberDetails( $borrowernumber );
72
my $borrower = GetMemberDetails( $borrowernumber );
65
73
66
$template->param( 'Ask_data'       => '1',
74
$template->param(
67
                    'privacy'.$borr->{'privacy'} => 1,
75
    'Ask_data'                         => 1,
68
                    'firstname' => $borr->{'firstname'},
76
    'privacy' . $borrower->{'privacy'} => 1,
69
                    'surname' => $borr->{'surname'},
77
    'privacyview'                      => 1,
70
                    'privacyview' => 1,
78
    'borrower'                         => $borrower,
79
    'surname'                          => $borrower->{surname},
80
    'firstname'                        => $borrower->{firstname},
71
);
81
);
72
82
73
output_html_with_http_headers $query, $cookie, $template->output;
83
output_html_with_http_headers $query, $cookie, $template->output;
(-)a/opac/opac-user.pl (-10 / +16 lines)
Lines 35-40 use C4::Items; Link Here
35
use C4::Letters;
35
use C4::Letters;
36
use C4::Branch; # GetBranches
36
use C4::Branch; # GetBranches
37
use Koha::DateUtils;
37
use Koha::DateUtils;
38
use Koha::Database;
38
39
39
use constant ATTRIBUTE_SHOW_BARCODE => 'SHOW_BCODE';
40
use constant ATTRIBUTE_SHOW_BARCODE => 'SHOW_BCODE';
40
41
Lines 352-369 if ( $borr->{'opacnote'} ) { Link Here
352
  );
353
  );
353
}
354
}
354
355
355
$template->param(
356
my @borrowernumbers = GetMemberRelatives($borrowernumber);
356
    bor_messages_loop    => GetMessages( $borrowernumber, 'B', 'NONE' ),
357
my @relatives = Koha::Database->new()->schema()->resultset("Borrower")->search(
357
    waiting_count      => $wcount,
358
    { privacy_relative_checkouts => 1,  'me.borrowernumber' => { -in => \@borrowernumbers, } },
358
    patronupdate => $patronupdate,
359
    { prefetch => [ { 'issues' => { 'item' => 'biblio' } } ] }
359
    OpacRenewalAllowed => C4::Context->preference("OpacRenewalAllowed"),
360
    userview => 1,
361
);
360
);
361
$template->param( relatives => \@relatives );
362
362
363
$template->param(
363
$template->param(
364
    SuspendHoldsOpac => C4::Context->preference('SuspendHoldsOpac'),
364
    borrower           => $borr,
365
    AutoResumeSuspendedHolds => C4::Context->preference('AutoResumeSuspendedHolds'),
365
    bor_messages_loop  => GetMessages( $borrowernumber, 'B', 'NONE' ),
366
    OpacHoldNotes => C4::Context->preference('OpacHoldNotes'),
366
    waiting_count      => $wcount,
367
    patronupdate       => $patronupdate,
368
    OpacRenewalAllowed => C4::Context->preference("OpacRenewalAllowed"),
369
    userview           => 1,
370
    SuspendHoldsOpac   => C4::Context->preference('SuspendHoldsOpac'),
371
    OpacHoldNotes      => C4::Context->preference('OpacHoldNotes'),
372
    AutoResumeSuspendedHolds =>
373
      C4::Context->preference('AutoResumeSuspendedHolds'),
367
);
374
);
368
375
369
output_html_with_http_headers $query, $cookie, $template->output;
376
output_html_with_http_headers $query, $cookie, $template->output;
370
- 

Return to bug 9303