koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] koha label-home.pl [rel_2_2]


From: Mason James
Subject: [Koha-cvs] koha label-home.pl [rel_2_2]
Date: Tue, 10 Jul 2007 10:40:48 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         rel_2_2
Changes by:     Mason James <sushi>     07/07/10 10:40:48

Modified files:
        .              : label-home.pl 

Log message:
        updating rel2_2 with newer version of barcodes/spinelabels

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/label-home.pl?cvsroot=koha&only_with_tag=rel_2_2&r1=1.1.2.2&r2=1.1.2.3

Patches:
Index: label-home.pl
===================================================================
RCS file: /sources/koha/koha/Attic/label-home.pl,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -b -r1.1.2.2 -r1.1.2.3
--- label-home.pl       20 Jul 2006 15:48:40 -0000      1.1.2.2
+++ label-home.pl       10 Jul 2007 10:40:48 -0000      1.1.2.3
@@ -4,11 +4,13 @@
 use CGI;
 use C4::Auth;
 use C4::Output;
+use C4::Labels;
 use C4::Interface::CGI::Output;
 use C4::Context;
 use HTML::Template;
 
-#use Data::Dumper;
+use Data::Dumper;
+use Smart::Comments;
 
 my $query = new CGI;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
@@ -22,40 +24,73 @@
     }
 );
 
-my $dbh    = C4::Context->dbh;
-my $query2 = "SELECT * FROM labels_conf LIMIT 1";
-my $sth    = $dbh->prepare($query2);
-$sth->execute();
+# little block for displaying active layout/template/batch in templates
+# ----------
+my $batch_id     = $query->param('batch_id');
+my $active_layout = get_active_layout();
+my $active_template = GetActiveLabelTemplate();
+my $active_layout_name = $active_layout->{'layoutname'};
+my $active_template_name = $active_template->{'tmpl_code'};
+# ----------
 
-my $data = $sth->fetchrow_hashref;
-$sth->finish;
 
-$template->param( guidebox => 1 ) if ( $data->{'guidebox'} );
+my $data = get_label_options();
+my $op =  $query->param('op');
+my $layout_id =  $query->param('layout_id');
+
+my @label_templates = GetAllLabelTemplates();
+my @printingtypes       = get_printingtypes();
+my @layouts       = get_layouts();
+my @barcode_types = get_barcode_types();
+my @batches = get_batches();
+
+if ($op = 'delete_layout') {
+delete_layout($layout_id);
+}
+
 
-$data->{'printingtype'} = 'both' if ( !$data->{'printingtype'} );
-$template->param( "printingtype_$data->{'printingtype'}" => 1 );
 
+ 
+###  $data
+
+$template->param( guidebox => 1 ) if ( $data->{'guidebox'} );
+$template->param( "papertype_$data->{'papertype'}"       => 1 );
 $template->param( "$data->{'barcodetype'}_checked"              => 1 );
 $template->param( "startrow" . $data->{'startrow'} . "_checked" => 1 );
+
 $template->param(
-    itemtype    => $data->{'itemtype'},
-    papertype   => $data->{'papertype'},
-    author      => $data->{'author'},
-    barcode     => $data->{'barcode'},
+    op => $op,
+    active_layout_name => $active_layout_name,
+    active_template_name => $active_template_name,
+
+    label_templates => address@hidden,
+    barcode_types   => address@hidden,
+    printingtypes    => address@hidden,
+layout_loop => address@hidden,
+
+batches => address@hidden,
     id          => $data->{'id'},
     barcodetype => $data->{'barcodetype'},
-    title       => $data->{'title'},
-    isbn        => $data->{'isbn'},
-    dewey       => $data->{'dewey'},
-    class       => $data->{'class'},
-       subclass        => $data->{'subclass'},
-       itemcallnumber => $data->{'itemcallnumber'},
-    startrow    => $data->{'startrow'},
+      papertype => $data->{'papertype'},
+
+    tx_author         => $data->{'author'},
+    tx_barcode        => $data->{'barcode'},
+   tx_title          => $data->{'title'},
+    tx_isbn           => $data->{'isbn'},
+    tx_issn           => $data->{'issn'},
+    tx_itemtype            => $data->{'itemtype'},
+    tx_dewey          => $data->{'dewey'},
+    tx_class          => $data->{'class'},
+    tx_subclass       => $data->{'subclass'},
+    tx_itemcallnumber => $data->{'itemcallnumber'},
+
+    startlabel     => $data->{'startlabel'},
+    fontsize       => $active_template->{'fontsize'},
 
     intranetcolorstylesheet =>
       C4::Context->preference("intranetcolorstylesheet"),
     intranetstylesheet => C4::Context->preference("intranetstylesheet"),
     IntranetNav        => C4::Context->preference("IntranetNav"),
 );
-warn "ITEMCALLNO".$data->{'itemcallnumber'};
+
 output_html_with_http_headers $query, $cookie, $template->output;




reply via email to

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