(MT 3267) Add Homebranch and Holdingbranch search criterion on circulation stat.
[koha.git] / labels / label-edit-layout.pl
index 28f45c5..17ecd72 100755 (executable)
@@ -6,8 +6,7 @@ use C4::Auth;
 use C4::Context;
 use C4::Output;
 use C4::Labels;
-use C4::Interface::CGI::Output;
-use HTML::Template;
+use HTML::Template::Pro;
 use POSIX;
 
 #use Data::Dumper;
@@ -21,7 +20,7 @@ my $layout_id = $query->param('layout_id');
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
-        template_name   => "barcodes/label-edit-layout.tmpl",
+        template_name   => "labels/label-edit-layout.tmpl",
         query           => $query,
         type            => "intranet",
         authnotrequired => 1,
@@ -30,19 +29,19 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     }
 );
 
-my $layout = get_layout($layout_id);
- my @barcode_types = get_barcode_types($layout_id);
-my @printingtypes       = get_printingtypes($layout_id);
+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'};
+   $layout_id  = $layout->{'id'};      # has it changed since we set it above?  --joe
+my $layoutname = $layout->{'layoutname'};
+my $guidebox   = $layout->{'guidebox'};
+my $startlabel = $layout->{'startlabel'};
 
 my @title          = build_text_dropbox( $layout->{'title'} );
-my @subtitle          = build_text_dropbox( $layout->{'subtitle'} );
+my @subtitle       = build_text_dropbox( $layout->{'subtitle'} );
 my @author         = build_text_dropbox( $layout->{'author'} );
 my @barcode        = build_text_dropbox( $layout->{'barcode'} );
 my @isbn           = build_text_dropbox( $layout->{'isbn'} );
@@ -53,21 +52,20 @@ 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 => \@barcode_types,
-    printingtypes => \@printingtypes,
-
-    layoutname => $layoutname,
-    layout_id => $layout_id,
-
-guidebox => $guidebox,
-startlabel => $startlabel,
-
+       barcode_types => \@barcode_types,
+       printingtypes => \@printingtypes,
+       layoutname    => $layoutname,
+       layout_id     => $layout_id,
+       guidebox      => $guidebox,
+       startlabel    => $startlabel,
+    formatstring    =>  $layout->{'formatstring'},
+    callnum_split   =>  $layout->{'callnum_split'},
+    'justify_' . $layout->{'text_justify'} => 1,
     tx_title          => \@title,
-    tx_subtitle          => \@subtitle,
+    tx_subtitle       => \@subtitle,
     tx_author         => \@author,
     tx_isbn           => \@isbn,
     tx_issn           => \@issn,
@@ -77,11 +75,6 @@ startlabel => $startlabel,
     tx_classif        => \@class,
     tx_subclass       => \@subclass,
     tx_itemcallnumber => \@itemcallnumber,
-
-    intranetcolorstylesheet =>
-      C4::Context->preference("intranetcolorstylesheet"),
-    intranetstylesheet => C4::Context->preference("intranetstylesheet"),
-    IntranetNav        => C4::Context->preference("IntranetNav"),
 );
 
 output_html_with_http_headers $query, $cookie, $template->output;