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

(-)a/basket/basket.pl (-17 / +8 lines)
Lines 24-30 use C4::Biblio qw( Link Here
24
    GetMarcSubjects
24
    GetMarcSubjects
25
    GetMarcUrls
25
    GetMarcUrls
26
);
26
);
27
use C4::Items qw( GetItemsInfo );
28
use C4::Auth qw( get_template_and_user );
27
use C4::Auth qw( get_template_and_user );
29
use C4::Output qw( output_html_with_http_headers );
28
use C4::Output qw( output_html_with_http_headers );
30
29
Lines 72-105 foreach my $biblionumber ( @bibs ) { Link Here
72
    my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
71
    my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
73
    my $marcseriesarray  = GetMarcSeries  ($record,$marcflavour);
72
    my $marcseriesarray  = GetMarcSeries  ($record,$marcflavour);
74
    my $marcurlsarray    = GetMarcUrls    ($record,$marcflavour);
73
    my $marcurlsarray    = GetMarcUrls    ($record,$marcflavour);
75
    my @items            = GetItemsInfo( $biblionumber );
76
74
77
    my $hasauthors = 0;
75
    my $hasauthors = 0;
78
    if($dat->{'author'} || @$marcauthorsarray) {
76
    if($dat->{'author'} || @$marcauthorsarray) {
79
      $hasauthors = 1;
77
      $hasauthors = 1;
80
    }
78
    }
81
	
79
82
    my $shelflocations =
80
    # COinS format FIXME: for books Only
83
      { map { $_->{authorised_value} => $_->{lib} } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => $dat->{frameworkcode}, kohafield => 'items.location' } ) };
81
    my $fmt = substr $record->leader(), 6,2;
84
82
    my $fmts;
85
	for my $itm (@items) {
83
    $fmts->{'am'} = 'book';
86
	    if ($itm->{'location'}){
84
    $dat->{ocoins_format} = $fmts->{$fmt};
87
	    $itm->{'location_description'} = $shelflocations->{$itm->{'location'} };
88
		}
89
	}
90
	# COinS format FIXME: for books Only
91
        my $fmt = substr $record->leader(), 6,2;
92
        my $fmts;
93
        $fmts->{'am'} = 'book';
94
        $dat->{ocoins_format} = $fmts->{$fmt};
95
85
96
    if ( $num % 2 == 1 ) {
86
    if ( $num % 2 == 1 ) {
97
        $dat->{'even'} = 1;
87
        $dat->{'even'} = 1;
98
    }
88
    }
99
89
90
    my $biblio = Koha::Biblios->find($biblionumber);
100
    $num++;
91
    $num++;
101
    $dat->{biblionumber} = $biblionumber;
92
    $dat->{biblionumber} = $biblionumber;
102
    $dat->{ITEM_RESULTS}   = \@items;
93
    $dat->{ITEM_RESULTS}   = $biblio->items;
103
    $dat->{MARCNOTES}      = $marcnotesarray;
94
    $dat->{MARCNOTES}      = $marcnotesarray;
104
    $dat->{MARCSUBJCTS}    = $marcsubjctsarray;
95
    $dat->{MARCSUBJCTS}    = $marcsubjctsarray;
105
    $dat->{MARCAUTHORS}    = $marcauthorsarray;
96
    $dat->{MARCAUTHORS}    = $marcauthorsarray;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt (-11 / +12 lines)
Lines 1-5 Link Here
1
[% USE raw %]
1
[% USE raw %]
2
[% USE Asset %]
2
[% USE Asset %]
3
[% USE AuthorisedValues %]
4
[% USE Branches %]
3
[% SET footerjs = 1 %]
5
[% SET footerjs = 1 %]
4
[% BLOCK controls %]
6
[% BLOCK controls %]
5
    <p class="cart-controls">
7
    <p class="cart-controls">
Lines 220-235 Link Here
220
                                    <tr>
222
                                    <tr>
221
                                        <th scope="row">Location(s)</th>
223
                                        <th scope="row">Location(s)</th>
222
                                        <td>
224
                                        <td>
223
                                            [% IF ( BIBLIO_RESULT.ITEM_RESULTS ) %]
225
                                            [% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]
224
                                                [% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]
226
                                                <p>
225
                                                    <p>
227
                                                    [% Branches.GetName(ITEM_RESULT.holdingbranch) | html %]
226
                                                        [% ITEM_RESULT.branchname | html %]
228
                                                    <span class="shelvingloc">
227
                                                        <span class="shelvingloc">[% ITEM_RESULT.location_description | html %]</span>
229
                                                        [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.location ) | html %]
228
                                                        [% IF ( ITEM_RESULT.itemcallnumber ) %]
230
                                                    </span>
229
                                                            ([% ITEM_RESULT.itemcallnumber | html %])
231
                                                    [% IF ( ITEM_RESULT.itemcallnumber ) %]
230
                                                        [% END %]
232
                                                        ([% ITEM_RESULT.itemcallnumber | html %])
231
                                                    </p>
233
                                                    [% END %]
232
                                                [% END %]
234
                                                </p>
233
                                            [% ELSE %]
235
                                            [% ELSE %]
234
                                                This record has no items.
236
                                                This record has no items.
235
                                            [% END %]
237
                                            [% END %]
236
- 

Return to bug 27272