From dd2f300dd9681a2230d25c861b505b533f44dab2 Mon Sep 17 00:00:00 2001 From: Nahuel ANGELINETTI Date: Fri, 28 Aug 2009 23:47:48 +0200 Subject: [PATCH] (bug #3554) use javascript to print records This patch, delete opac-detailprint.pl to print records, it only use CSS and javascript print() function. --- .../prog/en/modules/opac-ISBDdetail.tmpl | 4 +- .../prog/en/modules/opac-detail.tmpl | 4 +- .../prog/en/modules/opac-detailprint.tmpl | 91 ----------------- opac/opac-detailprint.pl | 99 ------------------- 4 files changed, 2 insertions(+), 196 deletions(-) delete mode 100644 koha-tmpl/opac-tmpl/prog/en/modules/opac-detailprint.tmpl delete mode 100755 opac/opac-detailprint.pl diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-ISBDdetail.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-ISBDdetail.tmpl index b99379bb53..1a58b38e81 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-ISBDdetail.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-ISBDdetail.tmpl @@ -62,9 +62,7 @@ -
  • " onclick="Dopop('opac-detailprint.pl?biblionumber='); return false;"> - Print -
  • +
  • Print
  • " onclick="Dopop('opac-addbybiblionumber.pl?biblionumber='); return false;"> diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl index 9fecae6d46..32caa72e11 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl @@ -758,9 +758,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () { -
  • " onclick="Dopop('opac-detailprint.pl?biblionumber='); return false;"> - Print -
  • +
  • Print
  • " onclick="Dopop('opac-addbybiblionumber.pl?biblionumber='); return false;"> diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detailprint.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detailprint.tmpl deleted file mode 100644 index e7aa1793c6..0000000000 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detailprint.tmpl +++ /dev/null @@ -1,91 +0,0 @@ -Koha Online Catalog › Details for: - - -/includes/favicon.ico" type="image/x-icon" /> - - - - -
    - -

    : -; By

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Format:
    Copyright:
    ISBN:
    LCCN:
    Publisher:
    Physical Details:
    Notes:
    Subject(s):">,
    Record No.:
    Detailed notes:
    Related links:
    - - - - - - - - - - - - - - - - - - - - -
    Type/FormatCall NumberLocationDue DateLast SeenBarcode
    /images/.gif" align="left" title="" alt="" />
    - -
    No copies available.
    - -
    - - - diff --git a/opac/opac-detailprint.pl b/opac/opac-detailprint.pl deleted file mode 100755 index 8d11cfc6c7..0000000000 --- a/opac/opac-detailprint.pl +++ /dev/null @@ -1,99 +0,0 @@ -#!/usr/bin/perl -# NOTE: Use standard 8-space tabs for this file (indents are 4 spaces) - -# Copyright 2000-2002 Katipo Communications -# -# This file is part of Koha. -# -# Koha is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# -# Koha is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, -# Suite 330, Boston, MA 02111-1307 USA - -use strict; -use C4::Context; -use CGI; -use C4::Biblio; -use C4::Items; -use C4::Auth; -use C4::Output; -use C4::Dates; - -my $query = new CGI; -my $type = $query->param('type'); -($type) || ( $type = 'intra' ); - -my $biblionumber = $query->param('biblionumber'); - -# change back when ive fixed request.pl -my @items = GetItemsInfo($biblionumber); -my $norequests = 1; -foreach my $itm (@items) { - $norequests = 0 unless $itm->{'notforloan'}; -} - -my $dat = GetBiblioData($biblionumber); -my $record = GetMarcBiblio($biblionumber); -my $addauthor = - GetMarcAuthors( $record, C4::Context->preference("marcflavour") ); -my $authorcount = scalar @$addauthor; - -$dat->{'count'} = @items; -$dat->{'norequests'} = $norequests; - -$dat->{'additional'} = ""; -foreach (@$addauthor) { - $dat->{'additional'} .= "|" . $_->{'value'}; -} # for - -my @results; - -$results[0] = $dat; - -my $resultsarray = \@results; -my $itemsarray = \@items; - -my $startfrom = $query->param('startfrom'); -($startfrom) || ( $startfrom = 0 ); - -my ( $template, $loggedinuser, $cookie ) = get_template_and_user( - { - template_name => ('opac-detailprint.tmpl'), - query => $query, - type => "opac", - authnotrequired => 1, - } -); - -my $count = 1; - -# now to get the items into a hash we can use and whack that thru - -my $nextstartfrom = - ( $startfrom + 20 < $count - 20 ) ? ( $startfrom + 20 ) : ( $count - 20 ); -my $prevstartfrom = ( $startfrom - 20 > 0 ) ? ( $startfrom - 20 ) : (0); -$template->param( - startfrom => $startfrom + 1, - endat => $startfrom + 20, - numrecords => $count, - nextstartfrom => $nextstartfrom, - prevstartfrom => $prevstartfrom, - BIBLIO_RESULTS => $resultsarray, - ITEM_RESULTS => $itemsarray, - loggedinuser => $loggedinuser, - biblionumber => $biblionumber, -); - -output_html_with_http_headers $query, $cookie, $template->output; - -# Local Variables: -# tab-width: 8 -# End: -- 2.39.5