koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] koha cataloguing/isbnsearch.pl koha-tmpl/intran... [rel_3_0]


From: Antoine Farnault
Subject: [Koha-cvs] koha cataloguing/isbnsearch.pl koha-tmpl/intran... [rel_3_0]
Date: Fri, 01 Dec 2006 09:43:38 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         rel_3_0
Changes by:     Antoine Farnault <toins>        06/12/01 09:43:37

Removed files:
        cataloguing    : isbnsearch.pl 
        koha-tmpl/intranet-tmpl/prog/en/cataloguing: isbnsearch.tmpl 

Log message:
        this script is not used in rel_3_0

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/cataloguing/isbnsearch.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.3.2.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/cataloguing/isbnsearch.tmpl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.2.2.2&r2=0

Patches:
Index: cataloguing/isbnsearch.pl
===================================================================
RCS file: cataloguing/isbnsearch.pl
diff -N cataloguing/isbnsearch.pl
--- cataloguing/isbnsearch.pl   6 Oct 2006 13:23:49 -0000       1.3.2.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,207 +0,0 @@
-#!/usr/bin/perl
-
-# 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 CGI;
-use C4::Auth;
-use C4::Biblio;
-use C4::Search;
-use C4::Breeding;
-use C4::Output;
-use C4::Interface::CGI::Output;
-use HTML::Template;
-use C4::Koha;
-
-my $input      = new CGI;
-my $offset     = $input->param('offset');
-my $num        = $input->param('num');
-# my $total;
-# my $count;
-# my @results;
-my $marc_p = C4::Context->boolean_preference("marc");
-my $dbh = C4::Context->dbh;
-
-    my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
-        {
-            template_name   => "cataloguing/isbnsearch.tmpl",
-            query           => $input,
-            type            => "intranet",
-            authnotrequired => 0,
-            flagsrequired   => { editcatalogue => 1 },
-            debug           => 1,
-        }
-    );
-
-    # fill with books in ACTIVE DB (biblio)
-    if ( !$offset ) {
-        $offset     = 0;
-    }
-    if ( !$num ) { $num = 10 }
-       my @marclist = $input->param('marclist');
-       my @and_or = $input->param('and_or');
-       my @excluding = $input->param('excluding');
-       my @operator = $input->param('operator');
-       my @value = $input->param('value');
-       my $title= @value[0];
-       my $isbn = @value[1];
-       my $resultsperpage= $input->param('resultsperpage');
-       $resultsperpage = 10 if(!defined $resultsperpage);
-       my $startfrom=$input->param('startfrom');
-       $startfrom=0 if(!defined $startfrom);
-       my $orderby = $input->param('orderby');
-       my $desc_or_asc = $input->param('desc_or_asc');
-
-       # builds tag and subfield arrays
-       my @tags;
-
-       foreach my $marc (@marclist) {
-               if ($marc) {
-                       my ($tag,$subfield) = 
MARCfind_marc_from_kohafield($dbh,$marc,'');
-                       if ($tag) {
-                               push @tags,$dbh->quote("$tag$subfield");
-                       } else {
-                               push @tags, $dbh->quote(substr($marc,0,4));
-                       }
-               } else {
-                       push @tags, "";
-               }
-       }
-       findseealso($dbh,address@hidden);
-       my ($results,$total) = catalogsearch($dbh, 
address@hidden,address@hidden,
-                                                                               
address@hidden, address@hidden, address@hidden,
-                                                                               
$startfrom*$resultsperpage, $resultsperpage,'biblio.title','ASC');
-#      @results = @$resultsref;
-
-#     my @loop_data = ();
-#     my $toggle;
-#     for ( my $i = $offset ; $i < $total ; $i++ ) {
-#         if ( $i % 2 ) {
-#             $toggle = 0;
-#         } else {
-#             $toggle = 1;
-#         }
-#         my %row_data;    # get a fresh hash for the row data
-#         $row_data{toggle}        = $toggle;
-#         $row_data{biblionumber}  = $results[$i]->{'biblionumber'};
-#         $row_data{title}         = $results[$i]->{'title'};
-#         $row_data{author}        = $results[$i]->{'author'};
-#         $row_data{copyrightdate} = $results[$i]->{'copyrightdate'};
-#              $row_data{classification} = $results[$i]->{'classification'};
-#         $row_data{NOTMARC}       = !$marc_p; 
-#         push ( @loop_data, \%row_data );
-#     }
-       # multi page display gestion
-       my $displaynext=0;
-       my $displayprev=$startfrom;
-       if(($total - (($startfrom+1)*($resultsperpage))) > 0 ) {
-               $displaynext = 1;
-       }
-
-       my @field_data = ();
-
-       for(my $i = 0 ; $i <= $#marclist ; $i++) {
-               push @field_data, { term => "marclist", val=>$marclist[$i] };
-               push @field_data, { term => "and_or", val=>$and_or[$i] };
-               push @field_data, { term => "excluding", val=>$excluding[$i] };
-               push @field_data, { term => "operator", val=>$operator[$i] };
-               push @field_data, { term => "value", val=>$value[$i] };
-       }
-
-       my @numbers = ();
-
-       if ($total>$resultsperpage) {
-               for (my $i=1; $i<$total/$resultsperpage+1; $i++) {
-                       if ($i<16) {
-                       my $highlight=0;
-                       ($startfrom==($i-1)) && ($highlight=1);
-                       push @numbers, { number => $i,
-                                       highlight => $highlight ,
-                                       searchdata=> address@hidden,
-                                       startfrom => ($i-1)};
-                       }
-       }
-       }
-       my $from = $startfrom*$resultsperpage+1;
-       my $to;
-
-       if($total < (($startfrom+1)*$resultsperpage))
-       {
-               $to = $total;
-       } else {
-               $to = (($startfrom+1)*$resultsperpage);
-       }
-
-    # fill with books in breeding farm
-       my $toggle=0;
-    my ( $countbr, @resultsbr ) = BreedingSearch( @value[0], @value[1] );
-    my @breeding_loop = ();
-    for ( my $i = 0 ; $i <= $#resultsbr ; $i++ ) {
-        my %row_data;
-        if ( $i % 2 ) {
-            $toggle = 0;
-        }
-        else {
-            $toggle = 1;
-        }
-        $row_data{toggle} = $toggle;
-        $row_data{id}     = $resultsbr[$i]->{'id'};
-        $row_data{isbn}   = $resultsbr[$i]->{'isbn'};
-        $row_data{file}   = $resultsbr[$i]->{'file'};
-        $row_data{title}  = $resultsbr[$i]->{'title'};
-        $row_data{author} = $resultsbr[$i]->{'author'};
-        $row_data{NOTMARC}= !$marc_p;  
-        push ( @breeding_loop, \%row_data );
-    }
-
-       # get framework list
-       my $frameworks = getframeworks;
-       my @frameworkcodeloop;
-       foreach my $thisframeworkcode (keys %$frameworks) {
-               my %row =(value => $thisframeworkcode,
-                                       frameworktext => 
$frameworks->{$thisframeworkcode}->{'frameworktext'},
-                               );
-               push @frameworkcodeloop, \%row;
-       }
-
-    $template->param(
-               title             => $title,
-               isbn              => $isbn,
-                                                       startfrom=> $startfrom,
-                                                       displaynext=> 
$displaynext,
-                                                       displayprev=> 
$displayprev,
-                                                       resultsperpage => 
$resultsperpage,
-                                                       startfromnext => 
$startfrom+1,
-                                                       startfromprev => 
$startfrom-1,
-                                                       
searchdata=>address@hidden,
-                                                       numbers=>address@hidden,
-                                                       from => $from,
-                                                       to => $to,
-        total         => $total,
-#         offset        => $offset,
-        loop          => $results,
-        breeding_loop => address@hidden,
-        NOTMARC       => !$marc_p,
-               frameworkcodeloop => address@hidden,
-    );
-
-    print $input->header(
-        -type   => guesstype( $template->output ),
-        -cookie => $cookie
-      ),
-      $template->output;

Index: koha-tmpl/intranet-tmpl/prog/en/cataloguing/isbnsearch.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/cataloguing/isbnsearch.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/cataloguing/isbnsearch.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/cataloguing/isbnsearch.tmpl 17 Nov 2006 
13:18:59 -0000      1.2.2.2
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,102 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Cataloging: Search 
Results for <!-- TMPL_IF name="isbn" -->ISBN <!-- TMPL_VAR name="isbn" --><!-- 
/TMPL_IF --><!-- TMPL_IF name="title" -->title <!-- TMPL_VAR name="title" 
--><!-- /TMPL_IF --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-catalogue.inc" -->
-
-       <h2>Search Results for <!-- TMPL_IF name="isbn" -->ISBN <!-- TMPL_VAR 
name="isbn" --><!-- /TMPL_IF --><!-- TMPL_IF name="title" -->title <!-- 
TMPL_VAR name="title" --><!-- /TMPL_IF --></h2>
-
-<!-- TMPL_IF name="total" -->
-Results <!-- TMPL_VAR NAME="from" --> to <!-- TMPL_VAR NAME="to" --> of <!-- 
TMPL_VAR NAME="total" -->
-<!-- /TMPL_IF -->
-       
-               <!-- TMPL_IF name="loop" -->
-                       
-                                       <!-- TMPL_IF NAME="displayprev" --> 
-                                               <a 
href="isbnsearch.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&amp;<!-- 
TMPL_LOOP NAME="searchdata" --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR 
NAME="val" ESCAPE=URL -->&amp;<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR 
NAME="resultsperpage" 
-->&amp;type=intranet&amp;op=do_search">&lt;&lt;Previous</a><!-- /TMPL_IF -->
-                                       <!-- TMPL_LOOP NAME="numbers" -->
-                                               <!-- TMPL_IF NAME="highlight" 
-->
-                                                       <!-- TMPL_VAR 
NAME="number" -->
-                                               <!-- TMPL_ELSE --><a 
href="isbnsearch.pl?startfrom=<!-- TMPL_VAR NAME="startfrom" -->&amp;<!-- 
TMPL_LOOP NAME="searchdata" --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR 
NAME="val" ESCAPE=URL -->&amp;<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR 
NAME="resultsperpage" -->&amp;type=intranet&amp;op=do_search"><!-- TMPL_VAR 
NAME="number" --></a><!-- /TMPL_IF --><!-- /TMPL_LOOP --> <!-- TMPL_IF 
NAME="displaynext" -->                                       <a 
href="isbnsearch.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&amp;<!-- 
TMPL_LOOP NAME="searchdata" --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR 
NAME="val" ESCAPE=URL -->&amp;<!-- /TMPL_LOOP -->&amp;resultsperpage=<!-- 
TMPL_VAR NAME="resultsperpage" 
-->&amp;type=intranet&amp;op=do_search">Next&gt;&gt;</a><!-- /TMPL_IF -->
-
-<!-- /TMPL_IF -->
-<table>
-       <caption>Existing Bibliographic Records</caption>
-                               <tr>
-                                       <th>Title</th>
-                                       <th>Author</th>
-                                       <th>&copy;</th>
-                                       <th>Call Number</th>
-                                       <th>&nbsp;</th>
-                               <!-- TMPL_UNLESS NAME="NOTMARC" -->
-                                       <th colspan="2">&nbsp;</th>
-                               <!-- /TMPL_UNLESS -->
-                               </tr>
-                               <!-- TMPL_IF name="loop" -->
-                               <!-- TMPL_LOOP NAME="loop" -->
-                               <tr>
-                                               <td><a 
href="addbiblio.pl?oldbiblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- 
TMPL_VAR NAME="title" --></a></td>
-                                               <td><!-- TMPL_VAR NAME="author" 
--></td>
-                                               <td><!-- TMPL_IF 
name="copyrightdate" --><!-- TMPL_VAR name="copyrightdate" --><!-- TMPL_ELSE 
-->&nbsp;<!-- /TMPL_IF --></td>
-<td><!-- TMPL_IF NAME="classification" --><!-- TMPL_VAR NAME="classification" 
--><!-- /TMPL_IF --></td>
-                                               <!-- TMPL_IF NAME="NOTMARC" -->
-                                               <td><a 
href="additem-nomarc.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Add 
items</a></td>
-                                               <!-- TMPL_ELSE -->
-                                               <td><a 
href="addbiblio.pl?oldbiblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Edit 
Biblio</a></td>
-                                               <td><a 
href="additem.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Edit 
Items</a></td>
-                                               <!-- /TMPL_IF -->
-                                               <!-- TMPL_UNLESS NAME="NOTMARC" 
-->
-                                               <td><a 
href="addbiblio.pl?oldbiblionumber=<!-- TMPL_VAR NAME="biblionumber" 
-->&amp;op=duplicate">Duplicate</a></td><!-- /TMPL_UNLESS --></tr>
-                               <!-- /TMPL_LOOP -->
-                                       <!-- TMPL_ELSE -->
-       <tr><td colspan="6">Nothing found</td></tr>
-       <!-- /TMPL_IF -->
-                       </table>
-                       
-                       
-                                       <!-- TMPL_IF NAME="displayprev" --> 
-                                               <a 
href="isbnsearch.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&amp;<!-- 
TMPL_LOOP NAME="searchdata" --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR 
NAME="val" ESCAPE=URL -->&amp;<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR 
NAME="resultsperpage" 
-->&amp;type=intranet&amp;op=do_search">&lt;&lt;Previous</a><!-- /TMPL_IF -->
-                                       <!-- TMPL_LOOP NAME="numbers" -->
-                                               <!-- TMPL_IF NAME="highlight" 
-->
-                                                       <!-- TMPL_VAR 
NAME="number" -->
-                                               <!-- TMPL_ELSE --><a 
href="isbnsearch.pl?startfrom=<!-- TMPL_VAR NAME="startfrom" -->&amp;<!-- 
TMPL_LOOP NAME="searchdata" --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR 
NAME="val" ESCAPE=URL -->&amp;<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR 
NAME="resultsperpage" -->&amp;type=intranet&amp;op=do_search"><!-- TMPL_VAR 
NAME="number" --></a><!-- /TMPL_IF --><!-- /TMPL_LOOP --> <!-- TMPL_IF 
NAME="displaynext" -->                                       <a 
href="isbnsearch.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&amp;<!-- 
TMPL_LOOP NAME="searchdata" --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR 
NAME="val" ESCAPE=URL -->&amp;<!-- /TMPL_LOOP -->&amp;resultsperpage=<!-- 
TMPL_VAR NAME="resultsperpage" 
-->&amp;type=intranet&amp;op=do_search">Next&gt;&gt;</a><!-- /TMPL_IF -->
-
-
-<!-- TMPL_IF name="breeding_loop" -->
-<table>
-       <caption>Bibliographic Records in the Reservoir</caption>
-                               <tr>
-                                       <th>Title</th>
-                                       <th>Author</th>
-                                       <th>ISBN</th>
-                                       <th>coming from</th>
-                                       <th>&nbsp;</th>
-                                       <th>&nbsp;</th>
-                               </tr>
-                                       <!-- TMPL_LOOP NAME="breeding_loop" -->
-                                               <!-- TMPL_IF NAME="highlight" 
--><tr><!-- TMPL_ELSE --><tr class="highlight"><!-- /TMPL_IF -->
-                                                       <td><!-- TMPL_VAR 
NAME="title" --></a>
-                                                       <td><!-- TMPL_VAR 
NAME="author" --></td>
-                                                       <td><!-- TMPL_VAR 
NAME="isbn" --></td>
-                                                       <td><!-- TMPL_VAR 
NAME="file" --></td>
-                                                       <!-- TMPL_IF 
NAME="NOTMARC" -->
-                                                       
-                                                       <!-- TMPL_ELSE -->
-                                                       <td><a 
href="addbiblio.pl?breedingid=<!-- TMPL_VAR NAME="id" -->">Add biblio</a></td>
-                                                       <!-- /TMPL_IF -->
-                                               </tr>
-                                       <!-- /TMPL_LOOP -->
-                       </table>
-<!-- TMPL_ELSE --><h3>No records found in the Reservoir</h3><!-- /TMPL_IF -->
-
-
-<h2>Create a New Record</h2>
-               <!-- TMPL_IF NAME="NOTMARC" -->
-                       <a href="addbiblio-nomarc.pl?isbn=<!-- TMPL_VAR 
NAME="isbn" -->">Add New Record</a>
-               <!-- TMPL_ELSE -->
-               <form action="/cgi-bin/koha/cataloguing/addbiblio.pl" 
method="post">
-                       <input type="hidden" name="title" value="<!-- TMPL_VAR 
NAME="title"  ESCAPE="URL" -->" />
-                       <input type="hidden" name="isbn" value="<!-- TMPL_VAR 
NAME="isbn" -->" /><label for="frameworkcode">Choose a Framework: 
</label><select id="frameworkcode" name="frameworkcode">
-                               <option value="">Default</option><!-- TMPL_LOOP 
NAME="frameworkcodeloop" --><option value="<!-- TMPL_VAR NAME="value" -->"><!-- 
TMPL_VAR NAME="frameworktext" --></option><!-- /TMPL_LOOP --></select> <input 
type="submit" class="submit" value="Add New Record" /></form>
-               <!-- /TMPL_IF -->
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->




reply via email to

[Prev in Thread] Current Thread [Next in Thread]