koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] koha koha-tmpl/intranet-tmpl/prog/en/bookshelve... [rel_3_0]


From: Antoine Farnault
Subject: [Koha-cvs] koha koha-tmpl/intranet-tmpl/prog/en/bookshelve... [rel_3_0]
Date: Wed, 30 Aug 2006 16:03:22 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         rel_3_0
Changes by:     Antoine Farnault <toins>        06/08/30 16:03:22

Modified files:
        koha-tmpl/intranet-tmpl/prog/en/bookshelves: shelves.tmpl 
        opac           : opac-shelves.pl 

Log message:
        Code cleaned according to coding guide lines.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/bookshelves/shelves.tmpl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.1&r2=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/opac/opac-shelves.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.8&r2=1.8.2.1

Patches:
Index: koha-tmpl/intranet-tmpl/prog/en/bookshelves/shelves.tmpl
===================================================================
RCS file: 
/sources/koha/koha/koha-tmpl/intranet-tmpl/prog/en/bookshelves/shelves.tmpl,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -b -r1.1 -r1.1.2.1
--- koha-tmpl/intranet-tmpl/prog/en/bookshelves/shelves.tmpl    20 Jul 2005 
18:55:20 -0000      1.1
+++ koha-tmpl/intranet-tmpl/prog/en/bookshelves/shelves.tmpl    30 Aug 2006 
16:03:22 -0000      1.1.2.1
@@ -61,7 +61,7 @@
                                                <td><!-- TMPL_VAR NAME="author" 
--></td> 
                                                <td><!-- TMPL_VAR 
NAME="itemtype" --></td>
                                                <td><!-- TMPL_VAR 
NAME="publicationyear" --></td>
-                                               <td><a 
href="/cgi-bin/koha/request.pl?bib=<!-- TMPL_VAR NAME="biblionumber" 
-->">Reserves</a></td>
+                                               <td><a 
href="/cgi-bin/koha/reserve/request.pl?bib=<!-- TMPL_VAR NAME="biblionumber" 
-->">Reserves</a></td>
                                        </tr>
                                <!-- /TMPL_LOOP -->
                        </table>
@@ -88,12 +88,18 @@
                                
 <!-- TMPL_ELSE -->
        <!-- TMPL_IF Name="shelves" -->
-               <!-- TMPL_IF Name="status1" -->
-                       <!-- TMPL_VAR NAME="string1" -->
+               <!-- TMPL_IF Name="shelfnumber" -->
+                       <!-- TMPL_IF NAME="already" -->
+                Becareful! This shelf already exists.
+            <!-- /TMPL_IF -->
                <!-- /TMPL_IF -->
                <!-- TMPL_LOOP Name="paramsloop" -->
                        <!-- TMPL_IF Name="status" -->
-                               <!-- TMPL_VAR NAME="string" -->
+                <!-- TMPL_IF NAME="count" -->
+                Shelf has <!-- TMPL_VAR NAME="count" --> items on it.  Please 
remove all items before deleting this shelf.
+                <!-- TMPL_ELSE -->
+                The bookshelf has been removed.
+                            <!-- /TMPL_IF -->
                        <!-- /TMPL_IF -->
                <!-- /TMPL_LOOP -->
                                        <form method="post" action="<!-- 
TMPL_VAR NAME="script_name" -->">                                               
               

Index: opac/opac-shelves.pl
===================================================================
RCS file: /sources/koha/koha/opac/opac-shelves.pl,v
retrieving revision 1.8
retrieving revision 1.8.2.1
diff -u -b -r1.8 -r1.8.2.1
--- opac/opac-shelves.pl        21 May 2006 02:30:17 -0000      1.8
+++ opac/opac-shelves.pl        30 Aug 2006 16:03:22 -0000      1.8.2.1
@@ -2,7 +2,7 @@
 #script to provide bookshelf management
 # WARNING: This file uses 4-character tabs!
 #
-# $Header: /sources/koha/koha/opac/opac-shelves.pl,v 1.8 2006/05/21 02:30:17 
kados Exp $
+# $Header: /sources/koha/koha/opac/opac-shelves.pl,v 1.8.2.1 2006/08/30 
16:03:22 toins Exp $
 #
 # Copyright 2000-2002 Katipo Communications
 #
@@ -44,24 +44,24 @@
 if ($query->param('modifyshelfcontents')) {
        my $shelfnumber=$query->param('shelfnumber');
        my $barcode=$query->param('addbarcode');
-       my ($item) = getiteminformation($env, 0, $barcode);
+       my ($item) = getiteminformation(0, $barcode);
        if (ShelfPossibleAction($loggedinuser,$shelfnumber,'manage')) {
-               AddToShelf($env, $item->{'itemnumber'}, $shelfnumber);
+               AddToShelf($item->{'itemnumber'}, $shelfnumber);
                foreach ($query->param) {
                        if (/REM-(\d*)/) {
                                my $itemnumber=$1;
-                               RemoveFromShelf($env, $itemnumber, 
$shelfnumber);
+                               DelFromShelf($itemnumber, $shelfnumber);
                        }
                }
        }
 }
-my ($shelflist) = GetShelfList($loggedinuser,2);
+my ($shelflist) = GetShelves($loggedinuser,2);
 
 $template->param({     loggedinuser => $loggedinuser,
                                });
 SWITCH: {
        if ($query->param('op') eq 'modifsave') {
-               
ModifShelf($query->param('shelfnumber'),$query->param('shelfname'),$loggedinuser,$query->param('category'));
+               
ModShelf($query->param('shelfnumber'),$query->param('shelfname'),$loggedinuser,$query->param('category'));
                last SWITCH;
        }
        if ($query->param('op') eq 'modif') {
@@ -83,7 +83,7 @@
        }
 }
 
-($shelflist) = GetShelfList($loggedinuser,2); # rebuild shelflist in case a 
shelf has been added
+($shelflist) = GetShelves($loggedinuser,2); # rebuild shelflist in case a 
shelf has been added
 
 my $color='';
 my @shelvesloop;
@@ -116,7 +116,7 @@
 # }
 sub shelves {
        if (my $newshelf=$query->param('addshelf')) {
-               my ($status, $string) = 
AddShelf($env,$newshelf,$query->param('owner'),$query->param('category'));
+               my ($status, $string) = 
AddShelf($newshelf,$query->param('owner'),$query->param('category'));
                if ($status) {
                        $template->param(status1 => $status, string1 => 
$string);
                }
@@ -126,7 +126,7 @@
                my %line;
                if (/DEL-(\d+)/) {
                        my $delshelf=$1;
-                       my ($status, $string) = RemoveShelf($env,$delshelf);
+                       my ($status, $string) = DelShelf($delshelf);
                        if ($status) {
                                $line{'status'}=$status;
                                $line{'string'} = $string;
@@ -136,7 +136,7 @@
                push(@paramsloop,\%line);
        }
        $template->param(paramsloop => address@hidden);
-       my ($shelflist) = GetShelfList($loggedinuser,2);
+       my ($shelflist) = GetShelves($loggedinuser,2);
        my $color='';
        my @shelvesloop;
        foreach my $element (sort keys %$shelflist) {
@@ -157,7 +157,7 @@
        my $shelfnumber=shift;
        #check that the user can view the shelf
        return unless (ShelfPossibleAction($loggedinuser,$shelfnumber,'view'));
-       my ($itemlist) = GetShelfContents($env, $shelfnumber);
+       my ($itemlist) = GetShelfContents( $shelfnumber);
        my $item='';
        my $color='';
        my @itemsloop;
@@ -184,6 +184,9 @@
 
 #
 # $Log: opac-shelves.pl,v $
+# Revision 1.8.2.1  2006/08/30 16:03:22  toins
+# Code cleaned according to coding guide lines.
+#
 # Revision 1.8  2006/05/21 02:30:17  kados
 # syncing dev-week and HEAD
 #




reply via email to

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