From 88c2f76c4c5f762abe69f3f3393c24a397274062 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 5 Feb 2014 12:16:10 -0500 Subject: [PATCH] Bug 11692 - number 9 showing on topissues Content-Type: text/plain; charset="utf-8" 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. --- .../bootstrap/en/modules/opac-topissues.tt | 10 +++++++--- .../opac-tmpl/prog/en/modules/opac-topissues.tt | 10 +++++++--- opac/opac-topissues.pl | 8 ++++---- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-topissues.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-topissues.tt index 3f53e0d..9ed2e96 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-topissues.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-topissues.tt @@ -64,11 +64,15 @@ [% FOREACH results_loo IN results_loop %] [% results_loo.title |html %]

[% 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.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 %]

+ [% IF ( results_loo.size ) %][% results_loo.size %][% END %]

[% IF ( results_loo.description ) %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-topissues.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-topissues.tt index a850c9b..7b3dec4 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-topissues.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-topissues.tt @@ -72,11 +72,15 @@ function Dopop(link) { [% FOREACH results_loo IN results_loop %] [% results_loo.title |html %]

[% 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.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 %]

+ [% IF ( results_loo.size ) %][% results_loo.size %][% END %]

[% results_loo.description %] [% results_loo.tot %] diff --git a/opac/opac-topissues.pl b/opac/opac-topissues.pl index cdb572a..0afc692 100755 --- a/opac/opac-topissues.pl +++ b/opac/opac-topissues.pl @@ -81,8 +81,8 @@ if($advanced_search_types eq 'ccode'){ $whereclause .= ' AND authorised_values.authorised_value='.$dbh->quote($itemtype) if $itemtype; $query = "SELECT datecreated, biblio.biblionumber, title, author, sum( items.issues ) AS tot, biblioitems.itemtype, - biblioitems.publishercode,biblioitems.publicationyear, - authorised_values.lib as description + biblioitems.publishercode, biblioitems.place, biblioitems.publicationyear, biblio.copyrightdate, + authorised_values.lib as description, biblioitems.pages, biblioitems.size FROM biblio LEFT JOIN items USING (biblionumber) LEFT JOIN biblioitems USING (biblionumber) @@ -107,8 +107,8 @@ if($advanced_search_types eq 'ccode'){ } $query = "SELECT datecreated, biblio.biblionumber, title, author, sum( items.issues ) AS tot, biblioitems.itemtype, - biblioitems.publishercode,biblioitems.publicationyear, - itemtypes.description + biblioitems.publishercode, biblioitems.place, biblioitems.publicationyear, biblio.copyrightdate, + itemtypes.description, biblioitems.pages, biblioitems.size FROM biblio LEFT JOIN items USING (biblionumber) LEFT JOIN biblioitems USING (biblionumber) -- 1.7.9.5