@@ -, +, @@ and one that should not (respecting branch, patron, item type). the first biblio and hidden for the second biblio. --- koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc | 2 +- opac/opac-ISBDdetail.pl | 7 +++++++ opac/opac-MARCdetail.pl | 7 +++++++ opac/opac-detail.pl | 8 ++++++++ 4 files changed, 23 insertions(+), 1 deletion(-) --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc +++ a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc @@ -13,7 +13,7 @@
  • Print
  • [% IF Koha.Preference( 'opacuserlogin' ) == 1 %] - [% IF Koha.Preference('ArticleRequests') %] + [% IF artreqpossible %]
  • Request article
  • [% END %] [% END %] --- a/opac/opac-ISBDdetail.pl +++ a/opac/opac-ISBDdetail.pl @@ -217,4 +217,11 @@ if (my $search_for_title = C4::Context->preference('OPACSearchForTitleIn')){ $template->param('OPACSearchForTitleIn' => $search_for_title); } +if( C4::Context->preference('ArticleRequests') ) { + my $artreqpossible = $patron + ? $biblio->can_article_request( $patron ) + : $biblio->may_article_request; + $template->param( artreqpossible => $artreqpossible ); +} + output_html_with_http_headers $query, $cookie, $template->output; --- a/opac/opac-MARCdetail.pl +++ a/opac/opac-MARCdetail.pl @@ -349,6 +349,13 @@ if (my $search_for_title = C4::Context->preference('OPACSearchForTitleIn')){ $template->param('OPACSearchForTitleIn' => $search_for_title); } +if( C4::Context->preference('ArticleRequests') ) { + my $artreqpossible = $patron + ? $biblio->can_article_request( $patron ) + : $biblio->may_article_request; + $template->param( artreqpossible => $artreqpossible ); +} + $template->param( item_loop => \@item_loop, item_header_loop => \@item_header_loop, --- a/opac/opac-detail.pl +++ a/opac/opac-detail.pl @@ -756,6 +756,14 @@ if (!C4::Context->preference("OPACXSLTDetailsDisplay") ) { my $marcnotesarray = GetMarcNotes ($record,$marcflavour); my $subtitle = GetRecordValue('subtitle', $record, GetFrameworkCode($biblionumber)); +if( C4::Context->preference('ArticleRequests') ) { + my $patron = $borrowernumber ? Koha::Patrons->find($borrowernumber) : undef; + my $artreqpossible = $patron + ? $biblio->can_article_request( $patron ) + : $biblio->may_article_request; + $template->param( artreqpossible => $artreqpossible ); +} + $template->param( MARCNOTES => $marcnotesarray, norequests => $norequests, --