var/cache/dev/twig/6a/6adb2273d32d8d257f8cab4de9f9ec84a94d9aa9cda68d134ea349f0f3786eaa.php line 41

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* @UVDeskCoreFramework/ticket.html.twig */
  14. class __TwigTemplate_0fff46a10c203fadf87a566ca3ed355febca15e4b6f74f595f5f36d214ea8b4b extends Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->blocks = [
  23.             'title' => [$this'block_title'],
  24.             'templateCSS' => [$this'block_templateCSS'],
  25.             'pageContent' => [$this'block_pageContent'],
  26.             'footer' => [$this'block_footer'],
  27.         ];
  28.     }
  29.     protected function doGetParent(array $context)
  30.     {
  31.         // line 1
  32.         return "@UVDeskCoreFramework//Templates//layout.html.twig";
  33.     }
  34.     protected function doDisplay(array $context, array $blocks = [])
  35.     {
  36.         $macros $this->macros;
  37.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  38.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@UVDeskCoreFramework/ticket.html.twig"));
  39.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  40.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@UVDeskCoreFramework/ticket.html.twig"));
  41.         $this->parent $this->loadTemplate("@UVDeskCoreFramework//Templates//layout.html.twig""@UVDeskCoreFramework/ticket.html.twig"1);
  42.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  43.         
  44.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  45.         
  46.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  47.     }
  48.     // line 3
  49.     public function block_title($context, array $blocks = [])
  50.     {
  51.         $macros $this->macros;
  52.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  53.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  54.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  55.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  56.         echo twig_escape_filter($this->env, ((("#" twig_get_attribute($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"falsefalsefalse3)) . " ") . twig_get_attribute($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"falsefalsefalse3)), "html"nulltrue);
  57.         
  58.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  59.         
  60.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  61.     }
  62.     // line 5
  63.     public function block_templateCSS($context, array $blocks = [])
  64.     {
  65.         $macros $this->macros;
  66.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  67.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""templateCSS"));
  68.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  69.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""templateCSS"));
  70.         // line 6
  71.         echo "    <style>
  72.         .uv-aside-ticket-labels.label-list-block .uv-btn-label {
  73.             cursor: pointer;
  74.         }
  75.         .uv-main-info-update-block .uv-element-block {
  76.             margin: 10px 0px !important;
  77.         }
  78.         .uv-tab-ellipsis {
  79.             position: relative;
  80.         }
  81.         .uv-inner-section .uv-view .uv-ticket-section .uv-ticket-accordion .uv-ticket-wrapper {
  82.             display: block;
  83.         }
  84.         .uv-element-block.cc-bcc .uv-dropdown-container {
  85.             padding: 10px 20px 10px 20px;
  86.         }
  87.         .uv-action-buttons .uv-dropdown-list ul li {
  88.             padding: 5px 0px !important;
  89.         }
  90.         .uv-action-buttons{
  91.             margin-bottom: 40px !important;
  92.         }
  93.         .uv-ticket-reply .uv-element-block-textarea, .thread-edit-container .uv-element-block-textarea {
  94.             width: 100% !important;
  95.             max-width: 100% !important;
  96.         }
  97.         .thread-edit-container .uv-field-message {
  98.             color: #FF5656 !important;
  99.         }
  100.         .uv-element-block .mce-tinymce {
  101.             margin-top: 10px;
  102.         }
  103.         .uv-ticket-reply .uv-element-block-textarea .uv-field-message, .thread-edit-container .uv-element-block-textarea .uv-field-message {
  104.             margin-top: 15px;
  105.         }
  106.         .thread-edit-container {
  107.             margin-top: 10px;
  108.         }
  109.         .uv-ticket-viewer-bar{
  110.             transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  111.             position: relative;
  112.             overflow: hidden;
  113.             height: 0px;
  114.         }
  115.         .uv-ticket-viewer-bar.active{
  116.             height: 50px;
  117.             margin-bottom: 10px;
  118.             border-bottom: 1px dotted #f97278;
  119.         }
  120.         .uv-ticket-viewer-single {
  121.             display: inline-block;
  122.             margin-right: 5px;
  123.         }
  124.         .uv-ticket-viewer-single img {
  125.             width: 40px;
  126.             border-radius: 3px;
  127.             display: inline-block;
  128.             vertical-align: middle;
  129.         }
  130.         .uv-ticket-viewer-single.uv-first {
  131.             width: 40px;
  132.             height: 40px;
  133.             background-image: linear-gradient(to right, #f97278 0%, #f181bf 100%);
  134.             text-align: center;
  135.             vertical-align: top;
  136.             line-height: 30px;
  137.             border-radius: 20px;
  138.         }
  139.         .uv-ticket-viewer-close {
  140.             position: absolute;
  141.             top: 0px;
  142.             width: 40px;
  143.             height: 40px;
  144.             background: #f1f1f1;
  145.             text-align: center;
  146.             line-height: 35px;
  147.             border-radius: 2px;
  148.             opacity: .6;
  149.             text-indent: 6px;
  150.         }
  151.         .uv-ticket-viewer-list {
  152.             display: inline;
  153.         }
  154.         span.viewer-firstletter.img-thumbnail {
  155.             width: 40px;
  156.             height: 40px;
  157.             display: block;
  158.             text-align: center;
  159.             font-size: 20px;
  160.             font-style: italic;
  161.             border: 1px dotted;
  162.             border-radius: 4px;
  163.             line-height: 35px;
  164.         }
  165.         .uv-ticket-viewer-close {
  166.             display:none;
  167.         }
  168.         .uv-ticket-viewer-single:hover .uv-ticket-viewer-close {
  169.             display: block;
  170.         }
  171.         .uv-hide{
  172.             display: none;
  173.         }
  174.         .uv-info{
  175.             background: #7C70F4;
  176.         }
  177.         .uv-ticket-viewer-list .uv-icon-eye-light{
  178.             animation: jelly 0.8s infinite alternate ease-in-out;
  179.         }
  180.         .uv-aside-brick .uv-loader {
  181.             position: absolute;
  182.             transform: scale(0.5);
  183.             top: 22px;
  184.             right: 45px;
  185.         }
  186.         .uv-app-glyph-customfields {
  187.             width: 20px;
  188.             height: 20px;
  189.             background-position: center center;
  190.             background-repeat: no-repeat;
  191.             cursor: pointer;
  192.             display: inline-block;
  193.             vertical-align: middle;
  194.             margin: 5px 0px 5px 10px;
  195.             background-image: url(\"";
  196.         // line 130
  197.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("bundles/uvdeskcoreframework/images/app-glyph-custom.svg"), "html"nulltrue);
  198.         echo "\");
  199.         }
  200.         .uv-no-threads {
  201.             padding: 80px 20px;
  202.             text-align: center;
  203.         }
  204.         .uv-ticket-strip-label {
  205.             position: relative;
  206.         }
  207.         input.input-copy-thread-link {
  208.             position: absolute;
  209.             bottom: 10px;
  210.             width: 400px;
  211.         }
  212.         .uv-ticket-action-bar-fixed{
  213.             position: fixed;
  214.             width: 100%;
  215.             background: #fff;
  216.             z-index: 999;
  217.         }
  218.         .uv-ticket-action-bar-fixed .uv-ticket-action-bar-rt{
  219.             position: fixed;
  220.             right: 0px;
  221.             margin-top: 10px;
  222.         }
  223.         .uv-ticket-action-bar-fixed + .uv-ticket-viewer-bar{
  224.             margin-top: 70px;
  225.         }
  226.         .uv-ticket-main {
  227.             word-wrap: break-word;
  228.         }
  229.         @media only screen and (max-width: 900px) {
  230.             .uv-ticket-action-bar-fixed{
  231.                 position: relative;
  232.             }
  233.             .uv-ticket-action-bar-fixed + .uv-ticket-viewer-bar{
  234.                 margin-top: 0px;
  235.             }
  236.             .uv-ticket-action-bar-fixed .uv-ticket-action-bar-rt{
  237.                 position: relative;
  238.             }
  239.         }
  240.         .uv-icon-pin {
  241.             width: 18px;
  242.             height: 18px;
  243.             display: inline-block;
  244.             vertical-align: middle;
  245.             background-image: url(\"";
  246.         // line 177
  247.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("bundles/uvdeskcoreframework/images/uvdesk-sprite.svg"), "html"nulltrue);
  248.         echo "\");
  249.             background-position: 0px -396px;
  250.             transition: transform .15s;
  251.             transform: scale(1);
  252.         }
  253.         .uv-icon-pinned {
  254.             background-position: -19px -396px;
  255.         }
  256.         .uv-header-fix{
  257.             display: inline-block;
  258.             margin: 0px 10px 0px 5px;
  259.         }
  260.         .uv-header-fix + .uv-tabs{
  261.             display: inline-block;
  262.         }
  263.         .uv-ticket-section span.uv-mail-status {
  264.             width: 16px;
  265.             height: 16px;
  266.             background: url('../../../../../bundles/webkuldefault/images/mail-status.png');
  267.             cursor: help;
  268.         }
  269.         .uv-ticket-section .uv-mail-status.uv-mail-processed {
  270.             background-position: 0 0;
  271.         }
  272.         .uv-ticket-section .uv-mail-status.uv-mail-open,.uv-ticket-section .uv-mail-status.uv-mail-delivered,.uv-ticket-section .uv-mail-status.uv-mail-click {
  273.             background-position: -38px 0;
  274.         }
  275.         .uv-ticket-section .uv-mail-status.uv-mail-spam,.uv-ticket-section .uv-mail-status.uv-mail-deferred,.uv-ticket-section .uv-mail-spamreport {
  276.             background-position: -55px 0;
  277.         }
  278.         .uv-ticket-section .uv-mail-status.uv-mail-bounce,.uv-ticket-section .uv-mail-status.uv-mail-dropped {
  279.             background-position: -73px 0;
  280.         }
  281.         @media only screen and (max-width: 1480px) {
  282.             .uv-inner-section .uv-view .uv-ticket-action-bar-fixed.uv-ticket-action-bar .uv-ticket-action-bar-rt{
  283.                 width: auto;
  284.             }
  285.         }
  286.         @media only screen and (max-width: 1300px) {
  287.             .uv-header-fix{
  288.                 margin: 0px 10px 0px 10px;
  289.             }
  290.         }
  291.         @media only screen and (max-width: 900px) {
  292.             .uv-ticket-action-bar-fixed{
  293.                 position: relative;
  294.             }
  295.             .uv-ticket-action-bar-fixed + .uv-ticket-viewer-bar{
  296.                 margin-top: 0px;
  297.             }
  298.             .uv-ticket-action-bar-fixed .uv-ticket-action-bar-rt{
  299.                 position: relative;
  300.             }
  301.             .uv-inner-section .uv-view .uv-ticket-action-bar.uv-ticket-action-bar-fixed .uv-ticket-action-bar-lt{
  302.                 width: 70%;
  303.             }
  304.             .uv-inner-section .uv-view .uv-ticket-action-bar.uv-ticket-action-bar-fixed .uv-ticket-action-bar-rt {
  305.                 width: 21%;
  306.                 padding-right: 33px;
  307.             }
  308.             .uv-header-fix{
  309.                 display: none;
  310.             }
  311.         }
  312.         .uv-inner-section .uv-view .uv-ticket-scroll-region {
  313.             margin-bottom: 0px;
  314.         }
  315.         .uv-inner-section .uv-view .uv-ticket-action-bar.uv-ticket-action-bar-fixed .uv-ticket-action-bar-rt {
  316.             width: 21%;
  317.             padding-right: 33px;
  318.         }
  319.         @media print {
  320.             .uv-navbar,.uv-ticket-action-bar, .uv-sidebar, .uv-aside>.uv-aside-brick, .uv-aside-back, .uv-ticket-fixed-region, .uv-ticket-main.uv-ticket-reply, .uv-upload-actions, .uv-filter-view, .uv-dropdown-list>.uv-dropdown-container,.uv-notifications-wrapper,.uv-pop-up-overlay,.uv-loader-view, .uv-loader, .uv-navbar,.uv-ticket-count-wrapper {
  321.                 display: none !important;
  322.             }
  323.             .uv-ticket-scroll-region {
  324.                 overflow: visible;
  325.                 margin-bottom: 0 !important;
  326.             }
  327.             .uv-paper {
  328.                 padding-left: 0px !important; /* uv-view */
  329.             }
  330.             .uv-wrapper {
  331.                 left: 0 !important;
  332.                 margin: 0 !important;
  333.             }
  334.             .uv-inner-section .uv-view .uv-ticket-scroll-region  .uv-ticket-main-rt {
  335.                 width: 80%;
  336.             }
  337.             .uv-paper,.uv-view ,.uv-ticket-scroll-region, .uv-wrapper  {
  338.                 position: initial !important;
  339.             }
  340.         }
  341.         .uv-ticket-action-bar-rt .app-glyph {
  342.             display: inline-block;
  343.             vertical-align: middle;
  344.             margin-right: 10px;
  345.             cursor: pointer;
  346.             height: 20px;
  347.             width: 20px;
  348.         }
  349.         .uv-ticket-action-bar-rt .app-glyph:last-child {
  350.             margin-right: 0px;
  351.         }
  352.         blockquote {
  353.             background: #f9f9f9;
  354.             border-left: 4px solid #ccc;
  355.             margin: 1.5em 10px;
  356.             padding: 0.5em 10px;
  357.             quotes: \"\\201C\"\"\\201D\"\"\\2018\"\"\\2019\";
  358.         }
  359.         blockquote:before {
  360.             color: #ccc;
  361.             content: open-quote;
  362.             font-size: 3em;
  363.             line-height: 0.1em;
  364.             margin-right: 0.05em;
  365.             vertical-align: -0.4em;
  366.         }
  367.         blockquote p {
  368.             display: inline;
  369.         }
  370.         .uv-dropdown-list ul li {
  371.             padding : 8px 0px !important;
  372.         }
  373.         ::-webkit-scrollbar {
  374.             width: 6px;
  375.         }
  376.         ::-webkit-scrollbar-track {
  377.             -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
  378.         }
  379.         ::-webkit-scrollbar-thumb {
  380.             -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
  381.         }
  382.         .uv-aside-select.search .uv-dropdown-list.uv-bottom-left, .uv-aside-select .uv-dropdown-list.uv-bottom-right {
  383.             top: 25px;
  384.             width: 100%;
  385.         }
  386.         .uv-aside-select.search .uv-dropdown-list ul{
  387.             padding: 0px 10px;
  388.         }
  389.         .uv-aside-select.search .uv-dropdown-container {
  390.             padding: 8px 10px 4px;
  391.             overflow-y: auto;
  392.             max-height: 280px;
  393.             border-bottom: solid 1px #D3D3D3;
  394.         }
  395.         .uv-aside-select.search .uv-dropdown-list ul.uv-agents-list li {
  396.             border-bottom: solid 1px #D3D3D3;
  397.             border-top:0px;
  398.         }
  399.         .uv-search-inline{
  400.             width: 100%;
  401.         }
  402.         .uv-dropdown-list ul.uv-search-list li:first-child {
  403.             border-top: none;
  404.         }
  405.         .uv-search-sm input.uv-search-field { 
  406.            border: solid 1px #B1B1AE;
  407.            border-radius: 3px;
  408.            color: #333333;
  409.            font-size: 15px;
  410.            box-sizing: border-box;
  411.            padding: 7px 10px 9px 33px;
  412.            width: 100%;
  413.         }
  414.         
  415.     </style>
  416. ";
  417.         
  418.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  419.         
  420.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  421.     }
  422.     // line 364
  423.     public function block_pageContent($context, array $blocks = [])
  424.     {
  425.         $macros $this->macros;
  426.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  427.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""pageContent"));
  428.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  429.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""pageContent"));
  430.         // line 365
  431.         echo "    <div class=\"uv-inner-section\">
  432.         ";
  433.         // line 367
  434.         echo "        <div class=\"uv-aside\" ";
  435.         if ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'367$this->source); })()), "request", [], "any"falsefalsefalse367), "cookies", [], "any"falsefalsefalse367) && twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'367$this->source); })()), "request", [], "any"falsefalsefalse367), "cookies", [], "any"falsefalsefalse367), "get", [=> "uv-asideView"], "method"falsefalsefalse367))) {
  436.             echo "style=\"display: none;\"";
  437.         }
  438.         echo " >
  439.             <div class=\"uv-main-info-block\">
  440.                 <div class=\"uv-aside-head\">
  441.                     <div class=\"uv-aside-title\">
  442.                         <h6>";
  443.         // line 371
  444.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Ticket"), "html"nulltrue);
  445.         echo " #";
  446.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'371$this->source); })()), "id", [], "any"falsefalsefalse371), "html"nulltrue);
  447.         echo "</h6>
  448.                     </div>
  449.                     <div class=\"uv-aside-back\">
  450.                         <span onclick=\"history.length > 1 ? history.go(-1) : window.location = '";
  451.         // line 374
  452.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_ticket_collection");
  453.         echo "';\">";
  454.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Back"), "html"nulltrue);
  455.         echo "</span>
  456.                     </div>
  457.                 </div>
  458.                 ";
  459.         // line 379
  460.         echo "                <div class=\"uv-aside-brick\">
  461.                     ";
  462.         // line 381
  463.         echo "                    <div class=\"uv-aside-customer-block\">
  464.                         <h3>";
  465.         // line 382
  466.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Customer Information"), "html"nulltrue);
  467.         echo "</h3>
  468.                         <div class=\"uv-aside-avatar\">
  469.                             ";
  470.         // line 384
  471.         if (twig_get_attribute($this->env$this->source, (isset($context["customer"]) || array_key_exists("customer"$context) ? $context["customer"] : (function () { throw new RuntimeError('Variable "customer" does not exist.'384$this->source); })()), "thumbnail", [], "any"falsefalsefalse384)) {
  472.             // line 385
  473.             echo "                                <img src=\"";
  474.             echo twig_escape_filter($this->env, (((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'385$this->source); })()), "request", [], "any"falsefalsefalse385), "scheme", [], "any"falsefalsefalse385) . "://") . twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'385$this->source); })()), "request", [], "any"falsefalsefalse385), "httpHost", [], "any"falsefalsefalse385)) . $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("")), "html"nulltrue);
  475.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["customer"]) || array_key_exists("customer"$context) ? $context["customer"] : (function () { throw new RuntimeError('Variable "customer" does not exist.'385$this->source); })()), "thumbnail", [], "any"falsefalsefalse385), "html"nulltrue);
  476.             echo "\">
  477.                             ";
  478.         } else {
  479.             // line 387
  480.             echo "                                <img src=\"";
  481.             echo twig_escape_filter($this->env$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.'387$this->source); })())), "html"nulltrue);
  482.             echo "\">
  483.                             ";
  484.         }
  485.         // line 389
  486.         echo "                        </div>
  487.                         <div class=\"uv-aside-customer-info\">
  488.                             <span>";
  489.         // line 392
  490.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["customer"]) || array_key_exists("customer"$context) ? $context["customer"] : (function () { throw new RuntimeError('Variable "customer" does not exist.'392$this->source); })()), "name", [], "any"falsefalsefalse392), "html"nulltrue);
  491.         echo "</span>
  492.                             <span>";
  493.         // line 393
  494.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["customer"]) || array_key_exists("customer"$context) ? $context["customer"] : (function () { throw new RuntimeError('Variable "customer" does not exist.'393$this->source); })()), "email", [], "any"falsefalsefalse393), "html"nulltrue);
  495.         echo "</span>
  496.                             ";
  497.         // line 394
  498.         if (twig_get_attribute($this->env$this->source, (isset($context["customer"]) || array_key_exists("customer"$context) ? $context["customer"] : (function () { throw new RuntimeError('Variable "customer" does not exist.'394$this->source); })()), "contactNumber", [], "any"falsefalsefalse394)) {
  499.             // line 395
  500.             echo "                                <span>";
  501.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["customer"]) || array_key_exists("customer"$context) ? $context["customer"] : (function () { throw new RuntimeError('Variable "customer" does not exist.'395$this->source); })()), "contactNumber", [], "any"falsefalsefalse395), "html"nulltrue);
  502.             echo "</span>
  503.                             ";
  504.         }
  505.         // line 397
  506.         echo "
  507.                             ";
  508.         // line 398
  509.         if (twig_get_attribute($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.'398$this->source); })()), "isAccessAuthorized", [=> "ROLE_AGENT_MANAGE_CUSTOMER"], "method"falsefalsefalse398)) {
  510.             // line 399
  511.             echo "                                <span class=\"uv-customize\" data-toggle=\"tooltip\" title=\"Edit Customer Information\"></span>
  512.                             ";
  513.         }
  514.         // line 401
  515.         echo "                        </div>
  516.                     </div>
  517.                     ";
  518.         // line 405
  519.         echo "                    <div class=\"uv-aside-ticket-block\">
  520.                         <div class=\"uv-aside-ticket-brick\">
  521.                             <h3>";
  522.         // line 407
  523.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Total Replies"), "html"nulltrue);
  524.         echo "</h3>
  525.                             <span class=\"uv-icon-replies\"></span> <span>";
  526.         // line 408
  527.         echo twig_escape_filter($this->env, (isset($context["totalReplies"]) || array_key_exists("totalReplies"$context) ? $context["totalReplies"] : (function () { throw new RuntimeError('Variable "totalReplies" does not exist.'408$this->source); })()), "html"nulltrue);
  528.         echo "</span>
  529.                         </div>
  530.                         <div class=\"uv-aside-ticket-brick\">
  531.                             <h3>";
  532.         // line 412
  533.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("TimeStamp"), "html"nulltrue);
  534.         echo "</h3>
  535.                             <span class=\"uv-icon-timestamp\"></span> <span>";
  536.         // line 413
  537.         echo twig_escape_filter($this->envtwig_get_attribute($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.'413$this->source); })()), "timeZoneConverter", [=> twig_get_attribute($this->env$this->source, (isset($context["initialThread"]) || array_key_exists("initialThread"$context) ? $context["initialThread"] : (function () { throw new RuntimeError('Variable "initialThread" does not exist.'413$this->source); })()), "createdAt", [], "any"falsefalsefalse413)], "method"falsefalsefalse413), "html"nulltrue);
  538.         echo "</span>
  539.                         </div>
  540.                         <div class=\"uv-aside-ticket-brick\">
  541.                             <h3>";
  542.         // line 417
  543.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Channel"), "html"nulltrue);
  544.         echo "</h3>
  545.                             ";
  546.         // line 418
  547.         if ((=== twig_compare(twig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'418$this->source); })()), "source", [], "any"falsefalsefalse418), "email"))) {
  548.             // line 419
  549.             echo "                                <span class=\"uv-icon-channel uv-channel-email\"></span> <span>";
  550.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Email"), "html"nulltrue);
  551.             echo "</span>
  552.                             ";
  553.         } elseif ((=== twig_compare(twig_get_attribute($this->env$this->source,         // line 420
  554. (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'420$this->source); })()), "source", [], "any"falsefalsefalse420), "formbuilder"))) {
  555.             // line 421
  556.             echo "                                <span class=\"uv-icon-channel uv-channel-form\"></span> <span>";
  557.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Formbuilder"), "html"nulltrue);
  558.             echo "</span>
  559.                             ";
  560.         } else {
  561.             // line 423
  562.             echo "                            <span class=\"uv-icon-channel uv-channel-web\"></span> <span>";
  563.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Website"), "html"nulltrue);
  564.             echo "</span>
  565.                             ";
  566.         }
  567.         // line 425
  568.         echo "                        </div>
  569.                     </div>
  570.                 </div>
  571.             </div>
  572.             ";
  573.         // line 431
  574.         echo "            ";
  575.         if (twig_get_attribute($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.'431$this->source); })()), "isAccessAuthorized", [=> "ROLE_AGENT_MANAGE_CUSTOMER"], "method"falsefalsefalse431)) {
  576.             // line 432
  577.             echo "                <div class=\"uv-main-info-update-block uv-no-error-success-icon\" style=\"display: none\">
  578.                     <div class=\"uv-aside-head\">
  579.                         <div class=\"uv-aside-title\"><h6>";
  580.             // line 434
  581.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Edit Customer"), "html"nulltrue);
  582.             echo "</h6></div>
  583.                         <div class=\"uv-aside-back\"><span>";
  584.             // line 435
  585.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Back"), "html"nulltrue);
  586.             echo "</span></div>
  587.                     </div>
  588.                     <div class=\"uv-aside-brick\">
  589.                         <form method=\"post\">
  590.                             <input class=\"uv-field\" name=\"id\" type=\"hidden\" value=\"";
  591.             // line 440
  592.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["customer"]) || array_key_exists("customer"$context) ? $context["customer"] : (function () { throw new RuntimeError('Variable "customer" does not exist.'440$this->source); })()), "id", [], "any"falsefalsefalse440), "html"nulltrue);
  593.             echo "\">
  594.                             <div class=\"uv-element-block\">
  595.                                 <label class=\"uv-field-label\">";
  596.             // line 443
  597.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Name"), "html"nulltrue);
  598.             echo "</label>
  599.                                 <div class=\"uv-field-block\">
  600.                                     <input class=\"uv-field\" name=\"name\" type=\"text\" value=\"";
  601.             // line 445
  602.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["customer"]) || array_key_exists("customer"$context) ? $context["customer"] : (function () { throw new RuntimeError('Variable "customer" does not exist.'445$this->source); })()), "name", [], "any"falsefalsefalse445), "html"nulltrue);
  603.             echo "\">
  604.                                 </div>
  605.                             </div>
  606.                             <div class=\"uv-element-block\">
  607.                                 <label class=\"uv-field-label\">";
  608.             // line 450
  609.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Email"), "html"nulltrue);
  610.             echo "</label>
  611.                                 <div class=\"uv-field-block\">
  612.                                     <input class=\"uv-field\" name=\"email\" type=\"text\" value=\"";
  613.             // line 452
  614.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["customer"]) || array_key_exists("customer"$context) ? $context["customer"] : (function () { throw new RuntimeError('Variable "customer" does not exist.'452$this->source); })()), "email", [], "any"falsefalsefalse452), "html"nulltrue);
  615.             echo "\">
  616.                                 </div>
  617.                             </div>
  618.                             <div class=\"uv-element-block\">
  619.                                 <label class=\"uv-field-label\">";
  620.             // line 457
  621.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Contact Number"), "html"nulltrue);
  622.             echo "</label>
  623.                                 <div class=\"uv-field-block\">
  624.                                     <input class=\"uv-field\" name=\"contactNumber\" type=\"text\" value=\"";
  625.             // line 459
  626.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["customer"]) || array_key_exists("customer"$context) ? $context["customer"] : (function () { throw new RuntimeError('Variable "customer" does not exist.'459$this->source); })()), "contactNumber", [], "any"falsefalsefalse459), "html"nulltrue);
  627.             echo "\">
  628.                                 </div>
  629.                             </div>
  630.                             <div class=\"uv-action-buttons\">
  631.                                 <a class=\"uv-btn update-btn\" href=\"#\">";
  632.             // line 464
  633.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Update"), "html"nulltrue);
  634.             echo "</a>
  635.                                 <a class=\"uv-btn cancel-btn\" href=\"#\">";
  636.             // line 465
  637.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Cancel"), "html"nulltrue);
  638.             echo "</a>
  639.                             </div>
  640.                             <input type=\"hidden\" name=\"_token\" value=\"";
  641.             // line 468
  642.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["csrf_token_generator"]) || array_key_exists("csrf_token_generator"$context) ? $context["csrf_token_generator"] : (function () { throw new RuntimeError('Variable "csrf_token_generator" does not exist.'468$this->source); })()), "refreshToken", [=> ""], "method"falsefalsefalse468), "html"nulltrue);
  643.             echo "\"/>
  644.                         </form>
  645.                     </div>
  646.                 </div>
  647.             ";
  648.         }
  649.         // line 473
  650.         echo "
  651.             ";
  652.         // line 475
  653.         echo "            <div class=\"uv-aside-brick\">
  654.                 <div class=\"uv-aside-ticket-actions\">
  655.                     ";
  656.         // line 478
  657.         echo "                    <div class=\"uv-aside-select search\">
  658.                         <label class=\"uv-aside-select-label\">";
  659.         // line 479
  660.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Agent"), "html"nulltrue);
  661.         echo "</label>
  662.                         <div>
  663.                             ";
  664.         // line 481
  665.         $context["agentName"] = (((isset($context["ticketAgent"]) || array_key_exists("ticketAgent"$context) ? $context["ticketAgent"] : (function () { throw new RuntimeError('Variable "ticketAgent" does not exist.'481$this->source); })())) ? (twig_get_attribute($this->env$this->source, (isset($context["ticketAgent"]) || array_key_exists("ticketAgent"$context) ? $context["ticketAgent"] : (function () { throw new RuntimeError('Variable "ticketAgent" does not exist.'481$this->source); })()), "name", [], "any"falsefalsefalse481)) : ($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Not Assigned")));
  666.         // line 482
  667.         echo "                            ";
  668.         if (((=== twig_compare(twig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'482$this->source); })()), "isTrashed", [], "any"falsefalsefalse482), false)) && twig_get_attribute($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.'482$this->source); })()), "isAccessAuthorized", [=> "ROLE_AGENT_ASSIGN_TICKET"], "method"falsefalsefalse482))) {
  669.             // line 483
  670.             echo "                                <span class=\"uv-aside-select-value uv-dropdown-other uv-aside-drop-icon\" data-id=\"";
  671.             (((isset($context["ticketAgent"]) || array_key_exists("ticketAgent"$context) ? $context["ticketAgent"] : (function () { throw new RuntimeError('Variable "ticketAgent" does not exist.'483$this->source); })())) ? (print (twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["ticketAgent"]) || array_key_exists("ticketAgent"$context) ? $context["ticketAgent"] : (function () { throw new RuntimeError('Variable "ticketAgent" does not exist.'483$this->source); })()), "id", [], "any"falsefalsefalse483), "html"nulltrue))) : (print ("")));
  672.             echo "\">";
  673.             echo twig_escape_filter($this->env, (isset($context["agentName"]) || array_key_exists("agentName"$context) ? $context["agentName"] : (function () { throw new RuntimeError('Variable "agentName" does not exist.'483$this->source); })()), "html"nulltrue);
  674.             echo "</span>
  675.                                 <div class=\"uv-dropdown-list uv-bottom-left\">
  676.                                     <div class=\"uv-dropdown-container\">
  677.                                         <label>";
  678.             // line 486
  679.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Agent"), "html"nulltrue);
  680.             echo "</label>
  681.                                         <div class=\"uv-search-sm\">
  682.                                             <input type=\"text\" class=\"uv-search-field uv-search-inline\" placeholder=\"";
  683.             // line 488
  684.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Search"), "html"nulltrue);
  685.             echo "\">
  686.                                         </div>
  687.                                     </div>
  688.                                     <ul class=\"uv-agents-list agent\" data-action=\"agent\">
  689.                                         ";
  690.             // line 493
  691.             $context['_parent'] = $context;
  692.             $context['_seq'] = twig_ensure_traversable(twig_get_attribute($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.'493$this->source); })()), "getAgentPartialDataCollection", [], "method"falsefalsefalse493));
  693.             foreach ($context['_seq'] as $context["_key"] => $context["agent"]) {
  694.                 // line 494
  695.                 echo "                                            <li data-index=\"";
  696.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["agent"], "id", [], "any"falsefalsefalse494), "html"nulltrue);
  697.                 echo "\">
  698.                                                 <img src=\"";
  699.                 // line 495
  700.                 echo twig_escape_filter($this->env, (((!== twig_compare(twig_get_attribute($this->env$this->source$context["agent"], "smallThumbnail", [], "any"falsefalsefalse495), null))) ? (((((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'495$this->source); })()), "request", [], "any"falsefalsefalse495), "scheme", [], "any"falsefalsefalse495) . "://") . twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'495$this->source); })()), "request", [], "any"falsefalsefalse495), "httpHost", [], "any"falsefalsefalse495)) . $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("")) . twig_get_attribute($this->env$this->source$context["agent"], "smallThumbnail", [], "any"falsefalsefalse495))) : ($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.'495$this->source); })())))), "html"nulltrue);
  701.                 echo "\"/> ";
  702.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["agent"], "name", [], "any"falsefalsefalse495), "html"nulltrue);
  703.                 echo "
  704.                                             </li>
  705.                                         ";
  706.             }
  707.             $_parent $context['_parent'];
  708.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['agent'], $context['_parent'], $context['loop']);
  709.             $context array_intersect_key($context$_parent) + $_parent;
  710.             // line 498
  711.             echo "                                    </ul>
  712.                                 </div>
  713.                             ";
  714.         } else {
  715.             // line 501
  716.             echo "                                <span class=\"uv-aside-select-value\">";
  717.             echo twig_escape_filter($this->env, (isset($context["agentName"]) || array_key_exists("agentName"$context) ? $context["agentName"] : (function () { throw new RuntimeError('Variable "agentName" does not exist.'501$this->source); })()), "html"nulltrue);
  718.             echo "</span>
  719.                             ";
  720.         }
  721.         // line 503
  722.         echo "                        </div>
  723.                     </div>
  724.                     ";
  725.         // line 507
  726.         echo "                    <div class=\"uv-aside-select\">
  727.                         <label class=\"uv-aside-select-label\">";
  728.         // line 508
  729.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Priority"), "html"nulltrue);
  730.         echo "</label>
  731.                         <div>
  732.                             <span class=\"uv-list-ticket-priority\" style=\"background: ";
  733.         // line 510
  734.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'510$this->source); })()), "priority", [], "any"falsefalsefalse510), "colorCode", [], "any"falsefalsefalse510), "html"nulltrue);
  735.         echo "\"></span>
  736.                             ";
  737.         // line 511
  738.         if (twig_get_attribute($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.'511$this->source); })()), "isAccessAuthorized", [=> "ROLE_AGENT_UPDATE_TICKET_PRIORITY"], "method"falsefalsefalse511)) {
  739.             // line 512
  740.             echo "                                <span class=\"uv-aside-select-value uv-dropdown-other uv-aside-drop-icon\" data-id=\"";
  741.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'512$this->source); })()), "priority", [], "any"falsefalsefalse512), "id", [], "any"falsefalsefalse512), "html"nulltrue);
  742.             echo "\">";
  743.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'512$this->source); })()), "priority", [], "any"falsefalsefalse512), "description", [], "any"falsefalsefalse512)), "html"nulltrue);
  744.             echo "</span>
  745.                                 <div class=\"uv-dropdown-list uv-bottom-left\">
  746.                                     <div class=\"uv-dropdown-container\">
  747.                                         <label>";
  748.             // line 515
  749.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Priority"), "html"nulltrue);
  750.             echo "</label>
  751.                                         <ul class=\"priority\" data-action=\"priority\">
  752.                                             ";
  753.             // line 517
  754.             $context['_parent'] = $context;
  755.             $context['_seq'] = twig_ensure_traversable((isset($context["ticketPriorityCollection"]) || array_key_exists("ticketPriorityCollection"$context) ? $context["ticketPriorityCollection"] : (function () { throw new RuntimeError('Variable "ticketPriorityCollection" does not exist.'517$this->source); })()));
  756.             foreach ($context['_seq'] as $context["_key"] => $context["priority"]) {
  757.                 // line 518
  758.                 echo "                                                <li data-index=\"";
  759.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["priority"], "id", [], "any"falsefalsefalse518), "html"nulltrue);
  760.                 echo "\" data-color=\"";
  761.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["priority"], "colorCode", [], "any"falsefalsefalse518), "html"nulltrue);
  762.                 echo "\"><a href=\"#\">";
  763.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env$this->source$context["priority"], "description", [], "any"falsefalsefalse518)), "html"nulltrue);
  764.                 echo "</a></li>
  765.                                             ";
  766.             }
  767.             $_parent $context['_parent'];
  768.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['priority'], $context['_parent'], $context['loop']);
  769.             $context array_intersect_key($context$_parent) + $_parent;
  770.             // line 520
  771.             echo "                                        </ul>
  772.                                     </div>
  773.                                 </div>
  774.                             ";
  775.         } else {
  776.             // line 524
  777.             echo "                                <span class=\"uv-aside-select-value\">
  778.                                     ";
  779.             // line 525
  780.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'525$this->source); })()), "priority", [], "any"falsefalsefalse525), "description", [], "any"falsefalsefalse525)), "html"nulltrue);
  781.             echo "
  782.                                 </span>
  783.                             ";
  784.         }
  785.         // line 528
  786.         echo "                        </div>
  787.                     </div>
  788.                     ";
  789.         // line 532
  790.         echo "                    <div class=\"uv-aside-select\">
  791.                         <label class=\"uv-aside-select-label\">";
  792.         // line 533
  793.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Status"), "html"nulltrue);
  794.         echo "</label>
  795.                         <div>
  796.                             ";
  797.         // line 535
  798.         if (twig_get_attribute($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.'535$this->source); })()), "isAccessAuthorized", [=> "ROLE_AGENT_UPDATE_TICKET_STATUS"], "method"falsefalsefalse535)) {
  799.             // line 536
  800.             echo "                                <span class=\"uv-aside-select-value uv-dropdown-other uv-aside-drop-icon\" data-id=\"";
  801.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'536$this->source); })()), "status", [], "any"falsefalsefalse536), "id", [], "any"falsefalsefalse536), "html"nulltrue);
  802.             echo "\">";
  803.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'536$this->source); })()), "status", [], "any"falsefalsefalse536), "description", [], "any"falsefalsefalse536)), "html"nulltrue);
  804.             echo "</span>
  805.                                 <div class=\"uv-dropdown-list uv-bottom-left\">
  806.                                     <div class=\"uv-dropdown-container\">
  807.                                         <label>";
  808.             // line 539
  809.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Status"), "html"nulltrue);
  810.             echo "</label>
  811.                                         <ul class=\"status\" data-action=\"status\">
  812.                                             ";
  813.             // line 541
  814.             $context['_parent'] = $context;
  815.             $context['_seq'] = twig_ensure_traversable((isset($context["ticketStatusCollection"]) || array_key_exists("ticketStatusCollection"$context) ? $context["ticketStatusCollection"] : (function () { throw new RuntimeError('Variable "ticketStatusCollection" does not exist.'541$this->source); })()));
  816.             foreach ($context['_seq'] as $context["_key"] => $context["status"]) {
  817.                 // line 542
  818.                 echo "                                                <li data-index=\"";
  819.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["status"], "id", [], "any"falsefalsefalse542), "html"nulltrue);
  820.                 echo "\"><a href=\"#\">";
  821.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env$this->source$context["status"], "description", [], "any"falsefalsefalse542)), "html"nulltrue);
  822.                 echo "</a></li>
  823.                                             ";
  824.             }
  825.             $_parent $context['_parent'];
  826.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['status'], $context['_parent'], $context['loop']);
  827.             $context array_intersect_key($context$_parent) + $_parent;
  828.             // line 544
  829.             echo "                                        </ul>
  830.                                     </div>
  831.                                 </div>
  832.                             ";
  833.         } else {
  834.             // line 548
  835.             echo "                                <span class=\"uv-aside-select-value\">";
  836.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'548$this->source); })()), "status", [], "any"falsefalsefalse548), "description", [], "any"falsefalsefalse548)), "html"nulltrue);
  837.             echo "</span>
  838.                             ";
  839.         }
  840.         // line 550
  841.         echo "                        </div>
  842.                     </div>
  843.                     ";
  844.         // line 554
  845.         echo "                    <div class=\"uv-aside-select search\">
  846.                         <label class=\"uv-aside-select-label\">";
  847.         // line 555
  848.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Type"), "html"nulltrue);
  849.         echo "</label>
  850.                         <div>
  851.                             ";
  852.         // line 557
  853.         if (twig_get_attribute($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.'557$this->source); })()), "isAccessAuthorized", [=> "ROLE_AGENT_UPDATE_TICKET_TYPE"], "method"falsefalsefalse557)) {
  854.             // line 558
  855.             echo "                                <span class=\"uv-aside-select-value uv-dropdown-other uv-aside-drop-icon\" data-id=\"";
  856.             ((twig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'558$this->source); })()), "type", [], "any"falsefalsefalse558)) ? (print (twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'558$this->source); })()), "type", [], "any"falsefalsefalse558), "id", [], "any"falsefalsefalse558), "html"nulltrue))) : (print ("-- --")));
  857.             echo "\">";
  858.             echo twig_escape_filter($this->env, ((twig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'558$this->source); })()), "type", [], "any"falsefalsefalse558)) ? (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'558$this->source); })()), "type", [], "any"falsefalsefalse558), "code", [], "any"falsefalsefalse558)) : ($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Not Assigned"))), "html"nulltrue);
  859.             echo "</span>
  860.                                 <div class=\"uv-dropdown-list uv-bottom-left\">
  861.                                     <div class=\"uv-dropdown-container\">
  862.                                         <label>";
  863.             // line 561
  864.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Type"), "html"nulltrue);
  865.             echo "</label>
  866.                                         <div class=\"uv-search-sm\">
  867.                                             <input type=\"text\" class=\"uv-search-field uv-search-inline\" placeholder=\"";
  868.             // line 563
  869.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Search"), "html"nulltrue);
  870.             echo "\">
  871.                                         </div>
  872.                                     </div>
  873.                                     <ul class=\"uv-search-list type\" data-action=\"type\">
  874.                                         ";
  875.             // line 568
  876.             $context['_parent'] = $context;
  877.             $context['_seq'] = twig_ensure_traversable(twig_get_attribute($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.'568$this->source); })()), "getTypes", [], "method"falsefalsefalse568));
  878.             foreach ($context['_seq'] as $context["_key"] => $context["type"]) {
  879.                 // line 569
  880.                 echo "                                            <li data-index=\"";
  881.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["type"], "id", [], "any"falsefalsefalse569), "html"nulltrue);
  882.                 echo "\"><a href=\"#\">";
  883.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["type"], "name", [], "any"falsefalsefalse569), "html"nulltrue);
  884.                 echo "</a></li>
  885.                                         ";
  886.             }
  887.             $_parent $context['_parent'];
  888.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['type'], $context['_parent'], $context['loop']);
  889.             $context array_intersect_key($context$_parent) + $_parent;
  890.             // line 571
  891.             echo "                                    </ul>
  892.                                 </div>
  893.                             ";
  894.         } else {
  895.             // line 574
  896.             echo "                                <span class=\"uv-aside-select-value\">
  897.                                     ";
  898.             // line 575
  899.             echo twig_escape_filter($this->env, ((twig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'575$this->source); })()), "type", [], "any"falsefalsefalse575)) ? (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'575$this->source); })()), "type", [], "any"falsefalsefalse575), "code", [], "any"falsefalsefalse575)) : ($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Not Assigned"))), "html"nulltrue);
  900.             echo "
  901.                                 </span>
  902.                             ";
  903.         }
  904.         // line 578
  905.         echo "                        </div>
  906.                     </div>
  907.                     ";
  908.         // line 582
  909.         echo "                    <div class=\"uv-aside-select search\">
  910.                         <label class=\"uv-aside-select-label\">";
  911.         // line 583
  912.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Group"), "html"nulltrue);
  913.         echo "</label>
  914.                         <div>
  915.                             ";
  916.         // line 585
  917.         if (twig_get_attribute($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.'585$this->source); })()), "isAccessAuthorized", [=> "ROLE_AGENT_ASSIGN_TICKET_GROUP"], "method"falsefalsefalse585)) {
  918.             // line 586
  919.             echo "                                <span class=\"uv-aside-select-value uv-dropdown-other uv-aside-drop-icon\" data-id=\"";
  920.             ((twig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'586$this->source); })()), "supportGroup", [], "any"falsefalsefalse586)) ? (print (twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'586$this->source); })()), "supportGroup", [], "any"falsefalsefalse586), "id", [], "any"falsefalsefalse586), "html"nulltrue))) : (print ("-- --")));
  921.             echo "\">
  922.                                     ";
  923.             // line 587
  924.             echo twig_escape_filter($this->env, ((twig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'587$this->source); })()), "supportGroup", [], "any"falsefalsefalse587)) ? (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'587$this->source); })()), "supportGroup", [], "any"falsefalsefalse587), "name", [], "any"falsefalsefalse587)) : ($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Not Assigned"))), "html"nulltrue);
  925.             echo "
  926.                                 </span>
  927.                                 <div class=\"uv-dropdown-list uv-bottom-left\">
  928.                                     <div class=\"uv-dropdown-container\">
  929.                                         <label>";
  930.             // line 591
  931.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Group"), "html"nulltrue);
  932.             echo "</label>
  933.                                         <div class=\"uv-search-sm\">
  934.                                             <input type=\"text\" class=\"uv-search-field uv-search-inline\" placeholder=\"";
  935.             // line 593
  936.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Search"), "html"nulltrue);
  937.             echo "\">
  938.                                         </div>
  939.                                     </div>
  940.                                     <ul class=\"uv-search-list group\" data-action=\"group\">
  941.                                         <li data-index=\"\"><a href=\"#\">";
  942.             // line 597
  943.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Not Assigned"), "html"nulltrue);
  944.             echo "</a></li>
  945.                                         ";
  946.             // line 599
  947.             $context['_parent'] = $context;
  948.             $context['_seq'] = twig_ensure_traversable((isset($context["supportGroupCollection"]) || array_key_exists("supportGroupCollection"$context) ? $context["supportGroupCollection"] : (function () { throw new RuntimeError('Variable "supportGroupCollection" does not exist.'599$this->source); })()));
  949.             foreach ($context['_seq'] as $context["_key"] => $context["group"]) {
  950.                 // line 600
  951.                 echo "                                            <li data-index=\"";
  952.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["group"], "id", [], "any"falsefalsefalse600), "html"nulltrue);
  953.                 echo "\"><a href=\"#\">";
  954.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["group"], "name", [], "any"falsefalsefalse600), "html"nulltrue);
  955.                 echo "</a></li>
  956.                                         ";
  957.             }
  958.             $_parent $context['_parent'];
  959.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['group'], $context['_parent'], $context['loop']);
  960.             $context array_intersect_key($context$_parent) + $_parent;
  961.             // line 602
  962.             echo "                                    </ul>
  963.                                 </div>
  964.                             ";
  965.         } else {
  966.             // line 605
  967.             echo "                                <span class=\"uv-aside-select-value\">
  968.                                     ";
  969.             // line 606
  970.             echo twig_escape_filter($this->env, ((twig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'606$this->source); })()), "supportGroup", [], "any"falsefalsefalse606)) ? (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'606$this->source); })()), "supportGroup", [], "any"falsefalsefalse606), "name", [], "any"falsefalsefalse606)) : ($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Not Assigned"))), "html"nulltrue);
  971.             echo "
  972.                                 </span>
  973.                             ";
  974.         }
  975.         // line 609
  976.         echo "                        </div>
  977.                     </div>
  978.                     ";
  979.         // line 613
  980.         echo "                    <div class=\"uv-aside-select search\">
  981.                         <label class=\"uv-aside-select-label\">";
  982.         // line 614
  983.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Team"), "html"nulltrue);
  984.         echo "</label>
  985.                         <div>
  986.                             ";
  987.         // line 616
  988.         if (twig_get_attribute($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.'616$this->source); })()), "isAccessAuthorized", [=> "ROLE_AGENT_ASSIGN_TICKET_GROUP"], "method"falsefalsefalse616)) {
  989.             // line 617
  990.             echo "                                <span class=\"uv-aside-select-value uv-dropdown-other uv-aside-drop-icon\" data-id=\"";
  991.             ((twig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'617$this->source); })()), "supportTeam", [], "any"falsefalsefalse617)) ? (print (twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'617$this->source); })()), "supportTeam", [], "any"falsefalsefalse617), "id", [], "any"falsefalsefalse617), "html"nulltrue))) : (print ("-- --")));
  992.             echo "\">
  993.                                     ";
  994.             // line 618
  995.             echo twig_escape_filter($this->env, ((twig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'618$this->source); })()), "supportTeam", [], "any"falsefalsefalse618)) ? (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'618$this->source); })()), "supportTeam", [], "any"falsefalsefalse618), "name", [], "any"falsefalsefalse618)) : ($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Not Assigned"))), "html"nulltrue);
  996.             echo "
  997.                                 </span>
  998.                                 <div class=\"uv-dropdown-list uv-bottom-left\">
  999.                                     <div class=\"uv-dropdown-container\">
  1000.                                         <label>";
  1001.             // line 622
  1002.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Team"), "html"nulltrue);
  1003.             echo "</label>
  1004.                                         <div class=\"uv-search-sm\">
  1005.                                             <input type=\"text\" class=\"uv-search-field uv-search-inline\" placeholder=\"";
  1006.             // line 624
  1007.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Search"), "html"nulltrue);
  1008.             echo "\">
  1009.                                         </div>
  1010.                                     </div>
  1011.                                     <ul class=\"uv-search-list team\" data-action=\"team\">
  1012.                                         <li data-index=\"\"><a href=\"#\">";
  1013.             // line 628
  1014.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Not Assigned"), "html"nulltrue);
  1015.             echo "</a></li>
  1016.                                         ";
  1017.             // line 629
  1018.             $context['_parent'] = $context;
  1019.             $context['_seq'] = twig_ensure_traversable((isset($context["supportTeamCollection"]) || array_key_exists("supportTeamCollection"$context) ? $context["supportTeamCollection"] : (function () { throw new RuntimeError('Variable "supportTeamCollection" does not exist.'629$this->source); })()));
  1020.             foreach ($context['_seq'] as $context["_key"] => $context["team"]) {
  1021.                 // line 630
  1022.                 echo "                                            <li data-index=\"";
  1023.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["team"], "id", [], "any"falsefalsefalse630), "html"nulltrue);
  1024.                 echo "\"><a href=\"#\">";
  1025.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["team"], "name", [], "any"falsefalsefalse630), "html"nulltrue);
  1026.                 echo "</a></li>
  1027.                                         ";
  1028.             }
  1029.             $_parent $context['_parent'];
  1030.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['team'], $context['_parent'], $context['loop']);
  1031.             $context array_intersect_key($context$_parent) + $_parent;
  1032.             // line 632
  1033.             echo "                                    </ul>
  1034.                                 </div>
  1035.                             ";
  1036.         } else {
  1037.             // line 635
  1038.             echo "                                <span class=\"uv-aside-select-value\">
  1039.                                     ";
  1040.             // line 636
  1041.             echo twig_escape_filter($this->env, ((twig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'636$this->source); })()), "supportTeam", [], "any"falsefalsefalse636)) ? (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'636$this->source); })()), "supportTeam", [], "any"falsefalsefalse636), "name", [], "any"falsefalsefalse636)) : ($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Not Assigned"))), "html"nulltrue);
  1042.             echo "
  1043.                                 </span>
  1044.                             ";
  1045.         }
  1046.         // line 639
  1047.         echo "                        </div>
  1048.                     </div>
  1049.                 </div>
  1050.             </div>
  1051.             ";
  1052.         // line 645
  1053.         echo "            <div class=\"uv-aside-brick\">
  1054.                 <div class=\"uv-aside-ticket-labels label-list-block\">
  1055.                     <div class=\"uv-element-block\">
  1056.                         <label class=\"uv-field-label\">";
  1057.         // line 648
  1058.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Labels"), "html"nulltrue);
  1059.         echo "</label>
  1060.                         <div class=\"uv-field-block\">
  1061.                             <input class=\"uv-field uv-dropdown-other\" type=\"text\" data-type=\"label\">
  1062.                             <div class=\"uv-dropdown-list uv-top-left\">
  1063.                                 <div class=\"uv-dropdown-container\">
  1064.                                     <label>";
  1065.         // line 654
  1066.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Filter With"), "html"nulltrue);
  1067.         echo "</label>
  1068.                                     <ul class=\"\">
  1069.                                         <span class=\"uv-filter-info\">";
  1070.         // line 656
  1071.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Type atleast 2 letters"), "html"nulltrue);
  1072.         echo "</span>
  1073.                                         <span class=\"uv-no-results\" style=\"display: none;\">";
  1074.         // line 657
  1075.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("No result found"), "html"nulltrue);
  1076.         echo "</span>
  1077.                                     </ul>
  1078.                                 </div>
  1079.                             </div>
  1080.                         </div>
  1081.                     </div>
  1082.                     <div class=\"label-list\"></div>
  1083.                 </div>
  1084.             </div>
  1085.             ";
  1086.         // line 669
  1087.         echo "            <div class=\"uv-aside-brick collaborator-list-block\">
  1088.                 <div class=\"uv-aside-ticket-labels\">
  1089.                     <div class=\"uv-element-block\">
  1090.                         <label class=\"uv-field-label\">";
  1091.         // line 672
  1092.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Collaborators"), "html"nulltrue);
  1093.         echo "</label>
  1094.                         ";
  1095.         // line 674
  1096.         if (twig_get_attribute($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.'674$this->source); })()), "isAccessAuthorized", [=> "ROLE_AGENT_ADD_COLLABORATOR_TO_TICKET"], "method"falsefalsefalse674)) {
  1097.             // line 675
  1098.             echo "                            <div class=\"uv-field-block\">
  1099.                                 <input class=\"uv-field\" type=\"text\" name=\"email\" type=\"text\" value=\"\" placeholder=\"";
  1100.             // line 676
  1101.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Type email to add"), "html"nulltrue);
  1102.             echo "\">
  1103.                             </div>
  1104.                         ";
  1105.         }
  1106.         // line 679
  1107.         echo "                    </div>
  1108.                     <div class=\"collaborator-list\" style=\"margin-top: 10px\"></div>
  1109.                 </div>
  1110.             </div>
  1111.             ";
  1112.         // line 685
  1113.         echo "            <div class=\"uv-aside-brick tag-list-block\">
  1114.                 <div class=\"uv-aside-ticket-labels\">
  1115.                     <div class=\"uv-element-block\">
  1116.                         <label class=\"uv-field-label\">";
  1117.         // line 688
  1118.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Tags"), "html"nulltrue);
  1119.         echo "</label>
  1120.                         ";
  1121.         // line 690
  1122.         if (twig_get_attribute($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.'690$this->source); })()), "isAccessAuthorized", [=> "ROLE_AGENT_ADD_TAG"], "method"falsefalsefalse690)) {
  1123.             // line 691
  1124.             echo "                            <div class=\"uv-field-block\">
  1125.                                 <input class=\"uv-field uv-dropdown-other\" name=\"tag-name\" type=\"text\" data-type=\"tag\" value=\"\">
  1126.                                 <div class=\"uv-dropdown-list uv-bottom-left\">
  1127.                                     <div class=\"uv-dropdown-container\">
  1128.                                         <label>";
  1129.             // line 695
  1130.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Filter With"), "html"nulltrue);
  1131.             echo "</label>
  1132.                                         <ul class=\"\">
  1133.                                             <span class=\"uv-filter-info\">";
  1134.             // line 697
  1135.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Type atleast 2 letters"), "html"nulltrue);
  1136.             echo "</span>
  1137.                                             <span class=\"uv-no-results\" style=\"display: none;\">";
  1138.             // line 698
  1139.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("No result found"), "html"nulltrue);
  1140.             echo "</span>
  1141.                                         </ul>
  1142.                                     </div>
  1143.                                 </div>
  1144.                             </div>
  1145.                         ";
  1146.         }
  1147.         // line 704
  1148.         echo "                    </div>
  1149.                     <div class=\"tag-list\" style=\"margin-top: 10px\"></div>
  1150.                 </div>
  1151.             </div>
  1152.         </div>
  1153.         <div class=\"uv-view ";
  1154.         // line 711
  1155.         if ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'711$this->source); })()), "request", [], "any"falsefalsefalse711), "cookies", [], "any"falsefalsefalse711) && twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'711$this->source); })()), "request", [], "any"falsefalsefalse711), "cookies", [], "any"falsefalsefalse711), "get", [=> "uv-asideView"], "method"falsefalsefalse711))) {
  1156.             echo "uv-aside-view";
  1157.         }
  1158.         echo "\" >
  1159.             <div class=\"uv-ticket-scroll-region ";
  1160.         // line 712
  1161.         if ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'712$this->source); })()), "request", [], "any"falsefalsefalse712), "cookies", [], "any"falsefalsefalse712) && twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'712$this->source); })()), "request", [], "any"falsefalsefalse712), "cookies", [], "any"falsefalsefalse712), "get", [=> "uv-asideView"], "method"falsefalsefalse712))) {
  1162.             echo "uv-aside-view-tv";
  1163.         }
  1164.         echo "\" >
  1165.                 ";
  1166.         // line 714
  1167.         echo "                <div class=\"uv-ticket-action-bar\">
  1168.                     <div class=\"uv-ticket-action-bar-lt\">
  1169.                         <div class=\"uv-header-fix\"><a href=\"#\" class=\"uv-icon-pin\"></a></div>
  1170.                         ";
  1171.         // line 719
  1172.         echo "                        <div class=\"uv-tabs\">
  1173.                             <ul>
  1174.                                 ";
  1175.         // line 722
  1176.         echo "                                <li for=\"default\" data-type=\"all\" class=\"uv-tab-active\">";
  1177.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("All Threads"), "html"nulltrue);
  1178.         echo "</li>
  1179.                                 <li for=\"default\" data-type=\"reply\">";
  1180.         // line 723
  1181.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Replies"), "html"nulltrue);
  1182.         echo "</li>
  1183.                                 <li for=\"default\" data-type=\"forward\">";
  1184.         // line 724
  1185.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Forwards"), "html"nulltrue);
  1186.         echo "</li>
  1187.                                 <li for=\"default\" data-type=\"note\">";
  1188.         // line 725
  1189.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Notes"), "html"nulltrue);
  1190.         echo "</li>
  1191.                                 <li for=\"default\" data-type=\"pinned\">";
  1192.         // line 726
  1193.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Pinned"), "html"nulltrue);
  1194.         echo "</li>
  1195.                                 ";
  1196.         // line 729
  1197.         echo "                                ";
  1198.         if ((twig_get_attribute($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.'729$this->source); })()), "isAccessAuthorized", [=> "ROLE_AGENT_EDIT_TICKET"], "method"falsefalsefalse729) || twig_get_attribute($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.'729$this->source); })()), "isAccessAuthorized", [=> "ROLE_AGENT_DELETE_TICKET"], "method"falsefalsefalse729))) {
  1199.             // line 730
  1200.             echo "                                    <li class=\"uv-tab-ellipsis uv-ticket-action\">
  1201.                                         <span class=\"uv-icon-ellipsis uv-dropdown-other\"></span>
  1202.                                         <div class=\"uv-dropdown-list uv-bottom-right\">
  1203.                                             <div class=\"uv-dropdown-container\">
  1204.                                                 <ul class=\"priority\" data-action=\"priority\">
  1205.                                                     ";
  1206.             // line 736
  1207.             if (twig_get_attribute($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.'736$this->source); })()), "isAccessAuthorized", [=> "ROLE_AGENT_EDIT_TICKET"], "method"falsefalsefalse736)) {
  1208.                 // line 737
  1209.                 echo "                                                        <li data-action=\"edit\" class=\"uv-open-popup\" data-target=\"edit-ticket-modal\">";
  1210.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Edit Ticket"), "html"nulltrue);
  1211.                 echo "</li>
  1212.                                                     ";
  1213.             }
  1214.             // line 739
  1215.             echo "
  1216.                                                     <li data-action=\"print\">";
  1217.             // line 740
  1218.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Print Ticket"), "html"nulltrue);
  1219.             echo "</li>
  1220.                                                     ";
  1221.             // line 742
  1222.             if (twig_get_attribute($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.'742$this->source); })()), "isAccessAuthorized", [=> "ROLE_AGENT_UPDATE_TICKET_STATUS"], "method"falsefalsefalse742)) {
  1223.                 // line 743
  1224.                 echo "                                                        <li data-action=\"spam\" data-index=\"6\">";
  1225.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Mark as Spam"), "html"nulltrue);
  1226.                 echo "</li>
  1227.                                                         <li data-action=\"closed\" data-index=\"5\">";
  1228.                 // line 744
  1229.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Mark as Closed"), "html"nulltrue);
  1230.                 echo "</li>
  1231.                                                     ";
  1232.             }
  1233.             // line 746
  1234.             echo "
  1235.                                                     ";
  1236.             // line 747
  1237.             if (twig_get_attribute($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.'747$this->source); })()), "isAccessAuthorized", [=> "ROLE_AGENT_DELETE_TICKET"], "method"falsefalsefalse747)) {
  1238.                 // line 748
  1239.                 echo "                                                        <li data-action=\"delete\" class=\"uv-text-danger\">";
  1240.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Delete Ticket"), "html"nulltrue);
  1241.                 echo "</li>
  1242.                                                     ";
  1243.             }
  1244.             // line 750
  1245.             echo "                                                </ul>
  1246.                                             </div>
  1247.                                         </div>
  1248.                                     </li>
  1249.                                 ";
  1250.         }
  1251.         // line 755
  1252.         echo "                            </ul>
  1253.                         </div>
  1254.                     </div>
  1255.                     <div class=\"uv-ticket-action-bar-rt\">
  1256.                         ";
  1257.         // line 760
  1258.         echo twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["uvdesk_extensibles"]) || array_key_exists("uvdesk_extensibles"$context) ? $context["uvdesk_extensibles"] : (function () { throw new RuntimeError('Variable "uvdesk_extensibles" does not exist.'760$this->source); })()), "getRegisteredComponent", [=> "Webkul\\UVDesk\\CoreFrameworkBundle\\Tickets\\WidgetCollection"], "method"falsefalsefalse760), "embedSideFilterIcons", [], "method"falsefalsefalse760);
  1259.         echo "
  1260.                     </div>
  1261.                 </div>
  1262.                 ";
  1263.         // line 765
  1264.         echo "                <div class=\"uv-ticket-viewer-bar\">
  1265.                     <div class=\"uv-ticket-viewer-list\">
  1266.                         <div class=\"uv-ticket-viewer-single uv-first\" title=\"Currently active agents on ticket...\">
  1267.                             <span class=\"uv-icon-eye-light\"></span>
  1268.                         </div>
  1269.                     </div>
  1270.                 </div>
  1271.                 ";
  1272.         // line 774
  1273.         echo "                <div class=\"uv-ticket-head\">
  1274.                     <div class=\"uv-ticket-head-lt\">
  1275.                         <span class=\"uv-star-large ";
  1276.         // line 776
  1277.         echo ((twig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'776$this->source); })()), "isStarred", [], "any"falsefalsefalse776)) ? ("uv-star-active") : (""));
  1278.         echo " uv-star uv-margin-right-5\"></span>
  1279.                     </div>
  1280.                     <div class=\"uv-ticket-head-rt\">
  1281.                         <h1>";
  1282.         // line 780
  1283.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'780$this->source); })()), "subject", [], "any"falsefalsefalse780), "html"nulltrue);
  1284.         echo "</h1>
  1285.                     </div>
  1286.                 </div>
  1287.                 <div class=\"uv-ticket-strip\">
  1288.                     <span>
  1289.                         <span class=\"uv-ticket-strip-label\">";
  1290.         // line 786
  1291.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Created"), "html"nulltrue);
  1292.         echo " - </span>
  1293.                         <span class=\"timeago uv-margin-0\" data-timestamp=\"";
  1294.         // line 787
  1295.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'787$this->source); })()), "createdAt", [], "any"falsefalsefalse787), "getTimestamp", [], "method"falsefalsefalse787), "html"nulltrue);
  1296.         echo "\" title=\"";
  1297.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'787$this->source); })()), "createdAt", [], "any"falsefalsefalse787), "format", [=> "d-m-Y h:ia"], "method"falsefalsefalse787), "html"nulltrue);
  1298.         echo "\">";
  1299.         echo twig_escape_filter($this->envtwig_get_attribute($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.'787$this->source); })()), "timeZoneConverter", [=> twig_get_attribute($this->env$this->source, (isset($context["initialThread"]) || array_key_exists("initialThread"$context) ? $context["initialThread"] : (function () { throw new RuntimeError('Variable "initialThread" does not exist.'787$this->source); })()), "createdAt", [], "any"falsefalsefalse787)], "method"falsefalsefalse787), "html"nulltrue);
  1300.         echo "</span>
  1301.                     </span>
  1302.                     <span>
  1303.                         <span class=\"uv-ticket-strip-label\">";
  1304.         // line 791
  1305.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("By"), "html"nulltrue);
  1306.         echo " - </span> ";
  1307.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["initialThread"]) || array_key_exists("initialThread"$context) ? $context["initialThread"] : (function () { throw new RuntimeError('Variable "initialThread" does not exist.'791$this->source); })()), "user", [], "any"falsefalsefalse791), "name", [], "any"falsefalsefalse791), "html"nulltrue);
  1308.         echo "
  1309.                         ";
  1310.         // line 792
  1311.         if ((isset($context["totalCustomerTickets"]) || array_key_exists("totalCustomerTickets"$context) ? $context["totalCustomerTickets"] : (function () { throw new RuntimeError('Variable "totalCustomerTickets" does not exist.'792$this->source); })())) {
  1312.             // line 793
  1313.             echo "                            (<a id=\"more-tickets-btn\" href=\"";
  1314.             echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_ticket_collection");
  1315.             echo "#customer/";
  1316.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["customer"]) || array_key_exists("customer"$context) ? $context["customer"] : (function () { throw new RuntimeError('Variable "customer" does not exist.'793$this->source); })()), "id", [], "any"falsefalsefalse793), "html"nulltrue);
  1317.             echo "\" target=\"_blank\">";
  1318.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("count more tickets", ["count" => (isset($context["totalCustomerTickets"]) || array_key_exists("totalCustomerTickets"$context) ? $context["totalCustomerTickets"] : (function () { throw new RuntimeError('Variable "totalCustomerTickets" does not exist.'793$this->source); })())]), "html"nulltrue);
  1319.             echo "</a>)
  1320.                         ";
  1321.         }
  1322.         // line 795
  1323.         echo "                    </span>
  1324.                     <span class=\"agent-info\" style=\"";
  1325.         // line 797
  1326.         echo (((isset($context["ticketAgent"]) || array_key_exists("ticketAgent"$context) ? $context["ticketAgent"] : (function () { throw new RuntimeError('Variable "ticketAgent" does not exist.'797$this->source); })())) ? ("") : ("display: none"));
  1327.         echo "\">
  1328.                         <span class=\"uv-ticket-strip-label\">";
  1329.         // line 798
  1330.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Agent"), "html"nulltrue);
  1331.         echo " - </span>
  1332.                         <span class=\"name\">";
  1333.         // line 799
  1334.         (((isset($context["ticketAgent"]) || array_key_exists("ticketAgent"$context) ? $context["ticketAgent"] : (function () { throw new RuntimeError('Variable "ticketAgent" does not exist.'799$this->source); })())) ? (print (twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["ticketAgent"]) || array_key_exists("ticketAgent"$context) ? $context["ticketAgent"] : (function () { throw new RuntimeError('Variable "ticketAgent" does not exist.'799$this->source); })()), "name", [], "any"falsefalsefalse799), "html"nulltrue))) : (print ("")));
  1335.         echo "</span>
  1336.                     </span>
  1337.                 </div>
  1338.                 ";
  1339.         // line 804
  1340.         echo "                <div class=\"uv-tab-view uv-tab-view-active\" id=\"default\">
  1341.                     <div class=\"uv-ticket-section\">
  1342.                         <div class=\"uv-ticket-main create\">
  1343.                             <div class=\"uv-ticket-strip\">
  1344.                                 <span>
  1345.                                     <span class=\"timeago uv-margin-0\" data-timestamp=\"";
  1346.         // line 809
  1347.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'809$this->source); })()), "createdAt", [], "any"falsefalsefalse809), "getTimestamp", [], "method"falsefalsefalse809), "html"nulltrue);
  1348.         echo "\" title=\"";
  1349.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'809$this->source); })()), "createdAt", [], "any"falsefalsefalse809), "format", [=> "d-m-Y h:ia"], "method"falsefalsefalse809), "html"nulltrue);
  1350.         echo "\">";
  1351.         echo twig_escape_filter($this->envtwig_get_attribute($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.'809$this->source); })()), "timeZoneConverter", [=> twig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'809$this->source); })()), "createdAt", [], "any"falsefalsefalse809)], "method"falsefalsefalse809), "html"nulltrue);
  1352.         echo "</span>
  1353.                                     - ";
  1354.         // line 810
  1355.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["initialThread"]) || array_key_exists("initialThread"$context) ? $context["initialThread"] : (function () { throw new RuntimeError('Variable "initialThread" does not exist.'810$this->source); })()), "user", [], "any"falsefalsefalse810), "name", [], "any"falsefalsefalse810), "html"nulltrue);
  1356.         echo " <span class=\"uv-ticket-strip-label\">";
  1357.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("created Ticket"), "html"nulltrue);
  1358.         echo "</span>
  1359.                                 </span>
  1360.                                 ";
  1361.         // line 812
  1362.         if ((!== twig_compare(twig_get_attribute($this->env$this->source, (isset($context["initialThread"]) || array_key_exists("initialThread"$context) ? $context["initialThread"] : (function () { throw new RuntimeError('Variable "initialThread" does not exist.'812$this->source); })()), "cc", [], "any"falsefalsefalse812), ""))) {
  1363.             // line 813
  1364.             echo "\t\t\t\t\t\t\t\t\t<div class=\"uv-ticket-strip\">
  1365. \t\t\t\t\t\t\t\t\t\t<span><span class=\"uv-ticket-strip-label\">";
  1366.             // line 814
  1367.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("CC"), "html"nulltrue);
  1368.             echo " -</span> ";
  1369.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["initialThread"]) || array_key_exists("initialThread"$context) ? $context["initialThread"] : (function () { throw new RuntimeError('Variable "initialThread" does not exist.'814$this->source); })()), "cc", [], "any"falsefalsefalse814), "html"nulltrue);
  1370.             echo "</span>
  1371. \t\t\t\t\t\t\t\t\t</div>
  1372. \t\t\t\t\t\t\t\t";
  1373.         }
  1374.         // line 816
  1375.         echo "      
  1376.                             </div>
  1377.                             <div class=\"uv-ticket-main-lt\">
  1378.                                <img src=\"";
  1379.         // line 820
  1380.         echo twig_escape_filter($this->env, ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["initialThread"]) || array_key_exists("initialThread"$context) ? $context["initialThread"] : (function () { throw new RuntimeError('Variable "initialThread" does not exist.'820$this->source); })()), "user", [], "any"falsefalsefalse820), "thumbnail", [], "any"falsefalsefalse820)) ? (((((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'820$this->source); })()), "request", [], "any"falsefalsefalse820), "scheme", [], "any"falsefalsefalse820) . "://") . twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'820$this->source); })()), "request", [], "any"falsefalsefalse820), "httpHost", [], "any"falsefalsefalse820)) . $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("")) . twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["initialThread"]) || array_key_exists("initialThread"$context) ? $context["initialThread"] : (function () { throw new RuntimeError('Variable "initialThread" does not exist.'820$this->source); })()), "user", [], "any"falsefalsefalse820), "thumbnail", [], "any"falsefalsefalse820))) : ((((=== twig_compare(twig_get_attribute($this->env$this->source, (isset($context["initialThread"]) || array_key_exists("initialThread"$context) ? $context["initialThread"] : (function () { throw new RuntimeError('Variable "initialThread" does not exist.'820$this->source); })()), "createdBy", [], "any"falsefalsefalse820), "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.'820$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.'820$this->source); })())))))), "html"nulltrue);
  1381.         echo "\">
  1382.                             </div>
  1383.                             <div class=\"uv-ticket-main-rt\">
  1384.                                 ";
  1385.         // line 824
  1386.         if ((=== twig_compare(twig_get_attribute($this->env$this->source, (isset($context["initialThread"]) || array_key_exists("initialThread"$context) ? $context["initialThread"] : (function () { throw new RuntimeError('Variable "initialThread" does not exist.'824$this->source); })()), "createdBy", [], "any"falsefalsefalse824), "customer"))) {
  1387.             // line 825
  1388.             echo "                                    <a href=\"";
  1389.             echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_manage_customer_account");
  1390.             echo "/";
  1391.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["initialThread"]) || array_key_exists("initialThread"$context) ? $context["initialThread"] : (function () { throw new RuntimeError('Variable "initialThread" does not exist.'825$this->source); })()), "user", [], "any"falsefalsefalse825), "id", [], "any"falsefalsefalse825), "html"nulltrue);
  1392.             echo "\" class=\"uv-ticket-member-name\">";
  1393.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["initialThread"]) || array_key_exists("initialThread"$context) ? $context["initialThread"] : (function () { throw new RuntimeError('Variable "initialThread" does not exist.'825$this->source); })()), "user", [], "any"falsefalsefalse825), "name", [], "any"falsefalsefalse825), "html"nulltrue);
  1394.             echo "</a>
  1395.                                 ";
  1396.         } else {
  1397.             // line 827
  1398.             echo "                                    ";
  1399.             if (twig_get_attribute($this->env$this->source, (isset($context["initialThread"]) || array_key_exists("initialThread"$context) ? $context["initialThread"] : (function () { throw new RuntimeError('Variable "initialThread" does not exist.'827$this->source); })()), "user", [], "any"falsefalsefalse827)) {
  1400.                 // line 828
  1401.                 echo "                                        <a href=\"";
  1402.                 echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_account");
  1403.                 echo "/";
  1404.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["initialThread"]) || array_key_exists("initialThread"$context) ? $context["initialThread"] : (function () { throw new RuntimeError('Variable "initialThread" does not exist.'828$this->source); })()), "user", [], "any"falsefalsefalse828), "id", [], "any"falsefalsefalse828), "html"nulltrue);
  1405.                 echo "\" class=\"uv-ticket-member-name\">";
  1406.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["initialThread"]) || array_key_exists("initialThread"$context) ? $context["initialThread"] : (function () { throw new RuntimeError('Variable "initialThread" does not exist.'828$this->source); })()), "user", [], "any"falsefalsefalse828), "name", [], "any"falsefalsefalse828), "html"nulltrue);
  1407.                 echo "</a>
  1408.                                     ";
  1409.             } else {
  1410.                 // line 830
  1411.                 echo "                                        <a class=\"uv-ticket-member-name\">";
  1412.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["initialThread"]) || array_key_exists("initialThread"$context) ? $context["initialThread"] : (function () { throw new RuntimeError('Variable "initialThread" does not exist.'830$this->source); })()), "user", [], "any"falsefalsefalse830), "name", [], "any"falsefalsefalse830), "html"nulltrue);
  1413.                 echo "</a>
  1414.                                     ";
  1415.             }
  1416.             // line 832
  1417.             echo "                                ";
  1418.         }
  1419.         // line 833
  1420.         echo "
  1421.                                 ";
  1422.         // line 835
  1423.         echo "                                <div class=\"message\">
  1424.                                     <p>
  1425.                                         ";
  1426.         // line 837
  1427.         if ((=== twig_compare(twig_striptags(twig_get_attribute($this->env$this->source, (isset($context["initialThread"]) || array_key_exists("initialThread"$context) ? $context["initialThread"] : (function () { throw new RuntimeError('Variable "initialThread" does not exist.'837$this->source); })()), "message", [], "any"falsefalsefalse837)), twig_get_attribute($this->env$this->source, (isset($context["initialThread"]) || array_key_exists("initialThread"$context) ? $context["initialThread"] : (function () { throw new RuntimeError('Variable "initialThread" does not exist.'837$this->source); })()), "message", [], "any"falsefalsefalse837)))) {
  1428.             // line 838
  1429.             echo "                                            ";
  1430.             echo twig_nl2br(twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["initialThread"]) || array_key_exists("initialThread"$context) ? $context["initialThread"] : (function () { throw new RuntimeError('Variable "initialThread" does not exist.'838$this->source); })()), "message", [], "any"falsefalsefalse838), "html"nulltrue));
  1431.             echo "
  1432.                                         ";
  1433.         } else {
  1434.             // line 840
  1435.             echo "                                            ";
  1436.             echo twig_get_attribute($this->env$this->source, (isset($context["initialThread"]) || array_key_exists("initialThread"$context) ? $context["initialThread"] : (function () { throw new RuntimeError('Variable "initialThread" does not exist.'840$this->source); })()), "message", [], "any"falsefalsefalse840);
  1437.             echo "
  1438.                                         ";
  1439.         }
  1440.         // line 842
  1441.         echo "                                    </p>
  1442.                                 </div>
  1443.                                 ";
  1444.         // line 846
  1445.         echo "                                ";
  1446.         if (twig_length_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["initialThread"]) || array_key_exists("initialThread"$context) ? $context["initialThread"] : (function () { throw new RuntimeError('Variable "initialThread" does not exist.'846$this->source); })()), "attachments", [], "any"falsefalsefalse846))) {
  1447.             // line 847
  1448.             echo "                                    <div class=\"uv-ticket-uploads\">
  1449.                                         <h4>";
  1450.             // line 848
  1451.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Uploaded Files"), "html"nulltrue);
  1452.             echo "</h4>
  1453.                                         <div class=\"uv-ticket-uploads-strip\">
  1454.                                             ";
  1455.             // line 850
  1456.             $context['_parent'] = $context;
  1457.             $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source, (isset($context["initialThread"]) || array_key_exists("initialThread"$context) ? $context["initialThread"] : (function () { throw new RuntimeError('Variable "initialThread" does not exist.'850$this->source); })()), "attachments", [], "any"falsefalsefalse850));
  1458.             foreach ($context['_seq'] as $context["_key"] => $context["attachment"]) {
  1459.                 // line 851
  1460.                 echo "                                                <a href=\"";
  1461.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["attachment"], "downloadURL", [], "any"falsefalsefalse851), "html"nulltrue);
  1462.                 echo "\" target = \"_blank\" class=\"uv-ticket-uploads-brick uv-no-pointer-events\" data-toggle=\"tooltip\" title=\"";
  1463.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["attachment"], "name", [], "any"falsefalsefalse851), "html"nulltrue);
  1464.                 echo "\">
  1465.                                                     <img src=\"";
  1466.                 // line 852
  1467.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["attachment"], "iconURL", [], "any"falsefalsefalse852), "html"nulltrue);
  1468.                 echo "\"  class=\"uv-auto-pointer-events\"/>
  1469.                                                 </a>
  1470.                                             ";
  1471.             }
  1472.             $_parent $context['_parent'];
  1473.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['attachment'], $context['_parent'], $context['loop']);
  1474.             $context array_intersect_key($context$_parent) + $_parent;
  1475.             // line 855
  1476.             echo "                                        </div>
  1477.                                         ";
  1478.             // line 857
  1479.             if ((=== twig_compare(twig_length_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["initialThread"]) || array_key_exists("initialThread"$context) ? $context["initialThread"] : (function () { throw new RuntimeError('Variable "initialThread" does not exist.'857$this->source); })()), "attachments", [], "any"falsefalsefalse857)), 1))) {
  1480.                 // line 858
  1481.                 echo "                                            <div class=\"uv-upload-actions\">
  1482.                                                 <a href=\"#\" class=\"uv-open-in-files\" data-thread=\"";
  1483.                 // line 859
  1484.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["initialThread"]) || array_key_exists("initialThread"$context) ? $context["initialThread"] : (function () { throw new RuntimeError('Variable "initialThread" does not exist.'859$this->source); })()), "id", [], "any"falsefalsefalse859), "html"nulltrue);
  1485.                 echo "\" style=\"display: none\"><span class=\"uv-icon-open-in-files\"></span>";
  1486.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Open in Files"), "html"nulltrue);
  1487.                 echo "</a>
  1488.                                                 ";
  1489.                 // line 860
  1490.                 if (twig_length_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["initialThread"]) || array_key_exists("initialThread"$context) ? $context["initialThread"] : (function () { throw new RuntimeError('Variable "initialThread" does not exist.'860$this->source); })()), "attachments", [], "any"falsefalsefalse860))) {
  1491.                     // line 861
  1492.                     echo "                                                    <a href=\"";
  1493.                     echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_ticket_download_attachment_zip");
  1494.                     echo "/";
  1495.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["initialThread"]) || array_key_exists("initialThread"$context) ? $context["initialThread"] : (function () { throw new RuntimeError('Variable "initialThread" does not exist.'861$this->source); })()), "id", [], "any"falsefalsefalse861), "html"nulltrue);
  1496.                     echo "\" target=\"_blank\"><span class=\"uv-icon-attachment\"></span> Download (as .zip)</a>
  1497.                                                 ";
  1498.                 }
  1499.                 // line 863
  1500.                 echo "                                            </div>
  1501.                                         ";
  1502.             }
  1503.             // line 865
  1504.             echo "                                    </div>
  1505.                                 ";
  1506.         }
  1507.         // line 867
  1508.         echo "                            </div>
  1509.                         </div>
  1510.                         <div class=\"uv-ticket-accordion\">
  1511.                             <div class=\"uv-ticket-count-wrapper\">
  1512.                                 <span class=\"uv-ticket-count-stat\">";
  1513.         // line 872
  1514.         echo twig_escape_filter($this->env, (isset($context["totalReplies"]) || array_key_exists("totalReplies"$context) ? $context["totalReplies"] : (function () { throw new RuntimeError('Variable "totalReplies" does not exist.'872$this->source); })()), "html"nulltrue);
  1515.         echo "</span>
  1516.                             </div>
  1517.                             <div class=\"uv-ticket-wrapper thread-list\"></div>
  1518.                         </div>
  1519.                     </div>
  1520.                 </div>
  1521.                 ";
  1522.         // line 881
  1523.         echo "                <div class=\"uv-ticket-main uv-ticket-reply uv-no-error-success-icon\">
  1524.                     <div class=\"uv-ticket-main-lt\">
  1525.                         <span class=\"uv-icon-ellipsis\"></span>
  1526.                         <img src=\"";
  1527.         // line 884
  1528.         echo twig_escape_filter($this->env, ((twig_get_attribute($this->env$this->source, (isset($context["currentUserDetails"]) || array_key_exists("currentUserDetails"$context) ? $context["currentUserDetails"] : (function () { throw new RuntimeError('Variable "currentUserDetails" does not exist.'884$this->source); })()), "thumbnail", [], "any"falsefalsefalse884)) ? (((((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'884$this->source); })()), "request", [], "any"falsefalsefalse884), "scheme", [], "any"falsefalsefalse884) . "://") . twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'884$this->source); })()), "request", [], "any"falsefalsefalse884), "httpHost", [], "any"falsefalsefalse884)) . $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("")) . twig_get_attribute($this->env$this->source, (isset($context["currentUserDetails"]) || array_key_exists("currentUserDetails"$context) ? $context["currentUserDetails"] : (function () { throw new RuntimeError('Variable "currentUserDetails" does not exist.'884$this->source); })()), "thumbnail", [], "any"falsefalsefalse884))) : ($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.'884$this->source); })())))), "html"nulltrue);
  1529.         echo "\" />
  1530.                     </div>
  1531.                     <div class=\"uv-ticket-main-rt\">
  1532.                         <span class=\"uv-ticket-member-name\">";
  1533.         // line 888
  1534.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["currentUserDetails"]) || array_key_exists("currentUserDetails"$context) ? $context["currentUserDetails"] : (function () { throw new RuntimeError('Variable "currentUserDetails" does not exist.'888$this->source); })()), "name", [], "any"falsefalsefalse888), "html"nulltrue);
  1535.         echo "</span>
  1536.                         <div class=\"uv-tabs\">
  1537.                             <ul>
  1538.                                 <li for=\"reply\" class=\"uv-tab-active\">";
  1539.         // line 891
  1540.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Reply"), "html"nulltrue);
  1541.         echo "</li>
  1542.                                 <li for=\"forward\">";
  1543.         // line 892
  1544.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Forward"), "html"nulltrue);
  1545.         echo "</li>
  1546.                                 ";
  1547.         // line 893
  1548.         if (twig_get_attribute($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.'893$this->source); })()), "isAccessAuthorized", [=> "ROLE_AGENT_ADD_NOTE"], "method"falsefalsefalse893)) {
  1549.             // line 894
  1550.             echo "                                    <li for='note'>";
  1551.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Note"), "html"nulltrue);
  1552.             echo "</li>
  1553.                                 ";
  1554.         }
  1555.         // line 896
  1556.         echo "                            </ul>
  1557.                         </div>
  1558.                         ";
  1559.         // line 900
  1560.         echo "                        <div class=\"uv-tab-view uv-tab-view-active\" id=\"reply\">
  1561.                             <form enctype=\"multipart/form-data\" method=\"post\" action=\"";
  1562.         // line 901
  1563.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_add_ticket_thread", ["ticketId" => twig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'901$this->source); })()), "id", [], "any"falsefalsefalse901)]), "html"nulltrue);
  1564.         echo "\">
  1565.                                 <input name=\"threadType\" value=\"reply\" type=\"hidden\">
  1566.                                 <input name=\"status\" value=\"\" type=\"hidden\" ";
  1567.         // line 903
  1568.         if (twig_get_attribute($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.'903$this->source); })()), "isAccessAuthorized", [=> "ROLE_AGENT_UPDATE_TICKET_STATUS"], "method"falsefalsefalse903)) {
  1569.             echo "class=\"reply-status\"";
  1570.         }
  1571.         echo ">
  1572.                                 <div class=\"uv-element-block collaborators\" style=\"display: none\">
  1573.                                     <label class=\"uv-field-label\">";
  1574.         // line 905
  1575.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Collaborators"), "html"nulltrue);
  1576.         echo "</label>
  1577.                                     <div class=\"uv-field-block\"></div>
  1578.                                 </div>
  1579.                                 <div class=\"uv-element-block cc-bcc\">
  1580.                                     <label>
  1581.                                         <div class=\"uv-checkbox\">
  1582.                                             <input type=\"checkbox\" class=\"cc-bcc-toggle\">
  1583.                                             <span class=\"uv-checkbox-view\"></span>
  1584.                                         </div>
  1585.                                         <span class=\"uv-checkbox-label\">CC/BCC</span>
  1586.                                     </label>
  1587.                                     <div class=\"uv-field-block\" style=\"display: none\">
  1588.                                         <div class=\"uv-group\">
  1589.                                             <input class=\"uv-group-field uv-dropdown-other preloaded uv-manual-enter\" type=\"text\">
  1590.                                             <div class=\"uv-dropdown-list uv-bottom-left\">
  1591.                                                 <div class=\"uv-dropdown-container\">
  1592.                                                     <label>";
  1593.         // line 923
  1594.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Agent"), "html"nulltrue);
  1595.         echo "</label>
  1596.                                                 </div>
  1597.                                                 <ul class=\"uv-agents-list\">
  1598.                                                     ";
  1599.         // line 927
  1600.         $context['_parent'] = $context;
  1601.         $context['_seq'] = twig_ensure_traversable(twig_get_attribute($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.'927$this->source); })()), "getAgentPartialDataCollection", [], "any"falsefalsefalse927));
  1602.         foreach ($context['_seq'] as $context["_key"] => $context["agent"]) {
  1603.             // line 928
  1604.             echo "                                                        <li data-id=\"";
  1605.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["agent"], "email", [], "any"falsefalsefalse928), "html"nulltrue);
  1606.             echo "\">
  1607.                                                             <img src=\"";
  1608.             // line 929
  1609.             echo twig_escape_filter($this->env, ((twig_get_attribute($this->env$this->source$context["agent"], "smallThumbnail", [], "any"falsefalsefalse929)) ? (((((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'929$this->source); })()), "request", [], "any"falsefalsefalse929), "scheme", [], "any"falsefalsefalse929) . "://") . twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'929$this->source); })()), "request", [], "any"falsefalsefalse929), "httpHost", [], "any"falsefalsefalse929)) . $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("")) . twig_get_attribute($this->env$this->source$context["agent"], "smallThumbnail", [], "any"falsefalsefalse929))) : ($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.'929$this->source); })())))), "html"nulltrue);
  1610.             echo "\"/> ";
  1611.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["agent"], "name", [], "any"falsefalsefalse929), "html"nulltrue);
  1612.             echo "
  1613.                                                         </li>
  1614.                                                     ";
  1615.         }
  1616.         $_parent $context['_parent'];
  1617.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['agent'], $context['_parent'], $context['loop']);
  1618.         $context array_intersect_key($context$_parent) + $_parent;
  1619.         // line 932
  1620.         echo "
  1621.                                                     <li class=\"uv-no-results\" style=\"display: none;\">";
  1622.         // line 933
  1623.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("No result found"), "html"nulltrue);
  1624.         echo "</li>
  1625.                                                 </ul>
  1626.                                             </div>
  1627.                                             <select class=\"uv-group-select cc-bcc-select\">
  1628.                                                 <option value=\"bcc\">";
  1629.         // line 937
  1630.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("BCC"), "html"nulltrue);
  1631.         echo "</option>
  1632.                                                 <option value=\"cc\">";
  1633.         // line 938
  1634.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("CC"), "html"nulltrue);
  1635.         echo "</option>
  1636.                                             </select>
  1637.                                         </div>
  1638.                                         <div class=\"cc-bcc-list\"></div>
  1639.                                     </div>
  1640.                                 </div>
  1641.                                 <div class=\"uv-element-block uv-element-block-textarea\">
  1642.                                     <label class=\"uv-field-label\">";
  1643.         // line 947
  1644.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Write a reply"), "html"nulltrue);
  1645.         echo "</label>
  1646.                                     <div class=\"uv-field-block\">
  1647.                                         <textarea class=\"uv-field\" name=\"reply\" id=\"reply-area\">";
  1648.         // line 949
  1649.         echo twig_escape_filter($this->envtwig_get_attribute($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.'949$this->source); })()), "getAgentDraftReply", [], "method"falsefalsefalse949), "html"nulltrue);
  1650.         echo "</textarea>
  1651.                                     </div>
  1652.                                 </div>
  1653.                                 <div class=\"uv-element-block attachment-block\">
  1654.                                     <label>
  1655.                                         <span class=\"uv-file-label\">";
  1656.         // line 955
  1657.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Add Attachment"), "html"nulltrue);
  1658.         echo "</span>
  1659.                                     </label>
  1660.                                 </div>
  1661.                                 <div class=\"uv-action-buttons\">
  1662.                                     <div class=\"uv-dropdown next-view\">
  1663.                                         <input type=\"hidden\" name=\"nextView\" value=\"stay\"/>
  1664.                                         <div class=\"uv-dropdown-btn\" style=\"padding: 9px 27px 9px 10px;\">";
  1665.         // line 962
  1666.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Stay on ticket"), "html"nulltrue);
  1667.         echo "</div>
  1668.                                         <div class=\"uv-dropdown-list uv-top-left\" style=\"opacity: 1;\">
  1669.                                             <div class=\"uv-dropdown-container\">
  1670.                                                 <label>";
  1671.         // line 965
  1672.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("After Reply"), "html"nulltrue);
  1673.         echo "</label>
  1674.                                                 <ul>
  1675.                                                     <li data-value=\"stay\">";
  1676.         // line 967
  1677.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Stay on ticket"), "html"nulltrue);
  1678.         echo "</li>
  1679.                                                     <li data-value=\"redirect\">";
  1680.         // line 968
  1681.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Redirect to list"), "html"nulltrue);
  1682.         echo "</li>
  1683.                                                 </ul>
  1684.                                             </div>
  1685.                                         </div>
  1686.                                     </div>
  1687.                                     <div class=\"uv-dropdown reply\">
  1688.                                         <div class=\"uv-btn uv-dropdown-other\">";
  1689.         // line 975
  1690.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Reply"), "html"nulltrue);
  1691.         echo " <span class=\"uv-icon-down-light\"></span></div>
  1692.                                         <div class=\"uv-dropdown-list uv-top-left\">
  1693.                                             <div class=\"uv-dropdown-container\">
  1694.                                                 <label>";
  1695.         // line 978
  1696.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Reply"), "html"nulltrue);
  1697.         echo "</label>
  1698.                                                 <ul>
  1699.                                                     <li data-id=\"\">";
  1700.         // line 980
  1701.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Submit"), "html"nulltrue);
  1702.         echo "</li>
  1703.                                                     ";
  1704.         // line 981
  1705.         if (twig_get_attribute($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.'981$this->source); })()), "isAccessAuthorized", [=> "ROLE_AGENT_UPDATE_TICKET_STATUS"], "method"falsefalsefalse981)) {
  1706.             // line 982
  1707.             echo "                                                        <li data-id=\"open\">";
  1708.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Submit And Open"), "html"nulltrue);
  1709.             echo "</li>
  1710.                                                         <li data-id=\"pending\">";
  1711.             // line 983
  1712.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Submit And Pending"), "html"nulltrue);
  1713.             echo "</li>
  1714.                                                         <li data-id=\"answered\">";
  1715.             // line 984
  1716.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Submit And Answered"), "html"nulltrue);
  1717.             echo "</li>
  1718.                                                         <li data-id=\"resolved\">";
  1719.             // line 985
  1720.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Submit And Resolved"), "html"nulltrue);
  1721.             echo "</li>
  1722.                                                         <li data-id=\"closed\">";
  1723.             // line 986
  1724.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Submit And Closed"), "html"nulltrue);
  1725.             echo "</li>
  1726.                                                     ";
  1727.         }
  1728.         // line 988
  1729.         echo "                                                </ul>
  1730.                                             </div>
  1731.                                         </div>
  1732.                                     </div>
  1733.                                 </div>
  1734.                             </form>
  1735.                         </div>
  1736.                         ";
  1737.         // line 997
  1738.         echo "                        <div class=\"uv-tab-view\" id=\"forward\">
  1739.                             <form enctype=\"multipart/form-data\" method=\"post\" action=\"";
  1740.         // line 998
  1741.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_add_ticket_thread", ["ticketId" => twig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'998$this->source); })()), "id", [], "any"falsefalsefalse998)]), "html"nulltrue);
  1742.         echo "\">
  1743.                                 <input name=\"threadType\" value=\"forward\" type=\"hidden\">
  1744.                                 <input name=\"status\" value=\"\" type=\"hidden\" ";
  1745.         // line 1000
  1746.         if (twig_get_attribute($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.'1000$this->source); })()), "isAccessAuthorized", [=> "ROLE_AGENT_UPDATE_TICKET_STATUS"], "method"falsefalsefalse1000)) {
  1747.             echo "class=\"reply-status\"";
  1748.         }
  1749.         echo ">
  1750.                                 <div class=\"uv-element-block\">
  1751.                                     <label class=\"uv-field-label\">";
  1752.         // line 1003
  1753.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Subject"), "html"nulltrue);
  1754.         echo "</label>
  1755.                                     <div class=\"uv-field-block\">
  1756.                                         <input class=\"uv-field\" type=\"text\" name=\"subject\">
  1757.                                     </div>
  1758.                                 </div>
  1759.                                 <div class=\"uv-element-block to\">
  1760.                                     <label class=\"uv-field-label\">";
  1761.         // line 1010
  1762.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("To"), "html"nulltrue);
  1763.         echo "</label>
  1764.                                     <div class=\"uv-field-block\">
  1765.                                         <input class=\"uv-field uv-dropdown-other preloaded uv-to-message uv-manual-enter\" type=\"text\">
  1766.                                         <div class=\"uv-dropdown-list uv-bottom-left\">
  1767.                                             <div class=\"uv-dropdown-container\">
  1768.                                                 <label>";
  1769.         // line 1016
  1770.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Agent"), "html"nulltrue);
  1771.         echo "</label>
  1772.                                             </div>
  1773.                                             <ul class=\"uv-agents-list\">
  1774.                                                 ";
  1775.         // line 1020
  1776.         $context['_parent'] = $context;
  1777.         $context['_seq'] = twig_ensure_traversable(twig_get_attribute($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.'1020$this->source); })()), "getAgentPartialDataCollection", [], "any"falsefalsefalse1020));
  1778.         foreach ($context['_seq'] as $context["_key"] => $context["agent"]) {
  1779.             // line 1021
  1780.             echo "                                                    <li data-id=\"";
  1781.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["agent"], "email", [], "any"falsefalsefalse1021), "html"nulltrue);
  1782.             echo "\">
  1783.                                                         <img src=\"";
  1784.             // line 1022
  1785.             echo twig_escape_filter($this->env, ((twig_get_attribute($this->env$this->source$context["agent"], "smallThumbnail", [], "any"falsefalsefalse1022)) ? (((((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'1022$this->source); })()), "request", [], "any"falsefalsefalse1022), "scheme", [], "any"falsefalsefalse1022) . "://") . twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'1022$this->source); })()), "request", [], "any"falsefalsefalse1022), "httpHost", [], "any"falsefalsefalse1022)) . $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("")) . twig_get_attribute($this->env$this->source$context["agent"], "smallThumbnail", [], "any"falsefalsefalse1022))) : ($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.'1022$this->source); })())))), "html"nulltrue);
  1786.             echo "\"/> ";
  1787.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["agent"], "name", [], "any"falsefalsefalse1022), "html"nulltrue);
  1788.             echo "
  1789.                                                     </li>
  1790.                                                 ";
  1791.         }
  1792.         $_parent $context['_parent'];
  1793.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['agent'], $context['_parent'], $context['loop']);
  1794.         $context array_intersect_key($context$_parent) + $_parent;
  1795.         // line 1025
  1796.         echo "
  1797.                                                 <li class=\"uv-no-results\" style=\"display: none;\">";
  1798.         // line 1026
  1799.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("No result found"), "html"nulltrue);
  1800.         echo "</li>
  1801.                                             </ul>
  1802.                                         </div>
  1803.                                         <div class=\"to-list\"></div>
  1804.                                     </div>
  1805.                                 </div>
  1806.                                 <div class=\"uv-element-block cc-bcc\">
  1807.                                     <label>
  1808.                                         <div class=\"uv-checkbox\">
  1809.                                             <input type=\"checkbox\" class=\"cc-bcc-toggle\">
  1810.                                             <span class=\"uv-checkbox-view\"></span>
  1811.                                         </div>
  1812.                                         <span class=\"uv-checkbox-label\">CC/BCC</span>
  1813.                                     </label>
  1814.                                     <div class=\"uv-field-block\" style=\"display: none\">
  1815.                                         <div class=\"uv-group\">
  1816.                                             <input class=\"uv-group-field uv-dropdown-other preloaded uv-manual-enter\" type=\"text\">
  1817.                                             <div class=\"uv-dropdown-list uv-bottom-left\">
  1818.                                                 <div class=\"uv-dropdown-container\"><label>";
  1819.         // line 1046
  1820.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Agent"), "html"nulltrue);
  1821.         echo "</label></div>
  1822.                                                 <ul class=\"uv-agents-list\">
  1823.                                                     ";
  1824.         // line 1049
  1825.         $context['_parent'] = $context;
  1826.         $context['_seq'] = twig_ensure_traversable(twig_get_attribute($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.'1049$this->source); })()), "getAgentPartialDataCollection", [], "any"falsefalsefalse1049));
  1827.         foreach ($context['_seq'] as $context["_key"] => $context["agent"]) {
  1828.             // line 1050
  1829.             echo "                                                        <li data-id=\"";
  1830.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["agent"], "email", [], "any"falsefalsefalse1050), "html"nulltrue);
  1831.             echo "\">
  1832.                                                             <img src=\"";
  1833.             // line 1051
  1834.             echo twig_escape_filter($this->env, ((twig_get_attribute($this->env$this->source$context["agent"], "smallThumbnail", [], "any"falsefalsefalse1051)) ? (((((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'1051$this->source); })()), "request", [], "any"falsefalsefalse1051), "scheme", [], "any"falsefalsefalse1051) . "://") . twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'1051$this->source); })()), "request", [], "any"falsefalsefalse1051), "httpHost", [], "any"falsefalsefalse1051)) . $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("")) . twig_get_attribute($this->env$this->source$context["agent"], "smallThumbnail", [], "any"falsefalsefalse1051))) : ($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.'1051$this->source); })())))), "html"nulltrue);
  1835.             echo "\"/> ";
  1836.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["agent"], "name", [], "any"falsefalsefalse1051), "html"nulltrue);
  1837.             echo "
  1838.                                                         </li>
  1839.                                                     ";
  1840.         }
  1841.         $_parent $context['_parent'];
  1842.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['agent'], $context['_parent'], $context['loop']);
  1843.         $context array_intersect_key($context$_parent) + $_parent;
  1844.         // line 1054
  1845.         echo "
  1846.                                                     <li class=\"uv-no-results\" style=\"display: none;\">";
  1847.         // line 1055
  1848.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("No result found"), "html"nulltrue);
  1849.         echo "</li>
  1850.                                                 </ul>
  1851.                                             </div>
  1852.                                             <select class=\"uv-group-select cc-bcc-select\">
  1853.                                                 <option value=\"bcc\">";
  1854.         // line 1059
  1855.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("BCC"), "html"nulltrue);
  1856.         echo "</option>
  1857.                                                 <option value=\"cc\">";
  1858.         // line 1060
  1859.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("CC"), "html"nulltrue);
  1860.         echo "</option>
  1861.                                             </select>
  1862.                                         </div>
  1863.                                         <div class=\"cc-bcc-list\"></div>
  1864.                                     </div>
  1865.                                 </div>
  1866.                                 <div class=\"uv-element-block uv-element-block-textarea\">
  1867.                                     <label class=\"uv-field-label\">";
  1868.         // line 1069
  1869.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Write a reply"), "html"nulltrue);
  1870.         echo "</label>
  1871.                                     <div class=\"uv-field-block\">
  1872.                                         <textarea class=\"uv-field\" name=\"reply\" id=\"forward-area\">";
  1873.         // line 1071
  1874.         echo twig_escape_filter($this->envtwig_get_attribute($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.'1071$this->source); })()), "getAgentDraftReply", [], "method"falsefalsefalse1071), "html"nulltrue);
  1875.         echo "</textarea>
  1876.                                     </div>
  1877.                                 </div>
  1878.                                 <div class=\"uv-element-block attachment-block\">
  1879.                                     <label><span class=\"uv-file-label\">";
  1880.         // line 1076
  1881.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Add Attachment"), "html"nulltrue);
  1882.         echo "</span></label>
  1883.                                 </div>
  1884.                                 <div class=\"uv-action-buttons\">
  1885.                                     <div class=\"uv-dropdown next-view\">
  1886.                                         <input type=\"hidden\" name=\"nextView\" value=\"stay\"/>
  1887.                                         <div class=\"uv-dropdown-btn\" style=\"padding: 9px 27px 9px 10px;\">";
  1888.         // line 1082
  1889.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Stay on ticket"), "html"nulltrue);
  1890.         echo "</div>
  1891.                                         <div class=\"uv-dropdown-list uv-top-left\" style=\"opacity: 1;\">
  1892.                                             <div class=\"uv-dropdown-container\">
  1893.                                                 <label>";
  1894.         // line 1085
  1895.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("After Reply"), "html"nulltrue);
  1896.         echo "</label>
  1897.                                                 <ul>
  1898.                                                     <li data-value=\"stay\">";
  1899.         // line 1087
  1900.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Stay on ticket"), "html"nulltrue);
  1901.         echo "</li>
  1902.                                                     <li data-value=\"redirect\">";
  1903.         // line 1088
  1904.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Redirect to list"), "html"nulltrue);
  1905.         echo "</li>
  1906.                                                 </ul>
  1907.                                             </div>
  1908.                                         </div>
  1909.                                     </div>
  1910.                                     <div class=\"uv-btn forward\">";
  1911.         // line 1094
  1912.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Forward"), "html"nulltrue);
  1913.         echo "</div>
  1914.                                 </div>
  1915.                             </form>
  1916.                         </div>
  1917.                         ";
  1918.         // line 1100
  1919.         echo "                        ";
  1920.         if (twig_get_attribute($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.'1100$this->source); })()), "isAccessAuthorized", [=> "ROLE_AGENT_ADD_NOTE"], "method"falsefalsefalse1100)) {
  1921.             // line 1101
  1922.             echo "                            <div class=\"uv-tab-view\" id=\"note\">
  1923.                                 <form enctype=\"multipart/form-data\" method=\"post\" action=\"";
  1924.             // line 1102
  1925.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_add_ticket_thread", ["ticketId" => twig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'1102$this->source); })()), "id", [], "any"falsefalsefalse1102)]), "html"nulltrue);
  1926.             echo "\">
  1927.                                     <input name=\"threadType\" value=\"note\" type=\"hidden\">
  1928.                                     <input name=\"status\" value=\"\" type=\"hidden\" ";
  1929.             // line 1104
  1930.             if (twig_get_attribute($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.'1104$this->source); })()), "isAccessAuthorized", [=> "ROLE_AGENT_UPDATE_TICKET_STATUS"], "method"falsefalsefalse1104)) {
  1931.                 echo "class=\"reply-status\"";
  1932.             }
  1933.             echo ">
  1934.                                     <div class=\"uv-element-block uv-element-block-textarea\">
  1935.                                         <label class=\"uv-field-label\">";
  1936.             // line 1107
  1937.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Write a reply"), "html"nulltrue);
  1938.             echo "</label>
  1939.                                         <div class=\"uv-field-block\">
  1940.                                             <textarea class=\"uv-field\" name=\"reply\" id=\"note-area\">";
  1941.             // line 1109
  1942.             echo twig_escape_filter($this->envtwig_get_attribute($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.'1109$this->source); })()), "getAgentDraftReply", [], "method"falsefalsefalse1109), "html"nulltrue);
  1943.             echo "</textarea>
  1944.                                         </div>
  1945.                                     </div>
  1946.                                     <div class=\"uv-element-block attachment-block\">
  1947.                                         <label><span class=\"uv-file-label\">";
  1948.             // line 1114
  1949.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Add Attachment"), "html"nulltrue);
  1950.             echo "</span></label>
  1951.                                     </div>
  1952.                                     <div class=\"uv-action-buttons\">
  1953.                                         <div class=\"uv-dropdown next-view\">
  1954.                                             <input type=\"hidden\" name=\"nextView\" value=\"stay\"/>
  1955.                                             <div class=\"uv-dropdown-btn\" style=\"padding: 9px 27px 9px 10px;\">";
  1956.             // line 1120
  1957.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Stay on ticket"), "html"nulltrue);
  1958.             echo "</div>
  1959.                                             <div class=\"uv-dropdown-list uv-top-left\" style=\"opacity: 1;\">
  1960.                                                 <div class=\"uv-dropdown-container\">
  1961.                                                     <label>";
  1962.             // line 1123
  1963.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("After Reply"), "html"nulltrue);
  1964.             echo "</label>
  1965.                                                     <ul>
  1966.                                                         <li data-value=\"stay\">";
  1967.             // line 1125
  1968.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Stay on ticket"), "html"nulltrue);
  1969.             echo "</li>
  1970.                                                         <li data-value=\"redirect\">";
  1971.             // line 1126
  1972.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Redirect to list"), "html"nulltrue);
  1973.             echo "</li>
  1974.                                                     </ul>
  1975.                                                 </div>
  1976.                                             </div>
  1977.                                         </div>
  1978.                                         <div class=\"uv-dropdown reply\">
  1979.                                             <div class=\"uv-btn uv-dropdown-other\">";
  1980.             // line 1133
  1981.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Reply"), "html"nulltrue);
  1982.             echo "<span class=\"uv-icon-down-light\"></span></div>
  1983.                                             <div class=\"uv-dropdown-list uv-top-left\">
  1984.                                                 <div class=\"uv-dropdown-container\">
  1985.                                                     <label>";
  1986.             // line 1137
  1987.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Add Note"), "html"nulltrue);
  1988.             echo "</label>
  1989.                                                     <ul>
  1990.                                                         <li data-id=\"\">";
  1991.             // line 1139
  1992.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Submit"), "html"nulltrue);
  1993.             echo "</li>
  1994.                                                         ";
  1995.             // line 1140
  1996.             if (twig_get_attribute($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.'1140$this->source); })()), "isAccessAuthorized", [=> "ROLE_AGENT_UPDATE_TICKET_STATUS"], "method"falsefalsefalse1140)) {
  1997.                 // line 1141
  1998.                 echo "                                                            <li data-id=\"open\">";
  1999.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Submit And Open"), "html"nulltrue);
  2000.                 echo "</li>
  2001.                                                             <li data-id=\"pending\">";
  2002.                 // line 1142
  2003.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Submit And Pending"), "html"nulltrue);
  2004.                 echo "</li>
  2005.                                                             <li data-id=\"answered\">";
  2006.                 // line 1143
  2007.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Submit And Answered"), "html"nulltrue);
  2008.                 echo "</li>
  2009.                                                             <li data-id=\"resolved\">";
  2010.                 // line 1144
  2011.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Submit And Resolved"), "html"nulltrue);
  2012.                 echo "</li>
  2013.                                                             <li data-id=\"closed\">";
  2014.                 // line 1145
  2015.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Submit And Closed"), "html"nulltrue);
  2016.                 echo "</li>
  2017.                                                         ";
  2018.             }
  2019.             // line 1147
  2020.             echo "                                                    </ul>
  2021.                                                 </div>
  2022.                                             </div>
  2023.                                         </div>
  2024.                                     </div>
  2025.                                 </form>
  2026.                             </div>
  2027.                         ";
  2028.         }
  2029.         // line 1155
  2030.         echo "                    </div>
  2031.                 </div>
  2032.             </div>
  2033.             <!-- Bottom Action Block -->
  2034.             <div class=\"uv-ticket-fixed-region\">
  2035.                 <div class=\"uv-ticket-fixed-region-lt\">
  2036.                     ";
  2037.         // line 1162
  2038.         echo twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["uvdesk_extensibles"]) || array_key_exists("uvdesk_extensibles"$context) ? $context["uvdesk_extensibles"] : (function () { throw new RuntimeError('Variable "uvdesk_extensibles" does not exist.'1162$this->source); })()), "getRegisteredComponent", [=> "Webkul\\UVDesk\\CoreFrameworkBundle\\Tickets\\QuickActionButtonCollection"], "method"falsefalsefalse1162), "injectTemplates", [], "method"falsefalsefalse1162);
  2039.         echo "
  2040.                     ";
  2041.         // line 1184
  2042.         echo "
  2043.                     ";
  2044.         // line 1208
  2045.         echo "                </div>
  2046.                 <div class=\"uv-ticket-fixed-region-rt\"></div>
  2047.             </div>
  2048.             <!-- //Bottom Action Block -->
  2049.         </div>
  2050.     </div>
  2051.     ";
  2052.         // line 1217
  2053.         echo "    ";
  2054.         if (twig_get_attribute($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.'1217$this->source); })()), "isAccessAuthorized", [=> "ROLE_AGENT_EDIT_TICKET"], "method"falsefalsefalse1217)) {
  2055.             // line 1218
  2056.             echo "        <div class=\"uv-pop-up-overlay uv-no-error-success-icon\" id=\"edit-ticket-modal\">
  2057.             <div class=\"uv-pop-up-box uv-pop-up-wide\">
  2058.                 <span class=\"uv-pop-up-close\"></span>
  2059.                 <h2>";
  2060.             // line 1221
  2061.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Edit Ticket"), "html"nulltrue);
  2062.             echo "</h2>
  2063.                 ";
  2064.             // line 1224
  2065.             echo "                <form method=\"post\" action=\"";
  2066.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_update_ticket_details_xhr", ["ticketId" => twig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'1224$this->source); })()), "id", [], "any"falsefalsefalse1224)]), "html"nulltrue);
  2067.             echo "\" id=\"edit-ticket-form\">
  2068.                     <div class=\"uv-element-block\">
  2069.                         <label class=\"uv-field-label\">";
  2070.             // line 1226
  2071.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Subject"), "html"nulltrue);
  2072.             echo "</label>
  2073.                         <div class=\"uv-field-block\">
  2074.                             <input type=\"text\" name=\"subject\" class=\"uv-field\" value=\"";
  2075.             // line 1228
  2076.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'1228$this->source); })()), "subject", [], "any"falsefalsefalse1228), "html"nulltrue);
  2077.             echo "\" />
  2078.                         </div>
  2079.                     </div>
  2080.                     
  2081.                     <div class=\"uv-element-block\">
  2082.                         <label class=\"uv-field-label\">";
  2083.             // line 1233
  2084.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Reply"), "html"nulltrue);
  2085.             echo "</label>
  2086.                         <div class=\"uv-field-block\">
  2087.                             ";
  2088.             // line 1235
  2089.             if ((=== twig_compare(twig_striptags(twig_get_attribute($this->env$this->source, (isset($context["initialThread"]) || array_key_exists("initialThread"$context) ? $context["initialThread"] : (function () { throw new RuntimeError('Variable "initialThread" does not exist.'1235$this->source); })()), "message", [], "any"falsefalsefalse1235)), twig_get_attribute($this->env$this->source, (isset($context["initialThread"]) || array_key_exists("initialThread"$context) ? $context["initialThread"] : (function () { throw new RuntimeError('Variable "initialThread" does not exist.'1235$this->source); })()), "message", [], "any"falsefalsefalse1235)))) {
  2090.                 // line 1236
  2091.                 echo "                                <textarea name=\"reply\" id=\"uv-edit-create-thread\" class=\"uv-field\">";
  2092.                 echo twig_nl2br(twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["initialThread"]) || array_key_exists("initialThread"$context) ? $context["initialThread"] : (function () { throw new RuntimeError('Variable "initialThread" does not exist.'1236$this->source); })()), "message", [], "any"falsefalsefalse1236), "html"nulltrue));
  2093.                 echo "</textarea>
  2094.                             %} ";
  2095.             } else {
  2096.                 // line 1238
  2097.                 echo "                                <textarea name=\"reply\" id=\"uv-edit-create-thread\" class=\"uv-field\">";
  2098.                 echo twig_get_attribute($this->env$this->source, (isset($context["initialThread"]) || array_key_exists("initialThread"$context) ? $context["initialThread"] : (function () { throw new RuntimeError('Variable "initialThread" does not exist.'1238$this->source); })()), "message", [], "any"falsefalsefalse1238);
  2099.                 echo "</textarea>
  2100.                             ";
  2101.             }
  2102.             // line 1240
  2103.             echo "                        </div>
  2104.                     </div>
  2105.                     <div class=\"uv-pop-up-actions\">
  2106.                         <input class=\"uv-btn update\" href=\"#\" value=\"Update\" type=\"submit\">
  2107.                         <input class=\"uv-btn cancel\" href=\"#\" value=\"Discard\" type=\"button\">
  2108.                     </div>
  2109.                 </form>
  2110.             </div>
  2111.         </div>
  2112.     ";
  2113.         }
  2114.         // line 1251
  2115.         echo "
  2116.     ";
  2117.         // line 1252
  2118.         echo twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["uvdesk_extensibles"]) || array_key_exists("uvdesk_extensibles"$context) ? $context["uvdesk_extensibles"] : (function () { throw new RuntimeError('Variable "uvdesk_extensibles" does not exist.'1252$this->source); })()), "getRegisteredComponent", [=> "Webkul\\UVDesk\\CoreFrameworkBundle\\Tickets\\WidgetCollection"], "method"falsefalsefalse1252), "embedSideFilterContent", [], "method"falsefalsefalse1252);
  2119.         echo "
  2120. ";
  2121.         
  2122.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  2123.         
  2124.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  2125.     }
  2126.     // line 1255
  2127.     public function block_footer($context, array $blocks = [])
  2128.     {
  2129.         $macros $this->macros;
  2130.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  2131.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""footer"));
  2132.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  2133.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""footer"));
  2134.         // line 1256
  2135.         echo "    ";
  2136.         $this->displayParentBlock("footer"$context$blocks);
  2137.         echo "
  2138.     ";
  2139.         // line 1258
  2140.         echo twig_include($this->env$context"@UVDeskCoreFramework\\Templates\\attachment.html.twig");
  2141.         echo "
  2142.     ";
  2143.         // line 1259
  2144.         echo twig_include($this->env$context"@UVDeskCoreFramework/Templates/tinyMCE.html.twig");
  2145.         echo "
  2146.     <script id=\"thread_list_empty_tmp\" type=\"text/template\">
  2147.         <div class=\"uv-no-threads\">";
  2148.         // line 1262
  2149.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Nothing interesting here..."), "html"nulltrue);
  2150.         echo "</div>
  2151.     </script>
  2152.     <script> 
  2153.         \$(document).ready(function() {
  2154.             \$(\"#filterSavedreplies\").on(\"keyup\", function() {
  2155.                 if (this.value.length && this.value.length != '') {
  2156.                     var that = this;
  2157.                     \$(\"#listSavedReplies li\").hide().filter(function() {
  2158.                         return \$(this).html().toLowerCase().indexOf(that.value.toLowerCase()) !== -1;
  2159.                     }).show();
  2160.                 } else {
  2161.                     \$(\"#listSavedReplies li\").show()
  2162.                 }
  2163.             });
  2164.             \$(\".uv-dropdown-btn\").click(function(event) {
  2165.                 setTimeout(function() {
  2166.                     \$(\".uv-search-inline\").focus();
  2167.                 }, 100);
  2168.             });
  2169.         });
  2170.     </script>
  2171.     <script id=\"thread_list_item_tmp\" type=\"text/template\">
  2172.         <div class=\"uv-ticket-strip\">
  2173.             <span>
  2174.                 <% if(typeof(mailStatus) != 'undefined' && mailStatus) { %>
  2175.                     <a href=\"https://support.uvdesk.com/en/blog/uvdesk-ticket-delivery-status\" target=\"_blank\">
  2176.                         <span class=\"uv-mail-status uv-mail-<%- mailStatus.split(',')[0] %>\" <% if(mailStatus !== 'pending') { %>data-toggle=\"tooltip\" data-placement=\"right\" title=\"";
  2177.         // line 1291
  2178.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Mail status:"), "html"nulltrue);
  2179.         echo " <%- mailStatus.split(',')[0] %> <% if(mailStatus.split(',').length > 1) { print('Reason:' + mailStatus.split(',')[1] ); } %> \"<% } %> ></span>
  2180.             </a>
  2181.             <% } %>
  2182.             <span class=\"timeago uv-margin-0\" data-timestamp=\"<%- timestamp %>\" title=\"<%- formatedCreatedAt %>\">
  2183.                     <%- formatedCreatedAt %>
  2184.                 </span>
  2185.             - <%- fullname %>
  2186.             <span class=\"uv-ticket-strip-label\">
  2187.                 <% if(threadType == 'reply') { %>
  2188.                     ";
  2189.         // line 1300
  2190.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("replied"), "html"nulltrue);
  2191.         echo "
  2192.                 <% } else if(threadType == 'note') { %>
  2193.                     ";
  2194.         // line 1302
  2195.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("added note"), "html"nulltrue);
  2196.         echo "
  2197.                 <% } else if(threadType == 'forward') { %>
  2198.                     ";
  2199.         // line 1304
  2200.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("forwarded"), "html"nulltrue);
  2201.         echo "
  2202.                 <% } %>
  2203.                 - <a href=\"#thread/<%- id %>\" id=\"thread<%- id %>\" class=\"copy-thread-link\">#<%- id %></a>
  2204.                 </span>
  2205.             </span>
  2206.             <% if((replyTo && threadType ==  'forward') || cc || bcc) { %>
  2207.                 <div class=\"uv-ticket-strip\">
  2208.                     <% if(replyTo && threadType ==  'forward') { %>
  2209.                     <span><span class=\"uv-ticket-strip-label\">";
  2210.         // line 1313
  2211.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("TO"), "html"nulltrue);
  2212.         echo " -</span> <%- replyTo %></span>
  2213.                     <% } if(cc) { %>
  2214.                     <span><span class=\"uv-ticket-strip-label\">";
  2215.         // line 1315
  2216.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("CC"), "html"nulltrue);
  2217.         echo " -</span> <%- cc %></span>
  2218.                     <% } if(bcc) { %>
  2219.                     <span><span class=\"uv-ticket-strip-label\">";
  2220.         // line 1317
  2221.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("BCC"), "html"nulltrue);
  2222.         echo " -</span> <%- bcc %></span>
  2223.                     <% } %>
  2224.                 </div>
  2225.             <% } %>
  2226.         </div>
  2227.         <div class=\"uv-ticket-strip uv-margin-top-5\" <% if(!bookmark && !isLocked) { %>style=\"display: none\"<% } %> >
  2228.             <span <% if(!bookmark) { %>style=\"display: none\"<% } %> >
  2229.                     <span class=\"uv-icon-pinned\"></span>
  2230.                     ";
  2231.         // line 1326
  2232.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Pinned"), "html"nulltrue);
  2233.         echo "
  2234.                     </span>
  2235.             <span <% if(!isLocked) { %>style=\"display: none\"<% } %> >
  2236.                 <span class=\"uv-icon-locked\"></span>
  2237.                 ";
  2238.         // line 1330
  2239.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Locked"), "html"nulltrue);
  2240.         echo "
  2241.             </span>
  2242.         </div>
  2243.         <div class=\"uv-ticket-main-lt\">
  2244.             <span class=\"uv-thread-action\">
  2245.                 <span class=\"uv-icon-ellipsis uv-dropdown-other\"></span>
  2246.                 <div class=\"uv-dropdown-list uv-bottom-left\">
  2247.                     <div class=\"uv-dropdown-container\">
  2248.                         <ul>
  2249.                             ";
  2250.         // line 1339
  2251.         if (twig_get_attribute($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.'1339$this->source); })()), "isAccessAuthorized", [=> "ROLE_AGENT_EDIT_THREAD_NOTE"], "method"falsefalsefalse1339)) {
  2252.             // line 1340
  2253.             echo "                                <% if (userType != 'system' && userType != 'System') { %>
  2254.                                     <li data-action=\"edit\">";
  2255.             // line 1341
  2256.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Edit Thread"), "html"nulltrue);
  2257.             echo "</li>
  2258.                                 <% } %>
  2259.                             ";
  2260.         }
  2261.         // line 1344
  2262.         echo "                            ";
  2263.         if (twig_get_attribute($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.'1344$this->source); })()), "isAccessAuthorized", [=> "ROLE_AGENT_DELETE_THREAD_NOTE"], "method"falsefalsefalse1344)) {
  2264.             // line 1345
  2265.             echo "                                <li data-action=\"delete\">";
  2266.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Delete Thread"), "html"nulltrue);
  2267.             echo "</li>
  2268.                             ";
  2269.         }
  2270.         // line 1347
  2271.         echo "                            <li data-action=\"forward\">";
  2272.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Forward"), "html"nulltrue);
  2273.         echo "</li>
  2274.                             <% if(bookmark) { %>
  2275.                                 <li data-action=\"pin\" data-id=\"1\">";
  2276.         // line 1349
  2277.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Unpin Thread"), "html"nulltrue);
  2278.         echo "</li>
  2279.                             <% } else { %>
  2280.                                 <li data-action=\"pin\" data-id=\"0\">";
  2281.         // line 1351
  2282.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Pin Thread"), "html"nulltrue);
  2283.         echo "</li>
  2284.                             <% } %>
  2285.                             <% if(threadType != 'note') { %>
  2286.                                 ";
  2287.         // line 1354
  2288.         if (twig_get_attribute($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.'1354$this->source); })()), "isAccessAuthorized", [=> "ROLE_AGENT_MANAGE_LOCK_AND_UNLOCK_THREAD"], "method"falsefalsefalse1354)) {
  2289.             // line 1355
  2290.             echo "                                    <% if(isLocked) { %>
  2291.                                         <li data-action=\"lock\" data-id=\"1\">";
  2292.             // line 1356
  2293.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Unlock Thread"), "html"nulltrue);
  2294.             echo "</li>
  2295.                                     <% } else { %>
  2296.                                         <li data-action=\"lock\" data-id=\"0\">";
  2297.             // line 1358
  2298.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Lock Thread"), "html"nulltrue);
  2299.             echo "</li>
  2300.                                     <% } %>
  2301.                                 ";
  2302.         }
  2303.         // line 1361
  2304.         echo "                            <% } %>
  2305.                             <li style=\"display: none;\" data-action=\"translate\">";
  2306.         // line 1362
  2307.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Translate Thread"), "html"nulltrue);
  2308.         echo "</li>
  2309.                         </ul>
  2310.                     </div>
  2311.                 </div>
  2312.             </span>
  2313.             <span class=\"p-relative\">
  2314.                 
  2315.             </span>
  2316.             <% if (userType != 'system' && userType != 'System') { %>
  2317.                 <% if(user && user.smallThumbnail != null) { %>
  2318.                     <img src=\"";
  2319.         // line 1372
  2320.         echo twig_escape_filter($this->env, (((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'1372$this->source); })()), "request", [], "any"falsefalsefalse1372), "scheme", [], "any"falsefalsefalse1372) . "://") . twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'1372$this->source); })()), "request", [], "any"falsefalsefalse1372), "httpHost", [], "any"falsefalsefalse1372)) . $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("")), "html"nulltrue);
  2321.         echo "<%- user.smallThumbnail %>\" />
  2322.                 <% } else { %>
  2323.                     <img src=\"<% if(userType == 'agent') { %> ";
  2324.         // line 1374
  2325.         echo twig_escape_filter($this->env$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.'1374$this->source); })())), "html"nulltrue);
  2326.         echo " <% } else { %> ";
  2327.         echo twig_escape_filter($this->env$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.'1374$this->source); })())), "html"nulltrue);
  2328.         echo " <% } %>\" />
  2329.                 <% } %>
  2330.             <% } else { %>
  2331.                 <img src=\"";
  2332.         // line 1377
  2333.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl((isset($context["default_helpdesk_image_path"]) || array_key_exists("default_helpdesk_image_path"$context) ? $context["default_helpdesk_image_path"] : (function () { throw new RuntimeError('Variable "default_helpdesk_image_path" does not exist.'1377$this->source); })())), "html"nulltrue);
  2334.         echo "\" />
  2335.             <% } %>
  2336.         </div>
  2337.         <div class=\"uv-ticket-main-rt\">
  2338.             <% if(userType == 'customer') { %>
  2339.                 <a <% if(user) { %>href=\"";
  2340.         // line 1382
  2341.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_manage_customer_account");
  2342.         echo "/<%- user.id %>\"<% } %> class=\"uv-ticket-member-name\">
  2343.                 <%- fullname %>
  2344.                 </a>
  2345.             <% } else if(userType == 'agent') { %>
  2346.                 <a <% if(user) { %>href=\"";
  2347.         // line 1386
  2348.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_account");
  2349.         echo "/<%- user.id %>\"<% } %> class=\"uv-ticket-member-name\">
  2350.                 <%- fullname %>
  2351.                 </a>
  2352.             <% } else { %>
  2353.                 <span class=\"uv-ticket-member-name\">
  2354.                     <%- fullname %>
  2355.                 </span>
  2356.             <% } %>
  2357.             <!-- Message Block -->
  2358.             <div class=\"message\">
  2359.                 <%= reply %>
  2360.             </div>
  2361.             <!-- Attachment Block -->
  2362.             <% if(attachments.length) { %>
  2363.             <div class=\"uv-ticket-uploads\">
  2364.                 <h4>";
  2365.         // line 1403
  2366.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Uploaded Files"), "html"nulltrue);
  2367.         echo "</h4>
  2368.                 <div class=\"uv-ticket-uploads-strip\">
  2369.                     <% _.each(attachments, function(file) { %>
  2370.                     <a href=\"<%-file.downloadURL %>\" target =\"_blank\" class=\"uv-ticket-uploads-brick uv-no-pointer-events\" data-toggle=\"tooltip\" title=\"<%- file.name %>\">
  2371.                         <img src=\"<%-file.iconURL %>\" class=\"uv-auto-pointer-events\">
  2372.                     </a>
  2373.                     <% }) %>
  2374.                 </div>
  2375.                 <% if (attachments.length > 1) { %>
  2376.                 <div class=\"thread-attachments-zip pull-left\">
  2377.                     <div class=\"uv-upload-actions\">
  2378.                         <a href=\"#\" class=\"uv-open-in-files\" data-thread=\"<%- id %>\" style=\"display: none\"><span class=\"uv-icon-open-in-files\"></span>";
  2379.         // line 1415
  2380.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Open in Files"), "html"nulltrue);
  2381.         echo "</a>
  2382.                         <% if(attachments.length > 0) { %>
  2383.                         <a href=\"";
  2384.         // line 1417
  2385.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_ticket_download_attachment_zip");
  2386.         echo "/<%- id %>\" target=\"_blank\"><span class=\"uv-icon-attachment\"></span> ";
  2387.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Download (as .zip)"), "html"nulltrue);
  2388.         echo "</a>
  2389.                         <% } %>
  2390.                     </div>
  2391.                 </div>
  2392.                 <% } %>
  2393.             </div>
  2394.             <% } %>
  2395.         </div>
  2396.     </script>
  2397.     <script id=\"edit_thread_tmp\" type=\"text/template\">
  2398.         <div class=\"thread-edit-container\">
  2399.             <div class=\"uv-element-block uv-element-block-textarea\">
  2400.                 <div class=\"uv-field-block\">
  2401.                     <textarea id=\"uv-edit-thread\">
  2402.                     </textarea>
  2403.                 </div>
  2404.             </div>
  2405.             <div class=\"uv-action-buttons\">
  2406.                 <a class=\"uv-btn cancel-edit\" type=\"button\">";
  2407.         // line 1437
  2408.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Cancel"), "html"nulltrue);
  2409.         echo "</a>
  2410.                 <a class=\"uv-btn saveThread\" type=\"button\" style=\"margin-right: 10px;\">";
  2411.         // line 1438
  2412.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Update"), "html"nulltrue);
  2413.         echo "</a>
  2414.             </div>
  2415.         </div>
  2416.     </script>
  2417.     <script id=\"ticket_quick_navigation_tmp\" type=\"text/template\">
  2418.         <% if(prev) { %>
  2419.             <a class=\"uv-btn-stroke\" href=\"";
  2420.         // line 1445
  2421.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_ticket");
  2422.         echo "/<%- prev %>\">
  2423.                 <span class=\"uv-icon-previous\"></span>
  2424.                 ";
  2425.         // line 1447
  2426.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Previous Ticket"), "html"nulltrue);
  2427.         echo "
  2428.             </a>
  2429.         <% } else { %>
  2430.             <a class=\"uv-btn-stroke\" disabled=\"disabled\">
  2431.                 <span class=\"uv-icon-previous\"></span>
  2432.                 ";
  2433.         // line 1452
  2434.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Previous Ticket"), "html"nulltrue);
  2435.         echo "
  2436.             </a>
  2437.         <% } %>
  2438.         <% if(next) { %>
  2439.             <a class=\"uv-btn-stroke\" href=\"";
  2440.         // line 1457
  2441.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_ticket");
  2442.         echo "/<%- next %>\">
  2443.                 ";
  2444.         // line 1458
  2445.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Next Ticket"), "html"nulltrue);
  2446.         echo "
  2447.                 <span class=\"uv-icon-next\"></span>
  2448.             </a>
  2449.         <% } else { %>
  2450.             <a class=\"uv-btn-stroke\" disabled=\"disabled\">
  2451.                 ";
  2452.         // line 1463
  2453.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Next Ticket"), "html"nulltrue);
  2454.         echo "
  2455.                 <span class=\"uv-icon-next\"></span>
  2456.             </a>
  2457.         <% } %>
  2458.     </script>
  2459.     <script type=\"text/javascript\">
  2460.         uvdesk = {
  2461.             ticket: {}
  2462.         };
  2463.         var ticketApp = {};
  2464.         viewerImages = function() {
  2465.             if (typeof(\$().viewer == 'function')) {
  2466.                 \$('.uv-ticket-uploads .uv-ticket-uploads-strip').viewer({
  2467.                     'url': 'data-url',
  2468.                     'downloadBase': \"";
  2469.         // line 1480
  2470.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_ticket_download_attachment");
  2471.         echo "\",
  2472.                     'download': 'data-download',
  2473.                 });
  2474.             }
  2475.         };
  2476.         \$(function () {
  2477.             var threadIds = [];
  2478.             viewerImages();
  2479.             _.extend(Backbone.Model.prototype, Backbone.Validation.mixin);
  2480.             // Ticket Model
  2481.             var TicketModel = Backbone.Model.extend({
  2482.                 idAttribute : \"id\",
  2483.                 urlRoot : \"";
  2484.         // line 1495
  2485.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_update_ticket_attributes_xhr");
  2486.         echo "\",
  2487.                 validation: {
  2488.                     'email': [{
  2489.                         required: true,
  2490.                         msg: '";
  2491.         // line 1499
  2492.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("This field is mandatory"), "html"nulltrue);
  2493.         echo "'
  2494.                     },{
  2495.                         pattern: /^[a-zA-Z0-9.!#\$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*\$/,
  2496.                         msg: 'Please enter a valid email'
  2497.                     }],
  2498.                     'subject' : {
  2499.                         required : true,
  2500.                         msg : '";
  2501.         // line 1506
  2502.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("This field is mandatory"), "html"nulltrue);
  2503.         echo "'
  2504.                     },
  2505.                     'reply' : {
  2506.                         fn: function(value) {
  2507.                             if(!tinyMCE.get(\"uv-edit-create-thread\"))
  2508.                                 return false;
  2509.                             var html = tinyMCE.get(\"uv-edit-create-thread\").getContent();
  2510.                             if(app.appView.stripHTML(html) != '') {
  2511.                                 return false;
  2512.                             }
  2513.                             return true;
  2514.                         },
  2515.                         msg : '";
  2516.         // line 1518
  2517.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("This field is mandatory"), "html"nulltrue);
  2518.         echo "'
  2519.                     }
  2520.                 },
  2521.             });
  2522.             // Thread Model
  2523.             var ThreadModel = Backbone.Model.extend({
  2524.                 idAttribute : \"id\",
  2525.                 defaults : {
  2526.                     hasTask : 0,
  2527.                     task: null
  2528.                 }
  2529.             });
  2530.             // Customer Model
  2531.             var CustomerModel = Backbone.Model.extend({
  2532.                 validation: {
  2533.                     'name': [{
  2534.                         required: true,
  2535.                         msg: '";
  2536.         // line 1537
  2537.         echo "This field is mandatory";
  2538.         echo "'
  2539.                     }, {
  2540.                         pattern: /^((?![!@#\$%^&*()<_+]).)*\$/,
  2541.                         msg: '";
  2542.         // line 1540
  2543.         echo "This field must have characters only";
  2544.         echo "'
  2545.                     }],
  2546.                     'email': [{
  2547.                         required: true,
  2548.                         msg: '";
  2549.         // line 1544
  2550.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("This field is mandatory"), "html"nulltrue);
  2551.         echo "'
  2552.                     },{
  2553.                         pattern: /^[a-zA-Z0-9.!#\$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*\$/,
  2554.                         msg: '";
  2555.         // line 1547
  2556.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Email address is invalid"), "html"nulltrue);
  2557.         echo "'
  2558.                     }],
  2559.                     'contactNumber': function(value) {
  2560.                         if(value != undefined && value !== '') {
  2561.                             if (!value.match('^\\\\s*(?:\\\\+?(\\\\d{1,3}))?[-. (]*(\\\\d{3})[-. )]*(\\\\d{3})[-. ]*(\\\\d{4})(?: *x(\\\\d+))?\\\\s*\$'))
  2562.                                 return 'Contact number is invalid';
  2563.                         }
  2564.                     }
  2565.                 },
  2566.                 urlRoot : \"";
  2567.         // line 1556
  2568.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_manage_customer_account");
  2569.         echo "\"
  2570.             });
  2571.             // Ticket Collaborator Model
  2572.             var CollaboratorModel = Backbone.Model.extend({
  2573.                 idAttribute : \"id\",
  2574.                 validation: {
  2575.                     'email': [{
  2576.                         required: true,
  2577.                         msg: '";
  2578.         // line 1565
  2579.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("This field is mandatory"), "html"nulltrue);
  2580.         echo "'
  2581.                     },{
  2582.                         pattern: /^[a-zA-Z0-9.!#\$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*\$/,
  2583.                         msg: '";
  2584.         // line 1568
  2585.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Please enter a valid email"), "html"nulltrue);
  2586.         echo "'
  2587.                     }]
  2588.                 },
  2589.                 defaults : {
  2590.                     ticketId : ";
  2591.         // line 1572
  2592.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'1572$this->source); })()), "id", [], "any"falsefalsefalse1572), "html"nulltrue);
  2593.         echo ",
  2594.                     email: ''
  2595.                 },
  2596.                 parse: function (resp, options) {
  2597.                     return resp.collaborator;
  2598.                 },
  2599.                 urlRoot : \"";
  2600.         // line 1578
  2601.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_ticket_manage_collaborators_xhr");
  2602.         echo "\"
  2603.             });
  2604.             // Ticket Tag Model
  2605.             var TagModel = Backbone.Model.extend({
  2606.                 idAttribute : \"id\",
  2607.                 defaults : {
  2608.                     ticketId : ";
  2609.         // line 1585
  2610.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'1585$this->source); })()), "id", [], "any"falsefalsefalse1585), "html"nulltrue);
  2611.         echo "
  2612.                 },
  2613.                 parse: function (resp, options) {
  2614.                     return resp.tag;
  2615.                 },
  2616.                 urlRoot : \"";
  2617.         // line 1590
  2618.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_ticket_create_tag_xhr");
  2619.         echo "\"
  2620.             });
  2621.             // Ticket Label Model
  2622.             var LabelModel = Backbone.Model.extend({
  2623.                 idAttribute : \"id\",
  2624.                 defaults : {
  2625.                     ticketId : ";
  2626.         // line 1597
  2627.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'1597$this->source); })()), "id", [], "any"falsefalsefalse1597), "html"nulltrue);
  2628.         echo "
  2629.                 },
  2630.                 parse: function (resp, options) {
  2631.                     return resp.label;
  2632.                 },
  2633.                 urlRoot : \"";
  2634.         // line 1602
  2635.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_ticket_add_label_xhr");
  2636.         echo "\"
  2637.             });
  2638.             // Ticket Thread Collection
  2639.             var ThreadCollection = AppCollection.extend({
  2640.                 model : ThreadModel,
  2641.                 mode: \"infinite\",
  2642.                 url : \"";
  2643.         // line 1609
  2644.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_thread_collection_xhr", ["ticketId" => twig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'1609$this->source); })()), "id", [], "any"falsefalsefalse1609)]), "html"nulltrue);
  2645.         echo "\",
  2646.                 firstScrollCheck: false,
  2647.                 threadRequestedId: false,
  2648.                 template : \$(\"#thread_list_empty_tmp\").html(),
  2649.                 parseRecords: function (resp, options) {
  2650.                     return resp.threads;
  2651.                 },
  2652.                 syncData : function() {
  2653.                     type = \$(\".uv-ticket-action-bar-lt .uv-tabs .uv-tab-active\").attr('data-type')
  2654.                     var self = this;
  2655.                     var data = {
  2656.                         threadType: type
  2657.                     };
  2658.                     if(this.threadRequestedId)
  2659.                         data.threadRequestedId = this.threadRequestedId;
  2660.                     app.appView.showLoader()
  2661.                     this.fetch({
  2662.                         data : data,
  2663.                         remove: false,
  2664.                         success: function(model, response) {
  2665.                             app.appView.hideLoader();
  2666.                             self.threadRequestedId = false;
  2667.                             pagination.renderPagination(response.pagination);
  2668.                             threadCollection.state.currentPage = parseInt(response.pagination.current) + 1;
  2669.                             if(response.pagination.totalCount <= 0){
  2670.                                 this.\$('.uv-ticket-wrapper.thread-list').html(self.template);
  2671.                             }
  2672.                         },
  2673.                         error: function (model, xhr, options) {
  2674.                             if(url = xhr.getResponseHeader('Location'))
  2675.                                 window.location = url;
  2676.                         }
  2677.                     }).done(function(){
  2678.                         viewerImages();
  2679.                         if(!self.firstScrollCheck){
  2680.                             self.firstScrollCheck = true;
  2681.                             var fragment = Backbone.history.fragment.trim();
  2682.                             if(fragment == '') {
  2683.                                 router.scrollPage('#reply');
  2684.                             } else
  2685.                                 router.scrollPage('#' + fragment.replace('thread/', 'thread'));
  2686.                         }
  2687.                     });
  2688.                 }
  2689.             });
  2690.             // Ticket Collaborator Collection
  2691.             var CollaboratorCollection = Backbone.PageableCollection.extend({
  2692.                 model : CollaboratorModel
  2693.             });
  2694.             // Ticket Tag Collection
  2695.             var TagCollection = Backbone.PageableCollection.extend({
  2696.                 model : TagModel,
  2697.                 isTagExist : function(name) {
  2698.                     var flag = 1;
  2699.                     _.each(tagCollection.models, function (item) {
  2700.                         if(item.get('name').toUpperCase() == name.toUpperCase())
  2701.                             flag = 0;
  2702.                     }, this);
  2703.                     return flag;
  2704.                 }
  2705.             });
  2706.             // Ticket Label Collection
  2707.             var LabelCollection = Backbone.PageableCollection.extend({
  2708.                 model : TagModel,
  2709.                 isLabelExist : function(name) {
  2710.                     var flag = 1;
  2711.                     _.each(labelCollection.models, function (item) {
  2712.                         if(item.get('name').toUpperCase() == name.toUpperCase())
  2713.                             flag = 0;
  2714.                     }, this);
  2715.                     return flag;
  2716.                 }
  2717.             });
  2718.             // Customer Form View
  2719.             var CustomerForm = Backbone.View.extend({
  2720.                 events : {
  2721.                     'click .uv-btn.update-btn' : \"saveCustomer\",
  2722.                     'blur input': 'formChanegd',
  2723.                     'click .cancel-btn': 'backToInfo',
  2724.                     'click .uv-aside-back': 'backToInfo'
  2725.                 },
  2726.                 initialize : function() {
  2727.                     Backbone.Validation.bind(this);
  2728.                 },
  2729.                 formChanegd: function(e) {
  2730.                     this.model.set(Backbone.\$(e.currentTarget).attr('name'), Backbone.\$(e.currentTarget).val())
  2731.                     this.model.isValid([Backbone.\$(e.currentTarget).attr('name')])
  2732.                 },
  2733.                 saveCustomer: function (e) {
  2734.                     e.preventDefault();
  2735.                     currentElement = Backbone.\$(e.currentTarget);
  2736.                     this.model.clear();
  2737.                     this.model.set(this.\$el.find('form').serializeObject());
  2738.                     self = this;
  2739.                     if(this.model.isValid(true)) {
  2740.                         app.appView.showLoader();
  2741.                         currentElement.attr('disabled', 'disabled');
  2742.                         this.model.save({}, {
  2743.                             success: function (model, response, options) {
  2744.                                 app.appView.hideLoader();
  2745.                                 currentElement.removeAttr(\"disabled\");
  2746.                                 if(response.alertClass == \"success\") {
  2747.                                     app.appView.renderResponseAlert(response);
  2748.                                     \$('.uv-aside-customer-info').html(\"<span>\" + self.model.attributes.name + \"</span><span>\" + self.model.attributes.email + \"</span><span>\" + self.model.attributes.contactNumber + \"</span><span class='uv-customize'></span>\")
  2749.                                     self.backToInfo();
  2750.                                 } else if(response.errors) {
  2751.                                     self.addErrors(JSON.parse(response.errors));
  2752.                                 } else if(response.alertMessage) {
  2753.                                     app.appView.renderResponseAlert(response);
  2754.                                 }
  2755.                             },
  2756.                             error: function (model, xhr, options) {
  2757.                                 if(url = xhr.getResponseHeader('Location'))
  2758.                                     window.location = url;
  2759.                                 app.appView.hideLoader();
  2760.                                 app.appView.renderResponseAlert(warningResponse);
  2761.                             }
  2762.                         });
  2763.                     }
  2764.                 },
  2765.                 addErrors: function(jsonContext) {
  2766.                     for (var field in jsonContext) {
  2767.                         Backbone.Validation.callbacks.invalid(this, field, jsonContext[field], 'input');
  2768.                     }
  2769.                 },
  2770.                 backToInfo: function(e) {
  2771.                     if(e)
  2772.                         e.preventDefault()
  2773.                     \$('.uv-main-info-update-block').hide()
  2774.                     \$('.uv-main-info-block').show()
  2775.                 },
  2776.             });
  2777.             // Ticket View
  2778.             var TicketView = Backbone.View.extend({
  2779.                 el: \$('.uv-wrapper'),
  2780.                 stopDraftSaveFlag: 0,
  2781.                 events: {
  2782.                     'click .uv-ticket-action .uv-dropdown-list li[data-action=\"spam\"], .uv-ticket-action .uv-dropdown-list li[data-action=\"closed\"]': 'masrkSpamAndClosed',
  2783.                     'click .uv-aside-ticket-actions .uv-aside-select .uv-dropdown-list li': 'editTicketProperty',
  2784.                     'click .uv-aside-customer-info .uv-customize': 'showCustomerUpdateBlock',
  2785.                     'click .uv-ticket-head .uv-star-large': 'updateStar',
  2786.                     'click .uv-ticket-action-bar .uv-tabs li': 'filterThread',
  2787.                     'click .uv-ticket-action .uv-dropdown-list li[data-action=\"delete\"]': 'confirmRemove',
  2788.                     'click .uv-ticket-action .uv-dropdown-list li[data-action=\"lock\"]': 'lockAndUnlockThread',
  2789.                     'click .uv-element-block.collaborators .uv-btn-tag': 'removeCcCollaborator',
  2790.                     'keypress .uv-element-block.to .uv-dropdown-other': 'addToInput',
  2791.                     'click .uv-element-block.to .uv-dropdown-list li': 'addTo',
  2792.                     'click .to-list .uv-btn-tag': 'removeTo',
  2793.                     'change .uv-element-block.cc-bcc .cc-bcc-toggle': 'showCcBccBlock',
  2794.                     'keypress .uv-element-block.cc-bcc .uv-group-field.uv-dropdown-other': 'addCcBccInput',
  2795.                     'click .uv-element-block.cc-bcc .uv-dropdown-list li': 'addCcBcc',
  2796.                     'click .cc-bcc-list .uv-btn-tag, .to-list .uv-btn-tag': 'removeEmail',
  2797.                     'click .next-view .uv-dropdown-list li': 'setNextView',
  2798.                     'click .uv-dropdown.reply .uv-dropdown-list li, .uv-btn.forward': 'validateForm',
  2799.                     'click #edit-ticket-modal .uv-btn.update': 'updateTicket',
  2800.                     'click .message .uv-icon-ellipsis': 'showReplyQuote',
  2801.                     'input .uv-aside-brick .uv-field.uv-dropdown-other': 'searchFilterXhr',
  2802.                     'click .uv-dropdown-container.prepared-responses a:not(.create-new)': 'confirmPreparedResponses',
  2803.                     'click .uv-header-fix': 'fixheader',
  2804.                     'click .uv-ticket-action .uv-dropdown-list li[data-action=\"print\"]': 'printTicket',
  2805.                     'blur .uv-manual-enter': 'enterManualAdd',
  2806.                 },
  2807.                 ticketNavigationTemplate : _.template(\$(\"#ticket_quick_navigation_tmp\").html()),
  2808.                 loaderTemplate : _.template(\$(\"#loader-tmp\").html()),
  2809.                 targetPreparedResponseUrl: '',
  2810.                 initialize: function() {
  2811.                     Backbone.Validation.bind(this);
  2812.                     InitTinyMce('#uv-edit-create-thread');
  2813.                     \$('.uv-ticket-fixed-region .uv-ticket-fixed-region-rt').html(this.ticketNavigationTemplate(ticketNavigation))
  2814.                     var threadTab = localStorage.getItem(\"threadTab\");
  2815.                     if(threadTab){
  2816.                         \$('.uv-ticket-action-bar-lt .uv-tabs li').removeClass('uv-tab-active');
  2817.                         \$('.uv-ticket-action-bar-lt .uv-tabs [data-type=\"' + threadTab + '\"]').addClass('uv-tab-active');
  2818.                     }
  2819.                     nextView = localStorage.getItem(\"nextView\");
  2820.                     if(nextView) {
  2821.                         \$(\".next-view input\").val(nextView)
  2822.                         \$(\".next-view .uv-dropdown-btn\").text(\$(\"#reply .next-view .uv-dropdown-list li[data-value='\" + nextView + \"']\").text())
  2823.                     }
  2824.                     if(!localStorage.getItem('ticketTour')) {
  2825.                         \$('.uv-ticket-tour').show()
  2826.                     }
  2827.                     this.fixheaderInit();
  2828.                 },
  2829.                 printTicket: function(e) {
  2830.                     window.print();
  2831.                 },
  2832.                 enterManualAdd: function(e) {
  2833.                     var target = \$(e.target);
  2834.                     if(target.val()) {
  2835.                         var e = \$.Event(\"keypress\");
  2836.                         e.which = 13; //choose the one you want
  2837.                         target.trigger(e);
  2838.                     }
  2839.                 },
  2840.                 fixheader: function(e){
  2841.                     e.preventDefault();
  2842.                     var header = localStorage.getItem(\"fixHeader\");
  2843.                     header = !(header == 'true');
  2844.                     localStorage.setItem(\"fixHeader\", header);
  2845.                     this.fixheaderInit();
  2846.                 },
  2847.                 fixheaderInit: function(){
  2848.                     var header = localStorage.getItem(\"fixHeader\");
  2849.                     if(header == 'true'){
  2850.                         \$('a.uv-icon-pin').addClass('uv-icon-pinned');
  2851.                         \$('.uv-ticket-action-bar').addClass('uv-ticket-action-bar-fixed');
  2852.                     }else{
  2853.                         \$('a.uv-icon-pin').removeClass('uv-icon-pinned');
  2854.                         \$('.uv-ticket-action-bar').removeClass('uv-ticket-action-bar-fixed');
  2855.                     }
  2856.                 },
  2857.                 masrkSpamAndClosed: function(e) {
  2858.                     var currentElement = Backbone.\$(e.currentTarget);
  2859.                     var value = currentElement.attr('data-index');
  2860.                     \$(\".uv-aside-select .uv-dropdown-list ul.status li[data-index='\" + value + \"']\").trigger('click')
  2861.                 },
  2862.                 editTicketProperty: function(e) {
  2863.                     var currentElement = Backbone.\$(e.currentTarget);
  2864.                     var uvSelect = currentElement.parents('.uv-aside-select');
  2865.                     var field = currentElement.parent().attr('data-action');
  2866.                     var value = currentElement.attr('data-index');
  2867.                     if(uvSelect.find('.uv-aside-select-value').attr('data-id') != value) {
  2868.                         var name = currentElement.text().trim();
  2869.                         app.appView.showLoader();
  2870.                         this.model.save({attribute: field, value: value, id: this.model.id}, {
  2871.                             patch: true,
  2872.                             success: function (model, response, options) {
  2873.                                 uvSelect.find('.uv-aside-select-value').attr('data-id', value).text(name)
  2874.                                 if(field == 'priority') {
  2875.                                     uvSelect.find('.uv-list-ticket-priority').attr('style', 'background:' + currentElement.attr('data-color'));
  2876.                                 } else if(field == 'agent') {
  2877.                                     \$('.uv-ticket-strip .agent-info').show()
  2878.                                     \$('.uv-ticket-strip .agent-info .name').text(name)
  2879.                                 }
  2880.                                 app.appView.hideLoader();
  2881.                                 app.appView.renderResponseAlert(response);
  2882.                             },
  2883.                             error: function (model, xhr, options) {
  2884.                                 if(url = xhr.getResponseHeader('Location'))
  2885.                                     window.location = url;
  2886.                                 var response = warningResponse;
  2887.                                 if(xhr.responseJSON)
  2888.                                     response = xhr.responseJSON;
  2889.                                 app.appView.hideLoader();
  2890.                                 app.appView.renderResponseAlert(response);
  2891.                             }
  2892.                         });
  2893.                     }
  2894.                 },
  2895.                 showCustomerUpdateBlock: function() {
  2896.                     \$('.uv-main-info-update-block').show()
  2897.                     \$('.uv-main-info-block').hide()
  2898.                 },
  2899.                 updateStar: function(e) {
  2900.                     e.preventDefault();
  2901.                     var currentElement = Backbone.\$(e.currentTarget);
  2902.                     currentElement.toggleClass('uv-star-active')
  2903.                     this.model.save({id: this.model.id}, {
  2904.                         patch: true,
  2905.                         url : \"";
  2906.         // line 1881
  2907.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_bookmark_ticket_xhr");
  2908.         echo "\",
  2909.                         success: function (model, response, options) {
  2910.                         },
  2911.                         error: function (model, xhr, options) {
  2912.                             if(url = xhr.getResponseHeader('Location'))
  2913.                                 window.location = url;
  2914.                         }
  2915.                     });
  2916.                 },
  2917.                 filterThread: function(e) {
  2918.                     var currentElement = Backbone.\$(e.currentTarget);
  2919.                     if(type = currentElement.attr('data-type')) {
  2920.                         localStorage.setItem(\"threadTab\", type);
  2921.                         if(type != 'all')
  2922.                             \$('.uv-ticket-main.create').hide()
  2923.                         else
  2924.                             \$('.uv-ticket-main.create').show()
  2925.                         \$('.uv-ticket-wrapper.thread-list').html('')
  2926.                         models = []
  2927.                         threadCollection.each(function(model) {
  2928.                             models.push(model)
  2929.                         })
  2930.                         total = threadCollection.models.length;
  2931.                         count = 0;
  2932.                         if(total) {
  2933.                             _.each(models, function (model) {
  2934.                                 threadCollection.remove(model)
  2935.                                 count++;
  2936.                                 if(total == count) {
  2937.                                     threadCollection.reset()
  2938.                                     threadCollection.state.currentPage = 1;
  2939.                                     threadCollection.syncData()
  2940.                                 }
  2941.                             });
  2942.                         } else {
  2943.                             threadCollection.reset()
  2944.                             threadCollection.state.currentPage = 1;
  2945.                             threadCollection.syncData()
  2946.                         }
  2947.                     }
  2948.                 },
  2949.                 confirmRemove: function(e) {
  2950.                     app.appView.openConfirmModal(this);
  2951.                 },
  2952.                 removeItem : function() {
  2953.                     if(this.model.attributes.isTrashed)
  2954.                         window.location.href = \"";
  2955.         // line 1927
  2956.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_delete_ticket", ["ticketId" => twig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'1927$this->source); })()), "id", [], "any"falsefalsefalse1927)]), "html"nulltrue);
  2957.         echo "\";
  2958.                     else
  2959.                         window.location.href = \"";
  2960.         // line 1929
  2961.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_trash_ticket", ["ticketId" => twig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'1929$this->source); })()), "id", [], "any"falsefalsefalse1929)]), "html"nulltrue);
  2962.         echo "\";
  2963.                 },
  2964.                 addCCCollaborators: function() {
  2965.                     if(collaboratorCollection.length) {
  2966.                         var collaboratorContainer = \$('.uv-element-block.collaborators');
  2967.                         collaboratorContainer.find('.uv-field-block').html('');
  2968.                         collaboratorContainer.show()
  2969.                         _.each(collaboratorCollection.models, function (item) {
  2970.                             var json = item.attributes;
  2971.                             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>\")
  2972.                         }, this);
  2973.                     }
  2974.                 },
  2975.                 removeCcCollaborator: function(e) {
  2976.                     e.preventDefault()
  2977.                     Backbone.\$(e.currentTarget).parent().remove();
  2978.                     var collaboratorContainer = \$('.uv-element-block.collaborators');
  2979.                     if(!collaboratorContainer.find('.uv-btn-tag').length)
  2980.                         collaboratorContainer.hide()
  2981.                 },
  2982.                 addToInput: function(e) {
  2983.                     var inputElement = Backbone.\$(e.currentTarget);
  2984.                     var currentTab = inputElement.parents('.uv-tab-view');
  2985.                     var email = inputElement.val().trim();
  2986.                     if (e.which === 13 && email) {
  2987.                         e.preventDefault()
  2988.                         if(!this.model.preValidate({name: 'email', email: email})) {
  2989.                             inputElement.val('').trigger('input')
  2990.                             inputElement.removeClass('uv-dropdown-btn-active')
  2991.                             inputElement.siblings('.uv-dropdown-list').hide()
  2992.                             if(!currentTab.find(\".to-list input[value='\" + email + \"'].to\").length) {
  2993.                                 currentTab.find('.to-list').append(\"<span><input type='hidden' name='to[]' value='\" + email + \"' class='to'/><a class='uv-btn-tag' href='#'><span class='uv-icon-remove-dark-before'></span>\" + email + \"</span></a></span>\")
  2994.                             }
  2995.                         }
  2996.                     }
  2997.                 },
  2998.                 addTo: function(e) {
  2999.                     var currentTab = Backbone.\$(e.currentTarget).parents('.uv-tab-view');
  3000.                     var email =  Backbone.\$(e.currentTarget).attr('data-id');
  3001.                     if(!currentTab.find(\".to-list input[value='\" + email + \"'].to\").length) {
  3002.                         currentTab.find('.to-list').append(\"<span><input type='hidden' name='to[]' value='\" + email + \"' class='to'/><a class='uv-btn-tag' href='#'><span class='uv-icon-remove-dark-before'></span>\" + email + \"</span></a></span>\")
  3003.                     }
  3004.                 },
  3005.                 showCcBccBlock: function(e) {
  3006.                     var currentElement = Backbone.\$(e.currentTarget);
  3007.                     var currentTab = currentElement.parents('.uv-tab-view');
  3008.                     if(currentElement.is(':checked')) {
  3009.                         currentTab.find('.uv-element-block.cc-bcc').find('.uv-field-block').show()
  3010.                     } else {
  3011.                         currentTab.find('.uv-element-block.cc-bcc').find('.uv-field-block').hide()
  3012.                         currentTab.find('.uv-element-block .cc-bcc-list').html('')
  3013.                     }
  3014.                 },
  3015.                 addCcBccInput: function(e) {
  3016.                     var inputElement = Backbone.\$(e.currentTarget);
  3017.                     var currentTab = inputElement.parents('.uv-tab-view');
  3018.                     var email = inputElement.val().trim();
  3019.                     if (e.which === 13 && email) {
  3020.                         e.preventDefault()
  3021.                         type = currentTab.find('.cc-bcc-select option:selected').text()
  3022.                         if(!this.model.preValidate({name: 'email', email: email})) {
  3023.                             inputName = \$('.cc-bcc-select').val()
  3024.                             inputElement.val('').trigger('input')
  3025.                             inputElement.removeClass('uv-dropdown-btn-active')
  3026.                             inputElement.siblings('.uv-dropdown-list').hide()
  3027.                             if(!currentTab.find(\".cc-bcc-list input[value='\" + email + \"'].\" + inputName).length) {
  3028.                                 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><span class='uv-uppercase' style='margin-right: 4px;'>\" + type + \":</span>\" + email + \"</a></span>\")
  3029.                             }
  3030.                         }
  3031.                     }
  3032.                 },
  3033.                 addCcBcc: function(e) {
  3034.                     var currentTab = Backbone.\$(e.currentTarget).parents('.uv-tab-view');
  3035.                     var email =  Backbone.\$(e.currentTarget).attr('data-id');
  3036.                     type = currentTab.find('.cc-bcc-select option:selected').text()
  3037.                     inputName = currentTab.find('.cc-bcc-select').val()
  3038.                     if(!currentTab.find(\".cc-bcc-list input[value='\" + email + \"'].\" + inputName).length) {
  3039.                         currentTab.find('.uv-element-block.cc-bcc .uv-group-field.uv-dropdown-other').val('').trigger('input')
  3040.                         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><span class='uv-uppercase' style='margin-right: 4px;'>\" + type + \":</span>\" + email + \"</a></span>\")
  3041.                     }
  3042.                 },
  3043.                 removeEmail: function(e) {
  3044.                     e.preventDefault()
  3045.                     Backbone.\$(e.currentTarget).parent().remove();
  3046.                 },
  3047.                 setNextView: function(e) {
  3048.                     var currentElement = Backbone.\$(e.currentTarget);
  3049.                     var nextView = currentElement.attr('data-value');
  3050.                     localStorage.setItem(\"nextView\", nextView);
  3051.                     \$(\".next-view input\").val(nextView)
  3052.                     \$(\".next-view .uv-dropdown-btn\").text(currentElement.text())
  3053.                 },
  3054.                 validateForm : function(e) {
  3055.                     e.preventDefault();
  3056.                     var element = Backbone.\$(e.currentTarget);
  3057.                     formType = element.parents('.uv-tab-view.uv-tab-view-active').attr('id');
  3058.                     form = element.parents('form');
  3059.                     form.find('.reply-status').val(element.attr('data-id'));
  3060.                     form.find('.uv-field-message').remove()
  3061.                     var html = tinyMCE.get(formType + \"-area\").getContent();
  3062.                     if(app.appView.htmlText(html) != '' || -1 != html.indexOf('<img')) {
  3063.                         if(formType == 'forward') {
  3064.                             if(!form.find(\".to-list input.to\").length) {
  3065.                                 \$('.uv-element-block.to').append(\"<span class='uv-field-message'>";
  3066.         // line 2033
  3067.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("This field is mandatory"), "html"nulltrue);
  3068.         echo "</span>\")
  3069.                             } else {
  3070.                                 this.stopDraftSaveFlag = 1;
  3071.                                 app.appView.showLoader();
  3072.                                 tinyMCE.activeEditor.uploadImages(function(response) {
  3073.                                     app.appView.hideLoader();
  3074.                                     form.submit();
  3075.                                     \$('.uv-btn.forward').attr('disabled', 'disabled');
  3076.                                 });
  3077.                             }
  3078.                         } else {
  3079.                             this.stopDraftSaveFlag = 1;
  3080.                             if(localStorage) {
  3081.                                 localStorage.setItem(\"threadTab\", \"all\");
  3082.                             }
  3083.                             app.appView.showLoader();
  3084.                             tinyMCE.activeEditor.uploadImages(function(response) {
  3085.                                 app.appView.hideLoader();
  3086.                                 form.submit();
  3087.                                 \$('.uv-dropdown.reply').find('.uv-btn').attr('disabled', 'disabled');
  3088.                             });
  3089.                         }
  3090.                     } else {
  3091.                         form.find('.uv-element-block-textarea').append(\"<span class='uv-field-message'>";
  3092.         // line 2060
  3093.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("This field is mandatory"), "html"nulltrue);
  3094.         echo "</span>\");
  3095.                         if(formType == 'forward') {
  3096.                             if(!form.find(\".to-list input.to\").length) {
  3097.                                 \$('.uv-element-block.to').append(\"<span class='uv-field-message'>";
  3098.         // line 2063
  3099.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("This field is mandatory"), "html"nulltrue);
  3100.         echo "</span>\")
  3101.                             }
  3102.                         }
  3103.                     }
  3104.                 },
  3105.                 updateTicket: function(e) {
  3106.                     e.preventDefault();
  3107.                     this.model.set(\$('#edit-ticket-modal form').serializeObject());
  3108.                     if(this.model.isValid(['subject', 'reply'])) {
  3109.                         \$('#edit-ticket-modal form').find('.uv-btn').attr('disabled', 'disabled');
  3110.                         \$('#edit-ticket-modal form').submit();
  3111.                     }
  3112.                 },
  3113.                 showReplyQuote: function(e) {
  3114.                     Backbone.\$(e.currentTarget).next().toggle();
  3115.                 },
  3116.                 searchFilterXhr: _.debounce(function(e) {
  3117.                     currentElement = Backbone.\$(e.currentTarget);
  3118.                     var parent = currentElement.parent();
  3119.                     if(\$('.uv-dropdown-other.uv-dropdown-btn-active').parent().attr('id') != parent.attr('id'))
  3120.                         return;
  3121.                     parent.find(\"li:not(.uv-no-results, .uv-filter-info)\").remove();
  3122.                     parent.find(\".uv-filter-info\").show()
  3123.                     if(currentElement.val().length > 1) {
  3124.                         parent.append(this.loaderTemplate())
  3125.                         parent.find('.uv-filter-info').text(\"";
  3126.         // line 2088
  3127.         echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Searching", [], "messages");
  3128.         echo " ...\")
  3129.                         if(self.xhrReq)
  3130.                             self.xhrReq.abort();
  3131.                         self.xhrReq = \$.ajax({
  3132.                             url : \"";
  3133.         // line 2093
  3134.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_ticket_search_filter_options");
  3135.         echo "\",
  3136.                             type : 'GET',
  3137.                             data: {\"type\" : currentElement.attr('data-type'), \"query\": currentElement.val()},
  3138.                             dataType : 'json',
  3139.                             success : function(response) {
  3140.                                 self.xhrReq = 0;
  3141.                                 parent.find('.uv-loader').remove()
  3142.                                 parent.find('.uv-filter-info').text(\"";
  3143.         // line 2100
  3144.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Type atleast 2 letters"), "html"nulltrue);
  3145.         echo "\").hide();
  3146.                                 if(response.length == 0) {
  3147.                                     parent.find('.uv-no-results').show();
  3148.                                     parent.find('.uv-no-results').disabled = true;
  3149.                                 } else {
  3150.                                     parent.find('.uv-no-results').hide();
  3151.                                     _.each(response, function(item) {
  3152.                                         parent.find('.uv-dropdown-list ul').append(\"<li data-id='\" + item.id + \"'>\" + item.name + \"</li>\")
  3153.                                     });
  3154.                                 }
  3155.                             },
  3156.                             error: function (xhr) {
  3157.                                 self.xhrReq = 0;
  3158.                                 parent.find('.uv-loader').remove()
  3159.                                 parent.find('.uv-no-results').hide();
  3160.                                 parent.find('.uv-filter-info').text(\"";
  3161.         // line 2115
  3162.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Type atleast 2 letters"), "html"nulltrue);
  3163.         echo "\").show();
  3164.                                 if(url = xhr.getResponseHeader('Location'))
  3165.                                     window.location = url;
  3166.                             }
  3167.                         });
  3168.                     } else {
  3169.                         parent.find('.uv-no-results').hide();
  3170.                     }
  3171.                 },1000)
  3172.             });
  3173.             // Ticket Thread View
  3174.             var ThreadItem = Backbone.View.extend({
  3175.                 tagName : \"div\",
  3176.                 className : \"uv-ticket-main\",
  3177.                 template : _.template(\$(\"#thread_list_item_tmp\").html()),
  3178.                 editThreadTemplate : _.template(\$(\"#edit_thread_tmp\").html()),
  3179.                 events : {
  3180.                     'click .uv-thread-action .uv-dropdown-list li[data-action=\"delete\"]': 'confirmRemove',
  3181.                     'click .uv-thread-action .uv-dropdown-list li[data-action=\"lock\"]': 'lockAndUnlockThread',
  3182.                     'click .uv-thread-action .uv-dropdown-list li[data-action=\"pin\"]': 'pinThread',
  3183.                     'click .uv-thread-action .uv-dropdown-list li[data-action=\"mark\"]': 'markForTask',
  3184.                     'click .uv-thread-action .uv-dropdown-list li[data-action=\"forward\"]' : 'forwardThread',
  3185.                     'click .uv-thread-action .uv-dropdown-list li[data-action=\"edit\"]' : 'editThread',
  3186.                     'click .uv-btn.cancel-edit' : 'cancelEdit',
  3187.                     'click .uv-btn.saveThread' : 'updateThread',
  3188.                     'click .copy-thread-link' : 'copyThreadLink',
  3189.                     'blur .input-copy-thread-link': 'removeCopyThreadLink'
  3190.                 },
  3191.                 render : function () {
  3192.                     this.\$el.html(this.template(this.model.toJSON()));
  3193.                     this.\$el.addClass(\"thread-\" + this.model.id)
  3194.                     if(this.model.attributes.threadType == 'note')
  3195.                         this.\$el.addClass('uv-ticket-note')
  3196.                     return this;
  3197.                 },
  3198.                 unrender : function(response) {
  3199.                     if(response.alertMessage != undefined) {
  3200.                         var self = this;
  3201.                         ";
  3202.         // line 2157
  3203.         echo "                        threadCollection.models = threadCollection.models.filter(thread => {
  3204.                             if(thread.id == self.model.id) {
  3205.                                 return false;
  3206.                             }
  3207.                             return true;
  3208.                         });
  3209.                         this.remove();
  3210.                         threadCollection.syncData();
  3211.                         app.appView.renderResponseAlert(response);
  3212.                     }
  3213.                 },
  3214.                 confirmRemove: function(e) {
  3215.                     app.appView.openConfirmModal(this);
  3216.                 },
  3217.                 removeItem : function() {
  3218.                     self = this;
  3219.                     var index = threadIds.indexOf(this.model.id);
  3220.                     if (index > -1)
  3221.                         threadIds.splice(index, 1);
  3222.                     app.appView.showLoader();
  3223.                     this.model.destroy({
  3224.                         url : \"";
  3225.         // line 2179
  3226.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_thread_xhr");
  3227.         echo "/\" + this.model.id,
  3228.                         data : { 'ticketId' : ticketModel.attributes.id },
  3229.                         success : function (model, response, options) {
  3230.                             app.appView.hideLoader();
  3231.                             self.unrender(response);
  3232.                         },
  3233.                         error: function (model, xhr, options) {
  3234.                             if(url = xhr.getResponseHeader('Location'))
  3235.                                 window.location = url;
  3236.                             var response = warningResponse;
  3237.                             if(xhr.responseJSON)
  3238.                                 response = xhr.responseJSON;
  3239.                             app.appView.hideLoader();
  3240.                             app.appView.renderResponseAlert(response);
  3241.                         }
  3242.                     });
  3243.                 },
  3244.                 lockAndUnlockThread :function(e) {
  3245.                     self = this;
  3246.                     currentElement = Backbone.\$(e.currentTarget);
  3247.                     var isLocked = 0;
  3248.                     if(this.model.get('isLocked')) {
  3249.                         this.model.set('isLocked', 0);
  3250.                         currentElement.attr('data-id', isLocked).text(\"";
  3251.         // line 2203
  3252.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Lock Thread"), "html"nulltrue);
  3253.         echo "\");
  3254.                     } else {
  3255.                         isLocked = 1;
  3256.                         this.model.set('isLocked', 1);
  3257.                         currentElement.attr('data-id', isLocked).text(\"";
  3258.         // line 2207
  3259.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Unlock Thread"), "html"nulltrue);
  3260.         echo "\");
  3261.                     }
  3262.                     app.appView.showLoader();
  3263.                     this.model.save({
  3264.                         isLocked: isLocked,
  3265.                         id: this.model.id,
  3266.                         ticketId: ticketModel.attributes.id,
  3267.                         updateType: 'lock'
  3268.                     }, {
  3269.                         patch: true,
  3270.                         url : \"";
  3271.         // line 2217
  3272.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_thread_xhr");
  3273.         echo "/\" + this.model.id,
  3274.                         success : function (model, response, options) {
  3275.                             self.toggleThreadPropertyIcon()
  3276.                             app.appView.hideLoader();
  3277.                             app.appView.renderResponseAlert(response);
  3278.                         },
  3279.                         error: function (model, xhr, options) {
  3280.                             if(url = xhr.getResponseHeader('Location'))
  3281.                                 window.location = url;
  3282.                             var response = warningResponse;
  3283.                             if(xhr.responseJSON)
  3284.                                 response = xhr.responseJSON;
  3285.                             app.appView.hideLoader();
  3286.                             app.appView.renderResponseAlert(response);
  3287.                         }
  3288.                     });
  3289.                 },
  3290.                 pinThread :function(e) {
  3291.                     self = this;
  3292.                     currentElement = Backbone.\$(e.currentTarget);
  3293.                     var bookmark = 0;
  3294.                     if(this.model.get('bookmark')) {
  3295.                         this.model.set('bookmark', 0);
  3296.                         currentElement.attr('data-id', bookmark).text(\"";
  3297.         // line 2241
  3298.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Pin Thread"), "html"nulltrue);
  3299.         echo "\");
  3300.                     } else {
  3301.                         bookmark = 1;
  3302.                         this.model.set('bookmark', 1);
  3303.                         currentElement.attr('data-id', bookmark).text(\"";
  3304.         // line 2245
  3305.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Unpin Thread"), "html"nulltrue);
  3306.         echo "\");
  3307.                     }
  3308.                     app.appView.showLoader();
  3309.                     this.model.save({
  3310.                         bookmark: bookmark,
  3311.                         id: this.model.id,
  3312.                         ticketId: ticketModel.attributes.id,
  3313.                         updateType: 'bookmark'
  3314.                     }, {
  3315.                         patch: true,
  3316.                         url : \"";
  3317.         // line 2255
  3318.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_thread_xhr");
  3319.         echo "/\" + this.model.id,
  3320.                         success : function (model, response, options) {
  3321.                             self.toggleThreadPropertyIcon()
  3322.                             app.appView.hideLoader();
  3323.                             app.appView.renderResponseAlert(response);
  3324.                         },
  3325.                         error: function (model, xhr, options) {
  3326.                             if(url = xhr.getResponseHeader('Location'))
  3327.                                 window.location = url;
  3328.                             var response = warningResponse;
  3329.                             if(xhr.responseJSON)
  3330.                                 response = xhr.responseJSON;
  3331.                             app.appView.hideLoader();
  3332.                             app.appView.renderResponseAlert(response);
  3333.                         }
  3334.                     });
  3335.                 },
  3336.                 forwardThread : function(e) {
  3337.                     var element = Backbone.\$(e.currentTarget);
  3338.                     tinymce.get('forward-area').setContent(this.model.attributes.reply);
  3339.                     \$('#forward-area').parent().find('img').removeAttr('crossorigin');
  3340.                     \$(\".uv-tabs li[for='forward']\").trigger('click');
  3341.                     \$('.uv-ticket-scroll-region').animate({
  3342.                         scrollTop: \$('#default').outerHeight()
  3343.                     }, 'slow');
  3344.                 },
  3345.                 cancelEdit : function(e) {
  3346.                     this.initEditThread();
  3347.                     tinymce.get('uv-edit-thread').destroy()
  3348.                 },
  3349.                 editThread : function(e) {
  3350.                     \$('.thread-edit-container .cancel-edit').trigger('click');
  3351.                     this.initEditThread();
  3352.                     this.\$el.find('.message').hide().after(this.editThreadTemplate());
  3353.                     this.\$el.find('.uv-ticket-uploads').hide()
  3354.                     InitTinyMce('#uv-edit-thread');
  3355.                     tinymce.get('uv-edit-thread').setContent(this.model.attributes.reply);
  3356.                     this.\$el.find('img').removeAttr('crossorigin');
  3357.                 },
  3358.                 initEditThread: function() {
  3359.                     \$('.thread-edit-container').remove();
  3360.                     messageElement = this.\$el.find('.message');
  3361.                     messageElement.show();
  3362.                     this.\$el.find('.uv-ticket-uploads').show()
  3363.                 },
  3364.                 updateThread : function(e) {
  3365.                     e.preventDefault();
  3366.                     var currentElement = Backbone.\$(e.currentTarget);
  3367.                     parent = currentElement.parents('.thread-edit-container')
  3368.                     parent.find('.uv-field-message').remove()
  3369.                     var html = tinyMCE.get(\"uv-edit-thread\").getContent();
  3370.                     if(app.appView.stripHTML(html) != '') {
  3371.                         var self = this;
  3372.                         currentElement.attr(\"disabled\", \"disabled\");
  3373.                         this.model.set('reply', html);
  3374.                         app.appView.showLoader()
  3375.                         this.model.save({}, {
  3376.                             url : \"";
  3377.         // line 2316
  3378.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_thread_update_xhr");
  3379.         echo "/\" + this.model.id,
  3380.                             success : function (model, response, options) {
  3381.                                 app.appView.hideLoader()
  3382.                                 messageElement = self.\$el.find('.message');
  3383.                                 if(response.alertClass == 'success') {
  3384.                                     messageElement.html(self.model.attributes.reply).show();
  3385.                                     messageElement.find('.uv-icon-ellipsis').remove();
  3386.                                     messageElement.find('.helpdesk_blockquote').eq(0).before(\"<span class='uv-icon-ellipsis uv-ellipsis-mirror'></span>\").hide();
  3387.                                 }
  3388.                                 self.initEditThread();
  3389.                                 tinymce.get('uv-edit-thread').destroy()
  3390.                                 app.appView.renderResponseAlert(response);
  3391.                             },
  3392.                             error: function (model, xhr, options) {
  3393.                                 self.initEditThread();
  3394.                                 tinymce.get('uv-edit-thread').destroy()
  3395.                                 if(url = xhr.getResponseHeader('Location'))
  3396.                                     window.location = url;
  3397.                                 var response = warningResponse;
  3398.                                 if(xhr.responseJSON)
  3399.                                     response = xhr.responseJSON;
  3400.                                 app.appView.hideLoader()
  3401.                                 app.appView.renderResponseAlert(response);
  3402.                             }
  3403.                         });
  3404.                     } else {
  3405.                         this.\$el.find('.uv-element-block-textarea').append(\"<span class='uv-field-message'>";
  3406.         // line 2343
  3407.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("This field is mandatory"), "html"nulltrue);
  3408.         echo "</span>\");
  3409.                     }
  3410.                 },
  3411.                 toggleCreateTaskBar : function() {
  3412.                     if(threadIds.length) {
  3413.                         \$(\"#uv-task-view\").css('right', '0px');
  3414.                         \$(\"#uv-task-view .uv-create-task\").show()
  3415.                         \$(\"#uv-task-view .uv-task-list\").hide()
  3416.                     } else {
  3417.                         \$(\"#uv-task-view\").css('right', '-300px');
  3418.                         \$(\"#uv-task-view .uv-create-task\").hide()
  3419.                         \$(\"#uv-task-view .uv-task-list\").show()
  3420.                     }
  3421.                 },
  3422.                 copyThreadLink: function(e){
  3423.                     _.delay(function(){
  3424.                         \$(e.currentTarget).before('<input type=\"text\" class=\"input-copy-thread-link uv-field\" value=\"' + window.location.href + '\"/>');
  3425.                         \$(e.currentTarget).prev().focus().select();
  3426.                     }, 100);
  3427.                 },
  3428.                 removeCopyThreadLink: function(e){
  3429.                     \$(e.currentTarget).remove();
  3430.                 },
  3431.                 toggleThreadPropertyIcon: function(e) {
  3432.                     if(jQuery.inArray(this.model.id, threadIds) !== -1 || this.model.get('bookmark') || this.model.get('isLocked')) {
  3433.                         this.\$el.find('.uv-icon-pinned').parents('.uv-ticket-strip').show()
  3434.                     } else {
  3435.                         this.\$el.find('.uv-icon-pinned').parents('.uv-ticket-strip').hide()
  3436.                     }
  3437.                     if(jQuery.inArray(this.model.id, threadIds) !== -1)
  3438.                         this.\$el.find('.uv-icon-marked-task').parent().show()
  3439.                     else
  3440.                         this.\$el.find('.uv-icon-marked-task').parent().hide()
  3441.                     if(this.model.get('bookmark'))
  3442.                         this.\$el.find('.uv-icon-pinned').parent().show()
  3443.                     else
  3444.                         this.\$el.find('.uv-icon-pinned').parent().hide()
  3445.                     if(this.model.get('isLocked'))
  3446.                         this.\$el.find('.uv-icon-locked').parent().show()
  3447.                     else
  3448.                         this.\$el.find('.uv-icon-locked').parent().hide()
  3449.                 }
  3450.             });
  3451.             // Ticket Thread List
  3452.             var ThreadList = Backbone.View.extend({
  3453.                 el : \$(\".thread-list\"),
  3454.                 initialize : function() {
  3455.                     this.listenTo(threadCollection.fullCollection, \"add\", this.renderThread);
  3456.                 },
  3457.                 renderThread : function (item) {
  3458.                     var threadItem = new ThreadItem({
  3459.                         model: item
  3460.                     });
  3461.                     if(item.id < threadCollection.fullCollection.at(0).id)
  3462.                         this.\$el.prepend(threadItem.render().el);
  3463.                     else
  3464.                         this.\$el.append(threadItem.render().el);
  3465.                     threadItem.\$el.find('.helpdesk_blockquote').eq(0).before(\"<span class='uv-icon-ellipsis uv-ellipsis-mirror'></span>\").hide();
  3466.                     //emojifyRun();
  3467.                     this.\$el.find('img').removeAttr('crossorigin');
  3468.                     this.\$el.find('div.message a').attr('target', '_blank');
  3469.                     app.appView.relativeTime();
  3470.                 }
  3471.             });
  3472.             // Ticket Pagination View
  3473.             var Pagination = Backbone.View.extend({
  3474.                 el: \$('.uv-ticket-accordion'),
  3475.                 events: {
  3476.                     'click .uv-ticket-count-stat': 'loadMore',
  3477.                 },
  3478.                 renderPagination: function(pagination) {
  3479.                     if(pagination.totalCount - pagination.lastItemNumber > 0 && pagination.lastItemNumber > 0) {
  3480.                         var remain = pagination.totalCount - pagination.lastItemNumber;
  3481.                         \$('.uv-ticket-count-stat').text(remain)
  3482.                         \$('.uv-ticket-accordion').removeClass('uv-ticket-accordion-expanded').removeClass('uv-ticket-accordion-no-count')
  3483.                     } else {
  3484.                         \$('.uv-ticket-accordion').addClass('uv-ticket-accordion-expanded').addClass('uv-ticket-accordion-no-count')
  3485.                     }
  3486.                 },
  3487.                 loadMore: function() {
  3488.                     threadCollection.syncData();
  3489.                 }
  3490.             });
  3491.             // Ticket collaborator Item View
  3492.             var CollaboratorItem = Backbone.View.extend({
  3493.                 tagName : \"a\",
  3494.                 className: 'uv-btn-tag',
  3495.                 template : _.template(\"";
  3496.         // line 2436
  3497.         if (twig_get_attribute($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.'2436$this->source); })()), "isAccessAuthorized", [=> "ROLE_AGENT_DELETE_COLLABORATOR_FROM_TICKET"], "method"falsefalsefalse2436)) {
  3498.             echo "<span class='uv-tag'><span class='uv-icon-remove-dark-before'></span><%- name %></span>";
  3499.         } else {
  3500.             echo "<span class='uv-tag-delete'><%- name %></span>";
  3501.         }
  3502.         echo "\"),
  3503.                 events : {
  3504.                     'click .uv-tag' : 'confirmRemove'
  3505.                 },
  3506.                 render : function () {
  3507.                     this.\$el.html(this.template(this.model.toJSON()));
  3508.                     return this;
  3509.                 },
  3510.                 unrender : function(response) {
  3511.                     if(response.alertMessage != undefined) {
  3512.                         app.appView.renderResponseAlert(response);
  3513.                     }
  3514.                 },
  3515.                 removeItem: function() {
  3516.                     ";
  3517.         // line 2450
  3518.         if (twig_get_attribute($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.'2450$this->source); })()), "isAccessAuthorized", [=> "ROLE_AGENT_ADD_COLLABORATOR_TO_TICKET"], "method"falsefalsefalse2450)) {
  3519.             // line 2451
  3520.             echo "                        self = this;
  3521.                         app.appView.showLoader();
  3522.                         this.model.destroy({
  3523.                             data : { 'ticketId' : this.model.attributes.ticketId },
  3524.                             success : function (model, response, options) {
  3525.                                 app.appView.hideLoader();
  3526.                                 self.\$el.remove();
  3527.                                 self.unrender(response);
  3528.                             },
  3529.                             error: function (model, xhr, options) {
  3530.                                 if(url = xhr.getResponseHeader('Location'))
  3531.                                     window.location = url;
  3532.                                 var response = warningResponse;
  3533.                                 if(xhr.responseJSON)
  3534.                                     response = xhr.responseJSON;
  3535.                                 app.appView.hideLoader();
  3536.                                 app.appView.renderResponseAlert(response);
  3537.                             }
  3538.                         });
  3539.                     ";
  3540.         }
  3541.         // line 2472
  3542.         echo "                },
  3543.                 confirmRemove: function(e) {
  3544.                     e.preventDefault();
  3545.                     ";
  3546.         // line 2475
  3547.         if (twig_get_attribute($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.'2475$this->source); })()), "isAccessAuthorized", [=> "ROLE_AGENT_ADD_COLLABORATOR_TO_TICKET"], "method"falsefalsefalse2475)) {
  3548.             // line 2476
  3549.             echo "                        app.appView.openConfirmModal(this);
  3550.                     ";
  3551.         }
  3552.         // line 2478
  3553.         echo "                }
  3554.             });
  3555.             // Ticket Collaborator View
  3556.             var CollaboratorList = Backbone.View.extend({
  3557.                 el : \$(\".collaborator-list-block\"),
  3558.                 events : {
  3559.                     'keypress .uv-field' : 'addCollaborator',
  3560.                     'focusout .uv-field' : 'removeErrorClass'
  3561.                 },
  3562.                 initialize : function() {
  3563.                     //Backbone.Validation.bind(this);
  3564.                 },
  3565.                 render : function() {
  3566.                     this.\$el.find(\".collaborator-list\").html('');
  3567.                     var self = this;
  3568.                     collaboratorOptionHtml = '';
  3569.                     if(collaboratorCollection.length) {
  3570.                         _.each(collaboratorCollection.models, function (item) {
  3571.                             this.renderCollaborator(item);
  3572.                         }, this);
  3573.                     }
  3574.                     ticketView.addCCCollaborators()
  3575.                 },
  3576.                 renderCollaborator : function (item) {
  3577.                     var collaborator = new CollaboratorItem({
  3578.                         model: item
  3579.                     });
  3580.                     this.\$el.find('.collaborator-list').append(collaborator.render().el);
  3581.                 },
  3582.                 removeErrorClass: function(e) {
  3583.                     var inputElement = Backbone.\$(e.currentTarget);
  3584.                     inputElement.removeClass('uv-field-error');
  3585.                     inputElement.parents('.uv-element-block').find('.uv-field-message').remove()
  3586.                 },
  3587.                 addCollaborator : function(e) {
  3588.                     ";
  3589.         // line 2515
  3590.         if (twig_get_attribute($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.'2515$this->source); })()), "isAccessAuthorized", [=> "ROLE_AGENT_ADD_COLLABORATOR_TO_TICKET"], "method"falsefalsefalse2515)) {
  3591.             // line 2516
  3592.             echo "                        var inputElement = Backbone.\$(e.currentTarget);
  3593.                         inputElement.removeClass('uv-field-error');
  3594.                         inputElement.parents('.uv-element-block').find('.uv-field-message').remove()
  3595.                         var text = inputElement.val().trim();
  3596.                         if (e.which === 13 && text) {
  3597.                             this.model = new CollaboratorModel();
  3598.                             self = this;
  3599.                             this.model.set({email: text})
  3600.                             if(this.model.isValid(true)) {
  3601.                                 app.appView.showLoader();
  3602.                                 this.model.save({},{
  3603.                                     success : function (model, response, options) {
  3604.                                         inputElement.val('');
  3605.                                         if(response.alertClass == \"success\") {
  3606.                                             collaboratorCollection.add(model);
  3607.                                         }
  3608.                                         self.render();
  3609.                                         app.appView.hideLoader();
  3610.                                         app.appView.renderResponseAlert(response);
  3611.                                     },
  3612.                                     error: function (model, xhr, options) {
  3613.                                         if(url = xhr.getResponseHeader('Location'))
  3614.                                             window.location = url;
  3615.                                         var response = warningResponse;
  3616.                                         if(xhr.responseJSON)
  3617.                                             response = xhr.responseJSON;
  3618.                                         app.appView.hideLoader();
  3619.                                         app.appView.renderResponseAlert(response);
  3620.                                     }
  3621.                                 });
  3622.                             } else {
  3623.                                 inputElement.addClass('uv-field-error');
  3624.                                 if(text)
  3625.                                     inputElement.parents('.uv-element-block').append(\"<span class='uv-field-message'>";
  3626.             // line 2552
  3627.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Email address is invalid"), "html"nulltrue);
  3628.             echo "</span>\");
  3629.                             }
  3630.                         }
  3631.                     ";
  3632.         }
  3633.         // line 2556
  3634.         echo "                }
  3635.             });
  3636.             // Ticket Tag Item View
  3637.             var TagItem = Backbone.View.extend({
  3638.                 tagName : \"a\",
  3639.                 className : \"uv-btn-tag\",
  3640.                 template : _.template(\"<span class='uv-tag'>";
  3641.         // line 2564
  3642.         if (twig_get_attribute($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.'2564$this->source); })()), "isAccessAuthorized", [=> "ROLE_AGENT_DELETE_TAG"], "method"falsefalsefalse2564)) {
  3643.             echo "<span class='uv-icon-remove-dark-before'></span>";
  3644.         }
  3645.         echo "<%- name %></span>\"),
  3646.                 events : {
  3647.                     'click .uv-tag' : \"confirmRemove\"
  3648.                 },
  3649.                 render : function () {
  3650.                     this.\$el.html(this.template(this.model.toJSON()));
  3651.                     return this;
  3652.                 },
  3653.                 unrender : function(response) {
  3654.                     if(response.alertMessage != undefined) {
  3655.                         tagListView.render();
  3656.                         app.appView.renderResponseAlert(response);
  3657.                     }
  3658.                 },
  3659.                 removeItem : function () {
  3660.                     ";
  3661.         // line 2579
  3662.         if (twig_get_attribute($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.'2579$this->source); })()), "isAccessAuthorized", [=> "ROLE_AGENT_DELETE_TAG"], "method"falsefalsefalse2579)) {
  3663.             // line 2580
  3664.             echo "                    self = this;
  3665.                     app.appView.showLoader();
  3666.                     this.model.destroy({
  3667.                         data : { 'ticketId' : ticketModel.id } ,
  3668.                         success : function (model, response, options) {
  3669.                             app.appView.hideLoader();
  3670.                             self.\$el.remove();
  3671.                             self.unrender(response);
  3672.                         },
  3673.                         error: function (model, xhr, options) {
  3674.                             if(url = xhr.getResponseHeader('Location'))
  3675.                                 window.location = url;
  3676.                             var response = warningResponse;
  3677.                             if(xhr.responseJSON)
  3678.                                 response = xhr.responseJSON;
  3679.                             app.appView.hideLoader();
  3680.                             app.appView.renderResponseAlert(response);
  3681.                         }
  3682.                     });
  3683.                     ";
  3684.         }
  3685.         // line 2601
  3686.         echo "                },
  3687.                 confirmRemove: function(e) {
  3688.                     e.preventDefault();
  3689.                     ";
  3690.         // line 2604
  3691.         if (twig_get_attribute($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.'2604$this->source); })()), "isAccessAuthorized", [=> "ROLE_AGENT_DELETE_TAG"], "method"falsefalsefalse2604)) {
  3692.             // line 2605
  3693.             echo "                    app.appView.openConfirmModal(this)
  3694.                     ";
  3695.         }
  3696.         // line 2607
  3697.         echo "                }
  3698.             });
  3699.             // Ticket Tag View
  3700.             var TagList = Backbone.View.extend({
  3701.                 el : \$(\".tag-list-block\"),
  3702.                 events : {
  3703.                     'keypress .uv-field' : 'addTag',
  3704.                     'focusout .uv-field' : 'removeErrorClass',
  3705.                     'click .uv-dropdown-list li': 'addTag'
  3706.                 },
  3707.                 render : function() {
  3708.                     var self = this;
  3709.                     this.\$el.find(\".tag-list\").html('');
  3710.                     if(tagCollection.length) {
  3711.                         _.each(tagCollection.models, function (item) {
  3712.                             this.renderTag(item);
  3713.                         }, this);
  3714.                     }
  3715.                 },
  3716.                 renderTag : function (item) {
  3717.                     var tag = new TagItem({
  3718.                         model: item
  3719.                     });
  3720.                     this.\$el.find('.tag-list').append(tag.render().el);
  3721.                 },
  3722.                 addTag : function(e) {
  3723.                     ";
  3724.         // line 2634
  3725.         if (twig_get_attribute($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.'2634$this->source); })()), "isAccessAuthorized", [=> "ROLE_AGENT_ADD_TAG"], "method"falsefalsefalse2634)) {
  3726.             // line 2635
  3727.             echo "                        var currentElement = Backbone.\$(e.currentTarget);
  3728.                         if(currentElement.is('li')) {
  3729.                             var inputElement = currentElement.parents('.uv-field-block').find('.uv-dropdown-other');
  3730.                             var text = currentElement.text().trim();
  3731.                         } else {
  3732.                             var inputElement = currentElement;
  3733.                             var text = inputElement.val().trim();
  3734.                         }
  3735.                         inputElement.removeClass('uv-field-error');
  3736.                         inputElement.parents('.uv-element-block').find('.uv-field-message').remove()
  3737.                         if (currentElement.is('li') || (e.which === 13 && text)) {
  3738.                             if(text.length <= 20) {
  3739.                                 if(tagCollection.isTagExist(text)) {
  3740.                                     var self = this;
  3741.                                     inputElement.val('');
  3742.                                     this.model = new TagModel();
  3743.                                     this.model.set({name:text});
  3744.                                     self = this;
  3745.                                     app.appView.showLoader();
  3746.                                     this.model.save({}, {
  3747.                                         success: function (model, response, options) {
  3748.                                             inputElement.parent().find(\"li:not(.uv-no-results)\").remove()
  3749.                                             inputElement.parent().find(\".uv-no-results\").show()
  3750.                                             if(!currentElement.is('li')) {
  3751.                                                 inputElement.trigger('click')
  3752.                                             }
  3753.                                             if(response.alertClass == \"success\") {
  3754.                                                 tagCollection.add(model);
  3755.                                                 self.render();
  3756.                                             }
  3757.                                             app.appView.hideLoader();
  3758.                                             app.appView.renderResponseAlert(response);
  3759.                                         },
  3760.                                         error: function (model, xhr, options) {
  3761.                                             if(url = xhr.getResponseHeader('Location'))
  3762.                                                 window.location = url;
  3763.                                             var response = warningResponse;
  3764.                                             if(xhr.responseJSON)
  3765.                                                 response = xhr.responseJSON;
  3766.                                             app.appView.hideLoader();
  3767.                                             app.appView.renderResponseAlert(response);
  3768.                                         }
  3769.                                     });
  3770.                                 } else {
  3771.                                     inputElement.addClass('uv-field-error');
  3772.                                     inputElement.parents('.uv-element-block').append(\"<span class='uv-field-message'>";
  3773.             // line 2684
  3774.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Tag with same name already exist"), "html"nulltrue);
  3775.             echo "</span>\");
  3776.                                 }
  3777.                             } else {
  3778.                                 inputElement.addClass('uv-field-error');
  3779.                                 inputElement.parents('.uv-element-block').append(\"<span class='uv-field-message'>";
  3780.             // line 2688
  3781.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Text length should be less than 20 charactors"), "html"nulltrue);
  3782.             echo "</span>\");
  3783.                             }
  3784.                         }
  3785.                     ";
  3786.         }
  3787.         // line 2692
  3788.         echo "                },
  3789.                 removeErrorClass: function(e) {
  3790.                     var inputElement = Backbone.\$(e.currentTarget);
  3791.                     inputElement.removeClass('uv-field-error');
  3792.                     inputElement.parents('.uv-element-block').find('.uv-field-message').remove()
  3793.                 },
  3794.             });
  3795.             // Ticket Label Item View
  3796.             var LabelItem = Backbone.View.extend({
  3797.                 tagName : \"a\",
  3798.                 className : \"uv-btn-label\",
  3799.                 template : _.template(\"<span class='uv-tag'><span class='uv-icon-remove-before'></span><%- name %></span>\"),
  3800.                 events : {
  3801.                     'click .uv-tag' : \"confirmRemove\"
  3802.                 },
  3803.                 render : function () {
  3804.                     this.\$el.html(this.template(this.model.toJSON()));
  3805.                     return this;
  3806.                 },
  3807.                 unrender : function(response) {
  3808.                     if(response.alertMessage != undefined) {
  3809.                         labelListView.render();
  3810.                         app.appView.renderResponseAlert(response);
  3811.                     }
  3812.                 },
  3813.                 removeItem : function () {
  3814.                     self = this;
  3815.                     app.appView.showLoader();
  3816.                     this.model.destroy({
  3817.                         url : \"";
  3818.         // line 2723
  3819.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_update_ticket_attributes_xhr");
  3820.         echo "\",
  3821.                         data : { attribute :'label', 'ticketId': ticketModel.id, 'labelId': this.model.get('id') },
  3822.                         success : function (model, response, options) {
  3823.                             app.appView.hideLoader();
  3824.                             self.\$el.remove();
  3825.                             self.unrender(response);
  3826.                         },
  3827.                         error: function (model, xhr, options) {
  3828.                             if(url = xhr.getResponseHeader('Location'))
  3829.                                 window.location = url;
  3830.                             var response = warningResponse;
  3831.                             if(xhr.responseJSON)
  3832.                                 response = xhr.responseJSON;
  3833.                             app.appView.hideLoader();
  3834.                             app.appView.renderResponseAlert(response);
  3835.                         }
  3836.                     });
  3837.                 },
  3838.                 confirmRemove: function(e) {
  3839.                     e.preventDefault();
  3840.                     app.appView.openConfirmModal(this)
  3841.                 }
  3842.             });
  3843.             // Ticket Label View
  3844.             var LabelList = Backbone.View.extend({
  3845.                 el : \$(\".label-list-block\"),
  3846.                 events : {
  3847.                     'keypress .uv-field' : 'addLabel',
  3848.                     'focusout .uv-field' : 'removeErrorClass',
  3849.                     'click .uv-dropdown-list li': 'addLabel'
  3850.                 },
  3851.                 render : function() {
  3852.                     var self = this;
  3853.                     this.\$el.find(\".label-list\").html('');
  3854.                     if(labelCollection.length) {
  3855.                         _.each(labelCollection.models, function (item) {
  3856.                             this.renderLabel(item);
  3857.                         }, this);
  3858.                     }
  3859.                 },
  3860.                 renderLabel : function (item) {
  3861.                     var label = new LabelItem({
  3862.                         model: item
  3863.                     });
  3864.                     lavelItem = label.render().el;
  3865.                     \$(lavelItem).attr('style', 'background:' + item.attributes.color)
  3866.                     this.\$el.find('.label-list').append(lavelItem);
  3867.                 },
  3868.                 addLabel : function(e) {
  3869.                     var currentElement = Backbone.\$(e.currentTarget);
  3870.                     if(currentElement.is('li')) {
  3871.                         var inputElement = currentElement.parents('.uv-field-block').find('.uv-dropdown-other');
  3872.                         var text = currentElement.text().trim();
  3873.                     } else {
  3874.                         var inputElement = currentElement;
  3875.                         var text = inputElement.val().trim();
  3876.                     }
  3877.                     inputElement.removeClass('uv-field-error');
  3878.                     inputElement.parents('.uv-element-block').find('.uv-field-message').remove()
  3879.                     if (currentElement.is('li') || (e.which === 13 && text)) {
  3880.                         if(text.length <= 20) {
  3881.                             if(labelCollection.isLabelExist(text)) {
  3882.                                 var self = this;
  3883.                                 inputElement.val('');
  3884.                                 this.model = new LabelModel();
  3885.                                 this.model.set({name:text});
  3886.                                 self = this;
  3887.                                 app.appView.showLoader();
  3888.                                 this.model.save({}, {
  3889.                                     success: function (model, response, options) {
  3890.                                         inputElement.parent().find(\"li:not(.uv-no-results)\").remove()
  3891.                                         inputElement.parent().find(\".uv-no-results\").show()
  3892.                                         if(!currentElement.is('li')) {
  3893.                                             inputElement.trigger('click')
  3894.                                         }
  3895.                                         if(response.alertClass == \"success\") {
  3896.                                             labelCollection.add(model);
  3897.                                             self.render();
  3898.                                         }
  3899.                                         app.appView.hideLoader();
  3900.                                         app.appView.renderResponseAlert(response);
  3901.                                     },
  3902.                                     error: function (model, xhr, options) {
  3903.                                         if(url = xhr.getResponseHeader('Location'))
  3904.                                             window.location = url;
  3905.                                         var response = warningResponse;
  3906.                                         if(xhr.responseJSON)
  3907.                                             response = xhr.responseJSON;
  3908.                                         app.appView.hideLoader();
  3909.                                         app.appView.renderResponseAlert(response);
  3910.                                     }
  3911.                                 });
  3912.                             } else {
  3913.                                 inputElement.addClass('uv-field-error');
  3914.                                 inputElement.parents('.uv-element-block').append(\"<span class='uv-field-message'>";
  3915.         // line 2823
  3916.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Label with same name already exist"), "html"nulltrue);
  3917.         echo "</span>\");
  3918.                             }
  3919.                         } else {
  3920.                             inputElement.addClass('uv-field-error');
  3921.                             inputElement.parents('.uv-element-block').append(\"<span class='uv-field-message'>";
  3922.         // line 2827
  3923.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Text length should be less than 20 charactors"), "html"nulltrue);
  3924.         echo "</span>\");
  3925.                         }
  3926.                     }
  3927.                 },
  3928.                 removeErrorClass: function(e) {
  3929.                     var inputElement = Backbone.\$(e.currentTarget);
  3930.                     inputElement.removeClass('uv-field-error');
  3931.                     inputElement.parents('.uv-element-block').find('.uv-field-message').remove()
  3932.                 },
  3933.             });
  3934.             // Ticket Router
  3935.             var Router = Backbone.Router.extend({
  3936.                 routes: {
  3937.                     'thread/:thread' : 'threadRequestedId'
  3938.                 },
  3939.                 threadRequestedId: function(thread){
  3940.                     threadCollection.threadRequestedId = thread;
  3941.                 },
  3942.                 scrollPage : function(divId) {
  3943.                     if(\$(divId).length){
  3944.                         \$('li a[href=\"'+divId+'\"]').trigger('click');
  3945.                         \$('.uv-ticket-scroll-region').animate({
  3946.                             scrollTop: \$(divId).offset().top
  3947.                         }, 'slow');
  3948.                     } else if(divId == '#') { //scroll to last thread added
  3949.                         if(threadCollection.fullCollection.length)
  3950.                             this.scrollPage('#thread' + threadCollection.fullCollection.at(0).id);
  3951.                     }
  3952.                 }
  3953.             });
  3954.             var customerForm = new CustomerForm({
  3955.                 el : \$(\".uv-main-info-update-block\"),
  3956.                 model : new CustomerModel()
  3957.             });
  3958.             var ticketNavigation = \$.parseJSON('";
  3959.         // line 2864
  3960.         echo json_encode((isset($context["ticketNavigationIteration"]) || array_key_exists("ticketNavigationIteration"$context) ? $context["ticketNavigationIteration"] : (function () { throw new RuntimeError('Variable "ticketNavigationIteration" does not exist.'2864$this->source); })()));
  3961.         echo "');
  3962.             var ticketModel = new TicketModel({
  3963.                 id : \"";
  3964.         // line 2867
  3965.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'2867$this->source); })()), "id", [], "any"falsefalsefalse2867), "html"nulltrue);
  3966.         echo "\",
  3967.                 status : \"";
  3968.         // line 2868
  3969.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'2868$this->source); })()), "status", [], "any"falsefalsefalse2868), "id", [], "any"falsefalsefalse2868), "html"nulltrue);
  3970.         echo "\",
  3971.                 priority : \"";
  3972.         // line 2869
  3973.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'2869$this->source); })()), "priority", [], "any"falsefalsefalse2869), "id", [], "any"falsefalsefalse2869), "html"nulltrue);
  3974.         echo "\",
  3975.                 group : \"";
  3976.         // line 2870
  3977.         ((twig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'2870$this->source); })()), "supportGroup", [], "any"falsefalsefalse2870)) ? (print (twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'2870$this->source); })()), "supportGroup", [], "any"falsefalsefalse2870), "id", [], "any"falsefalsefalse2870), "html"nulltrue))) : (print ("")));
  3978.         echo "\",
  3979.                 subGroup : \"";
  3980.         // line 2871
  3981.         ((twig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'2871$this->source); })()), "supportTeam", [], "any"falsefalsefalse2871)) ? (print (twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'2871$this->source); })()), "supportTeam", [], "any"falsefalsefalse2871), "id", [], "any"falsefalsefalse2871), "html"nulltrue))) : (print ("")));
  3982.         echo "\",
  3983.                 agent : \"\",
  3984.                 profileImage : \"\",
  3985.                 isTrashed : \"";
  3986.         // line 2874
  3987.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'2874$this->source); })()), "isTrashed", [], "any"falsefalsefalse2874), "html"nulltrue);
  3988.         echo "\"
  3989.             });
  3990.             ticketApp.ticketView = ticketView = new TicketView({
  3991.                 model: ticketModel
  3992.             });
  3993.             uvdesk.ticket.model = ticketModel;
  3994.             threadCollection = new ThreadCollection();
  3995.             var threadList = new ThreadList();
  3996.             var pagination = new Pagination();
  3997.             var collaboratorCollection = new CollaboratorCollection(\$.parseJSON('";
  3998.         // line 2887
  3999.         echo json_encode(twig_get_attribute($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.'2887$this->source); })()), "getTicketCollaborators", [=> twig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'2887$this->source); })()), "id", [], "any"falsefalsefalse2887)], "method"falsefalsefalse2887));
  4000.         echo "'));
  4001.             var collaboratorList = new CollaboratorList();
  4002.             collaboratorList.render();
  4003.             var tagCollection = new TagCollection(\$.parseJSON('";
  4004.         // line 2891
  4005.         echo json_encode(twig_get_attribute($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.'2891$this->source); })()), "getTicketTagsById", [=> twig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'2891$this->source); })()), "id", [], "any"falsefalsefalse2891)], "method"falsefalsefalse2891));
  4006.         echo "'));
  4007.             var tagListView = new TagList();
  4008.             tagListView.render();
  4009.             var labelCollection = new LabelCollection(\$.parseJSON('";
  4010.         // line 2895
  4011.         echo json_encode(twig_get_attribute($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.'2895$this->source); })()), "getTicketLabels", [=> twig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'2895$this->source); })()), "id", [], "any"falsefalsefalse2895)], "method"falsefalsefalse2895));
  4012.         echo "'));
  4013.             var labelListView = new LabelList();
  4014.             labelListView.render();
  4015.             var router = new Router();
  4016.             Backbone.history.start({push_state:true});
  4017.             threadCollection.syncData();
  4018.         });
  4019.     </script>
  4020.     <script>
  4021.         var sfTinyMceNew = \$.extend({}, sfTinyMce);
  4022.         var toolbarOptions = sfTinyMce.options.toolbar;
  4023.         sfTinyMce.init({
  4024.             selector : '.uv-ticket-reply textarea',
  4025.             toolbar: toolbarOptions + ' | translate',
  4026.             mentions : getMentions(),
  4027.             images_upload_url: \"\",
  4028.             setup: function(editor) {
  4029.                 editor.on('keydown', function(e) { /** for pageup, pagedown keys **/
  4030.                     if(e.keyCode == 34 || e.keyCode == 33){
  4031.                         e.preventDefault();
  4032.                     }
  4033.                 });
  4034.                 addTranslateButton(editor);
  4035.             }
  4036.         });
  4037.         function InitTinyMce(selector) {
  4038.             let sfTinyMceNew2 = \$.extend({}, sfTinyMceNew);
  4039.             sfTinyMceNew2.init({
  4040.                 selector : selector,
  4041.                 mentions : getMentions(),
  4042.                 setup: function(editor) {
  4043.                     addTranslateButton(editor);
  4044.                 }
  4045.             });
  4046.         }
  4047.         function getMentions(){
  4048.             return {
  4049.                 delimiter: ['#'],
  4050.                 items: 15,
  4051.                 source: function(){
  4052.                     return [
  4053.                         {
  4054.                             name : \"";
  4055.         // line 2943
  4056.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Ticket Id"), "html"nulltrue);
  4057.         echo "\",
  4058.                             value : \"";
  4059.         // line 2944
  4060.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'2944$this->source); })()), "id", [], "any"falsefalsefalse2944), "html"nulltrue);
  4061.         echo "\",
  4062.                         },
  4063.                         {
  4064.                             name : \"";
  4065.         // line 2947
  4066.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Subject"), "html"nulltrue);
  4067.         echo "\",
  4068.                             value : \"";
  4069.         // line 2948
  4070.         echo twig_escape_filter($this->envtwig_replace_filter(twig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'2948$this->source); })()), "subject", [], "any"falsefalsefalse2948), ["
  4071. => " "" " => " "]), "html"nulltrue);
  4072.         echo "\",
  4073.                         },
  4074.                         {
  4075.                             name : \"";
  4076.         // line 2951
  4077.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Status"), "html"nulltrue);
  4078.         echo "\",
  4079.                             value : \"";
  4080.         // line 2952
  4081.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'2952$this->source); })()), "status", [], "any"falsefalsefalse2952), "description", [], "any"falsefalsefalse2952), "html"nulltrue);
  4082.         echo "\",
  4083.                         },
  4084.                         {
  4085.                             name : \"";
  4086.         // line 2955
  4087.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Priority"), "html"nulltrue);
  4088.         echo "\",
  4089.                             value : \"";
  4090.         // line 2956
  4091.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'2956$this->source); })()), "priority", [], "any"falsefalsefalse2956), "description", [], "any"falsefalsefalse2956)), "html"nulltrue);
  4092.         echo "\",
  4093.                         },
  4094.                         {
  4095.                             name : \"";
  4096.         // line 2959
  4097.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Type"), "html"nulltrue);
  4098.         echo "\",
  4099.                             value : \"";
  4100.         // line 2960
  4101.         echo twig_escape_filter($this->env, ((twig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'2960$this->source); })()), "type", [], "any"falsefalsefalse2960)) ? (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'2960$this->source); })()), "type", [], "any"falsefalsefalse2960), "description", [], "any"falsefalsefalse2960)) : ($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Not Assigned"))), "html"nulltrue);
  4102.         echo "\",
  4103.                         },
  4104.                         {
  4105.                             name : \"";
  4106.         // line 2963
  4107.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Group"), "html"nulltrue);
  4108.         echo "\",
  4109.                             value : \"";
  4110.         // line 2964
  4111.         echo twig_escape_filter($this->env, ((twig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'2964$this->source); })()), "supportGroup", [], "any"falsefalsefalse2964)) ? (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'2964$this->source); })()), "supportGroup", [], "any"falsefalsefalse2964), "description", [], "any"falsefalsefalse2964)) : ($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Not Assigned"))), "html"nulltrue);
  4112.         echo "\",
  4113.                         },
  4114.                         {
  4115.                             name : \"";
  4116.         // line 2967
  4117.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Team"), "html"nulltrue);
  4118.         echo "\",
  4119.                             value : \"";
  4120.         // line 2968
  4121.         echo twig_escape_filter($this->env, ((twig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'2968$this->source); })()), "supportTeam", [], "any"falsefalsefalse2968)) ? (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'2968$this->source); })()), "supportTeam", [], "any"falsefalsefalse2968), "description", [], "any"falsefalsefalse2968)) : ($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Not Assigned"))), "html"nulltrue);
  4122.         echo "\",
  4123.                         },
  4124.                         {
  4125.                             name : \"";
  4126.         // line 2971
  4127.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Customer Name"), "html"nulltrue);
  4128.         echo "\",
  4129.                             value : \"";
  4130.         // line 2972
  4131.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["customer"]) || array_key_exists("customer"$context) ? $context["customer"] : (function () { throw new RuntimeError('Variable "customer" does not exist.'2972$this->source); })()), "name", [], "any"falsefalsefalse2972), "html"nulltrue);
  4132.         echo "\",
  4133.                         },
  4134.                         {
  4135.                             name : \"";
  4136.         // line 2975
  4137.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Customer Email"), "html"nulltrue);
  4138.         echo "\",
  4139.                             value : \"";
  4140.         // line 2976
  4141.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["customer"]) || array_key_exists("customer"$context) ? $context["customer"] : (function () { throw new RuntimeError('Variable "customer" does not exist.'2976$this->source); })()), "email", [], "any"falsefalsefalse2976), "html"nulltrue);
  4142.         echo "\",
  4143.                         },
  4144.                         {
  4145.                             name : \"";
  4146.         // line 2979
  4147.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Agent Name"), "html"nulltrue);
  4148.         echo "\",
  4149.                             value : \"";
  4150.         // line 2980
  4151.         echo twig_escape_filter($this->env, ((twig_get_attribute($this->env$this->source, ($context["ticketAgent"] ?? null), "name", [], "any"truetruefalse2980)) ? (twig_get_attribute($this->env$this->source, (isset($context["ticketAgent"]) || array_key_exists("ticketAgent"$context) ? $context["ticketAgent"] : (function () { throw new RuntimeError('Variable "ticketAgent" does not exist.'2980$this->source); })()), "name", [], "any"falsefalsefalse2980)) : ($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Not Assigned"))), "html"nulltrue);
  4152.         echo "\",
  4153.                         },
  4154.                         {
  4155.                             name : \"";
  4156.         // line 2983
  4157.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Agent Email"), "html"nulltrue);
  4158.         echo "\",
  4159.                             value : \"";
  4160.         // line 2984
  4161.         echo twig_escape_filter($this->env, ((twig_get_attribute($this->env$this->source, ($context["ticketAgent"] ?? null), "email", [], "any"truetruefalse2984)) ? (twig_get_attribute($this->env$this->source, (isset($context["ticketAgent"]) || array_key_exists("ticketAgent"$context) ? $context["ticketAgent"] : (function () { throw new RuntimeError('Variable "ticketAgent" does not exist.'2984$this->source); })()), "email", [], "any"falsefalsefalse2984)) : ($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Not Assigned"))), "html"nulltrue);
  4162.         echo "\",
  4163.                         }
  4164.                     ];
  4165.                 },
  4166.                 insert: function(item) {
  4167.                     return '<span>' + item.value + '</span>';
  4168.                 }
  4169.             };
  4170.         }
  4171.     </script>
  4172. ";
  4173.         
  4174.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  4175.         
  4176.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  4177.     }
  4178.     public function getTemplateName()
  4179.     {
  4180.         return "@UVDeskCoreFramework/ticket.html.twig";
  4181.     }
  4182.     public function isTraitable()
  4183.     {
  4184.         return false;
  4185.     }
  4186.     public function getDebugInfo()
  4187.     {
  4188.         return array (  4389 => 2984,  4385 => 2983,  4379 => 2980,  4375 => 2979,  4369 => 2976,  4365 => 2975,  4359 => 2972,  4355 => 2971,  4349 => 2968,  4345 => 2967,  4339 => 2964,  4335 => 2963,  4329 => 2960,  4325 => 2959,  4319 => 2956,  4315 => 2955,  4309 => 2952,  4305 => 2951,  4298 => 2948,  4294 => 2947,  4288 => 2944,  4284 => 2943,  4233 => 2895,  4226 => 2891,  4219 => 2887,  4203 => 2874,  4197 => 2871,  4193 => 2870,  4189 => 2869,  4185 => 2868,  4181 => 2867,  4175 => 2864,  4135 => 2827,  4128 => 2823,  4025 => 2723,  3992 => 2692,  3985 => 2688,  3978 => 2684,  3927 => 2635,  3925 => 2634,  3896 => 2607,  3892 => 2605,  3890 => 2604,  3885 => 2601,  3862 => 2580,  3860 => 2579,  3840 => 2564,  3830 => 2556,  3823 => 2552,  3785 => 2516,  3783 => 2515,  3744 => 2478,  3740 => 2476,  3738 => 2475,  3733 => 2472,  3710 => 2451,  3708 => 2450,  3687 => 2436,  3591 => 2343,  3561 => 2316,  3497 => 2255,  3484 => 2245,  3477 => 2241,  3450 => 2217,  3437 => 2207,  3430 => 2203,  3403 => 2179,  3379 => 2157,  3335 => 2115,  3317 => 2100,  3307 => 2093,  3299 => 2088,  3271 => 2063,  3265 => 2060,  3235 => 2033,  3128 => 1929,  3123 => 1927,  3074 => 1881,  2799 => 1609,  2789 => 1602,  2781 => 1597,  2771 => 1590,  2763 => 1585,  2753 => 1578,  2744 => 1572,  2737 => 1568,  2731 => 1565,  2719 => 1556,  2707 => 1547,  2701 => 1544,  2694 => 1540,  2688 => 1537,  2666 => 1518,  2651 => 1506,  2641 => 1499,  2634 => 1495,  2616 => 1480,  2596 => 1463,  2588 => 1458,  2584 => 1457,  2576 => 1452,  2568 => 1447,  2563 => 1445,  2553 => 1438,  2549 => 1437,  2524 => 1417,  2519 => 1415,  2504 => 1403,  2484 => 1386,  2477 => 1382,  2469 => 1377,  2461 => 1374,  2456 => 1372,  2443 => 1362,  2440 => 1361,  2434 => 1358,  2429 => 1356,  2426 => 1355,  2424 => 1354,  2418 => 1351,  2413 => 1349,  2407 => 1347,  2401 => 1345,  2398 => 1344,  2392 => 1341,  2389 => 1340,  2387 => 1339,  2375 => 1330,  2368 => 1326,  2356 => 1317,  2351 => 1315,  2346 => 1313,  2334 => 1304,  2329 => 1302,  2324 => 1300,  2312 => 1291,  2280 => 1262,  2274 => 1259,  2270 => 1258,  2264 => 1256,  2254 => 1255,  2242 => 1252,  2239 => 1251,  2226 => 1240,  2220 => 1238,  2214 => 1236,  2212 => 1235,  2207 => 1233,  2199 => 1228,  2194 => 1226,  2188 => 1224,  2183 => 1221,  2178 => 1218,  2175 => 1217,  2165 => 1208,  2162 => 1184,  2157 => 1162,  2148 => 1155,  2138 => 1147,  2133 => 1145,  2129 => 1144,  2125 => 1143,  2121 => 1142,  2116 => 1141,  2114 => 1140,  2110 => 1139,  2105 => 1137,  2098 => 1133,  2088 => 1126,  2084 => 1125,  2079 => 1123,  2073 => 1120,  2064 => 1114,  2056 => 1109,  2051 => 1107,  2043 => 1104,  2038 => 1102,  2035 => 1101,  2032 => 1100,  2024 => 1094,  2015 => 1088,  2011 => 1087,  2006 => 1085,  2000 => 1082,  1991 => 1076,  1983 => 1071,  1978 => 1069,  1966 => 1060,  1962 => 1059,  1955 => 1055,  1952 => 1054,  1941 => 1051,  1936 => 1050,  1932 => 1049,  1926 => 1046,  1903 => 1026,  1900 => 1025,  1889 => 1022,  1884 => 1021,  1880 => 1020,  1873 => 1016,  1864 => 1010,  1854 => 1003,  1846 => 1000,  1841 => 998,  1838 => 997,  1828 => 988,  1823 => 986,  1819 => 985,  1815 => 984,  1811 => 983,  1806 => 982,  1804 => 981,  1800 => 980,  1795 => 978,  1789 => 975,  1779 => 968,  1775 => 967,  1770 => 965,  1764 => 962,  1754 => 955,  1745 => 949,  1740 => 947,  1728 => 938,  1724 => 937,  1717 => 933,  1714 => 932,  1703 => 929,  1698 => 928,  1694 => 927,  1687 => 923,  1666 => 905,  1659 => 903,  1654 => 901,  1651 => 900,  1646 => 896,  1640 => 894,  1638 => 893,  1634 => 892,  1630 => 891,  1624 => 888,  1617 => 884,  1612 => 881,  1601 => 872,  1594 => 867,  1590 => 865,  1586 => 863,  1578 => 861,  1576 => 860,  1570 => 859,  1567 => 858,  1565 => 857,  1561 => 855,  1552 => 852,  1545 => 851,  1541 => 850,  1536 => 848,  1533 => 847,  1530 => 846,  1525 => 842,  1519 => 840,  1513 => 838,  1511 => 837,  1507 => 835,  1504 => 833,  1501 => 832,  1495 => 830,  1485 => 828,  1482 => 827,  1472 => 825,  1470 => 824,  1463 => 820,  1457 => 816,  1449 => 814,  1446 => 813,  1444 => 812,  1437 => 810,  1429 => 809,  1422 => 804,  1415 => 799,  1411 => 798,  1407 => 797,  1403 => 795,  1393 => 793,  1391 => 792,  1385 => 791,  1374 => 787,  1370 => 786,  1361 => 780,  1354 => 776,  1350 => 774,  1340 => 765,  1333 => 760,  1326 => 755,  1319 => 750,  1313 => 748,  1311 => 747,  1308 => 746,  1303 => 744,  1298 => 743,  1296 => 742,  1291 => 740,  1288 => 739,  1282 => 737,  1280 => 736,  1272 => 730,  1269 => 729,  1264 => 726,  1260 => 725,  1256 => 724,  1252 => 723,  1247 => 722,  1243 => 719,  1237 => 714,  1231 => 712,  1225 => 711,  1216 => 704,  1207 => 698,  1203 => 697,  1198 => 695,  1192 => 691,  1190 => 690,  1185 => 688,  1180 => 685,  1173 => 679,  1167 => 676,  1164 => 675,  1162 => 674,  1157 => 672,  1152 => 669,  1138 => 657,  1134 => 656,  1129 => 654,  1120 => 648,  1115 => 645,  1108 => 639,  1102 => 636,  1099 => 635,  1094 => 632,  1083 => 630,  1079 => 629,  1075 => 628,  1068 => 624,  1063 => 622,  1056 => 618,  1051 => 617,  1049 => 616,  1044 => 614,  1041 => 613,  1036 => 609,  1030 => 606,  1027 => 605,  1022 => 602,  1011 => 600,  1007 => 599,  1002 => 597,  995 => 593,  990 => 591,  983 => 587,  978 => 586,  976 => 585,  971 => 583,  968 => 582,  963 => 578,  957 => 575,  954 => 574,  949 => 571,  938 => 569,  934 => 568,  926 => 563,  921 => 561,  912 => 558,  910 => 557,  905 => 555,  902 => 554,  897 => 550,  891 => 548,  885 => 544,  874 => 542,  870 => 541,  865 => 539,  856 => 536,  854 => 535,  849 => 533,  846 => 532,  841 => 528,  835 => 525,  832 => 524,  826 => 520,  813 => 518,  809 => 517,  804 => 515,  795 => 512,  793 => 511,  789 => 510,  784 => 508,  781 => 507,  776 => 503,  770 => 501,  765 => 498,  754 => 495,  749 => 494,  745 => 493,  737 => 488,  732 => 486,  723 => 483,  720 => 482,  718 => 481,  713 => 479,  710 => 478,  706 => 475,  703 => 473,  695 => 468,  689 => 465,  685 => 464,  677 => 459,  672 => 457,  664 => 452,  659 => 450,  651 => 445,  646 => 443,  640 => 440,  632 => 435,  628 => 434,  624 => 432,  621 => 431,  614 => 425,  608 => 423,  602 => 421,  600 => 420,  595 => 419,  593 => 418,  589 => 417,  582 => 413,  578 => 412,  571 => 408,  567 => 407,  563 => 405,  558 => 401,  554 => 399,  552 => 398,  549 => 397,  543 => 395,  541 => 394,  537 => 393,  533 => 392,  528 => 389,  522 => 387,  515 => 385,  513 => 384,  508 => 382,  505 => 381,  502 => 379,  493 => 374,  485 => 371,  475 => 367,  472 => 365,  462 => 364,  266 => 177,  216 => 130,  90 => 6,  80 => 5,  61 => 3,  38 => 1,);
  4189.     }
  4190.     public function getSourceContext()
  4191.     {
  4192.         return new Source("{% extends \"@UVDeskCoreFramework//Templates//layout.html.twig\" %}
  4193. {% block title %}{{ '#' ~ ticket.id ~ ' ' ~ ticket.subject }}{% endblock %}
  4194. {% block templateCSS %}
  4195.     <style>
  4196.         .uv-aside-ticket-labels.label-list-block .uv-btn-label {
  4197.             cursor: pointer;
  4198.         }
  4199.         .uv-main-info-update-block .uv-element-block {
  4200.             margin: 10px 0px !important;
  4201.         }
  4202.         .uv-tab-ellipsis {
  4203.             position: relative;
  4204.         }
  4205.         .uv-inner-section .uv-view .uv-ticket-section .uv-ticket-accordion .uv-ticket-wrapper {
  4206.             display: block;
  4207.         }
  4208.         .uv-element-block.cc-bcc .uv-dropdown-container {
  4209.             padding: 10px 20px 10px 20px;
  4210.         }
  4211.         .uv-action-buttons .uv-dropdown-list ul li {
  4212.             padding: 5px 0px !important;
  4213.         }
  4214.         .uv-action-buttons{
  4215.             margin-bottom: 40px !important;
  4216.         }
  4217.         .uv-ticket-reply .uv-element-block-textarea, .thread-edit-container .uv-element-block-textarea {
  4218.             width: 100% !important;
  4219.             max-width: 100% !important;
  4220.         }
  4221.         .thread-edit-container .uv-field-message {
  4222.             color: #FF5656 !important;
  4223.         }
  4224.         .uv-element-block .mce-tinymce {
  4225.             margin-top: 10px;
  4226.         }
  4227.         .uv-ticket-reply .uv-element-block-textarea .uv-field-message, .thread-edit-container .uv-element-block-textarea .uv-field-message {
  4228.             margin-top: 15px;
  4229.         }
  4230.         .thread-edit-container {
  4231.             margin-top: 10px;
  4232.         }
  4233.         .uv-ticket-viewer-bar{
  4234.             transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  4235.             position: relative;
  4236.             overflow: hidden;
  4237.             height: 0px;
  4238.         }
  4239.         .uv-ticket-viewer-bar.active{
  4240.             height: 50px;
  4241.             margin-bottom: 10px;
  4242.             border-bottom: 1px dotted #f97278;
  4243.         }
  4244.         .uv-ticket-viewer-single {
  4245.             display: inline-block;
  4246.             margin-right: 5px;
  4247.         }
  4248.         .uv-ticket-viewer-single img {
  4249.             width: 40px;
  4250.             border-radius: 3px;
  4251.             display: inline-block;
  4252.             vertical-align: middle;
  4253.         }
  4254.         .uv-ticket-viewer-single.uv-first {
  4255.             width: 40px;
  4256.             height: 40px;
  4257.             background-image: linear-gradient(to right, #f97278 0%, #f181bf 100%);
  4258.             text-align: center;
  4259.             vertical-align: top;
  4260.             line-height: 30px;
  4261.             border-radius: 20px;
  4262.         }
  4263.         .uv-ticket-viewer-close {
  4264.             position: absolute;
  4265.             top: 0px;
  4266.             width: 40px;
  4267.             height: 40px;
  4268.             background: #f1f1f1;
  4269.             text-align: center;
  4270.             line-height: 35px;
  4271.             border-radius: 2px;
  4272.             opacity: .6;
  4273.             text-indent: 6px;
  4274.         }
  4275.         .uv-ticket-viewer-list {
  4276.             display: inline;
  4277.         }
  4278.         span.viewer-firstletter.img-thumbnail {
  4279.             width: 40px;
  4280.             height: 40px;
  4281.             display: block;
  4282.             text-align: center;
  4283.             font-size: 20px;
  4284.             font-style: italic;
  4285.             border: 1px dotted;
  4286.             border-radius: 4px;
  4287.             line-height: 35px;
  4288.         }
  4289.         .uv-ticket-viewer-close {
  4290.             display:none;
  4291.         }
  4292.         .uv-ticket-viewer-single:hover .uv-ticket-viewer-close {
  4293.             display: block;
  4294.         }
  4295.         .uv-hide{
  4296.             display: none;
  4297.         }
  4298.         .uv-info{
  4299.             background: #7C70F4;
  4300.         }
  4301.         .uv-ticket-viewer-list .uv-icon-eye-light{
  4302.             animation: jelly 0.8s infinite alternate ease-in-out;
  4303.         }
  4304.         .uv-aside-brick .uv-loader {
  4305.             position: absolute;
  4306.             transform: scale(0.5);
  4307.             top: 22px;
  4308.             right: 45px;
  4309.         }
  4310.         .uv-app-glyph-customfields {
  4311.             width: 20px;
  4312.             height: 20px;
  4313.             background-position: center center;
  4314.             background-repeat: no-repeat;
  4315.             cursor: pointer;
  4316.             display: inline-block;
  4317.             vertical-align: middle;
  4318.             margin: 5px 0px 5px 10px;
  4319.             background-image: url(\"{{ asset('bundles/uvdeskcoreframework/images/app-glyph-custom.svg') }}\");
  4320.         }
  4321.         .uv-no-threads {
  4322.             padding: 80px 20px;
  4323.             text-align: center;
  4324.         }
  4325.         .uv-ticket-strip-label {
  4326.             position: relative;
  4327.         }
  4328.         input.input-copy-thread-link {
  4329.             position: absolute;
  4330.             bottom: 10px;
  4331.             width: 400px;
  4332.         }
  4333.         .uv-ticket-action-bar-fixed{
  4334.             position: fixed;
  4335.             width: 100%;
  4336.             background: #fff;
  4337.             z-index: 999;
  4338.         }
  4339.         .uv-ticket-action-bar-fixed .uv-ticket-action-bar-rt{
  4340.             position: fixed;
  4341.             right: 0px;
  4342.             margin-top: 10px;
  4343.         }
  4344.         .uv-ticket-action-bar-fixed + .uv-ticket-viewer-bar{
  4345.             margin-top: 70px;
  4346.         }
  4347.         .uv-ticket-main {
  4348.             word-wrap: break-word;
  4349.         }
  4350.         @media only screen and (max-width: 900px) {
  4351.             .uv-ticket-action-bar-fixed{
  4352.                 position: relative;
  4353.             }
  4354.             .uv-ticket-action-bar-fixed + .uv-ticket-viewer-bar{
  4355.                 margin-top: 0px;
  4356.             }
  4357.             .uv-ticket-action-bar-fixed .uv-ticket-action-bar-rt{
  4358.                 position: relative;
  4359.             }
  4360.         }
  4361.         .uv-icon-pin {
  4362.             width: 18px;
  4363.             height: 18px;
  4364.             display: inline-block;
  4365.             vertical-align: middle;
  4366.             background-image: url(\"{{ asset('bundles/uvdeskcoreframework/images/uvdesk-sprite.svg') }}\");
  4367.             background-position: 0px -396px;
  4368.             transition: transform .15s;
  4369.             transform: scale(1);
  4370.         }
  4371.         .uv-icon-pinned {
  4372.             background-position: -19px -396px;
  4373.         }
  4374.         .uv-header-fix{
  4375.             display: inline-block;
  4376.             margin: 0px 10px 0px 5px;
  4377.         }
  4378.         .uv-header-fix + .uv-tabs{
  4379.             display: inline-block;
  4380.         }
  4381.         .uv-ticket-section span.uv-mail-status {
  4382.             width: 16px;
  4383.             height: 16px;
  4384.             background: url('../../../../../bundles/webkuldefault/images/mail-status.png');
  4385.             cursor: help;
  4386.         }
  4387.         .uv-ticket-section .uv-mail-status.uv-mail-processed {
  4388.             background-position: 0 0;
  4389.         }
  4390.         .uv-ticket-section .uv-mail-status.uv-mail-open,.uv-ticket-section .uv-mail-status.uv-mail-delivered,.uv-ticket-section .uv-mail-status.uv-mail-click {
  4391.             background-position: -38px 0;
  4392.         }
  4393.         .uv-ticket-section .uv-mail-status.uv-mail-spam,.uv-ticket-section .uv-mail-status.uv-mail-deferred,.uv-ticket-section .uv-mail-spamreport {
  4394.             background-position: -55px 0;
  4395.         }
  4396.         .uv-ticket-section .uv-mail-status.uv-mail-bounce,.uv-ticket-section .uv-mail-status.uv-mail-dropped {
  4397.             background-position: -73px 0;
  4398.         }
  4399.         @media only screen and (max-width: 1480px) {
  4400.             .uv-inner-section .uv-view .uv-ticket-action-bar-fixed.uv-ticket-action-bar .uv-ticket-action-bar-rt{
  4401.                 width: auto;
  4402.             }
  4403.         }
  4404.         @media only screen and (max-width: 1300px) {
  4405.             .uv-header-fix{
  4406.                 margin: 0px 10px 0px 10px;
  4407.             }
  4408.         }
  4409.         @media only screen and (max-width: 900px) {
  4410.             .uv-ticket-action-bar-fixed{
  4411.                 position: relative;
  4412.             }
  4413.             .uv-ticket-action-bar-fixed + .uv-ticket-viewer-bar{
  4414.                 margin-top: 0px;
  4415.             }
  4416.             .uv-ticket-action-bar-fixed .uv-ticket-action-bar-rt{
  4417.                 position: relative;
  4418.             }
  4419.             .uv-inner-section .uv-view .uv-ticket-action-bar.uv-ticket-action-bar-fixed .uv-ticket-action-bar-lt{
  4420.                 width: 70%;
  4421.             }
  4422.             .uv-inner-section .uv-view .uv-ticket-action-bar.uv-ticket-action-bar-fixed .uv-ticket-action-bar-rt {
  4423.                 width: 21%;
  4424.                 padding-right: 33px;
  4425.             }
  4426.             .uv-header-fix{
  4427.                 display: none;
  4428.             }
  4429.         }
  4430.         .uv-inner-section .uv-view .uv-ticket-scroll-region {
  4431.             margin-bottom: 0px;
  4432.         }
  4433.         .uv-inner-section .uv-view .uv-ticket-action-bar.uv-ticket-action-bar-fixed .uv-ticket-action-bar-rt {
  4434.             width: 21%;
  4435.             padding-right: 33px;
  4436.         }
  4437.         @media print {
  4438.             .uv-navbar,.uv-ticket-action-bar, .uv-sidebar, .uv-aside>.uv-aside-brick, .uv-aside-back, .uv-ticket-fixed-region, .uv-ticket-main.uv-ticket-reply, .uv-upload-actions, .uv-filter-view, .uv-dropdown-list>.uv-dropdown-container,.uv-notifications-wrapper,.uv-pop-up-overlay,.uv-loader-view, .uv-loader, .uv-navbar,.uv-ticket-count-wrapper {
  4439.                 display: none !important;
  4440.             }
  4441.             .uv-ticket-scroll-region {
  4442.                 overflow: visible;
  4443.                 margin-bottom: 0 !important;
  4444.             }
  4445.             .uv-paper {
  4446.                 padding-left: 0px !important; /* uv-view */
  4447.             }
  4448.             .uv-wrapper {
  4449.                 left: 0 !important;
  4450.                 margin: 0 !important;
  4451.             }
  4452.             .uv-inner-section .uv-view .uv-ticket-scroll-region  .uv-ticket-main-rt {
  4453.                 width: 80%;
  4454.             }
  4455.             .uv-paper,.uv-view ,.uv-ticket-scroll-region, .uv-wrapper  {
  4456.                 position: initial !important;
  4457.             }
  4458.         }
  4459.         .uv-ticket-action-bar-rt .app-glyph {
  4460.             display: inline-block;
  4461.             vertical-align: middle;
  4462.             margin-right: 10px;
  4463.             cursor: pointer;
  4464.             height: 20px;
  4465.             width: 20px;
  4466.         }
  4467.         .uv-ticket-action-bar-rt .app-glyph:last-child {
  4468.             margin-right: 0px;
  4469.         }
  4470.         blockquote {
  4471.             background: #f9f9f9;
  4472.             border-left: 4px solid #ccc;
  4473.             margin: 1.5em 10px;
  4474.             padding: 0.5em 10px;
  4475.             quotes: \"\\201C\"\"\\201D\"\"\\2018\"\"\\2019\";
  4476.         }
  4477.         blockquote:before {
  4478.             color: #ccc;
  4479.             content: open-quote;
  4480.             font-size: 3em;
  4481.             line-height: 0.1em;
  4482.             margin-right: 0.05em;
  4483.             vertical-align: -0.4em;
  4484.         }
  4485.         blockquote p {
  4486.             display: inline;
  4487.         }
  4488.         .uv-dropdown-list ul li {
  4489.             padding : 8px 0px !important;
  4490.         }
  4491.         ::-webkit-scrollbar {
  4492.             width: 6px;
  4493.         }
  4494.         ::-webkit-scrollbar-track {
  4495.             -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
  4496.         }
  4497.         ::-webkit-scrollbar-thumb {
  4498.             -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
  4499.         }
  4500.         .uv-aside-select.search .uv-dropdown-list.uv-bottom-left, .uv-aside-select .uv-dropdown-list.uv-bottom-right {
  4501.             top: 25px;
  4502.             width: 100%;
  4503.         }
  4504.         .uv-aside-select.search .uv-dropdown-list ul{
  4505.             padding: 0px 10px;
  4506.         }
  4507.         .uv-aside-select.search .uv-dropdown-container {
  4508.             padding: 8px 10px 4px;
  4509.             overflow-y: auto;
  4510.             max-height: 280px;
  4511.             border-bottom: solid 1px #D3D3D3;
  4512.         }
  4513.         .uv-aside-select.search .uv-dropdown-list ul.uv-agents-list li {
  4514.             border-bottom: solid 1px #D3D3D3;
  4515.             border-top:0px;
  4516.         }
  4517.         .uv-search-inline{
  4518.             width: 100%;
  4519.         }
  4520.         .uv-dropdown-list ul.uv-search-list li:first-child {
  4521.             border-top: none;
  4522.         }
  4523.         .uv-search-sm input.uv-search-field { 
  4524.            border: solid 1px #B1B1AE;
  4525.            border-radius: 3px;
  4526.            color: #333333;
  4527.            font-size: 15px;
  4528.            box-sizing: border-box;
  4529.            padding: 7px 10px 9px 33px;
  4530.            width: 100%;
  4531.         }
  4532.         
  4533.     </style>
  4534. {% endblock %}
  4535. {% block pageContent %}
  4536.     <div class=\"uv-inner-section\">
  4537.         {# Ticket Sidebar #}
  4538.         <div class=\"uv-aside\" {% if app.request.cookies and app.request.cookies.get('uv-asideView') %}style=\"display: none;\"{% endif %} >
  4539.             <div class=\"uv-main-info-block\">
  4540.                 <div class=\"uv-aside-head\">
  4541.                     <div class=\"uv-aside-title\">
  4542.                         <h6>{{ 'Ticket'|trans }} #{{ ticket.id }}</h6>
  4543.                     </div>
  4544.                     <div class=\"uv-aside-back\">
  4545.                         <span onclick=\"history.length > 1 ? history.go(-1) : window.location = '{{ path(\"helpdesk_member_ticket_collection\") }}';\">{{ 'Back'|trans }}</span>
  4546.                     </div>
  4547.                 </div>
  4548.                 {# Ticket Information #}
  4549.                 <div class=\"uv-aside-brick\">
  4550.                     {# Customer Details #}
  4551.                     <div class=\"uv-aside-customer-block\">
  4552.                         <h3>{{ 'Customer Information'|trans }}</h3>
  4553.                         <div class=\"uv-aside-avatar\">
  4554.                             {% if customer.thumbnail %}
  4555.                                 <img src=\"{{ app.request.scheme ~'://' ~ app.request.httpHost ~ asset('') }}{{ customer.thumbnail }}\">
  4556.                             {% else %}
  4557.                                 <img src=\"{{ asset(default_customer_image_path) }}\">
  4558.                             {% endif %}
  4559.                         </div>
  4560.                         <div class=\"uv-aside-customer-info\">
  4561.                             <span>{{ customer.name }}</span>
  4562.                             <span>{{ customer.email }}</span>
  4563.                             {% if customer.contactNumber %}
  4564.                                 <span>{{ customer.contactNumber }}</span>
  4565.                             {% endif %}
  4566.                             {% if user_service.isAccessAuthorized('ROLE_AGENT_MANAGE_CUSTOMER') %}
  4567.                                 <span class=\"uv-customize\" data-toggle=\"tooltip\" title=\"Edit Customer Information\"></span>
  4568.                             {% endif %}
  4569.                         </div>
  4570.                     </div>
  4571.                     {# Ticket Details #}
  4572.                     <div class=\"uv-aside-ticket-block\">
  4573.                         <div class=\"uv-aside-ticket-brick\">
  4574.                             <h3>{{ 'Total Replies'|trans }}</h3>
  4575.                             <span class=\"uv-icon-replies\"></span> <span>{{ totalReplies }}</span>
  4576.                         </div>
  4577.                         <div class=\"uv-aside-ticket-brick\">
  4578.                             <h3>{{ 'TimeStamp'|trans }}</h3>
  4579.                             <span class=\"uv-icon-timestamp\"></span> <span>{{ ticket_service.timeZoneConverter(initialThread.createdAt) }}</span>
  4580.                         </div>
  4581.                         <div class=\"uv-aside-ticket-brick\">
  4582.                             <h3>{{ 'Channel'|trans }}</h3>
  4583.                             {% if ticket.source == 'email' %}
  4584.                                 <span class=\"uv-icon-channel uv-channel-email\"></span> <span>{{ 'Email'|trans }}</span>
  4585.                             {% elseif ticket.source == 'formbuilder' %}
  4586.                                 <span class=\"uv-icon-channel uv-channel-form\"></span> <span>{{ 'Formbuilder'|trans }}</span>
  4587.                             {% else %}
  4588.                             <span class=\"uv-icon-channel uv-channel-web\"></span> <span>{{ 'Website'|trans }}</span>
  4589.                             {% endif %}
  4590.                         </div>
  4591.                     </div>
  4592.                 </div>
  4593.             </div>
  4594.             {# Edit Customer Info #}
  4595.             {% if user_service.isAccessAuthorized('ROLE_AGENT_MANAGE_CUSTOMER') %}
  4596.                 <div class=\"uv-main-info-update-block uv-no-error-success-icon\" style=\"display: none\">
  4597.                     <div class=\"uv-aside-head\">
  4598.                         <div class=\"uv-aside-title\"><h6>{{ 'Edit Customer'|trans }}</h6></div>
  4599.                         <div class=\"uv-aside-back\"><span>{{ 'Back'|trans }}</span></div>
  4600.                     </div>
  4601.                     <div class=\"uv-aside-brick\">
  4602.                         <form method=\"post\">
  4603.                             <input class=\"uv-field\" name=\"id\" type=\"hidden\" value=\"{{ customer.id }}\">
  4604.                             <div class=\"uv-element-block\">
  4605.                                 <label class=\"uv-field-label\">{{ 'Name'|trans }}</label>
  4606.                                 <div class=\"uv-field-block\">
  4607.                                     <input class=\"uv-field\" name=\"name\" type=\"text\" value=\"{{ customer.name }}\">
  4608.                                 </div>
  4609.                             </div>
  4610.                             <div class=\"uv-element-block\">
  4611.                                 <label class=\"uv-field-label\">{{ 'Email'|trans }}</label>
  4612.                                 <div class=\"uv-field-block\">
  4613.                                     <input class=\"uv-field\" name=\"email\" type=\"text\" value=\"{{ customer.email }}\">
  4614.                                 </div>
  4615.                             </div>
  4616.                             <div class=\"uv-element-block\">
  4617.                                 <label class=\"uv-field-label\">{{ 'Contact Number'|trans }}</label>
  4618.                                 <div class=\"uv-field-block\">
  4619.                                     <input class=\"uv-field\" name=\"contactNumber\" type=\"text\" value=\"{{ customer.contactNumber }}\">
  4620.                                 </div>
  4621.                             </div>
  4622.                             <div class=\"uv-action-buttons\">
  4623.                                 <a class=\"uv-btn update-btn\" href=\"#\">{{ 'Update'|trans }}</a>
  4624.                                 <a class=\"uv-btn cancel-btn\" href=\"#\">{{ 'Cancel'|trans }}</a>
  4625.                             </div>
  4626.                             <input type=\"hidden\" name=\"_token\" value=\"{{ csrf_token_generator.refreshToken('') }}\"/>
  4627.                         </form>
  4628.                     </div>
  4629.                 </div>
  4630.             {% endif %}
  4631.             {# Edit Ticket #}
  4632.             <div class=\"uv-aside-brick\">
  4633.                 <div class=\"uv-aside-ticket-actions\">
  4634.                     {# Update Ticket Agent #}
  4635.                     <div class=\"uv-aside-select search\">
  4636.                         <label class=\"uv-aside-select-label\">{{ 'Agent'|trans }}</label>
  4637.                         <div>
  4638.                             {% set agentName = ticketAgent ? ticketAgent.name : 'Not Assigned'|trans %}
  4639.                             {% if ticket.isTrashed == false and user_service.isAccessAuthorized('ROLE_AGENT_ASSIGN_TICKET') %}
  4640.                                 <span class=\"uv-aside-select-value uv-dropdown-other uv-aside-drop-icon\" data-id=\"{{ ticketAgent ? ticketAgent.id : '' }}\">{{ agentName }}</span>
  4641.                                 <div class=\"uv-dropdown-list uv-bottom-left\">
  4642.                                     <div class=\"uv-dropdown-container\">
  4643.                                         <label>{{ 'Agent'|trans }}</label>
  4644.                                         <div class=\"uv-search-sm\">
  4645.                                             <input type=\"text\" class=\"uv-search-field uv-search-inline\" placeholder=\"{{ 'Search'|trans }}\">
  4646.                                         </div>
  4647.                                     </div>
  4648.                                     <ul class=\"uv-agents-list agent\" data-action=\"agent\">
  4649.                                         {% for agent in user_service.getAgentPartialDataCollection() %}
  4650.                                             <li data-index=\"{{ agent.id }}\">
  4651.                                                 <img src=\"{{ agent.smallThumbnail != null ? app.request.scheme ~'://' ~ app.request.httpHost ~ asset('') ~ agent.smallThumbnail : asset(default_agent_image_path) }}\"/> {{ agent.name }}
  4652.                                             </li>
  4653.                                         {% endfor %}
  4654.                                     </ul>
  4655.                                 </div>
  4656.                             {% else %}
  4657.                                 <span class=\"uv-aside-select-value\">{{ agentName }}</span>
  4658.                             {% endif %}
  4659.                         </div>
  4660.                     </div>
  4661.                     {# Update Ticket Priority #}
  4662.                     <div class=\"uv-aside-select\">
  4663.                         <label class=\"uv-aside-select-label\">{{ 'Priority'|trans }}</label>
  4664.                         <div>
  4665.                             <span class=\"uv-list-ticket-priority\" style=\"background: {{ ticket.priority.colorCode }}\"></span>
  4666.                             {% if user_service.isAccessAuthorized('ROLE_AGENT_UPDATE_TICKET_PRIORITY') %}
  4667.                                 <span class=\"uv-aside-select-value uv-dropdown-other uv-aside-drop-icon\" data-id=\"{{ ticket.priority.id }}\">{{ ticket.priority.description|trans }}</span>
  4668.                                 <div class=\"uv-dropdown-list uv-bottom-left\">
  4669.                                     <div class=\"uv-dropdown-container\">
  4670.                                         <label>{{ 'Priority'|trans }}</label>
  4671.                                         <ul class=\"priority\" data-action=\"priority\">
  4672.                                             {% for priority in ticketPriorityCollection %}
  4673.                                                 <li data-index=\"{{ priority.id }}\" data-color=\"{{ priority.colorCode }}\"><a href=\"#\">{{ priority.description|trans }}</a></li>
  4674.                                             {% endfor %}
  4675.                                         </ul>
  4676.                                     </div>
  4677.                                 </div>
  4678.                             {% else %}
  4679.                                 <span class=\"uv-aside-select-value\">
  4680.                                     {{ ticket.priority.description|trans }}
  4681.                                 </span>
  4682.                             {% endif %}
  4683.                         </div>
  4684.                     </div>
  4685.                     {# Update Ticket Status #}
  4686.                     <div class=\"uv-aside-select\">
  4687.                         <label class=\"uv-aside-select-label\">{{ 'Status'|trans }}</label>
  4688.                         <div>
  4689.                             {% if user_service.isAccessAuthorized('ROLE_AGENT_UPDATE_TICKET_STATUS') %}
  4690.                                 <span class=\"uv-aside-select-value uv-dropdown-other uv-aside-drop-icon\" data-id=\"{{ ticket.status.id }}\">{{ ticket.status.description|trans }}</span>
  4691.                                 <div class=\"uv-dropdown-list uv-bottom-left\">
  4692.                                     <div class=\"uv-dropdown-container\">
  4693.                                         <label>{{ 'Status'|trans }}</label>
  4694.                                         <ul class=\"status\" data-action=\"status\">
  4695.                                             {% for status in ticketStatusCollection %}
  4696.                                                 <li data-index=\"{{ status.id }}\"><a href=\"#\">{{ status.description|trans }}</a></li>
  4697.                                             {% endfor %}
  4698.                                         </ul>
  4699.                                     </div>
  4700.                                 </div>
  4701.                             {% else %}
  4702.                                 <span class=\"uv-aside-select-value\">{{ ticket.status.description|trans }}</span>
  4703.                             {% endif %}
  4704.                         </div>
  4705.                     </div>
  4706.                     {# Update Ticket Type #}
  4707.                     <div class=\"uv-aside-select search\">
  4708.                         <label class=\"uv-aside-select-label\">{{ 'Type'|trans }}</label>
  4709.                         <div>
  4710.                             {% if user_service.isAccessAuthorized('ROLE_AGENT_UPDATE_TICKET_TYPE') %}
  4711.                                 <span class=\"uv-aside-select-value uv-dropdown-other uv-aside-drop-icon\" data-id=\"{{ ticket.type ? ticket.type.id : '-- --' }}\">{{ ticket.type ? ticket.type.code : 'Not Assigned'|trans }}</span>
  4712.                                 <div class=\"uv-dropdown-list uv-bottom-left\">
  4713.                                     <div class=\"uv-dropdown-container\">
  4714.                                         <label>{{ 'Type'|trans }}</label>
  4715.                                         <div class=\"uv-search-sm\">
  4716.                                             <input type=\"text\" class=\"uv-search-field uv-search-inline\" placeholder=\"{{ 'Search'|trans }}\">
  4717.                                         </div>
  4718.                                     </div>
  4719.                                     <ul class=\"uv-search-list type\" data-action=\"type\">
  4720.                                         {% for type in ticket_service.getTypes()  %}
  4721.                                             <li data-index=\"{{ type.id }}\"><a href=\"#\">{{ type.name }}</a></li>
  4722.                                         {% endfor %}
  4723.                                     </ul>
  4724.                                 </div>
  4725.                             {% else %}
  4726.                                 <span class=\"uv-aside-select-value\">
  4727.                                     {{ ticket.type ? ticket.type.code : 'Not Assigned'|trans }}
  4728.                                 </span>
  4729.                             {% endif %}
  4730.                         </div>
  4731.                     </div>
  4732.                     {# Update Ticket Support Group #}
  4733.                     <div class=\"uv-aside-select search\">
  4734.                         <label class=\"uv-aside-select-label\">{{ 'Group'|trans }}</label>
  4735.                         <div>
  4736.                             {% if user_service.isAccessAuthorized('ROLE_AGENT_ASSIGN_TICKET_GROUP') %}
  4737.                                 <span class=\"uv-aside-select-value uv-dropdown-other uv-aside-drop-icon\" data-id=\"{{ ticket.supportGroup ? ticket.supportGroup.id : '-- --' }}\">
  4738.                                     {{ ticket.supportGroup ? ticket.supportGroup.name : 'Not Assigned'|trans }}
  4739.                                 </span>
  4740.                                 <div class=\"uv-dropdown-list uv-bottom-left\">
  4741.                                     <div class=\"uv-dropdown-container\">
  4742.                                         <label>{{ 'Group'|trans }}</label>
  4743.                                         <div class=\"uv-search-sm\">
  4744.                                             <input type=\"text\" class=\"uv-search-field uv-search-inline\" placeholder=\"{{ 'Search'|trans }}\">
  4745.                                         </div>
  4746.                                     </div>
  4747.                                     <ul class=\"uv-search-list group\" data-action=\"group\">
  4748.                                         <li data-index=\"\"><a href=\"#\">{{ 'Not Assigned'|trans }}</a></li>
  4749.                                         {% for group in supportGroupCollection %}
  4750.                                             <li data-index=\"{{ group.id }}\"><a href=\"#\">{{ group.name }}</a></li>
  4751.                                         {% endfor %}
  4752.                                     </ul>
  4753.                                 </div>
  4754.                             {% else %}
  4755.                                 <span class=\"uv-aside-select-value\">
  4756.                                     {{ ticket.supportGroup ? ticket.supportGroup.name : 'Not Assigned'|trans }}
  4757.                                 </span>
  4758.                             {% endif %}
  4759.                         </div>
  4760.                     </div>
  4761.                     {# Update Ticket Support Team #}
  4762.                     <div class=\"uv-aside-select search\">
  4763.                         <label class=\"uv-aside-select-label\">{{ 'Team'|trans }}</label>
  4764.                         <div>
  4765.                             {% if user_service.isAccessAuthorized('ROLE_AGENT_ASSIGN_TICKET_GROUP') %}
  4766.                                 <span class=\"uv-aside-select-value uv-dropdown-other uv-aside-drop-icon\" data-id=\"{{ ticket.supportTeam ? ticket.supportTeam.id : '-- --' }}\">
  4767.                                     {{ ticket.supportTeam ? ticket.supportTeam.name : 'Not Assigned'|trans }}
  4768.                                 </span>
  4769.                                 <div class=\"uv-dropdown-list uv-bottom-left\">
  4770.                                     <div class=\"uv-dropdown-container\">
  4771.                                         <label>{{ 'Team'|trans }}</label>
  4772.                                         <div class=\"uv-search-sm\">
  4773.                                             <input type=\"text\" class=\"uv-search-field uv-search-inline\" placeholder=\"{{ 'Search'|trans }}\">
  4774.                                         </div>
  4775.                                     </div>
  4776.                                     <ul class=\"uv-search-list team\" data-action=\"team\">
  4777.                                         <li data-index=\"\"><a href=\"#\">{{ 'Not Assigned'|trans }}</a></li>
  4778.                                         {% for team in supportTeamCollection %}
  4779.                                             <li data-index=\"{{ team.id }}\"><a href=\"#\">{{ team.name }}</a></li>
  4780.                                         {% endfor %}
  4781.                                     </ul>
  4782.                                 </div>
  4783.                             {% else %}
  4784.                                 <span class=\"uv-aside-select-value\">
  4785.                                     {{ ticket.supportTeam ? ticket.supportTeam.name : 'Not Assigned'|trans }}
  4786.                                 </span>
  4787.                             {% endif %}
  4788.                         </div>
  4789.                     </div>
  4790.                 </div>
  4791.             </div>
  4792.             {# Ticket Labels #}
  4793.             <div class=\"uv-aside-brick\">
  4794.                 <div class=\"uv-aside-ticket-labels label-list-block\">
  4795.                     <div class=\"uv-element-block\">
  4796.                         <label class=\"uv-field-label\">{{ 'Labels'|trans }}</label>
  4797.                         <div class=\"uv-field-block\">
  4798.                             <input class=\"uv-field uv-dropdown-other\" type=\"text\" data-type=\"label\">
  4799.                             <div class=\"uv-dropdown-list uv-top-left\">
  4800.                                 <div class=\"uv-dropdown-container\">
  4801.                                     <label>{{ 'Filter With'|trans }}</label>
  4802.                                     <ul class=\"\">
  4803.                                         <span class=\"uv-filter-info\">{{ 'Type atleast 2 letters'|trans }}</span>
  4804.                                         <span class=\"uv-no-results\" style=\"display: none;\">{{ 'No result found'|trans }}</span>
  4805.                                     </ul>
  4806.                                 </div>
  4807.                             </div>
  4808.                         </div>
  4809.                     </div>
  4810.                     <div class=\"label-list\"></div>
  4811.                 </div>
  4812.             </div>
  4813.             {# Ticket Collaborators #}
  4814.             <div class=\"uv-aside-brick collaborator-list-block\">
  4815.                 <div class=\"uv-aside-ticket-labels\">
  4816.                     <div class=\"uv-element-block\">
  4817.                         <label class=\"uv-field-label\">{{ 'Collaborators'|trans }}</label>
  4818.                         {% if user_service.isAccessAuthorized('ROLE_AGENT_ADD_COLLABORATOR_TO_TICKET') %}
  4819.                             <div class=\"uv-field-block\">
  4820.                                 <input class=\"uv-field\" type=\"text\" name=\"email\" type=\"text\" value=\"\" placeholder=\"{{ 'Type email to add'|trans }}\">
  4821.                             </div>
  4822.                         {% endif %}
  4823.                     </div>
  4824.                     <div class=\"collaborator-list\" style=\"margin-top: 10px\"></div>
  4825.                 </div>
  4826.             </div>
  4827.             {# Ticket Tags #}
  4828.             <div class=\"uv-aside-brick tag-list-block\">
  4829.                 <div class=\"uv-aside-ticket-labels\">
  4830.                     <div class=\"uv-element-block\">
  4831.                         <label class=\"uv-field-label\">{{ 'Tags'|trans }}</label>
  4832.                         {% if user_service.isAccessAuthorized('ROLE_AGENT_ADD_TAG') %}
  4833.                             <div class=\"uv-field-block\">
  4834.                                 <input class=\"uv-field uv-dropdown-other\" name=\"tag-name\" type=\"text\" data-type=\"tag\" value=\"\">
  4835.                                 <div class=\"uv-dropdown-list uv-bottom-left\">
  4836.                                     <div class=\"uv-dropdown-container\">
  4837.                                         <label>{{ 'Filter With'|trans }}</label>
  4838.                                         <ul class=\"\">
  4839.                                             <span class=\"uv-filter-info\">{{ 'Type atleast 2 letters'|trans }}</span>
  4840.                                             <span class=\"uv-no-results\" style=\"display: none;\">{{ 'No result found'|trans }}</span>
  4841.                                         </ul>
  4842.                                     </div>
  4843.                                 </div>
  4844.                             </div>
  4845.                         {% endif %}
  4846.                     </div>
  4847.                     <div class=\"tag-list\" style=\"margin-top: 10px\"></div>
  4848.                 </div>
  4849.             </div>
  4850.         </div>
  4851.         <div class=\"uv-view {% if app.request.cookies and app.request.cookies.get('uv-asideView') %}uv-aside-view{% endif %}\" >
  4852.             <div class=\"uv-ticket-scroll-region {% if app.request.cookies and app.request.cookies.get('uv-asideView') %}uv-aside-view-tv{% endif %}\" >
  4853.                 {# Ticket Header CTA #}
  4854.                 <div class=\"uv-ticket-action-bar\">
  4855.                     <div class=\"uv-ticket-action-bar-lt\">
  4856.                         <div class=\"uv-header-fix\"><a href=\"#\" class=\"uv-icon-pin\"></a></div>
  4857.                         {# Thread Actions #}
  4858.                         <div class=\"uv-tabs\">
  4859.                             <ul>
  4860.                                 {# Filter Threads #}
  4861.                                 <li for=\"default\" data-type=\"all\" class=\"uv-tab-active\">{{ 'All Threads'|trans }}</li>
  4862.                                 <li for=\"default\" data-type=\"reply\">{{ 'Replies'|trans }}</li>
  4863.                                 <li for=\"default\" data-type=\"forward\">{{ 'Forwards'|trans }}</li>
  4864.                                 <li for=\"default\" data-type=\"note\">{{ 'Notes'|trans }}</li>
  4865.                                 <li for=\"default\" data-type=\"pinned\">{{ 'Pinned'|trans }}</li>
  4866.                                 {# Update Threads #}
  4867.                                 {% if user_service.isAccessAuthorized('ROLE_AGENT_EDIT_TICKET') or user_service.isAccessAuthorized('ROLE_AGENT_DELETE_TICKET') %}
  4868.                                     <li class=\"uv-tab-ellipsis uv-ticket-action\">
  4869.                                         <span class=\"uv-icon-ellipsis uv-dropdown-other\"></span>
  4870.                                         <div class=\"uv-dropdown-list uv-bottom-right\">
  4871.                                             <div class=\"uv-dropdown-container\">
  4872.                                                 <ul class=\"priority\" data-action=\"priority\">
  4873.                                                     {% if user_service.isAccessAuthorized('ROLE_AGENT_EDIT_TICKET') %}
  4874.                                                         <li data-action=\"edit\" class=\"uv-open-popup\" data-target=\"edit-ticket-modal\">{{ 'Edit Ticket'|trans }}</li>
  4875.                                                     {% endif %}
  4876.                                                     <li data-action=\"print\">{{ 'Print Ticket'|trans }}</li>
  4877.                                                     {% if user_service.isAccessAuthorized('ROLE_AGENT_UPDATE_TICKET_STATUS') %}
  4878.                                                         <li data-action=\"spam\" data-index=\"6\">{{ 'Mark as Spam'|trans }}</li>
  4879.                                                         <li data-action=\"closed\" data-index=\"5\">{{ 'Mark as Closed'|trans }}</li>
  4880.                                                     {% endif %}
  4881.                                                     {% if user_service.isAccessAuthorized('ROLE_AGENT_DELETE_TICKET') %}
  4882.                                                         <li data-action=\"delete\" class=\"uv-text-danger\">{{ 'Delete Ticket'|trans }}</li>
  4883.                                                     {% endif %}
  4884.                                                 </ul>
  4885.                                             </div>
  4886.                                         </div>
  4887.                                     </li>
  4888.                                 {% endif %}
  4889.                             </ul>
  4890.                         </div>
  4891.                     </div>
  4892.                     <div class=\"uv-ticket-action-bar-rt\">
  4893.                         {{ uvdesk_extensibles.getRegisteredComponent(\"Webkul\\\\UVDesk\\\\CoreFrameworkBundle\\\\Tickets\\\\WidgetCollection\").embedSideFilterIcons()|raw }}
  4894.                     </div>
  4895.                 </div>
  4896.                 {# Ticket Active Users #}
  4897.                 <div class=\"uv-ticket-viewer-bar\">
  4898.                     <div class=\"uv-ticket-viewer-list\">
  4899.                         <div class=\"uv-ticket-viewer-single uv-first\" title=\"Currently active agents on ticket...\">
  4900.                             <span class=\"uv-icon-eye-light\"></span>
  4901.                         </div>
  4902.                     </div>
  4903.                 </div>
  4904.                 {# Ticket Header #}
  4905.                 <div class=\"uv-ticket-head\">
  4906.                     <div class=\"uv-ticket-head-lt\">
  4907.                         <span class=\"uv-star-large {{ ticket.isStarred ? 'uv-star-active' : '' }} uv-star uv-margin-right-5\"></span>
  4908.                     </div>
  4909.                     <div class=\"uv-ticket-head-rt\">
  4910.                         <h1>{{ ticket.subject }}</h1>
  4911.                     </div>
  4912.                 </div>
  4913.                 <div class=\"uv-ticket-strip\">
  4914.                     <span>
  4915.                         <span class=\"uv-ticket-strip-label\">{{ 'Created'|trans }} - </span>
  4916.                         <span class=\"timeago uv-margin-0\" data-timestamp=\"{{ ticket.createdAt.getTimestamp() }}\" title=\"{{ ticket.createdAt.format('d-m-Y h:ia') }}\">{{ ticket_service.timeZoneConverter(initialThread.createdAt) }}</span>
  4917.                     </span>
  4918.                     <span>
  4919.                         <span class=\"uv-ticket-strip-label\">{{ 'By'|trans }} - </span> {{ initialThread.user.name }}
  4920.                         {% if totalCustomerTickets %}
  4921.                             (<a id=\"more-tickets-btn\" href=\"{{ path('helpdesk_member_ticket_collection') }}#customer/{{customer.id}}\" target=\"_blank\">{{ 'count more tickets'|trans({'count': totalCustomerTickets}) }}</a>)
  4922.                         {% endif %}
  4923.                     </span>
  4924.                     <span class=\"agent-info\" style=\"{{ ticketAgent ? '' : 'display: none' }}\">
  4925.                         <span class=\"uv-ticket-strip-label\">{{ 'Agent'|trans }} - </span>
  4926.                         <span class=\"name\">{{ ticketAgent ? ticketAgent.name : '' }}</span>
  4927.                     </span>
  4928.                 </div>
  4929.                 {# Thread Tab View #}
  4930.                 <div class=\"uv-tab-view uv-tab-view-active\" id=\"default\">
  4931.                     <div class=\"uv-ticket-section\">
  4932.                         <div class=\"uv-ticket-main create\">
  4933.                             <div class=\"uv-ticket-strip\">
  4934.                                 <span>
  4935.                                     <span class=\"timeago uv-margin-0\" data-timestamp=\"{{ ticket.createdAt.getTimestamp() }}\" title=\"{{ ticket.createdAt.format('d-m-Y h:ia') }}\">{{ ticket_service.timeZoneConverter(ticket.createdAt) }}</span>
  4936.                                     - {{ initialThread.user.name }} <span class=\"uv-ticket-strip-label\">{{ 'created Ticket'|trans }}</span>
  4937.                                 </span>
  4938.                                 {% if initialThread.cc != '' %}
  4939. \t\t\t\t\t\t\t\t\t<div class=\"uv-ticket-strip\">
  4940. \t\t\t\t\t\t\t\t\t\t<span><span class=\"uv-ticket-strip-label\">{{ 'CC'|trans }} -</span> {{ initialThread.cc }}</span>
  4941. \t\t\t\t\t\t\t\t\t</div>
  4942. \t\t\t\t\t\t\t\t{% endif %}      
  4943.                             </div>
  4944.                             <div class=\"uv-ticket-main-lt\">
  4945.                                <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) }}\">
  4946.                             </div>
  4947.                             <div class=\"uv-ticket-main-rt\">
  4948.                                 {% if initialThread.createdBy == 'customer' %}
  4949.                                     <a href=\"{{ path('helpdesk_member_manage_customer_account') }}/{{ initialThread.user.id}}\" class=\"uv-ticket-member-name\">{{ initialThread.user.name }}</a>
  4950.                                 {% else %}
  4951.                                     {% if initialThread.user %}
  4952.                                         <a href=\"{{ path('helpdesk_member_account') }}/{{ initialThread.user.id}}\" class=\"uv-ticket-member-name\">{{ initialThread.user.name }}</a>
  4953.                                     {% else %}
  4954.                                         <a class=\"uv-ticket-member-name\">{{ initialThread.user.name }}</a>
  4955.                                     {% endif %}
  4956.                                 {% endif %}
  4957.                                 {# Ticket Message #}
  4958.                                 <div class=\"message\">
  4959.                                     <p>
  4960.                                         {% if initialThread.message|striptags == initialThread.message %}
  4961.                                             {{ initialThread.message|nl2br }}
  4962.                                         {% else %}
  4963.                                             {{ initialThread.message|raw }}
  4964.                                         {% endif %}
  4965.                                     </p>
  4966.                                 </div>
  4967.                                 {# Ticket Attachments #}
  4968.                                 {% if initialThread.attachments|length %}
  4969.                                     <div class=\"uv-ticket-uploads\">
  4970.                                         <h4>{{ 'Uploaded Files'|trans }}</h4>
  4971.                                         <div class=\"uv-ticket-uploads-strip\">
  4972.                                             {% for attachment in initialThread.attachments %}
  4973.                                                 <a href=\"{{ attachment.downloadURL }}\" target = \"_blank\" class=\"uv-ticket-uploads-brick uv-no-pointer-events\" data-toggle=\"tooltip\" title=\"{{ attachment.name }}\">
  4974.                                                     <img src=\"{{ attachment.iconURL }}\"  class=\"uv-auto-pointer-events\"/>
  4975.                                                 </a>
  4976.                                             {% endfor %}
  4977.                                         </div>
  4978.                                         {% if initialThread.attachments|length > 1 %}
  4979.                                             <div class=\"uv-upload-actions\">
  4980.                                                 <a href=\"#\" class=\"uv-open-in-files\" data-thread=\"{{ initialThread.id }}\" style=\"display: none\"><span class=\"uv-icon-open-in-files\"></span>{{ 'Open in Files'|trans }}</a>
  4981.                                                 {% if initialThread.attachments|length %}
  4982.                                                     <a href=\"{{ path('helpdesk_member_ticket_download_attachment_zip') }}/{{ initialThread.id }}\" target=\"_blank\"><span class=\"uv-icon-attachment\"></span> Download (as .zip)</a>
  4983.                                                 {% endif %}
  4984.                                             </div>
  4985.                                         {% endif %}
  4986.                                     </div>
  4987.                                 {% endif %}
  4988.                             </div>
  4989.                         </div>
  4990.                         <div class=\"uv-ticket-accordion\">
  4991.                             <div class=\"uv-ticket-count-wrapper\">
  4992.                                 <span class=\"uv-ticket-count-stat\">{{ totalReplies }}</span>
  4993.                             </div>
  4994.                             <div class=\"uv-ticket-wrapper thread-list\"></div>
  4995.                         </div>
  4996.                     </div>
  4997.                 </div>
  4998.                 {# Reply Ticket View #}
  4999.                 <div class=\"uv-ticket-main uv-ticket-reply uv-no-error-success-icon\">
  5000.                     <div class=\"uv-ticket-main-lt\">
  5001.                         <span class=\"uv-icon-ellipsis\"></span>
  5002.                         <img src=\"{{ currentUserDetails.thumbnail ? app.request.scheme ~'://' ~ app.request.httpHost ~ asset('') ~ currentUserDetails.thumbnail : asset(default_agent_image_path) }}\" />
  5003.                     </div>
  5004.                     <div class=\"uv-ticket-main-rt\">
  5005.                         <span class=\"uv-ticket-member-name\">{{ currentUserDetails.name }}</span>
  5006.                         <div class=\"uv-tabs\">
  5007.                             <ul>
  5008.                                 <li for=\"reply\" class=\"uv-tab-active\">{{ 'Reply'|trans }}</li>
  5009.                                 <li for=\"forward\">{{ 'Forward'|trans }}</li>
  5010.                                 {% if user_service.isAccessAuthorized('ROLE_AGENT_ADD_NOTE') %}
  5011.                                     <li for='note'>{{ 'Note'|trans }}</li>
  5012.                                 {% endif %}
  5013.                             </ul>
  5014.                         </div>
  5015.                         {# Ticket Thread | Add Reply #}
  5016.                         <div class=\"uv-tab-view uv-tab-view-active\" id=\"reply\">
  5017.                             <form enctype=\"multipart/form-data\" method=\"post\" action=\"{{ path('helpdesk_member_add_ticket_thread', {'ticketId': ticket.id }) }}\">
  5018.                                 <input name=\"threadType\" value=\"reply\" type=\"hidden\">
  5019.                                 <input name=\"status\" value=\"\" type=\"hidden\" {% if user_service.isAccessAuthorized('ROLE_AGENT_UPDATE_TICKET_STATUS') %}class=\"reply-status\"{% endif %}>
  5020.                                 <div class=\"uv-element-block collaborators\" style=\"display: none\">
  5021.                                     <label class=\"uv-field-label\">{{ 'Collaborators'|trans }}</label>
  5022.                                     <div class=\"uv-field-block\"></div>
  5023.                                 </div>
  5024.                                 <div class=\"uv-element-block cc-bcc\">
  5025.                                     <label>
  5026.                                         <div class=\"uv-checkbox\">
  5027.                                             <input type=\"checkbox\" class=\"cc-bcc-toggle\">
  5028.                                             <span class=\"uv-checkbox-view\"></span>
  5029.                                         </div>
  5030.                                         <span class=\"uv-checkbox-label\">CC/BCC</span>
  5031.                                     </label>
  5032.                                     <div class=\"uv-field-block\" style=\"display: none\">
  5033.                                         <div class=\"uv-group\">
  5034.                                             <input class=\"uv-group-field uv-dropdown-other preloaded uv-manual-enter\" type=\"text\">
  5035.                                             <div class=\"uv-dropdown-list uv-bottom-left\">
  5036.                                                 <div class=\"uv-dropdown-container\">
  5037.                                                     <label>{{ 'Agent'|trans }}</label>
  5038.                                                 </div>
  5039.                                                 <ul class=\"uv-agents-list\">
  5040.                                                     {% for agent in user_service.getAgentPartialDataCollection %}
  5041.                                                         <li data-id=\"{{ agent.email }}\">
  5042.                                                             <img src=\"{{ agent.smallThumbnail ? app.request.scheme ~'://' ~ app.request.httpHost ~ asset('') ~ agent.smallThumbnail : asset(default_agent_image_path) }}\"/> {{agent.name}}
  5043.                                                         </li>
  5044.                                                     {% endfor %}
  5045.                                                     <li class=\"uv-no-results\" style=\"display: none;\">{{ 'No result found'|trans }}</li>
  5046.                                                 </ul>
  5047.                                             </div>
  5048.                                             <select class=\"uv-group-select cc-bcc-select\">
  5049.                                                 <option value=\"bcc\">{{ 'BCC'|trans }}</option>
  5050.                                                 <option value=\"cc\">{{ 'CC'|trans }}</option>
  5051.                                             </select>
  5052.                                         </div>
  5053.                                         <div class=\"cc-bcc-list\"></div>
  5054.                                     </div>
  5055.                                 </div>
  5056.                                 <div class=\"uv-element-block uv-element-block-textarea\">
  5057.                                     <label class=\"uv-field-label\">{{ 'Write a reply'|trans }}</label>
  5058.                                     <div class=\"uv-field-block\">
  5059.                                         <textarea class=\"uv-field\" name=\"reply\" id=\"reply-area\">{{ ticket_service.getAgentDraftReply() }}</textarea>
  5060.                                     </div>
  5061.                                 </div>
  5062.                                 <div class=\"uv-element-block attachment-block\">
  5063.                                     <label>
  5064.                                         <span class=\"uv-file-label\">{{ 'Add Attachment'|trans }}</span>
  5065.                                     </label>
  5066.                                 </div>
  5067.                                 <div class=\"uv-action-buttons\">
  5068.                                     <div class=\"uv-dropdown next-view\">
  5069.                                         <input type=\"hidden\" name=\"nextView\" value=\"stay\"/>
  5070.                                         <div class=\"uv-dropdown-btn\" style=\"padding: 9px 27px 9px 10px;\">{{ 'Stay on ticket'|trans }}</div>
  5071.                                         <div class=\"uv-dropdown-list uv-top-left\" style=\"opacity: 1;\">
  5072.                                             <div class=\"uv-dropdown-container\">
  5073.                                                 <label>{{ 'After Reply'|trans }}</label>
  5074.                                                 <ul>
  5075.                                                     <li data-value=\"stay\">{{ 'Stay on ticket'|trans }}</li>
  5076.                                                     <li data-value=\"redirect\">{{ 'Redirect to list'|trans }}</li>
  5077.                                                 </ul>
  5078.                                             </div>
  5079.                                         </div>
  5080.                                     </div>
  5081.                                     <div class=\"uv-dropdown reply\">
  5082.                                         <div class=\"uv-btn uv-dropdown-other\">{{ 'Reply'|trans }} <span class=\"uv-icon-down-light\"></span></div>
  5083.                                         <div class=\"uv-dropdown-list uv-top-left\">
  5084.                                             <div class=\"uv-dropdown-container\">
  5085.                                                 <label>{{ 'Reply'|trans }}</label>
  5086.                                                 <ul>
  5087.                                                     <li data-id=\"\">{{ 'Submit'|trans }}</li>
  5088.                                                     {% if user_service.isAccessAuthorized('ROLE_AGENT_UPDATE_TICKET_STATUS') %}
  5089.                                                         <li data-id=\"open\">{{ 'Submit And Open'|trans }}</li>
  5090.                                                         <li data-id=\"pending\">{{ 'Submit And Pending'|trans }}</li>
  5091.                                                         <li data-id=\"answered\">{{ 'Submit And Answered'|trans }}</li>
  5092.                                                         <li data-id=\"resolved\">{{ 'Submit And Resolved'|trans }}</li>
  5093.                                                         <li data-id=\"closed\">{{ 'Submit And Closed'|trans }}</li>
  5094.                                                     {% endif %}
  5095.                                                 </ul>
  5096.                                             </div>
  5097.                                         </div>
  5098.                                     </div>
  5099.                                 </div>
  5100.                             </form>
  5101.                         </div>
  5102.                         {# Ticket Thread | Forward Thread #}
  5103.                         <div class=\"uv-tab-view\" id=\"forward\">
  5104.                             <form enctype=\"multipart/form-data\" method=\"post\" action=\"{{ path('helpdesk_member_add_ticket_thread', {'ticketId': ticket.id }) }}\">
  5105.                                 <input name=\"threadType\" value=\"forward\" type=\"hidden\">
  5106.                                 <input name=\"status\" value=\"\" type=\"hidden\" {% if user_service.isAccessAuthorized('ROLE_AGENT_UPDATE_TICKET_STATUS') %}class=\"reply-status\"{% endif %}>
  5107.                                 <div class=\"uv-element-block\">
  5108.                                     <label class=\"uv-field-label\">{{ 'Subject'|trans }}</label>
  5109.                                     <div class=\"uv-field-block\">
  5110.                                         <input class=\"uv-field\" type=\"text\" name=\"subject\">
  5111.                                     </div>
  5112.                                 </div>
  5113.                                 <div class=\"uv-element-block to\">
  5114.                                     <label class=\"uv-field-label\">{{ 'To'|trans }}</label>
  5115.                                     <div class=\"uv-field-block\">
  5116.                                         <input class=\"uv-field uv-dropdown-other preloaded uv-to-message uv-manual-enter\" type=\"text\">
  5117.                                         <div class=\"uv-dropdown-list uv-bottom-left\">
  5118.                                             <div class=\"uv-dropdown-container\">
  5119.                                                 <label>{{ 'Agent'|trans }}</label>
  5120.                                             </div>
  5121.                                             <ul class=\"uv-agents-list\">
  5122.                                                 {% for agent in user_service.getAgentPartialDataCollection %}
  5123.                                                     <li data-id=\"{{ agent.email }}\">
  5124.                                                         <img src=\"{{ agent.smallThumbnail ? app.request.scheme ~'://' ~ app.request.httpHost ~ asset('') ~ agent.smallThumbnail : asset(default_agent_image_path) }}\"/> {{agent.name}}
  5125.                                                     </li>
  5126.                                                 {% endfor %}
  5127.                                                 <li class=\"uv-no-results\" style=\"display: none;\">{{ 'No result found'|trans }}</li>
  5128.                                             </ul>
  5129.                                         </div>
  5130.                                         <div class=\"to-list\"></div>
  5131.                                     </div>
  5132.                                 </div>
  5133.                                 <div class=\"uv-element-block cc-bcc\">
  5134.                                     <label>
  5135.                                         <div class=\"uv-checkbox\">
  5136.                                             <input type=\"checkbox\" class=\"cc-bcc-toggle\">
  5137.                                             <span class=\"uv-checkbox-view\"></span>
  5138.                                         </div>
  5139.                                         <span class=\"uv-checkbox-label\">CC/BCC</span>
  5140.                                     </label>
  5141.                                     <div class=\"uv-field-block\" style=\"display: none\">
  5142.                                         <div class=\"uv-group\">
  5143.                                             <input class=\"uv-group-field uv-dropdown-other preloaded uv-manual-enter\" type=\"text\">
  5144.                                             <div class=\"uv-dropdown-list uv-bottom-left\">
  5145.                                                 <div class=\"uv-dropdown-container\"><label>{{ 'Agent'|trans }}</label></div>
  5146.                                                 <ul class=\"uv-agents-list\">
  5147.                                                     {% for agent in user_service.getAgentPartialDataCollection %}
  5148.                                                         <li data-id=\"{{ agent.email }}\">
  5149.                                                             <img src=\"{{ agent.smallThumbnail ? app.request.scheme ~'://' ~ app.request.httpHost ~ asset('') ~ agent.smallThumbnail : asset(default_agent_image_path) }}\"/> {{agent.name}}
  5150.                                                         </li>
  5151.                                                     {% endfor %}
  5152.                                                     <li class=\"uv-no-results\" style=\"display: none;\">{{ 'No result found'|trans }}</li>
  5153.                                                 </ul>
  5154.                                             </div>
  5155.                                             <select class=\"uv-group-select cc-bcc-select\">
  5156.                                                 <option value=\"bcc\">{{ 'BCC'|trans }}</option>
  5157.                                                 <option value=\"cc\">{{ 'CC'|trans }}</option>
  5158.                                             </select>
  5159.                                         </div>
  5160.                                         <div class=\"cc-bcc-list\"></div>
  5161.                                     </div>
  5162.                                 </div>
  5163.                                 <div class=\"uv-element-block uv-element-block-textarea\">
  5164.                                     <label class=\"uv-field-label\">{{ 'Write a reply'|trans }}</label>
  5165.                                     <div class=\"uv-field-block\">
  5166.                                         <textarea class=\"uv-field\" name=\"reply\" id=\"forward-area\">{{ ticket_service.getAgentDraftReply() }}</textarea>
  5167.                                     </div>
  5168.                                 </div>
  5169.                                 <div class=\"uv-element-block attachment-block\">
  5170.                                     <label><span class=\"uv-file-label\">{{ 'Add Attachment'|trans }}</span></label>
  5171.                                 </div>
  5172.                                 <div class=\"uv-action-buttons\">
  5173.                                     <div class=\"uv-dropdown next-view\">
  5174.                                         <input type=\"hidden\" name=\"nextView\" value=\"stay\"/>
  5175.                                         <div class=\"uv-dropdown-btn\" style=\"padding: 9px 27px 9px 10px;\">{{ 'Stay on ticket'|trans }}</div>
  5176.                                         <div class=\"uv-dropdown-list uv-top-left\" style=\"opacity: 1;\">
  5177.                                             <div class=\"uv-dropdown-container\">
  5178.                                                 <label>{{ 'After Reply'|trans }}</label>
  5179.                                                 <ul>
  5180.                                                     <li data-value=\"stay\">{{ 'Stay on ticket'|trans }}</li>
  5181.                                                     <li data-value=\"redirect\">{{ 'Redirect to list'|trans }}</li>
  5182.                                                 </ul>
  5183.                                             </div>
  5184.                                         </div>
  5185.                                     </div>
  5186.                                     <div class=\"uv-btn forward\">{{ 'Forward'|trans }}</div>
  5187.                                 </div>
  5188.                             </form>
  5189.                         </div>
  5190.                         {# Ticket Thread | Add Note #}
  5191.                         {% if user_service.isAccessAuthorized('ROLE_AGENT_ADD_NOTE') %}
  5192.                             <div class=\"uv-tab-view\" id=\"note\">
  5193.                                 <form enctype=\"multipart/form-data\" method=\"post\" action=\"{{ path('helpdesk_member_add_ticket_thread', {'ticketId': ticket.id }) }}\">
  5194.                                     <input name=\"threadType\" value=\"note\" type=\"hidden\">
  5195.                                     <input name=\"status\" value=\"\" type=\"hidden\" {% if user_service.isAccessAuthorized('ROLE_AGENT_UPDATE_TICKET_STATUS') %}class=\"reply-status\"{% endif %}>
  5196.                                     <div class=\"uv-element-block uv-element-block-textarea\">
  5197.                                         <label class=\"uv-field-label\">{{ 'Write a reply'|trans }}</label>
  5198.                                         <div class=\"uv-field-block\">
  5199.                                             <textarea class=\"uv-field\" name=\"reply\" id=\"note-area\">{{ ticket_service.getAgentDraftReply() }}</textarea>
  5200.                                         </div>
  5201.                                     </div>
  5202.                                     <div class=\"uv-element-block attachment-block\">
  5203.                                         <label><span class=\"uv-file-label\">{{ 'Add Attachment'|trans }}</span></label>
  5204.                                     </div>
  5205.                                     <div class=\"uv-action-buttons\">
  5206.                                         <div class=\"uv-dropdown next-view\">
  5207.                                             <input type=\"hidden\" name=\"nextView\" value=\"stay\"/>
  5208.                                             <div class=\"uv-dropdown-btn\" style=\"padding: 9px 27px 9px 10px;\">{{ 'Stay on ticket'|trans }}</div>
  5209.                                             <div class=\"uv-dropdown-list uv-top-left\" style=\"opacity: 1;\">
  5210.                                                 <div class=\"uv-dropdown-container\">
  5211.                                                     <label>{{ 'After Reply'|trans }}</label>
  5212.                                                     <ul>
  5213.                                                         <li data-value=\"stay\">{{ 'Stay on ticket'|trans }}</li>
  5214.                                                         <li data-value=\"redirect\">{{ 'Redirect to list'|trans }}</li>
  5215.                                                     </ul>
  5216.                                                 </div>
  5217.                                             </div>
  5218.                                         </div>
  5219.                                         <div class=\"uv-dropdown reply\">
  5220.                                             <div class=\"uv-btn uv-dropdown-other\">{{ 'Reply'|trans}}<span class=\"uv-icon-down-light\"></span></div>
  5221.                                             <div class=\"uv-dropdown-list uv-top-left\">
  5222.                                                 <div class=\"uv-dropdown-container\">
  5223.                                                     <label>{{ 'Add Note'|trans }}</label>
  5224.                                                     <ul>
  5225.                                                         <li data-id=\"\">{{ 'Submit'|trans }}</li>
  5226.                                                         {% if user_service.isAccessAuthorized('ROLE_AGENT_UPDATE_TICKET_STATUS') %}
  5227.                                                             <li data-id=\"open\">{{ 'Submit And Open'|trans }}</li>
  5228.                                                             <li data-id=\"pending\">{{ 'Submit And Pending'|trans }}</li>
  5229.                                                             <li data-id=\"answered\">{{ 'Submit And Answered'|trans }}</li>
  5230.                                                             <li data-id=\"resolved\">{{ 'Submit And Resolved'|trans }}</li>
  5231.                                                             <li data-id=\"closed\">{{ 'Submit And Closed'|trans }}</li>
  5232.                                                         {% endif %}
  5233.                                                     </ul>
  5234.                                                 </div>
  5235.                                             </div>
  5236.                                         </div>
  5237.                                     </div>
  5238.                                 </form>
  5239.                             </div>
  5240.                         {% endif %}
  5241.                     </div>
  5242.                 </div>
  5243.             </div>
  5244.             <!-- Bottom Action Block -->
  5245.             <div class=\"uv-ticket-fixed-region\">
  5246.                 <div class=\"uv-ticket-fixed-region-lt\">
  5247.                     {{ uvdesk_extensibles.getRegisteredComponent(\"Webkul\\\\UVDesk\\\\CoreFrameworkBundle\\\\Tickets\\\\QuickActionButtonCollection\").injectTemplates()|raw }}
  5248.                     {# <!-- Saved Replied-->
  5249.                     <div class=\"uv-dropdown saved-reply\">
  5250.                         <div class=\"uv-dropdown-btn\">{{ 'Saved Replies'|trans }}</div>
  5251.                         <div class=\"uv-dropdown-list uv-top-left\">
  5252.                             <div class=\"uv-dropdown-container\">
  5253.                                 <label>{{ 'Saved Replies'|trans }}</label>
  5254.                                 <ul>
  5255.                                     <li data-id=\"\">
  5256.                                         <a href=\"{{ path('helpdesk_member_saved_replies') }}\" target=\"_blank\" style=\"color: #2750C4\">{{ 'Create New'|trans }}</a>
  5257.                                     </li>
  5258.                                     {% for savedReply in ticket_service.getSavedReplies() %}
  5259.                                         <li data-id=\"{{ savedReply.id }}\">
  5260.                                             {{ savedReply.name }}
  5261.                                         </li>
  5262.                                     {% endfor %}
  5263.                                 </ul>
  5264.                             </div>
  5265.                         </div>
  5266.                     </div>
  5267.                     <!-- //Saved Replied--> #}
  5268.                     {# <!--Code-->
  5269.                     <div class=\"uv-dropdown\">
  5270.                         <div class=\"uv-dropdown-btn\">{{ 'Prepared Responses'|trans }}</div>
  5271.                         <div class=\"uv-dropdown-list uv-top-left\">
  5272.                         <div class=\"uv-dropdown-container prepared-responses\">
  5273.                             <label>{{ 'Prepared Responses'|trans }}</label>
  5274.                             <ul>
  5275.                                 <li>
  5276.                                     <a class=\"create-new\" href=\"{{path('prepare_response_action')}}\" target=\"_blank\" style=\"color: #2750C4\">{{ 'Create New'|trans }}</a>
  5277.                                 </li>
  5278.                                 {% set preparedResponses = ticket_service.getManualWorkflow() %}
  5279.                                 {% for workflow in preparedResponses %}
  5280.                                     <li>
  5281.                                         <a href=\"{{ path('helpdesk_member_ticket_prepared_response_xhr') }}/{{ ticket.id }}/{{ workflow.id }}\">
  5282.                                             {{ workflow.name }}
  5283.                                         </a>
  5284.                                     </li>
  5285.                                 {% endfor %}
  5286.                             </ul>
  5287.                         </div>
  5288.                         </div>
  5289.                     </div>
  5290.                     <!--//Code--> #}
  5291.                 </div>
  5292.                 <div class=\"uv-ticket-fixed-region-rt\"></div>
  5293.             </div>
  5294.             <!-- //Bottom Action Block -->
  5295.         </div>
  5296.     </div>
  5297.     {# Edit Ticket #}
  5298.     {% if user_service.isAccessAuthorized('ROLE_AGENT_EDIT_TICKET') %}
  5299.         <div class=\"uv-pop-up-overlay uv-no-error-success-icon\" id=\"edit-ticket-modal\">
  5300.             <div class=\"uv-pop-up-box uv-pop-up-wide\">
  5301.                 <span class=\"uv-pop-up-close\"></span>
  5302.                 <h2>{{ 'Edit Ticket'|trans }}</h2>
  5303.                 {# Edit Ticket Form #}
  5304.                 <form method=\"post\" action=\"{{ path('helpdesk_member_update_ticket_details_xhr', {'ticketId': ticket.id}) }}\" id=\"edit-ticket-form\">
  5305.                     <div class=\"uv-element-block\">
  5306.                         <label class=\"uv-field-label\">{{ 'Subject'|trans }}</label>
  5307.                         <div class=\"uv-field-block\">
  5308.                             <input type=\"text\" name=\"subject\" class=\"uv-field\" value=\"{{ ticket.subject }}\" />
  5309.                         </div>
  5310.                     </div>
  5311.                     
  5312.                     <div class=\"uv-element-block\">
  5313.                         <label class=\"uv-field-label\">{{ 'Reply'|trans }}</label>
  5314.                         <div class=\"uv-field-block\">
  5315.                             {% if initialThread.message|striptags == initialThread.message %}
  5316.                                 <textarea name=\"reply\" id=\"uv-edit-create-thread\" class=\"uv-field\">{{ initialThread.message|nl2br }}</textarea>
  5317.                             %} {% else %}
  5318.                                 <textarea name=\"reply\" id=\"uv-edit-create-thread\" class=\"uv-field\">{{ initialThread.message|raw }}</textarea>
  5319.                             {% endif %}
  5320.                         </div>
  5321.                     </div>
  5322.                     <div class=\"uv-pop-up-actions\">
  5323.                         <input class=\"uv-btn update\" href=\"#\" value=\"Update\" type=\"submit\">
  5324.                         <input class=\"uv-btn cancel\" href=\"#\" value=\"Discard\" type=\"button\">
  5325.                     </div>
  5326.                 </form>
  5327.             </div>
  5328.         </div>
  5329.     {% endif %}
  5330.     {{ uvdesk_extensibles.getRegisteredComponent(\"Webkul\\\\UVDesk\\\\CoreFrameworkBundle\\\\Tickets\\\\WidgetCollection\").embedSideFilterContent()|raw }}
  5331. {% endblock %}
  5332. {% block footer %}
  5333.     {{ parent() }}
  5334.     {{ include('@UVDeskCoreFramework\\\\Templates\\\\attachment.html.twig') }}
  5335.     {{ include(\"@UVDeskCoreFramework/Templates/tinyMCE.html.twig\") }}
  5336.     <script id=\"thread_list_empty_tmp\" type=\"text/template\">
  5337.         <div class=\"uv-no-threads\">{{ 'Nothing interesting here...'|trans }}</div>
  5338.     </script>
  5339.     <script> 
  5340.         \$(document).ready(function() {
  5341.             \$(\"#filterSavedreplies\").on(\"keyup\", function() {
  5342.                 if (this.value.length && this.value.length != '') {
  5343.                     var that = this;
  5344.                     \$(\"#listSavedReplies li\").hide().filter(function() {
  5345.                         return \$(this).html().toLowerCase().indexOf(that.value.toLowerCase()) !== -1;
  5346.                     }).show();
  5347.                 } else {
  5348.                     \$(\"#listSavedReplies li\").show()
  5349.                 }
  5350.             });
  5351.             \$(\".uv-dropdown-btn\").click(function(event) {
  5352.                 setTimeout(function() {
  5353.                     \$(\".uv-search-inline\").focus();
  5354.                 }, 100);
  5355.             });
  5356.         });
  5357.     </script>
  5358.     <script id=\"thread_list_item_tmp\" type=\"text/template\">
  5359.         <div class=\"uv-ticket-strip\">
  5360.             <span>
  5361.                 <% if(typeof(mailStatus) != 'undefined' && mailStatus) { %>
  5362.                     <a href=\"https://support.uvdesk.com/en/blog/uvdesk-ticket-delivery-status\" target=\"_blank\">
  5363.                         <span class=\"uv-mail-status uv-mail-<%- mailStatus.split(',')[0] %>\" <% if(mailStatus !== 'pending') { %>data-toggle=\"tooltip\" data-placement=\"right\" title=\"{{ 'Mail status:'|trans }} <%- mailStatus.split(',')[0] %> <% if(mailStatus.split(',').length > 1) { print('Reason:' + mailStatus.split(',')[1] ); } %> \"<% } %> ></span>
  5364.             </a>
  5365.             <% } %>
  5366.             <span class=\"timeago uv-margin-0\" data-timestamp=\"<%- timestamp %>\" title=\"<%- formatedCreatedAt %>\">
  5367.                     <%- formatedCreatedAt %>
  5368.                 </span>
  5369.             - <%- fullname %>
  5370.             <span class=\"uv-ticket-strip-label\">
  5371.                 <% if(threadType == 'reply') { %>
  5372.                     {{ 'replied'|trans }}
  5373.                 <% } else if(threadType == 'note') { %>
  5374.                     {{ 'added note'|trans }}
  5375.                 <% } else if(threadType == 'forward') { %>
  5376.                     {{ 'forwarded'|trans }}
  5377.                 <% } %>
  5378.                 - <a href=\"#thread/<%- id %>\" id=\"thread<%- id %>\" class=\"copy-thread-link\">#<%- id %></a>
  5379.                 </span>
  5380.             </span>
  5381.             <% if((replyTo && threadType ==  'forward') || cc || bcc) { %>
  5382.                 <div class=\"uv-ticket-strip\">
  5383.                     <% if(replyTo && threadType ==  'forward') { %>
  5384.                     <span><span class=\"uv-ticket-strip-label\">{{ 'TO'|trans }} -</span> <%- replyTo %></span>
  5385.                     <% } if(cc) { %>
  5386.                     <span><span class=\"uv-ticket-strip-label\">{{ 'CC'|trans }} -</span> <%- cc %></span>
  5387.                     <% } if(bcc) { %>
  5388.                     <span><span class=\"uv-ticket-strip-label\">{{ 'BCC'|trans }} -</span> <%- bcc %></span>
  5389.                     <% } %>
  5390.                 </div>
  5391.             <% } %>
  5392.         </div>
  5393.         <div class=\"uv-ticket-strip uv-margin-top-5\" <% if(!bookmark && !isLocked) { %>style=\"display: none\"<% } %> >
  5394.             <span <% if(!bookmark) { %>style=\"display: none\"<% } %> >
  5395.                     <span class=\"uv-icon-pinned\"></span>
  5396.                     {{ 'Pinned'|trans }}
  5397.                     </span>
  5398.             <span <% if(!isLocked) { %>style=\"display: none\"<% } %> >
  5399.                 <span class=\"uv-icon-locked\"></span>
  5400.                 {{ 'Locked'|trans }}
  5401.             </span>
  5402.         </div>
  5403.         <div class=\"uv-ticket-main-lt\">
  5404.             <span class=\"uv-thread-action\">
  5405.                 <span class=\"uv-icon-ellipsis uv-dropdown-other\"></span>
  5406.                 <div class=\"uv-dropdown-list uv-bottom-left\">
  5407.                     <div class=\"uv-dropdown-container\">
  5408.                         <ul>
  5409.                             {% if user_service.isAccessAuthorized('ROLE_AGENT_EDIT_THREAD_NOTE') %}
  5410.                                 <% if (userType != 'system' && userType != 'System') { %>
  5411.                                     <li data-action=\"edit\">{{ 'Edit Thread'|trans }}</li>
  5412.                                 <% } %>
  5413.                             {% endif %}
  5414.                             {% if user_service.isAccessAuthorized('ROLE_AGENT_DELETE_THREAD_NOTE') %}
  5415.                                 <li data-action=\"delete\">{{ 'Delete Thread'|trans }}</li>
  5416.                             {% endif %}
  5417.                             <li data-action=\"forward\">{{ 'Forward'|trans }}</li>
  5418.                             <% if(bookmark) { %>
  5419.                                 <li data-action=\"pin\" data-id=\"1\">{{ 'Unpin Thread'|trans }}</li>
  5420.                             <% } else { %>
  5421.                                 <li data-action=\"pin\" data-id=\"0\">{{ 'Pin Thread'|trans }}</li>
  5422.                             <% } %>
  5423.                             <% if(threadType != 'note') { %>
  5424.                                 {% if user_service.isAccessAuthorized('ROLE_AGENT_MANAGE_LOCK_AND_UNLOCK_THREAD') %}
  5425.                                     <% if(isLocked) { %>
  5426.                                         <li data-action=\"lock\" data-id=\"1\">{{ 'Unlock Thread'|trans }}</li>
  5427.                                     <% } else { %>
  5428.                                         <li data-action=\"lock\" data-id=\"0\">{{ 'Lock Thread'|trans }}</li>
  5429.                                     <% } %>
  5430.                                 {% endif %}
  5431.                             <% } %>
  5432.                             <li style=\"display: none;\" data-action=\"translate\">{{ 'Translate Thread'|trans }}</li>
  5433.                         </ul>
  5434.                     </div>
  5435.                 </div>
  5436.             </span>
  5437.             <span class=\"p-relative\">
  5438.                 
  5439.             </span>
  5440.             <% if (userType != 'system' && userType != 'System') { %>
  5441.                 <% if(user && user.smallThumbnail != null) { %>
  5442.                     <img src=\"{{ app.request.scheme ~'://' ~ app.request.httpHost ~ asset('') }}<%- user.smallThumbnail %>\" />
  5443.                 <% } else { %>
  5444.                     <img src=\"<% if(userType == 'agent') { %> {{ asset(default_agent_image_path) }} <% } else { %> {{ asset(default_customer_image_path) }} <% } %>\" />
  5445.                 <% } %>
  5446.             <% } else { %>
  5447.                 <img src=\"{{ asset(default_helpdesk_image_path) }}\" />
  5448.             <% } %>
  5449.         </div>
  5450.         <div class=\"uv-ticket-main-rt\">
  5451.             <% if(userType == 'customer') { %>
  5452.                 <a <% if(user) { %>href=\"{{ path('helpdesk_member_manage_customer_account') }}/<%- user.id %>\"<% } %> class=\"uv-ticket-member-name\">
  5453.                 <%- fullname %>
  5454.                 </a>
  5455.             <% } else if(userType == 'agent') { %>
  5456.                 <a <% if(user) { %>href=\"{{ path('helpdesk_member_account') }}/<%- user.id %>\"<% } %> class=\"uv-ticket-member-name\">
  5457.                 <%- fullname %>
  5458.                 </a>
  5459.             <% } else { %>
  5460.                 <span class=\"uv-ticket-member-name\">
  5461.                     <%- fullname %>
  5462.                 </span>
  5463.             <% } %>
  5464.             <!-- Message Block -->
  5465.             <div class=\"message\">
  5466.                 <%= reply %>
  5467.             </div>
  5468.             <!-- Attachment Block -->
  5469.             <% if(attachments.length) { %>
  5470.             <div class=\"uv-ticket-uploads\">
  5471.                 <h4>{{ 'Uploaded Files'|trans }}</h4>
  5472.                 <div class=\"uv-ticket-uploads-strip\">
  5473.                     <% _.each(attachments, function(file) { %>
  5474.                     <a href=\"<%-file.downloadURL %>\" target =\"_blank\" class=\"uv-ticket-uploads-brick uv-no-pointer-events\" data-toggle=\"tooltip\" title=\"<%- file.name %>\">
  5475.                         <img src=\"<%-file.iconURL %>\" class=\"uv-auto-pointer-events\">
  5476.                     </a>
  5477.                     <% }) %>
  5478.                 </div>
  5479.                 <% if (attachments.length > 1) { %>
  5480.                 <div class=\"thread-attachments-zip pull-left\">
  5481.                     <div class=\"uv-upload-actions\">
  5482.                         <a href=\"#\" class=\"uv-open-in-files\" data-thread=\"<%- id %>\" style=\"display: none\"><span class=\"uv-icon-open-in-files\"></span>{{ 'Open in Files'|trans }}</a>
  5483.                         <% if(attachments.length > 0) { %>
  5484.                         <a href=\"{{ path('helpdesk_member_ticket_download_attachment_zip') }}/<%- id %>\" target=\"_blank\"><span class=\"uv-icon-attachment\"></span> {{ 'Download (as .zip)'|trans }}</a>
  5485.                         <% } %>
  5486.                     </div>
  5487.                 </div>
  5488.                 <% } %>
  5489.             </div>
  5490.             <% } %>
  5491.         </div>
  5492.     </script>
  5493.     <script id=\"edit_thread_tmp\" type=\"text/template\">
  5494.         <div class=\"thread-edit-container\">
  5495.             <div class=\"uv-element-block uv-element-block-textarea\">
  5496.                 <div class=\"uv-field-block\">
  5497.                     <textarea id=\"uv-edit-thread\">
  5498.                     </textarea>
  5499.                 </div>
  5500.             </div>
  5501.             <div class=\"uv-action-buttons\">
  5502.                 <a class=\"uv-btn cancel-edit\" type=\"button\">{{ 'Cancel'|trans }}</a>
  5503.                 <a class=\"uv-btn saveThread\" type=\"button\" style=\"margin-right: 10px;\">{{ 'Update'|trans }}</a>
  5504.             </div>
  5505.         </div>
  5506.     </script>
  5507.     <script id=\"ticket_quick_navigation_tmp\" type=\"text/template\">
  5508.         <% if(prev) { %>
  5509.             <a class=\"uv-btn-stroke\" href=\"{{ path('helpdesk_member_ticket') }}/<%- prev %>\">
  5510.                 <span class=\"uv-icon-previous\"></span>
  5511.                 {{ 'Previous Ticket'|trans }}
  5512.             </a>
  5513.         <% } else { %>
  5514.             <a class=\"uv-btn-stroke\" disabled=\"disabled\">
  5515.                 <span class=\"uv-icon-previous\"></span>
  5516.                 {{ 'Previous Ticket'|trans }}
  5517.             </a>
  5518.         <% } %>
  5519.         <% if(next) { %>
  5520.             <a class=\"uv-btn-stroke\" href=\"{{ path('helpdesk_member_ticket') }}/<%- next %>\">
  5521.                 {{ 'Next Ticket'|trans }}
  5522.                 <span class=\"uv-icon-next\"></span>
  5523.             </a>
  5524.         <% } else { %>
  5525.             <a class=\"uv-btn-stroke\" disabled=\"disabled\">
  5526.                 {{ 'Next Ticket'|trans }}
  5527.                 <span class=\"uv-icon-next\"></span>
  5528.             </a>
  5529.         <% } %>
  5530.     </script>
  5531.     <script type=\"text/javascript\">
  5532.         uvdesk = {
  5533.             ticket: {}
  5534.         };
  5535.         var ticketApp = {};
  5536.         viewerImages = function() {
  5537.             if (typeof(\$().viewer == 'function')) {
  5538.                 \$('.uv-ticket-uploads .uv-ticket-uploads-strip').viewer({
  5539.                     'url': 'data-url',
  5540.                     'downloadBase': \"{{ path('helpdesk_member_ticket_download_attachment') }}\",
  5541.                     'download': 'data-download',
  5542.                 });
  5543.             }
  5544.         };
  5545.         \$(function () {
  5546.             var threadIds = [];
  5547.             viewerImages();
  5548.             _.extend(Backbone.Model.prototype, Backbone.Validation.mixin);
  5549.             // Ticket Model
  5550.             var TicketModel = Backbone.Model.extend({
  5551.                 idAttribute : \"id\",
  5552.                 urlRoot : \"{{ path('helpdesk_member_update_ticket_attributes_xhr') }}\",
  5553.                 validation: {
  5554.                     'email': [{
  5555.                         required: true,
  5556.                         msg: '{{ \"This field is mandatory\" | trans}}'
  5557.                     },{
  5558.                         pattern: /^[a-zA-Z0-9.!#\$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*\$/,
  5559.                         msg: 'Please enter a valid email'
  5560.                     }],
  5561.                     'subject' : {
  5562.                         required : true,
  5563.                         msg : '{{ \"This field is mandatory\" | trans}}'
  5564.                     },
  5565.                     'reply' : {
  5566.                         fn: function(value) {
  5567.                             if(!tinyMCE.get(\"uv-edit-create-thread\"))
  5568.                                 return false;
  5569.                             var html = tinyMCE.get(\"uv-edit-create-thread\").getContent();
  5570.                             if(app.appView.stripHTML(html) != '') {
  5571.                                 return false;
  5572.                             }
  5573.                             return true;
  5574.                         },
  5575.                         msg : '{{ \"This field is mandatory\" | trans}}'
  5576.                     }
  5577.                 },
  5578.             });
  5579.             // Thread Model
  5580.             var ThreadModel = Backbone.Model.extend({
  5581.                 idAttribute : \"id\",
  5582.                 defaults : {
  5583.                     hasTask : 0,
  5584.                     task: null
  5585.                 }
  5586.             });
  5587.             // Customer Model
  5588.             var CustomerModel = Backbone.Model.extend({
  5589.                 validation: {
  5590.                     'name': [{
  5591.                         required: true,
  5592.                         msg: '{{ \"This field is mandatory\" }}'
  5593.                     }, {
  5594.                         pattern: /^((?![!@#\$%^&*()<_+]).)*\$/,
  5595.                         msg: '{{ \"This field must have characters only\"}}'
  5596.                     }],
  5597.                     'email': [{
  5598.                         required: true,
  5599.                         msg: '{{ \"This field is mandatory\" | trans}}'
  5600.                     },{
  5601.                         pattern: /^[a-zA-Z0-9.!#\$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*\$/,
  5602.                         msg: '{{ \"Email address is invalid\" | trans}}'
  5603.                     }],
  5604.                     'contactNumber': function(value) {
  5605.                         if(value != undefined && value !== '') {
  5606.                             if (!value.match('^\\\\s*(?:\\\\+?(\\\\d{1,3}))?[-. (]*(\\\\d{3})[-. )]*(\\\\d{3})[-. ]*(\\\\d{4})(?: *x(\\\\d+))?\\\\s*\$'))
  5607.                                 return 'Contact number is invalid';
  5608.                         }
  5609.                     }
  5610.                 },
  5611.                 urlRoot : \"{{ path('helpdesk_member_manage_customer_account') }}\"
  5612.             });
  5613.             // Ticket Collaborator Model
  5614.             var CollaboratorModel = Backbone.Model.extend({
  5615.                 idAttribute : \"id\",
  5616.                 validation: {
  5617.                     'email': [{
  5618.                         required: true,
  5619.                         msg: '{{ \"This field is mandatory\" | trans}}'
  5620.                     },{
  5621.                         pattern: /^[a-zA-Z0-9.!#\$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*\$/,
  5622.                         msg: '{{ \"Please enter a valid email\" | trans}}'
  5623.                     }]
  5624.                 },
  5625.                 defaults : {
  5626.                     ticketId : {{ ticket.id }},
  5627.                     email: ''
  5628.                 },
  5629.                 parse: function (resp, options) {
  5630.                     return resp.collaborator;
  5631.                 },
  5632.                 urlRoot : \"{{ path('helpdesk_member_ticket_manage_collaborators_xhr') }}\"
  5633.             });
  5634.             // Ticket Tag Model
  5635.             var TagModel = Backbone.Model.extend({
  5636.                 idAttribute : \"id\",
  5637.                 defaults : {
  5638.                     ticketId : {{ ticket.id }}
  5639.                 },
  5640.                 parse: function (resp, options) {
  5641.                     return resp.tag;
  5642.                 },
  5643.                 urlRoot : \"{{ path('helpdesk_member_ticket_create_tag_xhr') }}\"
  5644.             });
  5645.             // Ticket Label Model
  5646.             var LabelModel = Backbone.Model.extend({
  5647.                 idAttribute : \"id\",
  5648.                 defaults : {
  5649.                     ticketId : {{ ticket.id }}
  5650.                 },
  5651.                 parse: function (resp, options) {
  5652.                     return resp.label;
  5653.                 },
  5654.                 urlRoot : \"{{ path('helpdesk_member_ticket_add_label_xhr') }}\"
  5655.             });
  5656.             // Ticket Thread Collection
  5657.             var ThreadCollection = AppCollection.extend({
  5658.                 model : ThreadModel,
  5659.                 mode: \"infinite\",
  5660.                 url : \"{{ path('helpdesk_member_thread_collection_xhr', {'ticketId': ticket.id}) }}\",
  5661.                 firstScrollCheck: false,
  5662.                 threadRequestedId: false,
  5663.                 template : \$(\"#thread_list_empty_tmp\").html(),
  5664.                 parseRecords: function (resp, options) {
  5665.                     return resp.threads;
  5666.                 },
  5667.                 syncData : function() {
  5668.                     type = \$(\".uv-ticket-action-bar-lt .uv-tabs .uv-tab-active\").attr('data-type')
  5669.                     var self = this;
  5670.                     var data = {
  5671.                         threadType: type
  5672.                     };
  5673.                     if(this.threadRequestedId)
  5674.                         data.threadRequestedId = this.threadRequestedId;
  5675.                     app.appView.showLoader()
  5676.                     this.fetch({
  5677.                         data : data,
  5678.                         remove: false,
  5679.                         success: function(model, response) {
  5680.                             app.appView.hideLoader();
  5681.                             self.threadRequestedId = false;
  5682.                             pagination.renderPagination(response.pagination);
  5683.                             threadCollection.state.currentPage = parseInt(response.pagination.current) + 1;
  5684.                             if(response.pagination.totalCount <= 0){
  5685.                                 this.\$('.uv-ticket-wrapper.thread-list').html(self.template);
  5686.                             }
  5687.                         },
  5688.                         error: function (model, xhr, options) {
  5689.                             if(url = xhr.getResponseHeader('Location'))
  5690.                                 window.location = url;
  5691.                         }
  5692.                     }).done(function(){
  5693.                         viewerImages();
  5694.                         if(!self.firstScrollCheck){
  5695.                             self.firstScrollCheck = true;
  5696.                             var fragment = Backbone.history.fragment.trim();
  5697.                             if(fragment == '') {
  5698.                                 router.scrollPage('#reply');
  5699.                             } else
  5700.                                 router.scrollPage('#' + fragment.replace('thread/', 'thread'));
  5701.                         }
  5702.                     });
  5703.                 }
  5704.             });
  5705.             // Ticket Collaborator Collection
  5706.             var CollaboratorCollection = Backbone.PageableCollection.extend({
  5707.                 model : CollaboratorModel
  5708.             });
  5709.             // Ticket Tag Collection
  5710.             var TagCollection = Backbone.PageableCollection.extend({
  5711.                 model : TagModel,
  5712.                 isTagExist : function(name) {
  5713.                     var flag = 1;
  5714.                     _.each(tagCollection.models, function (item) {
  5715.                         if(item.get('name').toUpperCase() == name.toUpperCase())
  5716.                             flag = 0;
  5717.                     }, this);
  5718.                     return flag;
  5719.                 }
  5720.             });
  5721.             // Ticket Label Collection
  5722.             var LabelCollection = Backbone.PageableCollection.extend({
  5723.                 model : TagModel,
  5724.                 isLabelExist : function(name) {
  5725.                     var flag = 1;
  5726.                     _.each(labelCollection.models, function (item) {
  5727.                         if(item.get('name').toUpperCase() == name.toUpperCase())
  5728.                             flag = 0;
  5729.                     }, this);
  5730.                     return flag;
  5731.                 }
  5732.             });
  5733.             // Customer Form View
  5734.             var CustomerForm = Backbone.View.extend({
  5735.                 events : {
  5736.                     'click .uv-btn.update-btn' : \"saveCustomer\",
  5737.                     'blur input': 'formChanegd',
  5738.                     'click .cancel-btn': 'backToInfo',
  5739.                     'click .uv-aside-back': 'backToInfo'
  5740.                 },
  5741.                 initialize : function() {
  5742.                     Backbone.Validation.bind(this);
  5743.                 },
  5744.                 formChanegd: function(e) {
  5745.                     this.model.set(Backbone.\$(e.currentTarget).attr('name'), Backbone.\$(e.currentTarget).val())
  5746.                     this.model.isValid([Backbone.\$(e.currentTarget).attr('name')])
  5747.                 },
  5748.                 saveCustomer: function (e) {
  5749.                     e.preventDefault();
  5750.                     currentElement = Backbone.\$(e.currentTarget);
  5751.                     this.model.clear();
  5752.                     this.model.set(this.\$el.find('form').serializeObject());
  5753.                     self = this;
  5754.                     if(this.model.isValid(true)) {
  5755.                         app.appView.showLoader();
  5756.                         currentElement.attr('disabled', 'disabled');
  5757.                         this.model.save({}, {
  5758.                             success: function (model, response, options) {
  5759.                                 app.appView.hideLoader();
  5760.                                 currentElement.removeAttr(\"disabled\");
  5761.                                 if(response.alertClass == \"success\") {
  5762.                                     app.appView.renderResponseAlert(response);
  5763.                                     \$('.uv-aside-customer-info').html(\"<span>\" + self.model.attributes.name + \"</span><span>\" + self.model.attributes.email + \"</span><span>\" + self.model.attributes.contactNumber + \"</span><span class='uv-customize'></span>\")
  5764.                                     self.backToInfo();
  5765.                                 } else if(response.errors) {
  5766.                                     self.addErrors(JSON.parse(response.errors));
  5767.                                 } else if(response.alertMessage) {
  5768.                                     app.appView.renderResponseAlert(response);
  5769.                                 }
  5770.                             },
  5771.                             error: function (model, xhr, options) {
  5772.                                 if(url = xhr.getResponseHeader('Location'))
  5773.                                     window.location = url;
  5774.                                 app.appView.hideLoader();
  5775.                                 app.appView.renderResponseAlert(warningResponse);
  5776.                             }
  5777.                         });
  5778.                     }
  5779.                 },
  5780.                 addErrors: function(jsonContext) {
  5781.                     for (var field in jsonContext) {
  5782.                         Backbone.Validation.callbacks.invalid(this, field, jsonContext[field], 'input');
  5783.                     }
  5784.                 },
  5785.                 backToInfo: function(e) {
  5786.                     if(e)
  5787.                         e.preventDefault()
  5788.                     \$('.uv-main-info-update-block').hide()
  5789.                     \$('.uv-main-info-block').show()
  5790.                 },
  5791.             });
  5792.             // Ticket View
  5793.             var TicketView = Backbone.View.extend({
  5794.                 el: \$('.uv-wrapper'),
  5795.                 stopDraftSaveFlag: 0,
  5796.                 events: {
  5797.                     'click .uv-ticket-action .uv-dropdown-list li[data-action=\"spam\"], .uv-ticket-action .uv-dropdown-list li[data-action=\"closed\"]': 'masrkSpamAndClosed',
  5798.                     'click .uv-aside-ticket-actions .uv-aside-select .uv-dropdown-list li': 'editTicketProperty',
  5799.                     'click .uv-aside-customer-info .uv-customize': 'showCustomerUpdateBlock',
  5800.                     'click .uv-ticket-head .uv-star-large': 'updateStar',
  5801.                     'click .uv-ticket-action-bar .uv-tabs li': 'filterThread',
  5802.                     'click .uv-ticket-action .uv-dropdown-list li[data-action=\"delete\"]': 'confirmRemove',
  5803.                     'click .uv-ticket-action .uv-dropdown-list li[data-action=\"lock\"]': 'lockAndUnlockThread',
  5804.                     'click .uv-element-block.collaborators .uv-btn-tag': 'removeCcCollaborator',
  5805.                     'keypress .uv-element-block.to .uv-dropdown-other': 'addToInput',
  5806.                     'click .uv-element-block.to .uv-dropdown-list li': 'addTo',
  5807.                     'click .to-list .uv-btn-tag': 'removeTo',
  5808.                     'change .uv-element-block.cc-bcc .cc-bcc-toggle': 'showCcBccBlock',
  5809.                     'keypress .uv-element-block.cc-bcc .uv-group-field.uv-dropdown-other': 'addCcBccInput',
  5810.                     'click .uv-element-block.cc-bcc .uv-dropdown-list li': 'addCcBcc',
  5811.                     'click .cc-bcc-list .uv-btn-tag, .to-list .uv-btn-tag': 'removeEmail',
  5812.                     'click .next-view .uv-dropdown-list li': 'setNextView',
  5813.                     'click .uv-dropdown.reply .uv-dropdown-list li, .uv-btn.forward': 'validateForm',
  5814.                     'click #edit-ticket-modal .uv-btn.update': 'updateTicket',
  5815.                     'click .message .uv-icon-ellipsis': 'showReplyQuote',
  5816.                     'input .uv-aside-brick .uv-field.uv-dropdown-other': 'searchFilterXhr',
  5817.                     'click .uv-dropdown-container.prepared-responses a:not(.create-new)': 'confirmPreparedResponses',
  5818.                     'click .uv-header-fix': 'fixheader',
  5819.                     'click .uv-ticket-action .uv-dropdown-list li[data-action=\"print\"]': 'printTicket',
  5820.                     'blur .uv-manual-enter': 'enterManualAdd',
  5821.                 },
  5822.                 ticketNavigationTemplate : _.template(\$(\"#ticket_quick_navigation_tmp\").html()),
  5823.                 loaderTemplate : _.template(\$(\"#loader-tmp\").html()),
  5824.                 targetPreparedResponseUrl: '',
  5825.                 initialize: function() {
  5826.                     Backbone.Validation.bind(this);
  5827.                     InitTinyMce('#uv-edit-create-thread');
  5828.                     \$('.uv-ticket-fixed-region .uv-ticket-fixed-region-rt').html(this.ticketNavigationTemplate(ticketNavigation))
  5829.                     var threadTab = localStorage.getItem(\"threadTab\");
  5830.                     if(threadTab){
  5831.                         \$('.uv-ticket-action-bar-lt .uv-tabs li').removeClass('uv-tab-active');
  5832.                         \$('.uv-ticket-action-bar-lt .uv-tabs [data-type=\"' + threadTab + '\"]').addClass('uv-tab-active');
  5833.                     }
  5834.                     nextView = localStorage.getItem(\"nextView\");
  5835.                     if(nextView) {
  5836.                         \$(\".next-view input\").val(nextView)
  5837.                         \$(\".next-view .uv-dropdown-btn\").text(\$(\"#reply .next-view .uv-dropdown-list li[data-value='\" + nextView + \"']\").text())
  5838.                     }
  5839.                     if(!localStorage.getItem('ticketTour')) {
  5840.                         \$('.uv-ticket-tour').show()
  5841.                     }
  5842.                     this.fixheaderInit();
  5843.                 },
  5844.                 printTicket: function(e) {
  5845.                     window.print();
  5846.                 },
  5847.                 enterManualAdd: function(e) {
  5848.                     var target = \$(e.target);
  5849.                     if(target.val()) {
  5850.                         var e = \$.Event(\"keypress\");
  5851.                         e.which = 13; //choose the one you want
  5852.                         target.trigger(e);
  5853.                     }
  5854.                 },
  5855.                 fixheader: function(e){
  5856.                     e.preventDefault();
  5857.                     var header = localStorage.getItem(\"fixHeader\");
  5858.                     header = !(header == 'true');
  5859.                     localStorage.setItem(\"fixHeader\", header);
  5860.                     this.fixheaderInit();
  5861.                 },
  5862.                 fixheaderInit: function(){
  5863.                     var header = localStorage.getItem(\"fixHeader\");
  5864.                     if(header == 'true'){
  5865.                         \$('a.uv-icon-pin').addClass('uv-icon-pinned');
  5866.                         \$('.uv-ticket-action-bar').addClass('uv-ticket-action-bar-fixed');
  5867.                     }else{
  5868.                         \$('a.uv-icon-pin').removeClass('uv-icon-pinned');
  5869.                         \$('.uv-ticket-action-bar').removeClass('uv-ticket-action-bar-fixed');
  5870.                     }
  5871.                 },
  5872.                 masrkSpamAndClosed: function(e) {
  5873.                     var currentElement = Backbone.\$(e.currentTarget);
  5874.                     var value = currentElement.attr('data-index');
  5875.                     \$(\".uv-aside-select .uv-dropdown-list ul.status li[data-index='\" + value + \"']\").trigger('click')
  5876.                 },
  5877.                 editTicketProperty: function(e) {
  5878.                     var currentElement = Backbone.\$(e.currentTarget);
  5879.                     var uvSelect = currentElement.parents('.uv-aside-select');
  5880.                     var field = currentElement.parent().attr('data-action');
  5881.                     var value = currentElement.attr('data-index');
  5882.                     if(uvSelect.find('.uv-aside-select-value').attr('data-id') != value) {
  5883.                         var name = currentElement.text().trim();
  5884.                         app.appView.showLoader();
  5885.                         this.model.save({attribute: field, value: value, id: this.model.id}, {
  5886.                             patch: true,
  5887.                             success: function (model, response, options) {
  5888.                                 uvSelect.find('.uv-aside-select-value').attr('data-id', value).text(name)
  5889.                                 if(field == 'priority') {
  5890.                                     uvSelect.find('.uv-list-ticket-priority').attr('style', 'background:' + currentElement.attr('data-color'));
  5891.                                 } else if(field == 'agent') {
  5892.                                     \$('.uv-ticket-strip .agent-info').show()
  5893.                                     \$('.uv-ticket-strip .agent-info .name').text(name)
  5894.                                 }
  5895.                                 app.appView.hideLoader();
  5896.                                 app.appView.renderResponseAlert(response);
  5897.                             },
  5898.                             error: function (model, xhr, options) {
  5899.                                 if(url = xhr.getResponseHeader('Location'))
  5900.                                     window.location = url;
  5901.                                 var response = warningResponse;
  5902.                                 if(xhr.responseJSON)
  5903.                                     response = xhr.responseJSON;
  5904.                                 app.appView.hideLoader();
  5905.                                 app.appView.renderResponseAlert(response);
  5906.                             }
  5907.                         });
  5908.                     }
  5909.                 },
  5910.                 showCustomerUpdateBlock: function() {
  5911.                     \$('.uv-main-info-update-block').show()
  5912.                     \$('.uv-main-info-block').hide()
  5913.                 },
  5914.                 updateStar: function(e) {
  5915.                     e.preventDefault();
  5916.                     var currentElement = Backbone.\$(e.currentTarget);
  5917.                     currentElement.toggleClass('uv-star-active')
  5918.                     this.model.save({id: this.model.id}, {
  5919.                         patch: true,
  5920.                         url : \"{{ path('helpdesk_member_bookmark_ticket_xhr') }}\",
  5921.                         success: function (model, response, options) {
  5922.                         },
  5923.                         error: function (model, xhr, options) {
  5924.                             if(url = xhr.getResponseHeader('Location'))
  5925.                                 window.location = url;
  5926.                         }
  5927.                     });
  5928.                 },
  5929.                 filterThread: function(e) {
  5930.                     var currentElement = Backbone.\$(e.currentTarget);
  5931.                     if(type = currentElement.attr('data-type')) {
  5932.                         localStorage.setItem(\"threadTab\", type);
  5933.                         if(type != 'all')
  5934.                             \$('.uv-ticket-main.create').hide()
  5935.                         else
  5936.                             \$('.uv-ticket-main.create').show()
  5937.                         \$('.uv-ticket-wrapper.thread-list').html('')
  5938.                         models = []
  5939.                         threadCollection.each(function(model) {
  5940.                             models.push(model)
  5941.                         })
  5942.                         total = threadCollection.models.length;
  5943.                         count = 0;
  5944.                         if(total) {
  5945.                             _.each(models, function (model) {
  5946.                                 threadCollection.remove(model)
  5947.                                 count++;
  5948.                                 if(total == count) {
  5949.                                     threadCollection.reset()
  5950.                                     threadCollection.state.currentPage = 1;
  5951.                                     threadCollection.syncData()
  5952.                                 }
  5953.                             });
  5954.                         } else {
  5955.                             threadCollection.reset()
  5956.                             threadCollection.state.currentPage = 1;
  5957.                             threadCollection.syncData()
  5958.                         }
  5959.                     }
  5960.                 },
  5961.                 confirmRemove: function(e) {
  5962.                     app.appView.openConfirmModal(this);
  5963.                 },
  5964.                 removeItem : function() {
  5965.                     if(this.model.attributes.isTrashed)
  5966.                         window.location.href = \"{{ path('helpdesk_member_delete_ticket', {'ticketId': ticket.id}) }}\";
  5967.                     else
  5968.                         window.location.href = \"{{ path('helpdesk_member_trash_ticket', {'ticketId': ticket.id}) }}\";
  5969.                 },
  5970.                 addCCCollaborators: function() {
  5971.                     if(collaboratorCollection.length) {
  5972.                         var collaboratorContainer = \$('.uv-element-block.collaborators');
  5973.                         collaboratorContainer.find('.uv-field-block').html('');
  5974.                         collaboratorContainer.show()
  5975.                         _.each(collaboratorCollection.models, function (item) {
  5976.                             var json = item.attributes;
  5977.                             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>\")
  5978.                         }, this);
  5979.                     }
  5980.                 },
  5981.                 removeCcCollaborator: function(e) {
  5982.                     e.preventDefault()
  5983.                     Backbone.\$(e.currentTarget).parent().remove();
  5984.                     var collaboratorContainer = \$('.uv-element-block.collaborators');
  5985.                     if(!collaboratorContainer.find('.uv-btn-tag').length)
  5986.                         collaboratorContainer.hide()
  5987.                 },
  5988.                 addToInput: function(e) {
  5989.                     var inputElement = Backbone.\$(e.currentTarget);
  5990.                     var currentTab = inputElement.parents('.uv-tab-view');
  5991.                     var email = inputElement.val().trim();
  5992.                     if (e.which === 13 && email) {
  5993.                         e.preventDefault()
  5994.                         if(!this.model.preValidate({name: 'email', email: email})) {
  5995.                             inputElement.val('').trigger('input')
  5996.                             inputElement.removeClass('uv-dropdown-btn-active')
  5997.                             inputElement.siblings('.uv-dropdown-list').hide()
  5998.                             if(!currentTab.find(\".to-list input[value='\" + email + \"'].to\").length) {
  5999.                                 currentTab.find('.to-list').append(\"<span><input type='hidden' name='to[]' value='\" + email + \"' class='to'/><a class='uv-btn-tag' href='#'><span class='uv-icon-remove-dark-before'></span>\" + email + \"</span></a></span>\")
  6000.                             }
  6001.                         }
  6002.                     }
  6003.                 },
  6004.                 addTo: function(e) {
  6005.                     var currentTab = Backbone.\$(e.currentTarget).parents('.uv-tab-view');
  6006.                     var email =  Backbone.\$(e.currentTarget).attr('data-id');
  6007.                     if(!currentTab.find(\".to-list input[value='\" + email + \"'].to\").length) {
  6008.                         currentTab.find('.to-list').append(\"<span><input type='hidden' name='to[]' value='\" + email + \"' class='to'/><a class='uv-btn-tag' href='#'><span class='uv-icon-remove-dark-before'></span>\" + email + \"</span></a></span>\")
  6009.                     }
  6010.                 },
  6011.                 showCcBccBlock: function(e) {
  6012.                     var currentElement = Backbone.\$(e.currentTarget);
  6013.                     var currentTab = currentElement.parents('.uv-tab-view');
  6014.                     if(currentElement.is(':checked')) {
  6015.                         currentTab.find('.uv-element-block.cc-bcc').find('.uv-field-block').show()
  6016.                     } else {
  6017.                         currentTab.find('.uv-element-block.cc-bcc').find('.uv-field-block').hide()
  6018.                         currentTab.find('.uv-element-block .cc-bcc-list').html('')
  6019.                     }
  6020.                 },
  6021.                 addCcBccInput: function(e) {
  6022.                     var inputElement = Backbone.\$(e.currentTarget);
  6023.                     var currentTab = inputElement.parents('.uv-tab-view');
  6024.                     var email = inputElement.val().trim();
  6025.                     if (e.which === 13 && email) {
  6026.                         e.preventDefault()
  6027.                         type = currentTab.find('.cc-bcc-select option:selected').text()
  6028.                         if(!this.model.preValidate({name: 'email', email: email})) {
  6029.                             inputName = \$('.cc-bcc-select').val()
  6030.                             inputElement.val('').trigger('input')
  6031.                             inputElement.removeClass('uv-dropdown-btn-active')
  6032.                             inputElement.siblings('.uv-dropdown-list').hide()
  6033.                             if(!currentTab.find(\".cc-bcc-list input[value='\" + email + \"'].\" + inputName).length) {
  6034.                                 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><span class='uv-uppercase' style='margin-right: 4px;'>\" + type + \":</span>\" + email + \"</a></span>\")
  6035.                             }
  6036.                         }
  6037.                     }
  6038.                 },
  6039.                 addCcBcc: function(e) {
  6040.                     var currentTab = Backbone.\$(e.currentTarget).parents('.uv-tab-view');
  6041.                     var email =  Backbone.\$(e.currentTarget).attr('data-id');
  6042.                     type = currentTab.find('.cc-bcc-select option:selected').text()
  6043.                     inputName = currentTab.find('.cc-bcc-select').val()
  6044.                     if(!currentTab.find(\".cc-bcc-list input[value='\" + email + \"'].\" + inputName).length) {
  6045.                         currentTab.find('.uv-element-block.cc-bcc .uv-group-field.uv-dropdown-other').val('').trigger('input')
  6046.                         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><span class='uv-uppercase' style='margin-right: 4px;'>\" + type + \":</span>\" + email + \"</a></span>\")
  6047.                     }
  6048.                 },
  6049.                 removeEmail: function(e) {
  6050.                     e.preventDefault()
  6051.                     Backbone.\$(e.currentTarget).parent().remove();
  6052.                 },
  6053.                 setNextView: function(e) {
  6054.                     var currentElement = Backbone.\$(e.currentTarget);
  6055.                     var nextView = currentElement.attr('data-value');
  6056.                     localStorage.setItem(\"nextView\", nextView);
  6057.                     \$(\".next-view input\").val(nextView)
  6058.                     \$(\".next-view .uv-dropdown-btn\").text(currentElement.text())
  6059.                 },
  6060.                 validateForm : function(e) {
  6061.                     e.preventDefault();
  6062.                     var element = Backbone.\$(e.currentTarget);
  6063.                     formType = element.parents('.uv-tab-view.uv-tab-view-active').attr('id');
  6064.                     form = element.parents('form');
  6065.                     form.find('.reply-status').val(element.attr('data-id'));
  6066.                     form.find('.uv-field-message').remove()
  6067.                     var html = tinyMCE.get(formType + \"-area\").getContent();
  6068.                     if(app.appView.htmlText(html) != '' || -1 != html.indexOf('<img')) {
  6069.                         if(formType == 'forward') {
  6070.                             if(!form.find(\".to-list input.to\").length) {
  6071.                                 \$('.uv-element-block.to').append(\"<span class='uv-field-message'>{{ 'This field is mandatory'|trans }}</span>\")
  6072.                             } else {
  6073.                                 this.stopDraftSaveFlag = 1;
  6074.                                 app.appView.showLoader();
  6075.                                 tinyMCE.activeEditor.uploadImages(function(response) {
  6076.                                     app.appView.hideLoader();
  6077.                                     form.submit();
  6078.                                     \$('.uv-btn.forward').attr('disabled', 'disabled');
  6079.                                 });
  6080.                             }
  6081.                         } else {
  6082.                             this.stopDraftSaveFlag = 1;
  6083.                             if(localStorage) {
  6084.                                 localStorage.setItem(\"threadTab\", \"all\");
  6085.                             }
  6086.                             app.appView.showLoader();
  6087.                             tinyMCE.activeEditor.uploadImages(function(response) {
  6088.                                 app.appView.hideLoader();
  6089.                                 form.submit();
  6090.                                 \$('.uv-dropdown.reply').find('.uv-btn').attr('disabled', 'disabled');
  6091.                             });
  6092.                         }
  6093.                     } else {
  6094.                         form.find('.uv-element-block-textarea').append(\"<span class='uv-field-message'>{{ 'This field is mandatory'|trans }}</span>\");
  6095.                         if(formType == 'forward') {
  6096.                             if(!form.find(\".to-list input.to\").length) {
  6097.                                 \$('.uv-element-block.to').append(\"<span class='uv-field-message'>{{ 'This field is mandatory'|trans }}</span>\")
  6098.                             }
  6099.                         }
  6100.                     }
  6101.                 },
  6102.                 updateTicket: function(e) {
  6103.                     e.preventDefault();
  6104.                     this.model.set(\$('#edit-ticket-modal form').serializeObject());
  6105.                     if(this.model.isValid(['subject', 'reply'])) {
  6106.                         \$('#edit-ticket-modal form').find('.uv-btn').attr('disabled', 'disabled');
  6107.                         \$('#edit-ticket-modal form').submit();
  6108.                     }
  6109.                 },
  6110.                 showReplyQuote: function(e) {
  6111.                     Backbone.\$(e.currentTarget).next().toggle();
  6112.                 },
  6113.                 searchFilterXhr: _.debounce(function(e) {
  6114.                     currentElement = Backbone.\$(e.currentTarget);
  6115.                     var parent = currentElement.parent();
  6116.                     if(\$('.uv-dropdown-other.uv-dropdown-btn-active').parent().attr('id') != parent.attr('id'))
  6117.                         return;
  6118.                     parent.find(\"li:not(.uv-no-results, .uv-filter-info)\").remove();
  6119.                     parent.find(\".uv-filter-info\").show()
  6120.                     if(currentElement.val().length > 1) {
  6121.                         parent.append(this.loaderTemplate())
  6122.                         parent.find('.uv-filter-info').text(\"{% trans %}Searching{% endtrans %} ...\")
  6123.                         if(self.xhrReq)
  6124.                             self.xhrReq.abort();
  6125.                         self.xhrReq = \$.ajax({
  6126.                             url : \"{{ path('helpdesk_member_ticket_search_filter_options') }}\",
  6127.                             type : 'GET',
  6128.                             data: {\"type\" : currentElement.attr('data-type'), \"query\": currentElement.val()},
  6129.                             dataType : 'json',
  6130.                             success : function(response) {
  6131.                                 self.xhrReq = 0;
  6132.                                 parent.find('.uv-loader').remove()
  6133.                                 parent.find('.uv-filter-info').text(\"{{ 'Type atleast 2 letters'|trans }}\").hide();
  6134.                                 if(response.length == 0) {
  6135.                                     parent.find('.uv-no-results').show();
  6136.                                     parent.find('.uv-no-results').disabled = true;
  6137.                                 } else {
  6138.                                     parent.find('.uv-no-results').hide();
  6139.                                     _.each(response, function(item) {
  6140.                                         parent.find('.uv-dropdown-list ul').append(\"<li data-id='\" + item.id + \"'>\" + item.name + \"</li>\")
  6141.                                     });
  6142.                                 }
  6143.                             },
  6144.                             error: function (xhr) {
  6145.                                 self.xhrReq = 0;
  6146.                                 parent.find('.uv-loader').remove()
  6147.                                 parent.find('.uv-no-results').hide();
  6148.                                 parent.find('.uv-filter-info').text(\"{{ 'Type atleast 2 letters'|trans }}\").show();
  6149.                                 if(url = xhr.getResponseHeader('Location'))
  6150.                                     window.location = url;
  6151.                             }
  6152.                         });
  6153.                     } else {
  6154.                         parent.find('.uv-no-results').hide();
  6155.                     }
  6156.                 },1000)
  6157.             });
  6158.             // Ticket Thread View
  6159.             var ThreadItem = Backbone.View.extend({
  6160.                 tagName : \"div\",
  6161.                 className : \"uv-ticket-main\",
  6162.                 template : _.template(\$(\"#thread_list_item_tmp\").html()),
  6163.                 editThreadTemplate : _.template(\$(\"#edit_thread_tmp\").html()),
  6164.                 events : {
  6165.                     'click .uv-thread-action .uv-dropdown-list li[data-action=\"delete\"]': 'confirmRemove',
  6166.                     'click .uv-thread-action .uv-dropdown-list li[data-action=\"lock\"]': 'lockAndUnlockThread',
  6167.                     'click .uv-thread-action .uv-dropdown-list li[data-action=\"pin\"]': 'pinThread',
  6168.                     'click .uv-thread-action .uv-dropdown-list li[data-action=\"mark\"]': 'markForTask',
  6169.                     'click .uv-thread-action .uv-dropdown-list li[data-action=\"forward\"]' : 'forwardThread',
  6170.                     'click .uv-thread-action .uv-dropdown-list li[data-action=\"edit\"]' : 'editThread',
  6171.                     'click .uv-btn.cancel-edit' : 'cancelEdit',
  6172.                     'click .uv-btn.saveThread' : 'updateThread',
  6173.                     'click .copy-thread-link' : 'copyThreadLink',
  6174.                     'blur .input-copy-thread-link': 'removeCopyThreadLink'
  6175.                 },
  6176.                 render : function () {
  6177.                     this.\$el.html(this.template(this.model.toJSON()));
  6178.                     this.\$el.addClass(\"thread-\" + this.model.id)
  6179.                     if(this.model.attributes.threadType == 'note')
  6180.                         this.\$el.addClass('uv-ticket-note')
  6181.                     return this;
  6182.                 },
  6183.                 unrender : function(response) {
  6184.                     if(response.alertMessage != undefined) {
  6185.                         var self = this;
  6186.                         {# threadCollection.models.remove(this.model); #}
  6187.                         threadCollection.models = threadCollection.models.filter(thread => {
  6188.                             if(thread.id == self.model.id) {
  6189.                                 return false;
  6190.                             }
  6191.                             return true;
  6192.                         });
  6193.                         this.remove();
  6194.                         threadCollection.syncData();
  6195.                         app.appView.renderResponseAlert(response);
  6196.                     }
  6197.                 },
  6198.                 confirmRemove: function(e) {
  6199.                     app.appView.openConfirmModal(this);
  6200.                 },
  6201.                 removeItem : function() {
  6202.                     self = this;
  6203.                     var index = threadIds.indexOf(this.model.id);
  6204.                     if (index > -1)
  6205.                         threadIds.splice(index, 1);
  6206.                     app.appView.showLoader();
  6207.                     this.model.destroy({
  6208.                         url : \"{{ path('helpdesk_member_thread_xhr') }}/\" + this.model.id,
  6209.                         data : { 'ticketId' : ticketModel.attributes.id },
  6210.                         success : function (model, response, options) {
  6211.                             app.appView.hideLoader();
  6212.                             self.unrender(response);
  6213.                         },
  6214.                         error: function (model, xhr, options) {
  6215.                             if(url = xhr.getResponseHeader('Location'))
  6216.                                 window.location = url;
  6217.                             var response = warningResponse;
  6218.                             if(xhr.responseJSON)
  6219.                                 response = xhr.responseJSON;
  6220.                             app.appView.hideLoader();
  6221.                             app.appView.renderResponseAlert(response);
  6222.                         }
  6223.                     });
  6224.                 },
  6225.                 lockAndUnlockThread :function(e) {
  6226.                     self = this;
  6227.                     currentElement = Backbone.\$(e.currentTarget);
  6228.                     var isLocked = 0;
  6229.                     if(this.model.get('isLocked')) {
  6230.                         this.model.set('isLocked', 0);
  6231.                         currentElement.attr('data-id', isLocked).text(\"{{ 'Lock Thread'|trans }}\");
  6232.                     } else {
  6233.                         isLocked = 1;
  6234.                         this.model.set('isLocked', 1);
  6235.                         currentElement.attr('data-id', isLocked).text(\"{{ 'Unlock Thread'|trans }}\");
  6236.                     }
  6237.                     app.appView.showLoader();
  6238.                     this.model.save({
  6239.                         isLocked: isLocked,
  6240.                         id: this.model.id,
  6241.                         ticketId: ticketModel.attributes.id,
  6242.                         updateType: 'lock'
  6243.                     }, {
  6244.                         patch: true,
  6245.                         url : \"{{ path('helpdesk_member_thread_xhr') }}/\" + this.model.id,
  6246.                         success : function (model, response, options) {
  6247.                             self.toggleThreadPropertyIcon()
  6248.                             app.appView.hideLoader();
  6249.                             app.appView.renderResponseAlert(response);
  6250.                         },
  6251.                         error: function (model, xhr, options) {
  6252.                             if(url = xhr.getResponseHeader('Location'))
  6253.                                 window.location = url;
  6254.                             var response = warningResponse;
  6255.                             if(xhr.responseJSON)
  6256.                                 response = xhr.responseJSON;
  6257.                             app.appView.hideLoader();
  6258.                             app.appView.renderResponseAlert(response);
  6259.                         }
  6260.                     });
  6261.                 },
  6262.                 pinThread :function(e) {
  6263.                     self = this;
  6264.                     currentElement = Backbone.\$(e.currentTarget);
  6265.                     var bookmark = 0;
  6266.                     if(this.model.get('bookmark')) {
  6267.                         this.model.set('bookmark', 0);
  6268.                         currentElement.attr('data-id', bookmark).text(\"{{ 'Pin Thread'|trans }}\");
  6269.                     } else {
  6270.                         bookmark = 1;
  6271.                         this.model.set('bookmark', 1);
  6272.                         currentElement.attr('data-id', bookmark).text(\"{{ 'Unpin Thread'|trans }}\");
  6273.                     }
  6274.                     app.appView.showLoader();
  6275.                     this.model.save({
  6276.                         bookmark: bookmark,
  6277.                         id: this.model.id,
  6278.                         ticketId: ticketModel.attributes.id,
  6279.                         updateType: 'bookmark'
  6280.                     }, {
  6281.                         patch: true,
  6282.                         url : \"{{ path('helpdesk_member_thread_xhr') }}/\" + this.model.id,
  6283.                         success : function (model, response, options) {
  6284.                             self.toggleThreadPropertyIcon()
  6285.                             app.appView.hideLoader();
  6286.                             app.appView.renderResponseAlert(response);
  6287.                         },
  6288.                         error: function (model, xhr, options) {
  6289.                             if(url = xhr.getResponseHeader('Location'))
  6290.                                 window.location = url;
  6291.                             var response = warningResponse;
  6292.                             if(xhr.responseJSON)
  6293.                                 response = xhr.responseJSON;
  6294.                             app.appView.hideLoader();
  6295.                             app.appView.renderResponseAlert(response);
  6296.                         }
  6297.                     });
  6298.                 },
  6299.                 forwardThread : function(e) {
  6300.                     var element = Backbone.\$(e.currentTarget);
  6301.                     tinymce.get('forward-area').setContent(this.model.attributes.reply);
  6302.                     \$('#forward-area').parent().find('img').removeAttr('crossorigin');
  6303.                     \$(\".uv-tabs li[for='forward']\").trigger('click');
  6304.                     \$('.uv-ticket-scroll-region').animate({
  6305.                         scrollTop: \$('#default').outerHeight()
  6306.                     }, 'slow');
  6307.                 },
  6308.                 cancelEdit : function(e) {
  6309.                     this.initEditThread();
  6310.                     tinymce.get('uv-edit-thread').destroy()
  6311.                 },
  6312.                 editThread : function(e) {
  6313.                     \$('.thread-edit-container .cancel-edit').trigger('click');
  6314.                     this.initEditThread();
  6315.                     this.\$el.find('.message').hide().after(this.editThreadTemplate());
  6316.                     this.\$el.find('.uv-ticket-uploads').hide()
  6317.                     InitTinyMce('#uv-edit-thread');
  6318.                     tinymce.get('uv-edit-thread').setContent(this.model.attributes.reply);
  6319.                     this.\$el.find('img').removeAttr('crossorigin');
  6320.                 },
  6321.                 initEditThread: function() {
  6322.                     \$('.thread-edit-container').remove();
  6323.                     messageElement = this.\$el.find('.message');
  6324.                     messageElement.show();
  6325.                     this.\$el.find('.uv-ticket-uploads').show()
  6326.                 },
  6327.                 updateThread : function(e) {
  6328.                     e.preventDefault();
  6329.                     var currentElement = Backbone.\$(e.currentTarget);
  6330.                     parent = currentElement.parents('.thread-edit-container')
  6331.                     parent.find('.uv-field-message').remove()
  6332.                     var html = tinyMCE.get(\"uv-edit-thread\").getContent();
  6333.                     if(app.appView.stripHTML(html) != '') {
  6334.                         var self = this;
  6335.                         currentElement.attr(\"disabled\", \"disabled\");
  6336.                         this.model.set('reply', html);
  6337.                         app.appView.showLoader()
  6338.                         this.model.save({}, {
  6339.                             url : \"{{ path('helpdesk_member_thread_update_xhr') }}/\" + this.model.id,
  6340.                             success : function (model, response, options) {
  6341.                                 app.appView.hideLoader()
  6342.                                 messageElement = self.\$el.find('.message');
  6343.                                 if(response.alertClass == 'success') {
  6344.                                     messageElement.html(self.model.attributes.reply).show();
  6345.                                     messageElement.find('.uv-icon-ellipsis').remove();
  6346.                                     messageElement.find('.helpdesk_blockquote').eq(0).before(\"<span class='uv-icon-ellipsis uv-ellipsis-mirror'></span>\").hide();
  6347.                                 }
  6348.                                 self.initEditThread();
  6349.                                 tinymce.get('uv-edit-thread').destroy()
  6350.                                 app.appView.renderResponseAlert(response);
  6351.                             },
  6352.                             error: function (model, xhr, options) {
  6353.                                 self.initEditThread();
  6354.                                 tinymce.get('uv-edit-thread').destroy()
  6355.                                 if(url = xhr.getResponseHeader('Location'))
  6356.                                     window.location = url;
  6357.                                 var response = warningResponse;
  6358.                                 if(xhr.responseJSON)
  6359.                                     response = xhr.responseJSON;
  6360.                                 app.appView.hideLoader()
  6361.                                 app.appView.renderResponseAlert(response);
  6362.                             }
  6363.                         });
  6364.                     } else {
  6365.                         this.\$el.find('.uv-element-block-textarea').append(\"<span class='uv-field-message'>{{ 'This field is mandatory'|trans }}</span>\");
  6366.                     }
  6367.                 },
  6368.                 toggleCreateTaskBar : function() {
  6369.                     if(threadIds.length) {
  6370.                         \$(\"#uv-task-view\").css('right', '0px');
  6371.                         \$(\"#uv-task-view .uv-create-task\").show()
  6372.                         \$(\"#uv-task-view .uv-task-list\").hide()
  6373.                     } else {
  6374.                         \$(\"#uv-task-view\").css('right', '-300px');
  6375.                         \$(\"#uv-task-view .uv-create-task\").hide()
  6376.                         \$(\"#uv-task-view .uv-task-list\").show()
  6377.                     }
  6378.                 },
  6379.                 copyThreadLink: function(e){
  6380.                     _.delay(function(){
  6381.                         \$(e.currentTarget).before('<input type=\"text\" class=\"input-copy-thread-link uv-field\" value=\"' + window.location.href + '\"/>');
  6382.                         \$(e.currentTarget).prev().focus().select();
  6383.                     }, 100);
  6384.                 },
  6385.                 removeCopyThreadLink: function(e){
  6386.                     \$(e.currentTarget).remove();
  6387.                 },
  6388.                 toggleThreadPropertyIcon: function(e) {
  6389.                     if(jQuery.inArray(this.model.id, threadIds) !== -1 || this.model.get('bookmark') || this.model.get('isLocked')) {
  6390.                         this.\$el.find('.uv-icon-pinned').parents('.uv-ticket-strip').show()
  6391.                     } else {
  6392.                         this.\$el.find('.uv-icon-pinned').parents('.uv-ticket-strip').hide()
  6393.                     }
  6394.                     if(jQuery.inArray(this.model.id, threadIds) !== -1)
  6395.                         this.\$el.find('.uv-icon-marked-task').parent().show()
  6396.                     else
  6397.                         this.\$el.find('.uv-icon-marked-task').parent().hide()
  6398.                     if(this.model.get('bookmark'))
  6399.                         this.\$el.find('.uv-icon-pinned').parent().show()
  6400.                     else
  6401.                         this.\$el.find('.uv-icon-pinned').parent().hide()
  6402.                     if(this.model.get('isLocked'))
  6403.                         this.\$el.find('.uv-icon-locked').parent().show()
  6404.                     else
  6405.                         this.\$el.find('.uv-icon-locked').parent().hide()
  6406.                 }
  6407.             });
  6408.             // Ticket Thread List
  6409.             var ThreadList = Backbone.View.extend({
  6410.                 el : \$(\".thread-list\"),
  6411.                 initialize : function() {
  6412.                     this.listenTo(threadCollection.fullCollection, \"add\", this.renderThread);
  6413.                 },
  6414.                 renderThread : function (item) {
  6415.                     var threadItem = new ThreadItem({
  6416.                         model: item
  6417.                     });
  6418.                     if(item.id < threadCollection.fullCollection.at(0).id)
  6419.                         this.\$el.prepend(threadItem.render().el);
  6420.                     else
  6421.                         this.\$el.append(threadItem.render().el);
  6422.                     threadItem.\$el.find('.helpdesk_blockquote').eq(0).before(\"<span class='uv-icon-ellipsis uv-ellipsis-mirror'></span>\").hide();
  6423.                     //emojifyRun();
  6424.                     this.\$el.find('img').removeAttr('crossorigin');
  6425.                     this.\$el.find('div.message a').attr('target', '_blank');
  6426.                     app.appView.relativeTime();
  6427.                 }
  6428.             });
  6429.             // Ticket Pagination View
  6430.             var Pagination = Backbone.View.extend({
  6431.                 el: \$('.uv-ticket-accordion'),
  6432.                 events: {
  6433.                     'click .uv-ticket-count-stat': 'loadMore',
  6434.                 },
  6435.                 renderPagination: function(pagination) {
  6436.                     if(pagination.totalCount - pagination.lastItemNumber > 0 && pagination.lastItemNumber > 0) {
  6437.                         var remain = pagination.totalCount - pagination.lastItemNumber;
  6438.                         \$('.uv-ticket-count-stat').text(remain)
  6439.                         \$('.uv-ticket-accordion').removeClass('uv-ticket-accordion-expanded').removeClass('uv-ticket-accordion-no-count')
  6440.                     } else {
  6441.                         \$('.uv-ticket-accordion').addClass('uv-ticket-accordion-expanded').addClass('uv-ticket-accordion-no-count')
  6442.                     }
  6443.                 },
  6444.                 loadMore: function() {
  6445.                     threadCollection.syncData();
  6446.                 }
  6447.             });
  6448.             // Ticket collaborator Item View
  6449.             var CollaboratorItem = Backbone.View.extend({
  6450.                 tagName : \"a\",
  6451.                 className: 'uv-btn-tag',
  6452.                 template : _.template(\"{% if user_service.isAccessAuthorized('ROLE_AGENT_DELETE_COLLABORATOR_FROM_TICKET') %}<span class='uv-tag'><span class='uv-icon-remove-dark-before'></span><%- name %></span>{% else %}<span class='uv-tag-delete'><%- name %></span>{% endif %}\"),
  6453.                 events : {
  6454.                     'click .uv-tag' : 'confirmRemove'
  6455.                 },
  6456.                 render : function () {
  6457.                     this.\$el.html(this.template(this.model.toJSON()));
  6458.                     return this;
  6459.                 },
  6460.                 unrender : function(response) {
  6461.                     if(response.alertMessage != undefined) {
  6462.                         app.appView.renderResponseAlert(response);
  6463.                     }
  6464.                 },
  6465.                 removeItem: function() {
  6466.                     {% if user_service.isAccessAuthorized('ROLE_AGENT_ADD_COLLABORATOR_TO_TICKET') %}
  6467.                         self = this;
  6468.                         app.appView.showLoader();
  6469.                         this.model.destroy({
  6470.                             data : { 'ticketId' : this.model.attributes.ticketId },
  6471.                             success : function (model, response, options) {
  6472.                                 app.appView.hideLoader();
  6473.                                 self.\$el.remove();
  6474.                                 self.unrender(response);
  6475.                             },
  6476.                             error: function (model, xhr, options) {
  6477.                                 if(url = xhr.getResponseHeader('Location'))
  6478.                                     window.location = url;
  6479.                                 var response = warningResponse;
  6480.                                 if(xhr.responseJSON)
  6481.                                     response = xhr.responseJSON;
  6482.                                 app.appView.hideLoader();
  6483.                                 app.appView.renderResponseAlert(response);
  6484.                             }
  6485.                         });
  6486.                     {% endif %}
  6487.                 },
  6488.                 confirmRemove: function(e) {
  6489.                     e.preventDefault();
  6490.                     {% if user_service.isAccessAuthorized('ROLE_AGENT_ADD_COLLABORATOR_TO_TICKET') %}
  6491.                         app.appView.openConfirmModal(this);
  6492.                     {% endif %}
  6493.                 }
  6494.             });
  6495.             // Ticket Collaborator View
  6496.             var CollaboratorList = Backbone.View.extend({
  6497.                 el : \$(\".collaborator-list-block\"),
  6498.                 events : {
  6499.                     'keypress .uv-field' : 'addCollaborator',
  6500.                     'focusout .uv-field' : 'removeErrorClass'
  6501.                 },
  6502.                 initialize : function() {
  6503.                     //Backbone.Validation.bind(this);
  6504.                 },
  6505.                 render : function() {
  6506.                     this.\$el.find(\".collaborator-list\").html('');
  6507.                     var self = this;
  6508.                     collaboratorOptionHtml = '';
  6509.                     if(collaboratorCollection.length) {
  6510.                         _.each(collaboratorCollection.models, function (item) {
  6511.                             this.renderCollaborator(item);
  6512.                         }, this);
  6513.                     }
  6514.                     ticketView.addCCCollaborators()
  6515.                 },
  6516.                 renderCollaborator : function (item) {
  6517.                     var collaborator = new CollaboratorItem({
  6518.                         model: item
  6519.                     });
  6520.                     this.\$el.find('.collaborator-list').append(collaborator.render().el);
  6521.                 },
  6522.                 removeErrorClass: function(e) {
  6523.                     var inputElement = Backbone.\$(e.currentTarget);
  6524.                     inputElement.removeClass('uv-field-error');
  6525.                     inputElement.parents('.uv-element-block').find('.uv-field-message').remove()
  6526.                 },
  6527.                 addCollaborator : function(e) {
  6528.                     {% if user_service.isAccessAuthorized('ROLE_AGENT_ADD_COLLABORATOR_TO_TICKET') %}
  6529.                         var inputElement = Backbone.\$(e.currentTarget);
  6530.                         inputElement.removeClass('uv-field-error');
  6531.                         inputElement.parents('.uv-element-block').find('.uv-field-message').remove()
  6532.                         var text = inputElement.val().trim();
  6533.                         if (e.which === 13 && text) {
  6534.                             this.model = new CollaboratorModel();
  6535.                             self = this;
  6536.                             this.model.set({email: text})
  6537.                             if(this.model.isValid(true)) {
  6538.                                 app.appView.showLoader();
  6539.                                 this.model.save({},{
  6540.                                     success : function (model, response, options) {
  6541.                                         inputElement.val('');
  6542.                                         if(response.alertClass == \"success\") {
  6543.                                             collaboratorCollection.add(model);
  6544.                                         }
  6545.                                         self.render();
  6546.                                         app.appView.hideLoader();
  6547.                                         app.appView.renderResponseAlert(response);
  6548.                                     },
  6549.                                     error: function (model, xhr, options) {
  6550.                                         if(url = xhr.getResponseHeader('Location'))
  6551.                                             window.location = url;
  6552.                                         var response = warningResponse;
  6553.                                         if(xhr.responseJSON)
  6554.                                             response = xhr.responseJSON;
  6555.                                         app.appView.hideLoader();
  6556.                                         app.appView.renderResponseAlert(response);
  6557.                                     }
  6558.                                 });
  6559.                             } else {
  6560.                                 inputElement.addClass('uv-field-error');
  6561.                                 if(text)
  6562.                                     inputElement.parents('.uv-element-block').append(\"<span class='uv-field-message'>{{ 'Email address is invalid'|trans }}</span>\");
  6563.                             }
  6564.                         }
  6565.                     {% endif %}
  6566.                 }
  6567.             });
  6568.             // Ticket Tag Item View
  6569.             var TagItem = Backbone.View.extend({
  6570.                 tagName : \"a\",
  6571.                 className : \"uv-btn-tag\",
  6572.                 template : _.template(\"<span class='uv-tag'>{% if user_service.isAccessAuthorized('ROLE_AGENT_DELETE_TAG') %}<span class='uv-icon-remove-dark-before'></span>{% endif %}<%- name %></span>\"),
  6573.                 events : {
  6574.                     'click .uv-tag' : \"confirmRemove\"
  6575.                 },
  6576.                 render : function () {
  6577.                     this.\$el.html(this.template(this.model.toJSON()));
  6578.                     return this;
  6579.                 },
  6580.                 unrender : function(response) {
  6581.                     if(response.alertMessage != undefined) {
  6582.                         tagListView.render();
  6583.                         app.appView.renderResponseAlert(response);
  6584.                     }
  6585.                 },
  6586.                 removeItem : function () {
  6587.                     {% if user_service.isAccessAuthorized('ROLE_AGENT_DELETE_TAG') %}
  6588.                     self = this;
  6589.                     app.appView.showLoader();
  6590.                     this.model.destroy({
  6591.                         data : { 'ticketId' : ticketModel.id } ,
  6592.                         success : function (model, response, options) {
  6593.                             app.appView.hideLoader();
  6594.                             self.\$el.remove();
  6595.                             self.unrender(response);
  6596.                         },
  6597.                         error: function (model, xhr, options) {
  6598.                             if(url = xhr.getResponseHeader('Location'))
  6599.                                 window.location = url;
  6600.                             var response = warningResponse;
  6601.                             if(xhr.responseJSON)
  6602.                                 response = xhr.responseJSON;
  6603.                             app.appView.hideLoader();
  6604.                             app.appView.renderResponseAlert(response);
  6605.                         }
  6606.                     });
  6607.                     {% endif %}
  6608.                 },
  6609.                 confirmRemove: function(e) {
  6610.                     e.preventDefault();
  6611.                     {% if user_service.isAccessAuthorized('ROLE_AGENT_DELETE_TAG') %}
  6612.                     app.appView.openConfirmModal(this)
  6613.                     {% endif %}
  6614.                 }
  6615.             });
  6616.             // Ticket Tag View
  6617.             var TagList = Backbone.View.extend({
  6618.                 el : \$(\".tag-list-block\"),
  6619.                 events : {
  6620.                     'keypress .uv-field' : 'addTag',
  6621.                     'focusout .uv-field' : 'removeErrorClass',
  6622.                     'click .uv-dropdown-list li': 'addTag'
  6623.                 },
  6624.                 render : function() {
  6625.                     var self = this;
  6626.                     this.\$el.find(\".tag-list\").html('');
  6627.                     if(tagCollection.length) {
  6628.                         _.each(tagCollection.models, function (item) {
  6629.                             this.renderTag(item);
  6630.                         }, this);
  6631.                     }
  6632.                 },
  6633.                 renderTag : function (item) {
  6634.                     var tag = new TagItem({
  6635.                         model: item
  6636.                     });
  6637.                     this.\$el.find('.tag-list').append(tag.render().el);
  6638.                 },
  6639.                 addTag : function(e) {
  6640.                     {% if user_service.isAccessAuthorized('ROLE_AGENT_ADD_TAG') %}
  6641.                         var currentElement = Backbone.\$(e.currentTarget);
  6642.                         if(currentElement.is('li')) {
  6643.                             var inputElement = currentElement.parents('.uv-field-block').find('.uv-dropdown-other');
  6644.                             var text = currentElement.text().trim();
  6645.                         } else {
  6646.                             var inputElement = currentElement;
  6647.                             var text = inputElement.val().trim();
  6648.                         }
  6649.                         inputElement.removeClass('uv-field-error');
  6650.                         inputElement.parents('.uv-element-block').find('.uv-field-message').remove()
  6651.                         if (currentElement.is('li') || (e.which === 13 && text)) {
  6652.                             if(text.length <= 20) {
  6653.                                 if(tagCollection.isTagExist(text)) {
  6654.                                     var self = this;
  6655.                                     inputElement.val('');
  6656.                                     this.model = new TagModel();
  6657.                                     this.model.set({name:text});
  6658.                                     self = this;
  6659.                                     app.appView.showLoader();
  6660.                                     this.model.save({}, {
  6661.                                         success: function (model, response, options) {
  6662.                                             inputElement.parent().find(\"li:not(.uv-no-results)\").remove()
  6663.                                             inputElement.parent().find(\".uv-no-results\").show()
  6664.                                             if(!currentElement.is('li')) {
  6665.                                                 inputElement.trigger('click')
  6666.                                             }
  6667.                                             if(response.alertClass == \"success\") {
  6668.                                                 tagCollection.add(model);
  6669.                                                 self.render();
  6670.                                             }
  6671.                                             app.appView.hideLoader();
  6672.                                             app.appView.renderResponseAlert(response);
  6673.                                         },
  6674.                                         error: function (model, xhr, options) {
  6675.                                             if(url = xhr.getResponseHeader('Location'))
  6676.                                                 window.location = url;
  6677.                                             var response = warningResponse;
  6678.                                             if(xhr.responseJSON)
  6679.                                                 response = xhr.responseJSON;
  6680.                                             app.appView.hideLoader();
  6681.                                             app.appView.renderResponseAlert(response);
  6682.                                         }
  6683.                                     });
  6684.                                 } else {
  6685.                                     inputElement.addClass('uv-field-error');
  6686.                                     inputElement.parents('.uv-element-block').append(\"<span class='uv-field-message'>{{ 'Tag with same name already exist'|trans }}</span>\");
  6687.                                 }
  6688.                             } else {
  6689.                                 inputElement.addClass('uv-field-error');
  6690.                                 inputElement.parents('.uv-element-block').append(\"<span class='uv-field-message'>{{ 'Text length should be less than 20 charactors'|trans }}</span>\");
  6691.                             }
  6692.                         }
  6693.                     {% endif %}
  6694.                 },
  6695.                 removeErrorClass: function(e) {
  6696.                     var inputElement = Backbone.\$(e.currentTarget);
  6697.                     inputElement.removeClass('uv-field-error');
  6698.                     inputElement.parents('.uv-element-block').find('.uv-field-message').remove()
  6699.                 },
  6700.             });
  6701.             // Ticket Label Item View
  6702.             var LabelItem = Backbone.View.extend({
  6703.                 tagName : \"a\",
  6704.                 className : \"uv-btn-label\",
  6705.                 template : _.template(\"<span class='uv-tag'><span class='uv-icon-remove-before'></span><%- name %></span>\"),
  6706.                 events : {
  6707.                     'click .uv-tag' : \"confirmRemove\"
  6708.                 },
  6709.                 render : function () {
  6710.                     this.\$el.html(this.template(this.model.toJSON()));
  6711.                     return this;
  6712.                 },
  6713.                 unrender : function(response) {
  6714.                     if(response.alertMessage != undefined) {
  6715.                         labelListView.render();
  6716.                         app.appView.renderResponseAlert(response);
  6717.                     }
  6718.                 },
  6719.                 removeItem : function () {
  6720.                     self = this;
  6721.                     app.appView.showLoader();
  6722.                     this.model.destroy({
  6723.                         url : \"{{ path('helpdesk_member_update_ticket_attributes_xhr') }}\",
  6724.                         data : { attribute :'label', 'ticketId': ticketModel.id, 'labelId': this.model.get('id') },
  6725.                         success : function (model, response, options) {
  6726.                             app.appView.hideLoader();
  6727.                             self.\$el.remove();
  6728.                             self.unrender(response);
  6729.                         },
  6730.                         error: function (model, xhr, options) {
  6731.                             if(url = xhr.getResponseHeader('Location'))
  6732.                                 window.location = url;
  6733.                             var response = warningResponse;
  6734.                             if(xhr.responseJSON)
  6735.                                 response = xhr.responseJSON;
  6736.                             app.appView.hideLoader();
  6737.                             app.appView.renderResponseAlert(response);
  6738.                         }
  6739.                     });
  6740.                 },
  6741.                 confirmRemove: function(e) {
  6742.                     e.preventDefault();
  6743.                     app.appView.openConfirmModal(this)
  6744.                 }
  6745.             });
  6746.             // Ticket Label View
  6747.             var LabelList = Backbone.View.extend({
  6748.                 el : \$(\".label-list-block\"),
  6749.                 events : {
  6750.                     'keypress .uv-field' : 'addLabel',
  6751.                     'focusout .uv-field' : 'removeErrorClass',
  6752.                     'click .uv-dropdown-list li': 'addLabel'
  6753.                 },
  6754.                 render : function() {
  6755.                     var self = this;
  6756.                     this.\$el.find(\".label-list\").html('');
  6757.                     if(labelCollection.length) {
  6758.                         _.each(labelCollection.models, function (item) {
  6759.                             this.renderLabel(item);
  6760.                         }, this);
  6761.                     }
  6762.                 },
  6763.                 renderLabel : function (item) {
  6764.                     var label = new LabelItem({
  6765.                         model: item
  6766.                     });
  6767.                     lavelItem = label.render().el;
  6768.                     \$(lavelItem).attr('style', 'background:' + item.attributes.color)
  6769.                     this.\$el.find('.label-list').append(lavelItem);
  6770.                 },
  6771.                 addLabel : function(e) {
  6772.                     var currentElement = Backbone.\$(e.currentTarget);
  6773.                     if(currentElement.is('li')) {
  6774.                         var inputElement = currentElement.parents('.uv-field-block').find('.uv-dropdown-other');
  6775.                         var text = currentElement.text().trim();
  6776.                     } else {
  6777.                         var inputElement = currentElement;
  6778.                         var text = inputElement.val().trim();
  6779.                     }
  6780.                     inputElement.removeClass('uv-field-error');
  6781.                     inputElement.parents('.uv-element-block').find('.uv-field-message').remove()
  6782.                     if (currentElement.is('li') || (e.which === 13 && text)) {
  6783.                         if(text.length <= 20) {
  6784.                             if(labelCollection.isLabelExist(text)) {
  6785.                                 var self = this;
  6786.                                 inputElement.val('');
  6787.                                 this.model = new LabelModel();
  6788.                                 this.model.set({name:text});
  6789.                                 self = this;
  6790.                                 app.appView.showLoader();
  6791.                                 this.model.save({}, {
  6792.                                     success: function (model, response, options) {
  6793.                                         inputElement.parent().find(\"li:not(.uv-no-results)\").remove()
  6794.                                         inputElement.parent().find(\".uv-no-results\").show()
  6795.                                         if(!currentElement.is('li')) {
  6796.                                             inputElement.trigger('click')
  6797.                                         }
  6798.                                         if(response.alertClass == \"success\") {
  6799.                                             labelCollection.add(model);
  6800.                                             self.render();
  6801.                                         }
  6802.                                         app.appView.hideLoader();
  6803.                                         app.appView.renderResponseAlert(response);
  6804.                                     },
  6805.                                     error: function (model, xhr, options) {
  6806.                                         if(url = xhr.getResponseHeader('Location'))
  6807.                                             window.location = url;
  6808.                                         var response = warningResponse;
  6809.                                         if(xhr.responseJSON)
  6810.                                             response = xhr.responseJSON;
  6811.                                         app.appView.hideLoader();
  6812.                                         app.appView.renderResponseAlert(response);
  6813.                                     }
  6814.                                 });
  6815.                             } else {
  6816.                                 inputElement.addClass('uv-field-error');
  6817.                                 inputElement.parents('.uv-element-block').append(\"<span class='uv-field-message'>{{ 'Label with same name already exist'|trans }}</span>\");
  6818.                             }
  6819.                         } else {
  6820.                             inputElement.addClass('uv-field-error');
  6821.                             inputElement.parents('.uv-element-block').append(\"<span class='uv-field-message'>{{ 'Text length should be less than 20 charactors'|trans }}</span>\");
  6822.                         }
  6823.                     }
  6824.                 },
  6825.                 removeErrorClass: function(e) {
  6826.                     var inputElement = Backbone.\$(e.currentTarget);
  6827.                     inputElement.removeClass('uv-field-error');
  6828.                     inputElement.parents('.uv-element-block').find('.uv-field-message').remove()
  6829.                 },
  6830.             });
  6831.             // Ticket Router
  6832.             var Router = Backbone.Router.extend({
  6833.                 routes: {
  6834.                     'thread/:thread' : 'threadRequestedId'
  6835.                 },
  6836.                 threadRequestedId: function(thread){
  6837.                     threadCollection.threadRequestedId = thread;
  6838.                 },
  6839.                 scrollPage : function(divId) {
  6840.                     if(\$(divId).length){
  6841.                         \$('li a[href=\"'+divId+'\"]').trigger('click');
  6842.                         \$('.uv-ticket-scroll-region').animate({
  6843.                             scrollTop: \$(divId).offset().top
  6844.                         }, 'slow');
  6845.                     } else if(divId == '#') { //scroll to last thread added
  6846.                         if(threadCollection.fullCollection.length)
  6847.                             this.scrollPage('#thread' + threadCollection.fullCollection.at(0).id);
  6848.                     }
  6849.                 }
  6850.             });
  6851.             var customerForm = new CustomerForm({
  6852.                 el : \$(\".uv-main-info-update-block\"),
  6853.                 model : new CustomerModel()
  6854.             });
  6855.             var ticketNavigation = \$.parseJSON('{{ ticketNavigationIteration|json_encode|raw }}');
  6856.             var ticketModel = new TicketModel({
  6857.                 id : \"{{ ticket.id }}\",
  6858.                 status : \"{{ ticket.status.id }}\",
  6859.                 priority : \"{{ ticket.priority.id }}\",
  6860.                 group : \"{{ ticket.supportGroup ? ticket.supportGroup.id : '' }}\",
  6861.                 subGroup : \"{{ ticket.supportTeam ? ticket.supportTeam.id : '' }}\",
  6862.                 agent : \"\",
  6863.                 profileImage : \"\",
  6864.                 isTrashed : \"{{ ticket.isTrashed }}\"
  6865.             });
  6866.             ticketApp.ticketView = ticketView = new TicketView({
  6867.                 model: ticketModel
  6868.             });
  6869.             uvdesk.ticket.model = ticketModel;
  6870.             threadCollection = new ThreadCollection();
  6871.             var threadList = new ThreadList();
  6872.             var pagination = new Pagination();
  6873.             var collaboratorCollection = new CollaboratorCollection(\$.parseJSON('{{ ticket_service.getTicketCollaborators(ticket.id)|json_encode|raw }}'));
  6874.             var collaboratorList = new CollaboratorList();
  6875.             collaboratorList.render();
  6876.             var tagCollection = new TagCollection(\$.parseJSON('{{ ticket_service.getTicketTagsById(ticket.id)|json_encode|raw }}'));
  6877.             var tagListView = new TagList();
  6878.             tagListView.render();
  6879.             var labelCollection = new LabelCollection(\$.parseJSON('{{ ticket_service.getTicketLabels(ticket.id)|json_encode|raw }}'));
  6880.             var labelListView = new LabelList();
  6881.             labelListView.render();
  6882.             var router = new Router();
  6883.             Backbone.history.start({push_state:true});
  6884.             threadCollection.syncData();
  6885.         });
  6886.     </script>
  6887.     <script>
  6888.         var sfTinyMceNew = \$.extend({}, sfTinyMce);
  6889.         var toolbarOptions = sfTinyMce.options.toolbar;
  6890.         sfTinyMce.init({
  6891.             selector : '.uv-ticket-reply textarea',
  6892.             toolbar: toolbarOptions + ' | translate',
  6893.             mentions : getMentions(),
  6894.             images_upload_url: \"\",
  6895.             setup: function(editor) {
  6896.                 editor.on('keydown', function(e) { /** for pageup, pagedown keys **/
  6897.                     if(e.keyCode == 34 || e.keyCode == 33){
  6898.                         e.preventDefault();
  6899.                     }
  6900.                 });
  6901.                 addTranslateButton(editor);
  6902.             }
  6903.         });
  6904.         function InitTinyMce(selector) {
  6905.             let sfTinyMceNew2 = \$.extend({}, sfTinyMceNew);
  6906.             sfTinyMceNew2.init({
  6907.                 selector : selector,
  6908.                 mentions : getMentions(),
  6909.                 setup: function(editor) {
  6910.                     addTranslateButton(editor);
  6911.                 }
  6912.             });
  6913.         }
  6914.         function getMentions(){
  6915.             return {
  6916.                 delimiter: ['#'],
  6917.                 items: 15,
  6918.                 source: function(){
  6919.                     return [
  6920.                         {
  6921.                             name : \"{{ 'Ticket Id'|trans }}\",
  6922.                             value : \"{{ ticket.id }}\",
  6923.                         },
  6924.                         {
  6925.                             name : \"{{ 'Subject'|trans }}\",
  6926.                             value : \"{{ ticket.subject|replace({\"\\n\":' ', \"\\r\":' '}) }}\",
  6927.                         },
  6928.                         {
  6929.                             name : \"{{ 'Status'|trans }}\",
  6930.                             value : \"{{ ticket.status.description }}\",
  6931.                         },
  6932.                         {
  6933.                             name : \"{{ 'Priority'|trans }}\",
  6934.                             value : \"{{ ticket.priority.description|trans }}\",
  6935.                         },
  6936.                         {
  6937.                             name : \"{{ 'Type'|trans }}\",
  6938.                             value : \"{{ ticket.type ? ticket.type.description : 'Not Assigned'|trans }}\",
  6939.                         },
  6940.                         {
  6941.                             name : \"{{ 'Group'|trans }}\",
  6942.                             value : \"{{ ticket.supportGroup ? ticket.supportGroup.description : 'Not Assigned'|trans }}\",
  6943.                         },
  6944.                         {
  6945.                             name : \"{{ 'Team'|trans }}\",
  6946.                             value : \"{{ ticket.supportTeam ? ticket.supportTeam.description : 'Not Assigned'|trans }}\",
  6947.                         },
  6948.                         {
  6949.                             name : \"{{ 'Customer Name'|trans }}\",
  6950.                             value : \"{{ customer.name }}\",
  6951.                         },
  6952.                         {
  6953.                             name : \"{{ 'Customer Email'|trans }}\",
  6954.                             value : \"{{ customer.email }}\",
  6955.                         },
  6956.                         {
  6957.                             name : \"{{ 'Agent Name'|trans }}\",
  6958.                             value : \"{{ ticketAgent.name is defined ? ticketAgent.name : 'Not Assigned'|trans }}\",
  6959.                         },
  6960.                         {
  6961.                             name : \"{{ 'Agent Email'|trans }}\",
  6962.                             value : \"{{ ticketAgent.email is defined ? ticketAgent.email : 'Not Assigned'|trans }}\",
  6963.                         }
  6964.                     ];
  6965.                 },
  6966.                 insert: function(item) {
  6967.                     return '<span>' + item.value + '</span>';
  6968.                 }
  6969.             };
  6970.         }
  6971.     </script>
  6972. {% endblock %}
  6973. ""@UVDeskCoreFramework/ticket.html.twig""/var/www/uvdesk/vendor/uvdesk/core-framework/Resources/views/ticket.html.twig");
  6974.     }
  6975. }