File: /home/cafsindia/help.cafsindia.com/var/cache/dev/twig/6f/6fbc51b57c5e89d116567cf5c7a1dfd4.php
<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
use Twig\TemplateWrapper;
/* @UVDeskSupportCenter/Knowledgebase/ticketView.html.twig */
class __TwigTemplate_3818dbecc543b518d00de1736ac7bcd8 extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title' => [$this, 'block_title'],
'ogtitle' => [$this, 'block_ogtitle'],
'twtitle' => [$this, 'block_twtitle'],
'tabHeader' => [$this, 'block_tabHeader'],
'body' => [$this, 'block_body'],
'footer' => [$this, 'block_footer'],
];
}
protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
{
// line 1
return "@UVDeskSupportCenter/Templates/layout.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@UVDeskSupportCenter/Knowledgebase/ticketView.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@UVDeskSupportCenter/Knowledgebase/ticketView.html.twig"));
$this->parent = $this->loadTemplate("@UVDeskSupportCenter/Templates/layout.html.twig", "@UVDeskSupportCenter/Knowledgebase/ticketView.html.twig", 1);
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 3
public function block_title($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
yield "#";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["ticket"]) || array_key_exists("ticket", $context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.', 3, $this->source); })()), "id", [], "any", false, false, false, 3), "html", null, true);
yield " ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["ticket"]) || array_key_exists("ticket", $context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.', 3, $this->source); })()), "subject", [], "any", false, false, false, 3), "html", null, true);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return; yield '';
}
// line 4
public function block_ogtitle($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "ogtitle"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "ogtitle"));
yield "#";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["ticket"]) || array_key_exists("ticket", $context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.', 4, $this->source); })()), "id", [], "any", false, false, false, 4), "html", null, true);
yield " ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["ticket"]) || array_key_exists("ticket", $context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.', 4, $this->source); })()), "subject", [], "any", false, false, false, 4), "html", null, true);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return; yield '';
}
// line 5
public function block_twtitle($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "twtitle"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "twtitle"));
yield "#";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["ticket"]) || array_key_exists("ticket", $context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.', 5, $this->source); })()), "id", [], "any", false, false, false, 5), "html", null, true);
yield " ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["ticket"]) || array_key_exists("ticket", $context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.', 5, $this->source); })()), "subject", [], "any", false, false, false, 5), "html", null, true);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return; yield '';
}
// line 7
public function block_tabHeader($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "tabHeader"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "tabHeader"));
// line 8
yield "\t<div class=\"uv-nav-bar uv-nav-tab\">
\t\t<div class=\"uv-container\">
\t\t\t<div class=\"uv-nav-bar-lt\">
\t\t\t\t<ul class=\"uv-nav-tab-label\">
\t\t\t\t\t<li><a href=\"";
// line 12
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_customer_ticket_collection");
yield "\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Ticket Requests"), "html", null, true);
yield "</a></li>
\t\t\t\t\t";
// line 13
if (CoreExtension::getAttribute($this->env, $this->source, (isset($context["websiteConfiguration"]) || array_key_exists("websiteConfiguration", $context) ? $context["websiteConfiguration"] : (function () { throw new RuntimeError('Variable "websiteConfiguration" does not exist.', 13, $this->source); })()), "ticketCreateOption", [], "any", false, false, false, 13)) {
// line 14
yield " <li><a href=\"";
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_customer_create_ticket");
yield "\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("New Ticket Request"), "html", null, true);
yield "</a></li>
";
}
// line 16
yield "\t\t\t\t</ul>
\t\t\t</div>
\t\t\t<div class=\"uv-nav-bar-rt\">
\t\t\t\t<form method=\"get\" action=\"";
// line 19
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_customer_front_article_search");
yield "\">
\t\t\t\t\t<input name=\"s\" class=\"uv-nav-search\" type=\"text\" placeholder=\"";
// line 20
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Search"), "html", null, true);
yield "\">
\t\t\t\t</form>
\t\t\t</div>
\t\t</div>
\t</div>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return; yield '';
}
// line 27
public function block_body($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
// line 28
yield " <style>
.uv-btn-tag {
margin-right: 5px;
}
.uv-group-field {
width: 80%;
}
.uv-element-block .mce-tinymce {
margin-top: 10px;
}
.uv-ticket-view .uv-ticket-accordion .uv-ticket-wrapper {
display: block;
}
.message {
font-size: 15px;
}
.message img {
max-width: 100%;
}
.uv-dropdown.reply .uv-dropdown-btn-active {
border: none;
}
.uv-dropdown.reply .uv-dropdown-list {
width: 220px;
bottom: 47px;
}
\t\t.uv-rtl .uv-top-left {
\t\t\tleft: unset;
\t\t}
\t\t.uv-rtl .uv-dropdown-list {
\t\t\ttext-align: right;
\t\t}
.uv-action-buttons {
margin: 10px 0px;
}
.uv-action-buttons .uv-btn:first-child {
margin-left: 0px;
}
\t\t.uv-rtl .uv-action-buttons .uv-btn:first-child {
\t\t\tmargin-left: 5px;
\t\t\tmargin-right: 0px;
\t\t}
.uv-action-buttons .uv-btn {
margin: 5px;
}
form #customFieldCollection .uv-field-error-icon, form #customFieldCollection .uv-field-success-icon {
display: none;
}
.custom-field-field-display .uv-field-block {
width: 100%;
color: #333333;
word-wrap: break-word;
}
.custom-field-field-display .uv-field-block span {
display: inline;
}
.uv-submit-left-side {
margin: 0!important;
padding-right: 5px;
border-bottom-right-radius: 0;
border-top-right-radius: 0;
}
\t\t.uv-rtl .uv-submit-left-side {
\t\t\tpadding-right: 10px;
border-bottom-right-radius: 3px;
border-top-right-radius: 3px;
\t\t\tpadding-left: 5px;
\t\t\tborder-bottom-left-radius: 0;
border-top-left-radius: 0;
\t\t}
.uv-submit-right-side {
margin: 0!important;
}
.no-left-padding {
padding-left: 0;
border-bottom-left-radius: 0;
border-top-left-radius: 0;
}
\t\t.uv-rtl .no-left-padding {
\t\t\tpadding-left: 10px;
border-bottom-left-radius: 3px;
border-top-left-radius: 3px;
\t\t\tpadding-right: 0;
\t\t\tborder-bottom-right-radius: 0;
\t\t\tborder-top-right-radius: 0;
\t\t}
.uv-btn-error {
background-color: #FF5656!important;
}
.uv-pull-rightside {
float: right;
font-size: 15px;
cursor: pointer;
}
\t\t.uv-rtl .uv-pull-rightside {
float: left;
}
.uv-print-icon {
display: inline-block;
width: 20px;
height: 20px;
background-image: url(\"";
// line 138
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("bundles/uvdeskcoreframework/images/uvdesk-kb-sprite.svg"), "html", null, true);
yield "\");
background-position: -176px -91px;
vertical-align: middle;
}
@media print {
.uv-navbar,.uv-ticket-action-bar, .uv-kudo, .uv-aside-back, .uv-footer, .uv-ticket-main.uv-ticket-reply, .uv-nav-bar,input, .uv-dropdown-list>.uv-dropdown-container,.uv-notifications-wrapper,.uv-pop-up-overlay,.uv-loader-view, .uv-loader,.uv-header,.uv-upload-actions,.uv-pull-rightside {
display: none !important;
}
}
blockquote {
background: #f9f9f9;
border-left: 4px solid #ccc;
margin: 1.5em 10px;
padding: 0.5em 10px;
quotes: \"\\201C\"\"\\201D\"\"\\2018\"\"\\2019\";
}
blockquote:before {
color: #ccc;
content: open-quote;
font-size: 3em;
line-height: 0.1em;
margin-right: 0.05em;
vertical-align: -0.4em;
}
blockquote p {
display: inline;
}
</style>
";
// line 167
$context["ticketAgent"] = ((CoreExtension::getAttribute($this->env, $this->source, (isset($context["ticket"]) || array_key_exists("ticket", $context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.', 167, $this->source); })()), "agent", [], "any", false, false, false, 167)) ? (CoreExtension::getAttribute($this->env, $this->source, (isset($context["user_service"]) || array_key_exists("user_service", $context) ? $context["user_service"] : (function () { throw new RuntimeError('Variable "user_service" does not exist.', 167, $this->source); })()), "getAgentDetailById", [CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["ticket"]) || array_key_exists("ticket", $context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.', 167, $this->source); })()), "agent", [], "any", false, false, false, 167), "id", [], "any", false, false, false, 167)], "method", false, false, false, 167)) : (null));
// line 168
yield " ";
$context["totalThreads"] = CoreExtension::getAttribute($this->env, $this->source, (isset($context["ticket_service"]) || array_key_exists("ticket_service", $context) ? $context["ticket_service"] : (function () { throw new RuntimeError('Variable "ticket_service" does not exist.', 168, $this->source); })()), "getTicketTotalThreads", [CoreExtension::getAttribute($this->env, $this->source, (isset($context["ticket"]) || array_key_exists("ticket", $context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.', 168, $this->source); })()), "id", [], "any", false, false, false, 168)], "method", false, false, false, 168);
// line 169
yield " ";
$context["customer"] = CoreExtension::getAttribute($this->env, $this->source, (isset($context["user_service"]) || array_key_exists("user_service", $context) ? $context["user_service"] : (function () { throw new RuntimeError('Variable "user_service" does not exist.', 169, $this->source); })()), "getCustomerPartialDetailById", [CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["ticket"]) || array_key_exists("ticket", $context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.', 169, $this->source); })()), "customer", [], "any", false, false, false, 169), "id", [], "any", false, false, false, 169)], "method", false, false, false, 169);
// line 170
yield " ";
$context["createThread"] = CoreExtension::getAttribute($this->env, $this->source, (isset($context["ticket_service"]) || array_key_exists("ticket_service", $context) ? $context["ticket_service"] : (function () { throw new RuntimeError('Variable "ticket_service" does not exist.', 170, $this->source); })()), "getCreateReply", [CoreExtension::getAttribute($this->env, $this->source, (isset($context["ticket"]) || array_key_exists("ticket", $context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.', 170, $this->source); })()), "id", [], "any", false, false, false, 170), "customer"], "method", false, false, false, 170);
// line 171
yield " ";
$context["currentUser"] = CoreExtension::getAttribute($this->env, $this->source, (isset($context["user_service"]) || array_key_exists("user_service", $context) ? $context["user_service"] : (function () { throw new RuntimeError('Variable "user_service" does not exist.', 171, $this->source); })()), "getCustomerPartialDetailById", [CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 171, $this->source); })()), "user", [], "any", false, false, false, 171), "id", [], "any", false, false, false, 171)], "method", false, false, false, 171);
// line 172
yield "
<div class=\"uv-thread\">
<div class=\"uv-thread-lt\">
<aside>
<h6>";
// line 176
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Ticket Information"), "html", null, true);
yield "</h6>
<h6>";
// line 177
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Ticket Id"), "html", null, true);
yield " #";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["ticket"]) || array_key_exists("ticket", $context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.', 177, $this->source); })()), "id", [], "any", false, false, false, 177), "html", null, true);
yield "</h6>
<div class=\"uv-aside-brick\">
<h6>";
// line 179
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Total Replies"), "html", null, true);
yield "</h6>
<span class=\"uv-icon-replies\"></span>
<span>";
// line 181
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["totalThreads"]) || array_key_exists("totalThreads", $context) ? $context["totalThreads"] : (function () { throw new RuntimeError('Variable "totalThreads" does not exist.', 181, $this->source); })()), "html", null, true);
yield "</span>
</div>
<div class=\"uv-aside-brick\">
<h6>";
// line 184
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Timestamp"), "html", null, true);
yield "</h6>
<span class=\"uv-icon-timestamp\"></span>
<span>";
// line 186
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["localizedCreateAtTime"]) || array_key_exists("localizedCreateAtTime", $context) ? $context["localizedCreateAtTime"] : (function () { throw new RuntimeError('Variable "localizedCreateAtTime" does not exist.', 186, $this->source); })()), "html", null, true);
yield "</span>
</div>
<div class=\"uv-hr\"></div>
";
// line 190
if ((CoreExtension::getAttribute($this->env, $this->source, (isset($context["ticket"]) || array_key_exists("ticket", $context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.', 190, $this->source); })()), "customer", [], "any", false, false, false, 190) != CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 190, $this->source); })()), "user", [], "any", false, false, false, 190))) {
// line 191
yield " <div class=\"uv-aside-brick\">
<h6>";
// line 192
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Customer"), "html", null, true);
yield "</h6>
<span>";
// line 193
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["customer"]) || array_key_exists("customer", $context) ? $context["customer"] : (function () { throw new RuntimeError('Variable "customer" does not exist.', 193, $this->source); })()), "name", [], "any", false, false, false, 193), "html", null, true);
yield "</span>
</div>
";
}
// line 196
yield " ";
if ((isset($context["ticketAgent"]) || array_key_exists("ticketAgent", $context) ? $context["ticketAgent"] : (function () { throw new RuntimeError('Variable "ticketAgent" does not exist.', 196, $this->source); })())) {
// line 197
yield " <div class=\"uv-aside-brick\">
<h6>";
// line 198
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Agent"), "html", null, true);
yield "</h6>
<span>";
// line 199
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["ticketAgent"]) || array_key_exists("ticketAgent", $context) ? $context["ticketAgent"] : (function () { throw new RuntimeError('Variable "ticketAgent" does not exist.', 199, $this->source); })()), "name", [], "any", false, false, false, 199), "html", null, true);
yield "</span>
</div>
";
}
// line 202
yield " <div class=\"uv-aside-brick\">
<h6>";
// line 203
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Status"), "html", null, true);
yield "</h6>
<span>";
// line 204
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["ticket"]) || array_key_exists("ticket", $context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.', 204, $this->source); })()), "status", [], "any", false, false, false, 204), "description", [], "any", false, false, false, 204)), "html", null, true);
yield "</span>
</div>
";
// line 206
if (CoreExtension::getAttribute($this->env, $this->source, (isset($context["ticket"]) || array_key_exists("ticket", $context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.', 206, $this->source); })()), "type", [], "any", false, false, false, 206)) {
// line 207
yield " <div class=\"uv-aside-brick\">
<h6>";
// line 208
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Type"), "html", null, true);
yield "</h6>
<span>";
// line 209
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["ticket"]) || array_key_exists("ticket", $context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.', 209, $this->source); })()), "type", [], "any", false, false, false, 209), "code", [], "any", false, false, false, 209), "html", null, true);
yield "</span>
</div>
";
}
// line 212
yield "
";
// line 213
if ((CoreExtension::getAttribute($this->env, $this->source, (isset($context["ticket"]) || array_key_exists("ticket", $context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.', 213, $this->source); })()), "customer", [], "any", false, false, false, 213) == CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 213, $this->source); })()), "user", [], "any", false, false, false, 213))) {
// line 214
yield " <div class=\"uv-hr\"></div>
<div class=\"uv-aside-brick collaborator-list-block\">
<div class=\"uv-element-block\">
<label class=\"uv-field-label\">";
// line 217
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Collaborators"), "html", null, true);
yield "</label>
<div class=\"uv-field-block\">
<input class=\"uv-field\" type=\"text\" name=\"email\" type=\"text\" value=\"\" placeholder=\"";
// line 219
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Type email to add"), "html", null, true);
yield "\">
</div>
</div>
<div class=\"collaborator-list\" style=\"margin-top: 10px\">
</div>
</div>
";
}
// line 226
yield " </aside>
";
// line 228
if (CoreExtension::getAttribute($this->env, $this->source, (isset($context["user_service"]) || array_key_exists("user_service", $context) ? $context["user_service"] : (function () { throw new RuntimeError('Variable "user_service" does not exist.', 228, $this->source); })()), "isfileExists", ["apps/uvdesk/form-component"], "method", false, false, false, 228)) {
// line 229
yield " ";
yield CoreExtension::getAttribute($this->env, $this->source, (isset($context["user_service"]) || array_key_exists("user_service", $context) ? $context["user_service"] : (function () { throw new RuntimeError('Variable "user_service" does not exist.', 229, $this->source); })()), "getCustomFieldTemplateCustomer", [], "method", false, false, false, 229);
yield "
";
} elseif (CoreExtension::getAttribute($this->env, $this->source, // line 230
(isset($context["user_service"]) || array_key_exists("user_service", $context) ? $context["user_service"] : (function () { throw new RuntimeError('Variable "user_service" does not exist.', 230, $this->source); })()), "isfileExists", ["apps/uvdesk/custom-fields"], "method", false, false, false, 230)) {
// line 231
yield " ";
yield CoreExtension::getAttribute($this->env, $this->source, (isset($context["user_service"]) || array_key_exists("user_service", $context) ? $context["user_service"] : (function () { throw new RuntimeError('Variable "user_service" does not exist.', 231, $this->source); })()), "getCustomFieldTemplateCustomer", [], "method", false, false, false, 231);
yield "
";
}
// line 233
yield " </div>
<div class=\"uv-thread-rt\">
<section>
<div class=\"uv-ticket-view\">
<div class=\"uv-ticket-head\">
<h1>
";
// line 239
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["ticket"]) || array_key_exists("ticket", $context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.', 239, $this->source); })()), "subject", [], "any", false, false, false, 239), "html", null, true);
yield "
<span class=\"uv-pull-rightside uv-print-icon\" onclick=\"window.print()\"></span>
</h1>
<div class=\"uv-ticket-strip\">
<span>
<span class=\"uv-ticket-strip-label\">";
// line 244
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Created"), "html", null, true);
yield " -</span>
<span class=\"timeago\" data-timestamp=\"";
// line 245
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["localizedCreateAtTime"]) || array_key_exists("localizedCreateAtTime", $context) ? $context["localizedCreateAtTime"] : (function () { throw new RuntimeError('Variable "localizedCreateAtTime" does not exist.', 245, $this->source); })()), "html", null, true);
yield "\" title=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["localizedCreateAtTime"]) || array_key_exists("localizedCreateAtTime", $context) ? $context["localizedCreateAtTime"] : (function () { throw new RuntimeError('Variable "localizedCreateAtTime" does not exist.', 245, $this->source); })()), "html", null, true);
yield "\">
";
// line 246
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["localizedCreateAtTime"]) || array_key_exists("localizedCreateAtTime", $context) ? $context["localizedCreateAtTime"] : (function () { throw new RuntimeError('Variable "localizedCreateAtTime" does not exist.', 246, $this->source); })()), "html", null, true);
yield "
</span>
</span>
<span>
<span class=\"uv-ticket-strip-label\">";
// line 250
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("By"), "html", null, true);
yield " -</span>
";
// line 251
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["createThread"]) || array_key_exists("createThread", $context) ? $context["createThread"] : (function () { throw new RuntimeError('Variable "createThread" does not exist.', 251, $this->source); })()), "user", [], "any", false, false, false, 251), "name", [], "any", false, false, false, 251), "html", null, true);
yield "
</span>
";
// line 253
if ((isset($context["ticketAgent"]) || array_key_exists("ticketAgent", $context) ? $context["ticketAgent"] : (function () { throw new RuntimeError('Variable "ticketAgent" does not exist.', 253, $this->source); })())) {
// line 254
yield " <span>
<span class=\"uv-ticket-strip-label\">";
// line 255
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Agent"), "html", null, true);
yield " -</span>
";
// line 256
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["ticketAgent"]) || array_key_exists("ticketAgent", $context) ? $context["ticketAgent"] : (function () { throw new RuntimeError('Variable "ticketAgent" does not exist.', 256, $this->source); })()), "name", [], "any", false, false, false, 256), "html", null, true);
yield "
</span>
";
}
// line 259
yield " </div>
</div>
<div class=\"uv-tab-view\">
<div class=\"uv-ticket-section\">
<div class=\"uv-ticket-main create\">
<div class=\"uv-ticket-strip\">
<span>
<span class=\"timeago uv-margin-0\" data-timestamp=\"ticket.createdAt\" title=\"";
// line 267
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["localizedCreateAtTime"]) || array_key_exists("localizedCreateAtTime", $context) ? $context["localizedCreateAtTime"] : (function () { throw new RuntimeError('Variable "localizedCreateAtTime" does not exist.', 267, $this->source); })()), "html", null, true);
yield "\">
";
// line 268
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["localizedCreateAtTime"]) || array_key_exists("localizedCreateAtTime", $context) ? $context["localizedCreateAtTime"] : (function () { throw new RuntimeError('Variable "localizedCreateAtTime" does not exist.', 268, $this->source); })()), "html", null, true);
yield "
</span>
- ";
// line 270
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["createThread"]) || array_key_exists("createThread", $context) ? $context["createThread"] : (function () { throw new RuntimeError('Variable "createThread" does not exist.', 270, $this->source); })()), "user", [], "any", false, false, false, 270), "name", [], "any", false, false, false, 270), "html", null, true);
yield "
<span class=\"uv-ticket-strip-label\">
";
// line 272
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("created Ticket"), "html", null, true);
yield "
";
// line 276
yield " </span>
</span>
</div>
<div class=\"uv-ticket-main-lt\">
<img src=\"";
// line 280
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["initialThread"]) || array_key_exists("initialThread", $context) ? $context["initialThread"] : (function () { throw new RuntimeError('Variable "initialThread" does not exist.', 280, $this->source); })()), "user", [], "any", false, false, false, 280), "thumbnail", [], "any", false, false, false, 280)) ? (((((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 280, $this->source); })()), "request", [], "any", false, false, false, 280), "scheme", [], "any", false, false, false, 280) . "://") . CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 280, $this->source); })()), "request", [], "any", false, false, false, 280), "httpHost", [], "any", false, false, false, 280)) . $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("")) . CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["initialThread"]) || array_key_exists("initialThread", $context) ? $context["initialThread"] : (function () { throw new RuntimeError('Variable "initialThread" does not exist.', 280, $this->source); })()), "user", [], "any", false, false, false, 280), "thumbnail", [], "any", false, false, false, 280))) : ((((CoreExtension::getAttribute($this->env, $this->source, (isset($context["initialThread"]) || array_key_exists("initialThread", $context) ? $context["initialThread"] : (function () { throw new RuntimeError('Variable "initialThread" does not exist.', 280, $this->source); })()), "createdBy", [], "any", false, false, false, 280) == "customer")) ? ($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl((isset($context["default_customer_image_path"]) || array_key_exists("default_customer_image_path", $context) ? $context["default_customer_image_path"] : (function () { throw new RuntimeError('Variable "default_customer_image_path" does not exist.', 280, $this->source); })()))) : ($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl((isset($context["default_agent_image_path"]) || array_key_exists("default_agent_image_path", $context) ? $context["default_agent_image_path"] : (function () { throw new RuntimeError('Variable "default_agent_image_path" does not exist.', 280, $this->source); })())))))), "html", null, true);
yield "\">
</div>
<div class=\"uv-ticket-main-rt\">
<span class=\"uv-ticket-member-name\">
";
// line 284
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["createThread"]) || array_key_exists("createThread", $context) ? $context["createThread"] : (function () { throw new RuntimeError('Variable "createThread" does not exist.', 284, $this->source); })()), "user", [], "any", false, false, false, 284), "name", [], "any", false, false, false, 284), "html", null, true);
yield "
</span>
<!-- Message Block -->
<div class=\"message\">
<p>
";
// line 290
if ((Twig\Extension\CoreExtension::striptags(CoreExtension::getAttribute($this->env, $this->source, (isset($context["createThread"]) || array_key_exists("createThread", $context) ? $context["createThread"] : (function () { throw new RuntimeError('Variable "createThread" does not exist.', 290, $this->source); })()), "reply", [], "any", false, false, false, 290)) == CoreExtension::getAttribute($this->env, $this->source, (isset($context["createThread"]) || array_key_exists("createThread", $context) ? $context["createThread"] : (function () { throw new RuntimeError('Variable "createThread" does not exist.', 290, $this->source); })()), "reply", [], "any", false, false, false, 290))) {
// line 291
yield " ";
yield Twig\Extension\CoreExtension::nl2br($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["createThread"]) || array_key_exists("createThread", $context) ? $context["createThread"] : (function () { throw new RuntimeError('Variable "createThread" does not exist.', 291, $this->source); })()), "reply", [], "any", false, false, false, 291), "html", null, true));
yield "
";
} else {
// line 293
yield " ";
yield CoreExtension::getAttribute($this->env, $this->source, (isset($context["createThread"]) || array_key_exists("createThread", $context) ? $context["createThread"] : (function () { throw new RuntimeError('Variable "createThread" does not exist.', 293, $this->source); })()), "reply", [], "any", false, false, false, 293);
yield "
";
}
// line 295
yield " </p>
</div>
<!-- //Message Block -->
<!-- Attachment Block -->
";
// line 300
if (Twig\Extension\CoreExtension::length($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, (isset($context["createThread"]) || array_key_exists("createThread", $context) ? $context["createThread"] : (function () { throw new RuntimeError('Variable "createThread" does not exist.', 300, $this->source); })()), "attachments", [], "any", false, false, false, 300))) {
// line 301
yield " <div class=\"uv-ticket-uploads\">
<h4>";
// line 302
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Uploaded Files"), "html", null, true);
yield "</h4>
<div class=\"uv-ticket-uploads-strip uv-viewer-images\">
";
// line 304
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, (isset($context["createThread"]) || array_key_exists("createThread", $context) ? $context["createThread"] : (function () { throw new RuntimeError('Variable "createThread" does not exist.', 304, $this->source); })()), "attachments", [], "any", false, false, false, 304));
foreach ($context['_seq'] as $context["_key"] => $context["attachment"]) {
// line 305
yield " <a href=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["attachment"], "downloadURL", [], "any", false, false, false, 305), "html", null, true);
yield "\" target = \"_blank\" class=\"uv-ticket-uploads-brick uv-no-pointer-events\" data-toggle=\"tooltip\" title=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["attachment"], "name", [], "any", false, false, false, 305), "html", null, true);
yield "\">
<img src=\"";
// line 306
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["attachment"], "iconURL", [], "any", false, false, false, 306), "html", null, true);
yield "\" class=\"uv-auto-pointer-events\"/>
</a>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['attachment'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 309
yield " </div>
";
// line 310
if ((Twig\Extension\CoreExtension::length($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, (isset($context["createThread"]) || array_key_exists("createThread", $context) ? $context["createThread"] : (function () { throw new RuntimeError('Variable "createThread" does not exist.', 310, $this->source); })()), "attachments", [], "any", false, false, false, 310)) > 1)) {
// line 311
yield " <div class=\"uv-upload-actions\">
<!-- <a href=\"#\"><span class=\"uv-icon-open-in-files\"></span>Open in Files</a> -->
<a href=\"";
// line 313
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_customer_download_ticket_attachment_zip");
yield "/";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["createThread"]) || array_key_exists("createThread", $context) ? $context["createThread"] : (function () { throw new RuntimeError('Variable "createThread" does not exist.', 313, $this->source); })()), "id", [], "any", false, false, false, 313), "html", null, true);
yield "\" target=\"_blank\"><span class=\"uv-icon-attachment\"></span> ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Download (as .zip)"), "html", null, true);
yield "</a>
</div>
";
}
// line 316
yield " </div>
";
}
// line 318
yield " <!-- //Attachment Block -->
</div>
</div>
<!-- uv-ticket-accordion-expanded uv-ticket-accordion-no-count-->
<div class=\"uv-ticket-accordion\">
<div class=\"uv-ticket-count-wrapper\">
<span class=\"uv-ticket-count-stat\">";
// line 325
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["totalThreads"]) || array_key_exists("totalThreads", $context) ? $context["totalThreads"] : (function () { throw new RuntimeError('Variable "totalThreads" does not exist.', 325, $this->source); })()), "html", null, true);
yield "</span>
</div>
<div class=\"uv-ticket-wrapper thread-list\">
</div>
</div>
</div>
</div>
<!-- Reply Form Block -->
<div class=\"uv-ticket-main uv-ticket-reply uv-no-error-success-icon\">
<div class=\"uv-ticket-main-lt\">
<span class=\"uv-icon-ellipsis\"></span>
";
// line 337
if (CoreExtension::getAttribute($this->env, $this->source, (isset($context["currentUser"]) || array_key_exists("currentUser", $context) ? $context["currentUser"] : (function () { throw new RuntimeError('Variable "currentUser" does not exist.', 337, $this->source); })()), "smallThumbnail", [], "any", false, false, false, 337)) {
// line 338
yield " <img src=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 338, $this->source); })()), "request", [], "any", false, false, false, 338), "scheme", [], "any", false, false, false, 338) . "://") . CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 338, $this->source); })()), "request", [], "any", false, false, false, 338), "httpHost", [], "any", false, false, false, 338)) . $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("")), "html", null, true);
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["currentUser"]) || array_key_exists("currentUser", $context) ? $context["currentUser"] : (function () { throw new RuntimeError('Variable "currentUser" does not exist.', 338, $this->source); })()), "smallThumbnail", [], "any", false, false, false, 338), "html", null, true);
yield "\" />
";
} else {
// line 340
yield " <img src=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl((isset($context["default_customer_image_path"]) || array_key_exists("default_customer_image_path", $context) ? $context["default_customer_image_path"] : (function () { throw new RuntimeError('Variable "default_customer_image_path" does not exist.', 340, $this->source); })())), "html", null, true);
yield "\" />
";
}
// line 342
yield " </div>
<div class=\"uv-ticket-main-rt\">
<span class=\"uv-ticket-member-name\">";
// line 344
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["currentUser"]) || array_key_exists("currentUser", $context) ? $context["currentUser"] : (function () { throw new RuntimeError('Variable "currentUser" does not exist.', 344, $this->source); })()), "name", [], "any", false, false, false, 344), "html", null, true);
yield "</span>
<!-- Reply Tab View -->
<div class=\"uv-tab-view uv-tab-view-active\" id=\"reply\">
<form enctype=\"multipart/form-data\" method=\"post\" action=\"";
// line 348
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_customer_add_ticket_thread", ["id" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["ticket"]) || array_key_exists("ticket", $context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.', 348, $this->source); })()), "id", [], "any", false, false, false, 348)]), "html", null, true);
yield "\" id=\"ticket-form\">
<input name=\"threadType\" value=\"reply\" type=\"hidden\">
<input class=\"reply-status\" name=\"status\" value=\"\" type=\"hidden\">
<div class=\"uv-element-block collaborators\" style=\"display: none\">
<label class=\"uv-field-label\">";
// line 352
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Collaborators"), "html", null, true);
yield "</label>
<div class=\"uv-field-block\">
</div>
</div>
<div class=\"uv-element-block cc-bcc\">
";
// line 358
if (((isset($context["isCollaborator"]) || array_key_exists("isCollaborator", $context) ? $context["isCollaborator"] : (function () { throw new RuntimeError('Variable "isCollaborator" does not exist.', 358, $this->source); })()) != true)) {
// line 359
yield " <label>
<div class=\"uv-checkbox\">
<input type=\"checkbox\" class=\"cc-bcc-toggle\">
<span class=\"uv-checkbox-view\"></span>
</div>
<span class=\"uv-checkbox-label\">";
// line 364
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("CC/BCC"), "html", null, true);
yield "</span>
</label>
";
}
// line 367
yield " <div class=\"uv-field-block\" style=\"display: none\">
<div class=\"uv-group\">
<input class=\"uv-group-field\" type=\"text\">
<select class=\"uv-group-select cc-bcc-select\">
<option value=\"bcc\">";
// line 371
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("BCC"), "html", null, true);
yield "</option>
<option value=\"cc\">";
// line 372
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("CC"), "html", null, true);
yield "</option>
</select>
</div>
<div class=\"cc-bcc-list\">
</div>
</div>
</div>
<div class=\"uv-element-block uv-element-block-textarea\">
<label class=\"uv-field-label\">";
// line 381
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Write a reply"), "html", null, true);
yield "</label>
<div class=\"uv-field-block\">
<textarea class=\"uv-field\" name=\"message\" id=\"reply-area\">";
// line 383
yield "</textarea>
</div>
</div>
<!-- Field -->
<div class=\"uv-element-block attachment-block\">
<label>
<span class=\"uv-file-label\">";
// line 390
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Add Attachment"), "html", null, true);
yield "</span>
</label>
</div>
<!-- //Field -->
<div class=\"uv-action-buttons\">
<div id=\"reply-btn\" class=\"uv-btn uv-submit-left-side\">";
// line 396
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Reply"), "html", null, true);
yield "</div>
<div class=\"uv-dropdown reply uv-submit-right-side\">
<div class=\"uv-btn uv-dropdown-other no-left-padding\">
<span class=\"uv-icon-down-light\"></span>
</div>
<div class=\"uv-dropdown-list uv-top-left\">
<div class=\"uv-dropdown-container\">
<label>";
// line 403
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Reply"), "html", null, true);
yield "</label>
<ul>
<li data-id=\"\">";
// line 405
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Submit"), "html", null, true);
yield "</li>
<li class=\"confirm-close-ticket\" data-id=\"closed\">";
// line 406
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Submit And Closed"), "html", null, true);
yield "</li>
</ul>
</div>
</div>
</div>
</div>
</form>
</div>
<!-- //Reply Tab View -->
</div>
</div>
<!-- Reply Form Block -->
</div>
</section>
</div>
</div>
</div>
<div class=\"uv-kudo\">
<div class=\"uv-kudo-button\">
<!--uv-kudo-button-active-->
<div class=\"uv-kudo-icon\"></div>
<span>";
// line 428
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Rate Support"), "html", null, true);
yield "</span>
</div>
<div class=\"uv-kudo-plank\">
";
// line 432
$context["count"] = 0;
// line 433
yield " ";
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, (isset($context["ticket"]) || array_key_exists("ticket", $context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.', 433, $this->source); })()), "ratings", [], "any", false, false, false, 433));
foreach ($context['_seq'] as $context["_key"] => $context["rating"]) {
// line 434
yield " ";
if ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["rating"], "getCustomer", [], "any", false, false, false, 434), "id", [], "any", false, false, false, 434) == CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 434, $this->source); })()), "user", [], "any", false, false, false, 434), "id", [], "any", false, false, false, 434))) {
// line 435
yield " ";
$context["count"] = CoreExtension::getAttribute($this->env, $this->source, $context["rating"], "getStars", [], "any", false, false, false, 435);
// line 436
yield " ";
}
// line 437
yield " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['rating'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 438
yield " <div class=\"uv-kudo-response-wrapper\">
<span class=\"uv-kudo-response uv-kudo-very-sad ";
// line 439
if (((isset($context["count"]) || array_key_exists("count", $context) ? $context["count"] : (function () { throw new RuntimeError('Variable "count" does not exist.', 439, $this->source); })()) == 1)) {
yield "uv-kudo-done";
}
yield "\" data-id=\"1\"></span>
<span class=\"uv-kudo-response uv-kudo-sad ";
// line 440
if (((isset($context["count"]) || array_key_exists("count", $context) ? $context["count"] : (function () { throw new RuntimeError('Variable "count" does not exist.', 440, $this->source); })()) == 2)) {
yield "uv-kudo-done";
}
yield "\" data-id=\"2\"></span>
<span class=\"uv-kudo-response uv-kudo-neutral ";
// line 441
if (((isset($context["count"]) || array_key_exists("count", $context) ? $context["count"] : (function () { throw new RuntimeError('Variable "count" does not exist.', 441, $this->source); })()) == 3)) {
yield "uv-kudo-done";
}
yield "\" data-id=\"3\"></span>
<span class=\"uv-kudo-response uv-kudo-happy ";
// line 442
if (((isset($context["count"]) || array_key_exists("count", $context) ? $context["count"] : (function () { throw new RuntimeError('Variable "count" does not exist.', 442, $this->source); })()) == 4)) {
yield "uv-kudo-done";
}
yield "\" data-id=\"4\"></span>
<span class=\"uv-kudo-response uv-kudo-very-happy ";
// line 443
if (((isset($context["count"]) || array_key_exists("count", $context) ? $context["count"] : (function () { throw new RuntimeError('Variable "count" does not exist.', 443, $this->source); })()) == 5)) {
yield "uv-kudo-done";
}
yield "\" data-id=\"5\"></span>
</div>
<span class=\"uv-kudo-message\">
";
// line 447
if (((isset($context["count"]) || array_key_exists("count", $context) ? $context["count"] : (function () { throw new RuntimeError('Variable "count" does not exist.', 447, $this->source); })()) == 1)) {
// line 448
yield " ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("I am very Sad"), "html", null, true);
yield "
";
} elseif (( // line 449
(isset($context["count"]) || array_key_exists("count", $context) ? $context["count"] : (function () { throw new RuntimeError('Variable "count" does not exist.', 449, $this->source); })()) == 2)) {
// line 450
yield " ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("I am Sad"), "html", null, true);
yield "
";
} elseif (( // line 451
(isset($context["count"]) || array_key_exists("count", $context) ? $context["count"] : (function () { throw new RuntimeError('Variable "count" does not exist.', 451, $this->source); })()) == 3)) {
// line 452
yield " ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("I am Neutral"), "html", null, true);
yield "
";
} elseif (( // line 453
(isset($context["count"]) || array_key_exists("count", $context) ? $context["count"] : (function () { throw new RuntimeError('Variable "count" does not exist.', 453, $this->source); })()) == 4)) {
// line 454
yield " ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("I am Happy"), "html", null, true);
yield "
";
} elseif (( // line 455
(isset($context["count"]) || array_key_exists("count", $context) ? $context["count"] : (function () { throw new RuntimeError('Variable "count" does not exist.', 455, $this->source); })()) == 5)) {
// line 456
yield " ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("I am Very Happy"), "html", null, true);
yield "
";
}
// line 458
yield " </span>
</div>
</div>
<div class=\"uv-pop-up-overlay\" id=\"confirm-ticket-close-modal\" style=\"display: none;\">
<div class=\"uv-pop-up-box uv-pop-up-slim\">
<span class=\"uv-pop-up-close\"></span>
<h2>";
// line 465
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Confirm Close Ticket"), "html", null, true);
yield "</h2>
<p>";
// line 466
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Are you sure? You want to reply and close ticket."), "html", null, true);
yield "</p>
<div class=\"uv-pop-up-actions\">
<a href=\"#\" class=\"uv-btn uv-btn-error\" id=\"confirmed-close-ticket\" data-id=\"closed\">";
// line 469
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Confirm"), "html", null, true);
yield "</a>
<a href=\"#\" class=\"uv-btn cancel\">";
// line 470
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Cancel"), "html", null, true);
yield "</a>
</div>
</div>
</div>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return; yield '';
}
// line 476
public function block_footer($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "footer"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "footer"));
// line 477
yield " ";
yield from $this->yieldParentBlock("footer", $context, $blocks);
yield "
";
// line 478
yield Twig\Extension\CoreExtension::include($this->env, $context, "@UVDeskCoreFramework/Templates/attachment.html.twig");
yield "
<script id=\"thread_list_item_tmp\" type=\"text/template\">
<div class=\"uv-ticket-strip\">
<span>
<span class=\"timeago uv-margin-0\" data-timestamp=\"<%= timestamp %>\" title=\"<%= formatedCreatedAt %>\">
<%= formatedCreatedAt %>
</span>
- <%- fullname %>
<span class=\"uv-ticket-strip-label\">
";
// line 488
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("replied"), "html", null, true);
yield "
</span>
</span>
<% if(cc || bcc) { %>
<div class=\"uv-ticket-strip\">
<% if(cc) { %>
<span><span class=\"uv-ticket-strip-label\">";
// line 494
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("CC"), "html", null, true);
yield " -</span> <%- cc %></span>
<% } if(bcc) { %>
<span><span class=\"uv-ticket-strip-label\">";
// line 496
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("BCC"), "html", null, true);
yield " -</span> <%- bcc %></span>
<% } %>
</div>
<% } %>
</div>
<div class=\"uv-ticket-main-lt\">
<% if(user && smallThumbnail != null) { %>
<img src=\"";
// line 503
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 503, $this->source); })()), "request", [], "any", false, false, false, 503), "scheme", [], "any", false, false, false, 503) . "://") . CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 503, $this->source); })()), "request", [], "any", false, false, false, 503), "httpHost", [], "any", false, false, false, 503)) . $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("")), "html", null, true);
yield "<%= smallThumbnail.slice(1) %>\" />
<% } else { %>
<img src=\"<% if(userType == 'agent') { %> ";
// line 505
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl((isset($context["default_agent_image_path"]) || array_key_exists("default_agent_image_path", $context) ? $context["default_agent_image_path"] : (function () { throw new RuntimeError('Variable "default_agent_image_path" does not exist.', 505, $this->source); })())), "html", null, true);
yield " <% } else { %> ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl((isset($context["default_customer_image_path"]) || array_key_exists("default_customer_image_path", $context) ? $context["default_customer_image_path"] : (function () { throw new RuntimeError('Variable "default_customer_image_path" does not exist.', 505, $this->source); })())), "html", null, true);
yield " <% } %>\" />
<% } %>
</div>
<div class=\"uv-ticket-main-rt\">
<span class=\"uv-ticket-member-name\">
<%- fullname %>
</span>
<!-- Message Block -->
<div class=\"message\">
<%= reply %>
</div>
<!-- //Message Block -->
<!-- Attachment Block -->
<% if(attachments.length) { %>
<div class=\"uv-ticket-uploads\">
<h4>";
// line 521
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Uploaded Files"), "html", null, true);
yield "</h4>
<div class=\"uv-ticket-uploads-strip uv-viewer-images\">
<% _.each(attachments, function(file) { %>
<a href=\"<%-file.downloadURL.replace(\"member\",\"customer\") %>\" target =\"_blank\" class=\"uv-ticket-uploads-brick uv-no-pointer-events\" data-toggle=\"tooltip\" title=\"<%- file.name %>\">
<img src=\"<%-file.iconURL %>\" class=\"uv-auto-pointer-events\">
</a>
<% }) %>
</div>
<% if (attachments.length > 1) { %>
<div class=\"thread-attachments-zip pull-left\">
<div class=\"uv-upload-actions\">
";
// line 534
yield " <a href=\"";
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_customer_download_ticket_attachment_zip");
yield "/<%= id %>\" target=\"_blank\"><span class=\"uv-icon-attachment\"></span> ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Download (as .zip)"), "html", null, true);
yield "</a>
</div>
</div>
<% } %>
</div>
<% } %>
<!-- //Attachment Block -->
</div>
</script>
<script type=\"text/javascript\">
var ticketApp = {};
\$(function () {
var TicketModel = Backbone.Model.extend({
idAttribute : \"id\",
validation: {
'email': [{
required: true,
msg: '";
// line 554
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("This field is mandatory"), "html", null, true);
yield "'
},{
pattern: 'email',
msg: '";
// line 557
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Please enter a valid email"), "html", null, true);
yield "'
}],
},
});
var TicketView = Backbone.View.extend({
el: \$('.uv-body'),
stopDraftSaveFlag: 0,
events: {
'click .uv-kudo-response-wrapper .uv-kudo-response': 'rateTicket',
'click .collaborator-list .uv-btn-tag': 'removeCcCollaborator',
'change .uv-element-block.cc-bcc .cc-bcc-toggle': 'showCcBccBlock',
'keypress .uv-element-block.cc-bcc .uv-group-field': 'addCcBccInput',
'click .cc-bcc-list .uv-btn-tag, .to-list .uv-btn-tag': 'removeEmail',
'click .uv-dropdown.reply .uv-dropdown-list li:not(.confirm-close-ticket)': 'validateForm',
'click #reply-btn': 'validateForm',
'click #confirmed-close-ticket': 'confirmedAction',
'click .confirm-close-ticket': 'confirmClose',
},
confirmClose: function(e) {
\$('#confirm-ticket-close-modal').show();
},
confirmedAction: function(e) {
\$('#confirm-ticket-close-modal').hide();
this.validateForm(e);
},
ratingText: {
'1' : \"";
// line 584
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("I am very Sad"), "html", null, true);
yield "\",
'2' : \"";
// line 585
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("I am Sad"), "html", null, true);
yield "\",
'3' : \"";
// line 586
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("I am Neutral"), "html", null, true);
yield "\",
'4' : \"";
// line 587
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("I am Happy"), "html", null, true);
yield "\",
'5' : \"";
// line 588
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("I am Very Happy"), "html", null, true);
yield "\",
},
loaderTemplate : _.template(\$(\"#loader-tmp\").html()),
rateTicket : function(e) {
var element = Backbone.\$(e.currentTarget);
var count = element.attr('data-id');
this.model.set('rating', count);
var self = this;
app.appView.showLoader()
this.model.save({}, {
url : \"";
// line 599
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_customer_rate_ticket", ["id" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["ticket"]) || array_key_exists("ticket", $context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.', 599, $this->source); })()), "id", [], "any", false, false, false, 599)]), "html", null, true);
yield "\",
success: function (model, response, options) {
app.appView.hideLoader()
if(response.alertClass == 'success') {
\$('.uv-kudo-response').removeClass('uv-kudo-done');
element.addClass('uv-kudo-done');
\$('.uv-kudo-message').text(self.ratingText[count])
\$('.uv-kudo-button').trigger('click')
} else {
app.appView.renderResponseAlert(response);
}
},
error: function (model, xhr, options) {
if(url = xhr.getResponseHeader('Location'))
window.location = url;
}
});
},
addCCCollaborators: function() {
if(collaboratorCollection.length) {
var collaboratorContainer = \$('.uv-element-block.collaborators');
collaboratorContainer.find('.uv-field-block').html('');
collaboratorContainer.show()
_.each(collaboratorCollection.models, function (item) {
var json = item.attributes;
collaboratorContainer.find('.uv-field-block').append(\"<span><input type='hidden' name='cccol[]' value='\" + json.email + \"'/><a class='uv-btn-tag' href='#'><span class='uv-icon-remove-dark-before'></span>\" + json.name + \"</a></span>\")
}, this);
}
},
removeCcCollaborator: function(e) {
e.preventDefault()
if (Backbone.\$(e.currentTarget).parent()[0]) {
Backbone.\$(e.currentTarget).parent()[0].removeChild(e.currentTarget);
var collaboratorContainer = \$('.uv-element-block.collaborators');
}
if(!collaboratorContainer.find('.uv-btn-tag').length)
collaboratorContainer.hide()
},
showCcBccBlock: function(e) {
var currentElement = Backbone.\$(e.currentTarget);
var currentTab = currentElement.parents('.uv-tab-view');
if(currentElement.is(':checked')) {
currentTab.find('.uv-element-block.cc-bcc').find('.uv-field-block').show()
} else {
currentTab.find('.uv-element-block.cc-bcc').find('.uv-field-block').hide()
currentTab.find('.uv-element-block .cc-bcc-list').html('')
}
},
addCcBccInput: function(e) {
var inputElement = Backbone.\$(e.currentTarget);
var currentTab = inputElement.parents('.uv-tab-view');
var email = inputElement.val().trim();
if (e.which === 13 && email) {
e.preventDefault()
type = currentTab.find('.cc-bcc-select option:selected').text()
if(!this.model.preValidate({name: 'email', email: email})) {
inputName = \$('.cc-bcc-select').val()
inputElement.val('').trigger('input')
inputElement.removeClass('uv-dropdown-btn-active')
inputElement.siblings('.uv-dropdown-list').hide()
if(!currentTab.find(\".cc-bcc-list input[value='\" + email + \"'].\" + inputName).length) {
currentTab.find('.cc-bcc-list').append(\"<span><input type='hidden' name='\" + inputName + \"[]' value='\" + email + \"' class='\" + inputName + \"'/><a class=uv-btn-tag uv-lowercase' href='#'><span class='uv-icon-remove-dark-before'></span>\" + email + \" : <span class='uv-uppercase'>\" + type + \"</span></a></span>\")
}
}
}
},
removeEmail: function(e) {
e.preventDefault()
Backbone.\$(e.currentTarget).parent().remove();
},
validateForm : function(e) {
e.preventDefault();
var element = Backbone.\$(e.currentTarget);
form = \$('#ticket-form');
form.find('.reply-status').val(element.attr('data-id'));
form.find('.uv-field-message').remove()
var html = tinyMCE.get(\"reply-area\").getContent();
if(app.appView.htmlText(html) != '' || -1 != html.indexOf('<img')) {
this.stopDraftSaveFlag = 1;
\t\t\t\t\t\tapp.appView.showLoader();
tinyMCE.activeEditor.uploadImages(function(response) {
app.appView.hideLoader();
\t\t\t\t\t\t\tform.submit();
\t \$('.uv-dropdown.reply').find('.uv-btn').attr('disabled', 'disabled');
\t \$('#reply-btn,#confirmed-close-ticket').attr('disabled', 'disabled');
});
} else {
form.find('.uv-element-block-textarea').append(\"<span class='uv-field-message'>";
// line 690
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("This field is mandatory"), "html", null, true);
yield "</span>\");
}
}
});
var ThreadModel = Backbone.Model.extend({
idAttribute : \"id\",
defaults : {
hasTask : 0,
task: null
}
});
var ThreadCollection = AppCollection.extend({
model : ThreadModel,
mode: \"infinite\",
url : \"";
// line 706
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_customer_thread_collection_xhr", ["id" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["ticket"]) || array_key_exists("ticket", $context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.', 706, $this->source); })()), "id", [], "any", false, false, false, 706)]), "html", null, true);
yield "\",
parseRecords: function (resp, options) {
return resp.threads;
},
syncData : function() {
app.appView.showLoader()
this.fetch({
remove: false,
success: function(model, response) {
app.appView.hideLoader()
pagination.renderPagination(response.pagination);
threadCollection.state.currentPage = parseInt(response.pagination.current) + 1;
},
error: function (model, xhr, options) {
app.appView.hideLoader()
if(url = xhr.getResponseHeader('Location'))
window.location = url;
}
});
}
});
var ThreadItem = Backbone.View.extend({
tagName : \"div\",
className : \"uv-ticket-main\",
template : _.template(\$(\"#thread_list_item_tmp\").html()),
render : function () {
this.\$el.html(this.template(this.model.toJSON()));
this.\$el.addClass(\"thread-\" + this.model.id)
return this;
}
});
var ThreadList = Backbone.View.extend({
el : \$(\".thread-list\"),
initialize : function() {
this.listenTo(threadCollection.fullCollection, \"add\", this.renderThread);
},
renderThread : function (item) {
var threadItem = new ThreadItem({
model: item
});
if(item.id < threadCollection.fullCollection.at(0).id)
this.\$el.prepend(threadItem.render().el);
else
this.\$el.append(threadItem.render().el);
threadItem.\$el.find('.helpdesk_blockquote').eq(0).before(\"<span class='uv-icon-ellipsis uv-ellipsis-mirror'></span>\").hide();
//emojifyRun();
this.\$el.find('img').removeAttr('crossorigin');
//viewerImages();
//convertForImages(this.\$el);
this.\$el.find('div.message a').attr('target', '_blank');
app.appView.relativeTime()
}
});
var Pagination = Backbone.View.extend({
el: \$('.uv-ticket-accordion'),
events: {
'click .uv-ticket-count-stat': 'loadMore',
},
renderPagination: function(pagination) {
if(pagination.totalCount - pagination.lastItemNumber > 0 && pagination.lastItemNumber > 0) {
var remain = pagination.totalCount - pagination.lastItemNumber;
\$('.uv-ticket-count-stat').text(remain)
\$('.uv-ticket-accordion').removeClass('uv-ticket-accordion-expanded').removeClass('uv-ticket-accordion-no-count')
} else {
\$('.uv-ticket-accordion').addClass('uv-ticket-accordion-expanded').addClass('uv-ticket-accordion-no-count')
}
},
loadMore: function() {
threadCollection.syncData();
}
});
//Collaborator Code starts here
_.extend(Backbone.Model.prototype, Backbone.Validation.mixin);
var CollaboratorModel = Backbone.Model.extend({
idAttribute : \"id\",
validation: {
'email': [{
required: true,
msg: '";
// line 789
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("This field is mandatory"), "html", null, true);
yield "'
},{
pattern: 'email',
msg: '";
// line 792
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Please enter a valid email"), "html", null, true);
yield "'
}]
},
defaults : {
ticketId : ";
// line 796
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["ticket"]) || array_key_exists("ticket", $context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.', 796, $this->source); })()), "id", [], "any", false, false, false, 796), "html", null, true);
yield ",
email: ''
},
parse: function (resp, options) {
return resp.collaborator;
},
urlRoot : \"";
// line 802
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_customer_update_ticket_collaborators_xhr");
yield "\"
});
var CollaboratorCollection = Backbone.PageableCollection.extend({
model : CollaboratorModel
});
var CollaboratorItem = Backbone.View.extend({
tagName : \"a\",
className: 'uv-btn-tag',
template : _.template(\"<span class='uv-tag'><span class='uv-icon-remove-dark-before'></span><%- name %></span>\"),
events : {
'click .uv-tag' : 'removeItem'
},
render : function () {
this.\$el.html(this.template(this.model.toJSON()));
return this;
},
unrender : function(response) {
if(response.alertMessage != undefined) {
collaboratorListView.render();
app.appView.renderResponseAlert(response);
}
},
removeItem: function() {
self = this;
app.appView.showLoader();
this.model.destroy({
data : { 'ticketId' : this.model.attributes.ticketId },
success : function (model, response, options) {
app.appView.hideLoader();
self.\$el.remove();
self.unrender(response);
},
error: function (model, xhr, options) {
if(url = xhr.getResponseHeader('Location'))
window.location = url;
var response = warningResponse;
if(xhr.responseJSON)
response = xhr.responseJSON;
app.appView.hideLoader();
app.appView.renderResponseAlert(response);
}
});
}
});
var CollaboratorList = Backbone.View.extend({
el : \$(\".collaborator-list-block\"),
events : {
'keypress .uv-field' : 'addCollaborator',
'focusout .uv-field' : 'removeErrorClass',
},
initialize : function() {
//Backbone.Validation.bind(this);
},
render : function() {
this.\$el.find(\".collaborator-list\").html('');
var self = this;
collaboratorOptionHtml = '';
if(collaboratorCollection.length) {
_.each(collaboratorCollection.models, function (item) {
this.renderCollaborator(item);
}, this);
}
ticketView.addCCCollaborators()
},
renderCollaborator : function (item) {
var collaborator = new CollaboratorItem({
model: item
});
this.\$el.find('.collaborator-list').append(collaborator.render().el);
},
removeErrorClass: function(e) {
var inputElement = Backbone.\$(e.currentTarget);
inputElement.removeClass('uv-field-error');
inputElement.parents('.uv-element-block').find('.uv-field-message').remove()
},
addCollaborator : function(e) {
var inputElement = Backbone.\$(e.currentTarget);
inputElement.removeClass('uv-field-error');
inputElement.parents('.uv-element-block').find('.uv-field-message').remove()
var text = inputElement.val().trim();
if (e.which === 13 && text) {
this.model = new CollaboratorModel();
self = this;
this.model.set({email: text})
if(this.model.isValid(true)) {
app.appView.showLoader();
this.model.save({},{
success : function (model, response, options) {
inputElement.val('');
if(response.alertClass == \"success\") {
collaboratorCollection.add(model);
}
self.render();
app.appView.hideLoader();
app.appView.renderResponseAlert(response);
},
error: function (model, xhr, options) {
if(url = xhr.getResponseHeader('Location'))
window.location = url;
var response = warningResponse;
if(xhr.responseJSON)
response = xhr.responseJSON;
app.appView.hideLoader();
app.appView.renderResponseAlert(response);
}
});
} else {
inputElement.addClass('uv-field-error');
if(text)
inputElement.parents('.uv-element-block').append(\"<span class='uv-field-message'>";
// line 918
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Email address is invalid"), "html", null, true);
yield "</span>\");
}
}
}
});
//Collaborator Code ends here
ticketModel = new TicketModel({
id : \"";
// line 926
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["ticket"]) || array_key_exists("ticket", $context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.', 926, $this->source); })()), "id", [], "any", false, false, false, 926), "html", null, true);
yield "\",
});
ticketApp.ticketView = ticketView = new TicketView({
model: ticketModel
});
var threadCollection = new ThreadCollection();
\t\t var threadList = new ThreadList();
var pagination = new Pagination();
threadCollection.syncData();
";
// line 938
if ((CoreExtension::getAttribute($this->env, $this->source, (isset($context["ticket"]) || array_key_exists("ticket", $context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.', 938, $this->source); })()), "customer", [], "any", false, false, false, 938) == CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 938, $this->source); })()), "user", [], "any", false, false, false, 938))) {
// line 939
yield " var collaboratorCollection = new CollaboratorCollection(\$.parseJSON('";
yield json_encode(CoreExtension::getAttribute($this->env, $this->source, (isset($context["ticket_service"]) || array_key_exists("ticket_service", $context) ? $context["ticket_service"] : (function () { throw new RuntimeError('Variable "ticket_service" does not exist.', 939, $this->source); })()), "getTicketCollaborators", [CoreExtension::getAttribute($this->env, $this->source, (isset($context["ticket"]) || array_key_exists("ticket", $context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.', 939, $this->source); })()), "id", [], "any", false, false, false, 939)], "method", false, false, false, 939));
yield "'));
var collaboratorListView = new CollaboratorList();
collaboratorListView.render();
";
}
// line 943
yield " });
</script>
";
// line 946
yield Twig\Extension\CoreExtension::include($this->env, $context, "@UVDeskCoreFramework/Templates/tinyMCE.html.twig");
yield "
\t<script>
\t\tsfTinyMce.init({
height: '250px',
\t\t\tselector : '.uv-ticket-reply textarea',
\t\t\timages_upload_url: \"\",
setup: function(editor) {
}
\t\t});
\t</script>
<script>
document.addEventListener(\"DOMContentLoaded\", function(){
var uvKudoButton = document.querySelector(\".uv-kudo-button\");
var uvKudoIcon = document.querySelector(\".uv-kudo-icon\");
var uvKudoPlank = document.querySelector(\".uv-kudo-plank\");
var uvKudoMessage = document.querySelector(\".uv-kudo-message\");
var uvKudoResponse = document.querySelector(\".uv-kudo-response\");
uvKudoButton.addEventListener(\"click\", function(){
uvKudoButton.classList.toggle(\"uv-kudo-button-active\");
uvKudoPlank.classList.toggle(\"uv-kudo-plank-active\");
});
});
</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return; yield '';
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "@UVDeskSupportCenter/Knowledgebase/ticketView.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 1562 => 946, 1557 => 943, 1549 => 939, 1547 => 938, 1532 => 926, 1521 => 918, 1402 => 802, 1393 => 796, 1386 => 792, 1380 => 789, 1294 => 706, 1275 => 690, 1181 => 599, 1167 => 588, 1163 => 587, 1159 => 586, 1155 => 585, 1151 => 584, 1121 => 557, 1115 => 554, 1089 => 534, 1074 => 521, 1053 => 505, 1048 => 503, 1038 => 496, 1033 => 494, 1024 => 488, 1011 => 478, 1006 => 477, 996 => 476, 980 => 470, 976 => 469, 970 => 466, 966 => 465, 957 => 458, 951 => 456, 949 => 455, 944 => 454, 942 => 453, 937 => 452, 935 => 451, 930 => 450, 928 => 449, 923 => 448, 921 => 447, 912 => 443, 906 => 442, 900 => 441, 894 => 440, 888 => 439, 885 => 438, 879 => 437, 876 => 436, 873 => 435, 870 => 434, 865 => 433, 863 => 432, 856 => 428, 831 => 406, 827 => 405, 822 => 403, 812 => 396, 803 => 390, 794 => 383, 789 => 381, 777 => 372, 773 => 371, 767 => 367, 761 => 364, 754 => 359, 752 => 358, 743 => 352, 736 => 348, 729 => 344, 725 => 342, 719 => 340, 712 => 338, 710 => 337, 695 => 325, 686 => 318, 682 => 316, 672 => 313, 668 => 311, 666 => 310, 663 => 309, 654 => 306, 647 => 305, 643 => 304, 638 => 302, 635 => 301, 633 => 300, 626 => 295, 620 => 293, 614 => 291, 612 => 290, 603 => 284, 596 => 280, 590 => 276, 586 => 272, 581 => 270, 576 => 268, 572 => 267, 562 => 259, 556 => 256, 552 => 255, 549 => 254, 547 => 253, 542 => 251, 538 => 250, 531 => 246, 525 => 245, 521 => 244, 513 => 239, 505 => 233, 499 => 231, 497 => 230, 492 => 229, 490 => 228, 486 => 226, 476 => 219, 471 => 217, 466 => 214, 464 => 213, 461 => 212, 455 => 209, 451 => 208, 448 => 207, 446 => 206, 441 => 204, 437 => 203, 434 => 202, 428 => 199, 424 => 198, 421 => 197, 418 => 196, 412 => 193, 408 => 192, 405 => 191, 403 => 190, 396 => 186, 391 => 184, 385 => 181, 380 => 179, 373 => 177, 369 => 176, 363 => 172, 360 => 171, 357 => 170, 354 => 169, 351 => 168, 349 => 167, 317 => 138, 205 => 28, 195 => 27, 178 => 20, 174 => 19, 169 => 16, 161 => 14, 159 => 13, 153 => 12, 147 => 8, 137 => 7, 114 => 5, 91 => 4, 68 => 3, 45 => 1,);
}
public function getSourceContext(): Source
{
return new Source("{% extends \"@UVDeskSupportCenter/Templates/layout.html.twig\" %}
{% block title %}#{{ ticket.id }} {{ ticket.subject }}{% endblock %}
{% block ogtitle %}#{{ ticket.id }} {{ ticket.subject }}{% endblock %}
{% block twtitle %}#{{ ticket.id }} {{ ticket.subject }}{% endblock %}
{% block tabHeader %}
\t<div class=\"uv-nav-bar uv-nav-tab\">
\t\t<div class=\"uv-container\">
\t\t\t<div class=\"uv-nav-bar-lt\">
\t\t\t\t<ul class=\"uv-nav-tab-label\">
\t\t\t\t\t<li><a href=\"{{ path('helpdesk_customer_ticket_collection') }}\">{{ 'Ticket Requests'|trans }}</a></li>
\t\t\t\t\t{% if websiteConfiguration.ticketCreateOption %}
<li><a href=\"{{ path('helpdesk_customer_create_ticket') }}\">{{ 'New Ticket Request'|trans }}</a></li>
{% endif %}
\t\t\t\t</ul>
\t\t\t</div>
\t\t\t<div class=\"uv-nav-bar-rt\">
\t\t\t\t<form method=\"get\" action=\"{{path('helpdesk_customer_front_article_search')}}\">
\t\t\t\t\t<input name=\"s\" class=\"uv-nav-search\" type=\"text\" placeholder=\"{{ 'Search'|trans }}\">
\t\t\t\t</form>
\t\t\t</div>
\t\t</div>
\t</div>
{% endblock %}
{% block body %}
<style>
.uv-btn-tag {
margin-right: 5px;
}
.uv-group-field {
width: 80%;
}
.uv-element-block .mce-tinymce {
margin-top: 10px;
}
.uv-ticket-view .uv-ticket-accordion .uv-ticket-wrapper {
display: block;
}
.message {
font-size: 15px;
}
.message img {
max-width: 100%;
}
.uv-dropdown.reply .uv-dropdown-btn-active {
border: none;
}
.uv-dropdown.reply .uv-dropdown-list {
width: 220px;
bottom: 47px;
}
\t\t.uv-rtl .uv-top-left {
\t\t\tleft: unset;
\t\t}
\t\t.uv-rtl .uv-dropdown-list {
\t\t\ttext-align: right;
\t\t}
.uv-action-buttons {
margin: 10px 0px;
}
.uv-action-buttons .uv-btn:first-child {
margin-left: 0px;
}
\t\t.uv-rtl .uv-action-buttons .uv-btn:first-child {
\t\t\tmargin-left: 5px;
\t\t\tmargin-right: 0px;
\t\t}
.uv-action-buttons .uv-btn {
margin: 5px;
}
form #customFieldCollection .uv-field-error-icon, form #customFieldCollection .uv-field-success-icon {
display: none;
}
.custom-field-field-display .uv-field-block {
width: 100%;
color: #333333;
word-wrap: break-word;
}
.custom-field-field-display .uv-field-block span {
display: inline;
}
.uv-submit-left-side {
margin: 0!important;
padding-right: 5px;
border-bottom-right-radius: 0;
border-top-right-radius: 0;
}
\t\t.uv-rtl .uv-submit-left-side {
\t\t\tpadding-right: 10px;
border-bottom-right-radius: 3px;
border-top-right-radius: 3px;
\t\t\tpadding-left: 5px;
\t\t\tborder-bottom-left-radius: 0;
border-top-left-radius: 0;
\t\t}
.uv-submit-right-side {
margin: 0!important;
}
.no-left-padding {
padding-left: 0;
border-bottom-left-radius: 0;
border-top-left-radius: 0;
}
\t\t.uv-rtl .no-left-padding {
\t\t\tpadding-left: 10px;
border-bottom-left-radius: 3px;
border-top-left-radius: 3px;
\t\t\tpadding-right: 0;
\t\t\tborder-bottom-right-radius: 0;
\t\t\tborder-top-right-radius: 0;
\t\t}
.uv-btn-error {
background-color: #FF5656!important;
}
.uv-pull-rightside {
float: right;
font-size: 15px;
cursor: pointer;
}
\t\t.uv-rtl .uv-pull-rightside {
float: left;
}
.uv-print-icon {
display: inline-block;
width: 20px;
height: 20px;
background-image: url(\"{{ asset('bundles/uvdeskcoreframework/images/uvdesk-kb-sprite.svg') }}\");
background-position: -176px -91px;
vertical-align: middle;
}
@media print {
.uv-navbar,.uv-ticket-action-bar, .uv-kudo, .uv-aside-back, .uv-footer, .uv-ticket-main.uv-ticket-reply, .uv-nav-bar,input, .uv-dropdown-list>.uv-dropdown-container,.uv-notifications-wrapper,.uv-pop-up-overlay,.uv-loader-view, .uv-loader,.uv-header,.uv-upload-actions,.uv-pull-rightside {
display: none !important;
}
}
blockquote {
background: #f9f9f9;
border-left: 4px solid #ccc;
margin: 1.5em 10px;
padding: 0.5em 10px;
quotes: \"\\201C\"\"\\201D\"\"\\2018\"\"\\2019\";
}
blockquote:before {
color: #ccc;
content: open-quote;
font-size: 3em;
line-height: 0.1em;
margin-right: 0.05em;
vertical-align: -0.4em;
}
blockquote p {
display: inline;
}
</style>
{% set ticketAgent = ticket.agent ? user_service.getAgentDetailById(ticket.agent.id) : null %}
{% set totalThreads = ticket_service.getTicketTotalThreads(ticket.id) %}
{% set customer = user_service.getCustomerPartialDetailById(ticket.customer.id) %}
{% set createThread = ticket_service.getCreateReply(ticket.id, 'customer') %}
{% set currentUser = user_service.getCustomerPartialDetailById(app.user.id) %}
<div class=\"uv-thread\">
<div class=\"uv-thread-lt\">
<aside>
<h6>{{ 'Ticket Information'|trans }}</h6>
<h6>{{ 'Ticket Id'|trans }} #{{ ticket.id }}</h6>
<div class=\"uv-aside-brick\">
<h6>{{ 'Total Replies'|trans }}</h6>
<span class=\"uv-icon-replies\"></span>
<span>{{ totalThreads }}</span>
</div>
<div class=\"uv-aside-brick\">
<h6>{{ 'Timestamp'|trans }}</h6>
<span class=\"uv-icon-timestamp\"></span>
<span>{{ localizedCreateAtTime }}</span>
</div>
<div class=\"uv-hr\"></div>
{% if ticket.customer != app.user %}
<div class=\"uv-aside-brick\">
<h6>{{ 'Customer'|trans }}</h6>
<span>{{ customer.name }}</span>
</div>
{% endif %}
{% if ticketAgent %}
<div class=\"uv-aside-brick\">
<h6>{{ 'Agent'|trans }}</h6>
<span>{{ ticketAgent.name }}</span>
</div>
{% endif %}
<div class=\"uv-aside-brick\">
<h6>{{ 'Status'|trans }}</h6>
<span>{{ ticket.status.description|trans }}</span>
</div>
{% if ticket.type %}
<div class=\"uv-aside-brick\">
<h6>{{ 'Type'|trans }}</h6>
<span>{{ ticket.type.code }}</span>
</div>
{% endif %}
{% if ticket.customer == app.user %}
<div class=\"uv-hr\"></div>
<div class=\"uv-aside-brick collaborator-list-block\">
<div class=\"uv-element-block\">
<label class=\"uv-field-label\">{{ 'Collaborators'|trans }}</label>
<div class=\"uv-field-block\">
<input class=\"uv-field\" type=\"text\" name=\"email\" type=\"text\" value=\"\" placeholder=\"{{ 'Type email to add'|trans }}\">
</div>
</div>
<div class=\"collaborator-list\" style=\"margin-top: 10px\">
</div>
</div>
{% endif %}
</aside>
{% if user_service.isfileExists('apps/uvdesk/form-component') %}
{{ user_service.getCustomFieldTemplateCustomer() | raw }}
{% elseif user_service.isfileExists('apps/uvdesk/custom-fields') %}
{{ user_service.getCustomFieldTemplateCustomer() | raw }}
{% endif %}
</div>
<div class=\"uv-thread-rt\">
<section>
<div class=\"uv-ticket-view\">
<div class=\"uv-ticket-head\">
<h1>
{{ ticket.subject }}
<span class=\"uv-pull-rightside uv-print-icon\" onclick=\"window.print()\"></span>
</h1>
<div class=\"uv-ticket-strip\">
<span>
<span class=\"uv-ticket-strip-label\">{{ 'Created'|trans }} -</span>
<span class=\"timeago\" data-timestamp=\"{{ localizedCreateAtTime }}\" title=\"{{ localizedCreateAtTime }}\">
{{ localizedCreateAtTime }}
</span>
</span>
<span>
<span class=\"uv-ticket-strip-label\">{{ 'By'|trans }} -</span>
{{ createThread.user.name }}
</span>
{% if ticketAgent %}
<span>
<span class=\"uv-ticket-strip-label\">{{ 'Agent'|trans }} -</span>
{{ ticketAgent.name }}
</span>
{% endif %}
</div>
</div>
<div class=\"uv-tab-view\">
<div class=\"uv-ticket-section\">
<div class=\"uv-ticket-main create\">
<div class=\"uv-ticket-strip\">
<span>
<span class=\"timeago uv-margin-0\" data-timestamp=\"ticket.createdAt\" title=\"{{ localizedCreateAtTime }}\">
{{ localizedCreateAtTime }}
</span>
- {{ createThread.user.name }}
<span class=\"uv-ticket-strip-label\">
{{ 'created Ticket'|trans }}
{# {% if ticket.ipAddress %}
({{ 'IP'|trans }} -{{ ticket.ipAddress }})
{% endif %} #}
</span>
</span>
</div>
<div class=\"uv-ticket-main-lt\">
<img src=\"{{ initialThread.user.thumbnail ? app.request.scheme ~'://' ~ app.request.httpHost ~ asset('') ~ (initialThread.user.thumbnail) : initialThread.createdBy == 'customer' ? asset(default_customer_image_path) : asset(default_agent_image_path) }}\">
</div>
<div class=\"uv-ticket-main-rt\">
<span class=\"uv-ticket-member-name\">
{{ createThread.user.name }}
</span>
<!-- Message Block -->
<div class=\"message\">
<p>
{% if createThread.reply|striptags == createThread.reply %}
{{ createThread.reply|nl2br }}
{% else %}
{{ createThread.reply|raw }}
{% endif %}
</p>
</div>
<!-- //Message Block -->
<!-- Attachment Block -->
{% if createThread.attachments|length %}
<div class=\"uv-ticket-uploads\">
<h4>{{ 'Uploaded Files'|trans }}</h4>
<div class=\"uv-ticket-uploads-strip uv-viewer-images\">
{% for attachment in createThread.attachments %}
<a href=\"{{ attachment.downloadURL }}\" target = \"_blank\" class=\"uv-ticket-uploads-brick uv-no-pointer-events\" data-toggle=\"tooltip\" title=\"{{ attachment.name }}\">
<img src=\"{{ attachment.iconURL }}\" class=\"uv-auto-pointer-events\"/>
</a>
{% endfor %}
</div>
{% if createThread.attachments|length > 1 %}
<div class=\"uv-upload-actions\">
<!-- <a href=\"#\"><span class=\"uv-icon-open-in-files\"></span>Open in Files</a> -->
<a href=\"{{ path('helpdesk_customer_download_ticket_attachment_zip') }}/{{createThread.id}}\" target=\"_blank\"><span class=\"uv-icon-attachment\"></span> {{ 'Download (as .zip)'|trans }}</a>
</div>
{% endif %}
</div>
{% endif %}
<!-- //Attachment Block -->
</div>
</div>
<!-- uv-ticket-accordion-expanded uv-ticket-accordion-no-count-->
<div class=\"uv-ticket-accordion\">
<div class=\"uv-ticket-count-wrapper\">
<span class=\"uv-ticket-count-stat\">{{ totalThreads }}</span>
</div>
<div class=\"uv-ticket-wrapper thread-list\">
</div>
</div>
</div>
</div>
<!-- Reply Form Block -->
<div class=\"uv-ticket-main uv-ticket-reply uv-no-error-success-icon\">
<div class=\"uv-ticket-main-lt\">
<span class=\"uv-icon-ellipsis\"></span>
{% if currentUser.smallThumbnail %}
<img src=\"{{ app.request.scheme ~'://' ~ app.request.httpHost ~ asset('') }}{{ currentUser.smallThumbnail }}\" />
{% else %}
<img src=\"{{ asset(default_customer_image_path) }}\" />
{% endif %}
</div>
<div class=\"uv-ticket-main-rt\">
<span class=\"uv-ticket-member-name\">{{ currentUser.name }}</span>
<!-- Reply Tab View -->
<div class=\"uv-tab-view uv-tab-view-active\" id=\"reply\">
<form enctype=\"multipart/form-data\" method=\"post\" action=\"{{ path('helpdesk_customer_add_ticket_thread', {'id': ticket.id }) }}\" id=\"ticket-form\">
<input name=\"threadType\" value=\"reply\" type=\"hidden\">
<input class=\"reply-status\" name=\"status\" value=\"\" type=\"hidden\">
<div class=\"uv-element-block collaborators\" style=\"display: none\">
<label class=\"uv-field-label\">{{ 'Collaborators'|trans }}</label>
<div class=\"uv-field-block\">
</div>
</div>
<div class=\"uv-element-block cc-bcc\">
{% if isCollaborator != true %}
<label>
<div class=\"uv-checkbox\">
<input type=\"checkbox\" class=\"cc-bcc-toggle\">
<span class=\"uv-checkbox-view\"></span>
</div>
<span class=\"uv-checkbox-label\">{{ 'CC/BCC'|trans }}</span>
</label>
{% endif %}
<div class=\"uv-field-block\" style=\"display: none\">
<div class=\"uv-group\">
<input class=\"uv-group-field\" type=\"text\">
<select class=\"uv-group-select cc-bcc-select\">
<option value=\"bcc\">{{ 'BCC'|trans }}</option>
<option value=\"cc\">{{ 'CC'|trans }}</option>
</select>
</div>
<div class=\"cc-bcc-list\">
</div>
</div>
</div>
<div class=\"uv-element-block uv-element-block-textarea\">
<label class=\"uv-field-label\">{{ 'Write a reply'|trans }}</label>
<div class=\"uv-field-block\">
<textarea class=\"uv-field\" name=\"message\" id=\"reply-area\">{# {{ ticket_service.getCustomerDraft(ticket.id, 'reply') }} #}</textarea>
</div>
</div>
<!-- Field -->
<div class=\"uv-element-block attachment-block\">
<label>
<span class=\"uv-file-label\">{{ 'Add Attachment'|trans }}</span>
</label>
</div>
<!-- //Field -->
<div class=\"uv-action-buttons\">
<div id=\"reply-btn\" class=\"uv-btn uv-submit-left-side\">{{ 'Reply'|trans }}</div>
<div class=\"uv-dropdown reply uv-submit-right-side\">
<div class=\"uv-btn uv-dropdown-other no-left-padding\">
<span class=\"uv-icon-down-light\"></span>
</div>
<div class=\"uv-dropdown-list uv-top-left\">
<div class=\"uv-dropdown-container\">
<label>{{ 'Reply'|trans }}</label>
<ul>
<li data-id=\"\">{{ 'Submit'|trans }}</li>
<li class=\"confirm-close-ticket\" data-id=\"closed\">{{ 'Submit And Closed'|trans }}</li>
</ul>
</div>
</div>
</div>
</div>
</form>
</div>
<!-- //Reply Tab View -->
</div>
</div>
<!-- Reply Form Block -->
</div>
</section>
</div>
</div>
</div>
<div class=\"uv-kudo\">
<div class=\"uv-kudo-button\">
<!--uv-kudo-button-active-->
<div class=\"uv-kudo-icon\"></div>
<span>{{ 'Rate Support'|trans }}</span>
</div>
<div class=\"uv-kudo-plank\">
{% set count = 0 %}
{% for rating in ticket.ratings %}
{% if rating.getCustomer.id == app.user.id %}
{% set count = rating.getStars %}
{% endif %}
{% endfor %}
<div class=\"uv-kudo-response-wrapper\">
<span class=\"uv-kudo-response uv-kudo-very-sad {% if count == 1 %}uv-kudo-done{% endif %}\" data-id=\"1\"></span>
<span class=\"uv-kudo-response uv-kudo-sad {% if count == 2 %}uv-kudo-done{% endif %}\" data-id=\"2\"></span>
<span class=\"uv-kudo-response uv-kudo-neutral {% if count == 3 %}uv-kudo-done{% endif %}\" data-id=\"3\"></span>
<span class=\"uv-kudo-response uv-kudo-happy {% if count == 4 %}uv-kudo-done{% endif %}\" data-id=\"4\"></span>
<span class=\"uv-kudo-response uv-kudo-very-happy {% if count == 5 %}uv-kudo-done{% endif %}\" data-id=\"5\"></span>
</div>
<span class=\"uv-kudo-message\">
{% if count == 1 %}
{{ 'I am very Sad'|trans }}
{% elseif count == 2 %}
{{ 'I am Sad'|trans }}
{% elseif count == 3 %}
{{ 'I am Neutral'|trans }}
{% elseif count == 4 %}
{{ 'I am Happy'|trans }}
{% elseif count == 5 %}
{{ 'I am Very Happy'|trans }}
{% endif %}
</span>
</div>
</div>
<div class=\"uv-pop-up-overlay\" id=\"confirm-ticket-close-modal\" style=\"display: none;\">
<div class=\"uv-pop-up-box uv-pop-up-slim\">
<span class=\"uv-pop-up-close\"></span>
<h2>{{ 'Confirm Close Ticket'|trans }}</h2>
<p>{{ 'Are you sure? You want to reply and close ticket.'|trans }}</p>
<div class=\"uv-pop-up-actions\">
<a href=\"#\" class=\"uv-btn uv-btn-error\" id=\"confirmed-close-ticket\" data-id=\"closed\">{{ 'Confirm'|trans }}</a>
<a href=\"#\" class=\"uv-btn cancel\">{{ 'Cancel'|trans }}</a>
</div>
</div>
</div>
{% endblock %}
{% block footer %}
{{ parent() }}
{{ include('@UVDeskCoreFramework/Templates/attachment.html.twig') }}
<script id=\"thread_list_item_tmp\" type=\"text/template\">
<div class=\"uv-ticket-strip\">
<span>
<span class=\"timeago uv-margin-0\" data-timestamp=\"<%= timestamp %>\" title=\"<%= formatedCreatedAt %>\">
<%= formatedCreatedAt %>
</span>
- <%- fullname %>
<span class=\"uv-ticket-strip-label\">
{{ 'replied'|trans }}
</span>
</span>
<% if(cc || bcc) { %>
<div class=\"uv-ticket-strip\">
<% if(cc) { %>
<span><span class=\"uv-ticket-strip-label\">{{ 'CC'|trans }} -</span> <%- cc %></span>
<% } if(bcc) { %>
<span><span class=\"uv-ticket-strip-label\">{{ 'BCC'|trans }} -</span> <%- bcc %></span>
<% } %>
</div>
<% } %>
</div>
<div class=\"uv-ticket-main-lt\">
<% if(user && smallThumbnail != null) { %>
<img src=\"{{ app.request.scheme ~'://' ~ app.request.httpHost ~ asset('') }}<%= smallThumbnail.slice(1) %>\" />
<% } else { %>
<img src=\"<% if(userType == 'agent') { %> {{ asset(default_agent_image_path) }} <% } else { %> {{ asset(default_customer_image_path) }} <% } %>\" />
<% } %>
</div>
<div class=\"uv-ticket-main-rt\">
<span class=\"uv-ticket-member-name\">
<%- fullname %>
</span>
<!-- Message Block -->
<div class=\"message\">
<%= reply %>
</div>
<!-- //Message Block -->
<!-- Attachment Block -->
<% if(attachments.length) { %>
<div class=\"uv-ticket-uploads\">
<h4>{{ 'Uploaded Files'|trans }}</h4>
<div class=\"uv-ticket-uploads-strip uv-viewer-images\">
<% _.each(attachments, function(file) { %>
<a href=\"<%-file.downloadURL.replace(\"member\",\"customer\") %>\" target =\"_blank\" class=\"uv-ticket-uploads-brick uv-no-pointer-events\" data-toggle=\"tooltip\" title=\"<%- file.name %>\">
<img src=\"<%-file.iconURL %>\" class=\"uv-auto-pointer-events\">
</a>
<% }) %>
</div>
<% if (attachments.length > 1) { %>
<div class=\"thread-attachments-zip pull-left\">
<div class=\"uv-upload-actions\">
{#<a href=\"#\"><span class=\"uv-icon-open-in-files\"></span>Open in Files</a>#}
<a href=\"{{ path('helpdesk_customer_download_ticket_attachment_zip') }}/<%= id %>\" target=\"_blank\"><span class=\"uv-icon-attachment\"></span> {{ 'Download (as .zip)'|trans }}</a>
</div>
</div>
<% } %>
</div>
<% } %>
<!-- //Attachment Block -->
</div>
</script>
<script type=\"text/javascript\">
var ticketApp = {};
\$(function () {
var TicketModel = Backbone.Model.extend({
idAttribute : \"id\",
validation: {
'email': [{
required: true,
msg: '{{ \"This field is mandatory\"|trans }}'
},{
pattern: 'email',
msg: '{{ \"Please enter a valid email\"|trans }}'
}],
},
});
var TicketView = Backbone.View.extend({
el: \$('.uv-body'),
stopDraftSaveFlag: 0,
events: {
'click .uv-kudo-response-wrapper .uv-kudo-response': 'rateTicket',
'click .collaborator-list .uv-btn-tag': 'removeCcCollaborator',
'change .uv-element-block.cc-bcc .cc-bcc-toggle': 'showCcBccBlock',
'keypress .uv-element-block.cc-bcc .uv-group-field': 'addCcBccInput',
'click .cc-bcc-list .uv-btn-tag, .to-list .uv-btn-tag': 'removeEmail',
'click .uv-dropdown.reply .uv-dropdown-list li:not(.confirm-close-ticket)': 'validateForm',
'click #reply-btn': 'validateForm',
'click #confirmed-close-ticket': 'confirmedAction',
'click .confirm-close-ticket': 'confirmClose',
},
confirmClose: function(e) {
\$('#confirm-ticket-close-modal').show();
},
confirmedAction: function(e) {
\$('#confirm-ticket-close-modal').hide();
this.validateForm(e);
},
ratingText: {
'1' : \"{{ 'I am very Sad'|trans }}\",
'2' : \"{{ 'I am Sad'|trans }}\",
'3' : \"{{ 'I am Neutral'|trans }}\",
'4' : \"{{ 'I am Happy'|trans }}\",
'5' : \"{{ 'I am Very Happy'|trans }}\",
},
loaderTemplate : _.template(\$(\"#loader-tmp\").html()),
rateTicket : function(e) {
var element = Backbone.\$(e.currentTarget);
var count = element.attr('data-id');
this.model.set('rating', count);
var self = this;
app.appView.showLoader()
this.model.save({}, {
url : \"{{ path('helpdesk_customer_rate_ticket', {'id': ticket.id}) }}\",
success: function (model, response, options) {
app.appView.hideLoader()
if(response.alertClass == 'success') {
\$('.uv-kudo-response').removeClass('uv-kudo-done');
element.addClass('uv-kudo-done');
\$('.uv-kudo-message').text(self.ratingText[count])
\$('.uv-kudo-button').trigger('click')
} else {
app.appView.renderResponseAlert(response);
}
},
error: function (model, xhr, options) {
if(url = xhr.getResponseHeader('Location'))
window.location = url;
}
});
},
addCCCollaborators: function() {
if(collaboratorCollection.length) {
var collaboratorContainer = \$('.uv-element-block.collaborators');
collaboratorContainer.find('.uv-field-block').html('');
collaboratorContainer.show()
_.each(collaboratorCollection.models, function (item) {
var json = item.attributes;
collaboratorContainer.find('.uv-field-block').append(\"<span><input type='hidden' name='cccol[]' value='\" + json.email + \"'/><a class='uv-btn-tag' href='#'><span class='uv-icon-remove-dark-before'></span>\" + json.name + \"</a></span>\")
}, this);
}
},
removeCcCollaborator: function(e) {
e.preventDefault()
if (Backbone.\$(e.currentTarget).parent()[0]) {
Backbone.\$(e.currentTarget).parent()[0].removeChild(e.currentTarget);
var collaboratorContainer = \$('.uv-element-block.collaborators');
}
if(!collaboratorContainer.find('.uv-btn-tag').length)
collaboratorContainer.hide()
},
showCcBccBlock: function(e) {
var currentElement = Backbone.\$(e.currentTarget);
var currentTab = currentElement.parents('.uv-tab-view');
if(currentElement.is(':checked')) {
currentTab.find('.uv-element-block.cc-bcc').find('.uv-field-block').show()
} else {
currentTab.find('.uv-element-block.cc-bcc').find('.uv-field-block').hide()
currentTab.find('.uv-element-block .cc-bcc-list').html('')
}
},
addCcBccInput: function(e) {
var inputElement = Backbone.\$(e.currentTarget);
var currentTab = inputElement.parents('.uv-tab-view');
var email = inputElement.val().trim();
if (e.which === 13 && email) {
e.preventDefault()
type = currentTab.find('.cc-bcc-select option:selected').text()
if(!this.model.preValidate({name: 'email', email: email})) {
inputName = \$('.cc-bcc-select').val()
inputElement.val('').trigger('input')
inputElement.removeClass('uv-dropdown-btn-active')
inputElement.siblings('.uv-dropdown-list').hide()
if(!currentTab.find(\".cc-bcc-list input[value='\" + email + \"'].\" + inputName).length) {
currentTab.find('.cc-bcc-list').append(\"<span><input type='hidden' name='\" + inputName + \"[]' value='\" + email + \"' class='\" + inputName + \"'/><a class=uv-btn-tag uv-lowercase' href='#'><span class='uv-icon-remove-dark-before'></span>\" + email + \" : <span class='uv-uppercase'>\" + type + \"</span></a></span>\")
}
}
}
},
removeEmail: function(e) {
e.preventDefault()
Backbone.\$(e.currentTarget).parent().remove();
},
validateForm : function(e) {
e.preventDefault();
var element = Backbone.\$(e.currentTarget);
form = \$('#ticket-form');
form.find('.reply-status').val(element.attr('data-id'));
form.find('.uv-field-message').remove()
var html = tinyMCE.get(\"reply-area\").getContent();
if(app.appView.htmlText(html) != '' || -1 != html.indexOf('<img')) {
this.stopDraftSaveFlag = 1;
\t\t\t\t\t\tapp.appView.showLoader();
tinyMCE.activeEditor.uploadImages(function(response) {
app.appView.hideLoader();
\t\t\t\t\t\t\tform.submit();
\t \$('.uv-dropdown.reply').find('.uv-btn').attr('disabled', 'disabled');
\t \$('#reply-btn,#confirmed-close-ticket').attr('disabled', 'disabled');
});
} else {
form.find('.uv-element-block-textarea').append(\"<span class='uv-field-message'>{{ 'This field is mandatory'|trans }}</span>\");
}
}
});
var ThreadModel = Backbone.Model.extend({
idAttribute : \"id\",
defaults : {
hasTask : 0,
task: null
}
});
var ThreadCollection = AppCollection.extend({
model : ThreadModel,
mode: \"infinite\",
url : \"{{ path('helpdesk_customer_thread_collection_xhr', {'id': ticket.id}) }}\",
parseRecords: function (resp, options) {
return resp.threads;
},
syncData : function() {
app.appView.showLoader()
this.fetch({
remove: false,
success: function(model, response) {
app.appView.hideLoader()
pagination.renderPagination(response.pagination);
threadCollection.state.currentPage = parseInt(response.pagination.current) + 1;
},
error: function (model, xhr, options) {
app.appView.hideLoader()
if(url = xhr.getResponseHeader('Location'))
window.location = url;
}
});
}
});
var ThreadItem = Backbone.View.extend({
tagName : \"div\",
className : \"uv-ticket-main\",
template : _.template(\$(\"#thread_list_item_tmp\").html()),
render : function () {
this.\$el.html(this.template(this.model.toJSON()));
this.\$el.addClass(\"thread-\" + this.model.id)
return this;
}
});
var ThreadList = Backbone.View.extend({
el : \$(\".thread-list\"),
initialize : function() {
this.listenTo(threadCollection.fullCollection, \"add\", this.renderThread);
},
renderThread : function (item) {
var threadItem = new ThreadItem({
model: item
});
if(item.id < threadCollection.fullCollection.at(0).id)
this.\$el.prepend(threadItem.render().el);
else
this.\$el.append(threadItem.render().el);
threadItem.\$el.find('.helpdesk_blockquote').eq(0).before(\"<span class='uv-icon-ellipsis uv-ellipsis-mirror'></span>\").hide();
//emojifyRun();
this.\$el.find('img').removeAttr('crossorigin');
//viewerImages();
//convertForImages(this.\$el);
this.\$el.find('div.message a').attr('target', '_blank');
app.appView.relativeTime()
}
});
var Pagination = Backbone.View.extend({
el: \$('.uv-ticket-accordion'),
events: {
'click .uv-ticket-count-stat': 'loadMore',
},
renderPagination: function(pagination) {
if(pagination.totalCount - pagination.lastItemNumber > 0 && pagination.lastItemNumber > 0) {
var remain = pagination.totalCount - pagination.lastItemNumber;
\$('.uv-ticket-count-stat').text(remain)
\$('.uv-ticket-accordion').removeClass('uv-ticket-accordion-expanded').removeClass('uv-ticket-accordion-no-count')
} else {
\$('.uv-ticket-accordion').addClass('uv-ticket-accordion-expanded').addClass('uv-ticket-accordion-no-count')
}
},
loadMore: function() {
threadCollection.syncData();
}
});
//Collaborator Code starts here
_.extend(Backbone.Model.prototype, Backbone.Validation.mixin);
var CollaboratorModel = Backbone.Model.extend({
idAttribute : \"id\",
validation: {
'email': [{
required: true,
msg: '{{ \"This field is mandatory\"|trans }}'
},{
pattern: 'email',
msg: '{{ \"Please enter a valid email\"|trans }}'
}]
},
defaults : {
ticketId : {{ ticket.id }},
email: ''
},
parse: function (resp, options) {
return resp.collaborator;
},
urlRoot : \"{{ path('helpdesk_customer_update_ticket_collaborators_xhr') }}\"
});
var CollaboratorCollection = Backbone.PageableCollection.extend({
model : CollaboratorModel
});
var CollaboratorItem = Backbone.View.extend({
tagName : \"a\",
className: 'uv-btn-tag',
template : _.template(\"<span class='uv-tag'><span class='uv-icon-remove-dark-before'></span><%- name %></span>\"),
events : {
'click .uv-tag' : 'removeItem'
},
render : function () {
this.\$el.html(this.template(this.model.toJSON()));
return this;
},
unrender : function(response) {
if(response.alertMessage != undefined) {
collaboratorListView.render();
app.appView.renderResponseAlert(response);
}
},
removeItem: function() {
self = this;
app.appView.showLoader();
this.model.destroy({
data : { 'ticketId' : this.model.attributes.ticketId },
success : function (model, response, options) {
app.appView.hideLoader();
self.\$el.remove();
self.unrender(response);
},
error: function (model, xhr, options) {
if(url = xhr.getResponseHeader('Location'))
window.location = url;
var response = warningResponse;
if(xhr.responseJSON)
response = xhr.responseJSON;
app.appView.hideLoader();
app.appView.renderResponseAlert(response);
}
});
}
});
var CollaboratorList = Backbone.View.extend({
el : \$(\".collaborator-list-block\"),
events : {
'keypress .uv-field' : 'addCollaborator',
'focusout .uv-field' : 'removeErrorClass',
},
initialize : function() {
//Backbone.Validation.bind(this);
},
render : function() {
this.\$el.find(\".collaborator-list\").html('');
var self = this;
collaboratorOptionHtml = '';
if(collaboratorCollection.length) {
_.each(collaboratorCollection.models, function (item) {
this.renderCollaborator(item);
}, this);
}
ticketView.addCCCollaborators()
},
renderCollaborator : function (item) {
var collaborator = new CollaboratorItem({
model: item
});
this.\$el.find('.collaborator-list').append(collaborator.render().el);
},
removeErrorClass: function(e) {
var inputElement = Backbone.\$(e.currentTarget);
inputElement.removeClass('uv-field-error');
inputElement.parents('.uv-element-block').find('.uv-field-message').remove()
},
addCollaborator : function(e) {
var inputElement = Backbone.\$(e.currentTarget);
inputElement.removeClass('uv-field-error');
inputElement.parents('.uv-element-block').find('.uv-field-message').remove()
var text = inputElement.val().trim();
if (e.which === 13 && text) {
this.model = new CollaboratorModel();
self = this;
this.model.set({email: text})
if(this.model.isValid(true)) {
app.appView.showLoader();
this.model.save({},{
success : function (model, response, options) {
inputElement.val('');
if(response.alertClass == \"success\") {
collaboratorCollection.add(model);
}
self.render();
app.appView.hideLoader();
app.appView.renderResponseAlert(response);
},
error: function (model, xhr, options) {
if(url = xhr.getResponseHeader('Location'))
window.location = url;
var response = warningResponse;
if(xhr.responseJSON)
response = xhr.responseJSON;
app.appView.hideLoader();
app.appView.renderResponseAlert(response);
}
});
} else {
inputElement.addClass('uv-field-error');
if(text)
inputElement.parents('.uv-element-block').append(\"<span class='uv-field-message'>{{ 'Email address is invalid'|trans }}</span>\");
}
}
}
});
//Collaborator Code ends here
ticketModel = new TicketModel({
id : \"{{ ticket.id }}\",
});
ticketApp.ticketView = ticketView = new TicketView({
model: ticketModel
});
var threadCollection = new ThreadCollection();
\t\t var threadList = new ThreadList();
var pagination = new Pagination();
threadCollection.syncData();
{% if ticket.customer == app.user %}
var collaboratorCollection = new CollaboratorCollection(\$.parseJSON('{{ ticket_service.getTicketCollaborators(ticket.id)|json_encode|raw }}'));
var collaboratorListView = new CollaboratorList();
collaboratorListView.render();
{% endif %}
});
</script>
{{ include(\"@UVDeskCoreFramework/Templates/tinyMCE.html.twig\") }}
\t<script>
\t\tsfTinyMce.init({
height: '250px',
\t\t\tselector : '.uv-ticket-reply textarea',
\t\t\timages_upload_url: \"\",
setup: function(editor) {
}
\t\t});
\t</script>
<script>
document.addEventListener(\"DOMContentLoaded\", function(){
var uvKudoButton = document.querySelector(\".uv-kudo-button\");
var uvKudoIcon = document.querySelector(\".uv-kudo-icon\");
var uvKudoPlank = document.querySelector(\".uv-kudo-plank\");
var uvKudoMessage = document.querySelector(\".uv-kudo-message\");
var uvKudoResponse = document.querySelector(\".uv-kudo-response\");
uvKudoButton.addEventListener(\"click\", function(){
uvKudoButton.classList.toggle(\"uv-kudo-button-active\");
uvKudoPlank.classList.toggle(\"uv-kudo-plank-active\");
});
});
</script>
{% endblock %}
", "@UVDeskSupportCenter/Knowledgebase/ticketView.html.twig", "/home/users/sanjeev.papnoi/www/html/uvdesk-community-v1.1.6/vendor/uvdesk/support-center-bundle/Resources/views/Knowledgebase/ticketView.html.twig");
}
}