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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt (-5 / +7 lines)
Lines 1-5 Link Here
1
[% USE raw %]
1
[% USE raw %]
2
[% USE Koha %]
2
[% USE Koha %]
3
[% USE AuthorisedValues %]
4
[% USE Branches %]
3
[% USE KohaDates %]
5
[% USE KohaDates %]
4
[% USE Asset %]
6
[% USE Asset %]
5
[% SET is_popup = 1 %]
7
[% SET is_popup = 1 %]
Lines 241-252 Link Here
241
                                                    <ul>
243
                                                    <ul>
242
                                                        [% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]
244
                                                        [% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]
243
                                                            <li>
245
                                                            <li>
244
                                                                <strong>[% ITEM_RESULT.branchname | html %]</strong>
246
                                                                <strong>[% Branches.GetName(ITEM_RESULT.holdingbranch) | html %]</strong>
245
                                                                [% IF ( ITEM_RESULT.location_opac ) %]<span class="shelvingloc">[% ITEM_RESULT.location_opac | html %]</span>[% END %]
247
                                                                <span class="shelvingloc">[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => ITEM_RESULT.location, opac => 1 ) | html %]</span>
246
                                                                [% IF ( ITEM_RESULT.itemcallnumber ) %]
248
                                                                [% IF ( ITEM_RESULT.itemcallnumber ) %]
247
                                                                    ([% ITEM_RESULT.itemcallnumber | html %])
249
                                                                    ([% ITEM_RESULT.itemcallnumber | html %])
248
                                                                [% END %]
250
                                                                [% END %]
249
                                                                ([% INCLUDE 'item-status.inc' item = ITEM_RESULT %])
251
                                                                ([% INCLUDE 'item-status.inc' item = ITEM_RESULT.item_object %])
250
                                                            </li>
252
                                                            </li>
251
                                                        [% END %]
253
                                                        [% END %]
252
                                                    </ul>
254
                                                    </ul>
Lines 303-310 Link Here
303
                                            </td>
305
                                            </td>
304
                                            <td>[% IF ( BIBLIO_RESULT.ITEM_RESULTS ) %]<ul>[% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]
306
                                            <td>[% IF ( BIBLIO_RESULT.ITEM_RESULTS ) %]<ul>[% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]
305
                                                <li>
307
                                                <li>
306
                                                    [% ITEM_RESULT.branchname | html %]
308
                                                    [% Branches.GetName(ITEM_RESULT.holdingbranch) | html %]
307
                                                    [% IF ( ITEM_RESULT.location_opac ) %]<span class="shelvingloc">[% ITEM_RESULT.location_opac | html %]</span>[% END %]
309
                                                    <span class="shelvingloc">[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => ITEM_RESULT.location, opac => 1 ) | html %]</span>
308
                                                    [% IF ( ITEM_RESULT.itemcallnumber ) %]
310
                                                    [% IF ( ITEM_RESULT.itemcallnumber ) %]
309
                                                        ([% ITEM_RESULT.itemcallnumber | html %])
311
                                                        ([% ITEM_RESULT.itemcallnumber | html %])
310
                                                    [% END %]
312
                                                    [% END %]
(-)a/opac/opac-basket.pl (-26 / +1 lines)
Lines 93-114 foreach my $biblionumber ( @bibs ) { Link Here
93
    next
93
    next
94
      if $biblio->hidden_in_opac({ rules => $rules });
94
      if $biblio->hidden_in_opac({ rules => $rules });
95
95
96
    # grab all the items...
97
    my $items        = $biblio->items->filter_by_visible_in_opac({ patron => $logged_in_user })->unblessed;
98
    foreach my $item (@$items) {
99
        my $reserve_status = C4::Reserves::GetReserveStatus($item->{itemnumber});
100
        if( $reserve_status eq "Waiting"){ $item->{'waiting'} = 1; }
101
        if( $reserve_status eq "Processing"){ $item->{'processing'} = 1; }
102
    }
103
104
    my $hasauthors = 0;
96
    my $hasauthors = 0;
105
    if($dat->{'author'} || @$marcauthorsarray) {
97
    if($dat->{'author'} || @$marcauthorsarray) {
106
      $hasauthors = 1;
98
      $hasauthors = 1;
107
    }
99
    }
108
    my $collections =
109
      { map { $_->{authorised_value} => $_->{opac_description} } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => $dat->{frameworkcode}, kohafield => 'items.ccode' } ) };
110
    my $shelflocations =
111
      { map { $_->{authorised_value} => $_->{opac_description} } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => $dat->{frameworkcode}, kohafield => 'items.location' } ) };
112
100
113
	# COinS format FIXME: for books Only
101
	# COinS format FIXME: for books Only
114
        my $fmt = substr $record->leader(), 6,2;
102
        my $fmt = substr $record->leader(), 6,2;
Lines 120-140 foreach my $biblionumber ( @bibs ) { Link Here
120
        $dat->{'even'} = 1;
108
        $dat->{'even'} = 1;
121
    }
109
    }
122
110
123
    for my $itm (@$items) {
124
        if ($itm->{'location'}){
125
            $itm->{'location_opac'} = $shelflocations->{$itm->{'location'} };
126
        }
127
        my $item_object = Koha::Items->find($itm->{itemnumber});
128
        my $transfer = $item_object->get_transfer;
129
        if ( $transfer && $transfer->in_transit ) {
130
            $itm->{transfertwhen} = $transfer->datesent;
131
            $itm->{transfertfrom} = $transfer->frombranch;
132
            $itm->{transfertto} = $transfer->tobranch;
133
        }
134
    }
135
    $num++;
111
    $num++;
136
    $dat->{biblionumber} = $biblionumber;
112
    $dat->{biblionumber} = $biblionumber;
137
    $dat->{ITEM_RESULTS}   = $items;
113
    $dat->{ITEM_RESULTS}   = $biblio->items->filter_by_visible_in_opac({ patron => $logged_in_user });
138
    $dat->{MARCNOTES}      = $marcnotesarray;
114
    $dat->{MARCNOTES}      = $marcnotesarray;
139
    $dat->{MARCSUBJCTS}    = $marcsubjctsarray;
115
    $dat->{MARCSUBJCTS}    = $marcsubjctsarray;
140
    $dat->{MARCAUTHORS}    = $marcauthorsarray;
116
    $dat->{MARCAUTHORS}    = $marcauthorsarray;
141
- 

Return to bug 32445