https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36154

--- Comment #60 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 203648
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203648&action=edit
Bug 36154: (follow-up) Add missing CoverImagePlugins output to shelves.tt

The staff list view (virtualshelves/shelves.pl) already gated the "Cover"
column on CoverImagePlugins and reserved a <td> for it, but never actually
printed the [% CoverImagePlugins | $raw %] script block, so a plugin's
cover-image JS was never injected into the page. A library relying solely
on a cover-image plugin (no LocalCoverImages/CustomCoverImages) would see an
empty "Cover" column with nothing able to fill it.

This is the last patch of the series. The test plan below exercises every
page touched by this patchset, end to end.

Test plan:
1. Enable plugins (<enable_plugins> in koha-conf.xml). Install/enable a
   plugin implementing both intranet_cover_images and opac_cover_images,
   for example by adding to any installed plugin (see
   t/lib/plugins/Koha/Plugin/Test.pm for the shape of a minimal plugin
   package):

       sub intranet_cover_images {
           my $self = shift;
           return q{<script>console.log("intranet_cover_images hook
fired");</script>};
       }

       sub opac_cover_images {
           my $self = shift;
           return q{<script>console.log("opac_cover_images hook
fired");</script>};
       }

2. Staff interface list view (virtualshelves/shelves.pl):
   a. With LocalCoverImages, CustomCoverImages and the plugin all disabled,
      open a list => no "Cover" column, columns aligned correctly
   b. Enable only the plugin above, reload the list => the "Cover" column
      header appears and "View page source" shows the plugin's <script>
      block; opening devtools confirms the console.log fires
   c. Enable LocalCoverImages, add a title with a local cover image to the
      list => its image is shown in the "Cover" column
   d. Disable LocalCoverImages, enable CustomCoverImages/
      CustomCoverImagesURL => the custom cover image is shown instead
3. OPAC "Your summary" (opac-user.pl) and "Your reading history"
   (opac-readingrecord.pl):
   a. With the plugin still enabled, log in to the OPAC and check out/
      return a title so it appears on both pages
   b. View page source on each page and confirm the plugin's
      opac_cover_images <script> block is present and its console.log fires
4. OPAC shelf browser:
   a. With the plugin enabled, open the title's detail page in the OPAC and
      click "Browse shelf"
   b. Confirm the plugin's <script> block is present in the
      /cgi-bin/koha/svc/shelfbrowser response and executes
5. Disable the plugin again and re-confirm steps 2-4 behave exactly as they
   do on main for Local/Custom/Amazon/Syndetics/GoogleJackets/Coce cover
   images (regression check for the intermittent report that cover images
   were not appearing anywhere in these views without AmazonCoverImages
   enabled)
6. Sign off only once a comment on the bug confirms step 5 above, since
   that report against an earlier version of this patchset was never
   explicitly re-confirmed as fixed
7. koha-qa.pl -c 5

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to