Menu: HTML MenĂ¼ parsing n+1 beseitigt
[kivitendo-erp.git] / SL / Layout / Top.pm
1 package SL::Layout::Top;
2
3 use strict;
4 use parent qw(SL::Layout::Base);
5
6 sub pre_content {
7   my ($self) = @_;
8
9   $self->presenter->render('menu/header',
10     now        => DateTime->now_local,
11     is_fastcgi => $::dispatcher ? scalar($::dispatcher->interface_type =~ /fastcgi/i) : (),
12     is_links   => scalar($ENV{HTTP_USER_AGENT}         =~ /links/i),
13   );
14 }
15
16 sub stylesheets {
17  'frame_header/header.css';
18 }
19
20 sub javascripts {
21   ('js/quicksearch_input.js') x!! $::auth->assert('customer_vendor_edit', 1),
22   ('js/glquicksearch.js')     x!! $::auth->assert('general_ledger', 1)
23 }
24
25 1;
26
27 __END__
28
29 =encoding utf-8
30
31 =head1 NAME
32
33 SL::Layout::Top - Top line in classic and v3 menu.
34
35 =head1 DOM MODEL
36
37 The entire top line is rendered into a div with id C<frame-header>. The following classes are used:
38
39   frame-header-element: any continuous block of entries
40   frame-header-left:    the left floating part
41   frame-header-right:   the right floating part
42   frame-header-center:  the centered part
43
44 =head1 BUGS
45
46 none yet. :)
47
48 =head1 AUTHOR
49
50 Sven Schoeling E<lt>s.schoeling@linet-services.deE<gt>
51
52 =cut