X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FForm.pm;h=41ccab8d9cca93333ff3ba7f23e76fac960ba8e4;hb=38aac441bd2735f2af58e82f009e8369cf8afb0c;hp=4360c07402a7bf8efaab0ffbd610e76ce0ae0119;hpb=503655261b9f86498c36b634e387938ecd8359a6;p=kivitendo-erp.git diff --git a/SL/Form.pm b/SL/Form.pm index 4360c0740..41ccab8d9 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -643,7 +643,7 @@ sub header { push @header, "" if -f $self->{favicon}; push @header, '', '', - '', + '', '', '', '', @@ -654,6 +654,19 @@ sub header { push @header, sprintf "", join ' - ', grep $_, $self->{title}, $self->{login}, $::myconfig{dbname}, $self->{version} if $self->{title}; + # if there is a title, we put some JavaScript in to the page, wich writes a + # meaningful title-tag for our frameset. + my $title_hack = ''; + if ($self->{title}) { + $title_hack = qq| + |; + } + # output print $self->create_http_response(content_type => 'text/html', charset => $db_charset); print "\n" @@ -680,6 +693,7 @@ EOT $extra_code + $title_hack EOT @@ -1360,7 +1374,6 @@ sub get_formname_translation { bin_list => $main::locale->text('Bin List'), credit_note => $main::locale->text('Credit Note'), invoice => $main::locale->text('Invoice'), - packing_list => $main::locale->text('Packing List'), pick_list => $main::locale->text('Pick List'), proforma => $main::locale->text('Proforma Invoice'), purchase_order => $main::locale->text('Purchase Order'), @@ -1368,7 +1381,6 @@ sub get_formname_translation { sales_order => $main::locale->text('Confirmation'), sales_quotation => $main::locale->text('Quotation'), storno_invoice => $main::locale->text('Storno Invoice'), - storno_packing_list => $main::locale->text('Storno Packing List'), sales_delivery_order => $main::locale->text('Delivery Order'), purchase_delivery_order => $main::locale->text('Delivery Order'), dunning => $main::locale->text('Dunning'), @@ -3211,7 +3223,6 @@ sub save_status { # $main::locale->text('invoice') # $main::locale->text('proforma') # $main::locale->text('sales_order') -# $main::locale->text('packing_list') # $main::locale->text('pick_list') # $main::locale->text('purchase_order') # $main::locale->text('bin_list') @@ -3504,9 +3515,7 @@ Points of interest for a beginner are: =head1 SPECIAL FUNCTIONS -=over 4 - -=item _store_value() +=head2 C<_store_value()> parses a complex var name, and stores it in the form. @@ -3561,7 +3570,7 @@ supported key structures are: filter.status[] => $form->{status}->[ val1, val2, ... ] -=item update_business PARAMS +=head2 C PARAMS PARAMS (not named): \%config, - config hashref @@ -3573,7 +3582,7 @@ handles business (thats customer/vendor types) sequences. special behaviour for empty strings in customerinitnumber field: will in this case not increase the value, and return undef. -=item redirect_header $url +=head2 C $url Generates a HTTP redirection header for the new C<$url>. Constructs an absolute URL including scheme, host name and port. If C<$url> is a @@ -3587,6 +3596,45 @@ Examples: print $::form->redirect_header('oe.pl?action=edit&id=1234'); print $::form->redirect_header('http://www.lx-office.org/'); +=head2 C
+ +Generates a general purpose http/html header and includes most of the scripts +ans stylesheets needed. + +Only one header will be generated. If the method was already called in this +request it will not output anything and return undef. Also if no +HTTP_USER_AGENT is found, no header is generated. + +Although header does not accept parameters itself, it will honor special +hashkeys of its Form instance: + +=over 4 + +=item refresh_time + +=item refresh_url + +If one of these is set, a http-equiv refresh is generated. Missing parameters +default to 3 seconds and the refering url. + +=item stylesheet + +=item stylesheets + +If these are arrayrefs the contents will be inlined into the header. + +=item landscape + +If true, a css snippet will be generated that sets the page in landscape mode. + +=item favicon + +Used to override the default favicon. + +=item title + +A html page title will be generated from this + =back =cut