Koha/koha-tmpl/opac-tmpl/prog/en/modules/opac-topissues.tt
Owen Leonard 47609920b7 Bug 9265 - Switch to HTML5 doctype in OPAC and staff client
This patch replaces the XHTML DOCTYPE with an HTML5 one. The HTML5
validator seems to be significantly different than the XHTML one,
so I'm seeing lots of new errors. This patch includes corrections
for one: Deprecation of the "language" attribute of <script>
tags.

To test, view pages in the OPAC and staff client. They should
appear as normal. Numerous validation follow-ups will be required,
but I suggest these be handled incrementally.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
test on some intranet pages and I found no regression. (chromium and
firefox).
The w3c page about the doctype: http://www.w3.org/TR/html5-diff/#doctype

Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-01-31 11:47:04 -05:00

154 lines
7.5 KiB
Text

[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Most popular titles
[% INCLUDE 'doc-head-close.inc' %]
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
<script type="text/javascript">
//<![CDATA[
$.tablesorter.addParser({
id: 'articles',
is: function(s) {return false; },
format: function(s) { return s.toLowerCase().replace(/^(the|an|a) /,''); },
type: 'text'
});
$(function() {
$("#topissuest").tablesorter({
widgets : ['zebra'],
sortList: [[2,1]],
headers: { 0:{sorter:'articles'}[% IF ( opacuserlogin ) %],3:{sorter:false}[% END %]
}
});
});
function Dopop(link) {
newin=window.open(link,'width=500,height=400,toolbar=false,scrollbars=yes');
}
//]]>
</script>
<style type="text/css">
#search-facets fieldset { border: 0; margin: 0;padding:0;}#search-facets ol{padding:.3em;}#search-facets li {list-style-type:none;padding:4px 4px;}#search-facets label{font-weight:bold;display:block;margin:.2em 0;}#search-facets fieldset.action {padding-left:4px;margin:.3em;};
</style>
</head>
<body id="opac-topissues">
[% IF ( results_loop ) %]
<div id="doc3" class="yui-t1">
[% ELSE %]
[% IF ( OpacNav ) %]
<div id="doc3" class="yui-t1">
[% ELSE %]
<div id="doc3" class="yui-t7">
[% END %]
[% END %]
<div id="bd">
[% INCLUDE 'masthead.inc' %]
<div id="yui-main">
<div class="yui-b"><div class="yui-g">
<div id="topissues" class="container">
[% IF ( results_loop ) %]
<table id="topissuest">
<caption>The [% limit %] most checked-out
[% IF ( itemtype ) %]
[% itemtype %]
[% END %]
[% IF ( branch ) %]
at
[% branch %]
[% END %]
[% IF ( timeLimitFinite ) %]
in the past [% timeLimitFinite %] months
[% ELSE %] of all time[% END %]
</caption>
<thead><tr>
<th>Title</th>
<th>[% IF ( ccodesearch ) %]Collection[% ELSE %]Item type[% END %]</th>
<th>Checkouts</th>
[% IF ( opacuserlogin ) %]<th>&nbsp;</th>[% END %]
</tr></thead>
<tbody>[% FOREACH results_loo IN results_loop %]
<tr>
<td><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% results_loo.biblionumber %]">[% results_loo.title |html %]</a><p>[% results_loo.author %]
[% IF ( results_loo.publicationyear ) %] - [% results_loo.publicationyear %][% END %]
[% IF ( results_loo.publishercode ) %]- [% results_loo.publishercode %][% END %] [% IF ( results_loo.seriestitle ) %]([% results_loo.seriestitle %])[% END %]
[% IF ( results_loo.place ) %] ; [% results_loo.place %][% END %]
[% IF ( results_loo.pages ) %] - [% results_loo.pages %][% END %]
[% IF ( results_loo.size ) %] ; [% results_loo.size %][% END %]</p>
</td>
<td>[% results_loo.description %]</td>
<td>[% results_loo.tot %]</td>
[% IF ( opacuserlogin ) %]<td>[% IF ( RequestOnOpac ) %][% UNLESS ( results_loo.norequests ) %]<a href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% results_loo.biblionumber %]">Place hold</a>[% END %][% END %]</td>[% END %]
</tr>
[% END %]</tbody>
</table>
[% ELSE %]
<form method="post" action="/cgi-bin/koha/opac-topissues.pl">
<fieldset class="rows">
<legend>See the most popular titles</legend>
<ol> <li><label for="limit">Show the top </label> <select name="limit" id="limit">
[% IF ( limit == 10 ) %]<option value ="10" selected="selected">10 titles</option>[% ELSE %]<option value="10">10 titles</option>[% END %]
[% IF ( limit == 15 ) %]<option value ="15" selected="selected">15 titles</option>[% ELSE %]<option value="15">15 titles</option>[% END %]
[% IF ( limit == 20 ) %]<option value ="20" selected="selected">20 titles</option>[% ELSE %]<option value="20">20 titles</option>[% END %]
[% IF ( limit == 30 ) %]<option value ="30" selected="selected">30 titles</option>[% ELSE %]<option value="30">30 titles</option>[% END %]
[% IF ( limit == 40 ) %]<option value ="40" selected="selected">40 titles</option>[% ELSE %]<option value="40">40 titles</option>[% END %]
[% IF ( limit == 50 ) %]<option value ="50" selected="selected">50 titles</option>[% ELSE %]<option value="50">50 titles</option>[% END %]
[% IF ( limit == 100 ) %]<option value ="100" selected="selected">100 titles</option>[% ELSE %]<option value="100">100 titles</option>[% END %]
</select>
</li>
<li>
<label for="branch">From: </label>
<select name="branch" id="branch">
<option value="">All libraries</option>
[% FOREACH branchloo IN branchloop %]
[% IF ( branchloo.selected ) %]
<option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>
[% ELSE %]
<option value="[% branchloo.value %]">[% branchloo.branchname %]</option>
[% END %]
[% END %]
</select>
</li>
<li><label for="itemtype">Limit to: </label>
<select name="itemtype" id="itemtype">
[% IF ( ccodesearch ) %]<option value="">All collections</option>[% ELSE %]<option value="">All item types</option>[% END %]
[% FOREACH itemtypeloo IN itemtypeloop %]
[% IF ( itemtypeloo.selected ) %]<option value="[% itemtypeloo.value %]" selected="selected">[% ELSE %]<option value="[% itemtypeloo.value %]">[% END %]
[% itemtypeloo.description %]
</option>
[% END %]
</select></li>
<li>
<label for="timeLimit">of the last:</label> <select name="timeLimit" id="timeLimit">
[% IF ( timeLimit == 3 ) %]<option value="3" selected="selected">3 months</option>[% ELSE %]<option value="3">3 months</option>[% END %]
[% IF ( timeLimit == 6 ) %]<option value="6" selected="selected">6 months</option>[% ELSE %]<option value="6">6 months</option>[% END %]
[% IF ( timeLimit == 12 ) %]<option value="12" selected="selected">12 months</option>[% ELSE %]<option value="12">12 months</option>[% END %]
[% IF ( timeLimit == 999 ) %]<option value="999" selected="selected">No limit</option>[% ELSE %]<option value="999">No limit</option>[% END %]
</select>
</li></ol>
<input type="hidden" name="do_it" value="1" />
</fieldset>
<fieldset class="action">
<input type="submit" value="Submit" /></fieldset>
</form>
[% END %]
</div>
</div>
</div>
</div>
[% IF ( results_loop ) %]
<div class="yui-b"><div id="usertopissues" class="container">
[% INCLUDE 'opac-topissues.inc' %]
[% IF ( OpacNav ) %][% INCLUDE 'navigation.inc' %][% END %]
</div></div>
[% ELSE %]
[% IF ( OpacNav ) %]
<div class="yui-b"><div id="leftmenus" class="container">
[% INCLUDE 'navigation.inc' %]
</div></div>
[% END %]
[% END %]
</div>
[% INCLUDE 'opac-bottom.inc' %]