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

(-)a/circ/circulation.pl (-3 lines)
Lines 466-474 if ($patron) { Link Here
466
        holds_count  => $holds->count(),
466
        holds_count  => $holds->count(),
467
        WaitingHolds => $waiting_holds,
467
        WaitingHolds => $waiting_holds,
468
    );
468
    );
469
470
    my $category_type = $patron->category->category_type;
471
    $template->param( adultborrower => 1 ) if ( $category_type eq 'A' || $category_type eq 'I' );
472
}
469
}
473
470
474
#title
471
#title
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc (-1 / +1 lines)
Lines 15-21 Link Here
15
    [% END %]
15
    [% END %]
16
16
17
    [% IF CAN_user_borrowers_edit_borrowers %]
17
    [% IF CAN_user_borrowers_edit_borrowers %]
18
        [% IF adultborrower AND Koha.Preference("borrowerRelationship") %]
18
        [% IF patron.is_adult AND Koha.Preference("borrowerRelationship") %]
19
            <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>
19
            <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>
20
        [% END %]
20
        [% END %]
21
        [% IF CAN_user_borrowers_edit_borrowers %]
21
        [% IF CAN_user_borrowers_edit_borrowers %]
(-)a/members/boraccount.pl (-2 lines)
Lines 96-103 foreach my $accountline ( @{$accts}) { Link Here
96
    }
96
    }
97
}
97
}
98
98
99
$template->param( adultborrower => 1 ) if ( $patron->category->category_type =~ /^(A|I)$/ );
100
101
if (C4::Context->preference('ExtendedPatronAttributes')) {
99
if (C4::Context->preference('ExtendedPatronAttributes')) {
102
    my $attributes = GetBorrowerAttributes($borrowernumber);
100
    my $attributes = GetBorrowerAttributes($borrowernumber);
103
    $template->param(
101
    $template->param(
(-)a/members/deletemem.pl (-2 lines)
Lines 109-116 my $dbh = C4::Context->dbh; Link Here
109
my $is_guarantor = $dbh->selectrow_array("SELECT COUNT(*) FROM borrowers WHERE guarantorid=?", undef, $member);
109
my $is_guarantor = $dbh->selectrow_array("SELECT COUNT(*) FROM borrowers WHERE guarantorid=?", undef, $member);
110
if ( $op eq 'delete_confirm' or $countissues > 0 or $flags->{'CHARGES'}  or $is_guarantor or $deletelocal == 0) {
110
if ( $op eq 'delete_confirm' or $countissues > 0 or $flags->{'CHARGES'}  or $is_guarantor or $deletelocal == 0) {
111
111
112
    $template->param( adultborrower => 1 ) if $patron->category->category_type =~ /^(A|I)$/;
113
114
    $template->param(
112
    $template->param(
115
        patron => $patron,
113
        patron => $patron,
116
    );
114
    );
(-)a/members/files.pl (-4 lines)
Lines 114-123 else { Link Here
114
        );
114
        );
115
    }
115
    }
116
116
117
118
    $template->param( adultborrower => 1 )
119
        if ( $patron_category->category_type eq 'A' || $patron_category->category_type eq 'I' );
120
121
    $template->param(
117
    $template->param(
122
        files => Koha::Patron::Files->new( borrowernumber => $borrowernumber )
118
        files => Koha::Patron::Files->new( borrowernumber => $borrowernumber )
123
          ->GetFilesInfo(),
119
          ->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 85-92 if ($add){ Link Here
85
        $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
85
        $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
86
    }
86
    }
87
87
88
    $template->param( adultborrower => 1 ) if ( $patron->category->category_type =~ /^(A|I)$/ );
89
90
    if (C4::Context->preference('ExtendedPatronAttributes')) {
88
    if (C4::Context->preference('ExtendedPatronAttributes')) {
91
        my $attributes = GetBorrowerAttributes($borrowernumber);
89
        my $attributes = GetBorrowerAttributes($borrowernumber);
92
        $template->param(
90
        $template->param(
(-)a/members/maninvoice.pl (-2 lines)
Lines 113-120 if ($add){ Link Here
113
        $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
113
        $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
114
    }
114
    }
115
115
116
    $template->param( adultborrower => 1 ) if ( $patron->category->category_type =~ /^(A|I)$/ );
117
118
    if (C4::Context->preference('ExtendedPatronAttributes')) {
116
    if (C4::Context->preference('ExtendedPatronAttributes')) {
119
        my $attributes = GetBorrowerAttributes($borrowernumber);
117
        my $attributes = GetBorrowerAttributes($borrowernumber);
120
        $template->param(
118
        $template->param(
(-)a/members/member-flags.pl (-2 lines)
Lines 187-194 if ($input->param('newflags')) { Link Here
187
        $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
187
        $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
188
    }
188
    }
189
189
190
$template->param( adultborrower => 1 ) if ( $category_type =~ /^(A|I)$/ );
191
192
if (C4::Context->preference('ExtendedPatronAttributes')) {
190
if (C4::Context->preference('ExtendedPatronAttributes')) {
193
    my $attributes = GetBorrowerAttributes($bor->{'borrowernumber'});
191
    my $attributes = GetBorrowerAttributes($bor->{'borrowernumber'});
194
    $template->param(
192
    $template->param(
(-)a/members/member-password.pl (-2 lines)
Lines 101-108 if ( $category_type eq 'C') { Link Here
101
    $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
101
    $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
102
}
102
}
103
103
104
$template->param( adultborrower => 1 ) if ( $category_type =~ /^(A|I)$/ );
105
106
if ( C4::Context->preference('ExtendedPatronAttributes') ) {
104
if ( C4::Context->preference('ExtendedPatronAttributes') ) {
107
    my $attributes = GetBorrowerAttributes( $bor->{'borrowernumber'} );
105
    my $attributes = GetBorrowerAttributes( $bor->{'borrowernumber'} );
108
    $template->param(
106
    $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 74-80 if (C4::Context->preference('ExtendedPatronAttributes')) { Link Here
74
    );
74
    );
75
}
75
}
76
76
77
$template->param( adultborrower => 1 ) if ( $borrower->{category_type} eq 'A' || $borrower->{category_type} eq 'I' );
78
$template->param(
77
$template->param(
79
    patron             => $patron,
78
    patron             => $patron,
80
    QUEUED_MESSAGES    => $queued_messages,
79
    QUEUED_MESSAGES    => $queued_messages,
(-)a/members/printfeercpt.pl (-2 lines)
Lines 114-121 for (my $i=0;$i<$numaccts;$i++){ Link Here
114
    push(@accountrows, \%row);
114
    push(@accountrows, \%row);
115
}
115
}
116
116
117
$template->param( adultborrower => 1 ) if ( $category->category_type eq 'A' || $category->category_type eq 'I' );
118
119
$template->param(
117
$template->param(
120
    patron               => $patron,
118
    patron               => $patron,
121
    finesview           => 1,
119
    finesview           => 1,
(-)a/members/printinvoice.pl (-2 lines)
Lines 114-121 for ( my $i = 0 ; $i < $numaccts ; $i++ ) { Link Here
114
    push( @accountrows, \%row );
114
    push( @accountrows, \%row );
115
}
115
}
116
116
117
$template->param( adultborrower => 1 ) if ( $category->category_type eq 'A' || $category->category_type eq 'I' );
118
119
$template->param(
117
$template->param(
120
    patron         => $patron,
118
    patron         => $patron,
121
    finesview      => 1,
119
    finesview      => 1,
(-)a/members/readingrec.pl (-1 lines)
Lines 99-105 if ( $category->category_type eq 'C') { Link Here
99
    $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
99
    $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
100
}
100
}
101
101
102
$template->param( adultborrower => 1 ) if ( $category->category_type eq 'A' || $category->category_type eq 'I' );
103
if (! $limit){
102
if (! $limit){
104
	$limit = 'full';
103
	$limit = 'full';
105
}
104
}
(-)a/members/routing-lists.pl (-2 lines)
Lines 72-79 $template->param( Link Here
72
    routinglistview => 1
72
    routinglistview => 1
73
);
73
);
74
74
75
$template->param( adultborrower => 1 ) if ( $category->category_type =~ /^(A|I)$/ );
76
77
$template->param(
75
$template->param(
78
    patron            => $patron,
76
    patron            => $patron,
79
    findborrower      => $findborrower,
77
    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