Koha/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-topissues.tt
Owen Leonard 5aabe570f4 Bug 11692: fix display of additional bib information in OPAC "most popular" pag
The template for the OPAC's "most popular" page includes several
variables which are not passed by the script, including
biblioitems.size. This patch adds the right columns to the query and
standardizes the output somewhat based on non-XSLT opac-detail.

To test, apply the patch and view the "most popular" page in both prog
and bootstrap. You should see correct publisher, copyright, pages, and
size information.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Tested in all three themes and works lovely

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Improves the bibliographic display on the 'Most popular' page
in the OPAC. Passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-10 15:17:50 +00:00

185 lines
No EOL
12 KiB
Text

[% USE Koha %]
[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Most popular titles
[% INCLUDE 'doc-head-close.inc' %]
[% BLOCK cssinclude %]
<style type="text/css">
#search-facets fieldset { border: 0; margin: 0;padding:.3em;}#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>
[% END %]
</head>
<body id="opac-topissues" class="scrollto">
[% INCLUDE 'masthead.inc' %]
<div class="main">
<ul class="breadcrumb">
<li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
<li><a href="#">Most popular titles</a></li>
</ul>
<div class="container-fluid">
<div class="row-fluid">
<div class="span2">
[% IF ( results_loop ) %]
<div id="usertopissues">
[% INCLUDE 'opac-topissues.inc' %]
[% IF ( OpacNav || OpacNavBottom ) %]
[% INCLUDE 'navigation.inc' %]
[% END %]
</div>
[% ELSE %]
[% IF ( OpacNav || OpacNavBottom ) %]
<div id="leftmenus">
[% INCLUDE 'navigation.inc' %]
</div>
[% END %]
[% END %]
</div>
<div class="span10">
<div id="topissues" class="maincontent">
[% IF ( results_loop ) %]
<table id="topissuest" class="table table-bordered table-striped">
<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 Koha.Preference( 'opacuserlogin' ) == 1 %]<th>&nbsp;</th>[% END %]
</tr>
</thead>
<tbody>
[% FOREACH results_loo IN results_loop %]
<tr>
<td><a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% results_loo.biblionumber %]">[% results_loo.title |html %]</a><p>[% results_loo.author %]
[% 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.publicationyear ) %]
[% results_loo.publicationyear %]
[% ELSIF ( results_loo.copyrightdate ) %]
[% results_loo.copyrightdate %]
[% END %]
[% IF ( results_loo.pages ) %] - [% results_loo.pages %][% END %]
[% IF ( results_loo.size ) %][% results_loo.size %][% END %]</p>
</td>
<td>
[% IF ( results_loo.description ) %]
<span class="tdlabel">
[% IF ( ccodesearch ) %]
Collection
[% ELSE %]
Item type
[% END %]:
</span>
[% results_loo.description %]
[% END %]
</td>
<td><span class="tdlabel">Checkouts: </span> [% results_loo.tot %]</td>
[% IF Koha.Preference( 'opacuserlogin' ) == 1 %]<td>[% IF Koha.Preference( 'RequestOnOpac' ) == 1 %][% 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" class="btn" value="Submit" />
</fieldset>
</form>
[% END # / IF results_loop %]
</div> <!-- / #topissues -->
</div> <!-- / .span10 -->
</div> <!-- / .row-fluid -->
</div> <!-- / .container-fluid -->
</div> <!-- / .main -->
[% INCLUDE 'opac-bottom.inc' %]
[% BLOCK jsinclude %]
[% INCLUDE 'datatables.inc' %]
<script type="text/javascript">
//<![CDATA[
$(function() {
$("#topissuest").dataTable($.extend(true, {}, dataTablesDefaults, {
"aaSorting": [ [2, "desc"], [0, "asc"] ],
"aoColumnDefs": [
[% IF ( opacuserlogin ) %]{ "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }[% END %]
],
"aoColumns": [
{ "sType": "anti-the" },
null,
null,
[% IF ( opacuserlogin ) %]null,[% END %]
]
}));
});
function Dopop(link) {
newin=window.open(link,'width=500,height=400,toolbar=false,scrollbars=yes');
}
//]]>
</script>
[% END %]