Bug Fixing : Memberentry was broken.
[koha.git] / labels / label-create-layout.pl
1 #!/usr/bin/perl
2
3 use strict;
4 use CGI;
5 use C4::Auth;
6 use C4::Output;
7 use C4::Labels;
8 use C4::Context;
9 use HTML::Template;
10
11 #use Data::Dumper;
12 #use Smart::Comments;
13
14 my $query = new CGI;
15 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
16     {
17         template_name   => "labels/label-create-layout.tmpl",
18         query           => $query,
19         type            => "intranet",
20         authnotrequired => 0,
21         flagsrequired   => { catalogue => 1 },
22         debug           => 1,
23     }
24 );
25
26 my $data = get_label_options();
27 my $op =  $query->param('op');
28
29 my $active_template = GetActiveLabelTemplate();
30 my @label_templates = GetAllLabelTemplates();
31 my @printingtypes       = get_printingtypes();
32 my @layouts       = get_layouts();
33 my @barcode_types = get_barcode_types();
34 my @batches = get_batches();
35
36 if ($op = 'add_layout') {
37 }
38
39
40
41  
42 ###  $data
43
44 $template->param( guidebox => 1 ) if ( $data->{'guidebox'} );
45 $template->param( "papertype_$data->{'papertype'}"       => 1 );
46 $template->param( "$data->{'barcodetype'}_checked" => 1 );
47 $template->param( "startrow" . $data->{'startrow'} . "_checked" => 1 );
48
49 $template->param(
50
51     op => $op,
52     active_template => $data->{'active_template'},
53     label_templates => \@label_templates,
54     barcode_types   => \@barcode_types,
55     printingtypes    => \@printingtypes,
56 layout_loop => \@layouts,
57
58 batches => \@batches,
59      id             => $data->{'id'},
60     barcodetype    => $data->{'barcodetype'},
61       papertype => $data->{'papertype'},
62
63     tx_author         => $data->{'author'},
64     tx_barcode        => $data->{'barcode'},
65    tx_title          => $data->{'title'},
66    tx_subtitle          => $data->{'subtitle'},
67     tx_isbn           => $data->{'isbn'},
68     tx_issn           => $data->{'issn'},
69     tx_itemtype            => $data->{'itemtype'},
70     tx_dewey          => $data->{'dewey'},
71     tx_class          => $data->{'class'},
72     tx_subclass       => $data->{'subclass'},
73     tx_itemcallnumber => $data->{'itemcallnumber'},
74
75     startlabel     => $data->{'startlabel'},
76     fontsize       => $active_template->{'fontsize'},
77
78     intranetcolorstylesheet =>
79       C4::Context->preference("intranetcolorstylesheet"),
80     intranetstylesheet => C4::Context->preference("intranetstylesheet"),
81     IntranetNav        => C4::Context->preference("IntranetNav"),
82 );
83
84 output_html_with_http_headers $query, $cookie, $template->output;