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

(-)a/catalogue/detail.pl (-14 / +1 lines)
Lines 203-222 my $copynumbers = Link Here
203
my (@itemloop, @otheritemloop, %itemfields);
203
my (@itemloop, @otheritemloop, %itemfields);
204
my $norequests = 1;
204
my $norequests = 1;
205
205
206
my $mss = Koha::MarcSubfieldStructures->search({ frameworkcode => $fw, kohafield => 'items.itemlost', authorised_value => { not => undef } });
206
my $mss = Koha::MarcSubfieldStructures->search({ frameworkcode => $fw, kohafield => 'items.materials', authorised_value => { not => undef } });
207
if ( $mss->count ) {
208
    $template->param( itemlostloop => GetAuthorisedValues( $mss->next->authorised_value ) );
209
}
210
$mss = Koha::MarcSubfieldStructures->search({ frameworkcode => $fw, kohafield => 'items.damaged', authorised_value => { not => undef } });
211
if ( $mss->count ) {
212
    $template->param( itemdamagedloop => GetAuthorisedValues( $mss->next->authorised_value ) );
213
}
214
$mss = Koha::MarcSubfieldStructures->search({ frameworkcode => $fw, kohafield => 'items.withdrawn', authorised_value => { not => undef } });
215
if ( $mss->count ) {
216
    $template->param( itemwithdrawnloop => GetAuthorisedValues( $mss->next->authorised_value) );
217
}
218
219
$mss = Koha::MarcSubfieldStructures->search({ frameworkcode => $fw, kohafield => 'items.materials', authorised_value => { not => undef } });
220
my %materials_map;
207
my %materials_map;
221
if ($mss->count) {
208
if ($mss->count) {
222
    my $materials_authvals = GetAuthorisedValues($mss->next->authorised_value);
209
    my $materials_authvals = GetAuthorisedValues($mss->next->authorised_value);
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-19 / +9 lines)
Lines 393-429 Link Here
393
                            <span class="intransit">In transit from [% Branches.GetName( item.transfertfrom ) %] to [% Branches.GetName( item.transfertto ) %] since [% item.transfertwhen | $KohaDates %]</span>
393
                            <span class="intransit">In transit from [% Branches.GetName( item.transfertfrom ) %] to [% Branches.GetName( item.transfertto ) %] since [% item.transfertwhen | $KohaDates %]</span>
394
                        [% END %]
394
                        [% END %]
395
395
396
                        [% itemlost_desc = AuthorisedValues.GetByCode( 'LOST', item.itemlost, 1 ) %]
396
                        [% IF ( item.itemlost ) %]
397
                        [% IF ( item.itemlost ) %]
397
                            [% IF itemlostloop %]
398
                            [% IF itemlost_desc %]
398
                                [% FOREACH itemlostloo IN itemlostloop %]
399
                                <span class="lost">[% itemlost_desc %]</span>
399
                                    [% IF itemlostloo.authorised_value == item.itemlost %]
400
                                        <span class="lost">[% itemlostloo.lib %]</span>
401
                                    [% END %]
402
                                [% END %]
403
                            [% ELSE %]
400
                            [% ELSE %]
404
                                <span class="lost">Unavailable (lost or missing)</span>
401
                                <span class="lost">Unavailable (lost or missing)</span>
405
                            [% END %]
402
                            [% END %]
406
                        [% END %]
403
                        [% END %]
407
404
405
                        [% withdrawn_desc = AuthorisedValues.GetByCode( 'WITHDRAWN', item.withdrawn, 1 ) %]
408
                        [% IF ( item.withdrawn ) %]
406
                        [% IF ( item.withdrawn ) %]
409
                            [% IF itemwithdrawnloop %]
407
                            [% IF withdrawn_desc %]
410
                                [% FOREACH itemwithdrawnloo IN itemwithdrawnloop %]
408
                                <span class="wdn">[% withdrawn_desc %]</span>
411
                                    [% IF itemwithdrawnloo.authorised_value == item.withdrawn %]
412
                                        <span class="wdn">[% itemwithdrawnloo.lib %]</span>
413
                                    [% END %]
414
                                [% END %]
415
                            [% ELSE %]
409
                            [% ELSE %]
416
                                <span class="wdn">Withdrawn</span>
410
                                <span class="wdn">Withdrawn</span>
417
                            [% END %]
411
                            [% END %]
418
                        [% END %]
412
                        [% END %]
419
413
414
                        [% damaged_desc = AuthorisedValues.GetByCode( 'DAMAGED', item.damaged, 1 ) %]
420
                        [% IF ( item.damaged ) %]
415
                        [% IF ( item.damaged ) %]
421
                            [% IF itemdamagedloop %]
416
                            [% IF damaged_desc %]
422
                                [% FOREACH itemdamagedloo IN itemdamagedloop %]
417
                                <span class="dmg">[% damaged_desc %]</span>
423
                                    [% IF itemdamagedloo.authorised_value == item.damaged %]
424
                                        <span class="dmg">[% itemdamagedloo.lib %]</span>
425
                                    [% END %]
426
                                [% END %]
427
                            [% ELSE %]
418
                            [% ELSE %]
428
                                <span class="dmg">Damaged</span>
419
                                <span class="dmg">Damaged</span>
429
                            [% END %]
420
                            [% END %]
430
- 

Return to bug 20341