Bug 32680 - Add hooks to allow cover images to be provided by plugins
Summary: Add hooks to allow cover images to be provided by plugins
Status: Needs documenting
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Matt Blenkinsop
QA Contact: Testopia
URL:
Keywords:
: 19044 (view as bug list)
Depends on:
Blocks: 19044
  Show dependency treegraph
 
Reported: 2023-01-19 11:10 UTC by Matt Blenkinsop
Modified: 2024-03-17 22:02 UTC (History)
12 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00


Attachments
Bug 32680: Add hooks to allow cover art to come from plugins (12.27 KB, patch)
2023-01-19 11:35 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 32680: Add hooks to allow cover art to come from plugins (12.27 KB, patch)
2023-01-19 11:42 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 32680: Add hooks to allow cover art to come from plugins (8.90 KB, patch)
2023-01-19 11:43 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 32680: Add hooks to allow cover art to come from plugins (13.40 KB, patch)
2023-01-19 14:19 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 32680: Add hooks to allow cover art to come from plugins (12.48 KB, patch)
2023-01-19 14:22 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 32680: (follow-up) Add new plugin hook and reformat data structures (17.87 KB, patch)
2023-01-31 17:00 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 32680: (follow-up) Add new plugin hook and reformat data structures (17.76 KB, patch)
2023-01-31 17:03 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 32680: (follow-up) Add new plugin hook and reformat data structures (17.78 KB, patch)
2023-02-15 15:58 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 32680: Add hooks to allow cover art to come from plugins (12.40 KB, patch)
2023-03-09 10:49 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 32680: (follow-up) Add new plugin hook and reformat data structures (17.26 KB, patch)
2023-03-09 10:49 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 32680: Add hooks to allow cover art to come from plugins (12.43 KB, patch)
2023-03-09 13:08 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 32680: (follow-up) Add new plugin hook and reformat data structures (17.29 KB, patch)
2023-03-09 13:08 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 32680: (follow-up) Add new plugin hook and reformat data structures (18.31 KB, patch)
2023-03-13 16:05 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 32680: Add hooks to allow cover art to come from plugins (12.44 KB, patch)
2023-03-14 11:30 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 32680: (follow-up) Add new plugin hook and reformat data structures (18.29 KB, patch)
2023-03-14 11:30 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 32680: Add cover images plugin hook (2.38 KB, patch)
2023-04-19 11:24 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 32680: Add classes to template files (10.98 KB, patch)
2023-04-19 11:25 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 32680: Add classes to template files (10.91 KB, patch)
2023-04-19 12:53 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 32680: Add cover images plugin hook (2.42 KB, patch)
2023-04-19 13:08 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 32680: Add classes to template files (10.95 KB, patch)
2023-04-19 13:08 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 32680: (QA follow-up) Fix opac call and remove second fetch (4.34 KB, patch)
2023-04-19 13:09 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 32680: Add cover images plugin hook (2.43 KB, patch)
2023-05-15 08:58 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 32680: Add classes to template files (10.96 KB, patch)
2023-05-15 08:58 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 32680: (QA follow-up) Fix opac call and remove second fetch (4.29 KB, patch)
2023-05-15 08:59 UTC, Matt Blenkinsop
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Blenkinsop 2023-01-19 11:10:17 UTC
Requests have been made for cover art to be provided by BDS. This bug is to create some hooks in the Koha templates that allow a plugin to attach cover art to the sliders. The idea is that these hooks could be used for any provider using the same format of plugin, not just BDS.
Comment 1 Matt Blenkinsop 2023-01-19 11:35:24 UTC Comment hidden (obsolete)
Comment 2 Matt Blenkinsop 2023-01-19 11:35:46 UTC
Plugin link:

https://github.com/PTFS-Europe/koha-plugin-addBDSCovers
Comment 3 Matt Blenkinsop 2023-01-19 11:38:59 UTC
*** Bug 19044 has been marked as a duplicate of this bug. ***
Comment 4 Matt Blenkinsop 2023-01-19 11:42:19 UTC Comment hidden (obsolete)
Comment 5 Matt Blenkinsop 2023-01-19 11:43:03 UTC Comment hidden (obsolete)
Comment 6 Matt Blenkinsop 2023-01-19 14:19:53 UTC Comment hidden (obsolete)
Comment 7 Matt Blenkinsop 2023-01-19 14:22:50 UTC
Created attachment 145475 [details] [review]
Bug 32680: Add hooks to allow cover art to come from plugins

This patch adds hooks to Koha core that allow a plugin for cover art to inject the images into the OPAC and staff client. These hooks could be re-used for other providers. As an example, a plugin has been created for BDS covers, the link is in another comment

Test plan:
1) Apply patch
2) Go to https://github.com/PTFS-Europe/koha-plugin-addBDSCovers
3) In the releases section, download the .kpz file
4) Upload this in the plugins section and enable the plugin
5) In either the OPAC or staff client, search the catalog
6) The results should have cover art from BDS covers
7) Click on a result and the detail page should also have the cover art
Comment 8 David Cook 2023-01-22 23:48:52 UTC
Comment on attachment 145475 [details] [review]
Bug 32680: Add hooks to allow cover art to come from plugins

Review of attachment 145475 [details] [review]:
-----------------------------------------------------------------

Overall, I like the idea, but I'm not sure about the implementation. I think this could benefit from a dedicated plugin hook.

::: catalogue/detail.pl
@@ +684,5 @@
>  
>  $template->param(biblio => $biblio);
>  
> +my $intranet_js_plugins = Koha::Template::Plugin::KohaPlugins->get_plugins_intranet_js;
> +if(index($intranet_js_plugins, "Cover Image Plugin") != -1){

To me this looks like hacking a different plugin hook rather than adding a plugin hook 

https://wiki.koha-community.org/wiki/Koha_Plugin_Hooks

::: koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
@@ +1310,4 @@
>      [% Asset.js("js/recalls.js") | $raw %]
>      [% Asset.js("js/coce.js") | $raw %]
>      [% Asset.js("lib/Chocolat/js/chocolat.js") | $raw %]
> +    [% IF ( Cover_Images_Required ) %]

I'd suggest going with CoverImagesRequired. We tend to use camel case rather than snake case in the templates.

::: koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt
@@ +465,2 @@
>      <td class="bookcoverimg">
> +        <div id="cover-slides-[% SEARCH_RESULT.biblionumber | html %]" class="cover-slides search_cover_images_required" data-biblionumber="[% SEARCH_RESULT.biblionumber | html %]">

This seems like it would be the place to add the SEARCH_RESULT data you would need for your plugin.

@@ +782,5 @@
>      [% Asset.js("lib/jquery/plugins/humanmsg.js") | $raw %]
>      [% INCLUDE 'select2.inc' %]
> +    [% IF ( Cover_Images_Required ) %]
> +        <script>
> +            const search_results = {};

It seems strange to me to create a separate data structure when you already have the HTML available.
Comment 9 Martin Renvoize 2023-01-27 14:51:00 UTC
I think David has lots of valid points.. marking failed for now and I'll work with Matt to refine it a bit :).

It's all good learning
Comment 10 Matt Blenkinsop 2023-01-31 17:00:54 UTC Comment hidden (obsolete)
Comment 11 Matt Blenkinsop 2023-01-31 17:03:04 UTC Comment hidden (obsolete)
Comment 12 Matt Blenkinsop 2023-01-31 17:05:15 UTC
Based on David's comments I've added two new plugin hooks to handle injecting the plugin into the template and also modified the data structuring to use the HTML datasets rather than a new javascript object
Comment 13 Matt Blenkinsop 2023-02-15 15:58:16 UTC Comment hidden (obsolete)
Comment 14 Martin Renvoize 2023-03-09 10:49:14 UTC
Created attachment 147992 [details] [review]
Bug 32680: Add hooks to allow cover art to come from plugins

This patch adds hooks to Koha core that allow a plugin for cover art to inject the images into the OPAC and staff client. These hooks could be re-used for other providers. As an example, a plugin has been created for BDS covers, the link is in another comment

Test plan:
1) Apply patch
2) Go to https://github.com/PTFS-Europe/koha-plugin-addBDSCovers
3) In the releases section, download the .kpz file
4) Upload this in the plugins section and enable the plugin
5) In either the OPAC or staff client, search the catalog
6) The results should have cover art from BDS covers
7) Click on a result and the detail page should also have the cover art
Comment 15 Martin Renvoize 2023-03-09 10:49:17 UTC
Created attachment 147993 [details] [review]
Bug 32680: (follow-up) Add new plugin hook and reformat data structures

This patch adds two new plugin hooks to add cover images and adds data tags to the templates to provide the isbn numbers for this

Test plan:
1) Apply patch
2) Go to https://github.com/PTFS-Europe/koha-plugin-addBDSCovers
3) In the releases section, download the .kpz file
4) Upload this in the plugins section and enable the plugin
5) In either the OPAC or staff client, search the catalog
6) The results should have cover art from BDS covers
7) Click on a result and the detail page should also have the cover art

Sponsored-by: PTFS Europe
Comment 16 Sally 2023-03-09 12:52:52 UTC
Sorry, patch doesn't apply:

Applying: Bug 32680: Add hooks to allow cover art to come from plugins
.git/rebase-apply/patch:74: trailing whitespace.
            var normalized_isbn = "[% normalized_isbn %]";   
.git/rebase-apply/patch:118: trailing whitespace.
            [% END %]   
.git/rebase-apply/patch:143: trailing whitespace.
            var normalized_isbn = "[% normalized_isbn %]";   
.git/rebase-apply/patch:180: trailing whitespace.
            [% END %]   
warning: 4 lines add whitespace errors.
Using index info to reconstruct a base tree...
M	koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
M	koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt
.git/rebase-apply/patch:74: trailing whitespace.
            var normalized_isbn = "[% normalized_isbn %]";   
.git/rebase-apply/patch:118: trailing whitespace.
            [% END %]   
.git/rebase-apply/patch:143: trailing whitespace.
            var normalized_isbn = "[% normalized_isbn %]";   
.git/rebase-apply/patch:180: trailing whitespace.
            [% END %]   
warning: 4 lines applied after fixing whitespace errors.
Falling back to patching base and 3-way merge...
Auto-merging koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
error: Failed to merge in the changes.
Patch failed at 0001 Bug 32680: Add hooks to allow cover art to come from plugins
Comment 17 Matt Blenkinsop 2023-03-09 13:08:13 UTC
Created attachment 147996 [details] [review]
Bug 32680: Add hooks to allow cover art to come from plugins

This patch adds hooks to Koha core that allow a plugin for cover art to inject the images into the OPAC and staff client. These hooks could be re-used for other providers. As an example, a plugin has been created for BDS covers, the link is in another comment

Test plan:
1) Apply patch
2) Go to https://github.com/PTFS-Europe/koha-plugin-addBDSCovers
3) In the releases section, download the .kpz file
4) Upload this in the plugins section and enable the plugin
5) In either the OPAC or staff client, search the catalog
6) The results should have cover art from BDS covers
7) Click on a result and the detail page should also have the cover art
Comment 18 Matt Blenkinsop 2023-03-09 13:08:53 UTC
Created attachment 147997 [details] [review]
Bug 32680: (follow-up) Add new plugin hook and reformat data structures

This patch adds two new plugin hooks to add cover images and adds data tags to the templates to provide the isbn numbers for this

Test plan:
1) Apply patch
2) Go to https://github.com/PTFS-Europe/koha-plugin-addBDSCovers
3) In the releases section, download the .kpz file
4) Upload this in the plugins section and enable the plugin
5) In either the OPAC or staff client, search the catalog
6) The results should have cover art from BDS covers
7) Click on a result and the detail page should also have the cover art

Sponsored-by: PTFS Europe
Comment 19 Matt Blenkinsop 2023-03-09 13:09:17 UTC
Re-rebased, hopefully this applies now :)
Comment 20 Sally 2023-03-10 13:58:54 UTC
(In reply to Matt Blenkinsop from comment #19)
> Re-rebased, hopefully this applies now :)

Sorry Matt, still getting the same error :(
Comment 21 Matt Blenkinsop 2023-03-13 16:05:59 UTC
Created attachment 148129 [details] [review]
Bug 32680: (follow-up) Add new plugin hook and reformat data structures

This patch adds two new plugin hooks to add cover images and adds data tags to the templates to provide the isbn numbers for this

Test plan:
1) Apply patch
2) Go to https://github.com/PTFS-Europe/koha-plugin-addBDSCovers
3) In the releases section, download the .kpz file
4) Upload this in the plugins section and enable the plugin
5) In either the OPAC or staff client, search the catalog
6) The results should have cover art from BDS covers
7) Click on a result and the detail page should also have the cover art

Sponsored-by: PTFS Europe
Comment 22 Matt Blenkinsop 2023-03-13 16:06:50 UTC
Hi Sally,

I've made some minor changes and the QA tests are all passing on my end, could you try again and see if you get the same error? Thanks
Comment 23 Sally 2023-03-14 08:49:32 UTC
Sorry Matt, I'm still getting the same error:

148129 - Bug 32680: (follow-up) Add new plugin hook and reformat data structures

Applying: Bug 32680: Add hooks to allow cover art to come from plugins
.git/rebase-apply/patch:74: trailing whitespace.
            var normalized_isbn = "[% normalized_isbn %]";   
.git/rebase-apply/patch:118: trailing whitespace.
            [% END %]   
.git/rebase-apply/patch:143: trailing whitespace.
            var normalized_isbn = "[% normalized_isbn %]";   
.git/rebase-apply/patch:180: trailing whitespace.
            [% END %]   
warning: 4 lines add whitespace errors.
Using index info to reconstruct a base tree...
M	koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
M	koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt
.git/rebase-apply/patch:74: trailing whitespace.
            var normalized_isbn = "[% normalized_isbn %]";   
.git/rebase-apply/patch:118: trailing whitespace.
            [% END %]   
.git/rebase-apply/patch:143: trailing whitespace.
            var normalized_isbn = "[% normalized_isbn %]";   
.git/rebase-apply/patch:180: trailing whitespace.
            [% END %]   
warning: 4 lines applied after fixing whitespace errors.
Falling back to patching base and 3-way merge...
Auto-merging koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
error: Failed to merge in the changes.
Patch failed at 0001 Bug 32680: Add hooks to allow cover art to come from plugins

I can leave it for someone else to try, see if they get the same error?
Comment 24 Matt Blenkinsop 2023-03-14 10:19:44 UTC
Hi Sally,

Thanks for trying again. It looks like there is an error in the sandboxes when applying a bug after sandbox creation. Martin has just created a sandbox with the bug already provisioned if you could try testing in that one?

Thanks,
Matt
Comment 25 PTFS Europe Sandboxes 2023-03-14 11:30:11 UTC
Created attachment 148158 [details] [review]
Bug 32680: Add hooks to allow cover art to come from plugins

This patch adds hooks to Koha core that allow a plugin for cover art to inject the images into the OPAC and staff client. These hooks could be re-used for other providers. As an example, a plugin has been created for BDS covers, the link is in another comment

Test plan:
1) Apply patch
2) Go to https://github.com/PTFS-Europe/koha-plugin-addBDSCovers
3) In the releases section, download the .kpz file
4) Upload this in the plugins section and enable the plugin
5) In either the OPAC or staff client, search the catalog
6) The results should have cover art from BDS covers
7) Click on a result and the detail page should also have the cover art

Signed-off-by: Martin <martin.renvoize@ptfs-europe.com>
Comment 26 PTFS Europe Sandboxes 2023-03-14 11:30:14 UTC
Created attachment 148159 [details] [review]
Bug 32680: (follow-up) Add new plugin hook and reformat data structures

This patch adds two new plugin hooks to add cover images and adds data tags to the templates to provide the isbn numbers for this

Test plan:
1) Apply patch
2) Go to https://github.com/PTFS-Europe/koha-plugin-addBDSCovers
3) In the releases section, download the .kpz file
4) Upload this in the plugins section and enable the plugin
5) In either the OPAC or staff client, search the catalog
6) The results should have cover art from BDS covers
7) Click on a result and the detail page should also have the cover art

Sponsored-by: PTFS Europe
Signed-off-by: Martin <martin.renvoize@ptfs-europe.com>
Comment 27 Sally 2023-03-14 11:32:08 UTC
(In reply to Matt Blenkinsop from comment #24)
> Hi Sally,
> 
> Thanks for trying again. It looks like there is an error in the sandboxes
> when applying a bug after sandbox creation. Martin has just created a
> sandbox with the bug already provisioned if you could try testing in that
> one?
> 
> Thanks,
> Matt

Oh, I should've realised it was a sandbox error!  :(

Thanks both - have tested in the OPAC and the staff client, and all is working well, so signing off (masquerading as Martin!).
Comment 28 Nick Clemens 2023-03-17 13:33:45 UTC
I like this idea, it expands upon the current: CustomCoverImagesURL system preference, and would allow for adding services that need authentication, or more specialized formats.

There are a few issues I see:
1 - In both the staff and opac we have lines like below in the scripts:
use Koha::Template::Plugin::KohaPlugins;
...
my $intranet_cover_images_plugins = Koha::Template::Plugin::KohaPlugins->get_plugins_intranet_cover_images;
if($intranet_cover_images_plugins){
    $template->param( CoverImagesRequired => 1 )
}

I don't think we should be calling template plugins in the scripts.

We can do something like:
[% SET CoverImagesRequired = KohaPlugins.get_plugins_intranet_cover_images %] early in the template, then add the code in later like:
[% CoverImagesRequired | $raw %]

2 - I am not sure the code below is necessary, we add normalized isbn to the results, and the plugin seems to simply fetch the results with JS " const search_results_images = document.querySelectorAll('.cover_images_required');"
 Am I correct?
+    [% IF ( CoverImagesRequired ) %]
+        <script>
+            const search_results = {};
+            [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %]
+                var cover_index = "[% loop.count | html %]";
+                search_results[cover_index] = {};
+                search_results[cover_index].isbn = "[% SEARCH_RESULT.normalized_isbn | html %]";
+                search_results[cover_index].biblionumber = "[% SEARCH_RESULT.biblionumber | html %]";
+                search_results[cover_index].processedBiblio = "[% PROCESS biblio_a_href biblionumber => SEARCH_RESULT.biblionumber | html %]";
+            [% END %]
+        </script>
+    [% END %]

3 - CoverImagesRequired is misleading. I think it should be renamed like 'CoverImagePlugins' 

4 - I would suggest squashing the patches, as the second rewrites the first, it would make for easier review
Comment 29 Matt Blenkinsop 2023-04-19 11:24:58 UTC
Created attachment 149868 [details] [review]
Bug 32680: Add cover images plugin hook

This patch adds a plugin hook to inject cover images into the templates

Test plan:
1) Apply all patches
2) Go to https://github.com/PTFS-Europe/koha-plugin-addBDSCovers
3) In the releases section, download the .kpz file
4) Upload this in the plugins section and enable the plugin
5) In either the OPAC or staff client, search the catalog
6) The results should have cover art from BDS covers
7) Click on a result and the detail page should also have the cover art
Comment 30 Matt Blenkinsop 2023-04-19 11:25:01 UTC
Created attachment 149869 [details] [review]
Bug 32680: Add classes to template files

This patch adds the classes to the template files so that the plugin hook can identify that cover images are required and where to inject them

Test plan as per first commit

Sponsored-by: PTFS Europe
Comment 31 Matt Blenkinsop 2023-04-19 11:29:26 UTC
QA comments addressed:

All changes removed from .pl files and plugins dealt with exclusively in the template files

Unnecessary JS variables removed from template scripts

Class names updated as suggested, plugin .kpz files also updated and re-released to reflect this

Patch also rebased, hopefully everything should work as expected!
Comment 32 Matt Blenkinsop 2023-04-19 12:53:42 UTC
Created attachment 149886 [details] [review]
Bug 32680: Add classes to template files

This patch adds the classes to the template files so that the plugin hook can identify that cover images are required and where to inject them

Test plan as per first commit

Sponsored-by: PTFS Europe
Comment 33 Nick Clemens 2023-04-19 13:08:55 UTC
Created attachment 149887 [details] [review]
Bug 32680: Add cover images plugin hook

This patch adds a plugin hook to inject cover images into the templates

Test plan:
1) Apply all patches
2) Go to https://github.com/PTFS-Europe/koha-plugin-addBDSCovers
3) In the releases section, download the .kpz file
4) Upload this in the plugins section and enable the plugin
5) In either the OPAC or staff client, search the catalog
6) The results should have cover art from BDS covers
7) Click on a result and the detail page should also have the cover art

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 34 Nick Clemens 2023-04-19 13:08:57 UTC
Created attachment 149888 [details] [review]
Bug 32680: Add classes to template files

This patch adds the classes to the template files so that the plugin hook can identify that cover images are required and where to inject them

Test plan as per first commit

Sponsored-by: PTFS Europe
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 35 Nick Clemens 2023-04-19 13:09:00 UTC
Created attachment 149889 [details] [review]
Bug 32680: (QA follow-up) Fix opac call and remove second fetch

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 36 Tomás Cohen Arazi 2023-05-10 17:55:18 UTC
Please minor rebase required. Will be included in next release.
Comment 37 Matt Blenkinsop 2023-05-15 08:58:53 UTC
Created attachment 151191 [details] [review]
Bug 32680: Add cover images plugin hook

This patch adds a plugin hook to inject cover images into the templates

Test plan:
1) Apply all patches
2) Go to https://github.com/PTFS-Europe/koha-plugin-addBDSCovers
3) In the releases section, download the .kpz file
4) Upload this in the plugins section and enable the plugin
5) In either the OPAC or staff client, search the catalog
6) The results should have cover art from BDS covers
7) Click on a result and the detail page should also have the cover art

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 38 Matt Blenkinsop 2023-05-15 08:58:57 UTC
Created attachment 151192 [details] [review]
Bug 32680: Add classes to template files

This patch adds the classes to the template files so that the plugin hook can identify that cover images are required and where to inject them

Test plan as per first commit

Sponsored-by: PTFS Europe
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 39 Matt Blenkinsop 2023-05-15 08:59:00 UTC
Created attachment 151193 [details] [review]
Bug 32680: (QA follow-up) Fix opac call and remove second fetch

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 40 Matt Blenkinsop 2023-05-15 08:59:37 UTC
Rebased to latest master version
Comment 41 Tomás Cohen Arazi 2023-05-15 11:54:32 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 42 Katrin Fischer 2023-05-18 14:25:29 UTC
Hi Matt, could you please complete my entry for this on https://wiki.koha-community.org/wiki/Koha_Plugin_Hooks ?
Comment 43 Matt Blenkinsop 2023-05-18 14:36:20 UTC
You beat me to it, I requested my wiki account last night to add it to the list and hadn't got round to logging in yet! I'll complete it as soon as I can log in
Comment 44 Katrin Fischer 2023-05-18 14:48:13 UTC
(In reply to Matt Blenkinsop from comment #43)
> You beat me to it, I requested my wiki account last night to add it to the
> list and hadn't got round to logging in yet! I'll complete it as soon as I
> can log in

:) It looks like David already moderated your request last night - could you please check?
Comment 45 Matt Blenkinsop 2023-06-02 16:12:27 UTC
Enhancement - not backporting to 22.11.x
Comment 46 Johan Sahlberg 2024-02-13 10:30:25 UTC
Great work!... but I've noticed that this doesn't apply on shelves (neither in OPAC or Staff), which I assume it should. 
Files that needs to be altered I guess is: opac-shelves.tt and shelves.tt
Comment 47 Katrin Fischer 2024-03-17 22:02:33 UTC
(In reply to Johan Sahlberg from comment #46)
> Great work!... but I've noticed that this doesn't apply on shelves (neither
> in OPAC or Staff), which I assume it should. 
> Files that needs to be altered I guess is: opac-shelves.tt and shelves.tt

Hi, as this change has already been released, please file a new bug. You can use the "depends on" in your new bug to link to this one and it will also create a notice informing people watching this bug.