From b44db285a6392839360fc0941f35e8e9fd39a2d4 Mon Sep 17 00:00:00 2001 From: Chris Nighswonger Date: Fri, 24 Jul 2009 23:02:09 -0400 Subject: [PATCH] [10/40] Work on Label Tool Homepage. --- .../prog/en/css/staff-global.css | 4 +- .../prog/en/includes/labels-home-toolbar.inc | 35 +++++++ .../prog/en/includes/labels-menu.inc | 8 +- .../prog/en/modules/labels/label-home.tmpl | 91 ++++--------------- labels/label-home.pl | 70 +------------- 5 files changed, 60 insertions(+), 148 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/labels-home-toolbar.inc diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css index 508fdc3ec3..3d28ee97e7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -534,7 +534,7 @@ fieldset.rows fieldset { } .yui-u fieldset.rows label, .yui-u fieldset.rows span.label { - width: 6em; + width: 10em; } .yui-u fieldset.rows div.hint { @@ -806,7 +806,7 @@ fieldset.rows .inputnote { background-repeat : no-repeat; } -#editpatron a, #editmenuc .first-child, #editshelf a, #edit a, #editsupplier a { +#editpatron a, #editmenuc .first-child, #editshelf a, #edit a, #editsupplier a, #managelabel a, #managetemplate a, #managelabelbatch a, #manageprofile a { padding-left : 34px; background-image: url("../../img/toolbar-edit.gif"); background-position : center left; diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/labels-home-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/labels-home-toolbar.inc new file mode 100644 index 0000000000..09ce2ed76c --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/labels-home-toolbar.inc @@ -0,0 +1,35 @@ + +
+ +
+
+ +
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/labels-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/labels-menu.inc index a19f583bb8..ad2ab988dc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/labels-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/labels-menu.inc @@ -1,9 +1,9 @@ diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-home.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-home.tmpl index 931bde7299..972b178b54 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-home.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-home.tmpl @@ -1,78 +1,19 @@ Koha › Tools › Labels - + - - - - - -
- -
-
-
- - - - -
-
-
-

Set Active Layout

- - - - - - - - - - - - - - - - - - - - - - - - - -
LayoutBarcode TypePrint TypeFields to PrintEditDeleteActive
- - - ">Edit - - ">Delete - -" checked="checked" /> - -" /> - -
-
- -
-
-
- -
-
- - - - -
-
-
- -
-
- + + + +
+
+
+
+ +
+
+
+ +
+
+ diff --git a/labels/label-home.pl b/labels/label-home.pl index 76d55cd30c..f60ab723fc 100755 --- a/labels/label-home.pl +++ b/labels/label-home.pl @@ -4,18 +4,14 @@ use strict; use CGI; use C4::Auth; use C4::Output; -use C4::Labels; -use C4::Output; use C4::Context; use HTML::Template::Pro; -# use Smart::Comments; - -my $query = new CGI; +my $cgi = new CGI; my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { template_name => "labels/label-home.tmpl", - query => $query, + query => $cgi, type => "intranet", authnotrequired => 0, flagsrequired => { catalogue => 1 }, @@ -23,64 +19,4 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( } ); -# little block for displaying active layout/template/batch in templates -# ---------- -my $batch_id = $query->param('batch_id'); -my $active_layout = get_active_layout(); -my $active_template = GetActiveLabelTemplate(); -my $active_layout_name = $active_layout->{'layoutname'}; -my $active_template_name = $active_template->{'tmpl_code'}; -# ---------- - -my $data = get_label_options(); -my $op = $query->param('op'); -my $layout_id = $query->param('layout_id'); - -my @label_templates = GetAllLabelTemplates(); -my @printingtypes = get_printingtypes(); -my @layouts = get_layouts(); -my @barcode_types = get_barcode_types(); -#my @batches = get_batches(); #This is not used afaics -fbcit - -if ($op eq 'delete_layout') { # had been assignment! serious error! - delete_layout($layout_id); -} - -### $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_layout_name => $active_layout_name, - active_template_name => $active_template_name, - - label_templates => \@label_templates, - barcode_types => \@barcode_types, - printingtypes => \@printingtypes, -layout_loop => \@layouts, - -#batches => \@batches, #This is not used afaics -fbcit - 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'}, - -); - -output_html_with_http_headers $query, $cookie, $template->output; +output_html_with_http_headers $cgi, $cookie, $template->output; -- 2.39.5