http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9580

--- Comment #40 from M. Tompsett <[email protected]> ---
Comment on attachment 32857
  --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=32857
Bug 9580 Cover images from Coce, a remote image URL cache

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

::: koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt
@@ +79,5 @@
>                      [% IF ( GoogleJackets ) %]
>                          <div title="[% biblionumber |url %]" class="[% 
> normalized_isbn %]" id="gbs-thumbnail-preview"></div>
>                      [% END %]
> +                    [% IF Koha.Preference('CoceProviders') %]
> +                      <div style="block" title="[% biblionumber |url %]" 
> class="[% IF ( normalized_ean ) %][% normalized_ean %][% ELSE %][% 
> normalized_isbn %][% END %]" id="coce-thumbnail-preview"></div>

Split this:

[% IF (normalized_ean) %]
<div style="block" title="[% biblionumber |url %]" class="[% normalized_ean %]"
id="coce-thumbnail-preview"></div>
[% ELSE %]
<div style="block" title="[% biblionumber |url %]" class="[% normalized_isbn
%]" id="coce-thumbnail-preview"></div>
[% END %]

So that you can more plainly meet
http://wiki.koha-community.org/wiki/Coding_Guidelines#HTML1:_Template_Toolkit_markup_inside_HTML

OOooooo.... sexier code:
<div style="block" title="[% biblionumber |url %]" class="[% normalized_ean ||
normalized_isbn %]" id="coce-thumbnail-preview"></div>
It's precise, concise, and oh so elegant.

::: koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt
@@ +258,5 @@
>                                                          [% END %]
>  
> +                                                        [% IF 
> Koha.Preference('CoceProviders') %]
> +                                                          [% IF ( 
> SEARCH_RESULT.normalized_ean || SEARCH_RESULT.normalized_isbn ) %]
> +                                                            <span 
> style="block" title="[% SEARCH_RESULT.biblionumber |url %]" class="[% IF ( 
> SEARCH_RESULT.normalized_ean ) %][% SEARCH_RESULT.normalized_ean %][% ELSE 
> %][% SEARCH_RESULT.normalized_isbn %][% END %]" id="coce-thumbnail[% 
> loop.count %]"></span>

class="[% SEARCH_RESULT.normalized_ean || SEARCH_RESULT.normalized_isbn %]"
-- It's sexier. :)

But perhaps the IF/ELSE split may be necessary. I've asked the mailing list.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to