koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] koha bookshelves/addbookbybiblionumber.pl koha-... [rel_TG]


From: Tumer Garip
Subject: [Koha-cvs] koha bookshelves/addbookbybiblionumber.pl koha-... [rel_TG]
Date: Tue, 03 Apr 2007 18:24:49 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         rel_TG
Changes by:     Tumer Garip <tgarip1957>        07/04/03 18:24:49

Added files:
        bookshelves    : addbookbybiblionumber.pl 
        koha-tmpl/intranet-tmpl/default/en/bookshelves: 
                                                        
addbookbybiblionumber.tmpl 

Log message:
        

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/bookshelves/addbookbybiblionumber.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.5.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/bookshelves/addbookbybiblionumber.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.6.2.1

Patches:
Index: bookshelves/addbookbybiblionumber.pl
===================================================================
RCS file: bookshelves/addbookbybiblionumber.pl
diff -N bookshelves/addbookbybiblionumber.pl
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ bookshelves/addbookbybiblionumber.pl        3 Apr 2007 18:24:48 -0000       
1.5.2.2
@@ -0,0 +1,126 @@
+#!/usr/bin/perl
+#script to provide bookshelf management
+# WARNING: This file uses 4-character tabs!
+#
+# $Header: /sources/koha/koha/bookshelves/addbookbybiblionumber.pl,v 1.5.2.2 
2007/04/03 18:24:48 tgarip1957 Exp $
+#
+# 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::Search;
+use C4::Biblio;
+use CGI;
+use C4::BookShelves;
+use C4::Circulation::Circ2;
+use C4::Auth;
+use C4::Interface::CGI::Output;
+use C4::Context;
+my $dbh=C4::Context->dbh;
+my $env;
+my $query = new CGI;
+my $biblionumber = $query->param('biblionumber');
+my $shelfnumber = $query->param('shelfnumber');
+my $newbookshelf = $query->param('newbookshelf');
+my $category = $query->param('category');
+
+my ($template, $loggedinuser, $cookie)
+= get_template_and_user({template_name => 
"bookshelves/addbookbybiblionumber.tmpl",
+                                                       query => $query,
+                                                       type => "intranet",
+                                                       authnotrequired => 0,
+                                                       flagsrequired => 
{catalogue => 1},
+                                               });
+
+my $x; # for trash
+($x,$x,$shelfnumber) = AddShelf('',$newbookshelf,$loggedinuser,$category) if 
$newbookshelf;
+
+if ($shelfnumber) {
+       &AddToShelfFromBiblio( $biblionumber, $shelfnumber);
+       print "Content-Type: text/html\n\n<html><body 
onload=\"window.close()\"></body></html>";
+       exit;
+} else {
+
+       my  (  $bibliohash )  = XMLgetbibliohash($dbh,$biblionumber);
+       my $biblios=XMLmarc2koha_onerecord($dbh,$bibliohash,"biblios");
+       my ($shelflist) = GetShelves($loggedinuser,3);
+       my @shelvesloop;
+       my %shelvesloop;
+       foreach my $element (sort keys %$shelflist) {
+                       push (@shelvesloop, $element);
+                       $shelvesloop{$element} = 
$shelflist->{$element}->{'shelfname'};
+       }
+
+       my $CGIbookshelves=CGI::scrolling_list( -name     => 'shelfnumber',
+                               -values   => address@hidden,
+                               -labels   => \%shelvesloop,
+                               -size     => 1,
+                               -tabindex=>'',
+                               -multiple => 0 );
+
+       $template->param(biblionumber => $biblionumber,
+                                               title => $biblios->{'title'},
+                                               author => $biblios->{'author'},
+                                               CGIbookshelves => 
$CGIbookshelves,
+                                               intranetcolorstylesheet => 
C4::Context->preference("intranetcolorstylesheet"),
+               intranetstylesheet => 
C4::Context->preference("intranetstylesheet"),
+               IntranetNav => C4::Context->preference("IntranetNav"),
+                                               );
+
+       output_html_with_http_headers $query, $cookie, $template->output;
+}
+# $Log: addbookbybiblionumber.pl,v $
+# Revision 1.5.2.2  2007/04/03 18:24:48  tgarip1957
+# *** empty log message ***
+#
+# Revision 1.5  2006/09/27 21:19:21  tgarip1957
+# Finalized XML version for intranet
+#
+# Revision 1.4  2006/07/04 14:36:51  toins
+# Head & rel_2_2 merged
+#
+# Revision 1.3.2.4  2006/06/20 16:21:42  oleonard
+# Adding "tabindex=''" to CGI:scrolling_lists to prevent incorrect tabbing. 
See Bug 1098
+#
+# Revision 1.3.2.3  2006/02/05 21:59:21  kados
+# Adds script support for IntranetNav ... see mail to koha-devel for
+# details
+#
+# Revision 1.3.2.2  2006/02/05 21:45:25  kados
+# Adds support for intranetstylesheet system pref in Koha scripts
+#
+# Revision 1.3.2.1  2006/02/04 21:26:47  kados
+# Adds support for intranetcolorstylesheet
+#
+# Revision 1.3  2004/12/15 17:28:22  tipaul
+# adding bookshelf features :
+# * create bookshelf on the fly
+# * modify a bookshelf (this being not finished, will commit the rest soon)
+#
+# Revision 1.2  2004/11/19 16:31:30  tipaul
+# bugfix for bookshelves not in official CVS
+#
+# Revision 1.1.2.2  2004/03/10 15:08:18  tipaul
+# modifying shelves : introducing category of shelf : private, public, free 
for all
+#
+# Revision 1.1.2.1  2004/02/19 10:14:36  tipaul
+# new feature : adding book to bookshelf from biblio detail screen.
+#
+
+# Local Variables:
+# tab-width: 4
+# End:

Index: koha-tmpl/intranet-tmpl/default/en/bookshelves/addbookbybiblionumber.tmpl
===================================================================
RCS file: 
koha-tmpl/intranet-tmpl/default/en/bookshelves/addbookbybiblionumber.tmpl
diff -N 
koha-tmpl/intranet-tmpl/default/en/bookshelves/addbookbybiblionumber.tmpl
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/bookshelves/addbookbybiblionumber.tmpl   
3 Apr 2007 18:24:48 -0000       1.6.2.1
@@ -0,0 +1,11 @@
+<!-- TMPL_INCLUDE Name="popup-top.inc" -->
+<div id="main">
+<h2 class="catalogue">Select bookshelf</h2>
+<form>
+       <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR 
NAME="biblionumber" -->">
+       <p><label>Title :</label><!-- TMPL_VAR NAME="title" --></p>
+       <p><label>Author :</label><!-- TMPL_VAR NAME="author" --></p>
+       <p><label>Select Bookshelf: </label><!-- TMPL_VAR NAME="CGIbookshelves" 
--></p>
+       <input type="submit" value="Add to shelf" class="button catalogue">
+</form>
+<!-- TMPL_INCLUDE Name="popup-bottom.inc" -->




reply via email to

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