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

(-)a/basket/basket.pl (-17 / +7 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-97 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;
Lines 99-105 foreach my $biblionumber ( @bibs ) { Link Here
99
89
100
    $num++;
90
    $num++;
101
    $dat->{biblionumber} = $biblionumber;
91
    $dat->{biblionumber} = $biblionumber;
102
    $dat->{ITEM_RESULTS}   = \@items;
92
    $dat->{ITEM_RESULTS}   = $biblio->items;
103
    $dat->{MARCNOTES}      = $marcnotesarray;
93
    $dat->{MARCNOTES}      = $marcnotesarray;
104
    $dat->{MARCSUBJCTS}    = $marcsubjctsarray;
94
    $dat->{MARCSUBJCTS}    = $marcsubjctsarray;
105
    $dat->{MARCAUTHORS}    = $marcauthorsarray;
95
    $dat->{MARCAUTHORS}    = $marcauthorsarray;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt (-6 / +11 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-230 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
                                            [% IF BIBLIO_RESULT.ITEM_RESULTS %]
224
                                                [% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]
226
                                                [% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]
225
                                                    <p>
227
                                                    <p>
226
                                                        [% ITEM_RESULT.branchname | html %]
228
                                                        [% Branches.GetName(ITEM_RESULT.holdingbranch) | html %]
227
                                                        <span class="shelvingloc">[% ITEM_RESULT.location_description | html %]</span>
229
                                                        <span class="shelvingloc">
230
                                                            [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => ITEM_RESULT.location ) | html %]
231
                                                        </span>
228
                                                        [% IF ( ITEM_RESULT.itemcallnumber ) %]
232
                                                        [% IF ( ITEM_RESULT.itemcallnumber ) %]
229
                                                            ([% ITEM_RESULT.itemcallnumber | html %])
233
                                                            ([% ITEM_RESULT.itemcallnumber | html %])
230
                                                        [% END %]
234
                                                        [% END %]
Lines 293-300 Link Here
293
                                                            <strong>
297
                                                            <strong>
294
                                                                <span class="callnumber">[% ITEM_RESULT.itemcallnumber | html %]</span>
298
                                                                <span class="callnumber">[% ITEM_RESULT.itemcallnumber | html %]</span>
295
                                                            </strong>
299
                                                            </strong>
296
                                                            [% ITEM_RESULT.branchname | html %]
300
                                                            [% Branches.GetName(ITEM_RESULT.holdingbranch) | html %]
297
                                                            <span class="shelvingloc">[% ITEM_RESULT.location_description | html %]</span>
301
                                                            <span class="shelvingloc">
302
                                                                [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => ITEM_RESULT.location ) | html %]
303
                                                            </span>
298
                                                        </span>
304
                                                        </span>
299
                                                    </div>
305
                                                    </div>
300
                                                [% END %]
306
                                                [% END %]
301
- 

Return to bug 27272