use strict;return sub{my $this = shift;my $C = $this->{C};$this->out("");$C->{INPUT}{TabCustom1} ||= "ticket";$this->out("\n");if ( $C->{User}{privs}{supervisor} ) {$this->out("<div style=\"text-align: center\">\n");my $in = [ { name => 'ticket', title_menu => 'Tickets', }, { name => 'settings', title_menu => 'Settings', }];my $loop = ref($in) eq "ARRAY" ? $in : ref($in) eq "CODE" ? &{$in} : [];$C->{ITERATION}{t} = -1;for my $f (@$loop) {$C->{ITERATION}{t}++;$C->{t} = $f;$this->out("");if ( $C->{ITERATION}{t} ) {$this->out("	|\n");}$this->out("	\n");if ( $C->{INPUT}{TabCustom1} eq $C->{t}{name} ) {$this->out("		<b>$C->{t}{title_menu}</b>\n");} else {$this->out("		<a class=\"jinTableLink\" href=\"$C->{SYS}{URL}/master/plugins/helptickets.html?TabCustom1=$C->{t}{name}\">$C->{t}{title_menu}</a>\n");}$this->out("");}$this->out("</div>\n<br>\n");}$this->out("\n");if ( $C->{INPUT}{TabCustom1} eq 'ticket' ) {$this->out("\n");$C->{TableTitle} = "Tickets";$this->out("");$C->{TableClass} = II720d6e18aa34327713eb014408fc9144::IlIlIlIIIIllIlII($II982446f8950cc3dc59e487adba22df54::lIlllIllIIlIIlll{$IIb39071a48a82a07eeb9256f406abebc5::llllIIllIIIIIIIl},790,$II982446f8950cc3dc59e487adba22df54::lIlllIllIIlIIlll{$IIb39071a48a82a07eeb9256f406abebc5::lllIIlIIIlllIIIl});$this->out("");$C->{TableSearchForm} = II982446f8950cc3dc59e487adba22df54::lllllIllIlIllllI($II720d6e18aa34327713eb014408fc9144::lIlIIIIlIllllIIl{$II8dae0e141ee45f5daba6a74e4a7c3b6f::IllIlIIllIlIIllI},794,$II720d6e18aa34327713eb014408fc9144::lIlIIIIlIllllIIl{$IIb39071a48a82a07eeb9256f406abebc5::IIlIllIIlIIIlIIl});$this->out("\n");$this->out(Zen::PerlHandler->get("II49d867dfd3c7b602eb0be99b5e5c0012->mnt_has_categories")->do($this->{C}));$this->out("\n");if ( $C->{HasNoTicketCategories} ) {$this->out("		<div style=\"color:blue;font-size:120\%\">There are no Support Categories defined. At least one Category needs to be in Settings by a user with Supervisor privilege</div>\n");} elsif ( $C->{HasNoTicketCategoriesForStaff} ) {$this->out("		<div style=\"color:blue;font-size:120\%\">You don`t have access to any of the Support Categories</div>\n");} else {$this->out("");{my $G = (ref $this)->get("/zen/table.html", $this->{param}) or die "no skel /zen/table.html";my $ctx = $this->{C};my $out = $G->execute($ctx);$this->out(@$out) if $out;}$this->out("");}$this->out("\n");} elsif ( $C->{INPUT}{TabCustom1} eq 'settings' ) {$this->out("\n");$C->{HTMLTitle} = "Settings";$this->out("\n	<iframe\n		width=\"100\%\" height=\"10\" frameborder=\"0\"\n		name=\"IFrameHelpticketsCategories\" id=\"IFrameHelpticketsCategories\"\n		src=\"$C->{SYS}{URL}/master/plugins/helptickets/categories.html\">\n	</iframe>\n\n	<br><br>\n	<iframe\n		width=\"100\%\" height=\"10\" frameborder=\"0\"\n		name=\"IFrameHelpticketsSettings\" id=\"IFrameHelpticketsSettings\"\n		src=\"$C->{SYS}{URL}/master/plugins/helptickets/settings.html\">\n	</iframe>\n\n");}$this->out("\n");{my $G = (ref $this)->get("/headfoot/hf_main.html", $this->{param}) or die "no skel /headfoot/hf_main.html";my $out1 = $this->getOutput;$C->{central_content} = join('', @$out1);@$out1 = ();my $out2 = $G->execute($C);$this->out(@$out2) if $out2;}$this->out("");}