koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] koha/C4 Labels.pm [dev_week]


From: Mason James
Subject: [Koha-cvs] koha/C4 Labels.pm [dev_week]
Date: Mon, 09 Jul 2007 18:04:50 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         dev_week
Changes by:     Mason James <sushi>     07/07/09 18:04:49

Modified files:
        C4             : Labels.pm 

Log message:
        ptidy

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Labels.pm?cvsroot=koha&only_with_tag=dev_week&r1=1.3.4.20&r2=1.3.4.21

Patches:
Index: Labels.pm
===================================================================
RCS file: /sources/koha/koha/C4/Labels.pm,v
retrieving revision 1.3.4.20
retrieving revision 1.3.4.21
diff -u -b -r1.3.4.20 -r1.3.4.21
--- Labels.pm   9 Jul 2007 18:04:09 -0000       1.3.4.20
+++ Labels.pm   9 Jul 2007 18:04:49 -0000       1.3.4.21
@@ -120,11 +120,10 @@
     return $data;
 }
 
-
-
 sub delete_layout {
     my ($layout_id) = @_;
     my $dbh = C4::Context->dbh;
+
     # get the actual items to be printed.
     my $query = "delete from  labels_conf where id = ?";
     my $sth   = $dbh->prepare($query);
@@ -132,22 +131,15 @@
     $sth->finish;
 }
 
-
-
-
-
-
-
-
 sub get_printingtypes {
     my ($layout_id) = @_;
     my @printtypes;
 
-    push (@printtypes,  { code => 'BAR',    desc => "barcode" });
-     push (@printtypes,  { code => 'BIB',    desc => "biblio" });
-      push (@printtypes,   { code => 'BARBIB', desc => "barcode / biblio" });
-   push (@printtypes,      { code => 'BIBBAR', desc => "biblio / barcode" });
-   push (@printtypes,      { code => 'ALT',    desc => "alternating labels" });
+    push( @printtypes, { code => 'BAR',    desc => "barcode" } );
+    push( @printtypes, { code => 'BIB',    desc => "biblio" } );
+    push( @printtypes, { code => 'BARBIB', desc => "barcode / biblio" } );
+    push( @printtypes, { code => 'BIBBAR', desc => "biblio / barcode" } );
+    push( @printtypes, { code => 'ALT',    desc => "alternating labels" } );
 
     my $conf                = get_layout($layout_id);
     my $active_printtype = $conf->{'printtype'};
@@ -165,20 +157,21 @@
 sub build_text_dropbox {
     my ($order)     = @_;
   
-#  my @fields      = get_text_fields();
-#    my $field_count = scalar @fields;
+    #  my @fields      = get_text_fields();
+    #    my $field_count = scalar @fields;
     my $field_count = 10;    # <-----------       FIXME hard coded
 
     my @lines;
-!$order ? push (@lines, {num => '', selected => '1'}) :  push (@lines, {num => 
''}) ;
+    !$order
+      ? push( @lines, { num => '', selected => '1' } )
+      : push( @lines, { num => '' } );
     for ( my $i = 1 ; $i <= $field_count ; $i++ ) {
         my $line = { num => "$i" };
         $line->{'selected'} = 1 if $i eq $order;
         push( @lines, $line );
     }
-# add a blank row too
-
 
+    # add a blank row too
 
     return @lines;
 }
@@ -296,12 +289,12 @@
     my $barcode = $layout->{'barcodetype'};
     my @array;
 
-    push (@array,  { code => 'CODE39',    desc => 'Code 39' });
-    push (@array,   { code => 'CODE39MOD', desc => 'Code39 + Modulo43' });
-    push (@array,  { code => 'ITF',       desc => 'Interleaved 2 of 5' });
+    push( @array, { code => 'CODE39',    desc => 'Code 39' } );
+    push( @array, { code => 'CODE39MOD', desc => 'Code39 + Modulo43' } );
+    push( @array, { code => 'ITF',       desc => 'Interleaved 2 of 5' } );
 
     foreach my $line (@array) {
-        if ($line->{'code'} eq $barcode) {
+        if ( $line->{'code'} eq $barcode ) {
             $line->{'active'} = 1;
         }
 
@@ -523,8 +516,6 @@
     return;
 }
 
-
-
 sub save_layout  {
 
     my (
@@ -555,7 +546,6 @@
     return;
 }
 
-
 =item get_label_items;
 
         $options = get_label_items()




reply via email to

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