Bug 7127 - Templates must be valid XHTML
authorOwen Leonard <oleonard@myacpl.org>
Thu, 24 May 2012 14:17:31 +0000 (10:17 -0400)
committerPaul Poulain <paul.poulain@biblibre.com>
Mon, 28 May 2012 15:47:33 +0000 (17:47 +0200)
Fixing markup errors on OPAC detail page and OPAC results.
Also conditionally including ratings JS on OPAC detail.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt
koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt

index e7cc4a3..3c45aff 100644 (file)
@@ -9,8 +9,8 @@
       {lang: '[% lang %]'}
     </script>
 [% END %]
-<script type="text/javascript" src="/opac-tmpl/prog/en/lib/jquery/plugins/jquery.rating.js"></script>
-<link rel="stylesheet" type="text/css" href="/opac-tmpl/prog/en/css/jquery.rating.css" />
+[% IF ( OpacStarRatings != 'disable' ) %]<script type="text/javascript" src="/opac-tmpl/prog/en/lib/jquery/plugins/jquery.rating.js"></script>
+<link rel="stylesheet" type="text/css" href="/opac-tmpl/prog/en/css/jquery.rating.css" />[% END %]
 
 <script type="text/JavaScript" language="JavaScript">
 //<![CDATA[
@@ -89,7 +89,7 @@
     [% END %]
 
         $(".branch-info-tooltip-trigger").tooltip({delay: 100, position: "top right"});
-
+[% IF ( OpacStarRatings != 'disable' ) %]
 // -----------------------------------------------------
 // star-ratings code
 // -----------------------------------------------------
@@ -136,7 +136,7 @@ $(function () {
   });
 });
 // -----------------------------------------------------
-
+[% END %]
 });
 
 [% IF ( OpacBrowseResults && busc ) %]
@@ -563,7 +563,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
         <input  type="hidden" name='rating_total' id='rating_total' value="[% rating_total %]" />
         <input  type="hidden" name='rating_avg_int' id='rating_avg_int' value="[% rating_avg_int %]" />
 
-        [% UNLESS ( rating_readonly ) %]&nbsp;  <INPUT name="rate_button" type="submit" value="Rate me">[% END %]&nbsp;
+        [% UNLESS ( rating_readonly ) %]&nbsp;  <input name="rate_button" type="submit" value="Rate me" />[% END %]&nbsp;
 
         [% IF ( rating_value ) %]
             <span id="rating_value_text">your rating: [% rating_value %], </span>
@@ -574,7 +574,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
             <span id="rating_text">average rating: [% rating_avg_int %] ([% rating_total %] votes)</span>
 
         </div>
-        </FORM>
+        </form>
     [% END %]
 
     [% IF ( BakerTaylorContentURL ) %]
index 576d9f8..67b1686 100644 (file)
@@ -557,7 +557,7 @@ $(document).ready(function(){
                 [% IF (  SEARCH_RESULT.rating_total ) > 0  %]
                     <span id="rating_total_[% SEARCH_RESULT.biblionumber %]">&nbsp;&nbsp;([% SEARCH_RESULT.rating_total %] votes)</span>
                 [% ELSE %]
-                    </br>
+                    <br />
                 [% END %]
 
                 </div>
@@ -619,8 +619,8 @@ $(document).ready(function(){
             [% END %]
                 [% END %]
 
-                [% IF ( GoogleJackets ) %][% IF ( SEARCH_RESULT.normalized_isbn ) %]<div style="block" title="[% SEARCH_RESULT.biblionumber |url %]" class="[% SEARCH_RESULT.normalized_isbn %]" id="gbs-thumbnail[% loop.count %]"></div>[% ELSE %]<span class="no-image">No cover image available</span>[% END %][% END %]
-        [% IF OpenLibraryCovers %][% IF SEARCH_RESULT.normalized_isbn %]<div style="block" title="[% SEARCH_RESULT.biblionumber %]" class="[% SEARCH_RESULT.normalized_isbn %]" id="openlibrary-thumbnail[% loop.count %]"></div>[% ELSE %]<span class="no-image">No cover image available</span>[% END %][% END %]
+                [% IF ( GoogleJackets ) %][% IF ( SEARCH_RESULT.normalized_isbn ) %]<span style="block" title="[% SEARCH_RESULT.biblionumber |url %]" class="[% SEARCH_RESULT.normalized_isbn %]" id="gbs-thumbnail[% loop.count %]"></span>[% ELSE %]<span class="no-image">No cover image available</span>[% END %][% END %]
+        [% IF OpenLibraryCovers %][% IF SEARCH_RESULT.normalized_isbn %]<span style="block" title="[% SEARCH_RESULT.biblionumber %]" class="[% SEARCH_RESULT.normalized_isbn %]" id="openlibrary-thumbnail[% loop.count %]"></span>[% ELSE %]<span class="no-image">No cover image available</span>[% END %][% END %]
                 </a>
                 [% IF ( BakerTaylorEnabled ) %][% IF ( SEARCH_RESULT.normalized_isbn ) %]<a href="https://[% BakerTaylorBookstoreURL |html %][% SEARCH_RESULT.normalized_isbn %]"><img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL |html %][% SEARCH_RESULT.normalized_isbn %]" /></a>[% ELSE %]<span class="no-image">No cover image available</span>[% END %][% END %]
                 </td>