/[cvs]/otrs/Kernel/Output/HTML/NavBarCustomerCompany.pm
ViewVC logotype

Contents of /otrs/Kernel/Output/HTML/NavBarCustomerCompany.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Sat Aug 29 12:20:43 2009 UTC (10 months, 4 weeks ago) by martin
Branch: MAIN
CVS Tags: rel-2_4_5, rel-2_4_4, rel-2_4_7, rel-2_4_6
Branch point for: rel-2_4, rel-2_5
Changes since 1.3: +5 -4 lines
Fixed shown icon of customer company feature.
1 # --
2 # Kernel/Output/HTML/NavBarCustomerCompany.pm
3 # Copyright (C) 2001-2009 OTRS AG, http://otrs.org/
4 # --
5 # $Id: NavBarCustomerCompany.pm,v 1.4 2009/08/29 12:20:43 martin Exp $
6 # --
7 # This software comes with ABSOLUTELY NO WARRANTY. For details, see
8 # the enclosed file COPYING for license information (AGPL). If you
9 # did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
10 # --
11
12 package Kernel::Output::HTML::NavBarCustomerCompany;
13
14 use strict;
15 use warnings;
16
17 use vars qw($VERSION);
18 $VERSION = qw($Revision: 1.4 $) [1];
19
20 sub new {
21 my ( $Type, %Param ) = @_;
22
23 # allocate new hash for object
24 my $Self = {};
25 bless( $Self, $Type );
26
27 # get needed objects
28 for (qw(ConfigObject LogObject DBObject TicketObject LayoutObject UserID)) {
29 $Self->{$_} = $Param{$_} || die "Got no $_!";
30 }
31 return $Self;
32 }
33
34 sub Run {
35 my ( $Self, %Param ) = @_;
36
37 # check if frontend module is registared
38 return if !$Self->{ConfigObject}->Get('Frontend::Module')->{AdminCustomerCompany};
39
40 # check if customer company feature is active
41 for my $Item ( '', 1 .. 10 ) {
42 my $CustomerMap = $Self->{ConfigObject}->Get( 'CustomerUser' . $Item );
43 next if !$CustomerMap;
44
45 # return if CustomerCompany feature is used
46 return if $CustomerMap->{CustomerCompanySupport};
47 }
48
49 # reset nav bar item, remove customer company feature
50 my %Return = ();
51 $Return{'ItemArea0009100'} = {};
52 $Return{'ItemPre0009100'} = {};
53 return %Return;
54 }
55
56 1;

  ViewVC Help
Powered by ViewVC 1.1.3