[Koha-bugs] [Bug 12691] Use Koha.Preference for calls to SCOUserJS, SCOUserCSS, OPACUserCSS, opacuserjs, etc in Self-Checkout

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon May 15 06:19:50 CEST 2017


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

--- Comment #7 from M. Tompsett <mtompset at hotmail.com> ---
Comment on attachment 62993
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62993
[SIGNED OFF] Bug 12691: Use Koha.Preference in Self-Checkout

Review of attachment 62993:
 --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=12691&attachment=62993)
-----------------------------------------------------------------

::: koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt
@@ +202,4 @@
>                                  </div>
>                              </div> <!-- / #newcheckout -->
>                  </div> <!-- / .span12/12 -->
> +                [% IF ( Koha.Preference('ShowPatronImageInWebBasedSelfCheck') && image_exists ) %]

This image_exists and display_patron_image logic doesn't quite match up, and is
where the application logic fails.

The old logic would still generate the span2 if the image doesn't exist. This
logic will not.

::: opac/sco/sco-main.pl
@@ +292,4 @@
>      );
>      if (C4::Context->preference('ShowPatronImageInWebBasedSelfCheck')) {
>          my $patron_image = Koha::Patron::Images->find($borrower->{borrowernumber});
> +        $template->param( image_exists => 1 ) if $patron_image;

While the master code has changed, I see no reason for this change, except
perhaps to optimize URL calls. But if that were the case, then an ELSE in the
template file would be better, so as to generate an empty span2.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list