labels subdir - Dates.pm integration and warnings fixes.
Signed-off-by: Chris Cormack <crc@liblime.com> Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
parent
093e3f5215
commit
67dce57e08
|
|
@ -28,17 +28,11 @@ my $op = $query->param('op');
|
|||
|
||||
my $active_template = GetActiveLabelTemplate();
|
||||
my @label_templates = GetAllLabelTemplates();
|
||||
my @printingtypes = get_printingtypes();
|
||||
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'} );
|
||||
|
|
@ -47,33 +41,31 @@ $template->param( "$data->{'barcodetype'}_checked" => 1 );
|
|||
$template->param( "startrow" . $data->{'startrow'} . "_checked" => 1 );
|
||||
|
||||
$template->param(
|
||||
op => $op,
|
||||
active_template => $data->{'active_template'},
|
||||
label_templates => \@label_templates,
|
||||
barcode_types => \@barcode_types,
|
||||
printingtypes => \@printingtypes,
|
||||
layout_loop => \@layouts,
|
||||
batches => \@batches,
|
||||
|
||||
op => $op,
|
||||
active_template => $data->{'active_template'},
|
||||
label_templates => \@label_templates,
|
||||
barcode_types => \@barcode_types,
|
||||
printingtypes => \@printingtypes,
|
||||
layout_loop => \@layouts,
|
||||
id => $data->{'id'},
|
||||
barcodetype => $data->{'barcodetype'},
|
||||
papertype => $data->{'papertype'},
|
||||
tx_author => $data->{'author'},
|
||||
tx_barcode => $data->{'barcode'},
|
||||
tx_title => $data->{'title'},
|
||||
tx_subtitle => $data->{'subtitle'},
|
||||
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'},
|
||||
|
||||
batches => \@batches,
|
||||
id => $data->{'id'},
|
||||
barcodetype => $data->{'barcodetype'},
|
||||
papertype => $data->{'papertype'},
|
||||
|
||||
tx_author => $data->{'author'},
|
||||
tx_barcode => $data->{'barcode'},
|
||||
tx_title => $data->{'title'},
|
||||
tx_subtitle => $data->{'subtitle'},
|
||||
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'},
|
||||
fontsize => $active_template->{'fontsize'},
|
||||
);
|
||||
|
||||
output_html_with_http_headers $query, $cookie, $template->output;
|
||||
|
|
|
|||
|
|
@ -29,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'} );
|
||||
|
|
@ -52,21 +52,18 @@ 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,
|
||||
|
||||
tx_title => \@title,
|
||||
tx_subtitle => \@subtitle,
|
||||
tx_subtitle => \@subtitle,
|
||||
tx_author => \@author,
|
||||
tx_isbn => \@isbn,
|
||||
tx_issn => \@issn,
|
||||
|
|
|
|||
|
|
@ -75,29 +75,24 @@ if ( $op eq "do_search" ) {
|
|||
# $resultsperpage, $orderby );
|
||||
|
||||
#use Data::Dumper;
|
||||
my $searchquery=$marclist[0];
|
||||
my ($error, $marcresults) = SimpleSearch($searchquery);
|
||||
my $searchquery=$marclist[0];
|
||||
my ($error, $marcresults) = SimpleSearch($searchquery);
|
||||
my $hits = scalar @$marcresults;
|
||||
my @results;
|
||||
|
||||
my $hits = scalar @$marcresults;
|
||||
my @results;
|
||||
my $results;
|
||||
|
||||
|
||||
for(my $i=0;$i<$hits;$i++) {
|
||||
my %resultsloop;
|
||||
my $marcrecord = MARC::File::USMARC::decode($marcresults->[$i]);
|
||||
my $biblio = TransformMarcToKoha(C4::Context->dbh,$marcrecord,'');
|
||||
#build the hash for the template.
|
||||
%resultsloop=%$biblio;
|
||||
$resultsloop{highlight} = ($i % 2)?(1):(0);
|
||||
#warn $resultsloop{biblionumber};
|
||||
|
||||
push @results, \%resultsloop;
|
||||
}
|
||||
for(my $i=0;$i<$hits;$i++) {
|
||||
my %resultsloop;
|
||||
my $marcrecord = MARC::File::USMARC::decode($marcresults->[$i]);
|
||||
my $biblio = TransformMarcToKoha(C4::Context->dbh,$marcrecord,'');
|
||||
#build the hash for the template.
|
||||
%resultsloop=%$biblio;
|
||||
$resultsloop{highlight} = ($i % 2)?(1):(0);
|
||||
#warn $resultsloop{biblionumber};
|
||||
push @results, \%resultsloop;
|
||||
}
|
||||
my @results2;
|
||||
my $i;
|
||||
for ( $i = 0 ; $i <= ( $hits - 1 ) ; $i++ ) {
|
||||
|
||||
my $itemnums = get_itemnumbers_of($results[$i]->{'biblionumber'});
|
||||
|
||||
my $iii = $itemnums->{$results[$i]->{'biblionumber'} } ;
|
||||
|
|
@ -178,8 +173,7 @@ for(my $i=0;$i<$hits;$i++) {
|
|||
# items attached to the bibs not thew bibs themselves
|
||||
|
||||
# my @results2;
|
||||
my $i;
|
||||
for ( $i = 0 ; $i <= ( $total - 1 ) ; $i++ )
|
||||
for (my $i = 0 ; $i <= ( $total - 1 ) ; $i++ )
|
||||
{ #total-1 coz the array starts at 0
|
||||
#warn $i;
|
||||
#warn Dumper $results->[$i]{'bibid'};
|
||||
|
|
@ -188,7 +182,6 @@ for(my $i=0;$i<$hits;$i++) {
|
|||
&ItemInfo( 0, $results->[$i]{'biblionumber'}, $type );
|
||||
|
||||
foreach my $item (@item_results) {
|
||||
|
||||
#warn Dumper $item;
|
||||
push @results2, $item;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,16 +14,12 @@ use POSIX;
|
|||
my $dbh = C4::Context->dbh;
|
||||
my $query = new CGI;
|
||||
my $op = $query->param('op');
|
||||
my $layout_id = $query->param('layout_id');
|
||||
my $layoutname = $query->param('layoutname');
|
||||
my $layout_id = $query->param('layout_id');
|
||||
my $layoutname = $query->param('layoutname');
|
||||
my $barcodetype = $query->param('barcodetype');
|
||||
|
||||
|
||||
my $bcn = $query->param('tx_barcode');
|
||||
my $author = $query->param('tx_author');
|
||||
|
||||
my $bcn = $query->param('tx_barcode');
|
||||
my $title = $query->param('tx_title');
|
||||
my $subtitle = $query->param('tx_subtitle');
|
||||
my $subtitle = $query->param('tx_subtitle');
|
||||
my $isbn = $query->param('tx_isbn');
|
||||
my $issn = $query->param('tx_issn');
|
||||
my $itemtype = $query->param('tx_itemtype');
|
||||
|
|
|
|||
Loading…
Reference in New Issue