return try {
my $items_rs = $biblio->items;
# FIXME Do we always need host_items => 1 or depending on a flag?
# FIXME Should we prefetch => ['issue','branchtransfer']?
my $items_rs = $biblio->items( { host_items => 1 } )->search( {}, { join => 'biblioitem' } ) );
$items_rs = $items_rs->filter_by_bookable if $bookable_only;
# FIXME We need to order_by serial.publisheddate if we have _order_by=+me.serial_issue_number
my $items = $c->objects->search($items_rs);
return $c->render(
status => 200,
openapi => $items
},
[% IF ( hostrecords ) %]
{
data: "",
data: "biblio.biblio_id",
searchable: false, // FIXME
orderable: true,
render: function (data, type, row, meta) {
return ""; // FIXME Display host title with link
if ( row.biblio_id == [% biblio.biblionumber %] ) return "";
return '<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=%s>%s</a>'.format(row.biblio_id, row.biblio.title);
}
[% END %]
-