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

(-)a/circ/circulation.pl (-3 lines)
Lines 454-462 if ($borrowernumber) { Link Here
454
        holds_count  => $holds->count(),
454
        holds_count  => $holds->count(),
455
        WaitingHolds => $waiting_holds,
455
        WaitingHolds => $waiting_holds,
456
    );
456
    );
457
458
    my $category_type = $patron->category->category_type;
459
    $template->param( adultborrower => 1 ) if ( $category_type eq 'A' || $category_type eq 'I' );
460
}
457
}
461
458
462
#title
459
#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 93-100 foreach my $accountline ( @{$accts}) { Link Here
93
    }
93
    }
94
}
94
}
95
95
96
$template->param( adultborrower => 1 ) if ( $patron->category->category_type =~ /^(A|I)$/ );
97
98
if (C4::Context->preference('ExtendedPatronAttributes')) {
96
if (C4::Context->preference('ExtendedPatronAttributes')) {
99
    my $attributes = GetBorrowerAttributes($borrowernumber);
97
    my $attributes = GetBorrowerAttributes($borrowernumber);
100
    $template->param(
98
    $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
        RoutingSerials => C4::Context->preference('RoutingSerials'),
115
        RoutingSerials => C4::Context->preference('RoutingSerials'),
(-)a/members/files.pl (-1 lines)
Lines 117-123 else { Link Here
117
        );
117
        );
118
    }
118
    }
119
119
120
    $template->param( adultborrower => 1 ) if ( $data->{category_type} eq 'A' || $data->{category_type} eq 'I' );
121
    $template->param(
120
    $template->param(
122
        files => Koha::Patron::Files->new( borrowernumber => $borrowernumber )
121
        files => Koha::Patron::Files->new( borrowernumber => $borrowernumber )
123
          ->GetFilesInfo(),
122
          ->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 82-89 if ($add){ Link Here
82
        $template->param( 'catcode' => $patron_categories->next )  if $patron_categories->count == 1;
82
        $template->param( 'catcode' => $patron_categories->next )  if $patron_categories->count == 1;
83
    }
83
    }
84
84
85
    $template->param( adultborrower => 1 ) if ( $patron->category->category_type =~ /^(A|I)$/ );
86
87
    if (C4::Context->preference('ExtendedPatronAttributes')) {
85
    if (C4::Context->preference('ExtendedPatronAttributes')) {
88
        my $attributes = GetBorrowerAttributes($borrowernumber);
86
        my $attributes = GetBorrowerAttributes($borrowernumber);
89
        $template->param(
87
        $template->param(
(-)a/members/maninvoice.pl (-2 lines)
Lines 109-116 if ($add){ Link Here
109
        $template->param( 'catcode' => $patron_categories->next )  if $patron_categories->count == 1;
109
        $template->param( 'catcode' => $patron_categories->next )  if $patron_categories->count == 1;
110
    }
110
    }
111
111
112
    $template->param( adultborrower => 1 ) if ( $patron->category->category_type =~ /^(A|I)$/ );
113
114
    if (C4::Context->preference('ExtendedPatronAttributes')) {
112
    if (C4::Context->preference('ExtendedPatronAttributes')) {
115
        my $attributes = GetBorrowerAttributes($borrowernumber);
113
        my $attributes = GetBorrowerAttributes($borrowernumber);
116
        $template->param(
114
        $template->param(
(-)a/members/member-flags.pl (-2 lines)
Lines 182-189 if ($input->param('newflags')) { Link Here
182
        $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
182
        $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
183
        $template->param( 'catcode' => $patron_categories->next )  if $patron_categories->count == 1;
183
        $template->param( 'catcode' => $patron_categories->next )  if $patron_categories->count == 1;
184
    }
184
    }
185
	
186
$template->param( adultborrower => 1 ) if ( $category_type =~ /^(A|I)$/ );
187
185
188
if (C4::Context->preference('ExtendedPatronAttributes')) {
186
if (C4::Context->preference('ExtendedPatronAttributes')) {
189
    my $attributes = GetBorrowerAttributes($bor->{'borrowernumber'});
187
    my $attributes = GetBorrowerAttributes($bor->{'borrowernumber'});
(-)a/members/member-password.pl (-2 lines)
Lines 107-114 if ( $category_type eq 'C') { Link Here
107
    $template->param( 'catcode' => $patron_categories->next )  if $patron_categories->count == 1;
107
    $template->param( 'catcode' => $patron_categories->next )  if $patron_categories->count == 1;
108
}
108
}
109
109
110
$template->param( adultborrower => 1 ) if ( $category_type =~ /^(A|I)$/ );
111
112
if ( C4::Context->preference('ExtendedPatronAttributes') ) {
110
if ( C4::Context->preference('ExtendedPatronAttributes') ) {
113
    my $attributes = GetBorrowerAttributes( $bor->{'borrowernumber'} );
111
    my $attributes = GetBorrowerAttributes( $bor->{'borrowernumber'} );
114
    $template->param(
112
    $template->param(
(-)a/members/moremember.pl (-2 lines)
Lines 194-201 my $relatives_issues_count = Link Here
194
  Koha::Database->new()->schema()->resultset('Issue')
194
  Koha::Database->new()->schema()->resultset('Issue')
195
  ->count( { borrowernumber => \@relatives } );
195
  ->count( { borrowernumber => \@relatives } );
196
196
197
$template->param( adultborrower => 1 ) if ( $category_type eq 'A' || $category_type eq 'I' );
198
199
my %bor;
197
my %bor;
200
$bor{'borrowernumber'} = $borrowernumber;
198
$bor{'borrowernumber'} = $borrowernumber;
201
199
(-)a/members/notices.pl (-1 lines)
Lines 71-77 if (C4::Context->preference('ExtendedPatronAttributes')) { Link Here
71
    );
71
    );
72
}
72
}
73
73
74
$template->param( adultborrower => 1 ) if ( $borrower->{category_type} eq 'A' || $borrower->{category_type} eq 'I' );
75
$template->param(
74
$template->param(
76
    patron             => $patron,
75
    patron             => $patron,
77
    QUEUED_MESSAGES    => $queued_messages,
76
    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 )  if $patron_categories->count == 1;
100
    $template->param( 'catcode' => $patron_categories->next )  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 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