Lines 785-798
if (scalar(@itemloop) == 0 || scalar(@otheritemloop) == 0) {
Link Here
|
785 |
|
785 |
|
786 |
my $marcnotesarray = $biblio->get_marc_notes({ marcflavour => $marcflavour, opac => 1 }); |
786 |
my $marcnotesarray = $biblio->get_marc_notes({ marcflavour => $marcflavour, opac => 1 }); |
787 |
|
787 |
|
788 |
if( C4::Context->preference('ArticleRequests') ) { |
788 |
if ( C4::Context->preference('ArticleRequests') ) { |
789 |
my $patron = $borrowernumber ? Koha::Patrons->find($borrowernumber) : undef; |
789 |
|
790 |
my $itemtype = Koha::ItemTypes->find($biblio->itemtype); |
790 |
my $artreqpossible; |
791 |
my $artreqpossible = $patron |
791 |
|
792 |
? $biblio->can_article_request( $patron ) |
792 |
if ( $patron && $patron->can_article_request ) { |
793 |
: $itemtype |
793 |
$artreqpossible = $biblio->can_article_request($patron); |
794 |
? $itemtype->may_article_request |
794 |
} |
795 |
: q{}; |
795 |
else { |
|
|
796 |
my $item_type = Koha::ItemTypes->find( $biblio->itemtype ); |
797 |
$artreqpossible = defined $item_type && $item_type->may_article_request; |
798 |
} |
799 |
|
796 |
$template->param( artreqpossible => $artreqpossible ); |
800 |
$template->param( artreqpossible => $artreqpossible ); |
797 |
} |
801 |
} |
798 |
|
802 |
|
799 |
- |
|
|