Skip to content

Commit

Permalink
Merge pull request #3 from reneeb/4.0
Browse files Browse the repository at this point in the history
prepare plugin for OTRS4
  • Loading branch information
tisar committed Jan 20, 2015
2 parents b272856 + f50b7b6 commit 2760b3c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 18 deletions.
8 changes: 3 additions & 5 deletions DashboardMOTDPlus.sopm
@@ -1,14 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<otrs_package version="1.0">
<Name>DashboardMOTDPlus</Name>
<Version>1.0.2</Version>
<Framework>3.0.x</Framework>
<Framework>3.1.x</Framework>
<Framework>3.2.x</Framework>
<Framework>3.3.x</Framework>
<Version>4.0.1</Version>
<Framework>4.0.x</Framework>
<Vendor>Daniel Obee</Vendor>
<URL>http://33achtzig.de/</URL>
<License>GNU AFFERO GENERAL PUBLIC LICENSE Version 3, November 2007</License>
<ChangeLog Version="4.0.1" Date="????">Upgrade for OTRS 4.0</ChangeLog>
<ChangeLog Version="1.0.2" Date="2014-03-07 17:48:00">Upgrade for OTRS 3.3</ChangeLog>
<ChangeLog Version="1.0.1" Date="2013-02-07 14:28:00">Upgrade for OTRS 3.x</ChangeLog>
<ChangeLog Version="0.0.2" Date="2010-07-23 09:47:00">Fixed bug that caused crash of dashboard. Set default Response to 1.</ChangeLog>
Expand Down
22 changes: 10 additions & 12 deletions Kernel/Output/HTML/DashboardMOTDPlus.pm
Expand Up @@ -16,8 +16,12 @@ use warnings;

use Kernel::System::StandardResponse;

use vars qw($VERSION);
$VERSION = qw($Revision: 1.31 $) [1];
our $VERSION = 1.1;

our @ObjectDependencies = qw(
Kernel::Output::HTML::Layout
Kernel::System::StandardTemplate
);

sub new {
my ( $Type, %Param ) = @_;
Expand All @@ -26,14 +30,6 @@ sub new {
my $Self = {%Param};
bless( $Self, $Type );

# check all needed objects
for (qw(ParamObject LayoutObject ConfigObject)) {
if ( !$Self->{$_} ) {
$Self->{LayoutObject}->FatalError( Message => "Got no $_!" );
}
}
$Self->{StdResponseObject} = Kernel::System::StandardResponse->new(%Param);

return $Self;
}

Expand All @@ -56,11 +52,13 @@ sub Run {

my $ResponseID = $Self->{Config}->{ResponseID};

my %MOTD = $Self->{StdResponseObject}->StandardResponseGet( ID => $ResponseID );
my %MOTD = $Kernel::OM->Get('Kernel::System::StandardTemplate')->StandardTemplateGet(
ID => $ResponseID,
);

my $Content = $Self->{LayoutObject}->Output(
TemplateFile => 'AgentDashboardMOTDPlus',
Data => \%MOTD,
Data => \%MOTD,
);

return $Content;
Expand Down
2 changes: 1 addition & 1 deletion Kernel/Output/HTML/Standard/AgentDashboardMOTDPlus.dtl
Expand Up @@ -9,4 +9,4 @@
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

<p>$Data{"Response"}</p>
<p>[% Data.Template %]</p>

0 comments on commit 2760b3c

Please sign in to comment.