Bug 30976: Display biblio's cover images first

If one add cover images at item's level, then biblio level, the cover images
of the items are displayed first on the main "cover slider" at the top of the page.
We should displayed biblio cover images first, then the ones for the items.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6c55159eb6)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2022-06-16 12:33:31 +02:00 committed by Lucas Gass
parent d3ccef678a
commit 9938f61403
1 changed files with 5 additions and 1 deletions

View File

@ -556,7 +556,11 @@ if (C4::Context->preference("FRBRizeEditions")==1) {
if ( C4::Context->preference("LocalCoverImages") == 1 ) {
my $images = $biblio->cover_images;
$template->param( localimages => $biblio->cover_images );
$template->param(
localimages => $biblio->cover_images->search(
{}, { order_by => [ \"COALESCE(itemnumber, 0, 1)", 'timestamp' ] }
),
);
}
# HTML5 Media