Bug 10125

Summary: Babeltheque star image must use sprite
Product: Koha Reporter: Fridolin Somers <fridolin.somers>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Jonathan Druart <jonathan.druart>
Severity: normal    
Priority: P5 - low CC: gmcharlt, katrin.fischer
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 7500    
Bug Blocks:    
Attachments: Bug 10125 - Babeltheque star image must use sprite
Bug 10125 - Babeltheque star image must use sprite
Bug 10125 - Babeltheque star image must use sprite
Bug 10125: Babeltheque does not depend on OpacStarRatings.

Description Fridolin Somers 2013-04-26 11:27:12 UTC
In opac-results.tt :
<img src="[% themelang %]/../images/Star[% SEARCH_RESULT.score_int %].gif" ...
But thoses images have been removed to use sprites, see Bug 7500.
Comment 1 Owen Leonard 2013-07-03 18:42:13 UTC Comment hidden (obsolete)
Comment 2 Chris Cormack 2013-07-07 08:21:39 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2013-07-07 09:32:39 UTC
Hi Jonathan, could you take a look at this please? I hope that you are able to test with a Babeltheque account maybe.
Comment 4 Jonathan Druart 2013-07-08 08:24:31 UTC
QA Comment:
This patch supposes that the Babeltheque ratings depends on OpacStarRatings. It is false. I will provide a followup.
Comment 5 Jonathan Druart 2013-07-08 08:26:10 UTC
Created attachment 19467 [details] [review]
Bug 10125 - Babeltheque star image must use sprite

When I removed images from the OPAC in favor of sprites I didn't take
into account the display of star ratings from Babeltheque. This patch
copies the star ratings display from Koha's own ratings display,
though it is not dependent on JavaScript.

I'm sure testing would be easy for someone with access to the
Babeltheque service, but I do not. I temporarily modified the template
to set some variables for testing purposes:

    [% SET SEARCH_RESULT.score_int = 3 %]
    [% SET SEARCH_RESULT.score_avg = 3 %
    [% SET SEARCH_RESULT.num_scores = 87 %]

This enabled the display of the ratings, allowing me to confirm that
stars display correctly. Ratings should work with and without
OpacStarRatings enabled.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

I also fudged the template to test, so QA would need to be done with
someone with Babeltheque access

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 6 Jonathan Druart 2013-07-08 08:26:21 UTC
Created attachment 19468 [details] [review]
Bug 10125: Babeltheque does not depend on OpacStarRatings.

We have to load star ratings js and css file if Babeltheque is enabled
and OpacStarRatings is disabled.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 7 Jonathan Druart 2013-07-08 08:27:38 UTC
These patchs can be test on http://catalogue.master33-dev.biblibre.com/cgi-bin/koha/opac-search.pl?q=lila

Babeltheque is on and OpacStarRatings is off.

Marked as Passed QA.
Comment 8 Galen Charlton 2013-07-08 13:55:11 UTC
Pushed to master.  Thanks Owen and Jonathan!