use strict;return sub{my $this = shift;my $C = $this->{C};$this->out("");$this->out(Zen::PerlHandler->get("II7ea162da3258f2fa48309e6a1f31f639->mnt_conversation")->do($this->{C}));$this->out("");if ( $C->{AccessGranted} ) {$this->out("");$C->{HTMLTitle} = "$C->{Category}: $C->{INPUT}{tid}: $C->{Subject} [$C->{DisplayStatus}]";$this->out("");} else {$this->out("");$C->{HTMLTitle} = "$C->{INPUT}{tid}: You are not allowed to view this ticket";$this->out("");}$this->out("\n");if ( $C->{INPUT}{action_done} ) {$this->out("<div class=\"card mb-4 py-3 border-left-success\">\n	<div class=\"card-body\">\n		Ticket has been updated\n	</div>\n  </div>\n");}$this->out("\n");if ( $C->{MembershipError} ) {$this->out("	<div class=\"card mb-4 py-3 border-left-danger\">\n		<div class=\"card-body\">\n			You cannot move ticket to this category because user does not have the required membership\n		</div>\n	  </div>\n");}$this->out("\n<form method=POST action=\"$C->{SELF_URL_NO_QS}\">\n<input type=\"hidden\" name=\"cgi_ret\" value=\"$C->{INPUT}{cgi_ret}\">\n<input type=\"hidden\" name=\"tid\" value=\"$C->{INPUT}{tid}\">\n\n<div class=\"card shadow mb-4\">\n	<div class=\"card-header py-3\">\n		<h6 class=\"m-0 font-weight-bold text-primary\">\n			$C->{HTMLTitle}\n		</h6>\n	</div>\n	<div class=\"card-body\">\n");if ( $C->{AccessGranted} ) {$this->out("		<div class=\"form-group\">\n			<label>Reply</label>\n			<textarea name=\"message\" class=\"form-control\">$C->{INPUT}{message}</textarea>\n		</div>\n		<div class=\"form-group row\">\n			<label class=\"col-sm-12 col-md-4 col-form-label\"></label>\n			<div class=\"col-sm-12 col-md-8\">\n				<input type=submit class=\"btn btn-primary\" name=do_submit value=\"Submit\">\n				<input type=submit class=\"btn btn-primary\" name=do_submit_and_close value=\"Submit and close ticket\" onClick=\"return confirm(\'Are you sure you want to submit and close this ticket? It will automatically be reopen is user (or staff) replies back\')\">\n");if ( $C->{INPUT}{cgi_ret} ) {$this->out("					<input type=submit class=\"btn btn-primary\" name=do_return value=\"Back to the tickets list\">\n");}$this->out("			</div>\n		</div>\n");if ( $C->{IsStaff} ) {$this->out("			<div class=\"form-group row\">\n				<label class=\"col-sm-12 col-md-4 col-form-label\">Move ticket to category:</label>\n				<div class=\"col-sm-12 col-md-8\">$C->{Form}{category}</div>\n			</div>\n");}$this->out("<div class=\"table-responsive\">\n		<table class=\"table table-bordered\">\n			<thead>\n				<tr role=\"row\">\n					<th>User</th>\n					<th>Role</th>\n					<th>Date/Time</th>\n					<th>Message</th>\n				</tr>\n			</thead>\n");my $in = $C->{Conversation};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("<tr>\n	<td>$C->{t}{displayName}</td>\n	<td>\n");if ( $C->{t}{isStaff} ) {$this->out("STAFF");} else {$this->out("USER");}$this->out("");if ( $C->{IsStaff} ) {$this->out("&nbsp;(#$C->{t}{user_id})");}$this->out("	</td>\n	<td>$C->{t}{DisplayCtime}</td>\n	<td>\n");$this->out(Zen::PerlHandler->get("text2html" =~ /::/ ? "text2html" : II8dae0e141ee45f5daba6a74e4a7c3b6f::IlIIllIIllIlIIll($II8dae0e141ee45f5daba6a74e4a7c3b6f::IlIIlIIIIIIlIIII{$II8dae0e141ee45f5daba6a74e4a7c3b6f::IllIlIIllIlIIllI},1009,$II8dae0e141ee45f5daba6a74e4a7c3b6f::IlIIlIIIIIIlIIII{$II8dae0e141ee45f5daba6a74e4a7c3b6f::IllIllIlllllllII}).'::filters::'."text2html".'::'."text2html")->do($C->{t}{message}));$this->out("	</td>\n</tr>\n");}$this->out("\n</table>\n</div>\n");}$this->out("</div></div>\n</form>\n\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("");}