Revision 6fb7bcc9
Von Moritz Bunkus vor mehr als 13 Jahren hinzugefügt
SL/Form.pm | ||
---|---|---|
640 | 640 |
return $output; |
641 | 641 |
} |
642 | 642 |
|
643 |
sub use_stylesheet { |
|
644 |
my $self = shift; |
|
645 |
|
|
646 |
$self->{stylesheet} = [ $self->{stylesheet} ] unless ref $self->{stylesheet} eq 'ARRAY'; |
|
647 |
$self->{stylesheet} = [ grep { -f } |
|
648 |
map { m:^css/: ? $_ : "css/$_" } |
|
649 |
grep { $_ } |
|
650 |
(@{ $self->{stylesheet} }, @_) |
|
651 |
]; |
|
652 |
|
|
653 |
return @{ $self->{stylesheet} }; |
|
654 |
} |
|
643 | 655 |
|
644 | 656 |
sub header { |
645 | 657 |
$::lxdebug->enter_sub; |
... | ... | |
662 | 674 |
push @header, "<meta http-equiv='refresh' content='$refresh_time;$refresh_url'>"; |
663 | 675 |
} |
664 | 676 |
|
665 |
push @header, "<link rel='stylesheet' href='css/$_' type='text/css' title='Lx-Office stylesheet'>" |
|
666 |
for grep { -f "css/$_" } apply { s|.*/|| } $self->{stylesheet}, $self->{stylesheets}; |
|
677 |
push @header, map { qq|<link rel="stylesheet" href="$_" type="text/css" title="Lx-Office stylesheet">| } $self->use_stylesheet; |
|
667 | 678 |
|
668 | 679 |
push @header, "<style type='text/css'>\@page { size:landscape; }</style>" if $self->{landscape}; |
669 | 680 |
push @header, "<link rel='shortcut icon' href='$self->{favicon}' type='image/x-icon'>" if -f $self->{favicon}; |
... | ... | |
1638 | 1649 |
# Leere Datumseingabe i.O. |
1639 | 1650 |
# SELECT 1 FROM defaults WHERE '' < closedto |
1640 | 1651 |
# normale Zahlungsbuchung ?ber Rechnungsmaske i.O. |
1641 |
# SELECT 1 FROM defaults WHERE '10.05.2011' < closedto
|
|
1652 |
# SELECT 1 FROM defaults WHERE '10.05.2011' < closedto |
|
1642 | 1653 |
# Testf?lle mit definiertem closedto (30.04.2011): |
1643 | 1654 |
# Leere Datumseingabe i.O. |
1644 | 1655 |
# SELECT 1 FROM defaults WHERE '' < closedto |
... | ... | |
3812 | 3823 |
=head2 C<header> |
3813 | 3824 |
|
3814 | 3825 |
Generates a general purpose http/html header and includes most of the scripts |
3815 |
ans stylesheets needed.
|
|
3826 |
and stylesheets needed. Stylesheets can be added with L<use_stylesheet>.
|
|
3816 | 3827 |
|
3817 | 3828 |
Only one header will be generated. If the method was already called in this |
3818 | 3829 |
request it will not output anything and return undef. Also if no |
... | ... | |
3832 | 3843 |
|
3833 | 3844 |
=item stylesheet |
3834 | 3845 |
|
3835 |
=item stylesheets |
|
3836 |
|
|
3837 |
If these are arrayrefs the contents will be inlined into the header. |
|
3846 |
Either a scalar or an array ref. Will be inlined into the header. Add |
|
3847 |
stylesheets with the L<use_stylesheet> function. |
|
3838 | 3848 |
|
3839 | 3849 |
=item landscape |
3840 | 3850 |
|
Auch abrufbar als: Unified diff
kopf.pl auf Controller umgestellt