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

(-)a/catalogue/detail.pl (-66 / +84 lines)
Lines 33-39 use C4::Koha qw( Link Here
33
use C4::Serials qw( CountSubscriptionFromBiblionumber SearchSubscriptions GetLatestSerials );
33
use C4::Serials qw( CountSubscriptionFromBiblionumber SearchSubscriptions GetLatestSerials );
34
use C4::Output qw( output_html_with_http_headers );
34
use C4::Output qw( output_html_with_http_headers );
35
use C4::Biblio qw( GetBiblioData GetFrameworkCode );
35
use C4::Biblio qw( GetBiblioData GetFrameworkCode );
36
use C4::Items qw( GetAnalyticsCount GetHostItemsInfo GetItemsInfo );
36
use C4::Items qw( GetAnalyticsCount );
37
use C4::Circulation qw( GetTransfers );
37
use C4::Circulation qw( GetTransfers );
38
use C4::Reserves;
38
use C4::Reserves;
39
use C4::Serials qw( CountSubscriptionFromBiblionumber SearchSubscriptions GetLatestSerials );
39
use C4::Serials qw( CountSubscriptionFromBiblionumber SearchSubscriptions GetLatestSerials );
Lines 57-62 use Koha::Plugins; Link Here
57
use Koha::Recalls;
57
use Koha::Recalls;
58
use Koha::SearchEngine::Search;
58
use Koha::SearchEngine::Search;
59
use Koha::SearchEngine::QueryBuilder;
59
use Koha::SearchEngine::QueryBuilder;
60
use Koha::Serial::Items;
60
61
61
my $query = CGI->new();
62
my $query = CGI->new();
62
63
Lines 157-180 $template->param( Link Here
157
    content_identifier_exists =>  $content_identifier_exists,
158
    content_identifier_exists =>  $content_identifier_exists,
158
);
159
);
159
160
160
my $itemtypes = { map { $_->{itemtype} => $_ } @{ Koha::ItemTypes->search->unblessed } };
161
my $itemtypes = { map { $_->{itemtype} => $_ } @{ Koha::ItemTypes->search_with_localization->unblessed } };
161
162
162
my $dbh = C4::Context->dbh;
163
my $all_items = $biblio->items(
163
164
    {},
164
my @all_items = GetItemsInfo( $biblionumber );
165
    {
166
        # FIXME A different order is expected if at least one items.serial is true
167
        order_by => [
168
            'homebranch.branchname',
169
            'me.enumchron',
170
            \"LDAP( me.copynumber, 8, '0' )",
171
            -asc => 'me.dateacessioned'
172
        ],
173
        join => ['homebranch']
174
    }
175
);
165
my @items;
176
my @items;
166
my $patron = Koha::Patrons->find( $borrowernumber );
177
my $patron = Koha::Patrons->find( $borrowernumber );
167
for my $itm (@all_items) {
178
while ( my $item = $all_items->next ) {
168
    push @items, $itm unless ( $itm->{itemlost} && $patron->category->hidelostitems && !$showallitems);
179
    push @items, $item
180
      unless $item->itemlost
181
      && $patron->category->hidelostitems
182
      && !$showallitems;
169
}
183
}
170
184
171
# flag indicating existence of at least one item linked via a host record
185
# flag indicating existence of at least one item linked via a host record
172
my $hostrecords;
186
my $hostrecords;
173
# adding items linked via host biblios
187
# adding items linked via host biblios
174
my @hostitems = GetHostItemsInfo($marc_record);
188
my $hostitems = $biblio->host_items;
175
if (@hostitems){
189
if ( $hostitems->count ) {
176
    $hostrecords =1;
190
    $hostrecords = 1;
177
    push (@items,@hostitems);
191
    push @items, $hostitems->as_list;
178
}
192
}
179
193
180
my $dat = &GetBiblioData($biblionumber);
194
my $dat = &GetBiblioData($biblionumber);
Lines 281-289 if ( defined $dat->{'itemtype'} ) { Link Here
281
    $dat->{imageurl} = getitemtypeimagelocation( 'intranet', $itemtypes->{ $dat->{itemtype} }{imageurl} );
295
    $dat->{imageurl} = getitemtypeimagelocation( 'intranet', $itemtypes->{ $dat->{itemtype} }{imageurl} );
282
}
296
}
283
297
284
$dat->{'count'} = scalar @all_items + @hostitems;
298
$dat->{'count'} = $all_items->count + $hostitems->count;
285
$dat->{'showncount'} = scalar @items + @hostitems;
299
$dat->{'showncount'} = scalar @items + $hostitems->count;
286
$dat->{'hiddencount'} = scalar @all_items + @hostitems - scalar @items;
300
$dat->{'hiddencount'} = $all_items->count + $hostitems->count - scalar @items;
287
301
288
my $shelflocations =
302
my $shelflocations =
289
  { map { $_->{authorised_value} => $_->{lib} } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => $fw, kohafield => 'items.location' } ) };
303
  { map { $_->{authorised_value} => $_->{lib} } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => $fw, kohafield => 'items.location' } ) };
Lines 325-384 if ($currentbranch and C4::Context->preference('SeparateHoldings')) { Link Here
325
}
339
}
326
my $separatebranch = C4::Context->preference('SeparateHoldingsBranch') || 'homebranch';
340
my $separatebranch = C4::Context->preference('SeparateHoldingsBranch') || 'homebranch';
327
my ( $itemloop_has_images, $otheritemloop_has_images );
341
my ( $itemloop_has_images, $otheritemloop_has_images );
328
foreach my $item (@items) {
329
    my $itembranchcode = $item->{$separatebranch};
330
342
331
    $item->{imageurl} = defined $item->{itype} ? getitemtypeimagelocation('intranet', $itemtypes->{ $item->{itype} }{imageurl})
343
foreach my $item (@items) {
332
                                               : '';
344
    my $itembranchcode = $item->$separatebranch;
333
345
334
    $item->{datedue} = format_sqldatetime($item->{datedue});
346
    my $item_info = $item->unblessed;
347
    $item_info->{itemtype} = $itemtypes->{$item->effective_itemtype};
335
348
336
    #get shelf location and collection code description if they are authorised value.
349
    #get shelf location and collection code description if they are authorised value.
337
    # same thing for copy number
350
    # same thing for copy number
338
    my $shelfcode = $item->{'location'};
351
    my $shelfcode = $item->location;
339
    $item->{'location'} = $shelflocations->{$shelfcode} if ( defined( $shelfcode ) && defined($shelflocations) && exists( $shelflocations->{$shelfcode} ) );
352
    $item_info->{'location'} = $shelflocations->{$shelfcode} if ( defined( $shelfcode ) && defined($shelflocations) && exists( $shelflocations->{$shelfcode} ) );
340
    my $ccode = $item->{'ccode'};
353
    my $ccode = $item->ccode;
341
    $item->{'ccode'} = $collections->{$ccode} if ( defined( $ccode ) && defined($collections) && exists( $collections->{$ccode} ) );
354
    $item_info->{'ccode'} = $collections->{$ccode} if ( defined( $ccode ) && defined($collections) && exists( $collections->{$ccode} ) );
342
    my $copynumber = $item->{'copynumber'};
355
    my $copynumber = $item->{'copynumber'};
343
    $item->{'copynumber'} = $copynumbers->{$copynumber} if ( defined($copynumber) && defined($copynumbers) && exists( $copynumbers->{$copynumber} ) );
356
    $item_info->{'copynumber'} = $copynumbers->{$copynumber} if ( defined($copynumber) && defined($copynumbers) && exists( $copynumbers->{$copynumber} ) );
344
    foreach (qw(ccode enumchron copynumber stocknumber itemnotes itemnotes_nonpublic uri publisheddate)) { # Warning when removing GetItemsInfo - publisheddate (at least) is not part of the items table
357
    foreach (qw(ccode enumchron copynumber stocknumber itemnotes itemnotes_nonpublic uri )) {
345
        $itemfields{$_} = 1 if ( $item->{$_} );
358
        $itemfields{$_} = 1 if $item->$_;
359
    }
360
361
    # FIXME The following must be Koha::Item->serial
362
    my $serial_item = Koha::Serial::Items->find($item->itemnumber);
363
    if ( $serial_item ) {
364
        $item_info->{serial} = $serial_item;
365
        $itemfields{publisheddate} = 1;
346
    }
366
    }
347
367
348
    # checking for holds
368
    # checking for holds
349
    my $item_object = Koha::Items->find( $item->{itemnumber} );
369
    my $holds = $item->current_holds;
350
    my $holds = $item_object->current_holds;
351
    if ( my $first_hold = $holds->next ) {
370
    if ( my $first_hold = $holds->next ) {
352
        $item->{first_hold} = $first_hold;
371
        $item_info->{first_hold} = $first_hold;
353
    }
372
    }
354
373
355
    if ( my $checkout = $item_object->checkout ) {
374
    $item_info->{checkout} = $item->checkout;
356
        $item->{CheckedOutFor} = $checkout->patron;
357
    }
358
375
359
    # Check the transit status
376
    # Check the transit status
360
    my ( $transfertwhen, $transfertfrom, $transfertto ) = GetTransfers($item->{itemnumber});
377
    my $transfer = $item->get_transfer;
361
    if ( defined( $transfertwhen ) && ( $transfertwhen ne '' ) ) {
378
    if ( $transfer ) {
362
        $item->{transfertwhen} = $transfertwhen;
379
        $item_info->{transfertwhen} = $transfer->datesent;
363
        $item->{transfertfrom} = $transfertfrom;
380
        $item_info->{transfertfrom} = $transfer->frombranch;
364
        $item->{transfertto}   = $transfertto;
381
        $item_info->{transfertto}   = $transfer->tobranch;
365
        $item->{nocancel} = 1;
382
        $item_info->{nocancel} = 1;
366
    }
383
    }
367
384
368
    foreach my $f (qw( itemnotes )) {
385
    foreach my $f (qw( itemnotes )) {
369
        if ($item->{$f}) {
386
        if ($item_info->{$f}) {
370
            $item->{$f} =~ s|\n|<br />|g;
387
            $item_info->{$f} =~ s|\n|<br />|g;
371
            $itemfields{$f} = 1;
388
            $itemfields{$f} = 1;
372
        }
389
        }
373
    }
390
    }
374
391
375
    #item has a host number if its biblio number does not match the current bib
392
    #item has a host number if its biblio number does not match the current bib
376
393
377
    if ($item->{biblionumber} ne $biblionumber){
394
    if ($item->biblionumber ne $biblionumber){
378
        $item->{hostbiblionumber} = $item->{biblionumber};
395
        $item_info->{hostbiblionumber} = $item->biblionumber;
379
        $item->{hosttitle} = GetBiblioData($item->{biblionumber})->{title};
396
        $item_info->{hosttitle} = $item->biblio->title;
380
    }
397
    }
381
	
398
382
399
383
    if ( $analyze ) {
400
    if ( $analyze ) {
384
        # count if item is used in analytical bibliorecords
401
        # count if item is used in analytical bibliorecords
Lines 386-437 foreach my $item (@items) { Link Here
386
        my $countanalytics = C4::Context->preference('EasyAnalyticalRecords') ? GetAnalyticsCount($item->{itemnumber}) : 0;
403
        my $countanalytics = C4::Context->preference('EasyAnalyticalRecords') ? GetAnalyticsCount($item->{itemnumber}) : 0;
387
        if ($countanalytics > 0){
404
        if ($countanalytics > 0){
388
            $analytics_flag=1;
405
            $analytics_flag=1;
389
            $item->{countanalytics} = $countanalytics;
406
            $item_info->{countanalytics} = $countanalytics;
390
        }
407
        }
391
    }
408
    }
392
409
393
    if (defined($item->{'materials'}) && $item->{'materials'} =~ /\S/){
410
    if (defined($item->materials) && $item->materials =~ /\S/){
394
        $materials_flag = 1;
411
        $materials_flag = 1;
395
        if (defined $materials_map{ $item->{materials} }) {
412
        if (defined $materials_map{ $item->materials }) {
396
            $item->{materials} = $materials_map{ $item->{materials} };
413
            $item_info->{materials} = $materials_map{ $item->materials };
397
        }
414
        }
398
    }
415
    }
399
416
400
    if ( C4::Context->preference('UseCourseReserves') ) {
417
    if ( C4::Context->preference('UseCourseReserves') ) {
401
        $item->{'course_reserves'} = GetItemCourseReservesInfo( itemnumber => $item->{'itemnumber'} );
418
        $item_info->{'course_reserves'} = GetItemCourseReservesInfo( itemnumber => $item->itemnumber );
402
    }
403
404
    if ( C4::Context->preference('IndependentBranches') ) {
405
        my $userenv = C4::Context->userenv();
406
        if ( not C4::Context->IsSuperLibrarian()
407
            and $userenv->{branch} ne $item->{homebranch} ) {
408
            $item->{cannot_be_edited} = 1;
409
        }
410
    }
419
    }
411
420
412
    if ( C4::Context->preference("LocalCoverImages") == 1 ) {
421
    if ( C4::Context->preference("LocalCoverImages") == 1 ) {
413
        $item->{cover_images} = $item_object->cover_images;
422
        $item_info->{cover_images} = $item->cover_images;
414
    }
423
    }
415
424
416
    if ( C4::Context->preference('UseRecalls') ) {
425
    if ( C4::Context->preference('UseRecalls') ) {
417
        my $recall = Koha::Recalls->find({ item_id => $item->{itemnumber}, completed => 0 });
426
        my $recall = Koha::Recalls->find({ item_id => $item->{itemnumber}, completed => 0 });
418
        if ( defined $recall ) {
427
        if ( defined $recall ) {
419
            $item->{recalled} = 1;
428
            $item_info->{recalled} = 1;
420
            $item->{recall} = $recall;
429
            $item_info->{recall} = $recall;
430
        }
431
    }
432
433
    if ( C4::Context->preference('IndependentBranches') ) {
434
        my $userenv = C4::Context->userenv();
435
        if ( not C4::Context->IsSuperLibrarian()
436
            and $userenv->{branch} ne $item->homebranch ) {
437
            $item_info->{cannot_be_edited} = 1;
438
            $item_info->{not_same_branch} = 1;
421
        }
439
        }
422
    }
440
    }
423
441
424
    if ($currentbranch and C4::Context->preference('SeparateHoldings')) {
442
    if ($currentbranch and C4::Context->preference('SeparateHoldings')) {
425
        if ($itembranchcode and $itembranchcode eq $currentbranch) {
443
        if ($itembranchcode and $itembranchcode eq $currentbranch) {
426
            push @itemloop, $item;
444
            push @itemloop, $item_info;
427
            $itemloop_has_images++ if $item_object->cover_images->count;
445
            $itemloop_has_images++ if $item->cover_images->count;
428
        } else {
446
        } else {
429
            push @otheritemloop, $item;
447
            push @otheritemloop, $item_info;
430
            $otheritemloop_has_images++ if $item_object->cover_images->count;
448
            $otheritemloop_has_images++ if $item->cover_images->count;
431
        }
449
        }
432
    } else {
450
    } else {
433
        push @itemloop, $item;
451
        push @itemloop, $item_info;
434
        $itemloop_has_images++ if $item_object->cover_images->count;
452
        $itemloop_has_images++ if $item->cover_images->count;
435
    }
453
    }
436
}
454
}
437
455
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-26 / +28 lines)
Lines 383-395 Link Here
383
383
384
                    [% IF ( item_level_itypes ) %]
384
                    [% IF ( item_level_itypes ) %]
385
                        <td class="itype">
385
                        <td class="itype">
386
                            [% IF !noItemTypeImages && item.imageurl %]
386
                            [% SET itemtype = item.itemtype %]
387
                                <img src="[% item.imageurl | html %]" alt="[% item.translated_description | html %]" title="[% item.translated_description | html %]" />
387
                            [% IF !noItemTypeImages && itemtype.image_location %]
388
                                <img src="[% itemtype.image_location | html %]" alt="[% itemtype.translated_description | html %]" title="[% itemtype.translated_description | html %]" />
388
                            [% END %]
389
                            [% END %]
389
                            <span class="itypedesc">[% item.translated_description | html %]</span>
390
                            <span class="itypedesc">[% itemtype.translated_description | html %]</span>
390
                        </td>
391
                        </td>
391
                    [% END %]
392
                    [% END %]
392
                    <td class="location">[% UNLESS ( singlebranchmode ) %][% Branches.GetName( item.branchcode ) | html %] [% END %]</td>
393
                    <td class="location">[% UNLESS ( singlebranchmode ) %][% Branches.GetName( item.holdingbranch ) | html %] [% END %]</td>
393
                    <td class="homebranch">
394
                    <td class="homebranch">
394
                        <span class="homebranchdesc">[% Branches.GetName(item.homebranch) | html %]</span>
395
                        <span class="homebranchdesc">[% Branches.GetName(item.homebranch) | html %]</span>
395
                        <span class="shelvingloc">
396
                        <span class="shelvingloc">
Lines 411-435 Note that permanent location is a code, and location may be an authval. Link Here
411
                    [% IF ( itemdata_ccode ) %]<td>[% item.ccode | html %]</td>[% END %]
412
                    [% IF ( itemdata_ccode ) %]<td>[% item.ccode | html %]</td>[% END %]
412
                    <td class="itemcallnumber">[% IF ( item.itemcallnumber ) %] [% item.itemcallnumber | html %][% END %]</td>
413
                    <td class="itemcallnumber">[% IF ( item.itemcallnumber ) %] [% item.itemcallnumber | html %][% END %]</td>
413
                    [% IF ( volinfo ) %]
414
                    [% IF ( volinfo ) %]
415
                        [% SET serial = item.serial %]
414
                        [% IF itemdata_publisheddate #If there is at least one published date, use it for sorting %]
416
                        [% IF itemdata_publisheddate #If there is at least one published date, use it for sorting %]
415
                            <td class="enumchron" data-order="[% item.publisheddate | html %]">
417
                            <td class="enumchron" data-order="[% serial.publisheddate | html %]">
416
                        [% ELSE %]
418
                        [% ELSE %]
417
                            <td class="enumchron">
419
                            <td class="enumchron">
418
                        [% END %]
420
                        [% END %]
419
                            [% IF ( itemdata_enumchron ) %]
421
                            [% IF ( itemdata_enumchron ) %]
420
                                [% IF item.enumchron && item.serialseq %]
422
                                [% IF item.enumchron && serial.serialseq %]
421
                                    <span class="enum">[% item.enumchron | html %]</span>
423
                                    <span class="enum">[% item.enumchron | html %]</span>
422
                                    [% IF ( item.serialseq && item.enumchron!=item.serialseq ) %]
424
                                    [% IF ( item.serialseq && item.enumchron != serial.serialseq ) %]
423
                                        <span class="sep"> -- </span>
425
                                        <span class="sep"> -- </span>
424
                                        <span class="serialseq">[% item.serialseq | html %]</span>
426
                                        <span class="serialseq">[% serial.serialseq | html %]</span>
425
                                    [% END %]
427
                                    [% END %]
426
                                [% ELSIF item.enumchron %]
428
                                [% ELSIF item.enumchron %]
427
                                    <span class="enum">[% item.enumchron | html %]</span>
429
                                    <span class="enum">[% item.enumchron | html %]</span>
428
                                [% ELSIF item.serialseq %]
430
                                [% ELSIF item.serialseq %]
429
                                    <span class="serialseq">[% item.serialseq | html %]</span>
431
                                    <span class="serialseq">[% serial.serialseq | html %]</span>
430
                                [% END %]
432
                                [% END %]
431
                                [% IF ( item.publisheddate ) %]
433
                                [% IF serial.publisheddate %]
432
                                    <span class="pubdate">([% item.publisheddate | $KohaDates %])</span>
434
                                    <span class="pubdate">([% serial.publisheddate | $KohaDates %])</span>
433
                                [% END %]
435
                                [% END %]
434
                            [% END %]
436
                            [% END %]
435
                            </span>
437
                            </span>
Lines 437-457 Note that permanent location is a code, and location may be an authval. Link Here
437
                    [% END %]
439
                    [% END %]
438
                    <td class="status">
440
                    <td class="status">
439
441
440
                        [% IF item.CheckedOutFor %]
442
                        [% IF item.checkout %]
441
                          [% IF item.onsite_checkout %]
443
                          [% IF item.checkout.onsite_checkout %]
442
                            <span>Currently in local use
444
                            <span>Currently in local use
443
                          [% ELSE %]
445
                          [% ELSE %]
444
                            <span class="datedue">Checked out
446
                            <span class="datedue">Checked out
445
                          [% END %]
447
                          [% END %]
446
                                [% UNLESS ( item.NOTSAMEBRANCH ) %]
448
                                [% UNLESS ( item.not_same_branch) %]
447
                                  [% IF item.onsite_checkout %]
449
                                  [% IF item.checkout.onsite_checkout %]
448
                                    by
450
                                    by
449
                                  [% ELSE %]
451
                                  [% ELSE %]
450
                                    to
452
                                    to
451
                                  [% END %]
453
                                  [% END %]
452
                                  [% INCLUDE 'patron-title.inc' patron=item.CheckedOutFor hide_patron_infos_if_needed=1 %]
454
                                  [% INCLUDE 'patron-title.inc' patron=item.checkout.patron hide_patron_infos_if_needed=1 %]
453
                                [% END %]
455
                                [% END %]
454
                                : due [% item.datedue | html %]
456
                                : due [% item.checkout.date_due | $KohaDates as_due_date => 1 %]
455
                            </span>
457
                            </span>
456
                        [% ELSIF ( item.transfertwhen ) %]
458
                        [% ELSIF ( item.transfertwhen ) %]
457
                            <span class="intransit">In transit from [% Branches.GetName( item.transfertfrom ) | html %] to [% Branches.GetName( item.transfertto ) | html %] since [% item.transfertwhen | $KohaDates %]</span>
459
                            <span class="intransit">In transit from [% Branches.GetName( item.transfertfrom ) | html %] to [% Branches.GetName( item.transfertto ) | html %] since [% item.transfertwhen | $KohaDates %]</span>
Lines 493-502 Note that permanent location is a code, and location may be an authval. Link Here
493
                            [% END %]
495
                            [% END %]
494
                        [% END %]
496
                        [% END %]
495
497
496
                        [% IF ( item.itemnotforloan || item.notforloan_per_itemtype ) %]
498
                        [% IF ( item.notforloan || item.itemtype.notforloan ) %]
497
                            <span class="notforloan">Not for loan
499
                            <span class="notforloan">Not for loan
498
                            [% IF ( item.notforloanvalue ) %]
500
                            [% SET not_for_loan_description = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => item.notforloan ) %]
499
                                <span class="reason">([% item.notforloanvalue | html %])</span>
501
                            [% IF not_for_loan_description %]
502
                                <span class="reason">([% not_for_loan_description | html %])</span>
500
                            [% END %]
503
                            [% END %]
501
                            </span>
504
                            </span>
502
                        [% END %]
505
                        [% END %]
Lines 514-533 Note that permanent location is a code, and location may be an authval. Link Here
514
                            [% END %]
517
                            [% END %]
515
                        [% END %]
518
                        [% END %]
516
519
517
                        [% IF item.recalled %]
520
                        [% IF item.recall %]
518
                            [% IF item.recall.waiting_date %]
521
                            [% IF item.recall.waiting_date %]
519
                                Waiting at [% Branches.GetName( item.recall.pickup_library_id ) | html %] since [% item.recall.waiting_date | $KohaDates %]
522
                                Waiting at [% Branches.GetName( item.recall.branchcode ) | html %] since [% item.recall.waiting_date | $KohaDates %]
520
                            [% ELSE %]
523
                            [% ELSE %]
521
                                Item recalled by <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% item.recall.patron_id | uri %]">[% item.recall.patron.firstname | html %] [% item.recall.patron.surname | html %] ([% item.recall.patron.cardnumber | html %])</a> on [% item.recall.created_date | $KohaDates %]
524
                                Item recalled by <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% item.recall.patron_id | uri %]">[% item.recall.patron.firstname | html %] [% item.recall.patron.surname | html %] ([% item.recall.patron.cardnumber | html %])</a> on [% item.recall.recalldate | $KohaDates %]
522
                            [% END %]
525
                            [% END %]
523
                        [% END %]
526
                        [% END %]
524
527
525
                        [% UNLESS ( item.itemnotforloan || item.notforloan_per_itemtype || item.onloan || item.itemlost || item.withdrawn || item.damaged || item.transfertwhen || hold || item.recalled ) %]
528
                        [% UNLESS ( item.itemnotforloan || item.notforloan_per_itemtype || item.onloan || item.itemlost || item.withdrawn || item.damaged || item.transfertwhen || hold || ( Koha.Preference('UseRecalls') && recall ) ) %]
526
                            Available
529
                            Available
527
                        [% END %]
530
                        [% END %]
528
531
529
                        [% IF ( item.restricted ) %]
532
                        [% IF ( item.restricted ) %]
530
                            <span class="restricted">([% item.restrictedvalue | html %])</span>
533
                            <span class="restricted">([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.restricted', authorised_value => item.restricted ) | html %])</span>
531
                        [% END %]
534
                        [% END %]
532
                    </td>
535
                    </td>
533
                    <td class="datelastseen" data-order="[% item.datelastseen | html %]">[% item.datelastseen | $KohaDates %]</td>
536
                    <td class="datelastseen" data-order="[% item.datelastseen | html %]">[% item.datelastseen | $KohaDates %]</td>
534
- 

Return to bug 27272