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

(-)a/catalogue/detail.pl (-77 / +92 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->unblessed } };
193
194
194
my $dbh = C4::Context->dbh;
195
my $all_items = $biblio->items(
195
196
    {},
196
my @all_items = GetItemsInfo( $biblionumber );
197
    {
198
        # FIXME A different order is expected if at least one items.serial is true
199
        order_by => [
200
            'homebranch.branchname',
201
            'me.enumchron',
202
            \"LDAP( me.copynumber, 8, '0' )",
203
            -asc => 'me.dateacessioned'
204
        ],
205
        join => ['homebranch']
206
    }
207
);
197
my @items;
208
my @items;
198
my $patron = Koha::Patrons->find( $borrowernumber );
209
my $patron = Koha::Patrons->find( $borrowernumber );
199
for my $itm (@all_items) {
210
while ( my $item = $all_items->next ) {
200
    push @items, $itm unless ( $itm->{itemlost} && $patron->category->hidelostitems && !$showallitems);
211
    push @items, $item
212
      unless $item->itemlost
213
      && $patron->category->hidelostitems
214
      && !$showallitems;
201
}
215
}
202
216
203
# flag indicating existence of at least one item linked via a host record
217
# flag indicating existence of at least one item linked via a host record
204
my $hostrecords;
218
my $hostrecords;
205
# adding items linked via host biblios
219
# adding items linked via host biblios
206
my @hostitems = GetHostItemsInfo($marc_record);
220
my $hostitems = $biblio->host_items;
207
if (@hostitems){
221
if ( $hostitems->count ) {
208
    $hostrecords =1;
222
    $hostrecords = 1;
209
    push (@items,@hostitems);
223
    push @items, $hostitems->as_list;
210
}
224
}
211
225
212
my $dat = &GetBiblioData($biblionumber);
226
my $dat = &GetBiblioData($biblionumber);
Lines 320-328 if ( defined $dat->{'itemtype'} ) { Link Here
320
    $dat->{imageurl} = getitemtypeimagelocation( 'intranet', $itemtypes->{ $dat->{itemtype} }{imageurl} );
334
    $dat->{imageurl} = getitemtypeimagelocation( 'intranet', $itemtypes->{ $dat->{itemtype} }{imageurl} );
321
}
335
}
322
336
323
$dat->{'count'} = scalar @all_items + @hostitems;
337
$dat->{'count'} = $all_items->count + $hostitems->count;
324
$dat->{'showncount'} = scalar @items + @hostitems;
338
$dat->{'showncount'} = scalar @items + $hostitems->count;
325
$dat->{'hiddencount'} = scalar @all_items + @hostitems - scalar @items;
339
$dat->{'hiddencount'} = $all_items->count + $hostitems->count - scalar @items;
326
340
327
my $shelflocations =
341
my $shelflocations =
328
  { map { $_->{authorised_value} => $_->{lib} } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => $fw, kohafield => 'items.location' } ) };
342
  { 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
}
378
}
365
my $separatebranch = C4::Context->preference('SeparateHoldingsBranch') || 'homebranch';
379
my $separatebranch = C4::Context->preference('SeparateHoldingsBranch') || 'homebranch';
366
my ( $itemloop_has_images, $otheritemloop_has_images );
380
my ( $itemloop_has_images, $otheritemloop_has_images );
367
foreach my $item (@items) {
368
    my $itembranchcode = $item->{$separatebranch};
369
381
370
    $item->{imageurl} = defined $item->{itype} ? getitemtypeimagelocation('intranet', $itemtypes->{ $item->{itype} }{imageurl})
382
foreach my $item (@items) {
371
                                               : '';
383
    my $itembranchcode = $item->$separatebranch;
372
384
373
    $item->{datedue} = format_sqldatetime($item->{datedue});
385
    my $item_info = $item->unblessed;
386
    $item_info->{itemtype} = $itemtypes->{$item->effective_itemtype};
374
387
375
    #get shelf location and collection code description if they are authorised value.
388
    #get shelf location and collection code description if they are authorised value.
376
    # same thing for copy number
389
    # same thing for copy number
377
    my $shelfcode = $item->{'location'};
390
    my $shelfcode = $item->location;
378
    $item->{'location'} = $shelflocations->{$shelfcode} if ( defined( $shelfcode ) && defined($shelflocations) && exists( $shelflocations->{$shelfcode} ) );
391
    $item_info->{'location'} = $shelflocations->{$shelfcode} if ( defined( $shelfcode ) && defined($shelflocations) && exists( $shelflocations->{$shelfcode} ) );
379
    my $ccode = $item->{'ccode'};
392
    my $ccode = $item->ccode;
380
    $item->{'ccode'} = $collections->{$ccode} if ( defined( $ccode ) && defined($collections) && exists( $collections->{$ccode} ) );
393
    $item_info->{'ccode'} = $collections->{$ccode} if ( defined( $ccode ) && defined($collections) && exists( $collections->{$ccode} ) );
381
    my $copynumber = $item->{'copynumber'};
394
    my $copynumber = $item->{'copynumber'};
382
    $item->{'copynumber'} = $copynumbers->{$copynumber} if ( defined($copynumber) && defined($copynumbers) && exists( $copynumbers->{$copynumber} ) );
395
    $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
396
    foreach (qw(ccode enumchron copynumber stocknumber itemnotes itemnotes_nonpublic uri )) {
384
        $itemfields{$_} = 1 if ( $item->{$_} );
397
        $itemfields{$_} = 1 if $item->$_;
385
    }
398
    }
386
399
400
    # FIXME The following must be Koha::Item->serial
401
    my $serial_item = Koha::Serial::Items->find($item->itemnumber);
402
    if ( $serial_item ) {
403
        $item_info->{serial} = $serial_item;
404
        $itemfields{publisheddate} = 1;
405
    }
406
407
    $item_info->{object} = $item;
408
387
    # checking for holds
409
    # checking for holds
388
    my $item_object = Koha::Items->find( $item->{itemnumber} );
410
    my $holds = $item->current_holds;
389
    $item->{object} = $item_object;
390
    my $holds = $item_object->current_holds;
391
    if ( my $first_hold = $holds->next ) {
411
    if ( my $first_hold = $holds->next ) {
392
        $item->{first_hold} = $first_hold;
412
        $item_info->{first_hold} = $first_hold;
393
    }
413
    }
394
414
395
    if ( my $checkout = $item_object->checkout ) {
415
    $item_info->{checkout} = $item->checkout;
396
        $item->{CheckedOutFor} = $checkout->patron;
397
    }
398
416
399
    # Check the transit status
417
    # Check the transit status
400
    my ( $transfertwhen, $transfertfrom, $transfertto ) = GetTransfers($item->{itemnumber});
418
    my $transfer = $item->get_transfer;
401
    if ( defined( $transfertwhen ) && ( $transfertwhen ne '' ) ) {
419
    if ( $transfer ) {
402
        $item->{transfertwhen} = $transfertwhen;
420
        $item_info->{transfertwhen} = $transfer->datesent;
403
        $item->{transfertfrom} = $transfertfrom;
421
        $item_info->{transfertfrom} = $transfer->frombranch;
404
        $item->{transfertto}   = $transfertto;
422
        $item_info->{transfertto}   = $transfer->tobranch;
405
        $item->{nocancel} = 1;
423
        $item_info->{nocancel} = 1;
406
    }
424
    }
407
425
408
    foreach my $f (qw( itemnotes )) {
426
    foreach my $f (qw( itemnotes )) {
409
        if ($item->{$f}) {
427
        if ($item_info->{$f}) {
410
            $item->{$f} =~ s|\n|<br />|g;
428
            $item_info->{$f} =~ s|\n|<br />|g;
411
            $itemfields{$f} = 1;
429
            $itemfields{$f} = 1;
412
        }
430
        }
413
    }
431
    }
414
432
415
    #item has a host number if its biblio number does not match the current bib
433
    #item has a host number if its biblio number does not match the current bib
416
434
417
    if ($item->{biblionumber} ne $biblionumber){
435
    if ($item->biblionumber ne $biblionumber){
418
        $item->{hostbiblionumber} = $item->{biblionumber};
436
        $item_info->{hostbiblionumber} = $item->biblionumber;
419
        $item->{hosttitle} = GetBiblioData($item->{biblionumber})->{title};
437
        $item_info->{hosttitle} = $item->biblio->title;
420
    }
438
    }
421
	
439
422
440
423
    if ( $analyze ) {
441
    if ( $analyze ) {
424
        # count if item is used in analytical bibliorecords
442
        # count if item is used in analytical bibliorecords
Lines 426-490 foreach my $item (@items) { Link Here
426
        my $countanalytics = GetAnalyticsCount( $item->{itemnumber} );
444
        my $countanalytics = GetAnalyticsCount( $item->{itemnumber} );
427
        if ($countanalytics > 0){
445
        if ($countanalytics > 0){
428
            $analytics_flag=1;
446
            $analytics_flag=1;
429
            $item->{countanalytics} = $countanalytics;
447
            $item_info->{countanalytics} = $countanalytics;
430
        }
448
        }
431
    }
449
    }
432
450
433
    if (defined($item->{'materials'}) && $item->{'materials'} =~ /\S/){
451
    if (defined($item->materials) && $item->materials =~ /\S/){
434
        $materials_flag = 1;
452
        $materials_flag = 1;
435
        if (defined $materials_map{ $item->{materials} }) {
453
        if (defined $materials_map{ $item->materials }) {
436
            $item->{materials} = $materials_map{ $item->{materials} };
454
            $item_info->{materials} = $materials_map{ $item->materials };
437
        }
455
        }
438
    }
456
    }
439
457
440
    if ( C4::Context->preference('UseCourseReserves') ) {
458
    if ( C4::Context->preference('UseCourseReserves') ) {
441
        $item->{'course_reserves'} = GetItemCourseReservesInfo( itemnumber => $item->{'itemnumber'} );
459
        $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
    }
460
    }
451
461
452
    if ( C4::Context->preference("LocalCoverImages") == 1 ) {
462
    if ( C4::Context->preference("LocalCoverImages") == 1 ) {
453
        $item->{cover_images} = $item_object->cover_images;
463
        $item_info->{cover_images} = $item->cover_images;
454
    }
464
    }
455
465
456
    if ( C4::Context->preference('UseRecalls') ) {
466
    if ( C4::Context->preference('UseRecalls') ) {
457
        my $recall = Koha::Recalls->find({ item_id => $item->{itemnumber}, completed => 0 });
467
        $item_info->{recall} = $item->recall;
458
        if ( defined $recall ) {
468
    }
459
            $item->{recalled} = 1;
469
460
            $item->{recall} = $recall;
470
    if ( C4::Context->preference('IndependentBranches') ) {
471
        my $userenv = C4::Context->userenv();
472
        if ( not C4::Context->IsSuperLibrarian()
473
            and $userenv->{branch} ne $item->homebranch ) {
474
            $item_info->{cannot_be_edited} = 1;
475
            $item_info->{not_same_branch} = 1;
461
        }
476
        }
462
    }
477
    }
463
478
464
    if ( $item_object->is_bundle ) {
479
    if ( $item->is_bundle ) {
465
        $item->{bundled} =
480
        $item_info->{bundled} =
466
          $item_object->bundle_items->search( { itemlost => { '!=' => 0 } } )
481
          $item->bundle_items->search( { itemlost => { '!=' => 0 } } )
467
          ->count;
482
          ->count;
468
        $item->{bundled_lost} =
483
        $item_info->{bundled_lost} =
469
          $item_object->bundle_items->search( { itemlost => 0 } )->count;
484
          $item->bundle_items->search( { itemlost => 0 } )->count;
470
        $item->{is_bundle} = 1;
485
        $item_info->{is_bundle} = 1;
471
    }
486
    }
472
487
473
    if ($item_object->in_bundle) {
488
    if ($item->in_bundle) {
474
        $item->{bundle_host} = $item_object->bundle_host;
489
        $item_info->{bundle_host} = $item->bundle_host;
475
    }
490
    }
476
491
477
    if ($currentbranch and C4::Context->preference('SeparateHoldings')) {
492
    if ($currentbranch and C4::Context->preference('SeparateHoldings')) {
478
        if ($itembranchcode and $itembranchcode eq $currentbranch) {
493
        if ($itembranchcode and $itembranchcode eq $currentbranch) {
479
            push @itemloop, $item;
494
            push @itemloop, $item_info;
480
            $itemloop_has_images++ if $item_object->cover_images->count;
495
            $itemloop_has_images++ if $item->cover_images->count;
481
        } else {
496
        } else {
482
            push @otheritemloop, $item;
497
            push @otheritemloop, $item_info;
483
            $otheritemloop_has_images++ if $item_object->cover_images->count;
498
            $otheritemloop_has_images++ if $item->cover_images->count;
484
        }
499
        }
485
    } else {
500
    } else {
486
        push @itemloop, $item;
501
        push @itemloop, $item_info;
487
        $itemloop_has_images++ if $item_object->cover_images->count;
502
        $itemloop_has_images++ if $item->cover_images->count;
488
    }
503
    }
489
}
504
}
490
505
(-)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.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