9 use HTML::Template::Pro;
11 my $dbh = C4::Context->dbh;
13 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
15 template_name => "labels/label-create-layout.tmpl",
19 flagsrequired => { catalogue => 1 },
24 my $data = get_label_options();
25 my $op = $query->param('op');
26 my $layout_id = $query->param('layout_id');
28 my $active_template = GetActiveLabelTemplate();
29 my @label_templates = GetAllLabelTemplates();
30 my @printingtypes = get_printingtypes();
31 my @layouts = get_layouts();
32 my @barcode_types = get_barcode_types();
33 my @batches = get_batches();
35 my @barcode_types = get_barcode_types($layout_id);
36 my @printingtypes = get_printingtypes($layout_id);
38 $layout = get_layout($layout_id) if($layout_id);
40 $template->param( guidebox => 1 ) if ( $data->{'guidebox'} );
41 $template->param( "papertype_$data->{'papertype'}" => 1 );
42 $template->param( "$data->{'barcodetype'}_checked" => 1 );
43 $template->param( "startrow" . $data->{'startrow'} . "_checked" => 1 );
47 active_template => $data->{'active_template'},
48 label_templates => \@label_templates,
49 barcode_types => \@barcode_types,
50 printingtypes => \@printingtypes,
51 layout_loop => \@layouts,
55 barcodetype => $data->{'barcodetype'},
56 papertype => $data->{'papertype'},
57 tx_author => $data->{'author'},
58 tx_barcode => $data->{'barcode'},
59 tx_title => $data->{'title'},
60 tx_subtitle => $data->{'subtitle'},
61 tx_isbn => $data->{'isbn'},
62 tx_issn => $data->{'issn'},
63 tx_itemtype => $data->{'itemtype'},
64 tx_dewey => $data->{'dewey'},
65 tx_class => $data->{'class'},
66 tx_subclass => $data->{'subclass'},
67 tx_itemcallnumber => $data->{'itemcallnumber'},
68 startlabel => $data->{'startlabel'},
70 fontsize => $active_template->{'fontsize'},
73 output_html_with_http_headers $query, $cookie, $template->output;