hat jemand bereits soetwas umgesetzt oder eine Idee, wie man dies umsetzen kann?

(Link: http://v64i.img-up.net/otrs158c.png)
Nachtrag: Wie man den Menüpunkt einpflegt ist mir bewusst. Es geht mir darum, Inhalt per Iframe darzustellen
Code: Select all
<ConfigItem Name="Frontend::Module###AgentMyIframe" Required="0" Valid="1">
<Description Translatable="1">Frontend module registration for the agent interface.</Description>
<Group>Custom</Group>
<SubGroup>Frontend::Agent::ModuleRegistration</SubGroup>
<Setting>
<FrontendModuleReg>
<Description>Overview of all open Tickets</Description>
<Title>QueueView</Title>
<NavBarName>Ticket</NavBarName>
<NavBar>
<Description Translatable="1">your description</Description>
<Name Translatable="1">My Iframe</Name>
<Link>Action=AgentMyIframe</Link>
<LinkOption></LinkOption>
<NavBar>Ticket</NavBar>
<Type></Type>
<Block></Block>
<AccessKey>n</AccessKey>
<Prio>711</Prio>
</NavBar>
</FrontendModuleReg>
</Setting>
</ConfigItem>
Code: Select all
package Kernel::Modules::AgentMyIframe;
use strict;
use warnings;
use Kernel::System::Email;
sub new {
my ( $Type, %Param ) = @_;
# allocate new hash for object
my $Self = {%Param};
bless( $Self, $Type );
# check needed objects
for my $Needed (qw(ParamObject DBObject LayoutObject LogObject ConfigObject)) {
if ( !$Self->{$Needed} ) {
$Self->{LayoutObject}->FatalError( Message => "Got no $Needed!" );
}
}
return $Self;
}
sub Run {
my ( $Self, %Param ) = @_;
my $Output = $Self->{LayoutObject}->Header();
$Output .= $Self->{LayoutObject}->NavigationBar();
$Output .= $Note;
$Output .= $Self->{LayoutObject}->Output(
TemplateFile => 'AgentMyIframe',
);
$Output .= $Self->{LayoutObject}->Footer();
return $Output;
}
1;
Code: Select all
<iframe src="...."></iframe>
Wie meinst Du das?steste123 wrote:Hast du noch einen Tipp, wie ich "einfach" weitere Frames einbinden kann?
Du hast die Beispielconfig einfach als Datei abgespeichert und bekommst jetzt Fehlermeldungen? Dann siehe viewtopic.php?f=35&t=23329&p=91964#p91964steste123 wrote:Übrigens, der Menüpunkt wird durch die XML nicht eingefügt.
Jepp, mein Fehler. Mit dieser Konfig sollte es funktionieren:steste123 wrote:Übrigens, der Menüpunkt wird durch die XML nicht eingefügt.
Code: Select all
<ConfigItem Name="Frontend::Module###AgentMyIframe" Required="0" Valid="1">
<Description Translatable="1">Frontend module registration for the agent interface.</Description>
<Group>Custom</Group>
<SubGroup>Frontend::Agent::ModuleRegistration</SubGroup>
<Setting>
<FrontendModuleReg>
<Description>Overview of all open Tickets</Description>
<Title>QueueView</Title>
<NavBarName>MyIFrames</NavBarName>
<NavBar>
<Description Translatable="1">your description</Description>
<Name Translatable="1">My Iframe</Name>
<Link>Action=AgentMyIframe</Link>
<LinkOption></LinkOption>
<NavBar>MyIFrame</NavBar>
<Type>Menu</Type>
<Block>ItemArea</Block>
<AccessKey>n</AccessKey>
<Prio>711</Prio>
</NavBar>
</FrontendModuleReg>
</Setting>
</ConfigItem>
Dafür würde ich eine zusätzliche ConfigOption machen :steste123 wrote:Ich möchte weitere IFrames einbinden, also auch weitere Menüpunkte
Code: Select all
<ConfigItem Name="Iframes::Sources" Required="0" Valid="1">
<Description Translatable="1">Sources for the iframes.</Description>
<Group>Custom</Group>
<SubGroup>Iframes</SubGroup>
<Setting>
<Hash>
<Item Key="Source1">http://opar.perl-services.de</Item>
<Item Key="Source2">http://otrs.perl-services.de</Item>
</Hash>
</Setting>
</ConfigItem>
Code: Select all
sub Run {
my ( $Self, %Param ) = @_;
my $SourceKey = $Self->{ParamObject}->GetParam( Param => 'Source' );
my $Sources = $Self->{ConfigObject}->Get( 'Iframe::Sources' ) || {};
my $Output = $Self->{LayoutObject}->Header();
$Output .= $Self->{LayoutObject}->NavigationBar();
$Output .= $Note;
$Output .= $Self->{LayoutObject}->Output(
TemplateFile => 'AgentMyIframe',
Data => { Source => $Sources{$SourceKey} || '' },
);
$Output .= $Self->{LayoutObject}->Footer();
return $Output;
}
Code: Select all
<iframe src="$Data{"Source"}"></iframe>
Code: Select all
<Link>Action=AgentMyIframe</Link>
Code: Select all
<Link>Action=AgentMyIframe;Source=Source1</Link>
Code: Select all
<Link>Action=AgentMyIframe;Source=Source2</Link>
Code: Select all
package Kernel::Modules::AgentMyIframe;
use strict;
use warnings;
use Kernel::System::Email;
sub Run {
my ( $Self, %Param ) = @_;
my $SourceKey = $Self->{ParamObject}->GetParam( Param => 'Source' );
my $Sources = $Self->{ConfigObject}->Get( 'Iframe::Sources' ) || {};
my $Output = $Self->{LayoutObject}->Header();
$Output .= $Self->{LayoutObject}->NavigationBar();
$Output .= $Note;
$Output .= $Self->{LayoutObject}->Output(
TemplateFile => 'AgentMyIframe',
Data => { Source => $Sources{$SourceKey} || '' },
);
$Output .= $Self->{LayoutObject}->Footer();
return $Output;
}
1;
Code: Select all
<iframe src="$Data{"Source"}"></iframe>
Code: Select all
<?xml version="1.0" encoding="utf-8" ?>
<otrs_config version="1.0" init="Framework">
<ConfigItem Name="Iframes::Sources" Required="0" Valid="1">
<Description Translatable="1">Sources for the iframes.</Description>
<Group>Custom</Group>
<SubGroup>Iframes</SubGroup>
<Setting>
<Hash>
<Item Key="Source1">http://opar.perl-services.de</Item>
<Item Key="Source2">http://otrs.perl-services.de</Item>
</Hash>
</Setting>
</ConfigItem>
</otrs_config>
Code: Select all
<?xml version="1.0" encoding="utf-8" ?>
<otrs_config version="1.0" init="Framework">
<ConfigItem Name="Frontend::Module###AgentMyIframe" Required="0" Valid="1">
<Description Translatable="1">Frontend module registration for the agent interface.</Description>
<Group>Custom</Group>
<SubGroup>Frontend::Agent::ModuleRegistration</SubGroup>
<Setting>
<FrontendModuleReg>
<Description>Overview of all open Tickets</Description>
<Title>QueueView</Title>
<NavBarName>MyIFrames</NavBarName>
<NavBar>
<Description Translatable="1">your description</Description>
<Name Translatable="1">My Iframe</Name>
<Link>Action=AgentMyIframe</Link>
<LinkOption></LinkOption>
<NavBar>MyIFrame</NavBar>
<Type>Menu</Type>
<Block>ItemArea</Block>
<AccessKey>n</AccessKey>
<Prio>711</Prio>
</NavBar>
</FrontendModuleReg>
</Setting>
</ConfigItem>
<ConfigItem Name="Iframes::Sources" Required="0" Valid="1">
<Description Translatable="1">Sources for the iframes.</Description>
<Group>Custom</Group>
<SubGroup>Iframes</SubGroup>
<Setting>
<Hash>
<Item Key="Source1">http://opar.perl-services.de</Item>
<Item Key="Source2">http://otrs.perl-services.de</Item>
</Hash>
</Setting>
</ConfigItem>
</otrs_config>
Code: Select all
Hoppla. Es ist ein Fehler aufgetreten.
Fehlermeldung: Global symbol "$Note" requires explicit package name at C:/otrs/OTRS/bin/cgi-bin[..]
Please contact your administrator.
Sie können einen Fehlerbericht senden oder zurück zur vorhergehenden Seite.
Fehlerdetails
Backend ERROR: OTRS-CGI-30 Perl: 5.16.3 OS: MSWin32 Time: Thu Jan 30 20:01:34 2014 Message: Global symbol "$Note" requires explicit package name at C:/otrs/OTRS/bin/cgi-bin/../../Kernel/Modules/AgentMyIframe.pm line 16. Global symbol "%Sources" requires explicit package name at C:/otrs/OTRS/bin/cgi-bin/../../Kernel/Modules/AgentMyIframe.pm line 19. RemoteAddress: xxxxxxx RequestURI: /otrs/index.pl?Action=AgentMyIframe;Source=Source1 Traceback (3020): Module: Kernel::System::Web::InterfaceAgent::Run (OTRS 3.3.2) Line: 186 Module: PerlEx::Precompiler::c_::otrs::otrs::bin::cgi2dbin::index_pl::__ANON__ (unknown version) Line: 41 Module: (eval) (unknown version) Line: 458 Module: PerlEx::Precompiler::Execute (unknown version) Line: 458
Code: Select all
[Error][Kernel::System::Web::InterfaceAgent::Run][186] Global symbol "$Note" requires explicit package name at C:/otrs/OTRS/bin/cgi-bin/../../Kernel/Modules/AgentMyIframe.pm line 16.
Global symbol "%Sources" requires explicit package name at C:/otrs/OTRS/bin/cgi-bin/../../Kernel/Modules/AgentMyIframe.pm line 19.
Code: Select all
$Output .= $Note;
Code: Select all
Backend ERROR: OTRS-CGI-30 Perl: 5.16.3 OS: MSWin32 Time: Fri Jan 31 07:51:01 2014 Message: Global symbol "%Sources" requires explicit package name at C:/otrs/OTRS/bin/cgi-bin/../../Kernel/Modules/AgentMyIframe.pm line 19. RemoteAddress: xxxxx RequestURI: /otrs/index.pl?Action=AgentMyIframe;Source=Source1 Traceback (2776): Module: Kernel::System::Web::InterfaceAgent::Run (OTRS 3.3.2) Line: 186 Module: PerlEx::Precompiler::c_::otrs::otrs::bin::cgi2dbin::index_pl::__ANON__ (unknown version) Line: 41 Module: (eval) (unknown version) Line: 458 Module: PerlEx::Precompiler::Execute (unknown version) Line: 458
Code: Select all
$Sources{$SourceKey}
Code: Select all
$Sources->{$SourceKey}