DATEV::CSV Feld Umsatz strikter beschreiben
[kivitendo-erp.git] / SL / Layout / Base.pm
index c470a05..df9c008 100644 (file)
@@ -7,7 +7,7 @@ use List::MoreUtils qw(uniq);
 use Time::HiRes qw();
 
 use Rose::Object::MakeMethods::Generic (
-  'scalar --get_set_init' => [ qw(menu auto_reload_resources_param) ],
+  'scalar --get_set_init' => [ qw(menu auto_reload_resources_param sub_layouts_by_name) ],
   'scalar'                => qw(focus),
   'array'                 => [
     'add_stylesheets_inline' => { interface => 'add', hash_key => 'stylesheets_inline' },
@@ -29,9 +29,16 @@ sub new {
 }
 
 sub init_menu {
-  my @menu_files = qw(menus/erp.ini);
-  unshift @menu_files, 'menus/crm.ini' if $::instance_conf->crm_installed;
-  Menu->new(@menu_files);
+  SL::Menu->new('user');
+}
+
+sub init_sublayouts_by_name {
+  {}
+}
+
+sub get {
+  $_[0]->sub_layouts;
+  return grep { $_ } ($_[0]->sub_layouts_by_name->{$_[1]});
 }
 
 sub init_auto_reload_resources_param {
@@ -71,6 +78,8 @@ sub javascripts_inline {
 
 sub init_sub_layouts { [] }
 
+sub init_sub_layouts_by_name { +{} }
+
 
 #########################################
 # Interface
@@ -115,7 +124,6 @@ sub get_stylesheet_for_user {
   } else {
     $css_path = "$css_path/kivitendo";
   }
-  $::myconfig{css_path} = $css_path; # needed for menunew, FIXME: don't do this here
 
   return $css_path;
 }
@@ -322,7 +330,12 @@ classes, which should be changed. The other points work pretty well.
 
 =head1 BUGS
 
-None yet, if you don't count the horrible stylesheet/javascript interface.
+* stylesheet/javascript interface is a horrible mess.
+
+* It's currently not possible to do compositor layouts without assupmtions
+about the position of the content. That's because the content will return
+control to the actual controller, so the layouts need to know where to split
+pre- and post-content.
 
 =head1 AUTHOR