Bugs, Doku Stub
authorSven Schöling <s.schoeling@linet-services.de>
Fri, 4 Oct 2013 08:38:50 +0000 (10:38 +0200)
committerSven Schöling <s.schoeling@linet-services.de>
Mon, 14 Oct 2013 09:56:12 +0000 (11:56 +0200)
SL/Controller/DeliveryPlan.pm
SL/Controller/Helper/GetModels/Base.pm
SL/Controller/Helper/GetModels/Sorted.pm
SL/Controller/Project.pm

index 348b553..da114d8 100644 (file)
@@ -198,19 +198,16 @@ sub init_models {
   my ($self) = @_;
 
   SL::Controller::Helper::GetModels->new(
   my ($self) = @_;
 
   SL::Controller::Helper::GetModels->new(
-    controller => $self,
-    model  => 'OrderItem',
-    filtered => {
-      launder_to => 'filter',
-    },
-    sorted => {
-      _default => {
-        by        => 'reqdate',
-        dir       => 1,
+    controller   => $self,
+    model        => 'OrderItem',
+    sorted       => {
+      _default     => {
+        by           => 'reqdate',
+        dir          => 1,
       },
       %sort_columns,
     },
       },
       %sort_columns,
     },
-    query => $delivery_plan_query,
+    query        => $delivery_plan_query,
     with_objects => [ 'order', 'order.customer', 'part' ],
   );
 }
     with_objects => [ 'order', 'order.customer', 'part' ],
   );
 }
index 6a9a9cd..9327c31 100644 (file)
@@ -43,3 +43,42 @@ sub is_enabled {
 }
 
 1;
 }
 
 1;
+
+__END__
+
+=encoding utf-8
+
+=head1 NAME
+
+SL::Controller::Helper::GetModels::Base - base class for GetModels plugins
+
+=head1 SYNOPSIS
+
+  package SL::Controller::Helper::Getmodels::...;
+  use parent 'SL::Controller::Helper::Getmodels::Base'
+
+  sub read_params { ... }
+
+  sub finalize { ... }
+
+=head1 DESCRIPTION
+
+This is a base class for plugins of the GetModels framework for controllers. It
+provides some common ground.
+
+=head1 FUNCTIONS
+
+=over 4
+
+=back
+
+=head1 BUGS AND CAVEATS
+
+None yet :)
+
+=head1 AUTHOR
+
+Sven Schöling E<lt>s.schoeling@linet-services.deE<gt>
+
+=cut
+
index dee8681..14e733d 100644 (file)
@@ -146,7 +146,7 @@ In a controller:
   use SL::Controller::Helper::GetModels;
   use SL::Controller::Helper::Sorted;
 
   use SL::Controller::Helper::GetModels;
   use SL::Controller::Helper::Sorted;
 
-  __PACKAGE__->make_sorted(
+  __PACKAGE__->make_sorted(                                     # update this
     DEFAULT_BY   => 'run_at',
     DEFAULT_DIR  => 1,
     MODEL        => 'BackgroundJobHistory',
     DEFAULT_BY   => 'run_at',
     DEFAULT_DIR  => 1,
     MODEL        => 'BackgroundJobHistory',
@@ -170,7 +170,7 @@ In said template:
 
   <table>
    <tr>
 
   <table>
    <tr>
-    <th>[% L.sortable_table_header('package_name') %]</th>
+    <th>[% L.sortable_table_header('package_name') %]</th>         # models
     <th>[% L.sortable_table_header('run_at') %]</th>
     <th>[% L.sortable_table_header('error') %]</th>
    </tr>
     <th>[% L.sortable_table_header('run_at') %]</th>
     <th>[% L.sortable_table_header('error') %]</th>
    </tr>
@@ -190,7 +190,7 @@ This specialized helper module enables controllers to display a
 sortable list of database models with as few lines as possible.
 
 For this to work the controller has to provide the information which
 sortable list of database models with as few lines as possible.
 
 For this to work the controller has to provide the information which
-indexes are eligible for sorting etc. by a call to L<make_sorted> at
+indexes are eligible for sorting etc. by a call to L<make_sorted> at  #not compiletime
 compile time.
 
 The underlying functionality that enables the use of more than just
 compile time.
 
 The underlying functionality that enables the use of more than just
@@ -214,7 +214,7 @@ parameters that were used in the current view.
 
 =over 4
 
 
 =over 4
 
-=item C<make_sorted %sort_spec>
+=item C<make_sorted %sort_spec>                                         # meh complete rewrite
 
 This function must be called by a controller at compile time. It is
 uesd to set the various parameters required for this helper to do its
 
 This function must be called by a controller at compile time. It is
 uesd to set the various parameters required for this helper to do its
index 720c93d..23101da 100644 (file)
@@ -207,7 +207,6 @@ sub prepare_report {
     controller_class      => 'Project',
     output_format         => 'HTML',
     top_info_text         => $::locale->text('Projects'),
     controller_class      => 'Project',
     output_format         => 'HTML',
     top_info_text         => $::locale->text('Projects'),
-    raw_bottom_info_text  => $self->render('project/report_bottom', { output => 0 }),
     title                 => $::locale->text('Projects'),
     allow_pdf_export      => 1,
     allow_csv_export      => 1,
     title                 => $::locale->text('Projects'),
     allow_pdf_export      => 1,
     allow_csv_export      => 1,
@@ -219,7 +218,6 @@ sub prepare_report {
   $self->models->disable_pagination if $report->{options}{output_format} =~ /^(pdf|csv)$/i;
   $self->models->set_report_generator_sort_options(report => $report, sortable_columns => \@sortable);
   $report->set_options(
   $self->models->disable_pagination if $report->{options}{output_format} =~ /^(pdf|csv)$/i;
   $self->models->set_report_generator_sort_options(report => $report, sortable_columns => \@sortable);
   $report->set_options(
-    top_info_text         => $::locale->text('Projects'),
     raw_bottom_info_text  => $self->render('project/report_bottom', { output => 0 }),
   );
 }
     raw_bottom_info_text  => $self->render('project/report_bottom', { output => 0 }),
   );
 }