Text "Patron reviews" appears even if no review available

Bug #1628655 reported by Eva Cerninakova
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Low
Unassigned
2.11
Fix Released
Low
Unassigned

Bug Description

Text "Patron reviews" appears in record detail page in OPAC (in "Awards, Reviews, & Suggested Reads" section even if no review available (e.g. http://eg-test.osvobozena-knihovna.cz/eg/opac/record/16358?query=golem;qtype=keyword;locg=1;detail_record_view=0;expand=awards;ac=reviews#awards).
The text concerns Chilifresh patron review and occurs in the TPAC template /openils/var/templates/opac/parts/record/awards.tt2 (line 5).
As it is quite confusing for catalog users, the text should not be displayed when Chilifresh patron reviews are not used in particular Evergren catalog (may be also the section Awards, Reviews, & Suggested Reads should not be displayed when empty).
(Evergren 2.10.7)

Revision history for this message
Linda Jansova (skolkova-s) wrote :

We have tested a solution which is inspired by Novelist (in /templates/opac/parts/record/awards.tt2) and consists of adding

[% IF ENV.OILS_CHILIFRESH_URL %]

before the following code:

    <strong>[% l('Patron Reviews:') %]</strong>
    <div style="margin-bottom:20px;">
        <span class="chili_review" id="isbn_[% attrs.isbn_clean | html %]"> </span>
        <div id="chili_review_[% attrs.isbn_clean | html %]" style="display: none;" align="center" width="100%"></div>
    </div>

and

  [% END %]

after the code in the awards.tt2 file.

It seems to work okay (when Chilifresh is switched off, no "Patron Reviews:" text appears).

The customized version of the awards.tt2 file is attached.

Revision history for this message
Linda Jansova (skolkova-s) wrote :

Apologies if the file is not in the correct patch format, it is simply an edited version of the original awards.tt2 file.

Changed in evergreen:
status: New → Confirmed
Revision history for this message
Kathy Lussier (klussier) wrote :

I've put Linda's suggested changes into a git branch and pushed it to the working repo:
http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/kmlussier/lp1628655-chilifresh-tpac

I've added Linda as the author of the patch. Linda, if I should be designating somebody else as the author, let me know and I'll update the branch.

tags: added: pullrequest
Changed in evergreen:
milestone: none → 2.next
Revision history for this message
Linda Jansova (skolkova-s) wrote :

Thank you, Kathy! It looks perfect as it is :-)!

Changed in evergreen:
milestone: 3.next → 2.12.2
no longer affects: evergreen/2.10
Revision history for this message
Jeff Davis (jdavis-sitka) wrote :
Changed in evergreen:
importance: Undecided → Low
Revision history for this message
Linda Jansova (skolkova-s) wrote :

Thank you, Jeff!

Galen Charlton (gmc)
tags: added: signedoff
Revision history for this message
Kathy Lussier (klussier) wrote :

Thank you Linda and Jeff! Merged to master, release 2.12 and release 2.11

Changed in evergreen:
status: Confirmed → Fix Committed
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.