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

(-)a/Koha/Hold.pm (-15 / +13 lines)
Lines 298-308 Returns the related Koha::Item object for this Hold Link Here
298
=cut
298
=cut
299
299
300
sub item {
300
sub item {
301
    my ($self) = @_;
301
    my $self = shift;
302
302
    my $item_rs = $self->_result->item;
303
    $self->{_item} ||= Koha::Items->find( $self->itemnumber() );
303
    return unless $item_rs;
304
304
    return Koha::Item->_new_from_dbic($item_rs);
305
    return $self->{_item};
306
}
305
}
307
306
308
=head3 branch
307
=head3 branch
Lines 311-322 Returns the related Koha::Library object for this Hold Link Here
311
310
312
=cut
311
=cut
313
312
313
# FIXME Should be renamed with ->library
314
sub branch {
314
sub branch {
315
    my ($self) = @_;
315
    my $self = shift;
316
316
    my $branch_rs = $self->_result->branchcode;
317
    $self->{_branch} ||= Koha::Libraries->find( $self->branchcode() );
317
    return unless $branch_rs;
318
318
    return Koha::Library->_new_from_dbic($branch_rs);
319
    return $self->{_branch};
320
}
319
}
321
320
322
=head3 borrower
321
=head3 borrower
Lines 327-337 Returns the related Koha::Patron object for this Hold Link Here
327
326
328
# FIXME Should be renamed with ->patron
327
# FIXME Should be renamed with ->patron
329
sub borrower {
328
sub borrower {
330
    my ($self) = @_;
329
    my $self = shift;
331
330
    my $patron_rs = $self->_result->borrowernumber;
332
    $self->{_borrower} ||= Koha::Patrons->find( $self->borrowernumber() );
331
    return unless $patron_rs;
333
332
    return Koha::Patron->_new_from_dbic($patron_rs);
334
    return $self->{_borrower};
335
}
333
}
336
334
337
=head3 is_suspended
335
=head3 is_suspended
(-)a/Koha/Item.pm (-10 / +8 lines)
Lines 301-311 sub effective_itemtype { Link Here
301
=cut
301
=cut
302
302
303
sub home_branch {
303
sub home_branch {
304
    my ($self) = @_;
304
    my $self = shift;
305
305
    my $home_branch_rs = $self->_result->homebranch;
306
    $self->{_home_branch} ||= Koha::Libraries->find( $self->homebranch() );
306
    return unless $home_branch_rs;
307
307
    return Koha::Library->_new_from_dbic($home_branch_rs);
308
    return $self->{_home_branch};
309
}
308
}
310
309
311
=head3 holding_branch
310
=head3 holding_branch
Lines 313-323 sub home_branch { Link Here
313
=cut
312
=cut
314
313
315
sub holding_branch {
314
sub holding_branch {
316
    my ($self) = @_;
315
    my $self = shift;
317
316
    my $holding_branch_rs = $self->_result->holdingbranch;
318
    $self->{_holding_branch} ||= Koha::Libraries->find( $self->holdingbranch() );
317
    return unless $holding_branch_rs;
319
318
    return Koha::Library->_new_from_dbic($holding_branch_rs);
320
    return $self->{_holding_branch};
321
}
319
}
322
320
323
=head3 biblio
321
=head3 biblio
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc (-1 / +1 lines)
Lines 128-134 Link Here
128
                    [% END %]
128
                    [% END %]
129
                [% ELSE %]
129
                [% ELSE %]
130
                    [% IF Koha.Preference('IndependentBranches') && Branches.all().size == 1 %]
130
                    [% IF Koha.Preference('IndependentBranches') && Branches.all().size == 1 %]
131
                        [% Branches.GetName(hold.branchcode) | html %] <input type="hidden" name="pickup" value="[% hold.branchcode | html %]" />
131
                        [% hold.branch.branchname | html %] <input type="hidden" name="pickup" value="[% hold.branchcode | html %]" />
132
                    [% ELSE %]
132
                    [% ELSE %]
133
                        <select name="pickup">
133
                        <select name="pickup">
134
                            [% PROCESS options_for_libraries libraries => Branches.pickup_locations( { search_params => { item => hold.itemnumber, biblio => hold.biblionumber, patron => hold.patron }, selected => hold.branchcode }) %]
134
                            [% PROCESS options_for_libraries libraries => Branches.pickup_locations( { search_params => { item => hold.itemnumber, biblio => hold.biblionumber, patron => hold.patron }, selected => hold.branchcode }) %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/waiting_holds.inc (-3 / +3 lines)
Lines 37-44 Link Here
37
                        [% reserveloo.borrower.first_valid_email_address | html %]</a></span>
37
                        [% reserveloo.borrower.first_valid_email_address | html %]</a></span>
38
                    [% END %]
38
                    [% END %]
39
                </td>
39
                </td>
40
                <td>[% Branches.GetName( reserveloo.item.homebranch ) | html %]</td>
40
                <td>[% reserveloo.item.home_branch.branchname | html %]</td>
41
                <td>[% Branches.GetName( reserveloo.item.holdingbranch ) | html %]</td>
41
                <td>[% reserveloo.item.holding_branch.branchname | html %]</td>
42
                <td>[% AuthorisedValues.GetByCode('LOC', reserveloo.item.location) | html %]</td>
42
                <td>[% AuthorisedValues.GetByCode('LOC', reserveloo.item.location) | html %]</td>
43
                <td>[% reserveloo.item.itemcallnumber | html %]</td>
43
                <td>[% reserveloo.item.itemcallnumber | html %]</td>
44
                <td>[% reserveloo.item.copynumber | html %]</td>
44
                <td>[% reserveloo.item.copynumber | html %]</td>
Lines 51-57 Link Here
51
                        <input type="hidden" name="tbr" value="[% reserveloo.item.homebranch | html %]" />
51
                        <input type="hidden" name="tbr" value="[% reserveloo.item.homebranch | html %]" />
52
                        <input type="hidden" name="tab" value="[% tab | html %]">
52
                        <input type="hidden" name="tab" value="[% tab | html %]">
53
                        [% IF ( reserveloo.item.homebranch != reserveloo.item.holdingbranch ) %]
53
                        [% IF ( reserveloo.item.homebranch != reserveloo.item.holdingbranch ) %]
54
                            <button type="submit" class="btn btn-default btn-xs"><i class="fa fa-remove"></i> Cancel hold and return to: [% Branches.GetName( reserveloo.item.homebranch ) | html %]</button>
54
                            <button type="submit" class="btn btn-default btn-xs"><i class="fa fa-remove"></i> Cancel hold and return to: [% reserveloo.item.home_branch.branchname | html %]</button>
55
                        [% ELSE %]
55
                        [% ELSE %]
56
                            <button type="submit" class="btn btn-default btn-xs"><i class="fa fa-remove"></i> Cancel hold</button>
56
                            <button type="submit" class="btn btn-default btn-xs"><i class="fa fa-remove"></i> Cancel hold</button>
57
                        [% END %]
57
                        [% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc (-4 / +3 lines)
Lines 112-123 Link Here
112
                                                until [% HOLD.expirationdate | $KohaDates %]
112
                                                until [% HOLD.expirationdate | $KohaDates %]
113
                                            [% END %]
113
                                            [% END %]
114
                                        [% END %]
114
                                        [% END %]
115
                                        <input type="hidden" name="pickup" value="[% HOLD.branchcode | html %]" />
115
                                        <input type="hidden" name="pickup" value="[% HOLD.branch.branchcode | html %]" />
116
                                    [% ELSE %]
116
                                    [% ELSE %]
117
                                        Item waiting to be pulled from <strong> [% Branches.GetName( HOLD.branchcode ) | html %]</strong>
117
                                        Item waiting to be pulled from <strong> [% HOLD.branch.branchname | html %]</strong>
118
                                    [% END %]
118
                                    [% END %]
119
                                [% ELSE %]
119
                                [% ELSE %]
120
                                    Item in transit to <strong> [% Branches.GetName( HOLD.branchcode ) | html %]</strong> <input type="hidden" name="pickup" value="[% HOLD.branchcode | html %]" />
120
                                    Item in transit to <strong> [% HOLD.branch.branchname | html %]</strong> <input type="hidden" name="pickup" value="[% HOLD.branchcode | html %]" />
121
                                [% END %]
121
                                [% END %]
122
                            [% ELSE %]
122
                            [% ELSE %]
123
                                [% IF ( HOLD.is_in_transit ) %]
123
                                [% IF ( HOLD.is_in_transit ) %]
124
- 

Return to bug 25951