X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=SL%2FLayout%2FTop.pm;h=471d6128dc01303baa7869a890a32336a954f180;hb=08e48f66590f580cbe2c8e3df76883d88b4c0fef;hp=165134ddce2203b970642e17fbb84b4a420b0fb2;hpb=4ee1cfb08ed71173331fe2de06e83a5b2b81e6a2;p=kivitendo-erp.git diff --git a/SL/Layout/Top.pm b/SL/Layout/Top.pm index 165134ddc..471d6128d 100644 --- a/SL/Layout/Top.pm +++ b/SL/Layout/Top.pm @@ -3,23 +3,32 @@ package SL::Layout::Top; use strict; use parent qw(SL::Layout::Base); +use SL::Controller::TopQuickSearch; + sub pre_content { my ($self) = @_; + 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; + $self->presenter->render('menu/header', now => DateTime->now_local, - is_fastcgi => $::dispatcher ? scalar($::dispatcher->interface_type =~ /fastcgi/i) : (), + is_fastcgi => $::dispatcher ? scalar($::dispatcher->interface_type =~ /fastcgi/i) : 0, is_links => scalar($ENV{HTTP_USER_AGENT} =~ /links/i), + @options, ); } -sub stylesheets { +sub static_stylesheets { 'frame_header/header.css'; } -sub javascripts { - ('js/quicksearch_input.js') x!! $::auth->assert('customer_vendor_edit', 1), - ('js/glquicksearch.js') x!! $::auth->assert('general_ledger', 1) +sub static_javascripts { + 'jquery-ui.js', + 'kivi.QuickSearch.js', } 1;