koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] koha catalogue/ISBDdetail.pl koha-tmpl/intranet...


From: Bruno Toumi
Subject: [Koha-cvs] koha catalogue/ISBDdetail.pl koha-tmpl/intranet...
Date: Fri, 25 May 2007 09:27:46 +0000

CVSROOT:        /cvsroot/koha
Module name:    koha
Changes by:     Bruno Toumi <btoumi>    07/05/25 09:27:46

Modified files:
        catalogue      : ISBDdetail.pl 
        koha-tmpl/intranet-tmpl/prog/en/catalogue: ISBDdetail.tmpl 

Log message:
        add security when u delete biblio :
        u must delete linked items before delete biblio

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/catalogue/ISBDdetail.pl?cvsroot=koha&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/catalogue/ISBDdetail.tmpl?cvsroot=koha&r1=1.5&r2=1.6

Patches:
Index: catalogue/ISBDdetail.pl
===================================================================
RCS file: /cvsroot/koha/koha/catalogue/ISBDdetail.pl,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- catalogue/ISBDdetail.pl     22 May 2007 08:55:47 -0000      1.9
+++ catalogue/ISBDdetail.pl     25 May 2007 09:27:46 -0000      1.10
@@ -170,7 +170,9 @@
 
 # remove empty ()
 $res =~ s/\(\)//g;
-
+# count of item linked with biblio
+my $itemcount = GetItemsCount($biblionumber);
+$template->param( count => $itemcount);
 my $subscriptionsnumber = CountSubscriptionFromBiblionumber($biblionumber);
  
 if ($subscriptionsnumber) {

Index: koha-tmpl/intranet-tmpl/prog/en/catalogue/ISBDdetail.tmpl
===================================================================
RCS file: 
/cvsroot/koha/koha/koha-tmpl/intranet-tmpl/prog/en/catalogue/ISBDdetail.tmpl,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- koha-tmpl/intranet-tmpl/prog/en/catalogue/ISBDdetail.tmpl   11 Mar 2007 
21:08:12 -0000      1.5
+++ koha-tmpl/intranet-tmpl/prog/en/catalogue/ISBDdetail.tmpl   25 May 2007 
09:27:46 -0000      1.6
@@ -19,11 +19,26 @@
 function Dopop(link) {
     
newin=window.open(link,'popup','width=500,height=400,toolbar=false,scrollbars=yes');
 }
-function confirm_deletion() {
-    var is_confirmed = confirm('Are you sure you want to delete this biblio?');
+
+function confirm_deletion(count) {
+        var is_confirmed;
+       if (count>0){
+                   is_confirmed= alert('you have [ '+ count +' ] item(s) 
linked \n you must delete all items before delete this biblio');
+                   }
+        else{
+                   is_confirmed= confirm('Are you sure you want to delete this 
biblio? ');
+       }
+
+    
     if (is_confirmed) {
+        if (count>0){
+//     window.location="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- 
TMPL_VAR NAME="biblionumber" -->";
+       }
+       else{
         
window.location="/cgi-bin/koha/cataloguing/addbiblio.pl?op=delete&amp;biblionumber=<!--
 TMPL_VAR NAME="biblionumber" -->";
     }
+               
+    }
 }
 
 </script>




reply via email to

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