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

(-)a/catalogue/detail.pl (-79 / +81 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 60-65 use Koha::Plugins; Link Here
60
use Koha::Recalls;
60
use Koha::Recalls;
61
use Koha::SearchEngine::Search;
61
use Koha::SearchEngine::Search;
62
use Koha::SearchEngine::QueryBuilder;
62
use Koha::SearchEngine::QueryBuilder;
63
use Koha::Serial::Items;
63
64
64
my $query = CGI->new();
65
my $query = CGI->new();
65
66
Lines 189-212 $template->param( Link Here
189
    content_identifier_exists =>  $content_identifier_exists,
190
    content_identifier_exists =>  $content_identifier_exists,
190
);
191
);
191
192
192
my $itemtypes = { map { $_->{itemtype} => $_ } @{ Koha::ItemTypes->search->unblessed } };
193
my $itemtypes = { map { $_->itemtype => $_ } @{ Koha::ItemTypes->search_with_localization->as_list } };
193
194
my $all_items = $biblio->items->search_ordered;
194
my $dbh = C4::Context->dbh;
195
196
my @all_items = GetItemsInfo( $biblionumber );
197
my @items;
195
my @items;
198
my $patron = Koha::Patrons->find( $borrowernumber );
196
my $patron = Koha::Patrons->find( $borrowernumber );
199
for my $itm (@all_items) {
197
while ( my $item = $all_items->next ) {
200
    push @items, $itm unless ( $itm->{itemlost} && $patron->category->hidelostitems && !$showallitems);
198
    push @items, $item
199
      unless $item->itemlost
200
      && $patron->category->hidelostitems
201
      && !$showallitems;
201
}
202
}
202
203
203
# flag indicating existence of at least one item linked via a host record
204
# flag indicating existence of at least one item linked via a host record
204
my $hostrecords;
205
my $hostrecords;
205
# adding items linked via host biblios
206
# adding items linked via host biblios
206
my @hostitems = GetHostItemsInfo($marc_record);
207
my $hostitems = $biblio->host_items;
207
if (@hostitems){
208
if ( $hostitems->count ) {
208
    $hostrecords =1;
209
    $hostrecords = 1;
209
    push (@items,@hostitems);
210
    push @items, $hostitems->as_list;
210
}
211
}
211
212
212
my $dat = &GetBiblioData($biblionumber);
213
my $dat = &GetBiblioData($biblionumber);
Lines 317-328 if ( C4::Context->preference('suggestion') ) { Link Here
317
}
318
}
318
319
319
if ( defined $dat->{'itemtype'} ) {
320
if ( defined $dat->{'itemtype'} ) {
320
    $dat->{imageurl} = getitemtypeimagelocation( 'intranet', $itemtypes->{ $dat->{itemtype} }{imageurl} );
321
    $dat->{imageurl} = getitemtypeimagelocation( 'intranet', $itemtypes->{ $dat->{itemtype} }->imageurl );
321
}
322
}
322
323
323
$dat->{'count'} = scalar @all_items + @hostitems;
324
$dat->{'count'} = $all_items->count + $hostitems->count;
324
$dat->{'showncount'} = scalar @items + @hostitems;
325
$dat->{'showncount'} = scalar @items + $hostitems->count;
325
$dat->{'hiddencount'} = scalar @all_items + @hostitems - scalar @items;
326
$dat->{'hiddencount'} = $all_items->count + $hostitems->count - scalar @items;
326
327
327
my $shelflocations =
328
my $shelflocations =
328
  { map { $_->{authorised_value} => $_->{lib} } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => $fw, kohafield => 'items.location' } ) };
329
  { map { $_->{authorised_value} => $_->{lib} } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => $fw, kohafield => 'items.location' } ) };
Lines 364-424 if ($currentbranch and C4::Context->preference('SeparateHoldings')) { Link Here
364
}
365
}
365
my $separatebranch = C4::Context->preference('SeparateHoldingsBranch') || 'homebranch';
366
my $separatebranch = C4::Context->preference('SeparateHoldingsBranch') || 'homebranch';
366
my ( $itemloop_has_images, $otheritemloop_has_images );
367
my ( $itemloop_has_images, $otheritemloop_has_images );
367
foreach my $item (@items) {
368
    my $itembranchcode = $item->{$separatebranch};
369
368
370
    $item->{imageurl} = defined $item->{itype} ? getitemtypeimagelocation('intranet', $itemtypes->{ $item->{itype} }{imageurl})
369
foreach my $item (@items) {
371
                                               : '';
370
    my $itembranchcode = $item->$separatebranch;
372
371
373
    $item->{datedue} = format_sqldatetime($item->{datedue});
372
    my $item_info = $item->unblessed;
373
    $item_info->{itemtype} = $itemtypes->{$item->effective_itemtype};
374
374
375
    #get shelf location and collection code description if they are authorised value.
375
    #get shelf location and collection code description if they are authorised value.
376
    # same thing for copy number
376
    # same thing for copy number
377
    my $shelfcode = $item->{'location'};
377
    my $shelfcode = $item->location;
378
    $item->{'location'} = $shelflocations->{$shelfcode} if ( defined( $shelfcode ) && defined($shelflocations) && exists( $shelflocations->{$shelfcode} ) );
378
    $item_info->{'location'} = $shelflocations->{$shelfcode} if ( defined( $shelfcode ) && defined($shelflocations) && exists( $shelflocations->{$shelfcode} ) );
379
    my $ccode = $item->{'ccode'};
379
    my $ccode = $item->ccode;
380
    $item->{'ccode'} = $collections->{$ccode} if ( defined( $ccode ) && defined($collections) && exists( $collections->{$ccode} ) );
380
    $item_info->{'ccode'} = $collections->{$ccode} if ( defined( $ccode ) && defined($collections) && exists( $collections->{$ccode} ) );
381
    my $copynumber = $item->{'copynumber'};
381
    my $copynumber = $item->{'copynumber'};
382
    $item->{'copynumber'} = $copynumbers->{$copynumber} if ( defined($copynumber) && defined($copynumbers) && exists( $copynumbers->{$copynumber} ) );
382
    $item_info->{'copynumber'} = $copynumbers->{$copynumber} if ( defined($copynumber) && defined($copynumbers) && exists( $copynumbers->{$copynumber} ) );
383
    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
383
    foreach (qw(ccode enumchron copynumber stocknumber itemnotes itemnotes_nonpublic uri )) {
384
        $itemfields{$_} = 1 if ( $item->{$_} );
384
        $itemfields{$_} = 1 if $item->$_;
385
    }
386
387
    # FIXME The following must be Koha::Item->serial
388
    my $serial_item = Koha::Serial::Items->find($item->itemnumber);
389
    if ( $serial_item ) {
390
        $item_info->{serial} = $serial_item;
391
        $itemfields{publisheddate} = 1;
385
    }
392
    }
386
393
394
    $item_info->{object} = $item;
395
387
    # checking for holds
396
    # checking for holds
388
    my $item_object = Koha::Items->find( $item->{itemnumber} );
397
    my $holds = $item->current_holds;
389
    $item->{object} = $item_object;
390
    my $holds = $item_object->current_holds;
391
    if ( my $first_hold = $holds->next ) {
398
    if ( my $first_hold = $holds->next ) {
392
        $item->{first_hold} = $first_hold;
399
        $item_info->{first_hold} = $first_hold;
393
    }
400
    }
394
401
395
    if ( my $checkout = $item_object->checkout ) {
402
    $item_info->{checkout} = $item->checkout;
396
        $item->{CheckedOutFor} = $checkout->patron;
397
    }
398
403
399
    # Check the transit status
404
    # Check the transit status
400
    my ( $transfertwhen, $transfertfrom, $transfertto ) = GetTransfers($item->{itemnumber});
405
    my $transfer = $item->get_transfer;
401
    if ( defined( $transfertwhen ) && ( $transfertwhen ne '' ) ) {
406
    if ( $transfer ) {
402
        $item->{transfertwhen} = $transfertwhen;
407
        $item_info->{transfertwhen} = $transfer->datesent;
403
        $item->{transfertfrom} = $transfertfrom;
408
        $item_info->{transfertfrom} = $transfer->frombranch;
404
        $item->{transfertto}   = $transfertto;
409
        $item_info->{transfertto}   = $transfer->tobranch;
405
        $item->{nocancel} = 1;
410
        $item_info->{nocancel} = 1;
406
    }
411
    }
407
412
408
    foreach my $f (qw( itemnotes )) {
413
    foreach my $f (qw( itemnotes )) {
409
        if ($item->{$f}) {
414
        if ($item_info->{$f}) {
410
            $item->{$f} =~ s|\n|<br />|g;
415
            $item_info->{$f} =~ s|\n|<br />|g;
411
            $itemfields{$f} = 1;
416
            $itemfields{$f} = 1;
412
        }
417
        }
413
    }
418
    }
414
419
415
    #item has a host number if its biblio number does not match the current bib
420
    #item has a host number if its biblio number does not match the current bib
416
421
417
    if ($item->{biblionumber} ne $biblionumber){
422
    if ($item->biblionumber ne $biblionumber){
418
        $item->{hostbiblionumber} = $item->{biblionumber};
423
        $item_info->{hostbiblionumber} = $item->biblionumber;
419
        $item->{hosttitle} = GetBiblioData($item->{biblionumber})->{title};
424
        $item_info->{hosttitle} = $item->biblio->title;
420
    }
425
    }
421
	
426
422
427
423
    if ( $analyze ) {
428
    if ( $analyze ) {
424
        # count if item is used in analytical bibliorecords
429
        # count if item is used in analytical bibliorecords
Lines 426-490 foreach my $item (@items) { Link Here
426
        my $countanalytics = GetAnalyticsCount( $item->{itemnumber} );
431
        my $countanalytics = GetAnalyticsCount( $item->{itemnumber} );
427
        if ($countanalytics > 0){
432
        if ($countanalytics > 0){
428
            $analytics_flag=1;
433
            $analytics_flag=1;
429
            $item->{countanalytics} = $countanalytics;
434
            $item_info->{countanalytics} = $countanalytics;
430
        }
435
        }
431
    }
436
    }
432
437
433
    if (defined($item->{'materials'}) && $item->{'materials'} =~ /\S/){
438
    if (defined($item->materials) && $item->materials =~ /\S/){
434
        $materials_flag = 1;
439
        $materials_flag = 1;
435
        if (defined $materials_map{ $item->{materials} }) {
440
        if (defined $materials_map{ $item->materials }) {
436
            $item->{materials} = $materials_map{ $item->{materials} };
441
            $item_info->{materials} = $materials_map{ $item->materials };
437
        }
442
        }
438
    }
443
    }
439
444
440
    if ( C4::Context->preference('UseCourseReserves') ) {
445
    if ( C4::Context->preference('UseCourseReserves') ) {
441
        $item->{'course_reserves'} = GetItemCourseReservesInfo( itemnumber => $item->{'itemnumber'} );
446
        $item_info->{'course_reserves'} = GetItemCourseReservesInfo( itemnumber => $item->itemnumber );
442
    }
443
444
    if ( C4::Context->preference('IndependentBranches') ) {
445
        my $userenv = C4::Context->userenv();
446
        if ( not C4::Context->IsSuperLibrarian()
447
            and $userenv->{branch} ne $item->{homebranch} ) {
448
            $item->{cannot_be_edited} = 1;
449
        }
450
    }
447
    }
451
448
452
    if ( C4::Context->preference("LocalCoverImages") == 1 ) {
449
    if ( C4::Context->preference("LocalCoverImages") == 1 ) {
453
        $item->{cover_images} = $item_object->cover_images;
450
        $item_info->{cover_images} = $item->cover_images;
454
    }
451
    }
455
452
456
    if ( C4::Context->preference('UseRecalls') ) {
453
    if ( C4::Context->preference('UseRecalls') ) {
457
        my $recall = Koha::Recalls->find({ item_id => $item->{itemnumber}, completed => 0 });
454
        $item_info->{recall} = $item->recall;
458
        if ( defined $recall ) {
455
    }
459
            $item->{recalled} = 1;
456
460
            $item->{recall} = $recall;
457
    if ( C4::Context->preference('IndependentBranches') ) {
458
        my $userenv = C4::Context->userenv();
459
        if ( not C4::Context->IsSuperLibrarian()
460
            and $userenv->{branch} ne $item->homebranch ) {
461
            $item_info->{cannot_be_edited} = 1;
462
            $item_info->{not_same_branch} = 1;
461
        }
463
        }
462
    }
464
    }
463
465
464
    if ( $item_object->is_bundle ) {
466
    if ( $item->is_bundle ) {
465
        $item->{bundled} =
467
        $item_info->{bundled} =
466
          $item_object->bundle_items->search( { itemlost => { '!=' => 0 } } )
468
          $item->bundle_items->search( { itemlost => { '!=' => 0 } } )
467
          ->count;
469
          ->count;
468
        $item->{bundled_lost} =
470
        $item_info->{bundled_lost} =
469
          $item_object->bundle_items->search( { itemlost => 0 } )->count;
471
          $item->bundle_items->search( { itemlost => 0 } )->count;
470
        $item->{is_bundle} = 1;
472
        $item_info->{is_bundle} = 1;
471
    }
473
    }
472
474
473
    if ($item_object->in_bundle) {
475
    if ($item->in_bundle) {
474
        $item->{bundle_host} = $item_object->bundle_host;
476
        $item_info->{bundle_host} = $item->bundle_host;
475
    }
477
    }
476
478
477
    if ($currentbranch and C4::Context->preference('SeparateHoldings')) {
479
    if ($currentbranch and C4::Context->preference('SeparateHoldings')) {
478
        if ($itembranchcode and $itembranchcode eq $currentbranch) {
480
        if ($itembranchcode and $itembranchcode eq $currentbranch) {
479
            push @itemloop, $item;
481
            push @itemloop, $item_info;
480
            $itemloop_has_images++ if $item_object->cover_images->count;
482
            $itemloop_has_images++ if $item->cover_images->count;
481
        } else {
483
        } else {
482
            push @otheritemloop, $item;
484
            push @otheritemloop, $item_info;
483
            $otheritemloop_has_images++ if $item_object->cover_images->count;
485
            $otheritemloop_has_images++ if $item->cover_images->count;
484
        }
486
        }
485
    } else {
487
    } else {
486
        push @itemloop, $item;
488
        push @itemloop, $item_info;
487
        $itemloop_has_images++ if $item_object->cover_images->count;
489
        $itemloop_has_images++ if $item->cover_images->count;
488
    }
490
    }
489
}
491
}
490
492
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-28 / +31 lines)
Lines 397-409 Link Here
397
397
398
                    [% IF ( item_level_itypes ) %]
398
                    [% IF ( item_level_itypes ) %]
399
                        <td class="itype">
399
                        <td class="itype">
400
                            [% IF !noItemTypeImages && item.imageurl %]
400
                            [% SET itemtype = item.itemtype %]
401
                                <img src="[% item.imageurl | html %]" alt="[% item.translated_description | html %]" title="[% item.translated_description | html %]" />
401
                            [% IF !noItemTypeImages && itemtype.image_location %]
402
                                <img src="[% itemtype.image_location | html %]" alt="[% itemtype.translated_description | html %]" title="[% itemtype.translated_description | html %]" />
402
                            [% END %]
403
                            [% END %]
403
                            <span class="itypedesc">[% item.translated_description | html %]</span>
404
                            <span class="itypedesc">[% itemtype.translated_description | html %]</span>
404
                        </td>
405
                        </td>
405
                    [% END %]
406
                    [% END %]
406
                    <td class="location">[% UNLESS ( singlebranchmode ) %][% Branches.GetName( item.branchcode ) | html %] [% END %]</td>
407
                    <td class="location">[% UNLESS ( singlebranchmode ) %][% Branches.GetName( item.holdingbranch ) | html %] [% END %]</td>
407
                    <td class="homebranch">
408
                    <td class="homebranch">
408
                        <span class="homebranchdesc">[% Branches.GetName(item.homebranch) | html %]</span>
409
                        <span class="homebranchdesc">[% Branches.GetName(item.homebranch) | html %]</span>
409
                        <span class="shelvingloc">
410
                        <span class="shelvingloc">
Lines 426-450 Note that permanent location is a code, and location may be an authval. Link Here
426
                    [% IF Koha.Preference('EnableItemGroups') %]<td class="item_group">[% item.object.item_group.description | html %]</td>[% END %]
427
                    [% IF Koha.Preference('EnableItemGroups') %]<td class="item_group">[% item.object.item_group.description | html %]</td>[% END %]
427
                    <td class="itemcallnumber">[% IF ( item.itemcallnumber ) %] [% item.itemcallnumber | html %][% END %]</td>
428
                    <td class="itemcallnumber">[% IF ( item.itemcallnumber ) %] [% item.itemcallnumber | html %][% END %]</td>
428
                    [% IF ( volinfo ) %]
429
                    [% IF ( volinfo ) %]
430
                        [% SET serial = item.itemserial.serial %]
429
                        [% IF itemdata_publisheddate #If there is at least one published date, use it for sorting %]
431
                        [% IF itemdata_publisheddate #If there is at least one published date, use it for sorting %]
430
                            <td class="enumchron" data-order="[% item.publisheddate | html %]">
432
                            <td class="enumchron" data-order="[% serial.publisheddate | html %]">
431
                        [% ELSE %]
433
                        [% ELSE %]
432
                            <td class="enumchron">
434
                            <td class="enumchron">
433
                        [% END %]
435
                        [% END %]
434
                            [% IF ( itemdata_enumchron ) %]
436
                            [% IF ( itemdata_enumchron ) %]
435
                                [% IF item.enumchron && item.serialseq %]
437
                                [% IF item.enumchron && serial.serialseq %]
436
                                    <span class="enum">[% item.enumchron | html %]</span>
438
                                    <span class="enum">[% item.enumchron | html %]</span>
437
                                    [% IF ( item.serialseq && item.enumchron!=item.serialseq ) %]
439
                                    [% IF ( item.serialseq && item.enumchron != serial.serialseq ) %]
438
                                        <span class="sep"> -- </span>
440
                                        <span class="sep"> -- </span>
439
                                        <span class="serialseq">[% item.serialseq | html %]</span>
441
                                        <span class="serialseq">[% serial.serialseq | html %]</span>
440
                                    [% END %]
442
                                    [% END %]
441
                                [% ELSIF item.enumchron %]
443
                                [% ELSIF item.enumchron %]
442
                                    <span class="enum">[% item.enumchron | html %]</span>
444
                                    <span class="enum">[% item.enumchron | html %]</span>
443
                                [% ELSIF item.serialseq %]
445
                                [% ELSIF item.serialseq %]
444
                                    <span class="serialseq">[% item.serialseq | html %]</span>
446
                                    <span class="serialseq">[% serial.serialseq | html %]</span>
445
                                [% END %]
447
                                [% END %]
446
                                [% IF ( item.publisheddate ) %]
448
                                [% IF serial.publisheddate %]
447
                                    <span class="pubdate">([% item.publisheddate | $KohaDates %])</span>
449
                                    <span class="pubdate">([% serial.publisheddate | $KohaDates %])</span>
448
                                [% END %]
450
                                [% END %]
449
                            [% END %]
451
                            [% END %]
450
                            </span>
452
                            </span>
Lines 452-472 Note that permanent location is a code, and location may be an authval. Link Here
452
                    [% END %]
454
                    [% END %]
453
                    <td class="status">
455
                    <td class="status">
454
456
455
                        [% IF item.CheckedOutFor %]
457
                        [% IF item.checkout %]
456
                          [% IF item.onsite_checkout %]
458
                          [% IF item.checkout.onsite_checkout %]
457
                            <span>Currently in local use
459
                            <span>Currently in local use
458
                          [% ELSE %]
460
                          [% ELSE %]
459
                            <span class="datedue">Checked out
461
                            <span class="datedue">Checked out
460
                          [% END %]
462
                          [% END %]
461
                                [% UNLESS ( item.NOTSAMEBRANCH ) %]
463
                                [% UNLESS ( item.not_same_branch) %]
462
                                  [% IF item.onsite_checkout %]
464
                                  [% IF item.checkout.onsite_checkout %]
463
                                    by
465
                                    by
464
                                  [% ELSE %]
466
                                  [% ELSE %]
465
                                    to
467
                                    to
466
                                  [% END %]
468
                                  [% END %]
467
                                  [% INCLUDE 'patron-title.inc' patron=item.CheckedOutFor hide_patron_infos_if_needed=1 %]
469
                                  [% INCLUDE 'patron-title.inc' patron=item.checkout.patron hide_patron_infos_if_needed=1 %]
468
                                [% END %]
470
                                [% END %]
469
                                : due [% item.datedue | html %]
471
                                : due [% item.checkout.date_due | $KohaDates as_due_date => 1 %]
470
                            </span>
472
                            </span>
471
                        [% ELSIF ( item.transfertwhen ) %]
473
                        [% ELSIF ( item.transfertwhen ) %]
472
                            <span class="intransit">In transit from [% Branches.GetName( item.transfertfrom ) | html %] to [% Branches.GetName( item.transfertto ) | html %] since [% item.transfertwhen | $KohaDates %]</span>
474
                            <span class="intransit">In transit from [% Branches.GetName( item.transfertfrom ) | html %] to [% Branches.GetName( item.transfertto ) | html %] since [% item.transfertwhen | $KohaDates %]</span>
Lines 508-517 Note that permanent location is a code, and location may be an authval. Link Here
508
                            [% END %]
510
                            [% END %]
509
                        [% END %]
511
                        [% END %]
510
512
511
                        [% IF ( item.itemnotforloan || item.notforloan_per_itemtype ) %]
513
                        [% IF ( item.notforloan || item.itemtype.notforloan ) %]
512
                            <span class="notforloan">Not for loan
514
                            <span class="notforloan">Not for loan
513
                            [% IF ( item.notforloanvalue ) %]
515
                            [% SET not_for_loan_description = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => item.notforloan ) %]
514
                                <span class="reason">([% item.notforloanvalue | html %])</span>
516
                            [% IF not_for_loan_description %]
517
                                <span class="reason">([% not_for_loan_description | html %])</span>
515
                            [% END %]
518
                            [% END %]
516
                            </span>
519
                            </span>
517
                        [% END %]
520
                        [% END %]
Lines 529-549 Note that permanent location is a code, and location may be an authval. Link Here
529
                            [% END %]
532
                            [% END %]
530
                        [% END %]
533
                        [% END %]
531
534
532
                        [% IF item.recalled %]
535
                        [% SET recall = item.recall %]
533
                            [% IF item.recall.waiting_date %]
536
                        [% IF recall %]
534
                                <span>Waiting at [% Branches.GetName( item.recall.pickup_library_id ) | html %] since [% item.recall.waiting_date | $KohaDates %]</span>
537
                            [% IF recall.waiting_date %]
538
                                <span>Waiting at [% Branches.GetName( recall.pickup_library_id ) | html %] since [% recall.waiting_date | $KohaDates %]</span>
535
                            [% ELSE %]
539
                            [% ELSE %]
536
                                [% patron_link = BLOCK %]<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>[% END %]
540
                                [% patron_link = BLOCK %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% recall.patron_id | uri %]">[% recall.patron.firstname | html %] [% recall.patron.surname | html %] ([% recall.patron.cardnumber | html %])</a>[% END %]
537
                                <span>Item recalled by [% patron_link| $raw %] on [% item.recall.created_date | $KohaDates %]</span>
541
                                <span>recalled by [% patron_link| $raw %] on [% recall.created_date | $KohaDates %]</span>
538
                            [% END %]
542
                            [% END %]
539
                        [% END %]
543
                        [% END %]
540
544
541
                        [% UNLESS ( item.itemnotforloan || item.notforloan_per_itemtype || item.onloan || item.itemlost || item.withdrawn || item.damaged || item.transfertwhen || hold || item.recalled ) %]
545
                        [% UNLESS ( item.itemnotforloan || item.notforloan_per_itemtype || item.onloan || item.itemlost || item.withdrawn || item.damaged || item.transfertwhen || hold || ( Koha.Preference('UseRecalls') && recall ) ) %]
542
                            <span>Available</span>
546
                            <span>Available</span>
543
                        [% END %]
547
                        [% END %]
544
548
545
                        [% IF ( item.restricted ) %]
549
                        [% IF ( item.restricted ) %]
546
                            <span class="restricted">([% item.restrictedvalue | html %])</span>
550
                            <span class="restricted">([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.restricted', authorised_value => item.restricted ) | html %])</span>
547
                        [% END %]
551
                        [% END %]
548
552
549
                        [% IF ( item.bundle_host ) %]
553
                        [% IF ( item.bundle_host ) %]
550
- 

Return to bug 27272