[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha C4/BookShelves.pm koha-tmpl/intranet-tmpl/... [rel_3_0]
From: |
paul poulain |
Subject: |
[Koha-cvs] koha C4/BookShelves.pm koha-tmpl/intranet-tmpl/... [rel_3_0] |
Date: |
Thu, 23 Nov 2006 09:05:02 +0000 |
CVSROOT: /sources/koha
Module name: koha
Branch: rel_3_0
Changes by: paul poulain <tipaul> 06/11/23 09:05:02
Modified files:
C4 : BookShelves.pm
koha-tmpl/intranet-tmpl/prog/en/bookshelves: shelves.tmpl
Log message:
enable removal of a bookshelf even if there are items inside
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/BookShelves.pm?cvsroot=koha&only_with_tag=rel_3_0&r1=1.15.8.3&r2=1.15.8.4
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.2.8&r2=1.1.2.9
Patches:
Index: C4/BookShelves.pm
===================================================================
RCS file: /sources/koha/koha/C4/BookShelves.pm,v
retrieving revision 1.15.8.3
retrieving revision 1.15.8.4
diff -u -b -r1.15.8.3 -r1.15.8.4
--- C4/BookShelves.pm 30 Oct 2006 09:50:20 -0000 1.15.8.3
+++ C4/BookShelves.pm 23 Nov 2006 09:05:01 -0000 1.15.8.4
@@ -3,7 +3,7 @@
package C4::BookShelves;
-# $Id: BookShelves.pm,v 1.15.8.3 2006/10/30 09:50:20 tipaul Exp $
+# $Id: BookShelves.pm,v 1.15.8.4 2006/11/23 09:05:01 tipaul Exp $
# Copyright 2000-2002 Katipo Communications
#
@@ -30,7 +30,7 @@
use vars qw($VERSION @ISA @EXPORT);
# set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.15.8.3 $' =~ /\d+/g; shift(@v) . "." .
join( "_", map { sprintf "%03d", $_ } @v ); };
+$VERSION = do { my @v = '$Revision: 1.15.8.4 $' =~ /\d+/g; shift(@v) . "." .
join( "_", map { sprintf "%03d", $_ } @v ); };
=head1 NAME
@@ -388,37 +388,16 @@
$Number = DelShelf($shelfnumber);
- this function delete the shelf number $shelfnumber only if
- it is empty.
-
- it returns the number of item already present in the shelf.
- (So, if 0 returns => deletion is successful).
+ this function delete the shelf number, and all of it's content
=cut
#'
sub DelShelf {
my ( $shelfnumber ) = @_;
- my $query =qq(
- SELECT count(*)
- FROM shelfcontents
- WHERE shelfnumber=?
- );
- my $sth = $dbh->prepare($query);
- $sth->execute($shelfnumber);
- my ($count) = $sth->fetchrow;
- if ($count) {
- return $count;
- }
- else {
- my $query = qq(
- DELETE FROM bookshelf
- WHERE shelfnumber=?
- );
- $sth = $dbh->prepare($query);
+ my $sth = $dbh->prepare("DELETE FROM bookshelf WHERE shelfnumber=?");
$sth->execute($shelfnumber);
return 0;
- }
}
END { } # module clean-up code here (global destructor)
@@ -427,6 +406,9 @@
#
# $Log: BookShelves.pm,v $
+# 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")
#
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.2.8
retrieving revision 1.1.2.9
diff -u -b -r1.1.2.8 -r1.1.2.9
--- koha-tmpl/intranet-tmpl/prog/en/bookshelves/shelves.tmpl 30 Oct 2006
09:56:38 -0000 1.1.2.8
+++ koha-tmpl/intranet-tmpl/prog/en/bookshelves/shelves.tmpl 23 Nov 2006
09:05:02 -0000 1.1.2.9
@@ -115,8 +115,17 @@
<th> </th><th>Title</th><th>Item Count</th>
<!-- TMPL_LOOP Name="shelvesloop" -->
<!-- TMPL_IF name="canmanage" -->
-
- <!-- TMPL_IF NAME="toggle" --><tr><!-- TMPL_ELSE
--><tr class="highlight"><!-- /TMPL_IF --><td><!-- TMPL_IF
NAME="shelfbookcount" --><input type="checkbox" name="DEL-<!-- TMPL_VAR
NAME="shelf" -->" disabled="disabled" readonly="readonly" /><!-- TMPL_ELSE
--><input type="checkbox" name="DEL-<!-- TMPL_VAR NAME="shelf" -->" /><!--
/TMPL_IF --></td><td><a href="shelves.pl?viewshelf=<!-- TMPL_VAR name="shelf"
-->"><!-- TMPL_VAR NAME="shelfname" --></a></td><td><!-- TMPL_IF
NAME="shelfbookcount" --><!-- TMPL_VAR NAME="shelfbookcount" --> item(s)*<!--
TMPL_ELSE -->Empty<!-- /TMPL_IF --></td></tr>
+ <!-- TMPL_IF NAME="toggle" --><tr><!-- TMPL_ELSE
--><tr class="highlight"><!-- /TMPL_IF -->
+ <td>
+ <input type="checkbox" name="DEL-<!--
TMPL_VAR NAME="shelf" -->" />
+ </td>
+ <td>
+ <a href="shelves.pl?viewshelf=<!--
TMPL_VAR name="shelf" -->"><!-- TMPL_VAR NAME="shelfname" --></a>
+ </td>
+ <td>
+ <!-- TMPL_IF NAME="shelfbookcount" --><!--
TMPL_VAR NAME="shelfbookcount" --> item(s)*<!-- TMPL_ELSE -->Empty<!-- /TMPL_IF
-->
+ </td>
+ </tr>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP --></table>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] koha C4/BookShelves.pm koha-tmpl/intranet-tmpl/... [rel_3_0],
paul poulain <=