Bugzilla – Attachment 7446 Details for
Bug 7127
Templates must be valid XHTML
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7127 - Follow-up - Templates must be valid XHTML
Bug-7127---Follow-up---Templates-must-be-valid-XHT.patch (text/plain), 14.13 KB, created by
Owen Leonard
on 2012-02-03 13:39:08 UTC
(
hide
)
Description:
Bug 7127 - Follow-up - Templates must be valid XHTML
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2012-02-03 13:39:08 UTC
Size:
14.13 KB
patch
obsolete
>From 63fe77c32053bc6c88786a7197182b41c6b6a5af Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 26 Jan 2012 15:00:36 -0500 >Subject: [PATCH] Bug 7127 - Follow-up - Templates must be valid XHTML >Content-Type: text/plain; charset="utf-8" > >Corrections to OPAC search results and lists pages for validity >errors: duplicate ids, invalidly placed elements, unescaped >ampersands. > >The change to localcovers.js adds a check for <span> in addition >to <div> so that the results template can use a <span> > >The <form> tag has been removed from the inline tag entry >markup in order to correct a display error in Internet Explorer 8. >Removing it doesn't affect functionality or validity. > >To test: Validate the HTML of the OPAC results page and an OPAC >list contents page (/cgi-bin/koha/opac-shelves.pl?viewshelf=XX). >Verify the functinality of adding tags on both pages with the >TagsInputOnList system preference enabled. Verify that local >cover images are display on search results and detail pages. > >Includes fixes for errors spotted by QA > >Revisions >--- > .../opac-tmpl/prog/en/includes/page-numbers.inc | 6 +++--- > koha-tmpl/opac-tmpl/prog/en/js/localcovers.js | 2 +- > .../opac-tmpl/prog/en/modules/opac-results.tt | 13 +++++-------- > .../opac-tmpl/prog/en/modules/opac-shelves.tt | 18 ++++++------------ > 4 files changed, 15 insertions(+), 24 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/page-numbers.inc b/koha-tmpl/opac-tmpl/prog/en/includes/page-numbers.inc >index 1bf9143..738c0c9 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/includes/page-numbers.inc >+++ b/koha-tmpl/opac-tmpl/prog/en/includes/page-numbers.inc >@@ -1,7 +1,7 @@ > [% IF ( PAGE_NUMBERS ) %]<div class="pages"> > <!-- Row of numbers corresponding to search result pages --> >- [% IF ( previous_page_offset ) %]<a class="nav" href="/cgi-bin/koha/opac-search.pl?[% query_cgi %][% limit_cgi |html %]&offset=[% previous_page_offset %][% IF ( sort_by ) %]&sort_by=[% sort_by %][% END %]"><< Previous</a>[% END %] >- [% FOREACH PAGE_NUMBER IN PAGE_NUMBERS %][% IF ( PAGE_NUMBER.highlight ) %]<span class="current">[% PAGE_NUMBER.pg %]</span>[% ELSE %] <a class="nav" href="/cgi-bin/koha/opac-search.pl?[% query_cgi %][% limit_cgi |html %]&offset=[% PAGE_NUMBER.offset %][% IF ( sort_by ) %]&sort_by=[% sort_by %][% END %]">[% PAGE_NUMBER.pg %]</a>[% END %] >+ [% IF ( previous_page_offset ) %]<a class="nav" href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]&offset=[% previous_page_offset %][% IF ( sort_by ) %]&sort_by=[% sort_by %][% END %]"><< Previous</a>[% END %] >+ [% FOREACH PAGE_NUMBER IN PAGE_NUMBERS %][% IF ( PAGE_NUMBER.highlight ) %]<span class="current">[% PAGE_NUMBER.pg %]</span>[% ELSE %] <a class="nav" href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]&offset=[% PAGE_NUMBER.offset %][% IF ( sort_by ) %]&sort_by=[% sort_by %][% END %]">[% PAGE_NUMBER.pg %]</a>[% END %] > [% END %] >- [% IF ( next_page_offset ) %]<a class="nav" href="/cgi-bin/koha/opac-search.pl?[% query_cgi %][% limit_cgi |html %]&offset=[% next_page_offset %][% IF ( sort_by ) %]&sort_by=[% sort_by %][% END %]">Next >></a>[% END %] >+ [% IF ( next_page_offset ) %]<a class="nav" href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]&offset=[% next_page_offset %][% IF ( sort_by ) %]&sort_by=[% sort_by %][% END %]">Next >></a>[% END %] > </div>[% END %] >diff --git a/koha-tmpl/opac-tmpl/prog/en/js/localcovers.js b/koha-tmpl/opac-tmpl/prog/en/js/localcovers.js >index 298a20e..f2808ef 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/js/localcovers.js >+++ b/koha-tmpl/opac-tmpl/prog/en/js/localcovers.js >@@ -18,7 +18,7 @@ KOHA.LocalCover = { > * olCallBack(). > */ > GetCoverFromBibnumber: function(uselink) { >- $("div [id^=local-thumbnail]").each(function(i) { >+ $("div[id^=local-thumbnail],span[id^=local-thumbnail]").each(function(i) { > var mydiv = this; > var message = document.createElement("span"); > $(message).attr("class","no-image"); >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt >index 1a3d6f8..9f92997 100755 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt >@@ -417,15 +417,15 @@ $(document).ready(function(){ > [% ELSE %]<a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber |url %]" title="View details for this title"> > [% END %] > [% END %] >- [% IF ( SEARCH_RESULT.title ) %][% SEARCH_RESULT.title |html %][% ELSE %]No title[% END %] [% FOREACH subtitl IN SEARCH_RESULT.subtitle %], [% subtitl.subfield %][% END %]</a> >+ [% IF ( SEARCH_RESULT.title ) %][% SEARCH_RESULT.title |html %][% ELSE %]No title[% END %] [% FOREACH subtitl IN SEARCH_RESULT.subtitle %], [% subtitl.subfield|html %][% END %]</a> > [% IF ( SEARCH_RESULT.author ) %]by <a href="/cgi-bin/koha/opac-search.pl?q=au:[% SEARCH_RESULT.author |url %]" title="Search for works by this author" class="author">[% SEARCH_RESULT.author %]</a> > [% ELSE %] > [% END %] > <span class="results_summary"><span class="label">Publication:</span> >- [% IF ( SEARCH_RESULT.place ) %][% SEARCH_RESULT.place %] [% END %][% IF ( SEARCH_RESULT.publishercode ) %][% SEARCH_RESULT.publishercode %][% END %][% IF ( SEARCH_RESULT.publicationyear ) %] [% SEARCH_RESULT.publicationyear %] >+ [% IF ( SEARCH_RESULT.place ) %][% SEARCH_RESULT.place %] [% END %][% IF ( SEARCH_RESULT.publishercode ) %][% SEARCH_RESULT.publishercode|html %][% END %][% IF ( SEARCH_RESULT.publicationyear ) %] [% SEARCH_RESULT.publicationyear %] > [% ELSE %][% IF ( SEARCH_RESULT.copyrightdate ) %] [% SEARCH_RESULT.copyrightdate %][% END %][% END %] > [% IF ( SEARCH_RESULT.pages ) %]. [% SEARCH_RESULT.pages %][% END %] >- [% IF ( SEARCH_RESULT.notes ) %], [% SEARCH_RESULT.notes %][% END %] >+ [% IF ( SEARCH_RESULT.notes ) %], [% SEARCH_RESULT.notes|html %][% END %] > [% IF ( SEARCH_RESULT.size ) %] [% SEARCH_RESULT.size %][% END %] > [% IF ( SEARCH_RESULT.timestamp ) %] <i>(modified on [% SEARCH_RESULT.timestamp %])</i>[% END %] > </span> >@@ -480,20 +480,17 @@ $(document).ready(function(){ > [% IF ( LibraryThingForLibrariesID ) %]<div class="ltfl_reviews"></div>[% END %] > [% IF ( opacuserlogin ) %][% IF ( TagsEnabled ) %] > [% IF ( TagsShowOnList ) %] >- <div class="results_summary"> > [% IF ( SEARCH_RESULT.TagLoop.size ) %] >- <span class="label">Tags:</span> >+ <div class="results_summary"><span class="label">Tags:</span> > <ul style="display: inline; list-style: none;">[% FOREACH TagLoo IN SEARCH_RESULT.TagLoop %]<li style="display: inline; list-style: none;"><a href="/cgi-bin/koha/opac-search.pl?tag=[% TagLoo.term |url %]&q=[% TagLoo.term |url %]">[% TagLoo.term %]</a> <span class="weight">([% TagLoo.weight_total %])</span></li> > [% END %] > </ul> > [% END %] > [% IF ( TagsInputOnList ) %] > [% IF ( loggedinusername ) %] >- <form name="tagform[% SEARCH_RESULT.biblionumber %]" method="post" action="/cgi-bin/koha/opac-tags.pl"> > <span class="label">New tag:</span> > <input name="newtag[% SEARCH_RESULT.biblionumber %]" id="newtag[% SEARCH_RESULT.biblionumber %]" maxlength="100" /> > <input name="tagbutton" class="tagbutton" title="[% SEARCH_RESULT.biblionumber %]" type="submit" value="Add" /> >- </form> > <span id="newtag[% SEARCH_RESULT.biblionumber %]_status" class="tagstatus" style="display:none;"> > Tag status here. > </span> >@@ -528,7 +525,7 @@ $(document).ready(function(){ > </span> > </td><td> > <a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]"> >- [% IF ( OPACLocalCoverImages ) %]<div style="block" title="[% SEARCH_RESULT.biblionumber |url %]" class="[% SEARCH_RESULT.biblionumber %]" id="local-thumbnail[% loop.count %]"></div>[% END %] >+ [% IF ( OPACLocalCoverImages ) %]<span title="[% SEARCH_RESULT.biblionumber |url %]" class="[% SEARCH_RESULT.biblionumber %]" id="local-thumbnail[% loop.count %]"></span>[% END %] > [% IF ( OPACAmazonEnabled ) %][% IF ( OPACAmazonCoverImages ) %][% IF ( SEARCH_RESULT.normalized_isbn ) %]<img src="http://images.amazon.com/images/P/[% SEARCH_RESULT.normalized_isbn %].01.TZZZZZZZ.jpg" alt="" class="thumbnail" />[% ELSE %]<span class="no-image">No cover image available</span>[% END %][% END %][% END %] > > [% IF ( SyndeticsEnabled ) %][% IF ( SyndeticsCoverImages ) %][% IF ( using_https ) %] >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt >index 391037f..908eb94 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt >@@ -257,15 +257,15 @@ $(function() { > [% ELSE %]<a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% itemsloo.biblionumber |url %]" title="View details for this title"> > [% END %] > [% END %] >- [% IF ( itemsloo.title ) %][% itemsloo.title |html %][% ELSE %]No title[% END %] [% FOREACH subtitl IN itemsloo.subtitle %][% subtitl.subfield %][% END %]</a> >+ [% IF ( itemsloo.title ) %][% itemsloo.title |html %][% ELSE %]No title[% END %] [% FOREACH subtitl IN itemsloo.subtitle %][% subtitl.subfield|html %][% END %]</a> > [% IF ( itemsloo.author ) %]by <a href="/cgi-bin/koha/opac-search.pl?q=au:[% itemsloo.author |url %]" title="Search for works by this author" class="author">[% itemsloo.author %]</a> > [% ELSE %] > [% END %] > <span class="results_summary"><span class="label">Publication:</span> >- [% IF ( itemsloo.place ) %][% itemsloo.place %] [% END %][% IF ( itemsloo.publishercode ) %][% itemsloo.publishercode %][% END %][% IF ( itemsloo.publicationyear ) %] [% itemsloo.publicationyear %] >+ [% IF ( itemsloo.place ) %][% itemsloo.place %] [% END %][% IF ( itemsloo.publishercode ) %][% itemsloo.publishercode|html %][% END %][% IF ( itemsloo.publicationyear ) %] [% itemsloo.publicationyear %] > [% ELSE %][% IF ( itemsloo.copyrightdate ) %] [% itemsloo.copyrightdate %][% END %][% END %] > [% IF ( itemsloo.pages ) %]. [% itemsloo.pages %][% END %] >- [% IF ( itemsloo.notes ) %], [% itemsloo.notes %][% END %] >+ [% IF ( itemsloo.notes ) %], [% itemsloo.notes|html %][% END %] > [% IF ( itemsloo.size ) %] [% itemsloo.size %][% END %] > </span> > <span class="results_summary"><span class="label">Holdings:</span>[% IF ( itemsloo.ITEM_RESULTS ) %][% FOREACH ITEM_RESULT IN itemsloo.ITEM_RESULTS %] >@@ -288,20 +288,19 @@ $(function() { > [% END %] > [% IF ( TagsInputOnList ) %] > [% IF ( loggedinusername ) %] >- <form name="tagform[% itemsloo.biblionumber %]" method="post" action="/cgi-bin/koha/opac-tags.pl"> > <label for="newtag[% itemsloo.biblionumber %]">New tag:</label> > <input name="newtag[% itemsloo.biblionumber %]" id="newtag[% itemsloo.biblionumber %]" maxlength="100" /> > <input name="tagbutton" class="tagbutton" title="[% itemsloo.biblionumber %]" type="submit" value="Add" /> >- </form> > <span id="newtag[% itemsloo.biblionumber %]_status" class="tagstatus" style="display:none;"> > Tag status here. > </span> > [% ELSIF ( loop.first ) %]<span class="tagstatus" id="login4tags">Log in to add tags.</span> > [% END %] >- [% END %] >+ [% ELSE %] > [% IF ( loggedinusername ) %] >- <span id="newtag[% itemsloo.biblionumber %]_status" class="tagstatus" style="display:none;">Tag status here.</span> >+ <span id="newtag[% itemsloo.biblionumber %]_status" class="tagstatus results_summary" style="display:none;">Tag status here.</span> > [% END %] >+ [% END %] > [% END %] > > <span class="results_summary actions"><span class="label">Actions:</span> >@@ -325,12 +324,7 @@ $(function() { > [% IF ( opacbookbag ) %]<a class="addtocart" href="#" onclick="addRecord('[% itemsloo.biblionumber %]'); return false;">Add to Cart</a>[% ELSE %]nocart[% END %] > </span> > >- >- >- <!-- COinS / Openurl --> > <!-- COinS / Openurl --><span class="Z3988" title="[% itemsloo.coins %]"></span> >- [% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( TagsEnabled ) %]<br/> >- <div id="newtag[% itemsloo.biblionumber %]_status" class="tagstatus results_summary" style="display:none">Tag status here.</div>[% END %][% END %][% END %] > </td> > <td> > <a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% itemsloo.biblionumber %]"> >-- >1.7.3
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 7127
:
6342
|
6702
|
7140
|
7339
|
7444
|
7446
|
7456
|
9760
|
9788