From 81c0d9e821bf619a6058d37497023f53555367b8 Mon Sep 17 00:00:00 2001 From: Joshua Ferraro Date: Thu, 9 Aug 2007 09:29:36 -0500 Subject: [PATCH] Revert "new virtual shelves changes, keyed by biblionumber -- approved" This reverts commit 8af76042d82e2034061087e9b78df038e3b2a403. --- C4/Auth.pm | 53 +++-- C4/Branch.pm | 3 +- C4/{BookShelves.pm => VirtualShelves.pm} | 190 ++++++------------ Makefile.PL | 1 + help.pl | 82 +++----- installer/kohastructure.sql | 20 +- koha-tmpl/intranet-tmpl/prog/en/about.tmpl | 2 +- koha-tmpl/intranet-tmpl/prog/en/auth.tmpl | 11 +- .../prog/en/help/admin/systempreferences.tmpl | 4 +- .../intranet-tmpl/prog/en/help/nohelp.tmpl | 15 +- .../prog/en/includes/action-catalogue.inc | 2 +- .../prog/en/includes/error-top.inc | 2 +- .../prog/en/includes/menu-bookshelves.inc | 5 - .../prog/en/includes/menu-virtualshelves.inc | 5 + .../intranet-tmpl/prog/en/includes/menus.inc | 2 +- .../intranet-tmpl/prog/en/tools/export.tmpl | 7 +- .../addbybiblionumber.tmpl} | 12 +- .../shelves.tmpl | 89 ++++---- .../opac-tmpl/prog/en/includes/basket.js | 2 +- .../opac-tmpl/prog/en/opac-ISBDdetail.tmpl | 2 +- .../opac-tmpl/prog/en/opac-MARCdetail.tmpl | 2 +- ...umber.tmpl => opac-addbybiblionumber.tmpl} | 18 +- koha-tmpl/opac-tmpl/prog/en/opac-detail.tmpl | 2 +- koha-tmpl/opac-tmpl/prog/en/opac-shelves.tmpl | 62 ++++-- ...lionumber.pl => opac-addbybiblionumber.pl} | 16 +- opac/opac-main.pl | 2 +- opac/opac-shelves.pl | 20 +- t/{BookShelves.t => VirtualShelves.t} | 18 +- tools/export.pl | 3 +- updater/updatedatabase | 2 +- .../addbybiblionumber.pl | 99 ++++----- {bookshelves => virtualshelves}/shelves.pl | 115 +++++------ 32 files changed, 438 insertions(+), 430 deletions(-) rename C4/{BookShelves.pm => VirtualShelves.pm} (58%) delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/menu-bookshelves.inc create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/menu-virtualshelves.inc rename koha-tmpl/intranet-tmpl/prog/en/{bookshelves/addbookbybiblionumber.tmpl => virtualshelves/addbybiblionumber.tmpl} (71%) rename koha-tmpl/intranet-tmpl/prog/en/{bookshelves => virtualshelves}/shelves.tmpl (74%) rename koha-tmpl/opac-tmpl/prog/en/{opac-addbookbybiblionumber.tmpl => opac-addbybiblionumber.tmpl} (73%) rename opac/{opac-addbookbybiblionumber.pl => opac-addbybiblionumber.pl} (87%) rename t/{BookShelves.t => VirtualShelves.t} (91%) rename bookshelves/addbookbybiblionumber.pl => virtualshelves/addbybiblionumber.pl (60%) rename {bookshelves => virtualshelves}/shelves.pl (75%) diff --git a/C4/Auth.pm b/C4/Auth.pm index 14ae8da1a9..9a349b5c13 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -223,18 +223,17 @@ sub get_template_and_user { if ( $in->{'type'} eq "intranet" ) { $template->param( intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"), - intranetstylesheet => C4::Context->preference("intranetstylesheet"), - IntranetNav => C4::Context->preference("IntranetNav"), - intranetuserjs => C4::Context->preference("intranetuserjs"), - TemplateEncoding => C4::Context->preference("TemplateEncoding"), - AmazonContent => C4::Context->preference("AmazonContent"), - LibraryName => C4::Context->preference("LibraryName"), - LoginBranchcode => (C4::Context->userenv?C4::Context->userenv->{"branch"}:"insecure"), - LoginBranchname => (C4::Context->userenv?C4::Context->userenv->{"branchname"}:"insecure"), - LoginBranchnameShort => substr((C4::Context->userenv?C4::Context->userenv->{"branchname"}:"insecure"),0,10), - AutoLocation => C4::Context->preference("AutoLocation"), - hide_marc => C4::Context->preference("hide_marc"), - patronimages => C4::Context->preference("patronimages"), + intranetstylesheet => C4::Context->preference("intranetstylesheet"), + IntranetNav => C4::Context->preference("IntranetNav"), + intranetuserjs => C4::Context->preference("intranetuserjs"), + TemplateEncoding => C4::Context->preference("TemplateEncoding"), + AmazonContent => C4::Context->preference("AmazonContent"), + LibraryName => C4::Context->preference("LibraryName"), + LoginBranchcode => (C4::Context->userenv?C4::Context->userenv->{"branch"}:"insecure"), + LoginBranchname => (C4::Context->userenv?C4::Context->userenv->{"branchname"}:"insecure"), + AutoLocation => C4::Context->preference("AutoLocation"), + hide_marc => C4::Context->preference("hide_marc"), + patronimages => C4::Context->preference("patronimages"), "BiblioDefaultView".C4::Context->preference("BiblioDefaultView") => 1, advancedMARCEditor => C4::Context->preference("advancedMARCEditor"), suggestion => C4::Context->preference("suggestion"), @@ -346,7 +345,7 @@ has authenticated. sub checkauth { my $query = shift; - + # warn "Checking Auth"; # $authnotrequired will be set for scripts which will run without authentication my $authnotrequired = shift; my $flagsrequired = shift; @@ -389,7 +388,7 @@ sub checkauth { # state variables my $loggedin = 0; my %info; - my ( $userid, $cookie, $sessionID, $flags, $envcookie ); + my ( $userid, $cookie, $sessionID, $flags ); my $logout = $query->param('logout.x'); if ( $userid = $ENV{'REMOTE_USER'} ) { @@ -431,7 +430,7 @@ sub checkauth { close L; } if ($userid) { - warn "here $userid"; + # warn "here $userid"; if ( $lasttime < time() - $timeout ) { # timed logout @@ -551,10 +550,14 @@ sub checkauth { # new op dev : # launch a sequence to check if we have a ip for the branch, if we have one we replace the branchcode of the userenv by the branch bound in the ip. my $ip = $ENV{'REMOTE_ADDR'}; + # if they specify at login, use that + if ($query->param('branch')) { + $branchcode = $query->param('branch'); + $branchname = GetBranchName($branchcode); + } my $branches = GetBranches(); my @branchesloop; foreach my $br ( keys %$branches ) { - # now we work with the treatment of ip my $domain = $branches->{$br}->{'branchip'}; if ( $domain && $ip =~ /^$domain/ ) { @@ -593,7 +596,17 @@ sub checkauth { $session->param('ip',$session->remote_addr()); $session->param('lasttime',time()); } + if ($session){ + C4::Context::set_userenv( + $session->param('number'), $session->param('id'), + $session->param('cardnumber'), $session->param('firstname'), + $session->param('surname'), $session->param('branch'), + $session->param('branchname'), $session->param('flags'), + $session->param('emailaddress'), $session->param('branchprinter') + ); + } } + else { if ($userid) { $info{'invalid_username_or_password'} = 1; @@ -623,8 +636,16 @@ sub checkauth { my $value = $query->param($name); push @inputs, { name => $name, value => $value }; } + # get the branchloop, which we need for authetication + use C4::Branch; + my $branches = GetBranches(); + my @branch_loop; + for my $branch_hash (keys %$branches) { + push @branch_loop, {branchcode => "$branch_hash", branchname => $branches->{$branch_hash}->{'branchname'}, }; + } my $template = gettemplate( $template_name, $type, $query ); + $template->param(branchloop => \@branch_loop,); $template->param( INPUTS => \@inputs, suggestion => C4::Context->preference("suggestion"), diff --git a/C4/Branch.pm b/C4/Branch.pm index 4a540be3f4..79d4d54a4b 100644 --- a/C4/Branch.pm +++ b/C4/Branch.pm @@ -91,8 +91,7 @@ foreach my $thisbranch (keys %$branches) { =cut sub GetBranches { - - my $onlymine=@_; + my ($onlymine)=@_; # returns a reference to a hash of references to ALL branches... my %branches; my $dbh = C4::Context->dbh; diff --git a/C4/BookShelves.pm b/C4/VirtualShelves.pm similarity index 58% rename from C4/BookShelves.pm rename to C4/VirtualShelves.pm index ce8810c9e7..06bddb1874 100755 --- a/C4/BookShelves.pm +++ b/C4/VirtualShelves.pm @@ -1,7 +1,7 @@ # -*- tab-width: 8 -*- # Please use 8-character tabs for this file (indents are every 4 characters) -package C4::BookShelves; +package C4::VirtualShelves; # $Id$ @@ -33,17 +33,17 @@ $VERSION = do { my @v = '$Revision$' =~ /\d+/g; shift(@v) . "." . join( "_", map =head1 NAME -C4::BookShelves - Functions for manipulating Koha virtual bookshelves +C4::VirtualShelves - Functions for manipulating Koha virtual virtualshelves =head1 SYNOPSIS - use C4::BookShelves; + use C4::VirtualShelves; =head1 DESCRIPTION -This module provides functions for manipulating virtual bookshelves, -including creating and deleting bookshelves, and adding and removing -items to and from bookshelves. +This module provides functions for manipulating virtual virtualshelves, +including creating and deleting virtualshelves, and adding and removing +items to and from virtualshelves. =head1 FUNCTIONS @@ -69,13 +69,13 @@ my $dbh = C4::Context->dbh; $shelflist = &GetShelves($owner, $mincategory); ($shelfnumber, $shelfhash) = each %{$shelflist}; -Looks up the virtual bookshelves, and returns a summary. C<$shelflist> -is a reference-to-hash. The keys are the bookshelf numbers +Looks up the virtual virtualshelves, and returns a summary. C<$shelflist> +is a reference-to-hash. The keys are the virtualshelves numbers (C<$shelfnumber>, above), and the values (C<$shelfhash>, above) are themselves references-to-hash, with the following keys: -C : 2 if the list is for "look". 3 if the list is for "Select bookshelf for adding a book". -bookshelves of the owner are always selected, whatever the category +C : 2 if the list is for "look". 3 if the list is for "Select virtualshelves for adding a virtual". +virtualshelves of the owner are always selected, whatever the category =over 4 @@ -85,7 +85,7 @@ A string. The name of the shelf. =item C<$shelfhash-E{count}> -The number of books on that bookshelf. +The number of virtuals on that virtualshelves. =back @@ -100,14 +100,14 @@ sub GetShelves { my ( $owner, $mincategory ) = @_; my $query = qq( - SELECT bookshelf.shelfnumber, bookshelf.shelfname,owner,surname,firstname,bookshelf.category, - count(shelfcontents.itemnumber) as count - FROM bookshelf - LEFT JOIN shelfcontents ON bookshelf.shelfnumber = shelfcontents.shelfnumber - LEFT JOIN borrowers ON bookshelf.owner = borrowers.borrowernumber + SELECT virtualshelves.shelfnumber, virtualshelves.shelfname,owner,surname,firstname,virtualshelves.category, + count(virtualshelfcontents.biblionumber) as count + FROM virtualshelves + LEFT JOIN virtualshelfcontents ON virtualshelves.shelfnumber = virtualshelfcontents.shelfnumber + LEFT JOIN borrowers ON virtualshelves.owner = borrowers.borrowernumber WHERE owner=? OR category>=? - GROUP BY bookshelf.shelfnumber - ORDER BY bookshelf.category, bookshelf.shelfname, borrowers.firstname, borrowers.surname + GROUP BY virtualshelves.shelfnumber + ORDER BY virtualshelves.category, virtualshelves.shelfname, borrowers.firstname, borrowers.surname ); my $sth = $dbh->prepare($query); $sth->execute( $owner, $mincategory ); @@ -134,10 +134,10 @@ sub GetShelves { (shelfnumber,shelfname,owner,category) = &GetShelf($shelfnumber); -Looks up information about the contents of virtual bookshelf number +Looks up information about the contents of virtual virtualshelves number C<$shelfnumber> -Returns the database's information on 'bookshelf' table. +Returns the database's information on 'virtualshelves' table. =cut @@ -145,7 +145,7 @@ sub GetShelf { my ($shelfnumber) = @_; my $query = qq( SELECT shelfnumber,shelfname,owner,category - FROM bookshelf + FROM virtualshelves WHERE shelfnumber=? ); my $sth = $dbh->prepare($query); @@ -157,7 +157,7 @@ sub GetShelf { $itemlist = &GetShelfContents($shelfnumber); -Looks up information about the contents of virtual bookshelf number +Looks up information about the contents of virtual virtualshelves number C<$shelfnumber>. Returns a reference-to-array, whose elements are references-to-hash, @@ -170,23 +170,22 @@ sub GetShelfContents { my ( $shelfnumber ) = @_; my @itemlist; my $query = - " SELECT itemnumber - FROM shelfcontents + " SELECT biblionumber + FROM virtualshelfcontents WHERE shelfnumber=? - ORDER BY itemnumber + ORDER BY biblionumber "; my $sth = $dbh->prepare($query); $sth->execute($shelfnumber); my $sth2 = $dbh->prepare(" - SELECT biblio.*,biblioitems.* FROM items - LEFT JOIN biblio on items.biblionumber=biblio.biblionumber - LEFT JOIN biblioitems on items.biblionumber=biblioitems.biblionumber - WHERE items.itemnumber=?" + SELECT biblio.*,biblioitems.* FROM biblio + LEFT JOIN biblioitems on biblio.biblionumber=biblioitems.biblionumber + WHERE biblio.biblionumber=?" ); - while ( my ($itemnumber) = $sth->fetchrow ) { - $sth2->execute($itemnumber); + while ( my ($biblionumber) = $sth->fetchrow ) { + $sth2->execute($biblionumber); my $item = $sth2->fetchrow_hashref; - $item->{'itemnumber'}=$itemnumber; + $item->{'biblionumber'}=$biblionumber; push( @itemlist, $item ); } return ( \@itemlist ); @@ -196,11 +195,11 @@ sub GetShelfContents { $shelfnumber = &AddShelf( $shelfname, $owner, $category); -Creates a new virtual bookshelf with name C<$shelfname>, owner C<$owner> and category +Creates a new virtual virtualshelves with name C<$shelfname>, owner C<$owner> and category C<$category>. Returns a code to know what's happen. - * -1 : if this bookshelf already exist. + * -1 : if this virtualshelves already exist. * $shelfnumber : if success. =cut @@ -209,7 +208,7 @@ sub AddShelf { my ( $shelfname, $owner, $category ) = @_; my $query = qq( SELECT * - FROM bookshelf + FROM virtualshelves WHERE shelfname=? AND owner=? ); my $sth = $dbh->prepare($query); @@ -219,7 +218,7 @@ sub AddShelf { } else { my $query = qq( - INSERT INTO bookshelf + INSERT INTO virtualshelves (shelfname,owner,category) VALUES (?,?,?) ); @@ -232,35 +231,35 @@ sub AddShelf { =item AddToShelf - &AddToShelf($itemnumber, $shelfnumber); + &AddToShelf($biblionumber, $shelfnumber); -Adds item number C<$itemnumber> to virtual bookshelf number +Adds item number C<$biblionumber> to virtual virtualshelves number C<$shelfnumber>, unless that item is already on that shelf. =cut #' sub AddToShelf { - my ( $itemnumber, $shelfnumber ) = @_; - return unless $itemnumber; + my ( $biblionumber, $shelfnumber ) = @_; + return unless $biblionumber; my $query = qq( SELECT * - FROM shelfcontents - WHERE shelfnumber=? AND itemnumber=? + FROM virtualshelfcontents + WHERE shelfnumber=? AND biblionumber=? ); my $sth = $dbh->prepare($query); - $sth->execute( $shelfnumber, $itemnumber ); + $sth->execute( $shelfnumber, $biblionumber ); unless ( $sth->rows ) { # already on shelf my $query = qq( - INSERT INTO shelfcontents - (shelfnumber, itemnumber, flags) + INSERT INTO virtualshelfcontents + (shelfnumber, biblionumber, flags) VALUES (?, ?, 0) ); $sth = $dbh->prepare($query); - $sth->execute( $shelfnumber, $itemnumber ); + $sth->execute( $shelfnumber, $biblionumber ); } } @@ -268,7 +267,7 @@ sub AddToShelf { &AddToShelfFromBiblio($biblionumber, $shelfnumber) - this function allow to add a book into the shelf number $shelfnumber + this function allow to add a virtual into the shelf number $shelfnumber from biblionumber. =cut @@ -277,30 +276,21 @@ sub AddToShelfFromBiblio { my ( $biblionumber, $shelfnumber ) = @_; return unless $biblionumber; my $query = qq( - SELECT itemnumber - FROM items - WHERE biblionumber=? - ); - my $sth = $dbh->prepare($query); - $sth->execute($biblionumber); - my ($itemnumber) = $sth->fetchrow; - $query = qq( SELECT * - FROM shelfcontents - WHERE shelfnumber=? AND itemnumber=? + FROM virtualshelfcontents + WHERE shelfnumber=? AND biblionumber=? ); - $sth = $dbh->prepare($query); - $sth->execute( $shelfnumber, $itemnumber ); + my $sth = $dbh->prepare($query); + $sth->execute( $shelfnumber, $biblionumber ); unless ( $sth->rows ) { - # "already on shelf"; my $query =qq( - INSERT INTO shelfcontents - (shelfnumber, itemnumber, flags) + INSERT INTO virtualshelfcontents + (shelfnumber, biblionumber, flags) VALUES (?, ?, 0) ); $sth = $dbh->prepare($query); - $sth->execute( $shelfnumber, $itemnumber ); + $sth->execute( $shelfnumber, $biblionumber ); } } @@ -308,14 +298,14 @@ sub AddToShelfFromBiblio { ModShelf($shelfnumber, $shelfname, $owner, $category ) -Modify the value into bookshelf table with values given on input arg. +Modify the value into virtualshelves table with values given on input arg. =cut sub ModShelf { my ( $shelfnumber, $shelfname, $owner, $category ) = @_; my $query = qq( - UPDATE bookshelf + UPDATE virtualshelves SET shelfname=?,owner=?,category=? WHERE shelfnumber=? ); @@ -327,7 +317,7 @@ sub ModShelf { ($status) = &DelShelf($shelfnumber); -Deletes virtual bookshelf number C<$shelfnumber>. The bookshelf must +Deletes virtual virtualshelves number C<$shelfnumber>. The virtualshelves must be empty. Returns a two-element array, where C<$status> is 0 if the operation @@ -354,7 +344,7 @@ sub ShelfPossibleAction { my ( $user, $shelfnumber, $action ) = @_; my $query = qq( SELECT owner,category - FROM bookshelf + FROM virtualshelves WHERE shelfnumber=? ); my $sth = $dbh->prepare($query); @@ -367,23 +357,23 @@ sub ShelfPossibleAction { =item DelFromShelf - &DelFromShelf( $itemnumber, $shelfnumber); + &DelFromShelf( $biblionumber, $shelfnumber); -Removes item number C<$itemnumber> from virtual bookshelf number -C<$shelfnumber>. If the item wasn't on that bookshelf to begin with, +Removes item number C<$biblionumber> from virtual virtualshelves number +C<$shelfnumber>. If the item wasn't on that virtualshelves to begin with, nothing happens. =cut #' sub DelFromShelf { - my ( $itemnumber, $shelfnumber ) = @_; + my ( $biblionumber, $shelfnumber ) = @_; my $query = qq( - DELETE FROM shelfcontents - WHERE shelfnumber=? AND itemnumber=? + DELETE FROM virtualshelfcontents + WHERE shelfnumber=? AND biblionumber=? ); my $sth = $dbh->prepare($query); - $sth->execute( $shelfnumber, $itemnumber ); + $sth->execute( $shelfnumber, $biblionumber ); } =head2 DelShelf @@ -397,7 +387,7 @@ sub DelFromShelf { #' sub DelShelf { my ( $shelfnumber ) = @_; - my $sth = $dbh->prepare("DELETE FROM bookshelf WHERE shelfnumber=?"); + my $sth = $dbh->prepare("DELETE FROM virtualshelves WHERE shelfnumber=?"); $sth->execute($shelfnumber); return 0; } @@ -419,53 +409,3 @@ Koha Developement team C4::Circulation::Circ2(3) =cut - -# -# $Log$ -# Revision 1.21 2007/04/04 16:46:22 tipaul -# HUGE COMMIT : code cleaning circulation. -# -# some stuff to do, i'll write a mail on koha-devel NOW ! -# -# Revision 1.20 2007/03/09 14:31:47 tipaul -# rel_3_0 moved to HEAD -# -# Revision 1.15.8.10 2007/01/25 13:18:15 tipaul -# checking that a bookshelf with the same name AND OWNER does not exist before creating it -# -# Revision 1.15.8.9 2006/12/15 17:37:52 toins -# removing a function used only once. -# -# Revision 1.15.8.8 2006/12/14 17:22:55 toins -# bookshelves work perfectly with mod_perl and are cleaned. -# -# Revision 1.15.8.7 2006/12/13 19:46:41 hdl -# Some bug fixing. -# -# Revision 1.15.8.6 2006/12/11 17:10:06 toins -# fixing some bugs on bookshelves. -# -# Revision 1.15.8.5 2006/12/07 16:45:43 toins -# removing warn compilation. (perl -wc) -# -# Revision 1.15.8.4 2006/11/23 09:05:01 tipaul -# enable removal of a bookshelf even if there are items inside -# -# Revision 1.15.8.3 2006/10/30 09:50:20 tipaul -# removing getiteminformations (using direct SQL, as we are in a .pm, so it's "legal") -# -# Revision 1.15.8.2 2006/08/31 16:03:52 toins -# Add Pod to DelShelf -# -# Revision 1.15.8.1 2006/08/30 15:59:14 toins -# Code cleaned according to coding guide lines. -# -# Revision 1.15 2004/12/16 11:30:58 tipaul -# adding bookshelf features : -# * create bookshelf on the fly -# * modify a bookshelf name & status -# -# Revision 1.14 2004/12/15 17:28:23 tipaul -# adding bookshelf features : -# * create bookshelf on the fly -# * modify a bookshelf (this being not finished, will commit the rest soon) diff --git a/Makefile.PL b/Makefile.PL index 611f8b70d1..bb5e56a8f3 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -86,6 +86,7 @@ WriteMakefile( PREREQ_PM => { 'CGI' => 3.15, 'CGI::Carp' => 1.29, +'CGI::Session' => '4.10', 'Class::Accessor' => 0.30, 'DBD::mysql' => 3.0008, 'DBI' => 1.53, diff --git a/help.pl b/help.pl index 0a76f6eb17..7c0743df09 100755 --- a/help.pl +++ b/help.pl @@ -1,27 +1,8 @@ #!/usr/bin/perl - -# Copyright 2006 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 HTML::Template; use strict; require Exporter; -use C4::Output; # contains gettemplate -use C4::Output; - +use C4::Output; # contains gettemplate # use C4::Auth; use C4::Context; use CGI; @@ -29,46 +10,45 @@ use CGI; my $query = new CGI; # find the script that called the online help using the CGI referer() - -my $refer = $query->referer(); - +my $refer = $query->referer(); # workaround for popup not functioning correctly in IE my $referurl = $query->param('url'); -if ($referurl) { +if($referurl){ $refer = $query->param('url'); } $refer =~ /.*koha\/(.*)\.pl.*/; my $from = "help/$1.tmpl"; -my $template = gethelptemplate( $from, "intranet" ); - +my $template = gethelptemplate($from,"intranet"); # my $template output_html_with_http_headers $query, "", $template->output; -sub gethelptemplate { - my ($tmplbase) = @_; - - my $htdocs; - $htdocs = C4::Context->config('intrahtdocs'); - my ( $theme, $lang ) = themelanguage( $htdocs, $tmplbase, "intranet" ); - unless ( -e "$htdocs/$theme/$lang/$tmplbase" ) { - $tmplbase = "help/nohelp.tmpl"; - ( $theme, $lang ) = themelanguage( $htdocs, $tmplbase, "intranet" ); - } - my $template = HTML::Template->new( - filename => "$htdocs/$theme/$lang/$tmplbase", - die_on_bad_params => 0, - global_vars => 1, - path => ["$htdocs/$theme/$lang/includes"] - ); - # XXX temporary patch for Bug 182 for themelang - $template->param( - themelang => '/intranet-tmpl' . "/$theme/$lang", - interface => '/intranet-tmpl', - theme => $theme, - lang => $lang - ); - return $template; +sub gethelptemplate { + my ($tmplbase) = @_; + + my $htdocs; + $htdocs = C4::Context->config('intrahtdocs'); + my ($theme, $lang) = themelanguage($htdocs, $tmplbase, "intranet"); + unless (-e "$htdocs/$theme/$lang/$tmplbase") { + $tmplbase="help/nohelp.tmpl"; + ($theme, $lang) = themelanguage($htdocs, $tmplbase, "intranet"); + } + my $template = HTML::Template->new(filename => "$htdocs/$theme/$lang/$tmplbase", + die_on_bad_params => 0, + global_vars => 1, + path => ["$htdocs/$theme/$lang/includes"]); + + # XXX temporary patch for Bug 182 for themelang + $template->param(themelang => '/intranet-tmpl' . "/$theme/$lang", + interface => '/intranet-tmpl', + theme => $theme, + lang => $lang, + intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"), + intranetstylesheet => C4::Context->preference("intranetstylesheet"), + IntranetNav => C4::Context->preference("IntranetNav"), + referer => $refer, + ); + return $template; } diff --git a/installer/kohastructure.sql b/installer/kohastructure.sql index 144e7d5bb9..adbd4c7a31 100644 --- a/installer/kohastructure.sql +++ b/installer/kohastructure.sql @@ -447,11 +447,11 @@ CREATE TABLE `biblioitems` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- --- Table structure for table `bookshelf` +-- Table structure for table `virtualshelves` -- -DROP TABLE IF EXISTS `bookshelf`; -CREATE TABLE `bookshelf` ( +DROP TABLE IF EXISTS `virtualshelves`; +CREATE TABLE `virtualshelves` ( `shelfnumber` int(11) NOT NULL auto_increment, `shelfname` char(255) default NULL, `owner` char(80) default NULL, @@ -1382,19 +1382,19 @@ CREATE TABLE sessions ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- --- Table structure for table `shelfcontents` +-- Table structure for table `virtualshelfcontents` -- -DROP TABLE IF EXISTS `shelfcontents`; -CREATE TABLE `shelfcontents` ( +DROP TABLE IF EXISTS `virtualshelfcontents`; +CREATE TABLE `virtualshelfcontents` ( `shelfnumber` int(11) NOT NULL default '0', - `itemnumber` int(11) NOT NULL default '0', + `biblionumber` int(11) NOT NULL default '0', `flags` int(11) default NULL, `dateadded` timestamp NULL default NULL, KEY `shelfnumber` (`shelfnumber`), - KEY `itemnumber` (`itemnumber`), - CONSTRAINT `shelfcontents_ibfk_1` FOREIGN KEY (`shelfnumber`) REFERENCES `bookshelf` (`shelfnumber`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `shelfcontents_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE + KEY `biblionumber` (`biblionumber`), + CONSTRAINT `virtualshelfcontents_ibfk_1` FOREIGN KEY (`shelfnumber`) REFERENCES `virtualshelves` (`shelfnumber`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `shelfcontents_ibfk_2` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- diff --git a/koha-tmpl/intranet-tmpl/prog/en/about.tmpl b/koha-tmpl/intranet-tmpl/prog/en/about.tmpl index ff0642972b..d0a53a5799 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/about.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/about.tmpl @@ -5,7 +5,7 @@
-

Data about the current version of Koha for bug reports (or general interest).

+

About Koha

diff --git a/koha-tmpl/intranet-tmpl/prog/en/auth.tmpl b/koha-tmpl/intranet-tmpl/prog/en/auth.tmpl index b91d737dfe..69c6c4b511 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/auth.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/auth.tmpl @@ -43,10 +43,17 @@

-

+

+

+ + +

-
Server information