[otrs-cvs] ImportExport/Kernel/Modules AdminImportExport.pm, 1.8, 1.9

cvs-log at otrs.org cvs-log at otrs.org
Mon Feb 4 15:21:26 GMT 2008


Comments:
Update of /home/cvs/ImportExport/Kernel/Modules
In directory lancelot:/tmp/cvs-serv15660/Kernel/Modules

Modified Files:
	AdminImportExport.pm 
Log Message:
Improved modularisation.

Author: mh

Index: AdminImportExport.pm
===================================================================
RCS file: /home/cvs/ImportExport/Kernel/Modules/AdminImportExport.pm,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** AdminImportExport.pm	4 Feb 2008 12:19:54 -0000	1.8
--- AdminImportExport.pm	4 Feb 2008 15:21:21 -0000	1.9
***************
*** 66,70 ****
  
              # get needed data
-             $TemplateData->{Type}   = $Self->{ParamObject}->GetParam( Param => 'Type' );
              $TemplateData->{Object} = $Self->{ParamObject}->GetParam( Param => 'Object' );
              $TemplateData->{Format} = $Self->{ParamObject}->GetParam( Param => 'Format' );
--- 66,69 ----
***************
*** 72,76 ****
              # redirect to overview
              return $Self->{LayoutObject}->Redirect( OP => "Action=$Self->{Action}" )
!                 if !$TemplateData->{Object} || !$TemplateData->{Format} || !$TemplateData->{Type};
          }
          else {
--- 71,75 ----
              # redirect to overview
              return $Self->{LayoutObject}->Redirect( OP => "Action=$Self->{Action}" )
!                 if !$TemplateData->{Object} || !$TemplateData->{Format};
          }
          else {
***************
*** 83,95 ****
          }
  
-         # generate TypeOptionStrg
-         my $TypeOptionStrg = $Self->{LayoutObject}->BuildSelection(
-             Data => [ 'Import', 'Export' ],
-             Name => 'Type',
-             SelectedID   => $TemplateData->{Type},
-             PossibleNone => 1,
-             Translation  => 1,
-         );
- 
          # generate ObjectOptionStrg
          my $ObjectOptionStrg = $Self->{LayoutObject}->BuildSelection(
--- 82,85 ----
***************
*** 115,119 ****
              Data => {
                  %Param,
-                 TypeOptionStrg   => $TypeOptionStrg,
                  ObjectOptionStrg => $ObjectOptionStrg,
                  FormatOptionStrg => $FormatOptionStrg,
--- 105,108 ----
***************
*** 162,166 ****
  
          # get params
!         for my $Param (qw(TemplateID Type Object Format Name ValidID Comment)) {
              $TemplateData->{$Param} = $Self->{ParamObject}->GetParam( Param => $Param ) || '';
          }
--- 151,155 ----
  
          # get params
!         for my $Param (qw(TemplateID Object Format Name ValidID Comment)) {
              $TemplateData->{$Param} = $Self->{ParamObject}->GetParam( Param => $Param ) || '';
          }
***************
*** 236,248 ****
          );
  
-         # generate TypeOptionStrg
-         my $TypeOptionStrg = $Self->{LayoutObject}->BuildSelection(
-             Data => [ 'Import', 'Export' ],
-             Name => 'Type',
-             SelectedID   => $TemplateData->{Type},
-             PossibleNone => 1,
-             Translation  => 1,
-         );
- 
          # generate ObjectOptionStrg
          my $ObjectOptionStrg = $Self->{LayoutObject}->BuildSelection(
--- 225,228 ----
***************
*** 268,272 ****
              Data => {
                  %Param,
-                 TypeOptionStrg   => $TypeOptionStrg,
                  ObjectOptionStrg => $ObjectOptionStrg,
                  FormatOptionStrg => $FormatOptionStrg,
--- 248,251 ----
***************
*** 407,419 ****
          );
  
-         # generate TypeOptionStrg
-         my $TypeOptionStrg = $Self->{LayoutObject}->BuildSelection(
-             Data => [ 'Import', 'Export' ],
-             Name => 'Type',
-             SelectedID   => $TemplateData->{Type},
-             PossibleNone => 1,
-             Translation  => 1,
-         );
- 
          # generate ObjectOptionStrg
          my $ObjectOptionStrg = $Self->{LayoutObject}->BuildSelection(
--- 386,389 ----
***************
*** 439,443 ****
              Data => {
                  %Param,
-                 TypeOptionStrg   => $TypeOptionStrg,
                  ObjectOptionStrg => $ObjectOptionStrg,
                  FormatOptionStrg => $FormatOptionStrg,
--- 409,412 ----
***************
*** 578,590 ****
          );
  
-         # generate TypeOptionStrg
-         my $TypeOptionStrg = $Self->{LayoutObject}->BuildSelection(
-             Data => [ 'Import', 'Export' ],
-             Name => 'Type',
-             SelectedID   => $TemplateData->{Type},
-             PossibleNone => 1,
-             Translation  => 1,
-         );
- 
          # generate ObjectOptionStrg
          my $ObjectOptionStrg = $Self->{LayoutObject}->BuildSelection(
--- 547,550 ----
***************
*** 610,614 ****
              Data => {
                  %Param,
-                 TypeOptionStrg   => $TypeOptionStrg,
                  ObjectOptionStrg => $ObjectOptionStrg,
                  FormatOptionStrg => $FormatOptionStrg,
--- 570,573 ----
***************
*** 616,620 ****
          );
  
!         # output list
          $Self->{LayoutObject}->Block(
              Name => 'TemplateEdit4',
--- 575,579 ----
          );
  
!         # output headline
          $Self->{LayoutObject}->Block(
              Name => 'TemplateEdit4',
***************
*** 626,659 ****
          );
  
! #        # get format attributes
! #        my $FormatAttributeList = $Self->{ImportExportObject}->FormatAttributesGet(
! #            TemplateID => $TemplateData->{TemplateID},
! #            UserID     => $Self->{UserID},
! #        );
! #
! #        # get format data
! #        my $FormatData = $Self->{ImportExportObject}->FormatDataGet(
! #            TemplateID => $TemplateData->{TemplateID},
! #            UserID     => $Self->{UserID},
! #        );
! #
! #        # output format attributes
! #        for my $Item ( @{$FormatAttributeList} ) {
! #
! #            # create form input
! #            my $InputString = $Self->{LayoutObject}->ImportExportFormInputCreate(
! #                Item  => $Item,
! #                Value => $FormatData->{ $Item->{Key} },
! #            );
! #
! #            # output attribute row
! #            $Self->{LayoutObject}->Block(
! #                Name => 'TemplateEdit4Row',
! #                Data => {
! #                    Name      => $Item->{Name} || '',
! #                    InputStrg => $InputString,
! #                },
! #            );
! #        }
  
          # output header and navbar
--- 585,609 ----
          );
  
!         for (1..3) {
! 
!             # output attribute row
!             $Self->{LayoutObject}->Block(
!                 Name => 'TemplateEdit4Row',
!             );
! 
!             for (1..3) {
!                 # output attribute row
!                 $Self->{LayoutObject}->Block(
!                     Name => 'TemplateEdit4RowObject',
!                 );
!             }
! 
!             for (1..2) {
!                 # output attribute row
!                 $Self->{LayoutObject}->Block(
!                     Name => 'TemplateEdit4RowFormat',
!                 );
!             }
!         }
  
          # output header and navbar
***************
*** 757,768 ****
              if !$FormatList;
  
-         # generate TypeOptionStrg
-         my $TypeOptionStrg = $Self->{LayoutObject}->BuildSelection(
-             Data => [ 'Import', 'Export' ],
-             Name => 'Type',
-             PossibleNone => 1,
-             Translation  => 1,
-         );
- 
          # generate ObjectOptionStrg
          my $ObjectOptionStrg = $Self->{LayoutObject}->BuildSelection(
--- 707,710 ----
***************
*** 786,790 ****
              Data => {
                  %Param,
-                 TypeOptionStrg   => $TypeOptionStrg,
                  ObjectOptionStrg => $ObjectOptionStrg,
                  FormatOptionStrg => $FormatOptionStrg,
--- 728,731 ----


More information about the cvs-log mailing list