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

(-)a/circ/circulation.pl (-3 lines)
Lines 456-464 if ($patron) { Link Here
456
        holds_count  => $holds->count(),
456
        holds_count  => $holds->count(),
457
        WaitingHolds => $waiting_holds,
457
        WaitingHolds => $waiting_holds,
458
    );
458
    );
459
460
    my $category_type = $patron->category->category_type;
461
    $template->param( adultborrower => 1 ) if ( $category_type eq 'A' || $category_type eq 'I' );
462
}
459
}
463
460
464
#title
461
#title
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc (-1 / +1 lines)
Lines 143-149 function searchToHold(){ Link Here
143
    [% END %]
143
    [% END %]
144
144
145
    [% IF CAN_user_borrowers_edit_borrowers %]
145
    [% IF CAN_user_borrowers_edit_borrowers %]
146
        [% IF adultborrower AND Koha.Preference("borrowerRelationship") %]
146
        [% IF patron.is_adult AND Koha.Preference("borrowerRelationship") %]
147
            <a id="addchild" class="btn btn-default btn-sm" href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;guarantorid=[% patron.borrowernumber %]"><i class="fa fa-plus"></i> Add child</a>
147
            <a id="addchild" class="btn btn-default btn-sm" href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;guarantorid=[% patron.borrowernumber %]"><i class="fa fa-plus"></i> Add child</a>
148
        [% END %]
148
        [% END %]
149
        [% IF CAN_user_borrowers_edit_borrowers %]
149
        [% IF CAN_user_borrowers_edit_borrowers %]
(-)a/members/boraccount.pl (-2 lines)
Lines 97-104 foreach my $accountline ( @{$accts}) { Link Here
97
    }
97
    }
98
}
98
}
99
99
100
$template->param( adultborrower => 1 ) if ( $patron->category->category_type =~ /^(A|I)$/ );
101
102
if (C4::Context->preference('ExtendedPatronAttributes')) {
100
if (C4::Context->preference('ExtendedPatronAttributes')) {
103
    my $attributes = GetBorrowerAttributes($borrowernumber);
101
    my $attributes = GetBorrowerAttributes($borrowernumber);
104
    $template->param(
102
    $template->param(
(-)a/members/deletemem.pl (-2 lines)
Lines 110-117 my $dbh = C4::Context->dbh; Link Here
110
my $is_guarantor = $dbh->selectrow_array("SELECT COUNT(*) FROM borrowers WHERE guarantorid=?", undef, $member);
110
my $is_guarantor = $dbh->selectrow_array("SELECT COUNT(*) FROM borrowers WHERE guarantorid=?", undef, $member);
111
if ( $op eq 'delete_confirm' or $countissues > 0 or $flags->{'CHARGES'}  or $is_guarantor or $deletelocal == 0) {
111
if ( $op eq 'delete_confirm' or $countissues > 0 or $flags->{'CHARGES'}  or $is_guarantor or $deletelocal == 0) {
112
112
113
    $template->param( adultborrower => 1 ) if $patron->category->category_type =~ /^(A|I)$/;
114
115
    $template->param(
113
    $template->param(
116
        patron => $patron,
114
        patron => $patron,
117
    );
115
    );
(-)a/members/files.pl (-4 lines)
Lines 115-124 else { Link Here
115
        );
115
        );
116
    }
116
    }
117
117
118
119
    $template->param( adultborrower => 1 )
120
        if ( $patron_category->category_type eq 'A' || $patron_category->category_type eq 'I' );
121
122
    $template->param(
118
    $template->param(
123
        files => Koha::Patron::Files->new( borrowernumber => $borrowernumber )
119
        files => Koha::Patron::Files->new( borrowernumber => $borrowernumber )
124
          ->GetFilesInfo(),
120
          ->GetFilesInfo(),
(-)a/members/housebound.pl (-3 / +1 lines)
Lines 62-70 my $patron = Koha::Patrons->find($borrowernumber); Link Here
62
output_and_exit_if_error( $input, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } );
62
output_and_exit_if_error( $input, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } );
63
63
64
# Get supporting cast
64
# Get supporting cast
65
my ( $branch, $category, $houseboundprofile, $visit );
65
my ( $branch, $houseboundprofile, $visit );
66
if ( $patron ) { # FIXME This test is not needed - output_and_exit_if_error handles it
66
if ( $patron ) { # FIXME This test is not needed - output_and_exit_if_error handles it
67
    $category = Koha::Patron::Categories->new->find($patron->categorycode);
68
    $houseboundprofile = $patron->housebound_profile;
67
    $houseboundprofile = $patron->housebound_profile;
69
}
68
}
70
if ( $visit_id ) {
69
if ( $visit_id ) {
Lines 167-173 if ( C4::Context->preference('ExtendedPatronAttributes') and $patron ) { Link Here
167
    );
166
    );
168
}
167
}
169
168
170
$template->param( adultborrower => 1 ) if ( $category->category_type eq 'A' || $category->category_type eq 'I' );
171
$template->param(
169
$template->param(
172
    housebound_profile => $houseboundprofile,
170
    housebound_profile => $houseboundprofile,
173
    visit              => $houseboundvisit,
171
    visit              => $houseboundvisit,
(-)a/members/mancredit.pl (-2 lines)
Lines 86-93 if ($add){ Link Here
86
        $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
86
        $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
87
    }
87
    }
88
88
89
    $template->param( adultborrower => 1 ) if ( $patron->category->category_type =~ /^(A|I)$/ );
90
91
    if (C4::Context->preference('ExtendedPatronAttributes')) {
89
    if (C4::Context->preference('ExtendedPatronAttributes')) {
92
        my $attributes = GetBorrowerAttributes($borrowernumber);
90
        my $attributes = GetBorrowerAttributes($borrowernumber);
93
        $template->param(
91
        $template->param(
(-)a/members/maninvoice.pl (-2 lines)
Lines 114-121 if ($add){ Link Here
114
        $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
114
        $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
115
    }
115
    }
116
116
117
    $template->param( adultborrower => 1 ) if ( $patron->category->category_type =~ /^(A|I)$/ );
118
119
    if (C4::Context->preference('ExtendedPatronAttributes')) {
117
    if (C4::Context->preference('ExtendedPatronAttributes')) {
120
        my $attributes = GetBorrowerAttributes($borrowernumber);
118
        my $attributes = GetBorrowerAttributes($borrowernumber);
121
        $template->param(
119
        $template->param(
(-)a/members/member-flags.pl (-2 lines)
Lines 188-195 if ($input->param('newflags')) { Link Here
188
        $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
188
        $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
189
    }
189
    }
190
190
191
$template->param( adultborrower => 1 ) if ( $category_type =~ /^(A|I)$/ );
192
193
if (C4::Context->preference('ExtendedPatronAttributes')) {
191
if (C4::Context->preference('ExtendedPatronAttributes')) {
194
    my $attributes = GetBorrowerAttributes($bor->{'borrowernumber'});
192
    my $attributes = GetBorrowerAttributes($bor->{'borrowernumber'});
195
    $template->param(
193
    $template->param(
(-)a/members/member-password.pl (-2 lines)
Lines 102-109 if ( $category_type eq 'C') { Link Here
102
    $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
102
    $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
103
}
103
}
104
104
105
$template->param( adultborrower => 1 ) if ( $category_type =~ /^(A|I)$/ );
106
107
if ( C4::Context->preference('ExtendedPatronAttributes') ) {
105
if ( C4::Context->preference('ExtendedPatronAttributes') ) {
108
    my $attributes = GetBorrowerAttributes( $bor->{'borrowernumber'} );
106
    my $attributes = GetBorrowerAttributes( $bor->{'borrowernumber'} );
109
    $template->param(
107
    $template->param(
(-)a/members/moremember.pl (-2 lines)
Lines 196-203 my $relatives_issues_count = Link Here
196
  Koha::Database->new()->schema()->resultset('Issue')
196
  Koha::Database->new()->schema()->resultset('Issue')
197
  ->count( { borrowernumber => \@relatives } );
197
  ->count( { borrowernumber => \@relatives } );
198
198
199
$template->param( adultborrower => 1 ) if ( $category_type eq 'A' || $category_type eq 'I' );
200
201
my %bor;
199
my %bor;
202
$bor{'borrowernumber'} = $borrowernumber;
200
$bor{'borrowernumber'} = $borrowernumber;
203
201
(-)a/members/notices.pl (-1 lines)
Lines 75-81 if (C4::Context->preference('ExtendedPatronAttributes')) { Link Here
75
    );
75
    );
76
}
76
}
77
77
78
$template->param( adultborrower => 1 ) if ( $borrower->{category_type} eq 'A' || $borrower->{category_type} eq 'I' );
79
$template->param(
78
$template->param(
80
    patron             => $patron,
79
    patron             => $patron,
81
    QUEUED_MESSAGES    => $queued_messages,
80
    QUEUED_MESSAGES    => $queued_messages,
(-)a/members/printfeercpt.pl (-2 lines)
Lines 115-122 for (my $i=0;$i<$numaccts;$i++){ Link Here
115
    push(@accountrows, \%row);
115
    push(@accountrows, \%row);
116
}
116
}
117
117
118
$template->param( adultborrower => 1 ) if ( $category->category_type eq 'A' || $category->category_type eq 'I' );
119
120
$template->param(
118
$template->param(
121
    patron               => $patron,
119
    patron               => $patron,
122
    finesview           => 1,
120
    finesview           => 1,
(-)a/members/printinvoice.pl (-2 lines)
Lines 115-122 for ( my $i = 0 ; $i < $numaccts ; $i++ ) { Link Here
115
    push( @accountrows, \%row );
115
    push( @accountrows, \%row );
116
}
116
}
117
117
118
$template->param( adultborrower => 1 ) if ( $category->category_type eq 'A' || $category->category_type eq 'I' );
119
120
$template->param(
118
$template->param(
121
    patron         => $patron,
119
    patron         => $patron,
122
    finesview      => 1,
120
    finesview      => 1,
(-)a/members/readingrec.pl (-1 lines)
Lines 100-106 if ( $category->category_type eq 'C') { Link Here
100
    $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
100
    $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
101
}
101
}
102
102
103
$template->param( adultborrower => 1 ) if ( $category->category_type eq 'A' || $category->category_type eq 'I' );
104
if (! $limit){
103
if (! $limit){
105
	$limit = 'full';
104
	$limit = 'full';
106
}
105
}
(-)a/members/routing-lists.pl (-2 lines)
Lines 73-80 $template->param( Link Here
73
    routinglistview => 1
73
    routinglistview => 1
74
);
74
);
75
75
76
$template->param( adultborrower => 1 ) if ( $category->category_type =~ /^(A|I)$/ );
77
78
$template->param(
76
$template->param(
79
    patron            => $patron,
77
    patron            => $patron,
80
    findborrower      => $findborrower,
78
    findborrower      => $findborrower,
(-)a/members/statistics.pl (-3 lines)
Lines 84-91 if (C4::Context->preference('ExtendedPatronAttributes')) { Link Here
84
    );
84
    );
85
}
85
}
86
86
87
$template->param( adultborrower => 1 ) if ( $category->category_type eq 'A' || $category->category_type eq 'I' );
88
89
$template->param(
87
$template->param(
90
    patron             => $patron,
88
    patron             => $patron,
91
    statisticsview     => 1,
89
    statisticsview     => 1,
92
- 

Return to bug 18789