[otrs-cvs] CVS: FAQ/Kernel/Modules CustomerFAQ.pm,1.1.1.1,1.2

cvs-log at otrs.org cvs-log at otrs.org
Mon Oct 2 17:58:23 CEST 2006


Update of /home/cvs/FAQ/Kernel/Modules
In directory lancelot:/tmp/cvs-serv32667/Kernel/Modules

Modified Files:
	CustomerFAQ.pm 
Log Message:
added subaction search

Index: CustomerFAQ.pm
===================================================================
RCS file: /home/cvs/FAQ/Kernel/Modules/CustomerFAQ.pm,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** CustomerFAQ.pm	29 Jun 2006 09:29:51 -0000	1.1.1.1
--- CustomerFAQ.pm	2 Oct 2006 14:58:21 -0000	1.2
***************
*** 1,5 ****
  # --
  # Kernel/Modules/CustomerFAQ.pm - faq module
! # Copyright (C) 2001-2005 Martin Edenhofer <martin+code at otrs.org>
  # --
  # $Id$
--- 1,5 ----
  # --
  # Kernel/Modules/CustomerFAQ.pm - faq module
! # Copyright (C) 2001-2006 OTRS GmbH, http://otrs.org/
  # --
  # $Id$
***************
*** 26,40 ****
      my $Type = shift;
      my %Param = @_;
!         
      # allocate new hash for object
!     # ********************************************************** #            
!     my $Self = new Kernel::Modules::FAQ(%Param);    
!     bless ($Self, $Type);    
  
      # interface settings
!     # ********************************************************** # 
      $Self->{Interface} = $Self->{FAQObject}->StateTypeGet(
          Name => 'external'
!     );        
      $Self->{InterfaceStates} = $Self->{FAQObject}->StateTypeList(
          Types => ['external','public']
--- 26,40 ----
      my $Type = shift;
      my %Param = @_;
! 
      # allocate new hash for object
!     # ********************************************************** #
!     my $Self = new Kernel::Modules::FAQ(%Param);
!     bless ($Self, $Type);
  
      # interface settings
!     # ********************************************************** #
      $Self->{Interface} = $Self->{FAQObject}->StateTypeGet(
          Name => 'external'
!     );
      $Self->{InterfaceStates} = $Self->{FAQObject}->StateTypeList(
          Types => ['external','public']
***************
*** 42,46 ****
  
      # check needed Opjects
!     # ********************************************************** #            
      foreach (qw(UserObject)) {
          $Self->{LayoutObject}->FatalError(Message => "Got no $_!") if (!$Self->{$_});
--- 42,46 ----
  
      # check needed Opjects
!     # ********************************************************** #
      foreach (qw(UserObject)) {
          $Self->{LayoutObject}->FatalError(Message => "Got no $_!") if (!$Self->{$_});
***************
*** 52,81 ****
  sub Run {
      my $Self = shift;
!     my %Param = @_;    
!     
      # Paramter
      my @Params = ();
      my %GetParam = ();
!     my %Frontend = ();    
!     
      # Output
      my $Output = '';
!     my $Header = '';    
!     my $HeaderTitle =  '';    
!     my $HeaderType =  '';        
!     my $Navigation = '';    
!     my $Notify = '';    
!     my $Content = '';       
      my $Footer = '';
!     my $FooterType =  '';      
!     
      my $DefaultHeader = '';
!     my $DefaultNavigation = '';       
!     my $DefaultContent = '';       
!     my $DefaultFooter = '';     
!         
!     
      # navigation ON/OFF
!     # ********************************************************** #        
      if ($GetParam{Nav}) {
          $HeaderType = 'Small';
--- 52,81 ----
  sub Run {
      my $Self = shift;
!     my %Param = @_;
! 
      # Paramter
      my @Params = ();
      my %GetParam = ();
!     my %Frontend = ();
! 
      # Output
      my $Output = '';
!     my $Header = '';
!     my $HeaderTitle =  '';
!     my $HeaderType =  '';
!     my $Navigation = '';
!     my $Notify = '';
!     my $Content = '';
      my $Footer = '';
!     my $FooterType =  '';
! 
      my $DefaultHeader = '';
!     my $DefaultNavigation = '';
!     my $DefaultContent = '';
!     my $DefaultFooter = '';
! 
! 
      # navigation ON/OFF
!     # ********************************************************** #
      if ($GetParam{Nav}) {
          $HeaderType = 'Small';
***************
*** 88,115 ****
          Key => 'LastFAQNav',
          Value => $HeaderType,
!     ); 
!                     
!     
      # ---------------------------------------------------------- #
      # explorer
      # ---------------------------------------------------------- #
!     if ($Self->{Subaction} eq 'Explorer') {           
!         $Self->GetExplorer();               
          $HeaderTitle = 'Explorer';
          $Header = $Self->{LayoutObject}->CustomerHeader(
!             Type => $HeaderType, 
              Title => $HeaderTitle
!         );           
          $Content = $Self->{LayoutObject}->Output(
              TemplateFile => 'FAQ',
              Data => { %Frontend , %GetParam }
!         );                      
      }
!     
      # ---------------------------------------------------------- #
      # item print
      # ---------------------------------------------------------- #
!     elsif ($Self->{Subaction} eq 'Print' && $Self->{ParamObject}->GetParam(Param => 'ItemID')) {        
!         $Self->GetItemPrint();        
          $Header = $Self->{LayoutObject}->PrintHeader(
              Title => $Self->{ItemData}{Subject}
--- 88,130 ----
          Key => 'LastFAQNav',
          Value => $HeaderType,
!     );
! 
! 
      # ---------------------------------------------------------- #
      # explorer
      # ---------------------------------------------------------- #
!     if ($Self->{Subaction} eq 'Explorer') {
!         $Self->GetExplorer();
          $HeaderTitle = 'Explorer';
          $Header = $Self->{LayoutObject}->CustomerHeader(
!             Type => $HeaderType,
              Title => $HeaderTitle
!         );
          $Content = $Self->{LayoutObject}->Output(
              TemplateFile => 'FAQ',
              Data => { %Frontend , %GetParam }
!         );
!     }
!     # ---------------------------------------------------------- #
!     # search a item
!     # ---------------------------------------------------------- #
!     elsif ($Self->{Subaction} eq 'Search') {
!         $HeaderTitle = 'Search';
!         $Header = $Self->{LayoutObject}->CustomerHeader(
!             Type => $HeaderType,
!             Title => $HeaderTitle
!         );
!         $Self->GetItemSearch();
!         $Content = $Self->{LayoutObject}->Output(
!             TemplateFile => 'FAQ',
!             Data => {%Frontend , %GetParam }
!         );
      }
! 
      # ---------------------------------------------------------- #
      # item print
      # ---------------------------------------------------------- #
!     elsif ($Self->{Subaction} eq 'Print' && $Self->{ParamObject}->GetParam(Param => 'ItemID')) {
!         $Self->GetItemPrint();
          $Header = $Self->{LayoutObject}->PrintHeader(
              Title => $Self->{ItemData}{Subject}
***************
*** 119,142 ****
              TemplateFile => 'FAQ',
              Data => {%Frontend , %GetParam }
!         );        
!         $Footer = $Self->{LayoutObject}->PrintFooter();        
!     } 
!         
      # ---------------------------------------------------------- #
      # item view
      # ---------------------------------------------------------- #
!     elsif ($Self->{ParamObject}->GetParam(Param => 'ItemID')) {        
!         $Self->GetItemView();             
!         $HeaderTitle = $Self->{ItemData}{Number};     
          $Header = $Self->{LayoutObject}->CustomerHeader(
!             Type => $HeaderType, 
              Title => $HeaderTitle
!         );            
          $Content = $Self->{LayoutObject}->Output(
              TemplateFile => 'FAQ',
              Data => {%Frontend , %GetParam }
!         );                              
!     }    
!     
      # ---------------------------------------------------------- #
      # redirect to explorer
--- 134,157 ----
              TemplateFile => 'FAQ',
              Data => {%Frontend , %GetParam }
!         );
!         $Footer = $Self->{LayoutObject}->PrintFooter();
!     }
! 
      # ---------------------------------------------------------- #
      # item view
      # ---------------------------------------------------------- #
!     elsif ($Self->{ParamObject}->GetParam(Param => 'ItemID')) {
!         $Self->GetItemView();
!         $HeaderTitle = $Self->{ItemData}{Number};
          $Header = $Self->{LayoutObject}->CustomerHeader(
!             Type => $HeaderType,
              Title => $HeaderTitle
!         );
          $Content = $Self->{LayoutObject}->Output(
              TemplateFile => 'FAQ',
              Data => {%Frontend , %GetParam }
!         );
!     }
! 
      # ---------------------------------------------------------- #
      # redirect to explorer
***************
*** 147,164 ****
  
  
!     # DEFAULT OUTPUT    
      $DefaultHeader = $Self->{LayoutObject}->CustomerHeader(
!         Type => $HeaderType, 
          Title => $HeaderTitle
      );
!     $DefaultNavigation = $Self->{LayoutObject}->CustomerNavigationBar();    
      $DefaultContent = $Self->{LayoutObject}->Output(
!         TemplateFile => 'CustomerFAQ', 
          Data => { %Frontend , %GetParam }
      );
      $DefaultFooter = $Self->{LayoutObject}->CustomerFooter(Type => $FooterType);
  
!     # OUTPUT          
!     $Output .= $Header || $DefaultHeader;  
      $Output .= $Navigation || $DefaultNavigation;
      if(!$Notify) {
--- 162,179 ----
  
  
!     # DEFAULT OUTPUT
      $DefaultHeader = $Self->{LayoutObject}->CustomerHeader(
!         Type => $HeaderType,
          Title => $HeaderTitle
      );
!     $DefaultNavigation = $Self->{LayoutObject}->CustomerNavigationBar();
      $DefaultContent = $Self->{LayoutObject}->Output(
!         TemplateFile => 'CustomerFAQ',
          Data => { %Frontend , %GetParam }
      );
      $DefaultFooter = $Self->{LayoutObject}->CustomerFooter(Type => $FooterType);
  
!     # OUTPUT
!     $Output .= $Header || $DefaultHeader;
      $Output .= $Navigation || $DefaultNavigation;
      if(!$Notify) {
***************
*** 167,176 ****
                  Priority => $Notify->[0],
                  Info => $Notify->[1],
!             );  
!         }     
      }
!     $Output .= $Content || $DefaultContent;       
!     $Output .= $Footer || $DefaultFooter; 
!              
      return $Output;
  }
--- 182,191 ----
                  Priority => $Notify->[0],
                  Info => $Notify->[1],
!             );
!         }
      }
!     $Output .= $Content || $DefaultContent;
!     $Output .= $Footer || $DefaultFooter;
! 
      return $Output;
  }



More information about the cvs-log mailing list