[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha/barcodes label-add-layout.pl label-edit-la... [dev_week]
From: |
Mason James |
Subject: |
[Koha-cvs] koha/barcodes label-add-layout.pl label-edit-la... [dev_week] |
Date: |
Tue, 10 Jul 2007 10:43:02 +0000 |
CVSROOT: /sources/koha
Module name: koha
Branch: dev_week
Changes by: Mason James <sushi> 07/07/10 10:43:02
Added files:
barcodes : label-add-layout.pl label-edit-layout.pl
Log message:
updating rel2_2 with newer version of barcodes/spinelabels
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/barcodes/label-add-layout.pl?cvsroot=koha&only_with_tag=dev_week&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/barcodes/label-edit-layout.pl?cvsroot=koha&only_with_tag=dev_week&rev=1.1.2.1
Patches:
Index: label-add-layout.pl
===================================================================
RCS file: label-add-layout.pl
diff -N label-add-layout.pl
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ label-add-layout.pl 10 Jul 2007 10:43:01 -0000 1.1.2.1
@@ -0,0 +1,84 @@
+#!/usr/bin/perl
+
+use strict;
+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 Smart::Comments;
+
+my $query = new CGI;
+my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
+ {
+ template_name => "barcodes/label-add-layout.tmpl",
+ query => $query,
+ type => "intranet",
+ authnotrequired => 0,
+ flagsrequired => { catalogue => 1 },
+ debug => 1,
+ }
+);
+
+my $data = get_label_options();
+my $op = $query->param('op');
+
+my $active_template = GetActiveLabelTemplate();
+my @label_templates = GetAllLabelTemplates();
+my @printingtypes = get_printingtypes();
+my @layouts = get_layouts();
+my @barcode_types = get_barcode_types();
+my @batches = get_batches();
+
+if ($op = 'add_layout') {
+}
+
+
+
+
+### $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(
+
+ op => $op,
+ active_template => $data->{'active_template'},
+ label_templates => address@hidden,
+ barcode_types => address@hidden,
+ printingtypes => address@hidden,
+layout_loop => address@hidden,
+
+batches => address@hidden,
+ id => $data->{'id'},
+ barcodetype => $data->{'barcodetype'},
+ 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"),
+);
+
+output_html_with_http_headers $query, $cookie, $template->output;
Index: label-edit-layout.pl
===================================================================
RCS file: label-edit-layout.pl
diff -N label-edit-layout.pl
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ label-edit-layout.pl 10 Jul 2007 10:43:02 -0000 1.1.2.1
@@ -0,0 +1,85 @@
+#!/usr/bin/perl
+
+use strict;
+use CGI;
+use C4::Auth;
+use C4::Context;
+use C4::Output;
+use C4::Labels;
+use C4::Interface::CGI::Output;
+use HTML::Template;
+use POSIX;
+
+#use Data::Dumper;
+#use Smart::Comments;
+
+my $dbh = C4::Context->dbh;
+my $query = new CGI;
+my $layout_id = $query->param('layout_id');
+
+### $query;
+
+my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
+ {
+ template_name => "barcodes/label-edit-layout.tmpl",
+ query => $query,
+ type => "intranet",
+ authnotrequired => 1,
+ flagsrequired => { catalogue => 1 },
+ debug => 1,
+ }
+);
+
+my $layout = get_layout($layout_id);
+ my @barcode_types = get_barcode_types($layout_id);
+my @printingtypes = get_printingtypes($layout_id);
+### @printingtypes
+### $layout
+
+my $layoutname = $layout->{'layoutname'};
+my $layout_id = $layout->{'id'};
+my $guidebox = $layout->{'guidebox'};
+my $startlabel = $layout->{'startlabel'};
+
+my @title = build_text_dropbox( $layout->{'title'} );
+my @author = build_text_dropbox( $layout->{'author'} );
+my @barcode = build_text_dropbox( $layout->{'barcode'} );
+my @isbn = build_text_dropbox( $layout->{'isbn'} );
+my @issn = build_text_dropbox( $layout->{'issn'} );
+my @itemtype = build_text_dropbox( $layout->{'itemtype'} );
+my @dewey = build_text_dropbox( $layout->{'dewey'} );
+my @class = build_text_dropbox( $layout->{'class'} );
+my @subclass = build_text_dropbox( $layout->{'subclass'} );
+my @itemcallnumber = build_text_dropbox( $layout->{'itemcallnumber'} );
+
+
+### @subclass
+
+$template->param(
+ barcode_types => address@hidden,
+ printingtypes => address@hidden,
+
+ layoutname => $layoutname,
+ layout_id => $layout_id,
+
+guidebox => $guidebox,
+startlabel => $startlabel,
+
+ tx_title => address@hidden,
+ tx_author => address@hidden,
+ tx_isbn => address@hidden,
+ tx_issn => address@hidden,
+ tx_itemtype => address@hidden,
+ tx_dewey => address@hidden,
+ tx_barcode => address@hidden,
+ tx_classif => address@hidden,
+ tx_subclass => address@hidden,
+ tx_itemcallnumber => address@hidden,
+
+ intranetcolorstylesheet =>
+ C4::Context->preference("intranetcolorstylesheet"),
+ intranetstylesheet => C4::Context->preference("intranetstylesheet"),
+ IntranetNav => C4::Context->preference("IntranetNav"),
+);
+
+output_html_with_http_headers $query, $cookie, $template->output;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] koha/barcodes label-add-layout.pl label-edit-la... [dev_week],
Mason James <=