From: Moritz Bunkus Date: Mon, 27 Dec 2010 12:51:56 +0000 (+0100) Subject: Funktion zur Ausgabe von Stylesheet-Links X-Git-Tag: release-2.6.2beta1~64^2~25 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=6df470c3418fe5d18402b7890c3c148846a6545b;p=kivitendo-erp.git Funktion zur Ausgabe von Stylesheet-Links Conflicts: SL/Template/Plugin/L.pm --- diff --git a/SL/Template/Plugin/L.pm b/SL/Template/Plugin/L.pm index 34eb730d1..205363343 100644 --- a/SL/Template/Plugin/L.pm +++ b/SL/Template/Plugin/L.pm @@ -238,6 +238,20 @@ sub javascript { return $self->html_tag('script', $data, type => 'text/javascript'); } +sub stylesheet_tag { + my $self = shift; + my $code = ''; + + foreach my $file (@_) { + $file .= '.css' unless $file =~ m/\.css$/; + $file = "css/${file}" unless $file =~ m|/|; + + $code .= qq||; + } + + return $code; +} + sub date_tag { my ($self, $name, $value, @slurp) = @_; my %params = _hashify(@slurp); @@ -486,6 +500,13 @@ tag for each file name parameter passed. Each file name will be postfixed with '.js' if it isn't already and prefixed with 'js/' if it doesn't contain a slash. +=item C + +Creates a HTML 'Elink rel="text/stylesheet" href="..."E' tag +for each file name parameter passed. Each file name will be postfixed +with '.css' if it isn't already and prefixed with 'css/' if it doesn't +contain a slash. + =item C $align_code, %attributes> Creates a date input field, with an attached javascript that will open a