kivitendo/SL/Layout/Top.pm @ 7d14fe36
b6fd15a8 | Sven Schöling | package SL::Layout::Top;
|
||
4a12c839 | Sven Schöling | |||
use strict;
|
||||
b6fd15a8 | Sven Schöling | use parent qw(SL::Layout::Base);
|
||
4a12c839 | Sven Schöling | |||
6c630204 | Sven Schöling | use SL::Controller::TopQuickSearch;
|
||
a8814e0e | Sven Schöling | sub pre_content {
|
||
4a12c839 | Sven Schöling | my ($self) = @_;
|
||
83de52f1 | Moritz Bunkus | my @options;
|
||
# Only enable the quick search functionality if all database
|
||||
# upgrades have already been applied as quick search requires
|
||||
# certain columns that are only created by said database upgrades.
|
||||
push @options, (quick_search => SL::Controller::TopQuickSearch->new) unless $::request->applying_database_upgrades;
|
||||
9ad27e65 | Sven Schöling | $self->presenter->render('menu/header',
|
||
68dbf4a4 | Sven Schöling | now => DateTime->now_local,
|
||
22744c20 | Moritz Bunkus | is_fastcgi => $::dispatcher ? scalar($::dispatcher->interface_type =~ /fastcgi/i) : 0,
|
||
68dbf4a4 | Sven Schöling | is_links => scalar($ENV{HTTP_USER_AGENT} =~ /links/i),
|
||
83de52f1 | Moritz Bunkus | @options,
|
||
68dbf4a4 | Sven Schöling | );
|
||
4a12c839 | Sven Schöling | }
|
||
a38da2a1 | Sven Schöling | sub static_stylesheets {
|
||
dc4b933b | Sven Schöling | 'frame_header/header.css';
|
||
4a12c839 | Sven Schöling | }
|
||
a38da2a1 | Sven Schöling | sub static_javascripts {
|
||
6c630204 | Sven Schöling | 'jquery-ui.js',
|
||
'kivi.QuickSearch.js',
|
||||
68dbf4a4 | Sven Schöling | }
|
||
4a12c839 | Sven Schöling | 1;
|
||
a2ec076d | Sven Schöling | |||
__END__
|
||||
=encoding utf-8
|
||||
=head1 NAME
|
||||
871a70f0 | Moritz Bunkus | SL::Layout::Top - Top line in classic and v3 menu.
|
||
a2ec076d | Sven Schöling | |||
=head1 DOM MODEL
|
||||
The entire top line is rendered into a div with id C<frame-header>. The following classes are used:
|
||||
frame-header-element: any continuous block of entries
|
||||
frame-header-left: the left floating part
|
||||
frame-header-right: the right floating part
|
||||
frame-header-center: the centered part
|
||||
=head1 BUGS
|
||||
none yet. :)
|
||||
=head1 AUTHOR
|
||||
Sven Schoeling E<lt>s.schoeling@linet-services.deE<gt>
|
||||
=cut
|