use C4::Items;
use C4::Circulation;
use C4::Tags qw(get_tags);
-use C4::XISBN qw(get_xisbns get_biblionumber_from_isbn);
+use C4::XISBN qw(get_xisbns);
use C4::External::Amazon;
use C4::External::Syndetics qw(get_syndetics_index get_syndetics_summary get_syndetics_toc get_syndetics_excerpt get_syndetics_reviews get_syndetics_anotes );
use C4::Members;
use Koha::Biblios;
use Koha::RecordProcessor;
use Koha::AuthorisedValues;
+use Koha::IssuingRules;
+use Koha::Items;
use Koha::ItemTypes;
use Koha::Acquisition::Orders;
use Koha::Virtualshelves;
}
my $OpacBrowseResults = C4::Context->preference("OpacBrowseResults");
-$template->{VARS}->{'OpacBrowseResults'} = $OpacBrowseResults;
# We look for the busc param to build the simple paging from the search
if ($OpacBrowseResults) {
}
} else {
for my $value (@{$arrParamsBusc->{$_}}) {
+ next if !defined($value);
$pasarParams .= '&' if ($j);
$pasarParams .= $_ . '=' . Encode::decode('UTF-8', uri_escape_utf8($value));
$j++;
}
$template->param('listResults' => \@listResults) if (@listResults);
$template->param('indexPag' => 1 + $offset, 'totalPag' => $arrParamsBusc{'total'}, 'indexPagEnd' => scalar(@arrBiblios) + $offset);
+ $template->param( 'offset' => $offset );
}
}
$cell{latestserials} =
GetLatestSerials( $subscription->{subscriptionid}, $serials_to_display );
if ( $borrowernumber ) {
- my $sub = getalert($borrowernumber,'issue',$subscription->{subscriptionid});
- if (@$sub[0]) {
- $cell{hasalert} = 1;
- }
+ my $subscription_object = Koha::Subscriptions->find( $subscription->{subscriptionid} );
+ my $subscriber = $subscription_object->subscribers->find( $borrowernumber );
+ $cell{hasalert} = 1 if $subscriber;
}
push @subs, \%cell;
}
} else {
my $patron = Koha::Patrons->find( $borrowernumber );
for my $itm (@items) {
+ my $item = Koha::Items->find( $itm->{itemnumber} );
$itm->{holds_count} = $item_reserves{ $itm->{itemnumber} };
$itm->{priority} = $priority{ $itm->{itemnumber} };
$norequests = 0
&& !$itemtypes->{$itm->{'itype'}}->{notforloan}
&& $itm->{'itemnumber'};
- $allow_onshelf_holds = C4::Reserves::OnShelfHoldsAllowed( $itm, ( $patron ? $patron->unblessed : {} ) )
+ $allow_onshelf_holds = Koha::IssuingRules->get_onshelfholds_policy( { item => $item, patron => $patron } )
unless $allow_onshelf_holds;
# get collection code description, too
}
}
-if( $allow_onshelf_holds || CountItemsIssued($biblionumber) || $biblio->hasItemswaitingOrInTransit ) {
+if( $allow_onshelf_holds || CountItemsIssued($biblionumber) || $biblio->has_items_waiting_or_intransit ) {
$template->param( ReservableItems => 1 );
}
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 )
+ : Koha::ItemTypes->find($biblio->itemtype)->may_article_request;
+ $template->param( artreqpossible => $artreqpossible );
+}
+
$template->param(
MARCNOTES => $marcnotesarray,
norequests => $norequests,
}
}
for my $review (@$reviews) {
- my $patron = Koha::Patrons->find( $review->{borrowernumber} );
+ my $patron = Koha::Patrons->find( $review->{borrowernumber} ); # FIXME Should be Koha::Review->reviewer or similar
# setting some borrower info into this hash
if ( $patron ) {
{
$template->param(
BakerTaylorContentURL =>
- sprintf("http://contentcafe2.btol.com/ContentCafeClient/ContentCafe.aspx?UserID=%s&Password=%s&ItemKey=%s&Options=Y",
+ sprintf("https://contentcafe2.btol.com/ContentCafeClient/ContentCafe.aspx?UserID=%s&Password=%s&ItemKey=%s&Options=Y",
$bt_user,$bt_pass,$isbn)
);
}