var/cache/dev/twig/39/39c666c60f1a8951f2b67a732a8927080c5579811fafdf672ba1079040cafdd7.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/ticketList.html.twig */
  14. class __TwigTemplate_dfd176f14b76e00900eeef72fd2cb60bfe07b0a543d5e1bb616e7064f6184747 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/ticketList.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/ticketList.html.twig"));
  41.         $this->parent $this->loadTemplate("@UVDeskCoreFramework//Templates//layout.html.twig""@UVDeskCoreFramework/ticketList.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$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Tickets"), "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-dropdown.asset-visibility li input {
  73.             z-index: 100;
  74.         }
  75.         .uv-dropdown.asset-visibility ul li label {
  76.             color: #333333;
  77.             font-size: 17px;
  78.             font-weight: 500;
  79.             text-transform: capitalize;
  80.             cursor: pointer;
  81.             margin: auto;
  82.         }
  83.         .uv-table td a {
  84.             color: #333333;
  85.         }
  86.         .uv-table.uv-list-view table tbody td.uv-width-100 {
  87.             width: 100px !important;
  88.         }
  89.         .uv-table.uv-list-view td[data-index=\"agent\"] {
  90.             white-space: nowrap;
  91.         }
  92.         .uv-view:not(.uv-stack-view) .uv-table td a {
  93.             display: inline-block;
  94.             width: 100%;
  95.         }
  96.         .uv-action-bar-col-lt.uv-width-100 {
  97.             width: 100% !important;
  98.         }
  99.         #quick-view-modal .uv-view {
  100.             padding: 0;
  101.             overflow-y: visible;
  102.             display: inline-block;
  103.             position: relative;
  104.         }
  105.         #quick-view-modal .uv-view .uv-ticket-section {
  106.             margin-top: 0;
  107.         }
  108.         #quick-view-modal .uv-ticket-head {
  109.             border-top: 1px solid #d3d3d3;
  110.             padding-top: 10px;
  111.             padding-bottom: 10px;
  112.         }
  113.         #quick-view-modal .uv-ticket-strip {
  114.             padding-bottom: 0;
  115.         }
  116.         #quick-view-modal .uv-ticket-strip .uv-btn-tag {
  117.             margin-bottom: 0;
  118.         }
  119.         #quick-view-modal .quick-view-navigation {
  120.             position: absolute;
  121.             right: 50px;
  122.             top: 9px;
  123.         }
  124.         #quick-view-modal .quick-view-navigation ~ a {
  125.             width: calc(100% - 100px);
  126.             display: inline-block;
  127.         }
  128.         #quick-view-modal .uv-btn-tag[disabled=\"disabled\"] {
  129.             opacity: .4;
  130.             cursor: not-allowed;
  131.             border-color: #B1B1AE !important;
  132.         }
  133.         #quick-view-modal .uv-loader {
  134.             transform: scale(0.5);
  135.             top: 14px;
  136.             right: 60px;
  137.         }
  138.         tr.unread {
  139.             background: #f1f1f1;
  140.         }
  141.         .uv-table table tbody tr.not-assigned td {
  142.             border-bottom: 1px solid #ffcacc;
  143.         }
  144.         @media screen and (max-width: 500px) {
  145.             .uv-action-bar label {
  146.                 display: inline-block;
  147.             }
  148.         }
  149.     </style>
  150. ";
  151.         
  152.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  153.         
  154.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  155.     }
  156.     // line 87
  157.     public function block_pageContent($context, array $blocks = [])
  158.     {
  159.         $macros $this->macros;
  160.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  161.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""pageContent"));
  162.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  163.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""pageContent"));
  164.         // line 88
  165.         echo "    ";
  166.         // line 89
  167.         echo "    <div class=\"uv-pop-up-overlay\" id=\"quick-view-modal\">
  168.         <div class=\"uv-pop-up-box uv-pop-up-wide\"></div>
  169.     </div>
  170.     <div class=\"uv-inner-section\">
  171.         ";
  172.         // line 95
  173.         echo "        <div class=\"uv-aside\" ";
  174.         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.'95$this->source); })()), "request", [], "any"falsefalsefalse95), "cookies", [], "any"falsefalsefalse95) && 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.'95$this->source); })()), "request", [], "any"falsefalsefalse95), "cookies", [], "any"falsefalsefalse95), "get", [=> "uv-asideView"], "method"falsefalsefalse95))) {
  175.             echo " style=\"display: none;\" ";
  176.         }
  177.         echo " >
  178.             <div class=\"uv-aside-default\">
  179.                 <div class=\"uv-aside-head\">
  180.                     <div class=\"uv-aside-title\">
  181.                         <h6>";
  182.         // line 99
  183.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Tickets"), "html"nulltrue);
  184.         echo "</h6>
  185.                     </div>
  186.                     <div class=\"uv-aside-back\">
  187.                         <span onclick=\"history.length > 1 ? history.go(-1) : window.location = '";
  188.         // line 103
  189.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_dashboard");
  190.         echo "';\">";
  191.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Back"), "html"nulltrue);
  192.         echo "</span>
  193.                     </div>
  194.                 </div>
  195.                 <div class=\"uv-aside-nav\">
  196.                     <ul>
  197.                         ";
  198.         // line 110
  199.         echo "                        <ul class=\"predefined-label-list uv-aside-list\">
  200.                             <li>
  201.                                 <a href=\"#\" class=\"uv-aside-active\">";
  202.         // line 112
  203.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("All"), "html"nulltrue);
  204.         echo " <span class=\"uv-flag-gray uv-flag-dark\">0</span></a>
  205.                                 ";
  206.         // line 115
  207.         echo "                                <ul class=\"status-list\">
  208.                                     <li>
  209.                                         <a href=\"#\" data-id=\"1\" class=\"uv-aside-nav-active\"><span class=\"name\">";
  210.         // line 117
  211.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Open"), "html"nulltrue);
  212.         echo "</span><span class=\"uv-flag-gray\">0</span></a>
  213.                                     </li>
  214.                                     <li>
  215.                                         <a href=\"#\" data-id=\"2\"><span class=\"name\">";
  216.         // line 120
  217.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Pending"), "html"nulltrue);
  218.         echo "</span><span class=\"uv-flag-gray\">0</span></a>
  219.                                     </li>
  220.                                     <li>
  221.                                         <a href=\"#\" data-id=\"6\"><span class=\"name\">";
  222.         // line 123
  223.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Answered"), "html"nulltrue);
  224.         echo "</span><span class=\"uv-flag-gray\">0</span></a>
  225.                                     </li>
  226.                                     <li>
  227.                                         <a href=\"#\" data-id=\"3\"><span class=\"name\">";
  228.         // line 126
  229.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Resolved"), "html"nulltrue);
  230.         echo "</span><span class=\"uv-flag-gray\">0</span></a>
  231.                                     </li>
  232.                                     <li>
  233.                                         <a href=\"#\" data-id=\"4\"><span class=\"name\">";
  234.         // line 129
  235.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Closed"), "html"nulltrue);
  236.         echo "</span><span class=\"uv-flag-gray\">0</span></a>
  237.                                     </li>
  238.                                     <li>
  239.                                         <a href=\"#\" data-id=\"5\"><span class=\"name\">";
  240.         // line 132
  241.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Spam"), "html"nulltrue);
  242.         echo "</span><span class=\"uv-flag-gray\">0</span></a>
  243.                                     </li>
  244.                                 </ul>
  245.                             </li>
  246.                             <li>
  247.                                 <a href=\"#new\">";
  248.         // line 137
  249.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("New"), "html"nulltrue);
  250.         echo " <span class=\"uv-flag-gray uv-flag-dark\">0</span></a>
  251.                             </li>
  252.                             <li>
  253.                                 <a href=\"#unassigned\">";
  254.         // line 140
  255.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("UnAssigned"), "html"nulltrue);
  256.         echo " <span class=\"uv-flag-gray uv-flag-dark\">0</span></a>
  257.                             </li>
  258.                             <li>
  259.                                 <a href=\"#notreplied\">";
  260.         // line 143
  261.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("UnAnswered"), "html"nulltrue);
  262.         echo " <span class=\"uv-flag-gray uv-flag-dark\">0</span></a>
  263.                             </li>
  264.                             <li>
  265.                                 <a href=\"#mine\">";
  266.         // line 146
  267.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("My Tickets"), "html"nulltrue);
  268.         echo " <span class=\"uv-flag-gray uv-flag-dark\">0</span></a>
  269.                             </li>
  270.                             <li>
  271.                                 <a href=\"#starred\">";
  272.         // line 149
  273.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Starred"), "html"nulltrue);
  274.         echo " <span class=\"uv-flag-gray uv-flag-dark\">0</span></a>
  275.                             </li>
  276.                             <li>
  277.                                 <a href=\"#trashed\" style=\"border-bottom: none\">";
  278.         // line 152
  279.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Trashed"), "html"nulltrue);
  280.         echo " <span class=\"uv-flag-gray uv-flag-dark\">0</span></a>
  281.                             </li>
  282.                         </ul>
  283.                         ";
  284.         // line 157
  285.         echo "                        <ul class=\"uv-aside-custom\"></ul>
  286.                     </ul>
  287.                 </div>
  288.                 <a class=\"uv-btn-small add-new-label\" href=\"#\"><span class=\"uv-icon-add\"></span> ";
  289.         // line 161
  290.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Label"), "html"nulltrue);
  291.         echo "</a>
  292.             </div>
  293.             <!-- Label add and edit -->
  294.             <div class=\"uv-add-edit-label\" style=\"display: block\"></div>
  295.         </div>
  296.         ";
  297.         // line 169
  298.         echo "        <div class=\"uv-view ";
  299.         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.'169$this->source); })()), "request", [], "any"falsefalsefalse169), "cookies", [], "any"falsefalsefalse169) && 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.'169$this->source); })()), "request", [], "any"falsefalsefalse169), "cookies", [], "any"falsefalsefalse169), "get", [=> "uv-asideView"], "method"falsefalsefalse169))) {
  300.             echo " uv-aside-view ";
  301.         }
  302.         echo "\">
  303.             <h1>";
  304.         // line 170
  305.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Tickets"), "html"nulltrue);
  306.         echo "</h1>
  307.             ";
  308.         // line 173
  309.         echo "            <div class=\"uv-action-bar\">
  310.                 ";
  311.         // line 175
  312.         echo "                <div class=\"uv-action-select-wrapper\">
  313.                     <label class=\"uv-vertical-align uv-margin-left-27\">
  314.                         <div class=\"uv-checkbox\">
  315.                             <input type=\"checkbox\" class=\"select-all-checkbox\"><span class=\"uv-checkbox-view\"></span>
  316.                         </div>
  317.                     </label>
  318.                 </div>
  319.                 ";
  320.         // line 183
  321.         echo "                <div class=\"uv-action-col-wrapper\">
  322.                     ";
  323.         // line 185
  324.         echo "                    <div class=\"uv-action-bar-col-lt\">
  325.                         <div class=\"filter\">
  326.                             ";
  327.         // line 188
  328.         echo "                            <div class=\"uv-dropdown sort\">
  329.                                 <div class=\"uv-dropdown-btn uv-vertical-align uv-margin-right-5\">";
  330.         // line 189
  331.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Sort By:"), "html"nulltrue);
  332.         echo " ";
  333.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Last Replied"), "html"nulltrue);
  334.         echo "</div>
  335.                                 <div class=\"uv-dropdown-list uv-bottom-left\">
  336.                                     <div class=\"uv-dropdown-container\">
  337.                                         <label>";
  338.         // line 193
  339.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Sort By"), "html"nulltrue);
  340.         echo "</label>
  341.                                         <ul></ul>
  342.                                     </div>
  343.                                 </div>
  344.                             </div>
  345.                             ";
  346.         // line 200
  347.         echo "                            <div class=\"uv-dropdown asset-visibility\">
  348.                                 <div class=\"uv-dropdown-btn uv-vertical-align uv-margin-right-5\">";
  349.         // line 201
  350.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Assets Visibility"), "html"nulltrue);
  351.         echo "</div>
  352.                                 <div class=\"uv-dropdown-list uv-bottom-left\" style=\"width: 215px;\">
  353.                                     <div class=\"uv-dropdown-container\">
  354.                                         <label>";
  355.         // line 205
  356.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Assets Visibility"), "html"nulltrue);
  357.         echo "</label>
  358.                                         <ul>
  359.                                             ";
  360.         // line 209
  361.         echo "                                            <li class=\"uv-dropdown-checkbox\">
  362.                                                 <label>
  363.                                                     <div class=\"uv-checkbox\">
  364.                                                         <input type=\"checkbox\" id=\"source\" name=\"assetVisibility[]\" value=\"source\" checked>
  365.                                                         <span class=\"uv-checkbox-view uv-checkbox-dwn\"></span>
  366.                                                     </div>
  367.                                                 </label>
  368.                                                 <label for=\"source\">";
  369.         // line 217
  370.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Channel/Source"), "html"nulltrue);
  371.         echo "</label>
  372.                                             </li>
  373.                                             ";
  374.         // line 221
  375.         echo "                                            <li class=\"uv-dropdown-checkbox\">
  376.                                                 <label>
  377.                                                     <div class=\"uv-checkbox\">
  378.                                                         <input type=\"checkbox\" id=\"customer-name\" name=\"assetVisibility[]\" value=\"customer-name\" checked>
  379.                                                         <span class=\"uv-checkbox-view uv-checkbox-dwn\"></span>
  380.                                                     </div>
  381.                                                 </label>
  382.                                                 <label for=\"customer-name\">";
  383.         // line 229
  384.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Customer Name"), "html"nulltrue);
  385.         echo "</label>
  386.                                             </li>
  387.                                             ";
  388.         // line 233
  389.         echo "                                            <li class=\"uv-dropdown-checkbox\">
  390.                                                 <label>
  391.                                                     <div class=\"uv-checkbox\">
  392.                                                         <input type=\"checkbox\" id=\"customer-email\" name=\"assetVisibility[]\" value=\"customer-email\" checked>
  393.                                                         <span class=\"uv-checkbox-view uv-checkbox-dwn\"></span>
  394.                                                     </div>
  395.                                                 </label>
  396.                                                 <label for=\"customer-email\">";
  397.         // line 241
  398.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Customer Email"), "html"nulltrue);
  399.         echo "</label>
  400.                                             </li>
  401.                                             ";
  402.         // line 245
  403.         echo "                                            <li class=\"uv-dropdown-checkbox\">
  404.                                                 <label>
  405.                                                     <div class=\"uv-checkbox\">
  406.                                                         <input type=\"checkbox\" id=\"timestamp\" name=\"assetVisibility[]\" value=\"timestamp\" checked>
  407.                                                         <span class=\"uv-checkbox-view uv-checkbox-dwn\"></span>
  408.                                                     </div>
  409.                                                 </label>
  410.                                                 <label for=\"timestamp\">";
  411.         // line 253
  412.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Timestamp"), "html"nulltrue);
  413.         echo "</label>
  414.                                             </li>
  415.                                             ";
  416.         // line 257
  417.         echo "                                            <li class=\"uv-dropdown-checkbox\">
  418.                                                 <label>
  419.                                                     <div class=\"uv-checkbox\">
  420.                                                         <input type=\"checkbox\" id=\"group\" name=\"assetVisibility[]\" value=\"group\" checked>
  421.                                                         <span class=\"uv-checkbox-view uv-checkbox-dwn\"></span>
  422.                                                     </div>
  423.                                                 </label>
  424.                                                 <label for=\"group\">";
  425.         // line 265
  426.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Group"), "html"nulltrue);
  427.         echo "</label>
  428.                                             </li>
  429.                                             ";
  430.         // line 269
  431.         echo "                                            <li class=\"uv-dropdown-checkbox\">
  432.                                                 <label>
  433.                                                     <div class=\"uv-checkbox\">
  434.                                                         <input type=\"checkbox\" id=\"team\" name=\"assetVisibility[]\" value=\"team\" checked>
  435.                                                         <span class=\"uv-checkbox-view uv-checkbox-dwn\"></span>
  436.                                                     </div>
  437.                                                 </label>
  438.                                                 <label for=\"team\">";
  439.         // line 277
  440.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Team"), "html"nulltrue);
  441.         echo "</label>
  442.                                             </li>
  443.                                             ";
  444.         // line 281
  445.         echo "                                            <li class=\"uv-dropdown-checkbox\">
  446.                                                 <label>
  447.                                                     <div class=\"uv-checkbox\">
  448.                                                         <input type=\"checkbox\" id=\"type1\" name=\"assetVisibility[]\" value=\"type1\" checked>
  449.                                                         <span class=\"uv-checkbox-view uv-checkbox-dwn\"></span>
  450.                                                     </div>
  451.                                                 </label>
  452.                                                 <label for=\"type1\">";
  453.         // line 289
  454.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Type"), "html"nulltrue);
  455.         echo "</label>
  456.                                             </li>
  457.                                             ";
  458.         // line 293
  459.         echo "                                            <li class=\"uv-dropdown-checkbox\">
  460.                                                 <label>
  461.                                                     <div class=\"uv-checkbox\">
  462.                                                         <input type=\"checkbox\" id=\"replies\" name=\"assetVisibility[]\" value=\"replies\" checked>
  463.                                                         <span class=\"uv-checkbox-view uv-checkbox-dwn\"></span>
  464.                                                     </div>
  465.                                                 </label>
  466.                                                 <label for=\"replies\">";
  467.         // line 301
  468.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Replies"), "html"nulltrue);
  469.         echo "</label>
  470.                                             </li>
  471.                                             ";
  472.         // line 305
  473.         echo "                                            <li class=\"uv-dropdown-checkbox\">
  474.                                                 <label>
  475.                                                     <div class=\"uv-checkbox\">
  476.                                                         <input type=\"checkbox\" id=\"agent\" name=\"assetVisibility[]\" value=\"agent\" checked>
  477.                                                         <span class=\"uv-checkbox-view uv-checkbox-dwn\"></span>
  478.                                                     </div>
  479.                                                 </label>
  480.                                                 <label for=\"agent\">";
  481.         // line 313
  482.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Agent"), "html"nulltrue);
  483.         echo "</label>
  484.                                             </li>
  485.                                         </ul>
  486.                                     </div>
  487.                                 </div>
  488.                             </div>
  489.                         </div>
  490.                     </div>
  491.                     ";
  492.         // line 323
  493.         echo "                    <div class=\"uv-action-bar-col-lt\" style=\"display: none\">
  494.                         <!-- Mass action -->
  495.                         <div class=\"mass-action\">
  496.                             <div class=\"property-block\">
  497.                                 ";
  498.         // line 328
  499.         echo "                                ";
  500.         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.'328$this->source); })()), "isAccessAuthorized", [=> "ROLE_AGENT_ASSIGN_TICKET"], "method"falsefalsefalse328)) {
  501.             // line 329
  502.             echo "                                    <div class=\"uv-dropdown\">
  503.                                         <div class=\"uv-dropdown-btn uv-vertical-align uv-margin-right-5\">";
  504.             // line 330
  505.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Agent"), "html"nulltrue);
  506.             echo "</div>
  507.                                         <div class=\"uv-dropdown-list uv-bottom-left\">
  508.                                             <div class=\"uv-dropdown-container\">
  509.                                                 <label>";
  510.             // line 333
  511.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Agent"), "html"nulltrue);
  512.             echo "</label>
  513.                                                 <div class=\"uv-search-sm\">
  514.                                                     <input type=\"text\" class=\"uv-search-field\" placeholder=\"Search\">
  515.                                                 </div>
  516.                                             </div>
  517.                                             <ul class=\"uv-agents-list agent\" data-action=\"agent\">
  518.                                                 ";
  519.             // line 340
  520.             $context['_parent'] = $context;
  521.             $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.'340$this->source); })()), "getAgentPartialDataCollection", [], "method"falsefalsefalse340));
  522.             foreach ($context['_seq'] as $context["_key"] => $context["agent"]) {
  523.                 // line 341
  524.                 echo "                                                    <li data-index=\"";
  525.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["agent"], "id", [], "any"falsefalsefalse341), "html"nulltrue);
  526.                 echo "\">
  527.                                                         ";
  528.                 // line 342
  529.                 if ((!== twig_compare(twig_get_attribute($this->env$this->source$context["agent"], "smallThumbnail", [], "any"falsefalsefalse342), null))) {
  530.                     // line 343
  531.                     echo "                                                            <img src=\"";
  532.                     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.'343$this->source); })()), "request", [], "any"falsefalsefalse343), "scheme", [], "any"falsefalsefalse343) . "://") . 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.'343$this->source); })()), "request", [], "any"falsefalsefalse343), "httpHost", [], "any"falsefalsefalse343)) . $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("")), "html"nulltrue);
  533.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["agent"], "smallThumbnail", [], "any"falsefalsefalse343), "html"nulltrue);
  534.                     echo "\"/>
  535.                                                         ";
  536.                 } else {
  537.                     // line 345
  538.                     echo "                                                            <img src=\"";
  539.                     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.'345$this->source); })())), "html"nulltrue);
  540.                     echo "\" alt=\"\"/>
  541.                                                         ";
  542.                 }
  543.                 // line 347
  544.                 echo "                                                        ";
  545.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["agent"], "name", [], "any"falsefalsefalse347), "html"nulltrue);
  546.                 echo "
  547.                                                     </li>
  548.                                                 ";
  549.             }
  550.             $_parent $context['_parent'];
  551.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['agent'], $context['_parent'], $context['loop']);
  552.             $context array_intersect_key($context$_parent) + $_parent;
  553.             // line 350
  554.             echo "                                            </ul>
  555.                                         </div>
  556.                                     </div>
  557.                                 ";
  558.         }
  559.         // line 354
  560.         echo "
  561.                                 ";
  562.         // line 356
  563.         echo "                                ";
  564.         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.'356$this->source); })()), "isAccessAuthorized", [=> "ROLE_AGENT_ASSIGN_TICKET_GROUP"], "method"falsefalsefalse356)) {
  565.             // line 357
  566.             echo "                                    <div class=\"uv-dropdown\">
  567.                                         <div class=\"uv-dropdown-btn uv-vertical-align uv-margin-right-5\">";
  568.             // line 358
  569.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Group"), "html"nulltrue);
  570.             echo "</div>
  571.                                         <div class=\"uv-dropdown-list uv-bottom-left\">
  572.                                             <div class=\"uv-dropdown-container\">
  573.                                                 <label>";
  574.             // line 361
  575.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Group"), "html"nulltrue);
  576.             echo "</label>
  577.                                                 <div class=\"uv-search-sm\">
  578.                                                     <input type=\"text\" class=\"uv-search-field\" placeholder=\"Search\">
  579.                                                 </div>
  580.                                             </div>
  581.                                             <ul class=\"uv-search-list group\" data-action=\"group\">
  582.                                                 ";
  583.             // line 368
  584.             $context['_parent'] = $context;
  585.             $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.'368$this->source); })()), "getSupportGroups", [], "method"falsefalsefalse368));
  586.             foreach ($context['_seq'] as $context["_key"] => $context["group"]) {
  587.                 // line 369
  588.                 echo "                                                    <li data-index=\"";
  589.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["group"], "id", [], "any"falsefalsefalse369), "html"nulltrue);
  590.                 echo "\"><a href=\"#\">";
  591.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["group"], "name", [], "any"falsefalsefalse369), "html"nulltrue);
  592.                 echo "</a></li>
  593.                                                 ";
  594.             }
  595.             $_parent $context['_parent'];
  596.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['group'], $context['_parent'], $context['loop']);
  597.             $context array_intersect_key($context$_parent) + $_parent;
  598.             // line 371
  599.             echo "                                            </ul>
  600.                                         </div>
  601.                                     </div>
  602.                                 ";
  603.         }
  604.         // line 375
  605.         echo "
  606.                                 ";
  607.         // line 377
  608.         echo "                                ";
  609.         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.'377$this->source); })()), "isAccessAuthorized", [=> "ROLE_AGENT_ASSIGN_TICKET_GROUP"], "method"falsefalsefalse377)) {
  610.             // line 378
  611.             echo "                                    <div class=\"uv-dropdown\">
  612.                                         <div class=\"uv-dropdown-btn uv-vertical-align uv-margin-right-5\">";
  613.             // line 379
  614.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Team"), "html"nulltrue);
  615.             echo "</div>
  616.                                         <div class=\"uv-dropdown-list uv-bottom-left\">
  617.                                             <div class=\"uv-dropdown-container\">
  618.                                                 <label>";
  619.             // line 382
  620.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Team"), "html"nulltrue);
  621.             echo "</label>
  622.                                                 <div class=\"uv-search-sm\">
  623.                                                     <input type=\"text\" class=\"uv-search-field\" placeholder=\"Search\">
  624.                                                 </div>
  625.                                             </div>
  626.                                             <ul class=\"uv-search-list team\" data-action=\"team\">
  627.                                                 ";
  628.             // line 389
  629.             $context['_parent'] = $context;
  630.             $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.'389$this->source); })()), "getSupportTeams", [], "method"falsefalsefalse389));
  631.             foreach ($context['_seq'] as $context["_key"] => $context["team"]) {
  632.                 // line 390
  633.                 echo "                                                    <li data-index=\"";
  634.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["team"], "id", [], "any"falsefalsefalse390), "html"nulltrue);
  635.                 echo "\"><a href=\"#\">";
  636.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["team"], "name", [], "any"falsefalsefalse390), "html"nulltrue);
  637.                 echo "</a></li>
  638.                                                 ";
  639.             }
  640.             $_parent $context['_parent'];
  641.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['team'], $context['_parent'], $context['loop']);
  642.             $context array_intersect_key($context$_parent) + $_parent;
  643.             // line 392
  644.             echo "                                            </ul>
  645.                                         </div>
  646.                                     </div>
  647.                                 ";
  648.         }
  649.         // line 396
  650.         echo "
  651.                                 ";
  652.         // line 398
  653.         echo "                                ";
  654.         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_UPDATE_TICKET_STATUS"], "method"falsefalsefalse398)) {
  655.             // line 399
  656.             echo "                                    <div class=\"uv-dropdown\">
  657.                                         <div class=\"uv-dropdown-btn uv-vertical-align uv-margin-right-5\">";
  658.             // line 400
  659.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Status"), "html"nulltrue);
  660.             echo "</div>
  661.                                         <div class=\"uv-dropdown-list uv-bottom-left\">
  662.                                             <div class=\"uv-dropdown-container\">
  663.                                                 <label>";
  664.             // line 403
  665.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Status"), "html"nulltrue);
  666.             echo "</label>
  667.                                                 <ul class=\"status\" data-action=\"status\">
  668.                                                     ";
  669.             // line 406
  670.             $context['_parent'] = $context;
  671.             $context['_seq'] = twig_ensure_traversable((isset($context["ticketStatusCollection"]) || array_key_exists("ticketStatusCollection"$context) ? $context["ticketStatusCollection"] : (function () { throw new RuntimeError('Variable "ticketStatusCollection" does not exist.'406$this->source); })()));
  672.             foreach ($context['_seq'] as $context["_key"] => $context["status"]) {
  673.                 // line 407
  674.                 echo "                                                        <li data-index=\"";
  675.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["status"], "id", [], "any"falsefalsefalse407), "html"nulltrue);
  676.                 echo "\"><a href=\"#\">";
  677.                 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"falsefalsefalse407)), "html"nulltrue);
  678.                 echo "</a></li>
  679.                                                     ";
  680.             }
  681.             $_parent $context['_parent'];
  682.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['status'], $context['_parent'], $context['loop']);
  683.             $context array_intersect_key($context$_parent) + $_parent;
  684.             // line 409
  685.             echo "                                                </ul>
  686.                                             </div>
  687.                                         </div>
  688.                                     </div>
  689.                                 ";
  690.         }
  691.         // line 414
  692.         echo "
  693.                                 ";
  694.         // line 416
  695.         echo "                                ";
  696.         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.'416$this->source); })()), "isAccessAuthorized", [=> "ROLE_AGENT_UPDATE_TICKET_TYPE"], "method"falsefalsefalse416)) {
  697.             // line 417
  698.             echo "                                    <div class=\"uv-dropdown\">
  699.                                         <div class=\"uv-dropdown-btn uv-vertical-align uv-margin-right-5\">";
  700.             // line 418
  701.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Type"), "html"nulltrue);
  702.             echo "</div>
  703.                                         <div class=\"uv-dropdown-list uv-bottom-left\">
  704.                                             <div class=\"uv-dropdown-container\">
  705.                                                 <label>";
  706.             // line 421
  707.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Type"), "html"nulltrue);
  708.             echo "</label>
  709.                                                 <div class=\"uv-search-sm\">
  710.                                                     <input type=\"text\" class=\"uv-search-field\" placeholder=\"";
  711.             // line 423
  712.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Search"), "html"nulltrue);
  713.             echo "\">
  714.                                                 </div>
  715.                                             </div>
  716.                                             <ul class=\"uv-search-list type\" data-action=\"type\">
  717.                                                 ";
  718.             // line 428
  719.             $context['_parent'] = $context;
  720.             $context['_seq'] = twig_ensure_traversable((isset($context["ticketTypeCollection"]) || array_key_exists("ticketTypeCollection"$context) ? $context["ticketTypeCollection"] : (function () { throw new RuntimeError('Variable "ticketTypeCollection" does not exist.'428$this->source); })()));
  721.             foreach ($context['_seq'] as $context["_key"] => $context["type"]) {
  722.                 // line 429
  723.                 echo "                                                    <li data-index=\"";
  724.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["type"], "id", [], "any"falsefalsefalse429), "html"nulltrue);
  725.                 echo "\"><a href=\"#\">";
  726.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["type"], "description", [], "any"falsefalsefalse429), "html"nulltrue);
  727.                 echo "</a></li>
  728.                                                 ";
  729.             }
  730.             $_parent $context['_parent'];
  731.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['type'], $context['_parent'], $context['loop']);
  732.             $context array_intersect_key($context$_parent) + $_parent;
  733.             // line 431
  734.             echo "                                            </ul>
  735.                                         </div>
  736.                                     </div>
  737.                                 ";
  738.         }
  739.         // line 435
  740.         echo "
  741.                                 ";
  742.         // line 437
  743.         echo "                                ";
  744.         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.'437$this->source); })()), "isAccessAuthorized", [=> "ROLE_AGENT_UPDATE_TICKET_PRIORITY"], "method"falsefalsefalse437)) {
  745.             // line 438
  746.             echo "                                    <div class=\"uv-dropdown\">
  747.                                         <div class=\"uv-dropdown-btn uv-vertical-align uv-margin-right-5\">";
  748.             // line 439
  749.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Priority"), "html"nulltrue);
  750.             echo "</div>
  751.                                         <div class=\"uv-dropdown-list uv-bottom-left\">
  752.                                             <div class=\"uv-dropdown-container\">
  753.                                                 <label>";
  754.             // line 442
  755.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Priority"), "html"nulltrue);
  756.             echo "</label>
  757.                                                 <ul class=\"priority\" data-action=\"priority\">
  758.                                                     ";
  759.             // line 445
  760.             $context['_parent'] = $context;
  761.             $context['_seq'] = twig_ensure_traversable((isset($context["ticketPriorityCollection"]) || array_key_exists("ticketPriorityCollection"$context) ? $context["ticketPriorityCollection"] : (function () { throw new RuntimeError('Variable "ticketPriorityCollection" does not exist.'445$this->source); })()));
  762.             foreach ($context['_seq'] as $context["_key"] => $context["priority"]) {
  763.                 // line 446
  764.                 echo "                                                        <li data-index=\"";
  765.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["priority"], "id", [], "any"falsefalsefalse446), "html"nulltrue);
  766.                 echo "\"><a href=\"#\">";
  767.                 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"falsefalsefalse446)), "html"nulltrue);
  768.                 echo "</a></li>
  769.                                                     ";
  770.             }
  771.             $_parent $context['_parent'];
  772.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['priority'], $context['_parent'], $context['loop']);
  773.             $context array_intersect_key($context$_parent) + $_parent;
  774.             // line 448
  775.             echo "                                                </ul>
  776.                                             </div>
  777.                                         </div>
  778.                                     </div>
  779.                                 ";
  780.         }
  781.         // line 453
  782.         echo "
  783.                                 ";
  784.         // line 455
  785.         echo "                                <div class=\"uv-dropdown\">
  786.                                     <div class=\"uv-dropdown-btn uv-vertical-align uv-margin-right-5\">";
  787.         // line 456
  788.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Label"), "html"nulltrue);
  789.         echo "</div>
  790.                                     <div class=\"uv-dropdown-list uv-bottom-left\">
  791.                                         <div class=\"uv-dropdown-container\">
  792.                                             <label>";
  793.         // line 459
  794.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Label"), "html"nulltrue);
  795.         echo "</label>
  796.                                             <div class=\"uv-search-sm\">
  797.                                                 <input type=\"text\" class=\"uv-search-field\" placeholder=\"Search\">
  798.                                             </div>
  799.                                         </div>
  800.                                         <ul class=\"uv-search-list label\" data-action=\"label\"></ul>
  801.                                     </div>
  802.                                 </div>
  803.                                 ";
  804.         // line 471
  805.         echo "                                ";
  806.         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.'471$this->source); })()), "isAccessAuthorized", [=> "ROLE_AGENT_DELETE_TICKET"], "method"falsefalsefalse471)) {
  807.             // line 472
  808.             echo "                                    <a class=\"uv-btn-stroke uv-margin-right-5\" id=\"mass-delete\" data-action=\"trashed\" style=\"margin-left: 5px;\">";
  809.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Delete"), "html"nulltrue);
  810.             echo "</a>
  811.                                 ";
  812.         }
  813.         // line 474
  814.         echo "                            </div>
  815.                             ";
  816.         // line 477
  817.         echo "                            <div class=\"trashed-block\" style=\"display: none\">
  818.                                 ";
  819.         // line 479
  820.         echo "                                ";
  821.         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.'479$this->source); })()), "isAccessAuthorized", [=> "ROLE_AGENT_RESTORE_TICKET"], "method"falsefalsefalse479)) {
  822.             // line 480
  823.             echo "                                    <a class=\"uv-btn-stroke uv-margin-right-5\" id=\"mass-restore\" data-action=\"restore\" style=\"margin-left: 5px;\">";
  824.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Restore"), "html"nulltrue);
  825.             echo "</a>
  826.                                 ";
  827.         }
  828.         // line 482
  829.         echo "
  830.                                 ";
  831.         // line 484
  832.         echo "                                ";
  833.         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.'484$this->source); })()), "isAccessAuthorized", [=> "ROLE_AGENT_DELETE_TICKET"], "method"falsefalsefalse484)) {
  834.             // line 485
  835.             echo "                                    <a class=\"uv-btn-stroke uv-margin-right-5\" id=\"mass-delete-forever\" data-action=\"delete\" style=\"margin-left: 5px;\">";
  836.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Delete Forever"), "html"nulltrue);
  837.             echo "</a>
  838.                                 ";
  839.         }
  840.         // line 487
  841.         echo "                            </div>
  842.                         </div>
  843.                     </div>
  844.                     ";
  845.         // line 492
  846.         echo "                    <div class=\"uv-action-bar-col-rt\">
  847.                         <!-- Search Tickets -->
  848.                         <input type=\"text\" class=\"uv-search-inline\" placeholder=\"";
  849.         // line 494
  850.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Search"), "html"nulltrue);
  851.         echo "\">
  852.                         <!-- Extra Filters -->
  853.                         <div class=\"uv-btn-stroke uv-margin-left-15 filter-view-trigger\" data-target=\"uv-filter-view\"><span class=\"uv-icon-filter\"></span>";
  854.         // line 497
  855.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Filter View"), "html"nulltrue);
  856.         echo "</div>
  857.                     </div>
  858.                 </div>
  859.             </div>
  860.             ";
  861.         // line 503
  862.         echo "            <div class=\"uv-table uv-list-view\">
  863.                 <table>
  864.                     <thead>
  865.                     <tr>
  866.                         <th class=\"uv-width-140\"></th>
  867.                         <th>";
  868.         // line 508
  869.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ID"), "html"nulltrue);
  870.         echo "</th>
  871.                         <th class=\"uv-min-width-300\">";
  872.         // line 509
  873.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Subject"), "html"nulltrue);
  874.         echo "</th>
  875.                         <th data-index=\"customer-name\">";
  876.         // line 510
  877.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Customer Name"), "html"nulltrue);
  878.         echo "</th>
  879.                         <th data-index=\"customer-email\">";
  880.         // line 511
  881.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Customer Email"), "html"nulltrue);
  882.         echo "</th>
  883.                         <th data-index=\"timestamp\">";
  884.         // line 512
  885.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Timestamp"), "html"nulltrue);
  886.         echo "</th>
  887.                         <th style =\"min-width:100px\" data-index=\"lastReply\">";
  888.         // line 513
  889.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Last Reply"), "html"nulltrue);
  890.         echo "</th>
  891.                         <th data-index=\"group\">";
  892.         // line 514
  893.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Group"), "html"nulltrue);
  894.         echo "</th>
  895.                         <th data-index=\"team\">";
  896.         // line 515
  897.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Team"), "html"nulltrue);
  898.         echo "</th>
  899.                         <th data-index=\"type1\">";
  900.         // line 516
  901.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Type"), "html"nulltrue);
  902.         echo "</th>
  903.                         <th data-index=\"replies\">";
  904.         // line 517
  905.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Replies"), "html"nulltrue);
  906.         echo "</th>
  907.                         <th data-index=\"agent\">";
  908.         // line 518
  909.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Agent"), "html"nulltrue);
  910.         echo "</th>
  911.                     </tr>
  912.                     </thead>
  913.                     <tbody></tbody>
  914.                 </table>
  915.                 <div class=\"navigation\"></div>
  916.             </div>
  917.         </div>
  918.         ";
  919.         // line 530
  920.         echo "        <div class=\"uv-filter-view\" id=\"uv-filter-view\">
  921.             ";
  922.         // line 532
  923.         echo "            <div class=\"uv-filter-head\">
  924.                 <div class=\"uv-filter-title\">
  925.                     <h6>";
  926.         // line 534
  927.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Tickets"), "html"nulltrue);
  928.         echo "</h6>
  929.                     <span>";
  930.         // line 535
  931.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Save set of filters as a preset to stay more productive"), "html"nulltrue);
  932.         echo "</span>
  933.                 </div>
  934.                 <div class=\"uv-filter-toggle\" id=\"filter-close-trigger\"><span></span></div>
  935.             </div>
  936.             ";
  937.         // line 542
  938.         echo "            <div class=\"uv-filter-paper\">
  939.                 ";
  940.         // line 544
  941.         echo "                <div class=\"uv-filter-options\">
  942.                     <script>
  943.                         var userFilters = {};
  944.                     </script>
  945.                     ";
  946.         // line 550
  947.         echo "                    <div class=\"uv-element-block\" style=\"border-bottom: 1px solid #D3D3D3; padding-bottom: 5px;\">
  948.                         <label class=\"uv-field-label\">";
  949.         // line 551
  950.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Saved Filters"), "html"nulltrue);
  951.         echo "</label>
  952.                         <div class=\"uv-field-block\">
  953.                             <div class=\"uv-customize-wrapper\">
  954.                                 <select class=\"uv-select uv-select-70\" id=\"saved-filter\">
  955.                                     ";
  956.         // line 555
  957.         $context["filters"] = 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.'555$this->source); })()), "user", [], "any"falsefalsefalse555), "agentInstance", [], "any"falsefalsefalse555), "userSavedFilters", [], "any"falsefalsefalse555);
  958.         // line 556
  959.         echo "                                    ";
  960.         if (twig_length_filter($this->env, (isset($context["filters"]) || array_key_exists("filters"$context) ? $context["filters"] : (function () { throw new RuntimeError('Variable "filters" does not exist.'556$this->source); })()))) {
  961.             // line 557
  962.             echo "                                        <option value=\"\">-- Saved Filter --</option>
  963.                                         ";
  964.             // line 558
  965.             $context['_parent'] = $context;
  966.             $context['_seq'] = twig_ensure_traversable((isset($context["filters"]) || array_key_exists("filters"$context) ? $context["filters"] : (function () { throw new RuntimeError('Variable "filters" does not exist.'558$this->source); })()));
  967.             foreach ($context['_seq'] as $context["_key"] => $context["userFilter"]) {
  968.                 // line 559
  969.                 echo "                                            <option value=\"";
  970.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["userFilter"], "id", [], "any"falsefalsefalse559), "html"nulltrue);
  971.                 echo "\">";
  972.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["userFilter"], "name", [], "any"falsefalsefalse559), "html"nulltrue);
  973.                 echo "</option>
  974.                                         ";
  975.             }
  976.             $_parent $context['_parent'];
  977.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['userFilter'], $context['_parent'], $context['loop']);
  978.             $context array_intersect_key($context$_parent) + $_parent;
  979.             // line 561
  980.             echo "                                    ";
  981.         } else {
  982.             // line 562
  983.             echo "                                        <option value=\"\">";
  984.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("No saved filter created"), "html"nulltrue);
  985.             echo "</option>
  986.                                     ";
  987.         }
  988.         // line 564
  989.         echo "                                </select>
  990.                                 ";
  991.         // line 565
  992.         $context['_parent'] = $context;
  993.         $context['_seq'] = twig_ensure_traversable(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.'565$this->source); })()), "user", [], "any"falsefalsefalse565), "agentInstance", [], "any"falsefalsefalse565), "userSavedFilters", [], "any"falsefalsefalse565));
  994.         foreach ($context['_seq'] as $context["_key"] => $context["userFilter"]) {
  995.             // line 566
  996.             echo "                                    <script>
  997.                                         ";
  998.             // line 567
  999.             $context["isDefault"] = 0;
  1000.             // line 568
  1001.             echo "                                        ";
  1002.             if ((=== twig_compare(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.'568$this->source); })()), "user", [], "any"falsefalsefalse568), "agentInstance", [], "any"falsefalsefalse568), "defaultFiltering", [], "any"falsefalsefalse568), twig_get_attribute($this->env$this->source$context["userFilter"], "id", [], "any"falsefalsefalse568)))) {
  1003.                 // line 569
  1004.                 echo "                                        ";
  1005.                 $context["isDefault"] = 1;
  1006.                 // line 570
  1007.                 echo "                                        ";
  1008.             }
  1009.             // line 571
  1010.             echo "                                        userFilters[";
  1011.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["userFilter"], "id", [], "any"falsefalsefalse571), "html"nulltrue);
  1012.             echo "] = ";
  1013.             echo json_encode(["id" => twig_get_attribute($this->env$this->source$context["userFilter"], "id", [], "any"falsefalsefalse571), "name" => twig_get_attribute($this->env$this->source$context["userFilter"], "name", [], "any"falsefalsefalse571), "route" => twig_get_attribute($this->env$this->source$context["userFilter"], "route", [], "any"falsefalsefalse571), "is_default" => (isset($context["isDefault"]) || array_key_exists("isDefault"$context) ? $context["isDefault"] : (function () { throw new RuntimeError('Variable "isDefault" does not exist.'571$this->source); })())]);
  1014.             echo ";
  1015.                                     </script>
  1016.                                 ";
  1017.         }
  1018.         $_parent $context['_parent'];
  1019.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['userFilter'], $context['_parent'], $context['loop']);
  1020.         $context array_intersect_key($context$_parent) + $_parent;
  1021.         // line 574
  1022.         echo "                                <span class=\"uv-customize\" style=\"display: none\" data-toggle=\"tooltip\" title=\"";
  1023.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Edit Saved Filter"), "html"nulltrue);
  1024.         echo "\"></span>
  1025.                             </div>
  1026.                         </div>
  1027.                     </div>
  1028.                     ";
  1029.         // line 579
  1030.         $context["filterContext"] = [];
  1031.         // line 580
  1032.         echo "                    ";
  1033.         // line 581
  1034.         echo "                    <div class=\"uv-element-block\">
  1035.                         <label class=\"uv-field-label\">";
  1036.         // line 582
  1037.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Agent"), "html"nulltrue);
  1038.         echo "</label>
  1039.                         <div class=\"uv-field-block\" id=\"agent-filter\">
  1040.                             <input class=\"uv-field uv-dropdown-other preloaded\" type=\"text\" data-filter-type=\"agent\" id=\"agent-filter-input\">
  1041.                             <div class=\"uv-dropdown-list uv-bottom-left\">
  1042.                                 <div class=\"uv-dropdown-container\">
  1043.                                     <label>";
  1044.         // line 587
  1045.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Filter With"), "html"nulltrue);
  1046.         echo "</label>
  1047.                                 </div>
  1048.                                 <ul class=\"uv-agents-list\">
  1049.                                     ";
  1050.         // line 590
  1051.         $context["options"] = [];
  1052.         // line 591
  1053.         echo "                                    ";
  1054.         $context['_parent'] = $context;
  1055.         $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.'591$this->source); })()), "getAgentsPartialDetails", [], "any"falsefalsefalse591));
  1056.         foreach ($context['_seq'] as $context["_key"] => $context["agent"]) {
  1057.             // line 592
  1058.             echo "                                        ";
  1059.             $context["options"] = twig_array_merge((isset($context["options"]) || array_key_exists("options"$context) ? $context["options"] : (function () { throw new RuntimeError('Variable "options" does not exist.'592$this->source); })()), [=> ["id" => twig_get_attribute($this->env$this->source$context["agent"], "id", [], "any"falsefalsefalse592), "name" => twig_get_attribute($this->env$this->source$context["agent"], "name", [], "any"falsefalsefalse592)]]);
  1060.             // line 593
  1061.             echo "                                        <li data-id=\"";
  1062.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["agent"], "id", [], "any"falsefalsefalse593), "html"nulltrue);
  1063.             echo "\">
  1064.                                             ";
  1065.             // line 594
  1066.             if ((!== twig_compare(twig_get_attribute($this->env$this->source$context["agent"], "smallThumbnail", [], "any"falsefalsefalse594), null))) {
  1067.                 // line 595
  1068.                 echo "                                                <img src=\"";
  1069.                 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.'595$this->source); })()), "request", [], "any"falsefalsefalse595), "scheme", [], "any"falsefalsefalse595) . "://") . 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.'595$this->source); })()), "request", [], "any"falsefalsefalse595), "httpHost", [], "any"falsefalsefalse595)) . $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("")), "html"nulltrue);
  1070.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["agent"], "smallThumbnail", [], "any"falsefalsefalse595), "html"nulltrue);
  1071.                 echo "\"/>
  1072.                                             ";
  1073.             } else {
  1074.                 // line 597
  1075.                 echo "                                                <img src=\"";
  1076.                 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.'597$this->source); })())), "html"nulltrue);
  1077.                 echo "\"/>
  1078.                                             ";
  1079.             }
  1080.             // line 599
  1081.             echo "                                            ";
  1082.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["agent"], "name", [], "any"falsefalsefalse599), "html"nulltrue);
  1083.             echo "
  1084.                                         </li>
  1085.                                     ";
  1086.         }
  1087.         $_parent $context['_parent'];
  1088.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['agent'], $context['_parent'], $context['loop']);
  1089.         $context array_intersect_key($context$_parent) + $_parent;
  1090.         // line 602
  1091.         echo "                                    <li class=\"uv-no-results\" style=\"display: none;\">
  1092.                                         ";
  1093.         // line 603
  1094.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("No result found"), "html"nulltrue);
  1095.         echo "
  1096.                                     </li>
  1097.                                     ";
  1098.         // line 605
  1099.         $context["filterContext"] = twig_array_merge((isset($context["filterContext"]) || array_key_exists("filterContext"$context) ? $context["filterContext"] : (function () { throw new RuntimeError('Variable "filterContext" does not exist.'605$this->source); })()), ["agent" => (isset($context["options"]) || array_key_exists("options"$context) ? $context["options"] : (function () { throw new RuntimeError('Variable "options" does not exist.'605$this->source); })())]);
  1100.         // line 606
  1101.         echo "                                </ul>
  1102.                             </div>
  1103.                             <div class=\"uv-filtered-tags\"></div>
  1104.                         </div>
  1105.                     </div>
  1106.                     <div class=\"uv-element-block\">
  1107.                         <label class=\"uv-field-label\">";
  1108.         // line 613
  1109.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Customer"), "html"nulltrue);
  1110.         echo "</label>
  1111.                         <div class=\"uv-field-block\" id=\"customer-filter\">
  1112.                             <input class=\"uv-field uv-dropdown-other\" type=\"text\" data-filter-type=\"customer\" id=\"customer-filter-input\">
  1113.                             <div class=\"uv-dropdown-list uv-bottom-left\">
  1114.                                 <div class=\"uv-dropdown-container\">
  1115.                                     <label>";
  1116.         // line 618
  1117.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Filter With"), "html"nulltrue);
  1118.         echo "</label>
  1119.                                 </div>
  1120.                                 <ul class=\"uv-agents-list\">
  1121.                                     <li class=\"uv-filter-info\">
  1122.                                         ";
  1123.         // line 622
  1124.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Type atleast 2 letters"), "html"nulltrue);
  1125.         echo "
  1126.                                     </li>
  1127.                                     <li class=\"uv-no-results\" style=\"display: none;\">
  1128.                                         ";
  1129.         // line 625
  1130.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("No result found"), "html"nulltrue);
  1131.         echo "
  1132.                                     </li>
  1133.                                 </ul>
  1134.                             </div>
  1135.                             <div class=\"uv-filtered-tags\"></div>
  1136.                         </div>
  1137.                     </div>
  1138.                     <div class=\"uv-element-block\">
  1139.                         <label class=\"uv-field-label\">";
  1140.         // line 634
  1141.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Group"), "html"nulltrue);
  1142.         echo "</label>
  1143.                         <div class=\"uv-field-block\" id=\"group-filter\">
  1144.                             <input class=\"uv-field uv-dropdown-other preloaded\" type=\"text\" data-filter-type=\"group\" id=\"group-filter-input\">
  1145.                             <div class=\"uv-dropdown-list uv-bottom-left\">
  1146.                                 <div class=\"uv-dropdown-container\">
  1147.                                     <label>";
  1148.         // line 639
  1149.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Filter With"), "html"nulltrue);
  1150.         echo "</label>
  1151.                                     <ul class=\"\">
  1152.                                         ";
  1153.         // line 641
  1154.         $context["options"] = [];
  1155.         // line 642
  1156.         echo "                                        ";
  1157.         $context['_parent'] = $context;
  1158.         $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.'642$this->source); })()), "getSupportGroups", [], "method"falsefalsefalse642));
  1159.         foreach ($context['_seq'] as $context["_key"] => $context["group"]) {
  1160.             // line 643
  1161.             echo "                                            ";
  1162.             $context["options"] = twig_array_merge((isset($context["options"]) || array_key_exists("options"$context) ? $context["options"] : (function () { throw new RuntimeError('Variable "options" does not exist.'643$this->source); })()), [=> ["id" => twig_get_attribute($this->env$this->source$context["group"], "id", [], "any"falsefalsefalse643), "name" => twig_get_attribute($this->env$this->source$context["group"], "name", [], "any"falsefalsefalse643)]]);
  1163.             // line 644
  1164.             echo "                                            <li data-id=\"";
  1165.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["group"], "id", [], "any"falsefalsefalse644), "html"nulltrue);
  1166.             echo "\">
  1167.                                                 ";
  1168.             // line 645
  1169.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["group"], "name", [], "any"falsefalsefalse645), "html"nulltrue);
  1170.             echo "
  1171.                                             </li>
  1172.                                         ";
  1173.         }
  1174.         $_parent $context['_parent'];
  1175.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['group'], $context['_parent'], $context['loop']);
  1176.         $context array_intersect_key($context$_parent) + $_parent;
  1177.         // line 648
  1178.         echo "                                        <li class=\"uv-no-results\" style=\"display: none;\">
  1179.                                             ";
  1180.         // line 649
  1181.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("No result found"), "html"nulltrue);
  1182.         echo "
  1183.                                         </li>
  1184.                                         ";
  1185.         // line 651
  1186.         $context["filterContext"] = twig_array_merge((isset($context["filterContext"]) || array_key_exists("filterContext"$context) ? $context["filterContext"] : (function () { throw new RuntimeError('Variable "filterContext" does not exist.'651$this->source); })()), ["group" => (isset($context["options"]) || array_key_exists("options"$context) ? $context["options"] : (function () { throw new RuntimeError('Variable "options" does not exist.'651$this->source); })())]);
  1187.         // line 652
  1188.         echo "                                    </ul>
  1189.                                 </div>
  1190.                             </div>
  1191.                             <div class=\"uv-filtered-tags\"></div>
  1192.                         </div>
  1193.                     </div>
  1194.                     <div class=\"uv-element-block\">
  1195.                         <label class=\"uv-field-label\">";
  1196.         // line 660
  1197.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Team"), "html"nulltrue);
  1198.         echo "</label>
  1199.                         <div class=\"uv-field-block\" id=\"team-filter\">
  1200.                             <input class=\"uv-field uv-dropdown-other preloaded\" type=\"text\" data-filter-type=\"team\" id=\"team-filter-input\">
  1201.                             <div class=\"uv-dropdown-list uv-bottom-left\">
  1202.                                 <div class=\"uv-dropdown-container\">
  1203.                                     <label>";
  1204.         // line 665
  1205.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Filter With"), "html"nulltrue);
  1206.         echo "</label>
  1207.                                     <ul class=\"\">
  1208.                                         ";
  1209.         // line 667
  1210.         $context["options"] = [];
  1211.         // line 668
  1212.         echo "                                        ";
  1213.         $context['_parent'] = $context;
  1214.         $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.'668$this->source); })()), "getSupportTeams", [], "method"falsefalsefalse668));
  1215.         foreach ($context['_seq'] as $context["_key"] => $context["team"]) {
  1216.             // line 669
  1217.             echo "                                            ";
  1218.             $context["options"] = twig_array_merge((isset($context["options"]) || array_key_exists("options"$context) ? $context["options"] : (function () { throw new RuntimeError('Variable "options" does not exist.'669$this->source); })()), [=> ["id" => twig_get_attribute($this->env$this->source$context["team"], "id", [], "any"falsefalsefalse669), "name" => twig_get_attribute($this->env$this->source$context["team"], "name", [], "any"falsefalsefalse669)]]);
  1219.             // line 670
  1220.             echo "                                            <li data-id=\"";
  1221.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["team"], "id", [], "any"falsefalsefalse670), "html"nulltrue);
  1222.             echo "\">
  1223.                                                 ";
  1224.             // line 671
  1225.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["team"], "name", [], "any"falsefalsefalse671), "html"nulltrue);
  1226.             echo "
  1227.                                             </li>
  1228.                                         ";
  1229.         }
  1230.         $_parent $context['_parent'];
  1231.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['team'], $context['_parent'], $context['loop']);
  1232.         $context array_intersect_key($context$_parent) + $_parent;
  1233.         // line 674
  1234.         echo "                                        <li class=\"uv-no-results\" style=\"display: none;\">
  1235.                                             ";
  1236.         // line 675
  1237.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("No result found"), "html"nulltrue);
  1238.         echo "
  1239.                                         </li>
  1240.                                         ";
  1241.         // line 677
  1242.         $context["filterContext"] = twig_array_merge((isset($context["filterContext"]) || array_key_exists("filterContext"$context) ? $context["filterContext"] : (function () { throw new RuntimeError('Variable "filterContext" does not exist.'677$this->source); })()), ["team" => (isset($context["options"]) || array_key_exists("options"$context) ? $context["options"] : (function () { throw new RuntimeError('Variable "options" does not exist.'677$this->source); })())]);
  1243.         // line 678
  1244.         echo "                                    </ul>
  1245.                                 </div>
  1246.                             </div>
  1247.                             <div class=\"uv-filtered-tags\"></div>
  1248.                         </div>
  1249.                     </div>
  1250.                     <div class=\"uv-element-block\">
  1251.                         <label class=\"uv-field-label\">";
  1252.         // line 686
  1253.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Type"), "html"nulltrue);
  1254.         echo "</label>
  1255.                         <div class=\"uv-field-block\" id=\"type-filter\">
  1256.                             <input class=\"uv-field uv-dropdown-other preloaded\" type=\"text\" data-filter-type=\"type\" id=\"type-filter-input\">
  1257.                             <div class=\"uv-dropdown-list uv-bottom-left\">
  1258.                                 <div class=\"uv-dropdown-container\">
  1259.                                     <label>";
  1260.         // line 691
  1261.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Filter With"), "html"nulltrue);
  1262.         echo "</label>
  1263.                                     <ul class=\"\">
  1264.                                         ";
  1265.         // line 693
  1266.         $context["options"] = [];
  1267.         // line 694
  1268.         echo "                                        ";
  1269.         $context['_parent'] = $context;
  1270.         $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.'694$this->source); })()), "getTypes", [], "method"falsefalsefalse694));
  1271.         foreach ($context['_seq'] as $context["_key"] => $context["type"]) {
  1272.             // line 695
  1273.             echo "                                            ";
  1274.             $context["options"] = twig_array_merge((isset($context["options"]) || array_key_exists("options"$context) ? $context["options"] : (function () { throw new RuntimeError('Variable "options" does not exist.'695$this->source); })()), [=> ["id" => twig_get_attribute($this->env$this->source$context["type"], "id", [], "any"falsefalsefalse695), "name" => twig_get_attribute($this->env$this->source$context["type"], "name", [], "any"falsefalsefalse695)]]);
  1275.             // line 696
  1276.             echo "                                            <li data-id=\"";
  1277.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["type"], "id", [], "any"falsefalsefalse696), "html"nulltrue);
  1278.             echo "\">
  1279.                                                 ";
  1280.             // line 697
  1281.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["type"], "name", [], "any"falsefalsefalse697), "html"nulltrue);
  1282.             echo "
  1283.                                             </li>
  1284.                                         ";
  1285.         }
  1286.         $_parent $context['_parent'];
  1287.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['type'], $context['_parent'], $context['loop']);
  1288.         $context array_intersect_key($context$_parent) + $_parent;
  1289.         // line 700
  1290.         echo "                                        <li class=\"uv-no-results\" style=\"display: none;\">
  1291.                                             ";
  1292.         // line 701
  1293.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("No result found"), "html"nulltrue);
  1294.         echo "
  1295.                                         </li>
  1296.                                         ";
  1297.         // line 703
  1298.         $context["filterContext"] = twig_array_merge((isset($context["filterContext"]) || array_key_exists("filterContext"$context) ? $context["filterContext"] : (function () { throw new RuntimeError('Variable "filterContext" does not exist.'703$this->source); })()), ["type" => (isset($context["options"]) || array_key_exists("options"$context) ? $context["options"] : (function () { throw new RuntimeError('Variable "options" does not exist.'703$this->source); })())]);
  1299.         // line 704
  1300.         echo "                                    </ul>
  1301.                                 </div>
  1302.                             </div>
  1303.                             <div class=\"uv-filtered-tags\"></div>
  1304.                         </div>
  1305.                     </div>
  1306.                     <div class=\"uv-element-block\">
  1307.                         <label class=\"uv-field-label\">";
  1308.         // line 712
  1309.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Priority"), "html"nulltrue);
  1310.         echo "</label>
  1311.                         <div class=\"uv-field-block\" id=\"priority-filter\">
  1312.                             <input class=\"uv-field uv-dropdown-other preloaded\" type=\"text\" data-filter-type=\"priority\" id=\"priority-filter-input\">
  1313.                             <div class=\"uv-dropdown-list uv-bottom-left\">
  1314.                                 <div class=\"uv-dropdown-container\">
  1315.                                     <label>";
  1316.         // line 717
  1317.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Filter With"), "html"nulltrue);
  1318.         echo "</label>
  1319.                                     <ul class=\"\">
  1320.                                         ";
  1321.         // line 719
  1322.         $context["options"] = [];
  1323.         // line 720
  1324.         echo "                                        ";
  1325.         $context['_parent'] = $context;
  1326.         $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.'720$this->source); })()), "getPriorities", [], "method"falsefalsefalse720));
  1327.         foreach ($context['_seq'] as $context["_key"] => $context["priority"]) {
  1328.             // line 721
  1329.             echo "                                            ";
  1330.             $context["options"] = twig_array_merge((isset($context["options"]) || array_key_exists("options"$context) ? $context["options"] : (function () { throw new RuntimeError('Variable "options" does not exist.'721$this->source); })()), [=> ["id" => twig_get_attribute($this->env$this->source$context["priority"], "id", [], "any"falsefalsefalse721), "name" => twig_get_attribute($this->env$this->source$context["priority"], "code", [], "any"falsefalsefalse721), "color" => twig_get_attribute($this->env$this->source$context["priority"], "colorCode", [], "any"falsefalsefalse721)]]);
  1331.             // line 722
  1332.             echo "                                            <li data-id=\"";
  1333.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["priority"], "id", [], "any"falsefalsefalse722), "html"nulltrue);
  1334.             echo "\">
  1335.                                                 ";
  1336.             // line 723
  1337.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env$this->source$context["priority"], "code", [], "any"falsefalsefalse723)), "html"nulltrue);
  1338.             echo "
  1339.                                             </li>
  1340.                                         ";
  1341.         }
  1342.         $_parent $context['_parent'];
  1343.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['priority'], $context['_parent'], $context['loop']);
  1344.         $context array_intersect_key($context$_parent) + $_parent;
  1345.         // line 726
  1346.         echo "                                        <li class=\"uv-no-results\" style=\"display: none;\">
  1347.                                             ";
  1348.         // line 727
  1349.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("No result found"), "html"nulltrue);
  1350.         echo "
  1351.                                         </li>
  1352.                                         ";
  1353.         // line 729
  1354.         $context["filterContext"] = twig_array_merge((isset($context["filterContext"]) || array_key_exists("filterContext"$context) ? $context["filterContext"] : (function () { throw new RuntimeError('Variable "filterContext" does not exist.'729$this->source); })()), ["priority" => (isset($context["options"]) || array_key_exists("options"$context) ? $context["options"] : (function () { throw new RuntimeError('Variable "options" does not exist.'729$this->source); })())]);
  1355.         // line 730
  1356.         echo "                                    </ul>
  1357.                                 </div>
  1358.                             </div>
  1359.                             <div class=\"uv-filtered-tags\"></div>
  1360.                         </div>
  1361.                     </div>
  1362.                     <div class=\"uv-element-block\">
  1363.                         <label class=\"uv-field-label\">";
  1364.         // line 738
  1365.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Tag"), "html"nulltrue);
  1366.         echo "</label>
  1367.                         <div class=\"uv-field-block\" id=\"tag-filter\">
  1368.                             <input class=\"uv-field uv-dropdown-other\" type=\"text\" data-filter-type=\"tag\" id=\"tag-filter-input\">
  1369.                             <div class=\"uv-dropdown-list uv-bottom-left\">
  1370.                                 <div class=\"uv-dropdown-container\">
  1371.                                     <label>";
  1372.         // line 743
  1373.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Filter With"), "html"nulltrue);
  1374.         echo "</label>
  1375.                                     <ul class=\"\">
  1376.                                         <li class=\"uv-filter-info\">
  1377.                                             ";
  1378.         // line 746
  1379.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Type atleast 2 letters"), "html"nulltrue);
  1380.         echo "
  1381.                                         </li>
  1382.                                         <li class=\"uv-no-results\" style=\"display: none;\">
  1383.                                             ";
  1384.         // line 749
  1385.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("No result found"), "html"nulltrue);
  1386.         echo "
  1387.                                         </li>
  1388.                                     </ul>
  1389.                                 </div>
  1390.                             </div>
  1391.                             <div class=\"uv-filtered-tags\"></div>
  1392.                         </div>
  1393.                     </div>
  1394.                     <div class=\"uv-element-block\">
  1395.                         <label class=\"uv-field-label\">";
  1396.         // line 758
  1397.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Source"), "html"nulltrue);
  1398.         echo "</label>
  1399.                         <div class=\"uv-field-block\" id=\"source-filter\">
  1400.                             <input class=\"uv-field uv-dropdown-other preloaded\" type=\"text\" data-filter-type=\"source\" id=\"source-filter-input\">
  1401.                             <div class=\"uv-dropdown-list uv-bottom-left\">
  1402.                                 <div class=\"uv-dropdown-container\">
  1403.                                     <label>";
  1404.         // line 763
  1405.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Filter With"), "html"nulltrue);
  1406.         echo "</label>
  1407.                                     <ul class=\"\">
  1408.                                         ";
  1409.         // line 765
  1410.         $context["options"] = [];
  1411.         // line 766
  1412.         echo "                                        ";
  1413.         $context['_parent'] = $context;
  1414.         $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.'766$this->source); })()), "getAllSources", [], "method"falsefalsefalse766));
  1415.         foreach ($context['_seq'] as $context["key"] => $context["source"]) {
  1416.             // line 767
  1417.             echo "                                            ";
  1418.             $context["options"] = twig_array_merge((isset($context["options"]) || array_key_exists("options"$context) ? $context["options"] : (function () { throw new RuntimeError('Variable "options" does not exist.'767$this->source); })()), [=> ["id" => $context["key"], "name" => $context["source"]]]);
  1419.             // line 768
  1420.             echo "                                            <li data-id=\"";
  1421.             echo twig_escape_filter($this->env$context["key"], "html"nulltrue);
  1422.             echo "\">
  1423.                                                 ";
  1424.             // line 769
  1425.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans($context["source"]), "html"nulltrue);
  1426.             echo "
  1427.                                             </li>
  1428.                                         ";
  1429.         }
  1430.         $_parent $context['_parent'];
  1431.         unset($context['_seq'], $context['_iterated'], $context['key'], $context['source'], $context['_parent'], $context['loop']);
  1432.         $context array_intersect_key($context$_parent) + $_parent;
  1433.         // line 772
  1434.         echo "                                        <li class=\"uv-no-results\" style=\"display: none;\">
  1435.                                             ";
  1436.         // line 773
  1437.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("No result found"), "html"nulltrue);
  1438.         echo "
  1439.                                         </li>
  1440.                                         ";
  1441.         // line 775
  1442.         $context["filterContext"] = twig_array_merge((isset($context["filterContext"]) || array_key_exists("filterContext"$context) ? $context["filterContext"] : (function () { throw new RuntimeError('Variable "filterContext" does not exist.'775$this->source); })()), ["source" => (isset($context["options"]) || array_key_exists("options"$context) ? $context["options"] : (function () { throw new RuntimeError('Variable "options" does not exist.'775$this->source); })())]);
  1443.         // line 776
  1444.         echo "                                    </ul>
  1445.                                 </div>
  1446.                             </div>
  1447.                             <div class=\"uv-filtered-tags\"></div>
  1448.                         </div>
  1449.                     </div>
  1450.                     <div class=\"uv-element-block\">
  1451.                         <label class=\"uv-field-label\">";
  1452.         // line 783
  1453.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Mailbox"), "html"nulltrue);
  1454.         echo "</label>
  1455.                         <div class=\"uv-field-block\" id=\"mailbox-filter\">
  1456.                             <input class=\"uv-field uv-dropdown-other preloaded\" type=\"text\" data-filter-type=\"mailbox\" id=\"mailbox-filter-input\">
  1457.                             <div class=\"uv-dropdown-list uv-bottom-left\">
  1458.                                 <div class=\"uv-dropdown-container\">
  1459.                                     <label>";
  1460.         // line 788
  1461.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Filter With"), "html"nulltrue);
  1462.         echo "</label>
  1463.                                     <ul class=\"\">
  1464.                                         ";
  1465.         // line 790
  1466.         $context["options"] = [];
  1467.         // line 791
  1468.         echo "                                        ";
  1469.         $context['_parent'] = $context;
  1470.         $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.'791$this->source); })()), "getAllMailboxes", [], "method"falsefalsefalse791));
  1471.         foreach ($context['_seq'] as $context["_key"] => $context["mailbox"]) {
  1472.             // line 792
  1473.             echo "                                            ";
  1474.             $context["options"] = twig_array_merge((isset($context["options"]) || array_key_exists("options"$context) ? $context["options"] : (function () { throw new RuntimeError('Variable "options" does not exist.'792$this->source); })()), [=> ["id" => twig_get_attribute($this->env$this->source$context["mailbox"], "email", [], "any"falsefalsefalse792), "name" => twig_get_attribute($this->env$this->source$context["mailbox"], "name", [], "any"falsefalsefalse792)]]);
  1475.             // line 793
  1476.             echo "                                            <li data-id=\"";
  1477.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["mailbox"], "email", [], "any"falsefalsefalse793), "html"nulltrue);
  1478.             echo "\">
  1479.                                                 ";
  1480.             // line 794
  1481.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env$this->source$context["mailbox"], "name", [], "any"falsefalsefalse794)), "html"nulltrue);
  1482.             echo "
  1483.                                             </li>
  1484.                                         ";
  1485.         }
  1486.         $_parent $context['_parent'];
  1487.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['mailbox'], $context['_parent'], $context['loop']);
  1488.         $context array_intersect_key($context$_parent) + $_parent;
  1489.         // line 797
  1490.         echo "                                        <li class=\"uv-no-results\" style=\"display: none;\">
  1491.                                             ";
  1492.         // line 798
  1493.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("No result found"), "html"nulltrue);
  1494.         echo "
  1495.                                         </li>
  1496.                                         ";
  1497.         // line 800
  1498.         $context["filterContext"] = twig_array_merge((isset($context["filterContext"]) || array_key_exists("filterContext"$context) ? $context["filterContext"] : (function () { throw new RuntimeError('Variable "filterContext" does not exist.'800$this->source); })()), ["mailbox" => (isset($context["options"]) || array_key_exists("options"$context) ? $context["options"] : (function () { throw new RuntimeError('Variable "options" does not exist.'800$this->source); })())]);
  1499.         // line 801
  1500.         echo "                                    </ul>
  1501.                                 </div>
  1502.                             </div>
  1503.                             <div class=\"uv-filtered-tags\"></div>
  1504.                         </div>
  1505.                     </div>
  1506.                     <div class=\"uv-element-block\">
  1507.                         <label class=\"uv-field-label\">";
  1508.         // line 809
  1509.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Before"), "html"nulltrue);
  1510.         echo "</label>
  1511.                         <div class=\"uv-field-block range\" id=\"before-filter\">
  1512.                             <input class=\"uv-field uv-date-picker\" type=\"text\" data-filter-type=\"before\" id=\"before-filter-input\">
  1513.                         </div>
  1514.                     </div>
  1515.                     <div class=\"uv-element-block\">
  1516.                         <label class=\"uv-field-label\">";
  1517.         // line 816
  1518.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("After"), "html"nulltrue);
  1519.         echo "</label>
  1520.                         <div class=\"uv-field-block range\" id=\"after-filter\">
  1521.                             <input class=\"uv-field uv-date-picker\" type=\"text\" data-filter-type=\"after\" id=\"after-filter-input\">
  1522.                         </div>
  1523.                     </div>
  1524.                     <div class=\"uv-element-block\">
  1525.                         <label class=\"uv-field-label\">";
  1526.         // line 823
  1527.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Replies less than"), "html"nulltrue);
  1528.         echo "</label>
  1529.                         <div class=\"uv-field-block\" id=\"reply-filter\">
  1530.                             <input class=\"uv-field\" type=\"number\" min=\"1\" data-filter-type=\"replies-less\" id=\"repliesLess-filter-input\">
  1531.                         </div>
  1532.                     </div>
  1533.                     <div class=\"uv-element-block\">
  1534.                         <label class=\"uv-field-label\">";
  1535.         // line 830
  1536.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Replies more than"), "html"nulltrue);
  1537.         echo "</label>
  1538.                         <div class=\"uv-field-block\" id=\"reply-filter\">
  1539.                             <input class=\"uv-field\" type=\"number\" min=\"0\" data-filter-type=\"replies-more\" id=\"repliesMore-filter-input\">
  1540.                         </div>
  1541.                     </div>
  1542.                     <div class=\"uv-action-buttons\">
  1543.                     </div>
  1544.                     ";
  1545.         // line 840
  1546.         echo "                    <a class=\"uv-btn-remove\" href=\"#\"><span class=\"uv-icon-discard\"></span> ";
  1547.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Clear All"), "html"nulltrue);
  1548.         echo "</a>
  1549.                 </div>
  1550.                 ";
  1551.         // line 844
  1552.         echo "                <div class=\"uv-filter-edit\" style=\"display: none;\"></div>
  1553.             </div>
  1554.             <script type=\"text/javascript\">
  1555.                 var filterContext = ";
  1556.         // line 848
  1557.         echo json_encode((isset($context["filterContext"]) || array_key_exists("filterContext"$context) ? $context["filterContext"] : (function () { throw new RuntimeError('Variable "filterContext" does not exist.'848$this->source); })()));
  1558.         echo "
  1559.             </script>
  1560.         </div>
  1561.     </div>
  1562. ";
  1563.         
  1564.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  1565.         
  1566.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  1567.     }
  1568.     // line 854
  1569.     public function block_footer($context, array $blocks = [])
  1570.     {
  1571.         $macros $this->macros;
  1572.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  1573.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""footer"));
  1574.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  1575.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""footer"));
  1576.         // line 855
  1577.         echo "    ";
  1578.         $this->displayParentBlock("footer"$context$blocks);
  1579.         echo "
  1580.     ";
  1581.         // line 858
  1582.         echo "    <script id=\"ticket_list_sorting_tmp\" type=\"text/template\">
  1583.         <li class=\"<% if(sort == 'ticket.id') { %>uv-drop-list-active<% } %>\">
  1584.             <a href=\"#<% if(queryString != '') { %><%= queryString %>/<% } %><% if(page) { %>page/<%= page %><% } else { %>page/1<% } %>/sort/ticket.id/<% if(sort == 'ticket.id') { %><% if(direction) { %>direction/<%= direction %><% } else { %>direction/desc<% } %><% } else { %>direction/asc<% } %>\" data-field=\"ticket.id\">
  1585.                 ";
  1586.         // line 861
  1587.         echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Ticket Id", [], "messages");
  1588.         // line 862
  1589.         echo "                <% if(sort == 'ticket.id') { %>
  1590.                 <span class=\"uv-sorting <% if(direction == 'asc') { %> descend <% } else { %> ascend <% } %>\"></span>
  1591.                 <% } %>
  1592.             </a>
  1593.         </li>
  1594.         <li class=\"<% if(sort == 'ticket.updatedAt') { %>uv-drop-list-active<% } %>\">
  1595.             <a href=\"#<% if(queryString != '') { %><%= queryString %>/<% } %><% if(page) { %>page/<%= page %><% } else { %>page/1<% } %>/sort/ticket.updatedAt/<% if(sort == 'ticket.updatedAt') { %><% if(direction) { %>direction/<%= direction %><% } else { %>direction/desc<% } %><% } else { %>direction/asc<% } %>\" data-field=\"ticket.updatedAt\">
  1596.                 ";
  1597.         // line 870
  1598.         echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Last Replied", [], "messages");
  1599.         // line 871
  1600.         echo "                <% if(sort == 'ticket.updatedAt') { %>
  1601.                 <span class=\"uv-sorting <% if(direction == 'asc') { %> descend <% } else { %> ascend <% } %>\"></span>
  1602.                 <% } %>
  1603.             </a>
  1604.         </li>
  1605.         <li class=\"<% if(sort == 'agentName') { %>uv-drop-list-active<% } %>\">
  1606.             <a href=\"#<% if(queryString != '') { %><%= queryString %>/<% } %><% if(page) { %>page/<%= page %><% } else { %>page/1<% } %>/sort/agentName/<% if(sort == 'agentName') { %><% if(direction) { %>direction/<%= direction %><% } else { %>direction/desc<% } %><% } else { %>direction/asc<% } %>\" data-field=\"agentName\">
  1607.                 ";
  1608.         // line 879
  1609.         echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Assign To", [], "messages");
  1610.         // line 880
  1611.         echo "                <% if(sort == 'agentName') { %>
  1612.                 <span class=\"uv-sorting <% if(direction == 'asc') { %> descend <% } else { %> ascend <% } %>\"></span>
  1613.                 <% } %>
  1614.             </a>
  1615.         </li>
  1616.         <li class=\"<% if(sort == 'customerEmail') { %>uv-drop-list-active<% } %>\">
  1617.             <a href=\"#<% if(queryString != '') { %><%= queryString %>/<% } %><% if(page) { %>page/<%= page %><% } else { %>page/1<% } %>/sort/customerEmail/<% if(sort == 'customerEmail') { %><% if(direction) { %>direction/<%= direction %><% } else { %>direction/desc<% } %><% } else { %>direction/asc<% } %>\" data-field=\"customerEmail\">
  1618.                 ";
  1619.         // line 888
  1620.         echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Customer Email", [], "messages");
  1621.         // line 889
  1622.         echo "                <% if(sort == 'customerEmail') { %>
  1623.                 <span class=\"uv-sorting <% if(direction == 'asc') { %> descend <% } else { %> ascend <% } %>\"></span>
  1624.                 <% } %>
  1625.             </a>
  1626.         </li>
  1627.         <li class=\"<% if(sort == 'customerName') { %>uv-drop-list-active<% } %>\">
  1628.             <a href=\"#<% if(queryString != '') { %><%= queryString %>/<% } %><% if(page) { %>page/<%= page %><% } else { %>page/1<% } %>/sort/customerName/<% if(sort == 'customerName') { %><% if(direction) { %>direction/<%= direction %><% } else { %>direction/desc<% } %><% } else { %>direction/asc<% } %>\" data-field=\"customerName\">
  1629.                 ";
  1630.         // line 897
  1631.         echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Customer Name", [], "messages");
  1632.         // line 898
  1633.         echo "                <% if(sort == 'customerName') { %>
  1634.                 <span class=\"uv-sorting <% if(direction == 'asc') { %> descend <% } else { %> ascend <% } %>\"></span>
  1635.                 <% } %>
  1636.             </a>
  1637.         </li>
  1638.     </script>
  1639.     ";
  1640.         // line 906
  1641.         echo "    <script id=\"ticket_status_list_tmp\" type=\"text/template\">
  1642.         <ul class=\"status-list\">
  1643.             ";
  1644.         // line 908
  1645.         $context['_parent'] = $context;
  1646.         $context['_seq'] = twig_ensure_traversable((isset($context["ticketStatusCollection"]) || array_key_exists("ticketStatusCollection"$context) ? $context["ticketStatusCollection"] : (function () { throw new RuntimeError('Variable "ticketStatusCollection" does not exist.'908$this->source); })()));
  1647.         foreach ($context['_seq'] as $context["_key"] => $context["status"]) {
  1648.             // line 909
  1649.             echo "                <li>
  1650.                     <a href=\"#\" class=\"<% if(active == ";
  1651.             // line 910
  1652.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["status"], "id", [], "any"falsefalsefalse910), "html"nulltrue);
  1653.             echo " ";
  1654.             if ((=== twig_compare(twig_get_attribute($this->env$this->source$context["status"], "id", [], "any"falsefalsefalse910), 1))) {
  1655.                 echo " || active == 0";
  1656.             }
  1657.             echo ") { %>uv-aside-nav-active<% } %>\" data-id=\"";
  1658.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["status"], "id", [], "any"falsefalsefalse910), "html"nulltrue);
  1659.             echo "\">
  1660.                         <span class=\"name\">";
  1661.             // line 911
  1662.             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"falsefalsefalse911)), "html"nulltrue);
  1663.             echo "</span>
  1664.                         <span class=\"uv-flag-gray\">
  1665.                             <% if(status && status[1] != undefined) { %>
  1666.                                 <%= status[";
  1667.             // line 914
  1668.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["status"], "id", [], "any"falsefalsefalse914), "html"nulltrue);
  1669.             echo "] %>
  1670.                             <% } else { %>
  1671.                                 0
  1672.                             <% } %>
  1673.                         </span>
  1674.                     </a>
  1675.                 </li>
  1676.             ";
  1677.         }
  1678.         $_parent $context['_parent'];
  1679.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['status'], $context['_parent'], $context['loop']);
  1680.         $context array_intersect_key($context$_parent) + $_parent;
  1681.         // line 922
  1682.         echo "        </ul>
  1683.     </script>
  1684.     ";
  1685.         // line 926
  1686.         echo "    <script id=\"predefined_label_tmp\" type=\"text/template\">
  1687.         <li>
  1688.             <a href=\"#\" <% if (active == '') { %> class=\"uv-aside-active\" <% } %>>
  1689.             ";
  1690.         // line 929
  1691.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("All"), "html"nulltrue);
  1692.         echo "
  1693.             <span class=\"uv-flag-gray uv-flag-dark\"><%= labelDetails.predefind.all %></span>
  1694.             </a>
  1695.         </li>
  1696.         <li>
  1697.             <a href=\"#new\" <% if(active == 'new') { %> class=\"uv-aside-active\" <% } %> >
  1698.             ";
  1699.         // line 935
  1700.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("New"), "html"nulltrue);
  1701.         echo "
  1702.             <span class=\"uv-flag-gray uv-flag-dark\">
  1703.                     <%= labelDetails.predefind.new %>
  1704.                 </span>
  1705.             </a>
  1706.         </li>
  1707.         <li>
  1708.             <a href=\"#unassigned\" <% if(active == 'unassigned') { %> class=\"uv-aside-active\" <% } %> >
  1709.             ";
  1710.         // line 943
  1711.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("UnAssigned"), "html"nulltrue);
  1712.         echo "
  1713.             <span class=\"uv-flag-gray uv-flag-dark\">
  1714.                     <%= labelDetails.predefind.unassigned %>
  1715.                 </span>
  1716.             </a>
  1717.         </li>
  1718.         <li>
  1719.             <a href=\"#notreplied\" <% if(active == 'notreplied') { %> class=\"uv-aside-active\" <% } %> >
  1720.             ";
  1721.         // line 951
  1722.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("UnAnswered"), "html"nulltrue);
  1723.         echo "
  1724.             <span class=\"uv-flag-gray uv-flag-dark\">
  1725.                     <%= labelDetails.predefind.notreplied %>
  1726.                 </span>
  1727.             </a>
  1728.         </li>
  1729.         <li>
  1730.             <a href=\"#mine\" <% if(active == 'mine') { %> class=\"uv-aside-active\" <% } %> >
  1731.             ";
  1732.         // line 959
  1733.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("My Tickets"), "html"nulltrue);
  1734.         echo "
  1735.             <span class=\"uv-flag-gray uv-flag-dark\">
  1736.                     <%= labelDetails.predefind.mine %>
  1737.                 </span>
  1738.             </a>
  1739.         </li>
  1740.         <li>
  1741.             <a href=\"#starred\" <% if(active == 'starred') { %> class=\"uv-aside-active\" <% } %> >
  1742.             ";
  1743.         // line 967
  1744.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Starred"), "html"nulltrue);
  1745.         echo "
  1746.             <span class=\"uv-flag-gray uv-flag-dark\">
  1747.                     <%= labelDetails.predefind.starred %>
  1748.                 </span>
  1749.             </a>
  1750.         </li>
  1751.         <li>
  1752.             <a href=\"#trashed\" <% if(active == 'trashed') { %> class=\"uv-aside-active\" <% } %>>
  1753.             ";
  1754.         // line 975
  1755.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Trashed"), "html"nulltrue);
  1756.         echo "
  1757.             <span class=\"uv-flag-gray uv-flag-dark\">
  1758.                     <%= labelDetails.predefind.trashed %>
  1759.                 </span>
  1760.             </a>
  1761.         </li>
  1762.     </script>
  1763.     ";
  1764.         // line 984
  1765.         echo "    <script id=\"custom_label_tmp\" type=\"text/template\">
  1766.         <a href=\"#label/<%= id %>\"  data-id=\"<%= id %>\">
  1767.             <%- name %>
  1768.             <span class=\"uv-flag-gray\" style=\"<% if(colorCode) { %>background-color:<%= colorCode %><% } %>\">
  1769.                 <%= count %>
  1770.             </span>
  1771.         </a>
  1772.         <span class=\"uv-customize\" data-target=\"uv-task-view\" data-toggle=\"tooltip\" title=\"";
  1773.         // line 991
  1774.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Edit Label"), "html"nulltrue);
  1775.         echo "\"></span>
  1776.     </script>
  1777.     ";
  1778.         // line 995
  1779.         echo "    <script id=\"add_edit_label_tmp\" type=\"text/template\">
  1780.         <div class=\"uv-aside-head\">
  1781.             <div class=\"uv-aside-title\">
  1782.                 <% if(id) { %>
  1783.                 <h6>";
  1784.         // line 999
  1785.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Edit Label"), "html"nulltrue);
  1786.         echo "</h6>
  1787.                 <% } else { %>
  1788.                 <h6>";
  1789.         // line 1001
  1790.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Add Label"), "html"nulltrue);
  1791.         echo "</h6>
  1792.                 <% } %>
  1793.             </div>
  1794.             <div class=\"uv-aside-back\" id=\"back-to-labels\">
  1795.                 <span>";
  1796.         // line 1005
  1797.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Back"), "html"nulltrue);
  1798.         echo "</span>
  1799.             </div>
  1800.         </div>
  1801.         <div class=\"uv-aside-option\" data-id=\"<%= id %>\">
  1802.             <div class=\"uv-element-block\">
  1803.                 <label class=\"uv-field-label\">";
  1804.         // line 1011
  1805.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Name"), "html"nulltrue);
  1806.         echo "</label>
  1807.                 <div class=\"uv-field-block\">
  1808.                     <input class=\"uv-field\" type=\"text\" value=\"<%- name %>\" />
  1809.                 </div>
  1810.             </div>
  1811.             <div class=\"uv-element-block\">
  1812.                 <label class=\"uv-field-label\">";
  1813.         // line 1018
  1814.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Choose a Color"), "html"nulltrue);
  1815.         echo "</label>
  1816.                 <div class=\"uv-field-block\">
  1817.                     <% colors = ['#337CFF','#FEBF00','#E5549F','#27B6BB','#FB8A3F','#43AF52'] %>
  1818.                     <% for(var colorTemp in colors) { %>
  1819.                     <span class=\"uv-color-block <% if(colorCode == colors[colorTemp]) { %>uv-color-active<% } %>\" data-color=\"<%- colors[colorTemp] %>\" style=\"background:<%- colors[colorTemp] %>\"></span>
  1820.                     <% } %>
  1821.                 </div>
  1822.             </div>
  1823.             <div>
  1824.                 <a class=\"uv-btn add-update-btn\" href=\"#\">
  1825.                     <% if(id) { %>
  1826.                     ";
  1827.         // line 1029
  1828.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Update"), "html"nulltrue);
  1829.         echo "
  1830.                     <% } else { %>
  1831.                     ";
  1832.         // line 1031
  1833.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Create"), "html"nulltrue);
  1834.         echo "
  1835.                     <% } %>
  1836.                 </a>
  1837.             </div>
  1838.             <% if(id) { %>
  1839.             <a class=\"uv-btn-remove\"><span class=\"uv-icon-discard\"></span>";
  1840.         // line 1036
  1841.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Remove Label"), "html"nulltrue);
  1842.         echo "</a>
  1843.             <% } %>
  1844.         </div>
  1845.     </script>
  1846.     ";
  1847.         // line 1042
  1848.         echo "    <script id=\"add_edit_saved_filter_tmp\" type=\"text/template\">
  1849.         <form>
  1850.             <div class=\"uv-filter-edit-head\">
  1851.                 <div class=\"uv-filter-edit-title\">
  1852.                     <h6>
  1853.                         <% if(id) { %>
  1854.                         <input type=\"hidden\" name=\"id\" id=\"filter-id\" value=\"<%= id %>\"/>
  1855.                         ";
  1856.         // line 1049
  1857.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Edit Saved Filter"), "html"nulltrue);
  1858.         echo "
  1859.                         <% } else { %>
  1860.                         ";
  1861.         // line 1051
  1862.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("New Saved Filter"), "html"nulltrue);
  1863.         echo "
  1864.                         <% } %>
  1865.                     </h6>
  1866.                 </div>
  1867.                 <div class=\"uv-filter-edit-back back-to-filter\">
  1868.                     <span>";
  1869.         // line 1056
  1870.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Back"), "html"nulltrue);
  1871.         echo "</span>
  1872.                 </div>
  1873.             </div>
  1874.             <div class=\"uv-element-block\">
  1875.                 <label class=\"uv-field-label\">";
  1876.         // line 1060
  1877.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Name"), "html"nulltrue);
  1878.         echo "</label>
  1879.                 <div class=\"uv-field-block\">
  1880.                     <input class=\"uv-field name\" name=\"name\" type=\"text\" value=\"<%- name %>\" />
  1881.                 </div>
  1882.             </div>
  1883.             <div class=\"uv-element-block\">
  1884.                 <label>
  1885.                     <div class=\"uv-checkbox\">
  1886.                         <input type=\"checkbox\" name=\"is_default\" <% if(is_default) { %>checked<% } %> />
  1887.                         <span class=\"uv-checkbox-view\"></span>
  1888.                     </div>
  1889.                     <span class=\"uv-checkbox-label\">";
  1890.         // line 1072
  1891.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Is Default"), "html"nulltrue);
  1892.         echo "</span>
  1893.                 </label>
  1894.             </div>
  1895.             <div class=\"uv-filters-group\">
  1896.                 <% _.each(filters, function(filter, key){ %>
  1897.                 <div class=\"uv-element-block\" data-filter=\"<%= key %>\">
  1898.                     <label class=\"uv-field-label\"><%- filter.name %></label>
  1899.                     <div class=\"uv-field-block\">
  1900.                         <% _.each(filter.options, function(option){ %>
  1901.                         <a class=\"uv-btn-tag\" href=\"#\" data-id=\"<%= option.id %>\">
  1902.                             <%- option.name %>
  1903.                             <span class=\"uv-icon-remove-dark\"></span>
  1904.                         </a>
  1905.                         <% }); %>
  1906.                     </div>
  1907.                 </div>
  1908.                 <% }); %>
  1909.                 <div class=\"uv-action-buttons\">
  1910.                     <% if(id) { %>
  1911.                     <a class=\"uv-btn-remove\"><span class=\"uv-icon-discard\"></span>";
  1912.         // line 1093
  1913.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Remove Saved Filter"), "html"nulltrue);
  1914.         echo "</a>
  1915.                     <% } %>
  1916.                 </div>
  1917.             </div>
  1918.             <div class=\"uv-action-buttons\">
  1919.                 <a class=\"uv-btn <% if(id) { %>update-filter<% } else { %>save-filter<% } %>\" href=\"#\">
  1920.                     <% if(id) { %>
  1921.                     ";
  1922.         // line 1100
  1923.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Update"), "html"nulltrue);
  1924.         echo "
  1925.                     <% } else { %>
  1926.                     ";
  1927.         // line 1102
  1928.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Create"), "html"nulltrue);
  1929.         echo "
  1930.                     <% } %>
  1931.                 </a>
  1932.                 <a class=\"uv-btn back-to-filter\" href=\"#\">";
  1933.         // line 1105
  1934.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Cancel"), "html"nulltrue);
  1935.         echo "</a>
  1936.             </div>
  1937.         </form>
  1938.     </script>
  1939.     ";
  1940.         // line 1111
  1941.         echo "    <script id=\"ticket_quick_view_tmp\" type=\"text/template\">
  1942.         <div class=\"uv-pull-right quick-view-navigation\">
  1943.             <div class=\"uv-loader\" style=\"display: none\">
  1944.                 <span></span>
  1945.                 <span></span>
  1946.                 <span></span>
  1947.             </div>
  1948.             <% if(previous) { %>
  1949.             <span class=\"uv-btn-tag uv-icon-nav-pre\" data-id=\"<%= previous %>\">
  1950.                 </span>
  1951.             <% } else { %>
  1952.             <span class=\"uv-btn-tag uv-icon-nav-pre\" disabled=\"disabled\">
  1953.                 </span>
  1954.             <% } %>
  1955.             <% if(next) { %>
  1956.             <span class=\"uv-btn-tag uv-icon-nav-nxt\"  data-id=\"<%= next %>\">
  1957.                 </span>
  1958.             <% } else { %>
  1959.             <span class=\"uv-btn-tag uv-icon-nav-nxt\" disabled=\"disabled\">
  1960.                 </span>
  1961.             <% } %>
  1962.         </div>
  1963.         <span class=\"uv-pop-up-close\"></span>
  1964.         <a href=\"<%= path %>\"><h2>";
  1965.         // line 1134
  1966.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Ticket Info"), "html"nulltrue);
  1967.         echo " #<%= id %></h2></a>
  1968.         <div class=\"uv-pop-up-body uv-inner-section\">
  1969.             <div class=\"uv-view\">
  1970.                 <div class=\"uv-ticket-head\">
  1971.                     <div class=\"uv-ticket-strip\">
  1972.                         <span>
  1973.                             <span class=\"uv-ticket-strip-label\">
  1974.                                 ";
  1975.         // line 1141
  1976.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Timestamp"), "html"nulltrue);
  1977.         echo " -
  1978.                             </span>
  1979.                             <span class=\"uv-margin-0\">
  1980.                                 <%= formatedCreatedAt %>
  1981.                             </span>
  1982.                         </span>
  1983.                         <span>
  1984.                             <span class=\"uv-ticket-strip-label\">
  1985.                                 ";
  1986.         // line 1149
  1987.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("By"), "html"nulltrue);
  1988.         echo " -
  1989.                             </span>
  1990.                             <%- createThread.user.name %>
  1991.                         </span>
  1992.                         <% if(agent) { %>
  1993.                         <span class=\"agent-info\" style=\"\">
  1994.                                 <span class=\"uv-ticket-strip-label\">
  1995.                                     ";
  1996.         // line 1156
  1997.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Agent"), "html"nulltrue);
  1998.         echo " -
  1999.                                 </span>
  2000.                                 <span class=\"name\"><%- agent.name %></span>
  2001.                             </span>
  2002.                         <% } %>
  2003.                     </div>
  2004.                     <div class=\"uv-ticket-strip\">
  2005.                         <span class=\"uv-btn-tag\">
  2006.                             ";
  2007.         // line 1164
  2008.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Priority"), "html"nulltrue);
  2009.         echo "
  2010.                             - <%- priority.description %>
  2011.                         </span>
  2012.                         <span class=\"uv-btn-tag\">
  2013.                             ";
  2014.         // line 1168
  2015.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Status"), "html"nulltrue);
  2016.         echo "
  2017.                             - <%- status.description %>
  2018.                         </span>
  2019.                         <% if(lastReplyAgentName) { %>
  2020.                         <span class=\"uv-btn-tag\">
  2021.                                 ";
  2022.         // line 1173
  2023.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Last Replied Agent"), "html"nulltrue);
  2024.         echo "
  2025.                                 - <%- lastReplyAgentName.name.split(\" \")[0] %>
  2026.                             </span>
  2027.                         <% } %>
  2028.                     </div>
  2029.                 </div>
  2030.                 <div class=\"uv-ticket-head\">
  2031.                     <h1><%- subject %></h1>
  2032.                 </div>
  2033.                 <div class=\"uv-ticket-section\">
  2034.                     <div class=\"uv-ticket-main create\">
  2035.                         <div class=\"uv-ticket-strip\">
  2036.                             <span>
  2037.                                 <span class=\"uv-margin-0 timeago\" data-timestamp=\"<%= createThread.timestamp %>\" title=\"<%= createThread.formatedCreatedAt %>\"><%= createThread.formatedCreatedAt %></span>
  2038.                                 - <%- createThread.user.name %>
  2039.                                 <span class=\"uv-ticket-strip-label\">
  2040.                                     ";
  2041.         // line 1190
  2042.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("created Ticket"), "html"nulltrue);
  2043.         echo "
  2044.                                 </span>
  2045.                             </span>
  2046.                         </div>
  2047.                         <div class=\"uv-ticket-main-lt\">
  2048.                             <% if (createThread.user.smallThumbnail != null) { %>
  2049.                                 <img class='border' src=\"";
  2050.         // line 1196
  2051.         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.'1196$this->source); })()), "request", [], "any"falsefalsefalse1196), "scheme", [], "any"falsefalsefalse1196) . "://") . 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.'1196$this->source); })()), "request", [], "any"falsefalsefalse1196), "httpHost", [], "any"falsefalsefalse1196)) . $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("")), "html"nulltrue);
  2052.         echo "<%= createThread.user.smallThumbnail %>\"/>
  2053.                             <% } else { %>
  2054.                                 <% if (createThread.createdBy == 'customer') { %>
  2055.                                     <img class='border' src=\"";
  2056.         // line 1199
  2057.         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.'1199$this->source); })())), "html"nulltrue);
  2058.         echo "\"/>
  2059.                                 <% } else { %>
  2060.                                     <img class='border' src=\"";
  2061.         // line 1201
  2062.         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.'1201$this->source); })())), "html"nulltrue);
  2063.         echo "\"/>
  2064.                                 <% } %>
  2065.                             <% } %>
  2066.                         </div>
  2067.                         <div class=\"uv-ticket-main-rt\">
  2068.                             <% if(createThread.createdBy == 'customer') { %>
  2069.                             <a href=\"";
  2070.         // line 1207
  2071.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_manage_customer_account");
  2072.         echo "/<%= createThread.user.id %>\" class=\"uv-ticket-member-name\">
  2073.                                 <% } else { %>
  2074.                                 <% if(createThread.user) { %>
  2075.                                 <a href=\"";
  2076.         // line 1210
  2077.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_account");
  2078.         echo "/<%= createThread.user.id %>\" class=\"uv-ticket-member-name\">
  2079.                                     <% } else { %>
  2080.                                     <a class=\"uv-ticket-member-name\">
  2081.                                         <% } %>
  2082.                                         <% } %>
  2083.                                         <%- createThread.user.name %>
  2084.                                     </a>
  2085.                                     <div class=\"message\">
  2086.                                         <p>
  2087.                                             <%= createThread.reply %>
  2088.                                         </p>
  2089.                                     </div>
  2090.                                     <!-- Attachment Block -->
  2091.                                     <% if(createThread.attachments.length) { %>
  2092.                                     <div class=\"uv-ticket-uploads\">
  2093.                                         <h4>";
  2094.         // line 1226
  2095.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Uploaded Files"), "html"nulltrue);
  2096.         echo "</h4>
  2097.                                         <div class=\"uv-ticket-uploads-strip\">
  2098.                                             <% _.each(createThread.attachments, function(file) { %>
  2099.                                             <a href=\"<%-file.downloadURL %>\" target =\"_blank\" class=\"uv-ticket-uploads-brick uv-no-pointer-events\" data-toggle=\"tooltip\" title=\"<%- file.name %>\">
  2100.                                                 <img src=\"<%-file.iconURL %>\" class=\"uv-auto-pointer-events\">
  2101.                                             </a>
  2102.                                             <% }) %>
  2103.                                         </div>
  2104.                                         <% if(createThread.attachments.length >1) { %>
  2105.                                         <div class=\"thread-attachments-zip pull-left\">
  2106.                                             <div class=\"uv-upload-actions\">
  2107.                                                 <a href=\"";
  2108.         // line 1237
  2109.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_ticket_download_attachment_zip");
  2110.         echo "/<%= createThread.id %>\" target=\"_blank\"><span class=\"uv-icon-attachment\"></span> ";
  2111.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Download (as .zip)"), "html"nulltrue);
  2112.         echo "</a>
  2113.                                             </div>
  2114.                                         </div>
  2115.                                         <% } %>
  2116.                                     </div>
  2117.                                     <% } %>
  2118.                                     <!-- //Attachment Block -->
  2119.                         </div>
  2120.                     </div>
  2121.                     <% if(lastReply) { %>
  2122.                     <div class=\"uv-ticket-main\">
  2123.                         <div class=\"uv-ticket-strip\">
  2124.                                 <span>
  2125.                                     <span class=\"uv-margin-0 timeago\" data-timestamp=\"<%= lastReply.timestamp %>\" title=\"<%= lastReply.formatedCreatedAt %>\"><%= lastReply.formatedCreatedAt %></span>
  2126.                                     - <%- lastReply.user.name %>
  2127.                                     <span class=\"uv-ticket-strip-label\">
  2128.                                         ";
  2129.         // line 1254
  2130.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("made last reply"), "html"nulltrue);
  2131.         echo "
  2132.                                     </span>
  2133.                                 </span>
  2134.                         </div>
  2135.                         <div class=\"uv-ticket-main-lt\">
  2136.                             <% if (lastReply.user.smallThumbnail != null) { %>
  2137.                                 <img class='border' src=\"";
  2138.         // line 1260
  2139.         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.'1260$this->source); })()), "request", [], "any"falsefalsefalse1260), "scheme", [], "any"falsefalsefalse1260) . "://") . 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.'1260$this->source); })()), "request", [], "any"falsefalsefalse1260), "httpHost", [], "any"falsefalsefalse1260)) . $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("")), "html"nulltrue);
  2140.         echo "<%= lastReply.user.smallThumbnail %>\"/>
  2141.                             <% } else { %>
  2142.                                 <% if (lastReply.createdBy == 'customer') { %>
  2143.                                     <img class='border' src=\"";
  2144.         // line 1263
  2145.         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.'1263$this->source); })())), "html"nulltrue);
  2146.         echo "\"/>
  2147.                                 <% } else { %>
  2148.                                     <img class='border' src=\"";
  2149.         // line 1265
  2150.         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.'1265$this->source); })())), "html"nulltrue);
  2151.         echo "\"/>
  2152.                                 <% } %>
  2153.                             <% } %>
  2154.                         </div>
  2155.                         <div class=\"uv-ticket-main-rt\">
  2156.                             <% if(lastReply.createdBy == 'customer') { %>
  2157.                             <a href=\"";
  2158.         // line 1271
  2159.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_manage_customer_account");
  2160.         echo "/<%= lastReply.user.id %>\" class=\"uv-ticket-member-name\">
  2161.                                 <% } else { %>
  2162.                                 <% if(lastReply.user) { %>
  2163.                                 <a href=\"";
  2164.         // line 1274
  2165.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_account");
  2166.         echo "/<%= lastReply.user.id %>\" class=\"uv-ticket-member-name\">
  2167.                                     <% } else { %>
  2168.                                     <a class=\"uv-ticket-member-name\">
  2169.                                         <% } %>
  2170.                                         <% } %>
  2171.                                         <%- lastReply.user.name %>
  2172.                                     </a>
  2173.                                     <div class=\"message\">
  2174.                                         <p>
  2175.                                             <%= lastReply.reply %>
  2176.                                         </p>
  2177.                                     </div>
  2178.                                     <!-- Attachment Block -->
  2179.                                     <% if(lastReply.attachments.length) { %>
  2180.                                     <div class=\"uv-ticket-uploads\">
  2181.                                         <h4>";
  2182.         // line 1290
  2183.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Uploaded Files"), "html"nulltrue);
  2184.         echo "</h4>
  2185.                                         <div class=\"uv-ticket-uploads-strip\">
  2186.                                             <% _.each(lastReply.attachments, function(file) { %>
  2187.                                             <a href=\"<%-file.downloadURL %>\" target =\"_blank\" class=\"uv-ticket-uploads-brick uv-no-pointer-events\" data-toggle=\"tooltip\" title=\"<%- file.name %>\">
  2188.                                                 <img src=\"<%-file.iconURL %>\" class=\"uv-auto-pointer-events\">
  2189.                                             </a>
  2190.                                             <% }) %>
  2191.                                         </div>
  2192.                                         <% if(lastReply.attachments.length> 1) { %>
  2193.                                         <div class=\"thread-attachments-zip pull-left\">
  2194.                                             <div class=\"uv-upload-actions\">
  2195.                                                 <a href=\"";
  2196.         // line 1301
  2197.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_ticket_download_attachment_zip");
  2198.         echo "/<%= lastReply.id %>\" target=\"_blank\"><span class=\"uv-icon-attachment\"></span> ";
  2199.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Download (as .zip)"), "html"nulltrue);
  2200.         echo "</a>
  2201.                                             </div>
  2202.                                         </div>
  2203.                                         <% } %>
  2204.                                     </div>
  2205.                                     <% } %>
  2206.                                     <!-- //Attachment Block -->
  2207.                         </div>
  2208.                     </div>
  2209.                     <% } %>
  2210.                 </div>
  2211.             </div>
  2212.         </div>
  2213.     </script>
  2214.     ";
  2215.         // line 1318
  2216.         echo "    <script id=\"ticket_list_item_tmp\" type=\"text/template\">
  2217.         <td class=\"uv-width-140 uv-no-content\">
  2218.             <span class=\"uv-list-ticket-priority\" style=\"<% if(priority) { %>background: <%=priority.colorCode %><% } %>;\"></span>
  2219.             <label class=\"uv-vertical-align uv-margin-right-5\">
  2220.                 <div class=\"uv-checkbox\">
  2221.                     <input type=\"checkbox\" class=\"mass-action-checkbox\" value=\"<%= id %>\"/>
  2222.                     <span class=\"uv-checkbox-view\"></span>
  2223.                 </div>
  2224.             </label>
  2225.             <span class=\"uv-star <% if(isStarred) { %>uv-star-active<% } %> uv-margin-right-5\"></span>
  2226.             <span data-index=\"source\">
  2227.                 <% if(source == 'email') {  %>
  2228.                     <span class=\"uv-channel uv-channel-email uv-margin-right-5\" data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"Email\"></span>
  2229.                 <% } else if(source == 'facebook') {  %>
  2230.                     <span class=\"uv-channel uv-channel-facebook uv-margin-right-5\" data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"Facebook\"></span>
  2231.                 <% } else if(source == 'twitter') {  %>
  2232.                     <span class=\"uv-channel uv-channel-twitter uv-margin-right-5\" data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"Twitter\"></span>
  2233.                 <% } else if(source == 'binaka' || source == 'knock') {  %>
  2234.                     <span class=\"uv-channel uv-channel-binaka uv-margin-right-5\" data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"Binaka\"></span>
  2235.                 <% } else if(source == 'api') { %>
  2236.                     <span class=\"uv-channel uv-channel-api uv-margin-right-5\" data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"API\"></span>
  2237.                 <% } else if(source == 'formbuilder') { %>
  2238.                     <span class=\"uv-channel uv-channel-form-builder uv-margin-right-5\" data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"Formbuilder\"></span>
  2239. \t\t\t\t<% } else if(source == 'disqus-engage') { %>
  2240.                     <span class=\"uv-channel uv-channel-disqus-engage uv-margin-right-5\" data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"Disqus\"></span>
  2241. \t\t\t\t<% } else if(source == 'ebay') { %>
  2242.                     <span class=\"uv-channel uv-channel-ebay uv-margin-right-5\" data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"Ebay\"></span>
  2243. \t\t\t\t<% } else if(source == 'youtube') { %>
  2244.                     <span class=\"uv-channel uv-channel-youtube uv-margin-right-5\" data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"Youtube\"></span>
  2245.                 <% } else { %>
  2246.                     <span class=\"uv-channel uv-channel-web uv-margin-right-5\" data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"<%- source %>\"></span>
  2247.                 <% } %>
  2248.             </span>
  2249.             <span class=\"uv-quick-view-trigger\" data-id=\"<%= id %>\"></span>
  2250.         </td>
  2251.         <td data-value=\"";
  2252.         // line 1354
  2253.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ID"), "html"nulltrue);
  2254.         echo "\" class=\"uv-width-100\">
  2255.             <a href=\"<%= path %>\">
  2256.                 #<%= id %>
  2257.             </a>
  2258.         </td>
  2259.         <td data-value=\"";
  2260.         // line 1359
  2261.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Subject"), "html"nulltrue);
  2262.         echo "\">
  2263.             <a href=\"<%= path %>\">
  2264.                 <%- subject && subject.length <= 300 ? subject : subject.substr(0, 300) + '...'  %>
  2265.             </a>
  2266.         </td>
  2267.         <td data-value=\"";
  2268.         // line 1364
  2269.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Customer Name"), "html"nulltrue);
  2270.         echo "\" data-index=\"customer-name\">
  2271.             <a href=\"<%= path %>\">
  2272.                 <%- customer.name %>
  2273.             </a>
  2274.         </td>
  2275.         <td data-value=\"";
  2276.         // line 1369
  2277.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Customer Email"), "html"nulltrue);
  2278.         echo "\" data-index=\"customer-email\">
  2279.             <a href=\"<%= path %>\">
  2280.                 <%- customer.email %>
  2281.             </a>
  2282.         </td>
  2283.         <td data-value=\"";
  2284.         // line 1374
  2285.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Timestamp"), "html"nulltrue);
  2286.         echo "\" data-index=\"timestamp\">
  2287.             <a href=\"<%= path %>\" class=\"timeago\" data-timestamp=\"<%= timestamp %>\" title=\"<%= formatedCreatedAt %>\">
  2288.                 <%= formatedCreatedAt %>
  2289.             </a>
  2290.         </td>
  2291.         <td data-value=\"";
  2292.         // line 1379
  2293.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Last Reply"), "html"nulltrue);
  2294.         echo "\" data-index=\"last-reply\">
  2295.             <% if(lastReplyTime) { %>
  2296.                 <a href=\"<%= path %>\">
  2297.                     <%= lastReplyTime %>
  2298.                 </a>
  2299.             <% } else { %>
  2300.                     ";
  2301.         // line 1385
  2302.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("N/A"), "html"nulltrue);
  2303.         echo "
  2304.             <% } %>
  2305.         </td>
  2306.         <td data-value=\"";
  2307.         // line 1388
  2308.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Group"), "html"nulltrue);
  2309.         echo "\" data-index=\"group\">
  2310.             <a href=\"<%= path %>\">
  2311.                 <% if(group) { %>
  2312.                 <%- group %>
  2313.                 <% } else { %>
  2314.                 ";
  2315.         // line 1393
  2316.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("N/A"), "html"nulltrue);
  2317.         echo "
  2318.                 <% } %>
  2319.             </a>
  2320.         </td>
  2321.         <td data-value=\"";
  2322.         // line 1397
  2323.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Team"), "html"nulltrue);
  2324.         echo "\" data-index=\"team\">
  2325.             <a href=\"<%= path %>\">
  2326.                 <% if(team) { %>
  2327.                 <%- team %>
  2328.                 <% } else { %>
  2329.                 ";
  2330.         // line 1402
  2331.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("N/A"), "html"nulltrue);
  2332.         echo "
  2333.                 <% } %>
  2334.             </a>
  2335.         </td>
  2336.         <td data-value=\"";
  2337.         // line 1406
  2338.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Type"), "html"nulltrue);
  2339.         echo "\" data-index=\"type1\">
  2340.             <a href=\"<%= path %>\">
  2341.                 <% if(type) { %>
  2342.                 <%- type %>
  2343.                 <% } else { %>
  2344.                 ";
  2345.         // line 1411
  2346.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("N/A"), "html"nulltrue);
  2347.         echo "
  2348.                 <% } %>
  2349.             </a>
  2350.         </td>
  2351.         <td data-value=\"";
  2352.         // line 1415
  2353.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Replies"), "html"nulltrue);
  2354.         echo "\" data-index=\"replies\">
  2355.             <a href=\"<%= path %>\">
  2356.                 <%= totalThreads %>
  2357.             </a>
  2358.         </td>
  2359.         <td data-value=\"";
  2360.         // line 1420
  2361.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Agent"), "html"nulltrue);
  2362.         echo "\" data-index=\"agent\">
  2363.             <a href=\"<%= path %>\">
  2364.                 <% if(agent) { %>
  2365.                 <% if(agent.smallThumbnail != null) { %>
  2366.                 <img src=\"";
  2367.         // line 1424
  2368.         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.'1424$this->source); })()), "request", [], "any"falsefalsefalse1424), "scheme", [], "any"falsefalsefalse1424) . "://") . 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.'1424$this->source); })()), "request", [], "any"falsefalsefalse1424), "httpHost", [], "any"falsefalsefalse1424)) . $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("")), "html"nulltrue);
  2369.         echo "<%= agent.smallThumbnail %>\" alt=\"\"/>
  2370.                 <% } else { %>
  2371.                 <img src=\"";
  2372.         // line 1426
  2373.         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.'1426$this->source); })())), "html"nulltrue);
  2374.         echo "\" alt=\"\"/>
  2375.                 <% } %>
  2376.                 <%- agent.name %>
  2377.                 <% } else { %>
  2378.                 ";
  2379.         // line 1430
  2380.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Unassigned"), "html"nulltrue);
  2381.         echo "
  2382.                 <% } %>
  2383.             </a>
  2384.         </td>
  2385.     </script>
  2386.     <script type=\"text/javascript\">
  2387.         var isPageJustLoaded = true;
  2388.         var globalMessageResponse = \"\";
  2389.         var currentUserId = \"";
  2390.         // line 1439
  2391.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_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.'1439$this->source); })()), "getCurrentUser", [], "method"falsefalsefalse1439), "id", [], "any"falsefalsefalse1439), "html"nulltrue);
  2392.         echo "\";
  2393.         var pathToTicket = \"";
  2394.         // line 1440
  2395.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_ticket", ["ticketId" => "replaceId"]);
  2396.         echo "\";
  2397.         \$(() => {
  2398.             \$('#before-filter-input').datetimepicker({
  2399.                 format: 'DD-MM-YYYY',
  2400.                 maxDate: 'now',
  2401.                 useCurrent: false,
  2402.             });
  2403.             \$('#after-filter-input').datetimepicker({
  2404.                 format: 'DD-MM-YYYY',
  2405.                 maxDate: 'now',
  2406.                 useCurrent: false,
  2407.             });
  2408.             // Ticket Model
  2409.             var TicketModel = Backbone.Model.extend({
  2410.                 idAttribute: \"id\",
  2411.                 defaults: {
  2412.                     path: \"\",
  2413.                 },
  2414.                 urlRoot: \"";
  2415.         // line 1461
  2416.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_ticket_xhr");
  2417.         echo "\"
  2418.             });
  2419.             // Ticket Label Model
  2420.             var LabelModel = Backbone.Model.extend({
  2421.                 idAttribute: \"id\",
  2422.                 defaults: {
  2423.                     count: 0,
  2424.                 },
  2425.                 parse: function (resp, options) {
  2426.                     return JSON.parse(resp.label);
  2427.                 },
  2428.                 urlRoot: \"";
  2429.         // line 1473
  2430.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_ticket_label_xhr");
  2431.         echo "\"
  2432.             });
  2433.             // Ticket Quick View Model
  2434.             var TicketQuickViewModel = Backbone.Model.extend({
  2435.                 idAttribute: \"id\",
  2436.                 defaults: {
  2437.                     path: \"\",
  2438.                     isSynced: false
  2439.                 }
  2440.             });
  2441.             // Side Filter Model
  2442.             var SideFilterModel = Backbone.Model.extend({
  2443.                 updateModel: function(type,json) {
  2444.                     if(this.has(type)) {
  2445.                         context = this.get(type)
  2446.                         savedOptionsIds = [];
  2447.                         _.each(context, function (option) {
  2448.                             savedOptionsIds.push(parseInt(option.id))
  2449.                         })
  2450.                         if(jQuery.inArray(parseInt(json.id), savedOptionsIds) == -1) {
  2451.                             context.push(json);
  2452.                             this.set(type, context)
  2453.                         }
  2454.                     } else {
  2455.                         this.set(type, [json])
  2456.                     }
  2457.                 },
  2458.                 loadFilterOptions: function(data) {
  2459.                     var self = this;
  2460.                     \$.ajax({
  2461.                         url : \"";
  2462.         // line 1507
  2463.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_ticket_collection_load_filter_options_xhr");
  2464.         echo "\",
  2465.                         type : 'POST',
  2466.                         data: data,
  2467.                         dataType : 'json',
  2468.                         success : function(response) {
  2469.                             _.each(response,function(filter,key) {
  2470.                                 _.each(filter, function (item) {
  2471.                                     self.updateModel(key,item)
  2472.                                 })
  2473.                             })
  2474.                             sideFilter.render();
  2475.                         },
  2476.                         error: function (xhr) {
  2477.                             if(url = xhr.getResponseHeader('Location'))
  2478.                                 window.location = url;
  2479.                         }
  2480.                     });
  2481.                 }
  2482.             });
  2483.             // Ticket Label Collection
  2484.             var LabelCollection = Backbone.Collection.extend({
  2485.                 model: LabelModel,
  2486.                 isLabelExist: function(labelName, labelId) {
  2487.                     var flag = 1;
  2488.                     _.each(this.models, function (item) {
  2489.                         if(item.get('name').toUpperCase() == labelName.toUpperCase() && item.id != labelId)
  2490.                             flag = 0;
  2491.                     }, this);
  2492.                     return flag;
  2493.                 }
  2494.             });
  2495.             // Ticket Collection
  2496.             var TicketCollection = AppCollection.extend({
  2497.                 model: TicketModel,
  2498.                 url: \"";
  2499.         // line 1543
  2500.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_ticket_collection_xhr");
  2501.         echo "\",
  2502.                 filterParameters: {
  2503.                     label: \"\",
  2504.                     new: \"\",
  2505.                     unassigned: \"\",
  2506.                     notreplied: \"\",
  2507.                     mine: \"\",
  2508.                     starred: \"\",
  2509.                     trashed: \"\",
  2510.                     label: \"\",
  2511.                     status: \"\",
  2512.                     search: \"\",
  2513.                     agent: \"\",
  2514.                     customer: \"\",
  2515.                     priority: \"\",
  2516.                     type: \"\",
  2517.                     group: \"\",
  2518.                     team: \"\",
  2519.                     tag: \"\",
  2520.                     mailbox : \"\",
  2521.                     source : \"\",
  2522.                     after: \"\",
  2523.                     before: \"\",
  2524.                     repliesLess: \"\",
  2525.                     repliesMore: \"\",
  2526.                 },
  2527.                 parseRecords: function (response, options) {
  2528.                     return response.tickets;
  2529.                 },
  2530.                 syncData: function() {
  2531.                     app.appView.showLoader();
  2532.                     \$('.select-all-checkbox').prop('checked', false);
  2533.                     this.fetch({
  2534.                         data: this.getValidParameters(),
  2535.                         reset: true,
  2536.                         success: function(model, response) {
  2537.                             ticketQuickViewCollection.reset()
  2538.                             app.appView.hideLoader();
  2539.                             var ticketListView = new TicketList();
  2540.                             app.pager.paginationData = response.pagination;
  2541.                             var url = app.pager.paginationData.url;
  2542.                             if(ticketCollection.length == 0 && app.pager.paginationData.current != \"0\")
  2543.                                 router.navigate(url.replace('replacePage', app.pager.paginationData.last),{trigger: true});
  2544.                             else {
  2545.                                 app.pager.render();
  2546.                                 statusListDetails = response.tabs;
  2547.                                 labelDetails = response.labels;
  2548.                                 labelListView.render();
  2549.                             }
  2550.                             if (globalMessageResponse) {
  2551.                                 app.appView.renderResponseAlert(globalMessageResponse);
  2552.                             }
  2553.                             globalMessageResponse = null;
  2554.                             sideFilter.backToFilter()
  2555.                         },
  2556.                         error: function (model, xhr, options) {
  2557.                             app.appView.hideLoader();
  2558.                             if(url = xhr.getResponseHeader('Location'))
  2559.                                 window.location = url;
  2560.                         }
  2561.                     });
  2562.                 },
  2563.                 batchOperation: function(data) {
  2564.                     var self = this;
  2565.                     app.appView.showLoader();
  2566.                     \$.ajax({
  2567.                         url : \"";
  2568.         // line 1613
  2569.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_ticket_collection_mass_action_xhr");
  2570.         echo "\",
  2571.                         type : 'POST',
  2572.                         data : {data : data},
  2573.                         dataType : 'json',
  2574.                         success : function(response) {
  2575.                             app.appView.hideLoader();
  2576.                             globalMessageResponse = response;
  2577.                             self.syncData();
  2578.                         },
  2579.                         error: function (xhr) {
  2580.                             if(url = xhr.getResponseHeader('Location'))
  2581.                                 window.location = url;
  2582.                             var response = warningResponse;
  2583.                             if(xhr.responseJSON)
  2584.                                 response = xhr.responseJSON;
  2585.                             app.appView.hideLoader();
  2586.                             app.appView.renderResponseAlert(response);
  2587.                             \$('.mass-action-checkbox').prop('checked', false);
  2588.                         }
  2589.                     });
  2590.                 }
  2591.             });
  2592.             // Ticket Quick View Collection
  2593.             var TicketQuickViewCollection = Backbone.Collection.extend({
  2594.                 model: TicketQuickViewModel,
  2595.                 isModelSynced: function(id) {
  2596.                     if (model = this.get(id)) {
  2597.                         if (parseInt(model.attributes.isSynced)) {
  2598.                             return model;
  2599.                         }
  2600.                     }
  2601.                     return false;
  2602.                 },
  2603.                 initialize: function() {
  2604.                     _.bindAll(this, 'getNextPrev', 'nextElement', 'previousElement');
  2605.                 },
  2606.                 getNextPrev : function(id) {
  2607.                     var data = {};
  2608.                     currentModel = ticketQuickViewCollection.get(id)
  2609.                     data['next'] = (model = this.nextElement(currentModel)) ? model.id : 0;
  2610.                     data['previous'] = (model = this.previousElement(currentModel)) ? model.id : 0;
  2611.                     return data;
  2612.                 },
  2613.                 nextElement: function(model) {
  2614.                     var index = ticketQuickViewCollection.indexOf(model);
  2615.                     if ((index + 1) === ticketQuickViewCollection.length)
  2616.                         return 0;
  2617.                     return ticketQuickViewCollection.at(index + 1);
  2618.                 },
  2619.                 previousElement: function(model) {
  2620.                     var index = ticketQuickViewCollection.indexOf(model);
  2621.                     if (index === 0 )
  2622.                         return 0;
  2623.                     return ticketQuickViewCollection.at(index - 1);
  2624.                 }
  2625.             });
  2626.             // Filter
  2627.             var Filter = app.Filter.extend({
  2628.                 defaultSortIndex: 'ticket.updatedAt',
  2629.                 sortText: \"";
  2630.         // line 1679
  2631.         echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Sort By:", [], "messages");
  2632.         echo " \",
  2633.                 defaultSortText: \"";
  2634.         // line 1680
  2635.         echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Sort By:", [], "messages");
  2636.         echo " ";
  2637.         echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Last Replied", [], "messages");
  2638.         echo "\",
  2639.                 template : _.template(\$(\"#ticket_list_sorting_tmp\").html()),
  2640.                 events : {
  2641.                     'keyup .uv-search-inline' : 'search',
  2642.                     'change .asset-visibility input[type=\"checkbox\"]': 'filterAssetsVisibility'
  2643.                 },
  2644.                 filterAssetsVisibilityOnLoad: function() {
  2645.                     if(localStorage.getItem('assets-visibility')) {
  2646.                         var assets = JSON.parse(localStorage.getItem('assets-visibility'));
  2647.                         \$.each(assets, function(asset, assetVal) {
  2648.                             if(assetVal) {
  2649.                                 \$('span[data-index=\"' + asset + '\"], td[data-index=\"' +asset + '\"], th[data-index=\"' + asset + '\"]').show()
  2650.                                 \$('#' + asset).prop('checked', true);
  2651.                             } else {
  2652.                                 \$('span[data-index=\"' + asset + '\"], td[data-index=\"' +asset + '\"], th[data-index=\"' + asset + '\"]').hide()
  2653.                                 \$('#' + asset).prop('checked', false);
  2654.                             }
  2655.                         })
  2656.                     }
  2657.                 },
  2658.                 filterAssetsVisibility: function(e) {
  2659.                     var assets = {};
  2660.                     \$('.asset-visibility input').each(function() {
  2661.                         var asset = \$(this).val();
  2662.                         if(\$(this).is(':checked')) {
  2663.                             assets[asset] = 1;
  2664.                             \$('span[data-index=\"' + asset + '\"], td[data-index=\"' + asset + '\"], th[data-index=\"' + asset + '\"]').show()
  2665.                         } else {
  2666.                             assets[asset] = 0;
  2667.                             \$('span[data-index=\"' + asset + '\"], td[data-index=\"' + asset + '\"], th[data-index=\"' + asset + '\"]').hide()
  2668.                         }
  2669.                     });
  2670.                     localStorage.setItem('assets-visibility', JSON.stringify(assets));
  2671.                 },
  2672.                 search : _.debounce(function(e) {
  2673.                     this.collection.reset();
  2674.                     this.collection.state.currentPage = null;
  2675.                     this.collection.filterParameters.search = Backbone.\$(e.target).val();
  2676.                     var queryString = app.appView.buildQuery(\$.param(this.collection.getValidParameters()));
  2677.                     router.navigate(queryString,{trigger: true});
  2678.                 }, 1000)
  2679.             });
  2680.             // Side Filter View
  2681.             var SideFilter = Backbone.View.extend({
  2682.                 el: \$(\".uv-filter-view\"),
  2683.                 isRecurrsiveCalls: 0,
  2684.                 isReadyFlag: 0,
  2685.                 appliedFilterOptions: {},
  2686.                 tempAppliedFilterOptions: {},
  2687.                 events: {
  2688.                     'change #saved-filter': 'applySavedFilter',
  2689.                     'input .uv-field-block input' : 'searchFilterOption',
  2690.                     'click .uv-dropdown-list li' : 'applyFilter',
  2691.                     'dp.change .range input': 'applyFilter',
  2692.                     'click .uv-filtered-tags .uv-btn-tag' : 'removeFilter',
  2693.                     'change .custom-filter' : 'filterByCustom',
  2694.                     'change #repliesLess-filter-input' : 'filterByRepliesLessThan',
  2695.                     'change #repliesMore-filter-input' : 'filterByRepliesMoreThan',
  2696.                     'keyup .search-custom, change .search-custom' : 'filterByCustom',
  2697.                     'click .new-saved-reply, .edit-saved-reply, .uv-filter-paper .uv-customize': 'addEditSavedReply',
  2698.                     'click .back-to-filter': 'backToFilter',
  2699.                     'click .uv-filter-edit .uv-btn-tag': 'removeSavedFilterOption',
  2700.                     'click .uv-filter-edit .save-filter, .uv-filter-edit .update-filter' : \"saveSavedFilter\",
  2701.                     'click .uv-filter-edit .uv-action-buttons .uv-btn-remove': 'removeSavedFilter'
  2702.                 },
  2703.                 loaderTemplate: _.template(\$(\"#loader-tmp\").html()),
  2704.                 addEditSavedReplyTemplate: _.template(\$(\"#add_edit_saved_filter_tmp\").html()),
  2705.                 checkOptionAvailable: function() {
  2706.                     this.isReadyFlag = 0;
  2707.                     var self = this;
  2708.                     var fetchOptions = {};
  2709.                     _.each(ticketCollection.filterParameters, function (filter,key) {
  2710.                         if(jQuery.inArray(key, ['customer','tag','label']) !== -1) {
  2711.                             if(filter != null && filter != '') {
  2712.                                 filter = filter.split(',');
  2713.                                 if(typeof fetchOptions[key] === 'undefined')
  2714.                                     fetchOptions[key] = [];
  2715.                                 savedOptionsIds = [];
  2716.                                 if(sideFilterModel.has(key)) {
  2717.                                     _.each(sideFilterModel.get(key), function (option) {
  2718.                                         savedOptionsIds.push(parseInt(option.id))
  2719.                                     })
  2720.                                 }
  2721.                                 _.each(filter, function (item) {
  2722.                                     if(jQuery.inArray(parseInt(item), savedOptionsIds) == -1) {
  2723.                                         fetchOptions[key].push(parseInt(item));
  2724.                                         self.isReadyFlag = 1;
  2725.                                     }
  2726.                                 })
  2727.                             }
  2728.                         }
  2729.                     });
  2730.                     return fetchOptions;
  2731.                 },
  2732.                 render: function() {
  2733.                     fetchOptions = this.checkOptionAvailable();
  2734.                     if(this.isReadyFlag && !this.isRecurrsiveCalls) {
  2735.                         this.isReadyFlag = 0;
  2736.                         this.isRecurrsiveCalls = 1;
  2737.                         sideFilterModel.loadFilterOptions(fetchOptions)
  2738.                     } else {
  2739.                         var appliedFilterOptions = {};
  2740.                         \$('.uv-filtered-tags').html(\"\")
  2741.                         var self = this;
  2742.                         var displayFlag = 0;
  2743.                         _.each(ticketCollection.filterParameters, function (filter, key) {
  2744.                             if(jQuery.inArray(key, ['customer', 'agent', 'priority', 'type', 'group', 'team', 'tag', 'mailbox', 'source', 'after', 'before', 'repliesLess', 'repliesMore']) !== -1) {
  2745.                                 if(filter != null && filter != '') {
  2746.                                     displayFlag = 1;
  2747.                                     filter = filter.split(',');
  2748.                                     appliedFilterOptions[key] = {'name': key.charAt(0).toUpperCase() + key.slice(1)};
  2749.                                     appliedFilterOptions[key]['options'] = [];
  2750.                                     _.each(filter, function (value) {
  2751.                                         if(key == 'after' || key == 'before' || key == 'repliesLess' || key == 'repliesMore') {
  2752.                                             \$(\"#\" + key + \"-filter-input\").val(filter)
  2753.                                             appliedFilterOptions[key]['options'].push({'id': filter, 'name': filter});
  2754.                                         } else {
  2755.                                             savedOptions = sideFilterModel.get(key)
  2756.                                             _.each(savedOptions, function (item) {
  2757.                                                 if(item.id == value) {
  2758.                                                     appliedFilterOptions[key]['options'].push({'id': item.id, 'name': item.name});
  2759.                                                     parent = \$('#'+key+'-filter')
  2760.                                                     parent.find('.uv-filtered-tags').append(\"<a class='uv-btn-tag' href='#' data-id='\" + item.id + \"'>\" + item.name + \"<span class='uv-icon-remove-dark'></span></a>\")
  2761.                                                     parent.find('input').val('')
  2762.                                                 }
  2763.                                             })
  2764.                                         }
  2765.                                     });
  2766.                                 }
  2767.                             } else if(jQuery.inArray(key, ['new','unassigned','notreplied','mine','starred','trashed']) !== -1) {
  2768.                                 if(filter != null && filter != '') {
  2769.                                     displayFlag = 1;
  2770.                                     appliedFilterOptions[key] = {'name': \"";
  2771.         // line 1823
  2772.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Label"), "html"nulltrue);
  2773.         echo "\"};
  2774.                                     appliedFilterOptions[key]['options'] = [];
  2775.                                     var optionName = (key == 'mine') ? \"";
  2776.         // line 1825
  2777.         echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Assigned to me", [], "messages");
  2778.         echo "\" : key.charAt(0).toUpperCase() + key.slice(1);
  2779.                                     appliedFilterOptions[key]['options'].push({'id': key, 'name': optionName});
  2780.                                 } else {
  2781.                                     if(!ticketCollection.filterParameters.new && !ticketCollection.filterParameters.unassigned && !ticketCollection.filterParameters.notreplied && !ticketCollection.filterParameters.mine && !ticketCollection.filterParameters.starred && !ticketCollection.filterParameters.trashed &&! ticketCollection.filterParameters.label) {
  2782.                                         appliedFilterOptions['all'] = {'name': \"";
  2783.         // line 1829
  2784.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Label"), "html"nulltrue);
  2785.         echo "\"};
  2786.                                         appliedFilterOptions['all']['options'] = [];
  2787.                                         appliedFilterOptions['all']['options'].push({'id': 1, 'name': \"";
  2788.         // line 1831
  2789.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("All"), "html"nulltrue);
  2790.         echo "\"});
  2791.                                     }
  2792.                                 }
  2793.                             } else if(key == 'label') {
  2794.                                 if(filter != null && filter != '') {
  2795.                                     displayFlag = 1;
  2796.                                     var labelModel = labelCollection.get(filter);
  2797.                                     appliedFilterOptions[key] = {'name': \"";
  2798.         // line 1838
  2799.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Label"), "html"nulltrue);
  2800.         echo "\"};
  2801.                                     appliedFilterOptions[key]['options'] = [];
  2802.                                     if(labelModel) {
  2803.                                         appliedFilterOptions[key]['options'] = [];
  2804.                                         appliedFilterOptions[key]['options'].push({'id': labelModel.attributes.id, 'name': labelModel.attributes.name});
  2805.                                     } else {
  2806.                                         savedOptions = sideFilterModel.get(key)
  2807.                                         _.each(savedOptions, function (item) {
  2808.                                             if(item.id == filter) {
  2809.                                                 appliedFilterOptions[key]['options'].push({'id': item.id, 'name': item.name});
  2810.                                             }
  2811.                                         });
  2812.                                     }
  2813.                                 } else {
  2814.                                     if(!ticketCollection.filterParameters.new && !ticketCollection.filterParameters.unassigned && !ticketCollection.filterParameters.notreplied && !ticketCollection.filterParameters.mine && !ticketCollection.filterParameters.starred && !ticketCollection.filterParameters.trashed &&! ticketCollection.filterParameters.label) {
  2815.                                         appliedFilterOptions['all'] = {'name': \"";
  2816.         // line 1853
  2817.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Label"), "html"nulltrue);
  2818.         echo "\"};
  2819.                                         appliedFilterOptions['all']['options'] = [];
  2820.                                         appliedFilterOptions['all']['options'].push({'id': 1, 'name': \"";
  2821.         // line 1855
  2822.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("All"), "html"nulltrue);
  2823.         echo "\"});
  2824.                                     }
  2825.                                 }
  2826.                             } else if(key == 'status') {
  2827.                                 appliedFilterOptions[key] = {'name': \"";
  2828.         // line 1859
  2829.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Status"), "html"nulltrue);
  2830.         echo "\"};
  2831.                                 appliedFilterOptions[key]['options'] = []
  2832.                                 if(filter != null && filter != '' && filter != 1) {
  2833.                                     displayFlag = 1;
  2834.                                     appliedFilterOptions[key]['options'].push({'id': filter, 'name': \$(\".status-list li a[data-id='\" + filter + \"'] .name\").text().trim()});
  2835.                                 } else {
  2836.                                     appliedFilterOptions[key]['options'].push({'id': 1,'name': \"";
  2837.         // line 1865
  2838.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Open"), "html"nulltrue);
  2839.         echo "\"});
  2840.                                 }
  2841.                             } else if(key == 'search') {
  2842.                                 if(filter != null && filter != '') {
  2843.                                     displayFlag = 1;
  2844.                                     appliedFilterOptions[key] = {'name': \"";
  2845.         // line 1872
  2846.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Search Query"), "html"nulltrue);
  2847.         echo "\"};
  2848.                                     appliedFilterOptions[key]['options'] = [];
  2849.                                     appliedFilterOptions[key]['options'].push({'id': filter, 'name': filter});
  2850.                                 }
  2851.                             } else if(key == 'custom') {
  2852.                                 if(filter != null && filter != '') {
  2853.                                     self.\$el.find('[data-filter=\"custom\"]').remove();
  2854.                                     displayFlag = 1;
  2855.                                     var realKey = key;
  2856.                                     var checkBoxStore = Array();
  2857.                                     var dataValueValueSeprator = '_';
  2858.                                     var columnSeperator = '|';
  2859.                                     var multiOptions = filter.split(columnSeperator);
  2860.                                     var multiKeyValue, multiKeyValueValue, ele, newEle;
  2861.                                     _.each(multiOptions, function(valueData, indexData) {
  2862.                                         if(!valueData)
  2863.                                             return;
  2864.                                         multiKeyValue = valueData.split(dataValueValueSeprator);
  2865.                                         multiKeyValueValue = multiKeyValue[1].split(',');
  2866.                                         eleSelector = '[data-value=\"' + multiKeyValue[0] + '\"]';
  2867.                                         ele = \$(eleSelector);
  2868.                                         if(ele[0].type == 'radio') {
  2869.                                             var dataValue = multiKeyValue[0];
  2870.                                             name = ele.parents('.uv-element-block:not(.radio)').find('label:first').text().trim()
  2871.                                             value =  \$(eleSelector + '[value=\"' + multiKeyValue[1] + '\"]').parent().next().text();
  2872.                                             appliedFilterOptions['z-'+dataValue] = {'name': name, 'type': 'radio'};
  2873.                                             appliedFilterOptions['z-'+dataValue]['options'] = [];
  2874.                                             appliedFilterOptions['z-'+dataValue]['options'].push({'id': multiKeyValue[1], 'name': value});
  2875.                                         } else if(ele[0].type == 'checkbox') {
  2876.                                             var dataValue = multiKeyValue[0];
  2877.                                             if(\$.inArray(dataValue, checkBoxStore) >= 0)
  2878.                                                 return;
  2879.                                             checkBoxStore.push(dataValue);
  2880.                                             name = ele.parents('.uv-element-block:not(.checkbox)').find('label:first').text().trim()
  2881.                                             appliedFilterOptions['z-'+dataValue] = {'name': name, 'type': 'checkbox'};
  2882.                                             appliedFilterOptions['z-'+dataValue]['options'] = [];
  2883.                                             var optionName, optionValue;
  2884.                                             _.each(multiKeyValueValue, function(value) {
  2885.                                                 newEle = \$(eleSelector + '[value=\"' + value + '\"]')
  2886.                                                 optionValue = dataValue + dataValueValueSeprator + newEle.val();
  2887.                                                 optionName = newEle.parent().next().text();
  2888.                                                 if(optionValue && optionName) {
  2889.                                                     appliedFilterOptions['z-'+dataValue]['options'].push({'id': value, 'name': optionName});
  2890.                                                 }
  2891.                                             });
  2892.                                         } else if(ele[0].type == 'select-multiple') {
  2893.                                             var dataValue = multiKeyValue[0];
  2894.                                             filter = multiKeyValueValue;
  2895.                                             key = ele.attr('id');
  2896.                                             name = ele.parents('.uv-element-block').find('label:first').text().trim()
  2897.                                             appliedFilterOptions['z-'+dataValue] = {'name': name, 'type': 'select-multiple'};
  2898.                                             appliedFilterOptions['z-'+dataValue]['options'] = [];
  2899.                                             _.each(filter, function (value) {
  2900.                                                 var optionName;
  2901.                                                 if(optionName = \$(\"#\"+key+\" option[value='\" + value + \"']\").text()) {
  2902.                                                     appliedFilterOptions['z-'+dataValue]['options'].push({'id': value, 'name': optionName});
  2903.                                                 }
  2904.                                             });
  2905.                                         } else if(ele[0].type == 'text' || ele[0].type == 'number') {
  2906.                                             filter = multiKeyValue[1];
  2907.                                             if(filter != null && filter != '') {
  2908.                                                 filter = filter.replace(/\\+/g,' ');
  2909.                                                 displayFlag = 1;
  2910.                                                 var dataValue = ele.attr('data-value');
  2911.                                                 name = ele.parents('.uv-element-block').find('label:first').text().trim()
  2912.                                                 appliedFilterOptions['z-'+dataValue] = {'name': name, 'type': ele[0].type};
  2913.                                                 appliedFilterOptions['z-'+dataValue]['options'] = [];
  2914.                                                 appliedFilterOptions['z-'+dataValue]['options'].push({'id': 1, 'name': filter});
  2915.                                             }
  2916.                                         }
  2917.                                     })
  2918.                                 }
  2919.                             }
  2920.                             if('after' == key || 'before' == key || 'repliesLess' == key || 'repliesMore' == key) {
  2921.                                 \$('#'+ key +'-filter-input').val(filter);
  2922.                             }
  2923.                         })
  2924.                         if(displayFlag) {
  2925.                             self.\$el.find('.uv-filter-options .uv-action-buttons').html(\"\")
  2926.                             if(\$(\"#saved-filter\").val() != null && \$(\"#saved-filter\").val() != '' && Backbone.history.getFragment() == userFilters[\$(\"#saved-filter\").val()]['route']) {
  2927.                                 self.\$el.find('.uv-filter-options .uv-action-buttons').append(\"<a class='uv-btn edit-saved-reply' href='#'>";
  2928.         // line 1970
  2929.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Edit"), "html"nulltrue);
  2930.         echo "</a>\").show();
  2931.                                 \$('.uv-filter-paper .uv-customize').show()
  2932.                             } else {
  2933.                                 self.\$el.find('.uv-filter-options .uv-action-buttons').append(\"<a class='uv-btn new-saved-reply' href='#'>";
  2934.         // line 1973
  2935.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("New"), "html"nulltrue);
  2936.         echo "</a>\").show();
  2937.                                 if(\$(\"#saved-filter\").val() != null && \$(\"#saved-filter\").val() != '') {
  2938.                                     self.\$el.find('.uv-filter-options .uv-action-buttons').append(\"<a class='uv-btn edit-saved-reply' href='#'>";
  2939.         // line 1975
  2940.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Update"), "html"nulltrue);
  2941.         echo "</a>\").show();
  2942.                                     \$('.uv-filter-paper .uv-customize').show()
  2943.                                 } else {
  2944.                                     \$('.uv-filter-paper .uv-customize').hide()
  2945.                                 }
  2946.                             }
  2947.                         } else {
  2948.                             \$('.uv-filter-paper .uv-customize').hide()
  2949.                         }
  2950.                         this.appliedFilterOptions = appliedFilterOptions;
  2951.                         this.tempAppliedFilterOptions = jQuery.extend(true, {}, appliedFilterOptions);
  2952.                     }
  2953.                 },
  2954.                 searchFilterOption: function(e) {
  2955.                     self = this;
  2956.                     currentElement = Backbone.\$(e.currentTarget);
  2957.                     dropdown = currentElement.siblings('.uv-dropdown-list');
  2958.                     var filterType =  currentElement.attr('data-filter-type');
  2959.                     if(jQuery.inArray(filterType, ['customer', 'tag']) !== -1) {
  2960.                         self.searchFilterXhr(currentElement);
  2961.                     }
  2962.                 },
  2963.                 searchFilterXhr: _.debounce(function(currentElement) {
  2964.                     var parent = currentElement.parent();
  2965.                     if(\$('.uv-dropdown-other.uv-dropdown-btn-active').parent().attr('id') != parent.attr('id'))
  2966.                         return;
  2967.                     parent.find(\"li:not(.uv-no-results, .uv-filter-info)\").remove();
  2968.                     parent.find(\".uv-filter-info\").show()
  2969.                     if(currentElement.val().length > 1) {
  2970.                         parent.append(this.loaderTemplate())
  2971.                         parent.find('.uv-filter-info').text(\"";
  2972.         // line 2007
  2973.         echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Searching", [], "messages");
  2974.         echo " ...\")
  2975.                         if(self.xhrReq)
  2976.                             self.xhrReq.abort();
  2977.                         self.xhrReq = \$.ajax({
  2978.                             url : \"";
  2979.         // line 2012
  2980.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_ticket_collection_search_filter_options_xhr");
  2981.         echo "\",
  2982.                             type : 'GET',
  2983.                             data: {\"type\" : currentElement.attr('data-filter-type'), \"query\" : currentElement.val(), 'not' : ticketCollection.filterParameters[currentElement.attr('data-filter-type')]},
  2984.                             dataType : 'json',
  2985.                             success : function(response) {
  2986.                                 self.xhrReq = 0;
  2987.                                 parent.find('.uv-loader').remove()
  2988.                                 parent.find('.uv-filter-info').text(\"";
  2989.         // line 2019
  2990.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Type atleast 2 letters"), "html"nulltrue);
  2991.         echo "\").hide();
  2992.                                 if(response.length == 0) {
  2993.                                     parent.find('.uv-no-results').show()
  2994.                                 } else {
  2995.                                     parent.find('.uv-no-results').hide();
  2996.                                     _.each(response, function(item) {
  2997.                                         if(currentElement.attr('data-filter-type') == 'customer') {
  2998.                                             var img = item.smallThumbnail ? \"";
  2999.         // line 2026
  3000.         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.'2026$this->source); })()), "request", [], "any"falsefalsefalse2026), "scheme", [], "any"falsefalsefalse2026) . "://") . 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.'2026$this->source); })()), "request", [], "any"falsefalsefalse2026), "httpHost", [], "any"falsefalsefalse2026)) . $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("")), "html"nulltrue);
  3001.         echo "\"+item.smallThumbnail : \"";
  3002.         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.'2026$this->source); })())), "html"nulltrue);
  3003.         echo "\";
  3004.                                             parent.find('.uv-dropdown-list ul').append(\"<li data-id='\" + item.id + \"'><img src='\" + img + \"'/>\" + item.name + \"</li>\")
  3005.                                         } else
  3006.                                             parent.find('.uv-dropdown-list ul').append(\"<li data-id='\" + item.id + \"'>\" + item.name + \"</li>\")
  3007.                                     });
  3008.                                 }
  3009.                             },
  3010.                             error: function (xhr) {
  3011.                                 self.xhrReq = 0;
  3012.                                 parent.find('.uv-loader').remove()
  3013.                                 parent.find('.uv-no-results').hide();
  3014.                                 parent.find('.uv-filter-info').text(\"";
  3015.         // line 2037
  3016.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Type atleast 2 letters"), "html"nulltrue);
  3017.         echo "\").show();
  3018.                                 if(url = xhr.getResponseHeader('Location'))
  3019.                                     window.location = url;
  3020.                             }
  3021.                         });
  3022.                     } else {
  3023.                         parent.find('.uv-no-results').hide();
  3024.                     }
  3025.                 },1000),
  3026.                 applySavedFilter: function(e) {
  3027.                     var element = Backbone.\$(e.currentTarget);
  3028.                     if(element.val() != \"\") {
  3029.                         var element = Backbone.\$(e.currentTarget);
  3030.                         router.navigate(userFilters[element.val()]['route'], {trigger: true});
  3031.                     } else {
  3032.                         router.navigate('', {trigger: true});
  3033.                     }
  3034.                 },
  3035.                 applyFilter: function(e) {
  3036.                     currentElement = Backbone.\$(e.currentTarget);
  3037.                     if(currentElement.attr(\"data-id\")) {
  3038.                         var flag = 1;
  3039.                         parent = currentElement.parents(\".uv-field-block\");
  3040.                         filterType = parent.find('input').attr('data-filter-type');
  3041.                         if(filterType == \"customer\" || filterType == 'tag') {
  3042.                             sideFilterModel.updateModel(filterType, {'id': currentElement.attr('data-id'), 'name': currentElement.text()})
  3043.                             parent.find(\".uv-no-results\").hide()
  3044.                             parent.find(\".uv-filter-info\").show().text(\"";
  3045.         // line 2065
  3046.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Type atleast 2 letters"), "html"nulltrue);
  3047.         echo "\")
  3048.                             parent.find(\"li:not(.uv-no-results, .uv-filter-info)\").remove();
  3049.                         } else {
  3050.                             if(ticketCollection.filterParameters[filterType]) {
  3051.                                 ids = ticketCollection.filterParameters[filterType].split(',')
  3052.                                 if(jQuery.inArray(currentElement.attr('data-id'), ids) !== -1)
  3053.                                     flag = 0;
  3054.                             }
  3055.                         }
  3056.                         parent.find('input').val('')
  3057.                         if(jQuery.inArray(filterType, ['agent', 'priority', 'type', 'group', 'team', 'mailbox', 'source']) !== -1) {
  3058.                             parent.find(\"li:not(.uv-no-results)\").show()
  3059.                         }
  3060.                         if(flag) {
  3061.                             parent.find('.uv-filtered-tags').append(\"<a class='uv-btn-tag' href='#' data-id='\" + currentElement.attr('data-id') + \"'>\"+currentElement.text()+\"<span class='uv-icon-remove-dark'></span></a>\")
  3062.                             ticketCollection.state.order = null;
  3063.                             ticketCollection.state.sortKey = null;
  3064.                             ticketCollection.state.currentPage = null;
  3065.                             ticketCollection.filterParameters[filterType] = this.joinTagValues(parent.find(\".uv-filtered-tags\"));
  3066.                             var queryString = app.appView.buildQuery(\$.param(ticketCollection.getValidParameters()));
  3067.                             router.navigate(queryString, {trigger: true});
  3068.                         }
  3069.                     } else {
  3070.                         filterType = currentElement.attr('data-filter-type');
  3071.                         if(filterType == 'before' || filterType == \"after\") {
  3072.                             ticketCollection.state.order = null;
  3073.                             ticketCollection.state.sortKey = null;
  3074.                             ticketCollection.state.currentPage = null;
  3075.                             ticketCollection.filterParameters[filterType] = currentElement.val();
  3076.                             var queryString = app.appView.buildQuery(\$.param(ticketCollection.getValidParameters()));
  3077.                             router.navigate(queryString, {trigger: true});
  3078.                         }
  3079.                     }
  3080.                 },
  3081.                 removeFilter: function(e) {
  3082.                     e.preventDefault()
  3083.                     currentElement = Backbone.\$(e.currentTarget);
  3084.                     filterType = currentElement.parents('.uv-field-block').find('input').attr('data-filter-type')
  3085.                     var options = ticketCollection.filterParameters[filterType];
  3086.                     options = options.split(',');
  3087.                     var index = options.indexOf(currentElement.attr('data-id'));
  3088.                     options.splice(index, 1);
  3089.                     ticketCollection.state.order = null;
  3090.                     ticketCollection.state.sortKey = null;
  3091.                     ticketCollection.state.currentPage = null;
  3092.                     ticketCollection.filterParameters[filterType] = options.join(',');
  3093.                     currentElement.remove()
  3094.                     var queryString = app.appView.buildQuery(\$.param(ticketCollection.getValidParameters()));
  3095.                     router.navigate(queryString, {trigger: true});
  3096.                 },
  3097.                 joinTagValues: function(parent) {
  3098.                     var ids = new Array();
  3099.                     parent.find('.uv-btn-tag').each(function() {
  3100.                         ids.push(\$(this).attr('data-id'))
  3101.                     });
  3102.                     return ids.join();
  3103.                 },
  3104.                 filterByRepliesMoreThan: _.debounce(function(e) {
  3105.                     ticketCollection.state.order = null;
  3106.                     ticketCollection.state.sortKey = null;
  3107.                     ticketCollection.state.currentPage = null;
  3108.                     ticketCollection.filterParameters.repliesMore = \$(e.target).val();
  3109.                     var queryString = app.appView.buildQuery(\$.param(ticketCollection.getValidParameters()));
  3110.                     router.navigate(queryString, { trigger: true });
  3111.                 }, 1000),
  3112.                 filterByRepliesLessThan: _.debounce(function(e) {
  3113.                     ticketCollection.state.order = null;
  3114.                     ticketCollection.state.sortKey = null;
  3115.                     ticketCollection.state.currentPage = null;
  3116.                     ticketCollection.filterParameters.repliesLess = \$(e.target).val();
  3117.                     var queryString = app.appView.buildQuery(\$.param(ticketCollection.getValidParameters()));
  3118.                     router.navigate(queryString, { trigger: true });
  3119.                 }, 1000),
  3120.                 filterByCustom: _.debounce(function(e) {
  3121.                     var custom = '';
  3122.                     var checkBoxStore = Array();
  3123.                     var indexValueSeperator = '_';
  3124.                     var columnSeperator = '|';
  3125.                     Backbone.\$('.custom-filter').each(function(){
  3126.                         if(\$(this).context.type == 'radio' && \$(this).is(':checked')) {
  3127.                             custom += \$(this).attr('data-value') + indexValueSeperator + \$(this).val() + columnSeperator;
  3128.                         } else if(\$(this).context.type == 'checkbox' && \$(this).is(':checked')) {
  3129.                             var checkboxValue = Array();
  3130.                             var dataValue = \$(this).attr('data-value');
  3131.                             if(\$.inArray(dataValue, checkBoxStore) >= 0)
  3132.                                 return;
  3133.                             \$.each(\$('[data-value=\"'+ dataValue +'\"]:checked'), function() {
  3134.                                 checkboxValue.push(\$(this).val());
  3135.                             });
  3136.                             checkBoxStore.push(dataValue);
  3137.                             custom += dataValue + indexValueSeperator + checkboxValue.join() + columnSeperator;
  3138.                         } else if(\$(this).context.type == 'select-multiple' && \$(this).val()) {
  3139.                             custom += \$(this).attr('data-value') + indexValueSeperator + \$(this).val().join() + columnSeperator;
  3140.                         }
  3141.                     })
  3142.                     Backbone.\$('.search-custom').each(function(){
  3143.                         if(\$(this).val()){
  3144.                             custom += \$(this).attr('data-value') + indexValueSeperator + \$(this).val() + columnSeperator;
  3145.                         }
  3146.                     })
  3147.                     custom = custom.replace(/\\|\$/, '');
  3148.                     ticketCollection.state.order = null;
  3149.                     ticketCollection.state.sortKey = null;
  3150.                     ticketCollection.state.currentPage = null;
  3151.                     ticketCollection.filterParameters.custom = custom;
  3152.                     var queryString = app.appView.buildQuery(\$.param(ticketCollection.getValidParameters()));
  3153.                     router.navigate(queryString,{trigger: true});
  3154.                 }, 1000),
  3155.                 backToFilter: function(e) {
  3156.                     if(e)
  3157.                         e.preventDefault()
  3158.                     this.\$el.find('.uv-filter-options').show()
  3159.                     this.\$el.find('.uv-filter-edit').hide()
  3160.                 },
  3161.                 addEditSavedReply: function(e) {
  3162.                     e.preventDefault()
  3163.                     var context = {};
  3164.                     this.tempAppliedFilterOptions = jQuery.extend(true, {}, this.appliedFilterOptions);
  3165.                     if(Backbone.\$(e.currentTarget).is('.new-saved-reply')) {
  3166.                         context = {'id': 0, 'name': '', 'is_default': 0, 'filters': this.tempAppliedFilterOptions};
  3167.                     } else {
  3168.                         context = userFilters[\$(\"#saved-filter\").val()];
  3169.                         context.filters = this.tempAppliedFilterOptions;
  3170.                         userFilters[\$(\"#saved-filter\").val()]
  3171.                     }
  3172.                     \$('.uv-filter-edit').html('')
  3173.                     \$('.uv-filter-edit').append(this.addEditSavedReplyTemplate(context));
  3174.                     this.\$el.find('.uv-filter-options').hide()
  3175.                     this.\$el.find('.uv-filter-edit').show()
  3176.                 },
  3177.                 removeSavedFilterOption: function(e) {
  3178.                     e.preventDefault()
  3179.                     var parent = Backbone.\$(e.currentTarget).parents('.uv-element-block');
  3180.                     var elementIndex = Backbone.\$(e.currentTarget).index();
  3181.                     var filterType = parent.attr('data-filter');
  3182.                     var filterId = Backbone.\$(e.currentTarget).attr('data-id');
  3183.                     delete this.tempAppliedFilterOptions[filterType]['options'][elementIndex]
  3184.                     Backbone.\$(e.currentTarget).remove()
  3185.                     if(!parent.find('.uv-btn-tag').length) {
  3186.                         parent.remove()
  3187.                         delete this.tempAppliedFilterOptions[filterType];
  3188.                     }
  3189.                     if(this.getSavedFilterRoute() == '') {
  3190.                         this.backToFilter();
  3191.                     }
  3192.                 },
  3193.                 saveSavedFilter: function(e) {
  3194.                     e.preventDefault()
  3195.                     if(Backbone.\$(e.currentTarget).hasClass('save-filter'))
  3196.                         this.saveFilterAjax('POST')
  3197.                     else {
  3198.                         this.saveFilterAjax('PUT')
  3199.                     }
  3200.                 },
  3201.                 saveFilterAjax: function(method) {
  3202.                     var inputElement = \$('.uv-filter-edit input.name');
  3203.                     inputElement.removeClass('uv-field-error');
  3204.                     \$('.uv-field-message').remove()
  3205.                     if(inputElement.val() != undefined && inputElement.val() == '') {
  3206.                         inputElement.addClass('uv-field-error');
  3207.                         inputElement.parent().after(\"<span class='uv-field-message'>";
  3208.         // line 2236
  3209.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("This field is mandatory"), "html"nulltrue);
  3210.         echo "</span>\");
  3211.                     } else {
  3212.                         var data = \$('.uv-filter-edit form').serializeObject();
  3213.                         data['route'] = this.getSavedFilterRoute();
  3214.                         app.appView.showLoader();
  3215.                         self = this;
  3216.                         \$.ajax({
  3217.                             url : \"";
  3218.         // line 2243
  3219.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_saved_filters_xhr");
  3220.         echo "\",
  3221.                             type : method,
  3222.                             data: data,
  3223.                             dataType : 'json',
  3224.                             success : function(response) {
  3225.                                 app.appView.hideLoader();
  3226.                                 userFilters[response.filter.id] = response.filter;
  3227.                                 \$(\"#saved-filter\").html(\"<option value=''>-- ";
  3228.         // line 2250
  3229.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Saved Filter"), "html"nulltrue);
  3230.         echo " --</option>\")
  3231.                                 _.each(userFilters, function(filter, key) {
  3232.                                     if(response.filter.is_default && filter.id != response.filter.id)
  3233.                                         userFilters[key]['is_default'] = 0;
  3234.                                     var selected = '';
  3235.                                     if(response.filter.id == filter.id)
  3236.                                         selected = \"selected\";
  3237.                                     \$(\"#saved-filter\").append(\"<option value='\" + filter.id + \"' selected='\" + selected + \"''>\" + filter.name + \"</option>\")
  3238.                                 })
  3239.                                 \$(\"#saved-filter\").val(response.filter.id)
  3240.                                 app.appView.renderResponseAlert(response);
  3241.                                 self.render();
  3242.                                 self.backToFilter();
  3243.                             },
  3244.                             error: function (xhr) {
  3245.                                 app.appView.hideLoader();
  3246.                                 if(url = xhr.getResponseHeader('Location'))
  3247.                                     window.location = url;
  3248.                             }
  3249.                         });
  3250.                     }
  3251.                 },
  3252.                 getSavedFilterRoute: function() {
  3253.                     var filterParameters = {};
  3254.                     temp = [];
  3255.                     _.each(this.tempAppliedFilterOptions, function (filter, key) {
  3256.                         if(jQuery.inArray(key, ['customer', 'agent', 'priority', 'type', 'group', 'team', 'tag', 'mailbox', 'source', 'after', 'before', 'repliesLess', 'repliesMore']) !== -1) {
  3257.                             var ids = [];
  3258.                             _.each(filter['options'], function (item) {
  3259.                                 ids.push(item.id)
  3260.                             });
  3261.                             filterParameters[key] = ids.join(',')
  3262.                         } else if(jQuery.inArray(key, ['new','unassigned','notreplied','mine','starred','trashed']) !== -1) {
  3263.                             filterParameters[key] = 1;
  3264.                         } else if(jQuery.inArray(key, ['label', 'status', 'search']) !== -1) {
  3265.                             _.each(filter['options'], function (item) {
  3266.                                 filterParameters[key] = item.id;
  3267.                             });
  3268.                         } else {
  3269.                             custom = key.split(\"z-\")
  3270.                             tempKey = custom[1];
  3271.                             if(filter.type == 'text' || filter.type == 'number') {
  3272.                                 _.each(filter['options'], function (item) {
  3273.                                     temp.push(tempKey + '_' + item.name)
  3274.                                 });
  3275.                             } else if(filter.type == 'radio') {
  3276.                                 var ids = [];
  3277.                                 _.each(filter['options'], function (item) {
  3278.                                     ids.push(item.id)
  3279.                                 });
  3280.                                 temp.push(tempKey + '_' + ids.join(','))
  3281.                             } else if(filter.type == 'checkbox' || filter.type == 'select-multiple') {
  3282.                                 var ids = [];
  3283.                                 _.each(filter['options'], function (item) {
  3284.                                     ids.push(item.id)
  3285.                                 });
  3286.                                 temp.push(tempKey + '_' + ids.join(','))
  3287.                             }
  3288.                         }
  3289.                     })
  3290.                     if(temp.length)
  3291.                         filterParameters['custom'] = temp.join('|');
  3292.                     return app.appView.buildQuery(\$.param(filterParameters));
  3293.                 },
  3294.                 removeSavedFilter: function(e) {
  3295.                     e.preventDefault()
  3296.                     self = this;
  3297.                     app.appView.showLoader();
  3298.                     \$.ajax({
  3299.                         url : \"";
  3300.         // line 2322
  3301.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_saved_filters_xhr");
  3302.         echo "/\" + \$(\"#saved-filter\").val(),
  3303.                         type : 'DELETE',
  3304.                         dataType : 'json',
  3305.                         success : function(response) {
  3306.                             app.appView.hideLoader();
  3307.                             delete userFilters[\$(\"#saved-filter\").val()];
  3308.                             \$(\"#saved-filter\").html(\"<option value=''>-- ";
  3309.         // line 2329
  3310.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Saved Filter"), "html"nulltrue);
  3311.         echo " --</option>\")
  3312.                             _.each(userFilters, function(filter, key) {
  3313.                                 \$(\"#saved-filter\").append(\"<option value='\" + filter.id + \"'>\" + filter.name + \"</option>\")
  3314.                             })
  3315.                             \$(\"#saved-filter\").val('')
  3316.                             app.appView.renderResponseAlert(response);
  3317.                             self.render();
  3318.                             self.backToFilter();
  3319.                         },
  3320.                         error: function (xhr) {
  3321.                             app.appView.hideLoader();
  3322.                             if(url = xhr.getResponseHeader('Location'))
  3323.                                 window.location = url;
  3324.                         }
  3325.                     });
  3326.                 }
  3327.             });
  3328.             // Ticket Label Item View
  3329.             var LabelItemView = Backbone.View.extend({
  3330.                 tagName: 'li',
  3331.                 className: 'uv-customize-wrapper',
  3332.                 template: _.template(\$(\"#custom_label_tmp\").html()),
  3333.                 events: {
  3334.                     'click .delete': 'confirmRemove',
  3335.                     'click .label-color.dropdown .fa-caret-down' : 'showUpdateLabelPopup'
  3336.                 },
  3337.                 render: function() {
  3338.                     this.\$el.html(this.template(this.model.toJSON()));
  3339.                     if (ticketCollection.filterParameters.label != '') {
  3340.                         if (ticketCollection.filterParameters.label == this.model.id) {
  3341.                             this.\$el.find('a').addClass('uv-aside-active');
  3342.                         }
  3343.                     }
  3344.                     return this;
  3345.                 }
  3346.             });
  3347.             // Ticket List Item View
  3348.             var TicketItem = Backbone.View.extend({
  3349.                 tagName: \"tr\",
  3350.                 template: _.template(\$(\"#ticket_list_item_tmp\").html()),
  3351.                 events: {
  3352.                     'click .uv-star': \"updateStar\",
  3353.                 },
  3354.                 render: function () {
  3355.                     this.model.set({
  3356.                         path: pathToTicket.replace('replaceId', this.model.attributes.id)
  3357.                     });
  3358.                     this.\$el.html(this.template(this.model.toJSON()));
  3359.                     if (this.model.attributes.isAgentView != true) {
  3360.                         this.\$el.addClass('unread')
  3361.                     }
  3362.                     if (!this.model.attributes.agent) {
  3363.                         this.\$el.addClass('not-assigned')
  3364.                     }
  3365.                     return this;
  3366.                 },
  3367.                 updateStar: function(e) {
  3368.                     e.preventDefault();
  3369.                     if (Backbone.\$(e.currentTarget).hasClass('uv-star-active')) {
  3370.                         Backbone.\$(e.currentTarget).removeClass('uv-star-active');
  3371.                     } else {
  3372.                         Backbone.\$(e.currentTarget).addClass('uv-star-active');
  3373.                     }
  3374.                     this.model.save({
  3375.                         id: this.model.id
  3376.                     }, {
  3377.                         patch: true,
  3378.                         url: \"";
  3379.         // line 2405
  3380.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_bookmark_ticket_xhr");
  3381.         echo "\",
  3382.                         success: function (model, response, options) {},
  3383.                         error: function (model, xhr, options) {
  3384.                             if (url = xhr.getResponseHeader('Location')) {
  3385.                                 window.location = url;
  3386.                             }
  3387.                         }
  3388.                     });
  3389.                 }
  3390.             });
  3391.             // Ticket List View
  3392.             var TicketList = Backbone.View.extend({
  3393.                 el: \$(\".uv-table table\"),
  3394.                 initialize: function() {
  3395.                     this.render();
  3396.                 },
  3397.                 events: {
  3398.                     'change .mass-action-checkbox' : 'showBulkOptions',
  3399.                 },
  3400.                 showBulkOptions: function() {
  3401.                     var count = 0;
  3402.                     this.\$el.find('.mass-action-checkbox').each(function() {
  3403.                         if (\$(this).is(':checked')) {
  3404.                             count++;
  3405.                         }
  3406.                     });
  3407.                     if (count == \$('.mass-action-checkbox').length) {
  3408.                         \$('.select-all-checkbox').prop('checked', true);
  3409.                     } else {
  3410.                         \$('.select-all-checkbox').prop('checked', false);
  3411.                     }
  3412.                     if (count) {
  3413.                         \$('.uv-action-bar .filter').parent().hide();
  3414.                         \$('.uv-action-bar .mass-action').parent().addClass(\"uv-width-100\").show();
  3415.                         \$('.uv-action-bar-col-rt').hide()
  3416.                     } else {
  3417.                         \$('.uv-action-bar .mass-action').parent().removeClass(\"uv-width-100\").hide();
  3418.                         \$('.uv-action-bar .filter').parent().show();
  3419.                         \$('.uv-action-bar-col-rt').show();
  3420.                     }
  3421.                 },
  3422.                 render: function () {
  3423.                     this.\$el.find('tbody').html('');
  3424.                     if (ticketCollection.length) {
  3425.                         \$('.select-all-checkbox').prop( \"disabled\", false );
  3426.                         _.each(ticketCollection.models, function (item) {
  3427.                             ticketQuickViewCollection.add(new TicketQuickViewModel({id: item.id}))
  3428.                             this.renderTicket(item);
  3429.                         }, this);
  3430.                     } else {
  3431.                         \$('.select-all-checkbox').prop( \"disabled\", true );
  3432.                         this.\$el.find('tbody').append(\"<tr style='text-align: center;'><td colspan='11'>";
  3433.         // line 2459
  3434.         echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("No Record Found", [], "messages");
  3435.         echo "</td></tr>\")
  3436.                     }
  3437.                     filter.filterAssetsVisibilityOnLoad()
  3438.                     app.appView.relativeTime()
  3439.                 },
  3440.                 renderTicket: function (item) {
  3441.                     var ticketItem = new TicketItem({
  3442.                         model: item
  3443.                     });
  3444.                     this.\$el.find('tbody').append(ticketItem.render().el);
  3445.                 }
  3446.             });
  3447.             // Ticket Label List View
  3448.             var LabelListView = Backbone.View.extend({
  3449.                 el: \$(\".uv-aside\"),
  3450.                 template: _.template(\$(\"#predefined_label_tmp\").html()),
  3451.                 statusTemplate: _.template(\$(\"#ticket_status_list_tmp\").html()),
  3452.                 addEditLabelTemplate: _.template(\$(\"#add_edit_label_tmp\").html()),
  3453.                 events: {
  3454.                     'click .status-list li a': \"filterByStatus\",
  3455.                     'click .add-new-label, .uv-customize': 'addEditLabel',
  3456.                     'click #back-to-labels': 'backToLabels',
  3457.                     'click .uv-color-block': 'setLabelColor',
  3458.                     'click .add-update-btn': 'saveLabel',
  3459.                     'click .uv-add-edit-label .uv-btn-remove': 'removeLabel'
  3460.                 },
  3461.                 render: function() {
  3462.                     var active = \"\";
  3463.                     if (ticketCollection.filterParameters.new != '') {
  3464.                         active = \"new\";
  3465.                     } else if (ticketCollection.filterParameters.unassigned != '') {
  3466.                         active = \"unassigned\";
  3467.                     } else if (ticketCollection.filterParameters.notreplied != '') {
  3468.                         active = \"notreplied\";
  3469.                     }
  3470.                     if (ticketCollection.filterParameters.mine != '') {
  3471.                         active = \"mine\";
  3472.                     } else if (ticketCollection.filterParameters.starred != '') {
  3473.                         active = \"starred\";
  3474.                     } else if (ticketCollection.filterParameters.trashed != '') {
  3475.                         active = \"trashed\";
  3476.                     } else if (ticketCollection.filterParameters.label != '') {
  3477.                         active = \"label\";
  3478.                     }
  3479.                     var data = {
  3480.                         'labelDetails' : labelDetails,
  3481.                         'active' : active
  3482.                     }
  3483.                     this.\$el.find('.predefined-label-list').html(this.template(data));
  3484.                     labelCollection.reset();
  3485.                     labelCollection.set(labelDetails.custom);
  3486.                     this.updateMassLabelList()
  3487.                 },
  3488.                 updateMassLabelList: function() {
  3489.                     this.\$el.find('.uv-aside-custom').html('');
  3490.                     var labelOptionHtml = \"\";
  3491.                     if(labelCollection.length) {
  3492.                         _.each(labelCollection.models, function (item) {
  3493.                             this.renderLabelItem(item);
  3494.                             labelOptionHtml = labelOptionHtml + \"<li data-index='\" + item.id + \"'><a href='#'>\" + item.attributes.name + \"</a></li>\";
  3495.                         }, this);
  3496.                     }
  3497.                     labelOptionHtml = labelOptionHtml ? labelOptionHtml : \"<li data-index='0'>";
  3498.         // line 2528
  3499.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("No Label Created"), "html"nulltrue);
  3500.         echo "</li>\";
  3501.                     \$(\".mass-action ul.label\").html(labelOptionHtml);
  3502.                     this.renderStatus();
  3503.                 },
  3504.                 renderLabelItem : function (item) {
  3505.                     var labelItem = new LabelItemView({
  3506.                         model: item
  3507.                     });
  3508.                     this.\$el.find('.uv-aside-custom').append(labelItem.render().el);
  3509.                 },
  3510.                 renderStatus : function() {
  3511.                     if(typeof ticketCollection.filterParameters.status == \"undefined\" || ticketCollection.filterParameters.status == null)
  3512.                         var active = 0;
  3513.                     else
  3514.                         var active = ticketCollection.filterParameters.status;
  3515.                     this.\$el.find('.uv-aside-active').parent().find('.status-list').remove()
  3516.                     this.\$el.find('.uv-aside-active').parent().append(this.statusTemplate({status : statusListDetails, active : active}));
  3517.                 },
  3518.                 filterByStatus : function(e) {
  3519.                     e.preventDefault()
  3520.                     ticketCollection.reset();
  3521.                     ticketCollection.state.order = null;
  3522.                     ticketCollection.state.sortKey = null;
  3523.                     ticketCollection.state.currentPage = null;
  3524.                     ticketCollection.filterParameters.status = Backbone.\$(e.currentTarget).attr('data-id');
  3525.                     var queryString = app.appView.buildQuery(\$.param(ticketCollection.getValidParameters()));
  3526.                     router.navigate(queryString, {trigger: true});
  3527.                 },
  3528.                 addEditLabel: function(e) {
  3529.                     e.preventDefault()
  3530.                     currentElement = Backbone.\$(e.currentTarget);
  3531.                     if(currentElement.hasClass('add-new-label'))
  3532.                         \$('.uv-add-edit-label').html(this.addEditLabelTemplate({id : 0, name : '', colorCode: ''}))
  3533.                     else
  3534.                         \$('.uv-add-edit-label').html(this.addEditLabelTemplate(labelCollection.get(currentElement.siblings('a').attr('data-id')).toJSON()))
  3535.                     \$('.uv-aside-default').hide()
  3536.                     \$('.uv-add-edit-label').show()
  3537.                 },
  3538.                 backToLabels: function(e) {
  3539.                     if(e)
  3540.                         e.preventDefault()
  3541.                     \$('.uv-aside-default').show()
  3542.                     \$('.uv-add-edit-label').hide()
  3543.                 },
  3544.                 setLabelColor: function(e) {
  3545.                     \$('.uv-color-block').removeClass('uv-color-active');
  3546.                     Backbone.\$(e.currentTarget).addClass('uv-color-active');
  3547.                 },
  3548.                 saveLabel : function(e) {
  3549.                     e.preventDefault()
  3550.                     var inputElement = \$('.uv-add-edit-label input');
  3551.                     inputElement.removeClass('uv-field-error');
  3552.                     \$('.uv-field-message').remove()
  3553.                     var labelName = app.appView.stripHTML(inputElement.val());
  3554.                     if(labelName == \"\") {
  3555.                         inputElement.addClass('uv-field-error');
  3556.                         inputElement.parent().after(\"<span class='uv-field-message'>";
  3557.         // line 2588
  3558.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("This field is mandatory"), "html"nulltrue);
  3559.         echo "</span>\");
  3560.                     } else {
  3561.                         var labelId = parseInt(\$('.uv-aside-option').attr('data-id'))
  3562.                         model = labelId ? labelCollection.get(labelId) : new LabelModel()
  3563.                         model.set({name: labelName, colorCode: \$('.uv-color-block.uv-color-active').attr('data-color')});
  3564.                         self = this;
  3565.                         var flag = labelCollection.isLabelExist(labelName, labelId);
  3566.                         if(flag) {
  3567.                             app.appView.showLoader();
  3568.                             model.save({}, {
  3569.                                 success: function (model, response, options) {
  3570.                                     app.appView.hideLoader();
  3571.                                     if(response.alertClass == \"success\") {
  3572.                                         if(!labelId) {
  3573.                                             labelCollection.add(model);
  3574.                                         }
  3575.                                         self.updateMassLabelList()
  3576.                                         app.appView.renderResponseAlert(response);
  3577.                                     } else {
  3578.                                         inputElement.addClass('uv-field-error');
  3579.                                         inputElement.parent().after(\"<span class='uv-field-message'>\" + response.alertMessage + \"</span>\");
  3580.                                     }
  3581.                                     self.backToLabels();
  3582.                                 },
  3583.                                 error: function (model, xhr, options) {
  3584.                                     if(url = xhr.getResponseHeader('Location'))
  3585.                                         window.location = url;
  3586.                                     app.appView.hideLoader();
  3587.                                     app.appView.renderResponseAlert(warningResponse);
  3588.                                 }
  3589.                             });
  3590.                         } else {
  3591.                             inputElement.parent().after(\"<span class='uv-field-message'>";
  3592.         // line 2622
  3593.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Label with same name already exist."), "html"nulltrue);
  3594.         echo "</span>\");
  3595.                         }
  3596.                     }
  3597.                 },
  3598.                 removeLabel: function(e) {
  3599.                     e.preventDefault()
  3600.                     self = this;
  3601.                     app.appView.showLoader();
  3602.                     model = labelCollection.get(\$('.uv-aside-option').attr('data-id'))
  3603.                     model.destroy({
  3604.                         success : function (model, response, options) {
  3605.                             app.appView.hideLoader();
  3606.                             self.updateMassLabelList()
  3607.                             app.appView.renderResponseAlert(response);
  3608.                             self.backToLabels();
  3609.                         },
  3610.                         error: function (model, xhr, options) {
  3611.                             if(url = xhr.getResponseHeader('Location'))
  3612.                                 window.location = url;
  3613.                             app.appView.hideLoader();
  3614.                             app.appView.renderResponseAlert(warningResponse);
  3615.                         }
  3616.                     });
  3617.                 }
  3618.             });
  3619.             // Bulk Action View
  3620.             var BulkActionView = Backbone.View.extend({
  3621.                 el: \$(\".mass-action\"),
  3622.                 currentEvent: null,
  3623.                 events: {
  3624.                     'click ul li, #mass-restore': 'massAction',
  3625.                     'click #mass-delete, #mass-delete-forever': 'confirmRemove',
  3626.                     'click #mass-restore': 'confirmRestore'
  3627.                 },
  3628.                 massAction: function(e) {
  3629.                     e.preventDefault();
  3630.                     if(!parseInt(Backbone.\$(e.currentTarget).attr('data-index')))
  3631.                         return;
  3632.                     var data = {};
  3633.                     data['actionType'] = Backbone.\$(e.currentTarget).parents('ul').attr('data-action') ? Backbone.\$(e.currentTarget).parents('ul').attr('data-action') : Backbone.\$(e.currentTarget).attr('data-action');
  3634.                     data['targetId'] = Backbone.\$(e.currentTarget).attr('data-index');
  3635.                     data['ids'] = this.getCheckedTicketIds();
  3636.                     ticketCollection.batchOperation(data);
  3637.                     this.hideBulkOptions();
  3638.                 },
  3639.                 removeItem: function(e) {
  3640.                     var data = {};
  3641.                     if(Backbone.\$(this.currentEvent.currentTarget).is(\"#mass-delete\"))
  3642.                         data['actionType'] = \"trashed\";
  3643.                     else if(Backbone.\$(this.currentEvent.currentTarget).is(\"#mass-delete-forever\"))
  3644.                         data['actionType'] = \"delete\";
  3645.                     data['ids'] = this.getCheckedTicketIds();
  3646.                     ticketCollection.batchOperation(data);
  3647.                     this.hideBulkOptions();
  3648.                 },
  3649.                 restoreItem: function(e) {
  3650.                     var data = {};
  3651.                     data['actionType'] = \"restored\";
  3652.                     data['ids'] = this.getCheckedTicketIds();
  3653.                     ticketCollection.batchOperation(data);
  3654.                     this.hideBulkOptions();
  3655.                 },
  3656.                 getCheckedTicketIds: function() {
  3657.                     var ids = new Array();
  3658.                     \$('.mass-action-checkbox').each(function() {
  3659.                         if(\$(this).is(':checked')) {
  3660.                             ids.push(\$(this).val());
  3661.                         }
  3662.                     });
  3663.                     return ids;
  3664.                 },
  3665.                 confirmRemove: function(e) {
  3666.                     e.preventDefault();
  3667.                     this.currentEvent = e;
  3668.                     app.appView.openConfirmModal(this)
  3669.                 },
  3670.                 confirmRestore: function(e) {
  3671.                     e.preventDefault();
  3672.                     app.appView.openConfirmModal(this, 'restoreItem')
  3673.                 },
  3674.                 hideBulkOptions : function() {
  3675.                     \$('.uv-action-bar .mass-action').parent().removeClass(\"uv-width-100\").hide();
  3676.                     \$('.uv-action-bar .filter').parent().show();
  3677.                     \$('.uv-action-bar-col-rt').show()
  3678.                 }
  3679.             });
  3680.             var PageView = Backbone.View.extend({
  3681.                 el: '.uv-paper',
  3682.                 events : {
  3683.                     'change .select-all-checkbox' : 'selectAll',
  3684.                     'click .uv-quick-view-trigger, .quick-view-navigation .uv-btn-tag': 'navigateQuickView',
  3685.                 },
  3686.                 quickViewTemplate: _.template(\$(\"#ticket_quick_view_tmp\").html()),
  3687.                 navigateQuickView : function(e) {
  3688.                     e.preventDefault();
  3689.                     //\$(\"#quick-view-modal .uv-loader\").hide()
  3690.                     var currentElement = Backbone.\$(e.currentTarget);
  3691.                     ticketId = currentElement.attr('data-id');
  3692.                     if(ticketId) {
  3693.                         if(model = ticketQuickViewCollection.isModelSynced(ticketId)) {
  3694.                             this.renderQuickView(model.toJSON())
  3695.                         } else {
  3696.                             var self = this;
  3697.                             if(currentElement.hasClass(\"uv-quick-view-trigger\"))
  3698.                                 app.appView.showLoader();
  3699.                             if(ticketQuickViewCollection.get(ticketId)) {
  3700.                                 navData = ticketQuickViewCollection.getNextPrev(ticketId);
  3701.                                 requiredNext = (!navData.next && app.pager.paginationData.next) ? 1 : 0;
  3702.                                 requiredPrev = (!navData.previous && app.pager.paginationData.previous) ? 1 : 0;
  3703.                             } else
  3704.                                 requiredNext = requiredPrev = 1;
  3705.                             if(self.xhrReq)
  3706.                                 self.xhrReq.abort();
  3707.                             \$(\"#quick-view-modal .uv-loader\").show()
  3708.                             self.xhrReq = \$.ajax({
  3709.                                 url : \"";
  3710.         // line 2747
  3711.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_ticket_quick_view_xhr");
  3712.         echo "\",
  3713.                                 type : 'GET',
  3714.                                 data : {ticketId : ticketId, next: requiredNext, previous: requiredPrev},
  3715.                                 dataType : 'json',
  3716.                                 success : function(response) {
  3717.                                     self.xhrReq = 0;
  3718.                                     if(currentElement.hasClass(\"uv-quick-view-trigger\"))
  3719.                                         app.appView.hideLoader();
  3720.                                     if(response.next == undefined)
  3721.                                         response.next = navData.next
  3722.                                     if(response.previous == undefined)
  3723.                                         response.previous = navData.previous
  3724.                                     response.isSynced = 1
  3725.                                     response.path = pathToTicket.replace('replaceId', response.incrementId);
  3726.                                     if(ticketQuickViewCollection.get(ticketId))
  3727.                                         ticketQuickViewCollection.set(response,{remove: false})
  3728.                                     else
  3729.                                         ticketQuickViewCollection.add(new TicketQuickViewModel(response))
  3730.                                     self.renderQuickView(response)
  3731.                                 },
  3732.                                 error: function (xhr) {
  3733.                                     self.xhrReq = 0;
  3734.                                     if(url = xhr.getResponseHeader('Location'))
  3735.                                         window.location = url;
  3736.                                     app.appView.hideLoader();
  3737.                                 }
  3738.                             });
  3739.                         }
  3740.                     }
  3741.                 },
  3742.                 renderQuickView: function(response) {
  3743.                     \$('#quick-view-modal .uv-pop-up-box').html(this.quickViewTemplate(response));
  3744.                     app.appView.openModal('quick-view-modal')
  3745.                     \$('#quick-view-modal .message').find('img').removeAttr('crossorigin');
  3746.                     \$('#quick-view-modal .message').find('.uv-icon-ellipsis').remove();
  3747.                     \$('#quick-view-modal .message').find('.helpdesk_blockquote').eq(0).before(\"<span class='uv-icon-ellipsis uv-ellipsis-mirror'></span>\").hide();
  3748.                     app.appView.relativeTime();
  3749.                 },
  3750.                 selectAll : function(e) {
  3751.                     if(Backbone.\$(e.currentTarget).is(':checked')) {
  3752.                         \$('.mass-action-checkbox').prop('checked', true);
  3753.                         \$('.uv-action-bar .filter').parent().hide();
  3754.                         \$('.uv-action-bar .mass-action').parent().addClass(\"uv-width-100\").show();
  3755.                         \$('.uv-action-bar-col-rt').hide()
  3756.                     } else {
  3757.                         var count = 0;
  3758.                         \$('.mass-action-checkbox').each(function() {
  3759.                             if(\$(this).is(':checked'))
  3760.                                 count++;
  3761.                         });
  3762.                         if(count == \$('.mass-action-checkbox').length) {
  3763.                             \$('.mass-action-checkbox').prop('checked', false);
  3764.                             \$('.uv-action-bar .filter').parent().show();
  3765.                             \$('.uv-action-bar .mass-action').parent().removeClass(\"uv-width-100\").hide();
  3766.                             \$('.uv-action-bar-col-rt').show()
  3767.                         }
  3768.                     }
  3769.                 },
  3770.             });
  3771.             // Ticket Router
  3772.             Router = Backbone.Router.extend({
  3773.                 routes: {
  3774.                     'page/:number(/sort/:sortField)(/direction/:order)' : 'paginate',
  3775.                     'status/:status(/search/:query)(/agent/:agent)(/customer/:customer)(/priority/:priority)(/type/:type)(/group/:group)(/team/:team)(/tag/:tag)(/mailbox/:mailbox)(/source/:source)(/after/:after)(/before/:before)(/repliesLess/:repliesLess)(/repliesMore/:repliesMore)(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterByStatus',
  3776.                     'search/:query(/agent/:agent)(/customer/:customer)(/priority/:priority)(/type/:type)(/group/:group)(/team/:team)(/tag/:tag)(/mailbox/:mailbox)(/source/:source)(/after/:after)(/before/:before)(/repliesLess/:repliesLess)(/repliesMore/:repliesMore)(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterByQuery',
  3777.                     'agent/:agent(/customer/:customer)(/priority/:priority)(/type/:type)(/group/:group)(/team/:team)(/tag/:tag)(/mailbox/:mailbox)(/source/:source)(/after/:after)(/before/:before)(/repliesLess/:repliesLess)(/repliesMore/:repliesMore)(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterByAgent',
  3778.                     'customer/:customer(/priority/:priority)(/type/:type)(/group/:group)(/team/:team)(/tag/:tag)(/mailbox/:mailbox)(/source/:source)(/after/:after)(/before/:before)(/repliesLess/:repliesLess)(/repliesMore/:repliesMore)(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterByCustomer',
  3779.                     'priority/:priority(/type/:type)(/group/:group)(/team/:team)(/tag/:tag)(/mailbox/:mailbox)(/source/:source)(/after/:after)(/before/:before)(/repliesLess/:repliesLess)(/repliesMore/:repliesMore)(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterByPriority',
  3780.                     'type/:type(/group/:group)(/team/:team)(/tag/:tag)(/mailbox/:mailbox)(/source/:source)(/after/:after)(/before/:before)(/repliesLess/:repliesLess)(/repliesMore/:repliesMore)(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterByType',
  3781.                     'group/:group(/team/:team)(/tag/:tag)(/mailbox/:mailbox)(/source/:source)(/after/:after)(/before/:before)(/repliesLess/:repliesLess)(/repliesMore/:repliesMore)(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterByGroup',
  3782.                     'team/:team(/tag/:tag)(/mailbox/:mailbox)(/source/:source)(/after/:after)(/before/:before)(/repliesLess/:repliesLess)(/repliesMore/:repliesMore)(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterBySubGroup',
  3783.                     'tag/:tag(/mailbox/:mailbox)(/source/:source)(/after/:after)(/before/:before)(/repliesLess/:repliesLess)(/repliesMore/:repliesMore)(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterByTags',
  3784.                     'mailbox/:mailbox(/source/:source)(/after/:after)(/before/:before)(/repliesLess/:repliesLess)(/repliesMore/:repliesMore)(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterByMailbox',
  3785.                     'source/:source(/after/:after)(/before/:before)(/repliesLess/:repliesLess)(/repliesMore/:repliesMore)(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterBySource',
  3786.                     'after/:after(/before/:before)(/repliesLess/:repliesLess)(/repliesMore/:repliesMore)(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterByAfter',
  3787.                     'before/:before(/repliesLess/:repliesLess)(/repliesMore/:repliesMore)(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterByBefore',
  3788.                     'repliesLess/:repliesLess(/repliesMore/:repliesMore)(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterByRepliesLesserCount',
  3789.                     'repliesMore/:repliesMore(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterByRepliesGreaterCount',
  3790.                     'custom/:custom(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterByCustom',
  3791.                     'label/:labelId(/status/:status)(/search/:query)(/agent/:agent)(/customer/:customer)(/priority/:priority)(/type/:type)(/group/:group)(/team/:team)(/tag/:tag)(/mailbox/:mailbox)(/source/:source)(/after/:after)(/before/:before)(/repliesLess/:repliesLess)(/repliesMore/:repliesMore)(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterByLabel',
  3792.                     'new(/status/:status)(/search/:query)(/agent/:agent)(/customer/:customer)(/priority/:priority)(/type/:type)(/group/:group)(/team/:team)(/tag/:tag)(/mailbox/:mailbox)(/source/:source)(/after/:after)(/before/:before)(/repliesLess/:repliesLess)(/repliesMore/:repliesMore)(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterNew',
  3793.                     'unassigned(/status/:status)(/search/:query)(/agent/:agent)(/customer/:customer)(/priority/:priority)(/type/:type)(/group/:group)(/team/:team)(/tag/:tag)(/mailbox/:mailbox)(/source/:source)(/after/:after)(/before/:before)(/repliesLess/:repliesLess)(/repliesMore/:repliesMore)(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterUnassigned',
  3794.                     'notreplied(/status/:status)(/search/:query)(/agent/:agent)(/customer/:customer)(/priority/:priority)(/type/:type)(/group/:group)(/team/:team)(/tag/:tag)(/mailbox/:mailbox)(/source/:source)(/after/:after)(/before/:before)(/repliesLess/:repliesLess)(/repliesMore/:repliesMore)(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterNotReplied',
  3795.                     'mine(/status/:status)(/search/:query)(/agent/:agent)(/customer/:customer)(/priority/:priority)(/type/:type)(/group/:group)(/team/:team)(/tag/:tag)(/mailbox/:mailbox)(/source/:source)(/after/:after)(/before/:before)(/repliesLess/:repliesLess)(/repliesMore/:repliesMore)(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterMine',
  3796.                     'starred(/status/:status)(/search/:query)(/agent/:agent)(/customer/:customer)(/priority/:priority)(/type/:type)(/group/:group)(/team/:team)(/tag/:tag)(/mailbox/:mailbox)(/source/:source)(/after/:after)(/before/:before)(/repliesLess/:repliesLess)(/repliesMore/:repliesMore)(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterstarred',
  3797.                     'trashed(/status/:status)(/search/:query)(/agent/:agent)(/customer/:customer)(/priority/:priority)(/type/:type)(/group/:group)(/team/:team)(/tag/:tag)(/mailbox/:mailbox)(/source/:source)(/after/:after)(/before/:before)(/repliesLess/:repliesLess)(/repliesMore/:repliesMore)(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterTrashed',
  3798.                     '': 'initializeList'
  3799.                 },
  3800.                 initializeList : function() {
  3801.                     \$(\"#saved-filter\").val('');
  3802.                     this.resetParams('', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '');
  3803.                     this.fetch(null, null, null);
  3804.                 },
  3805.                 paginate : function(number,sortField,order) {
  3806.                     this.resetParams('','','','','','','','','','','','','','','','','','','','','', '');
  3807.                     this.fetch(number,sortField,order);
  3808.                 },
  3809.                 filterByLabel : function(labelId,status,query,agent,customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom,number,sortField,order) {
  3810.                     this.resetParams(labelId,'','','','','','',status,query,agent,customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom);
  3811.                     this.fetch(number,sortField,order);
  3812.                 },
  3813.                 filterNew : function(status,query,agent,customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom,number,sortField,order) {
  3814.                     this.resetParams('',1,'','','','','',status,query,agent,customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom);
  3815.                     this.fetch(number,sortField,order);
  3816.                 },
  3817.                 filterUnassigned : function(status,query,agent,customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom,number,sortField,order) {
  3818.                     this.resetParams('','',1,'','','','',status,query,agent,customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom);
  3819.                     this.fetch(number,sortField,order);
  3820.                 },
  3821.                 filterNotReplied: function(status,query,agent,customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom,number,sortField,order) {
  3822.                     this.resetParams('','','',1,'','','',status,query,agent,customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom);
  3823.                     this.fetch(number,sortField,order);
  3824.                 },
  3825.                 filterMine : function(status,query,agent,customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom,number,sortField,order) {
  3826.                     this.resetParams('','','','',1,'','',status,query,agent,customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom);
  3827.                     this.fetch(number,sortField,order);
  3828.                 },
  3829.                 filterstarred : function(status,query,agent,customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom,number,sortField,order) {
  3830.                     this.resetParams('','','','','',1,'',status,query,agent,customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom);
  3831.                     this.fetch(number,sortField,order);
  3832.                 },
  3833.                 filterTrashed : function(status,query,agent,customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom,number,sortField,order) {
  3834.                     this.resetParams('','','','','','',1,status,query,agent,customer,priority,type,group,team,tag,mailbox,source,custom);
  3835.                     this.fetch(number,sortField,order);
  3836.                 },
  3837.                 filterByStatus : function(status,query,agent,customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom,number,sortField,order) {
  3838.                     this.resetParams('','','','','','','',status,query,agent,customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom);
  3839.                     this.fetch(number,sortField,order);
  3840.                 },
  3841.                 filterByQuery : function(query,agent,customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom,number,sortField,order) {
  3842.                     this.resetParams('','','','','','','','',query,agent,customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom);
  3843.                     this.fetch(number,sortField,order);
  3844.                 },
  3845.                 filterByAgent : function(agent,customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom,number,sortField,order) {
  3846.                     this.resetParams('','','','','','','','','',agent,customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom);
  3847.                     this.fetch(number,sortField,order);
  3848.                 },
  3849.                 filterByCustomer : function(customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom,number,sortField,order) {
  3850.                     this.resetParams('','','','','','','','','','',customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom);
  3851.                     this.fetch(number,sortField,order);
  3852.                 },
  3853.                 filterByPriority : function(priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom,number,sortField,order) {
  3854.                     this.resetParams('','','','','','','','','','','',priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom);
  3855.                     this.fetch(number,sortField,order);
  3856.                 },
  3857.                 filterByType : function(type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom,number,sortField,order) {
  3858.                     this.resetParams('','','','','','','','','','','','',type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom);
  3859.                     this.fetch(number,sortField,order);
  3860.                 },
  3861.                 filterByGroup : function(group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom,number,sortField,order) {
  3862.                     this.resetParams('','','','','','','','','','','','','',group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom);
  3863.                     this.fetch(number,sortField,order);
  3864.                 },
  3865.                 filterBySubGroup : function(team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom,number,sortField,order) {
  3866.                     this.resetParams('','','','','','','','','','','','','','',team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom);
  3867.                     this.fetch(number,sortField,order);
  3868.                 },
  3869.                 filterByTags : function(tag,mailbox,source,after,before,repliesLess,repliesMore,custom,number,sortField,order) {
  3870.                     this.resetParams('','','','','','','','','','','','','','','',tag,mailbox,source,after,before,repliesLess,repliesMore,custom);
  3871.                     this.fetch(number,sortField,order);
  3872.                 },
  3873.                 filterByMailbox : function(mailbox,source,after,before,repliesLess,repliesMore,custom,number,sortField,order) {
  3874.                     this.resetParams('','','','','','','','','','','','','','','','',mailbox,source,after,before,repliesLess,repliesMore,custom);
  3875.                     this.fetch(number,sortField,order);
  3876.                 },
  3877.                 filterBySource: function(source,after,before,repliesLess,repliesMore,custom,number,sortField,order) {
  3878.                     this.resetParams('','','','','','','','','','','','','','','','','',source,after,before,repliesLess,repliesMore,custom);
  3879.                     this.fetch(number,sortField,order);
  3880.                 },
  3881.                 filterByAfter: function(after,before,repliesLess,repliesMore,custom,number,sortField,order) {
  3882.                     this.resetParams('','','','','','','','','','','','','','','','','','',after,before,repliesLess,repliesMore,custom);
  3883.                     this.fetch(number,sortField,order);
  3884.                 },
  3885.                 filterByBefore: function(before,repliesLess,repliesMore,custom,number,sortField,order) {
  3886.                     this.resetParams('','','','','','','','','','','','','','','','','','','',before,repliesLess,repliesMore,custom);
  3887.                     this.fetch(number,sortField,order);
  3888.                 },
  3889.                 filterByRepliesLesserCount: function(repliesLess, repliesMore, custom, number, sortField, order) {
  3890.                     this.resetParams('','','','','','','','','','','','','','','','','','','','',repliesLess,repliesMore,custom);
  3891.                     this.fetch(number,sortField,order);
  3892.                 },
  3893.                 filterByRepliesGreaterCount: function(repliesMore, custom, number, sortField, order) {
  3894.                     this.resetParams('','','','','','','','','','','','','','','','','','','','','',repliesMore,custom);
  3895.                     this.fetch(number,sortField,order);
  3896.                 },
  3897.                 filterByCustom : function(custom, number, sortField, order) {
  3898.                     this.resetParams('','','','','','','','','','','','','','','','','','','','','','',custom);
  3899.                     this.fetch(number,sortField,order);
  3900.                 },
  3901.                 fetch: function(number, sortField, order) {
  3902.                     ticketCollection.state.currentPage = number;
  3903.                     filter.sortCollection(sortField, order);
  3904.                     ticketCollection.syncData();
  3905.                 },
  3906.                 resetParams : function(labelId,newLabel,unassigned,notreplied,mine,starred,trashed,status,query,agent,customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom) {
  3907.                     _.each(userFilters, function(filter, index) {
  3908.                         if(Backbone.history.getFragment() == filter['route']) {
  3909.                             \$(\"#saved-filter\").val(index);
  3910.                         }
  3911.                     });
  3912.                     isPageJustLoaded = false;
  3913.                     if(query != null)
  3914.                         query = query.replace(/\\+/g,' ');
  3915.                     bulkAction.hideBulkOptions();
  3916.                     ticketCollection.filterParameters.label = labelId;
  3917.                     ticketCollection.filterParameters.new = newLabel;
  3918.                     ticketCollection.filterParameters.unassigned = unassigned;
  3919.                     ticketCollection.filterParameters.notreplied = notreplied;
  3920.                     ticketCollection.filterParameters.mine = mine;
  3921.                     ticketCollection.filterParameters.starred = starred;
  3922.                     ticketCollection.filterParameters.trashed = trashed;
  3923.                     ticketCollection.filterParameters.search = query;
  3924.                     \$(\".uv-search-inline\").val(query);
  3925.                     ticketCollection.filterParameters.status = status;
  3926.                     ticketCollection.filterParameters.agent = agent;
  3927.                     ticketCollection.filterParameters.customer = customer;
  3928.                     ticketCollection.filterParameters.priority = priority;
  3929.                     ticketCollection.filterParameters.type = type;
  3930.                     ticketCollection.filterParameters.group = group;
  3931.                     ticketCollection.filterParameters.team = team;
  3932.                     ticketCollection.filterParameters.tag = tag;
  3933.                     ticketCollection.filterParameters.mailbox = mailbox;
  3934.                     ticketCollection.filterParameters.source = source;
  3935.                     ticketCollection.filterParameters.after = after;
  3936.                     ticketCollection.filterParameters.before = before;
  3937.                     ticketCollection.filterParameters.repliesLess = repliesLess;
  3938.                     ticketCollection.filterParameters.repliesMore = repliesMore;
  3939.                     ticketCollection.filterParameters.custom = custom;
  3940.                     \$('.custom-fields').find('input[type=\"text\"]').val('');
  3941.                     \$('.custom-fields').find('select').val('');
  3942.                     \$('.custom-fields').find('input[type=\"radio\"]').prop('checked', false);
  3943.                     \$('.custom-fields').find('input[type=\"checkbox\"]').prop('checked', false);
  3944.                     if(custom) {
  3945.                         custom = custom.replace(/\\+/g,' ');
  3946.                         var indexValueSeperator = '_';
  3947.                         var columnSeperator = '|';
  3948.                         var multiOptions = custom.split(columnSeperator);
  3949.                         var multiKeyValue, multiKeyValueValue, ele;
  3950.                         _.each(multiOptions, function(valueData, indexData) {
  3951.                             if(!valueData)
  3952.                                 return;
  3953.                             multiKeyValue = valueData.split(indexValueSeperator);
  3954.                             multiKeyValueValue = multiKeyValue[1].split(',');
  3955.                             ele = \$('[data-value=\"' + multiKeyValue[0] + '\"]');
  3956.                             if(ele[0].type == 'radio') {
  3957.                                 \$('[data-value=\"' + multiKeyValue[0] + '\"][value=\"' + multiKeyValue[1] + '\"]').prop('checked', true);
  3958.                             } else if(ele[0].type == 'checkbox') {
  3959.                                 _.each(ele, function(eleElements) {
  3960.                                     if(multiKeyValueValue.indexOf(eleElements.value) > -1) {
  3961.                                         \$(eleElements).prop('checked', true);
  3962.                                     }
  3963.                                 });
  3964.                             } else if(ele[0].type == 'select-multiple') {
  3965.                                 ele.val(multiKeyValueValue);
  3966.                             } else if(ele[0].type == 'text') {
  3967.                                 ele.val(multiKeyValue[1]);
  3968.                             }
  3969.                         })
  3970.                     }
  3971.                     if(trashed) {
  3972.                         \$('.property-block').hide();
  3973.                         \$('.trashed-block').show();
  3974.                     } else {
  3975.                         \$('.property-block').show();
  3976.                         \$('.trashed-block').hide();
  3977.                     }
  3978.                     sideFilter.isRecurrsiveCalls = 0;
  3979.                     sideFilter.render();
  3980.                 }
  3981.             });
  3982.             var router = new Router();
  3983.             var pageview = new PageView;
  3984.             var bulkAction = new BulkActionView();
  3985.             var sideFilterModel = new SideFilterModel(filterContext)
  3986.             var sideFilter = new SideFilter();
  3987.             var ticketCollection = new TicketCollection();
  3988.             var ticketQuickViewCollection = new TicketQuickViewCollection();
  3989.             var labelCollection = new LabelCollection();
  3990.             var labelListView = new LabelListView()
  3991.             var filter = new Filter({collection : ticketCollection});
  3992.             Backbone.history.start({
  3993.                 push_state:true
  3994.             });
  3995.         });
  3996.     </script>
  3997. ";
  3998.         
  3999.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  4000.         
  4001.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  4002.     }
  4003.     public function getTemplateName()
  4004.     {
  4005.         return "@UVDeskCoreFramework/ticketList.html.twig";
  4006.     }
  4007.     public function isTraitable()
  4008.     {
  4009.         return false;
  4010.     }
  4011.     public function getDebugInfo()
  4012.     {
  4013.         return array (  3935 => 2747,  3807 => 2622,  3770 => 2588,  3707 => 2528,  3635 => 2459,  3578 => 2405,  3499 => 2329,  3489 => 2322,  3414 => 2250,  3404 => 2243,  3394 => 2236,  3220 => 2065,  3189 => 2037,  3173 => 2026,  3163 => 2019,  3153 => 2012,  3145 => 2007,  3110 => 1975,  3105 => 1973,  3099 => 1970,  2998 => 1872,  2988 => 1865,  2979 => 1859,  2972 => 1855,  2967 => 1853,  2949 => 1838,  2939 => 1831,  2934 => 1829,  2927 => 1825,  2922 => 1823,  2774 => 1680,  2770 => 1679,  2701 => 1613,  2628 => 1543,  2589 => 1507,  2552 => 1473,  2537 => 1461,  2513 => 1440,  2509 => 1439,  2497 => 1430,  2490 => 1426,  2485 => 1424,  2478 => 1420,  2470 => 1415,  2463 => 1411,  2455 => 1406,  2448 => 1402,  2440 => 1397,  2433 => 1393,  2425 => 1388,  2419 => 1385,  2410 => 1379,  2402 => 1374,  2394 => 1369,  2386 => 1364,  2378 => 1359,  2370 => 1354,  2332 => 1318,  2311 => 1301,  2297 => 1290,  2278 => 1274,  2272 => 1271,  2263 => 1265,  2258 => 1263,  2252 => 1260,  2243 => 1254,  2221 => 1237,  2207 => 1226,  2188 => 1210,  2182 => 1207,  2173 => 1201,  2168 => 1199,  2162 => 1196,  2153 => 1190,  2133 => 1173,  2125 => 1168,  2118 => 1164,  2107 => 1156,  2097 => 1149,  2086 => 1141,  2076 => 1134,  2051 => 1111,  2043 => 1105,  2037 => 1102,  2032 => 1100,  2022 => 1093,  1998 => 1072,  1983 => 1060,  1976 => 1056,  1968 => 1051,  1963 => 1049,  1954 => 1042,  1946 => 1036,  1938 => 1031,  1933 => 1029,  1919 => 1018,  1909 => 1011,  1900 => 1005,  1893 => 1001,  1888 => 999,  1882 => 995,  1876 => 991,  1867 => 984,  1856 => 975,  1845 => 967,  1834 => 959,  1823 => 951,  1812 => 943,  1801 => 935,  1792 => 929,  1787 => 926,  1782 => 922,  1768 => 914,  1762 => 911,  1752 => 910,  1749 => 909,  1745 => 908,  1741 => 906,  1732 => 898,  1730 => 897,  1720 => 889,  1718 => 888,  1708 => 880,  1706 => 879,  1696 => 871,  1694 => 870,  1684 => 862,  1682 => 861,  1677 => 858,  1671 => 855,  1661 => 854,  1646 => 848,  1640 => 844,  1633 => 840,  1621 => 830,  1611 => 823,  1601 => 816,  1591 => 809,  1581 => 801,  1579 => 800,  1574 => 798,  1571 => 797,  1562 => 794,  1557 => 793,  1554 => 792,  1549 => 791,  1547 => 790,  1542 => 788,  1534 => 783,  1525 => 776,  1523 => 775,  1518 => 773,  1515 => 772,  1506 => 769,  1501 => 768,  1498 => 767,  1493 => 766,  1491 => 765,  1486 => 763,  1478 => 758,  1466 => 749,  1460 => 746,  1454 => 743,  1446 => 738,  1436 => 730,  1434 => 729,  1429 => 727,  1426 => 726,  1417 => 723,  1412 => 722,  1409 => 721,  1404 => 720,  1402 => 719,  1397 => 717,  1389 => 712,  1379 => 704,  1377 => 703,  1372 => 701,  1369 => 700,  1360 => 697,  1355 => 696,  1352 => 695,  1347 => 694,  1345 => 693,  1340 => 691,  1332 => 686,  1322 => 678,  1320 => 677,  1315 => 675,  1312 => 674,  1303 => 671,  1298 => 670,  1295 => 669,  1290 => 668,  1288 => 667,  1283 => 665,  1275 => 660,  1265 => 652,  1263 => 651,  1258 => 649,  1255 => 648,  1246 => 645,  1241 => 644,  1238 => 643,  1233 => 642,  1231 => 641,  1226 => 639,  1218 => 634,  1206 => 625,  1200 => 622,  1193 => 618,  1185 => 613,  1176 => 606,  1174 => 605,  1169 => 603,  1166 => 602,  1156 => 599,  1150 => 597,  1143 => 595,  1141 => 594,  1136 => 593,  1133 => 592,  1128 => 591,  1126 => 590,  1120 => 587,  1112 => 582,  1109 => 581,  1107 => 580,  1105 => 579,  1096 => 574,  1084 => 571,  1081 => 570,  1078 => 569,  1075 => 568,  1073 => 567,  1070 => 566,  1066 => 565,  1063 => 564,  1057 => 562,  1054 => 561,  1043 => 559,  1039 => 558,  1036 => 557,  1033 => 556,  1031 => 555,  1024 => 551,  1021 => 550,  1014 => 544,  1011 => 542,  1002 => 535,  998 => 534,  994 => 532,  991 => 530,  977 => 518,  973 => 517,  969 => 516,  965 => 515,  961 => 514,  957 => 513,  953 => 512,  949 => 511,  945 => 510,  941 => 509,  937 => 508,  930 => 503,  922 => 497,  916 => 494,  912 => 492,  906 => 487,  900 => 485,  897 => 484,  894 => 482,  888 => 480,  885 => 479,  882 => 477,  878 => 474,  872 => 472,  869 => 471,  855 => 459,  849 => 456,  846 => 455,  843 => 453,  836 => 448,  825 => 446,  821 => 445,  815 => 442,  809 => 439,  806 => 438,  803 => 437,  800 => 435,  794 => 431,  783 => 429,  779 => 428,  771 => 423,  766 => 421,  760 => 418,  757 => 417,  754 => 416,  751 => 414,  744 => 409,  733 => 407,  729 => 406,  723 => 403,  717 => 400,  714 => 399,  711 => 398,  708 => 396,  702 => 392,  691 => 390,  687 => 389,  677 => 382,  671 => 379,  668 => 378,  665 => 377,  662 => 375,  656 => 371,  645 => 369,  641 => 368,  631 => 361,  625 => 358,  622 => 357,  619 => 356,  616 => 354,  610 => 350,  600 => 347,  594 => 345,  587 => 343,  585 => 342,  580 => 341,  576 => 340,  566 => 333,  560 => 330,  557 => 329,  554 => 328,  548 => 323,  536 => 313,  526 => 305,  520 => 301,  510 => 293,  504 => 289,  494 => 281,  488 => 277,  478 => 269,  472 => 265,  462 => 257,  456 => 253,  446 => 245,  440 => 241,  430 => 233,  424 => 229,  414 => 221,  408 => 217,  398 => 209,  392 => 205,  385 => 201,  382 => 200,  373 => 193,  364 => 189,  361 => 188,  357 => 185,  354 => 183,  345 => 175,  342 => 173,  337 => 170,  330 => 169,  320 => 161,  314 => 157,  307 => 152,  301 => 149,  295 => 146,  289 => 143,  283 => 140,  277 => 137,  269 => 132,  263 => 129,  257 => 126,  251 => 123,  245 => 120,  239 => 117,  235 => 115,  230 => 112,  226 => 110,  215 => 103,  208 => 99,  198 => 95,  191 => 89,  189 => 88,  179 => 87,  90 => 6,  80 => 5,  61 => 3,  38 => 1,);
  4014.     }
  4015.     public function getSourceContext()
  4016.     {
  4017.         return new Source("{% extends \"@UVDeskCoreFramework//Templates//layout.html.twig\" %}
  4018. {% block title %}{{ 'Tickets'|trans }}{% endblock %}
  4019. {% block templateCSS %}
  4020.     <style>
  4021.         .uv-dropdown.asset-visibility li input {
  4022.             z-index: 100;
  4023.         }
  4024.         .uv-dropdown.asset-visibility ul li label {
  4025.             color: #333333;
  4026.             font-size: 17px;
  4027.             font-weight: 500;
  4028.             text-transform: capitalize;
  4029.             cursor: pointer;
  4030.             margin: auto;
  4031.         }
  4032.         .uv-table td a {
  4033.             color: #333333;
  4034.         }
  4035.         .uv-table.uv-list-view table tbody td.uv-width-100 {
  4036.             width: 100px !important;
  4037.         }
  4038.         .uv-table.uv-list-view td[data-index=\"agent\"] {
  4039.             white-space: nowrap;
  4040.         }
  4041.         .uv-view:not(.uv-stack-view) .uv-table td a {
  4042.             display: inline-block;
  4043.             width: 100%;
  4044.         }
  4045.         .uv-action-bar-col-lt.uv-width-100 {
  4046.             width: 100% !important;
  4047.         }
  4048.         #quick-view-modal .uv-view {
  4049.             padding: 0;
  4050.             overflow-y: visible;
  4051.             display: inline-block;
  4052.             position: relative;
  4053.         }
  4054.         #quick-view-modal .uv-view .uv-ticket-section {
  4055.             margin-top: 0;
  4056.         }
  4057.         #quick-view-modal .uv-ticket-head {
  4058.             border-top: 1px solid #d3d3d3;
  4059.             padding-top: 10px;
  4060.             padding-bottom: 10px;
  4061.         }
  4062.         #quick-view-modal .uv-ticket-strip {
  4063.             padding-bottom: 0;
  4064.         }
  4065.         #quick-view-modal .uv-ticket-strip .uv-btn-tag {
  4066.             margin-bottom: 0;
  4067.         }
  4068.         #quick-view-modal .quick-view-navigation {
  4069.             position: absolute;
  4070.             right: 50px;
  4071.             top: 9px;
  4072.         }
  4073.         #quick-view-modal .quick-view-navigation ~ a {
  4074.             width: calc(100% - 100px);
  4075.             display: inline-block;
  4076.         }
  4077.         #quick-view-modal .uv-btn-tag[disabled=\"disabled\"] {
  4078.             opacity: .4;
  4079.             cursor: not-allowed;
  4080.             border-color: #B1B1AE !important;
  4081.         }
  4082.         #quick-view-modal .uv-loader {
  4083.             transform: scale(0.5);
  4084.             top: 14px;
  4085.             right: 60px;
  4086.         }
  4087.         tr.unread {
  4088.             background: #f1f1f1;
  4089.         }
  4090.         .uv-table table tbody tr.not-assigned td {
  4091.             border-bottom: 1px solid #ffcacc;
  4092.         }
  4093.         @media screen and (max-width: 500px) {
  4094.             .uv-action-bar label {
  4095.                 display: inline-block;
  4096.             }
  4097.         }
  4098.     </style>
  4099. {% endblock %}
  4100. {% block pageContent %}
  4101.     {# Quick View Popup #}
  4102.     <div class=\"uv-pop-up-overlay\" id=\"quick-view-modal\">
  4103.         <div class=\"uv-pop-up-box uv-pop-up-wide\"></div>
  4104.     </div>
  4105.     <div class=\"uv-inner-section\">
  4106.         {# Ticket Sidebar #}
  4107.         <div class=\"uv-aside\" {% if app.request.cookies and app.request.cookies.get('uv-asideView') %} style=\"display: none;\" {% endif %} >
  4108.             <div class=\"uv-aside-default\">
  4109.                 <div class=\"uv-aside-head\">
  4110.                     <div class=\"uv-aside-title\">
  4111.                         <h6>{{ 'Tickets'|trans }}</h6>
  4112.                     </div>
  4113.                     <div class=\"uv-aside-back\">
  4114.                         <span onclick=\"history.length > 1 ? history.go(-1) : window.location = '{{ path(\"helpdesk_member_dashboard\") }}';\">{{ 'Back'|trans }}</span>
  4115.                     </div>
  4116.                 </div>
  4117.                 <div class=\"uv-aside-nav\">
  4118.                     <ul>
  4119.                         {# Predefined Label List #}
  4120.                         <ul class=\"predefined-label-list uv-aside-list\">
  4121.                             <li>
  4122.                                 <a href=\"#\" class=\"uv-aside-active\">{{ 'All'|trans }} <span class=\"uv-flag-gray uv-flag-dark\">0</span></a>
  4123.                                 {# Status ticket count list #}
  4124.                                 <ul class=\"status-list\">
  4125.                                     <li>
  4126.                                         <a href=\"#\" data-id=\"1\" class=\"uv-aside-nav-active\"><span class=\"name\">{{ 'Open'|trans }}</span><span class=\"uv-flag-gray\">0</span></a>
  4127.                                     </li>
  4128.                                     <li>
  4129.                                         <a href=\"#\" data-id=\"2\"><span class=\"name\">{{ 'Pending'|trans }}</span><span class=\"uv-flag-gray\">0</span></a>
  4130.                                     </li>
  4131.                                     <li>
  4132.                                         <a href=\"#\" data-id=\"6\"><span class=\"name\">{{ 'Answered'|trans }}</span><span class=\"uv-flag-gray\">0</span></a>
  4133.                                     </li>
  4134.                                     <li>
  4135.                                         <a href=\"#\" data-id=\"3\"><span class=\"name\">{{ 'Resolved'|trans }}</span><span class=\"uv-flag-gray\">0</span></a>
  4136.                                     </li>
  4137.                                     <li>
  4138.                                         <a href=\"#\" data-id=\"4\"><span class=\"name\">{{ 'Closed'|trans }}</span><span class=\"uv-flag-gray\">0</span></a>
  4139.                                     </li>
  4140.                                     <li>
  4141.                                         <a href=\"#\" data-id=\"5\"><span class=\"name\">{{ 'Spam'|trans }}</span><span class=\"uv-flag-gray\">0</span></a>
  4142.                                     </li>
  4143.                                 </ul>
  4144.                             </li>
  4145.                             <li>
  4146.                                 <a href=\"#new\">{{ 'New'|trans }} <span class=\"uv-flag-gray uv-flag-dark\">0</span></a>
  4147.                             </li>
  4148.                             <li>
  4149.                                 <a href=\"#unassigned\">{{ 'UnAssigned'|trans }} <span class=\"uv-flag-gray uv-flag-dark\">0</span></a>
  4150.                             </li>
  4151.                             <li>
  4152.                                 <a href=\"#notreplied\">{{ 'UnAnswered'|trans }} <span class=\"uv-flag-gray uv-flag-dark\">0</span></a>
  4153.                             </li>
  4154.                             <li>
  4155.                                 <a href=\"#mine\">{{ 'My Tickets'|trans }} <span class=\"uv-flag-gray uv-flag-dark\">0</span></a>
  4156.                             </li>
  4157.                             <li>
  4158.                                 <a href=\"#starred\">{{ 'Starred'|trans }} <span class=\"uv-flag-gray uv-flag-dark\">0</span></a>
  4159.                             </li>
  4160.                             <li>
  4161.                                 <a href=\"#trashed\" style=\"border-bottom: none\">{{ 'Trashed'|trans }} <span class=\"uv-flag-gray uv-flag-dark\">0</span></a>
  4162.                             </li>
  4163.                         </ul>
  4164.                         {# Custom Label List #}
  4165.                         <ul class=\"uv-aside-custom\"></ul>
  4166.                     </ul>
  4167.                 </div>
  4168.                 <a class=\"uv-btn-small add-new-label\" href=\"#\"><span class=\"uv-icon-add\"></span> {{ 'Label'|trans }}</a>
  4169.             </div>
  4170.             <!-- Label add and edit -->
  4171.             <div class=\"uv-add-edit-label\" style=\"display: block\"></div>
  4172.         </div>
  4173.         {# Ticket List #}
  4174.         <div class=\"uv-view {% if app.request.cookies and app.request.cookies.get('uv-asideView') %} uv-aside-view {% endif %}\">
  4175.             <h1>{{ 'Tickets'|trans }}</h1>
  4176.             {# Action Bar #}
  4177.             <div class=\"uv-action-bar\">
  4178.                 {# Select all checkbox #}
  4179.                 <div class=\"uv-action-select-wrapper\">
  4180.                     <label class=\"uv-vertical-align uv-margin-left-27\">
  4181.                         <div class=\"uv-checkbox\">
  4182.                             <input type=\"checkbox\" class=\"select-all-checkbox\"><span class=\"uv-checkbox-view\"></span>
  4183.                         </div>
  4184.                     </label>
  4185.                 </div>
  4186.                 {# Filter Options #}
  4187.                 <div class=\"uv-action-col-wrapper\">
  4188.                     {# Ticket Sort | Asset Visibility #}
  4189.                     <div class=\"uv-action-bar-col-lt\">
  4190.                         <div class=\"filter\">
  4191.                             {# Sort By #}
  4192.                             <div class=\"uv-dropdown sort\">
  4193.                                 <div class=\"uv-dropdown-btn uv-vertical-align uv-margin-right-5\">{{ 'Sort By:'|trans }} {{ 'Last Replied'|trans }}</div>
  4194.                                 <div class=\"uv-dropdown-list uv-bottom-left\">
  4195.                                     <div class=\"uv-dropdown-container\">
  4196.                                         <label>{{ 'Sort By'|trans }}</label>
  4197.                                         <ul></ul>
  4198.                                     </div>
  4199.                                 </div>
  4200.                             </div>
  4201.                             {# Assets Visibilities #}
  4202.                             <div class=\"uv-dropdown asset-visibility\">
  4203.                                 <div class=\"uv-dropdown-btn uv-vertical-align uv-margin-right-5\">{{ 'Assets Visibility'|trans }}</div>
  4204.                                 <div class=\"uv-dropdown-list uv-bottom-left\" style=\"width: 215px;\">
  4205.                                     <div class=\"uv-dropdown-container\">
  4206.                                         <label>{{ 'Assets Visibility'|trans }}</label>
  4207.                                         <ul>
  4208.                                             {# Ticket Source #}
  4209.                                             <li class=\"uv-dropdown-checkbox\">
  4210.                                                 <label>
  4211.                                                     <div class=\"uv-checkbox\">
  4212.                                                         <input type=\"checkbox\" id=\"source\" name=\"assetVisibility[]\" value=\"source\" checked>
  4213.                                                         <span class=\"uv-checkbox-view uv-checkbox-dwn\"></span>
  4214.                                                     </div>
  4215.                                                 </label>
  4216.                                                 <label for=\"source\">{{ 'Channel/Source'|trans }}</label>
  4217.                                             </li>
  4218.                                             {# Ticket Customer Name #}
  4219.                                             <li class=\"uv-dropdown-checkbox\">
  4220.                                                 <label>
  4221.                                                     <div class=\"uv-checkbox\">
  4222.                                                         <input type=\"checkbox\" id=\"customer-name\" name=\"assetVisibility[]\" value=\"customer-name\" checked>
  4223.                                                         <span class=\"uv-checkbox-view uv-checkbox-dwn\"></span>
  4224.                                                     </div>
  4225.                                                 </label>
  4226.                                                 <label for=\"customer-name\">{{ 'Customer Name'|trans }}</label>
  4227.                                             </li>
  4228.                                             {# Ticket Customer Email #}
  4229.                                             <li class=\"uv-dropdown-checkbox\">
  4230.                                                 <label>
  4231.                                                     <div class=\"uv-checkbox\">
  4232.                                                         <input type=\"checkbox\" id=\"customer-email\" name=\"assetVisibility[]\" value=\"customer-email\" checked>
  4233.                                                         <span class=\"uv-checkbox-view uv-checkbox-dwn\"></span>
  4234.                                                     </div>
  4235.                                                 </label>
  4236.                                                 <label for=\"customer-email\">{{ 'Customer Email'|trans }}</label>
  4237.                                             </li>
  4238.                                             {# Ticket Timestamp #}
  4239.                                             <li class=\"uv-dropdown-checkbox\">
  4240.                                                 <label>
  4241.                                                     <div class=\"uv-checkbox\">
  4242.                                                         <input type=\"checkbox\" id=\"timestamp\" name=\"assetVisibility[]\" value=\"timestamp\" checked>
  4243.                                                         <span class=\"uv-checkbox-view uv-checkbox-dwn\"></span>
  4244.                                                     </div>
  4245.                                                 </label>
  4246.                                                 <label for=\"timestamp\">{{ 'Timestamp'|trans }}</label>
  4247.                                             </li>
  4248.                                             {# Ticket Group #}
  4249.                                             <li class=\"uv-dropdown-checkbox\">
  4250.                                                 <label>
  4251.                                                     <div class=\"uv-checkbox\">
  4252.                                                         <input type=\"checkbox\" id=\"group\" name=\"assetVisibility[]\" value=\"group\" checked>
  4253.                                                         <span class=\"uv-checkbox-view uv-checkbox-dwn\"></span>
  4254.                                                     </div>
  4255.                                                 </label>
  4256.                                                 <label for=\"group\">{{ 'Group'|trans }}</label>
  4257.                                             </li>
  4258.                                             {# Ticket Team #}
  4259.                                             <li class=\"uv-dropdown-checkbox\">
  4260.                                                 <label>
  4261.                                                     <div class=\"uv-checkbox\">
  4262.                                                         <input type=\"checkbox\" id=\"team\" name=\"assetVisibility[]\" value=\"team\" checked>
  4263.                                                         <span class=\"uv-checkbox-view uv-checkbox-dwn\"></span>
  4264.                                                     </div>
  4265.                                                 </label>
  4266.                                                 <label for=\"team\">{{ 'Team'|trans }}</label>
  4267.                                             </li>
  4268.                                             {# Ticket Type #}
  4269.                                             <li class=\"uv-dropdown-checkbox\">
  4270.                                                 <label>
  4271.                                                     <div class=\"uv-checkbox\">
  4272.                                                         <input type=\"checkbox\" id=\"type1\" name=\"assetVisibility[]\" value=\"type1\" checked>
  4273.                                                         <span class=\"uv-checkbox-view uv-checkbox-dwn\"></span>
  4274.                                                     </div>
  4275.                                                 </label>
  4276.                                                 <label for=\"type1\">{{ 'Type'|trans }}</label>
  4277.                                             </li>
  4278.                                             {# Ticket Replies #}
  4279.                                             <li class=\"uv-dropdown-checkbox\">
  4280.                                                 <label>
  4281.                                                     <div class=\"uv-checkbox\">
  4282.                                                         <input type=\"checkbox\" id=\"replies\" name=\"assetVisibility[]\" value=\"replies\" checked>
  4283.                                                         <span class=\"uv-checkbox-view uv-checkbox-dwn\"></span>
  4284.                                                     </div>
  4285.                                                 </label>
  4286.                                                 <label for=\"replies\">{{ 'Replies'|trans }}</label>
  4287.                                             </li>
  4288.                                             {# Ticket Agent #}
  4289.                                             <li class=\"uv-dropdown-checkbox\">
  4290.                                                 <label>
  4291.                                                     <div class=\"uv-checkbox\">
  4292.                                                         <input type=\"checkbox\" id=\"agent\" name=\"assetVisibility[]\" value=\"agent\" checked>
  4293.                                                         <span class=\"uv-checkbox-view uv-checkbox-dwn\"></span>
  4294.                                                     </div>
  4295.                                                 </label>
  4296.                                                 <label for=\"agent\">{{ 'Agent'|trans }}</label>
  4297.                                             </li>
  4298.                                         </ul>
  4299.                                     </div>
  4300.                                 </div>
  4301.                             </div>
  4302.                         </div>
  4303.                     </div>
  4304.                     {# Ticket Mass Action #}
  4305.                     <div class=\"uv-action-bar-col-lt\" style=\"display: none\">
  4306.                         <!-- Mass action -->
  4307.                         <div class=\"mass-action\">
  4308.                             <div class=\"property-block\">
  4309.                                 {# Update Assigned Support Agent #}
  4310.                                 {% if user_service.isAccessAuthorized('ROLE_AGENT_ASSIGN_TICKET') %}
  4311.                                     <div class=\"uv-dropdown\">
  4312.                                         <div class=\"uv-dropdown-btn uv-vertical-align uv-margin-right-5\">{{ 'Agent'|trans }}</div>
  4313.                                         <div class=\"uv-dropdown-list uv-bottom-left\">
  4314.                                             <div class=\"uv-dropdown-container\">
  4315.                                                 <label>{{ 'Agent'|trans }}</label>
  4316.                                                 <div class=\"uv-search-sm\">
  4317.                                                     <input type=\"text\" class=\"uv-search-field\" placeholder=\"Search\">
  4318.                                                 </div>
  4319.                                             </div>
  4320.                                             <ul class=\"uv-agents-list agent\" data-action=\"agent\">
  4321.                                                 {% for agent in user_service.getAgentPartialDataCollection() %}
  4322.                                                     <li data-index=\"{{ agent.id }}\">
  4323.                                                         {% if agent.smallThumbnail != null %}
  4324.                                                             <img src=\"{{ app.request.scheme ~'://' ~ app.request.httpHost ~ asset('') }}{{ agent.smallThumbnail }}\"/>
  4325.                                                         {% else %}
  4326.                                                             <img src=\"{{ asset(default_agent_image_path) }}\" alt=\"\"/>
  4327.                                                         {% endif %}
  4328.                                                         {{ agent.name }}
  4329.                                                     </li>
  4330.                                                 {% endfor %}
  4331.                                             </ul>
  4332.                                         </div>
  4333.                                     </div>
  4334.                                 {% endif %}
  4335.                                 {# Update Assigned Support Group #}
  4336.                                 {% if user_service.isAccessAuthorized('ROLE_AGENT_ASSIGN_TICKET_GROUP') %}
  4337.                                     <div class=\"uv-dropdown\">
  4338.                                         <div class=\"uv-dropdown-btn uv-vertical-align uv-margin-right-5\">{{ 'Group'|trans }}</div>
  4339.                                         <div class=\"uv-dropdown-list uv-bottom-left\">
  4340.                                             <div class=\"uv-dropdown-container\">
  4341.                                                 <label>{{ 'Group'|trans }}</label>
  4342.                                                 <div class=\"uv-search-sm\">
  4343.                                                     <input type=\"text\" class=\"uv-search-field\" placeholder=\"Search\">
  4344.                                                 </div>
  4345.                                             </div>
  4346.                                             <ul class=\"uv-search-list group\" data-action=\"group\">
  4347.                                                 {% for group in user_service.getSupportGroups() %}
  4348.                                                     <li data-index=\"{{ group.id }}\"><a href=\"#\">{{ group.name }}</a></li>
  4349.                                                 {% endfor %}
  4350.                                             </ul>
  4351.                                         </div>
  4352.                                     </div>
  4353.                                 {% endif %}
  4354.                                 {# Update Assigned Support Team #}
  4355.                                 {% if user_service.isAccessAuthorized('ROLE_AGENT_ASSIGN_TICKET_GROUP') %}
  4356.                                     <div class=\"uv-dropdown\">
  4357.                                         <div class=\"uv-dropdown-btn uv-vertical-align uv-margin-right-5\">{{ 'Team'|trans }}</div>
  4358.                                         <div class=\"uv-dropdown-list uv-bottom-left\">
  4359.                                             <div class=\"uv-dropdown-container\">
  4360.                                                 <label>{{ 'Team'|trans }}</label>
  4361.                                                 <div class=\"uv-search-sm\">
  4362.                                                     <input type=\"text\" class=\"uv-search-field\" placeholder=\"Search\">
  4363.                                                 </div>
  4364.                                             </div>
  4365.                                             <ul class=\"uv-search-list team\" data-action=\"team\">
  4366.                                                 {% for team in user_service.getSupportTeams() %}
  4367.                                                     <li data-index=\"{{ team.id }}\"><a href=\"#\">{{ team.name }}</a></li>
  4368.                                                 {% endfor %}
  4369.                                             </ul>
  4370.                                         </div>
  4371.                                     </div>
  4372.                                 {% endif %}
  4373.                                 {# Update Ticket Status #}
  4374.                                 {% if user_service.isAccessAuthorized('ROLE_AGENT_UPDATE_TICKET_STATUS') %}
  4375.                                     <div class=\"uv-dropdown\">
  4376.                                         <div class=\"uv-dropdown-btn uv-vertical-align uv-margin-right-5\">{{ 'Status'|trans }}</div>
  4377.                                         <div class=\"uv-dropdown-list uv-bottom-left\">
  4378.                                             <div class=\"uv-dropdown-container\">
  4379.                                                 <label>{{ 'Status'|trans }}</label>
  4380.                                                 <ul class=\"status\" data-action=\"status\">
  4381.                                                     {% for status in ticketStatusCollection %}
  4382.                                                         <li data-index=\"{{ status.id }}\"><a href=\"#\">{{ status.description|trans }}</a></li>
  4383.                                                     {% endfor %}
  4384.                                                 </ul>
  4385.                                             </div>
  4386.                                         </div>
  4387.                                     </div>
  4388.                                 {% endif %}
  4389.                                 {# Update Ticket Type #}
  4390.                                 {% if user_service.isAccessAuthorized('ROLE_AGENT_UPDATE_TICKET_TYPE') %}
  4391.                                     <div class=\"uv-dropdown\">
  4392.                                         <div class=\"uv-dropdown-btn uv-vertical-align uv-margin-right-5\">{{ 'Type'|trans }}</div>
  4393.                                         <div class=\"uv-dropdown-list uv-bottom-left\">
  4394.                                             <div class=\"uv-dropdown-container\">
  4395.                                                 <label>{{ 'Type'|trans }}</label>
  4396.                                                 <div class=\"uv-search-sm\">
  4397.                                                     <input type=\"text\" class=\"uv-search-field\" placeholder=\"{{ 'Search'|trans }}\">
  4398.                                                 </div>
  4399.                                             </div>
  4400.                                             <ul class=\"uv-search-list type\" data-action=\"type\">
  4401.                                                 {% for type in ticketTypeCollection %}
  4402.                                                     <li data-index=\"{{ type.id }}\"><a href=\"#\">{{ type.description }}</a></li>
  4403.                                                 {% endfor %}
  4404.                                             </ul>
  4405.                                         </div>
  4406.                                     </div>
  4407.                                 {% endif %}
  4408.                                 {# Update Priority #}
  4409.                                 {% if user_service.isAccessAuthorized('ROLE_AGENT_UPDATE_TICKET_PRIORITY') %}
  4410.                                     <div class=\"uv-dropdown\">
  4411.                                         <div class=\"uv-dropdown-btn uv-vertical-align uv-margin-right-5\">{{ 'Priority'|trans }}</div>
  4412.                                         <div class=\"uv-dropdown-list uv-bottom-left\">
  4413.                                             <div class=\"uv-dropdown-container\">
  4414.                                                 <label>{{ 'Priority'|trans }}</label>
  4415.                                                 <ul class=\"priority\" data-action=\"priority\">
  4416.                                                     {% for priority in ticketPriorityCollection %}
  4417.                                                         <li data-index=\"{{ priority.id }}\"><a href=\"#\">{{ priority.description|trans }}</a></li>
  4418.                                                     {% endfor %}
  4419.                                                 </ul>
  4420.                                             </div>
  4421.                                         </div>
  4422.                                     </div>
  4423.                                 {% endif %}
  4424.                                 {# Update Label #}
  4425.                                 <div class=\"uv-dropdown\">
  4426.                                     <div class=\"uv-dropdown-btn uv-vertical-align uv-margin-right-5\">{{ 'Label'|trans }}</div>
  4427.                                     <div class=\"uv-dropdown-list uv-bottom-left\">
  4428.                                         <div class=\"uv-dropdown-container\">
  4429.                                             <label>{{ 'Label'|trans }}</label>
  4430.                                             <div class=\"uv-search-sm\">
  4431.                                                 <input type=\"text\" class=\"uv-search-field\" placeholder=\"Search\">
  4432.                                             </div>
  4433.                                         </div>
  4434.                                         <ul class=\"uv-search-list label\" data-action=\"label\"></ul>
  4435.                                     </div>
  4436.                                 </div>
  4437.                                 {# Trashe Tickets #}
  4438.                                 {% if user_service.isAccessAuthorized('ROLE_AGENT_DELETE_TICKET') %}
  4439.                                     <a class=\"uv-btn-stroke uv-margin-right-5\" id=\"mass-delete\" data-action=\"trashed\" style=\"margin-left: 5px;\">{{ 'Delete'|trans }}</a>
  4440.                                 {% endif %}
  4441.                             </div>
  4442.                             {# For Trashed Tickets #}
  4443.                             <div class=\"trashed-block\" style=\"display: none\">
  4444.                                 {# Restore Tickets #}
  4445.                                 {% if user_service.isAccessAuthorized('ROLE_AGENT_RESTORE_TICKET') %}
  4446.                                     <a class=\"uv-btn-stroke uv-margin-right-5\" id=\"mass-restore\" data-action=\"restore\" style=\"margin-left: 5px;\">{{ 'Restore'|trans }}</a>
  4447.                                 {% endif %}
  4448.                                 {# Delete Tickets Forever #}
  4449.                                 {% if user_service.isAccessAuthorized('ROLE_AGENT_DELETE_TICKET') %}
  4450.                                     <a class=\"uv-btn-stroke uv-margin-right-5\" id=\"mass-delete-forever\" data-action=\"delete\" style=\"margin-left: 5px;\">{{ 'Delete Forever'|trans }}</a>
  4451.                                 {% endif %}
  4452.                             </div>
  4453.                         </div>
  4454.                     </div>
  4455.                     {# Ticket Search | Filter Extras #}
  4456.                     <div class=\"uv-action-bar-col-rt\">
  4457.                         <!-- Search Tickets -->
  4458.                         <input type=\"text\" class=\"uv-search-inline\" placeholder=\"{{ 'Search'|trans }}\">
  4459.                         <!-- Extra Filters -->
  4460.                         <div class=\"uv-btn-stroke uv-margin-left-15 filter-view-trigger\" data-target=\"uv-filter-view\"><span class=\"uv-icon-filter\"></span>{{ 'Filter View'|trans }}</div>
  4461.                     </div>
  4462.                 </div>
  4463.             </div>
  4464.             {# Ticket List #}
  4465.             <div class=\"uv-table uv-list-view\">
  4466.                 <table>
  4467.                     <thead>
  4468.                     <tr>
  4469.                         <th class=\"uv-width-140\"></th>
  4470.                         <th>{{ 'ID'|trans }}</th>
  4471.                         <th class=\"uv-min-width-300\">{{ 'Subject'|trans }}</th>
  4472.                         <th data-index=\"customer-name\">{{ 'Customer Name'|trans }}</th>
  4473.                         <th data-index=\"customer-email\">{{ 'Customer Email'|trans }}</th>
  4474.                         <th data-index=\"timestamp\">{{ 'Timestamp'|trans }}</th>
  4475.                         <th style =\"min-width:100px\" data-index=\"lastReply\">{{ \"Last Reply\"|trans }}</th>
  4476.                         <th data-index=\"group\">{{ 'Group'|trans }}</th>
  4477.                         <th data-index=\"team\">{{ 'Team'|trans }}</th>
  4478.                         <th data-index=\"type1\">{{ 'Type'|trans }}</th>
  4479.                         <th data-index=\"replies\">{{ 'Replies'|trans }}</th>
  4480.                         <th data-index=\"agent\">{{ 'Agent'|trans }}</th>
  4481.                     </tr>
  4482.                     </thead>
  4483.                     <tbody></tbody>
  4484.                 </table>
  4485.                 <div class=\"navigation\"></div>
  4486.             </div>
  4487.         </div>
  4488.         {# Extra Filters #}
  4489.         <div class=\"uv-filter-view\" id=\"uv-filter-view\">
  4490.             {# Filter Head #}
  4491.             <div class=\"uv-filter-head\">
  4492.                 <div class=\"uv-filter-title\">
  4493.                     <h6>{{ 'Tickets'|trans }}</h6>
  4494.                     <span>{{ 'Save set of filters as a preset to stay more productive'|trans }}</span>
  4495.                 </div>
  4496.                 <div class=\"uv-filter-toggle\" id=\"filter-close-trigger\"><span></span></div>
  4497.             </div>
  4498.             {# Filter Content #}
  4499.             <div class=\"uv-filter-paper\">
  4500.                 {# Filters #}
  4501.                 <div class=\"uv-filter-options\">
  4502.                     <script>
  4503.                         var userFilters = {};
  4504.                     </script>
  4505.                     {# Saved Filters #}
  4506.                     <div class=\"uv-element-block\" style=\"border-bottom: 1px solid #D3D3D3; padding-bottom: 5px;\">
  4507.                         <label class=\"uv-field-label\">{{ 'Saved Filters'|trans }}</label>
  4508.                         <div class=\"uv-field-block\">
  4509.                             <div class=\"uv-customize-wrapper\">
  4510.                                 <select class=\"uv-select uv-select-70\" id=\"saved-filter\">
  4511.                                     {% set filters = app.user.agentInstance.userSavedFilters %}
  4512.                                     {% if filters|length %}
  4513.                                         <option value=\"\">-- Saved Filter --</option>
  4514.                                         {% for userFilter in filters %}
  4515.                                             <option value=\"{{userFilter.id}}\">{{userFilter.name}}</option>
  4516.                                         {% endfor %}
  4517.                                     {% else %}
  4518.                                         <option value=\"\">{{ 'No saved filter created'|trans }}</option>
  4519.                                     {% endif %}
  4520.                                 </select>
  4521.                                 {% for userFilter in app.user.agentInstance.userSavedFilters %}
  4522.                                     <script>
  4523.                                         {% set isDefault = 0 %}
  4524.                                         {% if app.user.agentInstance.defaultFiltering == userFilter.id %}
  4525.                                         {% set isDefault = 1 %}
  4526.                                         {% endif %}
  4527.                                         userFilters[{{userFilter.id}}] = {{ {'id': userFilter.id, 'name': userFilter.name, 'route': userFilter.route, 'is_default': isDefault}|json_encode|raw }};
  4528.                                     </script>
  4529.                                 {% endfor %}
  4530.                                 <span class=\"uv-customize\" style=\"display: none\" data-toggle=\"tooltip\" title=\"{{ 'Edit Saved Filter'|trans }}\"></span>
  4531.                             </div>
  4532.                         </div>
  4533.                     </div>
  4534.                     {% set filterContext = {} %}
  4535.                     {# agent #}
  4536.                     <div class=\"uv-element-block\">
  4537.                         <label class=\"uv-field-label\">{{ 'Agent'|trans }}</label>
  4538.                         <div class=\"uv-field-block\" id=\"agent-filter\">
  4539.                             <input class=\"uv-field uv-dropdown-other preloaded\" type=\"text\" data-filter-type=\"agent\" id=\"agent-filter-input\">
  4540.                             <div class=\"uv-dropdown-list uv-bottom-left\">
  4541.                                 <div class=\"uv-dropdown-container\">
  4542.                                     <label>{{ 'Filter With'|trans }}</label>
  4543.                                 </div>
  4544.                                 <ul class=\"uv-agents-list\">
  4545.                                     {% set options = [] %}
  4546.                                     {% for agent in user_service.getAgentsPartialDetails %}
  4547.                                         {% set options = options|merge([{'id': agent.id, 'name': agent.name}]) %}
  4548.                                         <li data-id=\"{{agent.id}}\">
  4549.                                             {% if agent.smallThumbnail != null %}
  4550.                                                 <img src=\"{{ app.request.scheme ~'://' ~ app.request.httpHost ~ asset('') }}{{ agent.smallThumbnail }}\"/>
  4551.                                             {% else %}
  4552.                                                 <img src=\"{{ asset(default_agent_image_path) }}\"/>
  4553.                                             {% endif %}
  4554.                                             {{agent.name}}
  4555.                                         </li>
  4556.                                     {% endfor %}
  4557.                                     <li class=\"uv-no-results\" style=\"display: none;\">
  4558.                                         {{ 'No result found'|trans }}
  4559.                                     </li>
  4560.                                     {% set filterContext = filterContext|merge({'agent':options}) %}
  4561.                                 </ul>
  4562.                             </div>
  4563.                             <div class=\"uv-filtered-tags\"></div>
  4564.                         </div>
  4565.                     </div>
  4566.                     <div class=\"uv-element-block\">
  4567.                         <label class=\"uv-field-label\">{{ 'Customer'|trans }}</label>
  4568.                         <div class=\"uv-field-block\" id=\"customer-filter\">
  4569.                             <input class=\"uv-field uv-dropdown-other\" type=\"text\" data-filter-type=\"customer\" id=\"customer-filter-input\">
  4570.                             <div class=\"uv-dropdown-list uv-bottom-left\">
  4571.                                 <div class=\"uv-dropdown-container\">
  4572.                                     <label>{{ 'Filter With'|trans }}</label>
  4573.                                 </div>
  4574.                                 <ul class=\"uv-agents-list\">
  4575.                                     <li class=\"uv-filter-info\">
  4576.                                         {{ 'Type atleast 2 letters'|trans }}
  4577.                                     </li>
  4578.                                     <li class=\"uv-no-results\" style=\"display: none;\">
  4579.                                         {{ 'No result found'|trans }}
  4580.                                     </li>
  4581.                                 </ul>
  4582.                             </div>
  4583.                             <div class=\"uv-filtered-tags\"></div>
  4584.                         </div>
  4585.                     </div>
  4586.                     <div class=\"uv-element-block\">
  4587.                         <label class=\"uv-field-label\">{{ 'Group'|trans }}</label>
  4588.                         <div class=\"uv-field-block\" id=\"group-filter\">
  4589.                             <input class=\"uv-field uv-dropdown-other preloaded\" type=\"text\" data-filter-type=\"group\" id=\"group-filter-input\">
  4590.                             <div class=\"uv-dropdown-list uv-bottom-left\">
  4591.                                 <div class=\"uv-dropdown-container\">
  4592.                                     <label>{{ 'Filter With'|trans }}</label>
  4593.                                     <ul class=\"\">
  4594.                                         {% set options = [] %}
  4595.                                         {% for group in user_service.getSupportGroups() %}
  4596.                                             {% set options = options|merge([{'id': group.id, 'name': group.name}]) %}
  4597.                                             <li data-id=\"{{group.id}}\">
  4598.                                                 {{group.name}}
  4599.                                             </li>
  4600.                                         {% endfor %}
  4601.                                         <li class=\"uv-no-results\" style=\"display: none;\">
  4602.                                             {{ 'No result found'|trans }}
  4603.                                         </li>
  4604.                                         {% set filterContext = filterContext|merge({'group':options}) %}
  4605.                                     </ul>
  4606.                                 </div>
  4607.                             </div>
  4608.                             <div class=\"uv-filtered-tags\"></div>
  4609.                         </div>
  4610.                     </div>
  4611.                     <div class=\"uv-element-block\">
  4612.                         <label class=\"uv-field-label\">{{ 'Team'|trans }}</label>
  4613.                         <div class=\"uv-field-block\" id=\"team-filter\">
  4614.                             <input class=\"uv-field uv-dropdown-other preloaded\" type=\"text\" data-filter-type=\"team\" id=\"team-filter-input\">
  4615.                             <div class=\"uv-dropdown-list uv-bottom-left\">
  4616.                                 <div class=\"uv-dropdown-container\">
  4617.                                     <label>{{ 'Filter With'|trans }}</label>
  4618.                                     <ul class=\"\">
  4619.                                         {% set options = [] %}
  4620.                                         {% for team in user_service.getSupportTeams() %}
  4621.                                             {% set options = options|merge([{'id': team.id, 'name': team.name}]) %}
  4622.                                             <li data-id=\"{{team.id}}\">
  4623.                                                 {{team.name}}
  4624.                                             </li>
  4625.                                         {% endfor %}
  4626.                                         <li class=\"uv-no-results\" style=\"display: none;\">
  4627.                                             {{ 'No result found'|trans }}
  4628.                                         </li>
  4629.                                         {% set filterContext = filterContext|merge({'team':options}) %}
  4630.                                     </ul>
  4631.                                 </div>
  4632.                             </div>
  4633.                             <div class=\"uv-filtered-tags\"></div>
  4634.                         </div>
  4635.                     </div>
  4636.                     <div class=\"uv-element-block\">
  4637.                         <label class=\"uv-field-label\">{{ 'Type'|trans }}</label>
  4638.                         <div class=\"uv-field-block\" id=\"type-filter\">
  4639.                             <input class=\"uv-field uv-dropdown-other preloaded\" type=\"text\" data-filter-type=\"type\" id=\"type-filter-input\">
  4640.                             <div class=\"uv-dropdown-list uv-bottom-left\">
  4641.                                 <div class=\"uv-dropdown-container\">
  4642.                                     <label>{{ 'Filter With'|trans }}</label>
  4643.                                     <ul class=\"\">
  4644.                                         {% set options = [] %}
  4645.                                         {% for type in ticket_service.getTypes() %}
  4646.                                             {% set options = options|merge([{'id': type.id, 'name': type.name}]) %}
  4647.                                             <li data-id=\"{{type.id}}\">
  4648.                                                 {{type.name}}
  4649.                                             </li>
  4650.                                         {% endfor %}
  4651.                                         <li class=\"uv-no-results\" style=\"display: none;\">
  4652.                                             {{ 'No result found'|trans }}
  4653.                                         </li>
  4654.                                         {% set filterContext = filterContext|merge({'type':options}) %}
  4655.                                     </ul>
  4656.                                 </div>
  4657.                             </div>
  4658.                             <div class=\"uv-filtered-tags\"></div>
  4659.                         </div>
  4660.                     </div>
  4661.                     <div class=\"uv-element-block\">
  4662.                         <label class=\"uv-field-label\">{{ 'Priority'|trans }}</label>
  4663.                         <div class=\"uv-field-block\" id=\"priority-filter\">
  4664.                             <input class=\"uv-field uv-dropdown-other preloaded\" type=\"text\" data-filter-type=\"priority\" id=\"priority-filter-input\">
  4665.                             <div class=\"uv-dropdown-list uv-bottom-left\">
  4666.                                 <div class=\"uv-dropdown-container\">
  4667.                                     <label>{{ 'Filter With'|trans }}</label>
  4668.                                     <ul class=\"\">
  4669.                                         {% set options = [] %}
  4670.                                         {% for priority in ticket_service.getPriorities() %}
  4671.                                             {% set options = options|merge([{'id': priority.id, 'name': priority.code, 'color': priority.colorCode}]) %}
  4672.                                             <li data-id=\"{{priority.id}}\">
  4673.                                                 {{ priority.code|trans }}
  4674.                                             </li>
  4675.                                         {% endfor %}
  4676.                                         <li class=\"uv-no-results\" style=\"display: none;\">
  4677.                                             {{ 'No result found'|trans }}
  4678.                                         </li>
  4679.                                         {% set filterContext = filterContext|merge({'priority':options}) %}
  4680.                                     </ul>
  4681.                                 </div>
  4682.                             </div>
  4683.                             <div class=\"uv-filtered-tags\"></div>
  4684.                         </div>
  4685.                     </div>
  4686.                     <div class=\"uv-element-block\">
  4687.                         <label class=\"uv-field-label\">{{ 'Tag'|trans }}</label>
  4688.                         <div class=\"uv-field-block\" id=\"tag-filter\">
  4689.                             <input class=\"uv-field uv-dropdown-other\" type=\"text\" data-filter-type=\"tag\" id=\"tag-filter-input\">
  4690.                             <div class=\"uv-dropdown-list uv-bottom-left\">
  4691.                                 <div class=\"uv-dropdown-container\">
  4692.                                     <label>{{ 'Filter With'|trans }}</label>
  4693.                                     <ul class=\"\">
  4694.                                         <li class=\"uv-filter-info\">
  4695.                                             {{ 'Type atleast 2 letters'|trans }}
  4696.                                         </li>
  4697.                                         <li class=\"uv-no-results\" style=\"display: none;\">
  4698.                                             {{ 'No result found'|trans }}
  4699.                                         </li>
  4700.                                     </ul>
  4701.                                 </div>
  4702.                             </div>
  4703.                             <div class=\"uv-filtered-tags\"></div>
  4704.                         </div>
  4705.                     </div>
  4706.                     <div class=\"uv-element-block\">
  4707.                         <label class=\"uv-field-label\">{{ 'Source'|trans }}</label>
  4708.                         <div class=\"uv-field-block\" id=\"source-filter\">
  4709.                             <input class=\"uv-field uv-dropdown-other preloaded\" type=\"text\" data-filter-type=\"source\" id=\"source-filter-input\">
  4710.                             <div class=\"uv-dropdown-list uv-bottom-left\">
  4711.                                 <div class=\"uv-dropdown-container\">
  4712.                                     <label>{{ 'Filter With'|trans }}</label>
  4713.                                     <ul class=\"\">
  4714.                                         {% set options = [] %}
  4715.                                         {% for key, source in ticket_service.getAllSources() %}
  4716.                                             {% set options = options|merge([{'id': key, 'name': source}]) %}
  4717.                                             <li data-id=\"{{key}}\">
  4718.                                                 {{ source|trans }}
  4719.                                             </li>
  4720.                                         {% endfor %}
  4721.                                         <li class=\"uv-no-results\" style=\"display: none;\">
  4722.                                             {{ 'No result found'|trans }}
  4723.                                         </li>
  4724.                                         {% set filterContext = filterContext|merge({'source': options}) %}
  4725.                                     </ul>
  4726.                                 </div>
  4727.                             </div>
  4728.                             <div class=\"uv-filtered-tags\"></div>
  4729.                         </div>
  4730.                     </div>
  4731.                     <div class=\"uv-element-block\">
  4732.                         <label class=\"uv-field-label\">{{ 'Mailbox'|trans }}</label>
  4733.                         <div class=\"uv-field-block\" id=\"mailbox-filter\">
  4734.                             <input class=\"uv-field uv-dropdown-other preloaded\" type=\"text\" data-filter-type=\"mailbox\" id=\"mailbox-filter-input\">
  4735.                             <div class=\"uv-dropdown-list uv-bottom-left\">
  4736.                                 <div class=\"uv-dropdown-container\">
  4737.                                     <label>{{ 'Filter With'|trans }}</label>
  4738.                                     <ul class=\"\">
  4739.                                         {% set options = [] %}
  4740.                                         {% for mailbox in ticket_service.getAllMailboxes() %}
  4741.                                             {% set options = options|merge([{'id': mailbox.email, 'name': mailbox.name}]) %}
  4742.                                             <li data-id=\"{{mailbox.email}}\">
  4743.                                                 {{ mailbox.name|trans }}
  4744.                                             </li>
  4745.                                         {% endfor %}
  4746.                                         <li class=\"uv-no-results\" style=\"display: none;\">
  4747.                                             {{ 'No result found'|trans }}
  4748.                                         </li>
  4749.                                         {% set filterContext = filterContext|merge({'mailbox': options}) %}
  4750.                                     </ul>
  4751.                                 </div>
  4752.                             </div>
  4753.                             <div class=\"uv-filtered-tags\"></div>
  4754.                         </div>
  4755.                     </div>
  4756.                     <div class=\"uv-element-block\">
  4757.                         <label class=\"uv-field-label\">{{ 'Before'|trans }}</label>
  4758.                         <div class=\"uv-field-block range\" id=\"before-filter\">
  4759.                             <input class=\"uv-field uv-date-picker\" type=\"text\" data-filter-type=\"before\" id=\"before-filter-input\">
  4760.                         </div>
  4761.                     </div>
  4762.                     <div class=\"uv-element-block\">
  4763.                         <label class=\"uv-field-label\">{{ 'After'|trans }}</label>
  4764.                         <div class=\"uv-field-block range\" id=\"after-filter\">
  4765.                             <input class=\"uv-field uv-date-picker\" type=\"text\" data-filter-type=\"after\" id=\"after-filter-input\">
  4766.                         </div>
  4767.                     </div>
  4768.                     <div class=\"uv-element-block\">
  4769.                         <label class=\"uv-field-label\">{{ 'Replies less than'|trans }}</label>
  4770.                         <div class=\"uv-field-block\" id=\"reply-filter\">
  4771.                             <input class=\"uv-field\" type=\"number\" min=\"1\" data-filter-type=\"replies-less\" id=\"repliesLess-filter-input\">
  4772.                         </div>
  4773.                     </div>
  4774.                     <div class=\"uv-element-block\">
  4775.                         <label class=\"uv-field-label\">{{ 'Replies more than'|trans }}</label>
  4776.                         <div class=\"uv-field-block\" id=\"reply-filter\">
  4777.                             <input class=\"uv-field\" type=\"number\" min=\"0\" data-filter-type=\"replies-more\" id=\"repliesMore-filter-input\">
  4778.                         </div>
  4779.                     </div>
  4780.                     <div class=\"uv-action-buttons\">
  4781.                     </div>
  4782.                     {# Clear Filters #}
  4783.                     <a class=\"uv-btn-remove\" href=\"#\"><span class=\"uv-icon-discard\"></span> {{ 'Clear All'|trans }}</a>
  4784.                 </div>
  4785.                 {# Add|Edit Filter #}
  4786.                 <div class=\"uv-filter-edit\" style=\"display: none;\"></div>
  4787.             </div>
  4788.             <script type=\"text/javascript\">
  4789.                 var filterContext = {{ filterContext|json_encode|raw }}
  4790.             </script>
  4791.         </div>
  4792.     </div>
  4793. {% endblock %}
  4794. {% block footer %}
  4795.     {{ parent() }}
  4796.     {# Sort Ticket View Template #}
  4797.     <script id=\"ticket_list_sorting_tmp\" type=\"text/template\">
  4798.         <li class=\"<% if(sort == 'ticket.id') { %>uv-drop-list-active<% } %>\">
  4799.             <a href=\"#<% if(queryString != '') { %><%= queryString %>/<% } %><% if(page) { %>page/<%= page %><% } else { %>page/1<% } %>/sort/ticket.id/<% if(sort == 'ticket.id') { %><% if(direction) { %>direction/<%= direction %><% } else { %>direction/desc<% } %><% } else { %>direction/asc<% } %>\" data-field=\"ticket.id\">
  4800.                 {% trans %}Ticket Id{% endtrans %}
  4801.                 <% if(sort == 'ticket.id') { %>
  4802.                 <span class=\"uv-sorting <% if(direction == 'asc') { %> descend <% } else { %> ascend <% } %>\"></span>
  4803.                 <% } %>
  4804.             </a>
  4805.         </li>
  4806.         <li class=\"<% if(sort == 'ticket.updatedAt') { %>uv-drop-list-active<% } %>\">
  4807.             <a href=\"#<% if(queryString != '') { %><%= queryString %>/<% } %><% if(page) { %>page/<%= page %><% } else { %>page/1<% } %>/sort/ticket.updatedAt/<% if(sort == 'ticket.updatedAt') { %><% if(direction) { %>direction/<%= direction %><% } else { %>direction/desc<% } %><% } else { %>direction/asc<% } %>\" data-field=\"ticket.updatedAt\">
  4808.                 {% trans %}Last Replied{% endtrans %}
  4809.                 <% if(sort == 'ticket.updatedAt') { %>
  4810.                 <span class=\"uv-sorting <% if(direction == 'asc') { %> descend <% } else { %> ascend <% } %>\"></span>
  4811.                 <% } %>
  4812.             </a>
  4813.         </li>
  4814.         <li class=\"<% if(sort == 'agentName') { %>uv-drop-list-active<% } %>\">
  4815.             <a href=\"#<% if(queryString != '') { %><%= queryString %>/<% } %><% if(page) { %>page/<%= page %><% } else { %>page/1<% } %>/sort/agentName/<% if(sort == 'agentName') { %><% if(direction) { %>direction/<%= direction %><% } else { %>direction/desc<% } %><% } else { %>direction/asc<% } %>\" data-field=\"agentName\">
  4816.                 {% trans %}Assign To{% endtrans %}
  4817.                 <% if(sort == 'agentName') { %>
  4818.                 <span class=\"uv-sorting <% if(direction == 'asc') { %> descend <% } else { %> ascend <% } %>\"></span>
  4819.                 <% } %>
  4820.             </a>
  4821.         </li>
  4822.         <li class=\"<% if(sort == 'customerEmail') { %>uv-drop-list-active<% } %>\">
  4823.             <a href=\"#<% if(queryString != '') { %><%= queryString %>/<% } %><% if(page) { %>page/<%= page %><% } else { %>page/1<% } %>/sort/customerEmail/<% if(sort == 'customerEmail') { %><% if(direction) { %>direction/<%= direction %><% } else { %>direction/desc<% } %><% } else { %>direction/asc<% } %>\" data-field=\"customerEmail\">
  4824.                 {% trans %}Customer Email{% endtrans %}
  4825.                 <% if(sort == 'customerEmail') { %>
  4826.                 <span class=\"uv-sorting <% if(direction == 'asc') { %> descend <% } else { %> ascend <% } %>\"></span>
  4827.                 <% } %>
  4828.             </a>
  4829.         </li>
  4830.         <li class=\"<% if(sort == 'customerName') { %>uv-drop-list-active<% } %>\">
  4831.             <a href=\"#<% if(queryString != '') { %><%= queryString %>/<% } %><% if(page) { %>page/<%= page %><% } else { %>page/1<% } %>/sort/customerName/<% if(sort == 'customerName') { %><% if(direction) { %>direction/<%= direction %><% } else { %>direction/desc<% } %><% } else { %>direction/asc<% } %>\" data-field=\"customerName\">
  4832.                 {% trans %}Customer Name{% endtrans %}
  4833.                 <% if(sort == 'customerName') { %>
  4834.                 <span class=\"uv-sorting <% if(direction == 'asc') { %> descend <% } else { %> ascend <% } %>\"></span>
  4835.                 <% } %>
  4836.             </a>
  4837.         </li>
  4838.     </script>
  4839.     {# Ticket Status List Template #}
  4840.     <script id=\"ticket_status_list_tmp\" type=\"text/template\">
  4841.         <ul class=\"status-list\">
  4842.             {% for status in ticketStatusCollection %}
  4843.                 <li>
  4844.                     <a href=\"#\" class=\"<% if(active == {{ status.id }} {% if status.id == 1 %} || active == 0{% endif %}) { %>uv-aside-nav-active<% } %>\" data-id=\"{{ status.id }}\">
  4845.                         <span class=\"name\">{{ status.description|trans }}</span>
  4846.                         <span class=\"uv-flag-gray\">
  4847.                             <% if(status && status[1] != undefined) { %>
  4848.                                 <%= status[{{ status.id }}] %>
  4849.                             <% } else { %>
  4850.                                 0
  4851.                             <% } %>
  4852.                         </span>
  4853.                     </a>
  4854.                 </li>
  4855.             {% endfor %}
  4856.         </ul>
  4857.     </script>
  4858.     {# Default Ticket Label View Template #}
  4859.     <script id=\"predefined_label_tmp\" type=\"text/template\">
  4860.         <li>
  4861.             <a href=\"#\" <% if (active == '') { %> class=\"uv-aside-active\" <% } %>>
  4862.             {{ 'All'|trans }}
  4863.             <span class=\"uv-flag-gray uv-flag-dark\"><%= labelDetails.predefind.all %></span>
  4864.             </a>
  4865.         </li>
  4866.         <li>
  4867.             <a href=\"#new\" <% if(active == 'new') { %> class=\"uv-aside-active\" <% } %> >
  4868.             {{ 'New'|trans }}
  4869.             <span class=\"uv-flag-gray uv-flag-dark\">
  4870.                     <%= labelDetails.predefind.new %>
  4871.                 </span>
  4872.             </a>
  4873.         </li>
  4874.         <li>
  4875.             <a href=\"#unassigned\" <% if(active == 'unassigned') { %> class=\"uv-aside-active\" <% } %> >
  4876.             {{ 'UnAssigned'|trans }}
  4877.             <span class=\"uv-flag-gray uv-flag-dark\">
  4878.                     <%= labelDetails.predefind.unassigned %>
  4879.                 </span>
  4880.             </a>
  4881.         </li>
  4882.         <li>
  4883.             <a href=\"#notreplied\" <% if(active == 'notreplied') { %> class=\"uv-aside-active\" <% } %> >
  4884.             {{ 'UnAnswered'|trans }}
  4885.             <span class=\"uv-flag-gray uv-flag-dark\">
  4886.                     <%= labelDetails.predefind.notreplied %>
  4887.                 </span>
  4888.             </a>
  4889.         </li>
  4890.         <li>
  4891.             <a href=\"#mine\" <% if(active == 'mine') { %> class=\"uv-aside-active\" <% } %> >
  4892.             {{ 'My Tickets'|trans }}
  4893.             <span class=\"uv-flag-gray uv-flag-dark\">
  4894.                     <%= labelDetails.predefind.mine %>
  4895.                 </span>
  4896.             </a>
  4897.         </li>
  4898.         <li>
  4899.             <a href=\"#starred\" <% if(active == 'starred') { %> class=\"uv-aside-active\" <% } %> >
  4900.             {{ 'Starred'|trans }}
  4901.             <span class=\"uv-flag-gray uv-flag-dark\">
  4902.                     <%= labelDetails.predefind.starred %>
  4903.                 </span>
  4904.             </a>
  4905.         </li>
  4906.         <li>
  4907.             <a href=\"#trashed\" <% if(active == 'trashed') { %> class=\"uv-aside-active\" <% } %>>
  4908.             {{ 'Trashed'|trans }}
  4909.             <span class=\"uv-flag-gray uv-flag-dark\">
  4910.                     <%= labelDetails.predefind.trashed %>
  4911.                 </span>
  4912.             </a>
  4913.         </li>
  4914.     </script>
  4915.     {# Custom Ticket Label View Template #}
  4916.     <script id=\"custom_label_tmp\" type=\"text/template\">
  4917.         <a href=\"#label/<%= id %>\"  data-id=\"<%= id %>\">
  4918.             <%- name %>
  4919.             <span class=\"uv-flag-gray\" style=\"<% if(colorCode) { %>background-color:<%= colorCode %><% } %>\">
  4920.                 <%= count %>
  4921.             </span>
  4922.         </a>
  4923.         <span class=\"uv-customize\" data-target=\"uv-task-view\" data-toggle=\"tooltip\" title=\"{{ 'Edit Label'|trans }}\"></span>
  4924.     </script>
  4925.     {# Add|Edit Ticket Label View Template #}
  4926.     <script id=\"add_edit_label_tmp\" type=\"text/template\">
  4927.         <div class=\"uv-aside-head\">
  4928.             <div class=\"uv-aside-title\">
  4929.                 <% if(id) { %>
  4930.                 <h6>{{ 'Edit Label'|trans }}</h6>
  4931.                 <% } else { %>
  4932.                 <h6>{{ 'Add Label'|trans }}</h6>
  4933.                 <% } %>
  4934.             </div>
  4935.             <div class=\"uv-aside-back\" id=\"back-to-labels\">
  4936.                 <span>{{ 'Back'|trans }}</span>
  4937.             </div>
  4938.         </div>
  4939.         <div class=\"uv-aside-option\" data-id=\"<%= id %>\">
  4940.             <div class=\"uv-element-block\">
  4941.                 <label class=\"uv-field-label\">{{ 'Name'|trans }}</label>
  4942.                 <div class=\"uv-field-block\">
  4943.                     <input class=\"uv-field\" type=\"text\" value=\"<%- name %>\" />
  4944.                 </div>
  4945.             </div>
  4946.             <div class=\"uv-element-block\">
  4947.                 <label class=\"uv-field-label\">{{ 'Choose a Color'|trans }}</label>
  4948.                 <div class=\"uv-field-block\">
  4949.                     <% colors = ['#337CFF','#FEBF00','#E5549F','#27B6BB','#FB8A3F','#43AF52'] %>
  4950.                     <% for(var colorTemp in colors) { %>
  4951.                     <span class=\"uv-color-block <% if(colorCode == colors[colorTemp]) { %>uv-color-active<% } %>\" data-color=\"<%- colors[colorTemp] %>\" style=\"background:<%- colors[colorTemp] %>\"></span>
  4952.                     <% } %>
  4953.                 </div>
  4954.             </div>
  4955.             <div>
  4956.                 <a class=\"uv-btn add-update-btn\" href=\"#\">
  4957.                     <% if(id) { %>
  4958.                     {{ 'Update'|trans }}
  4959.                     <% } else { %>
  4960.                     {{ 'Create'|trans }}
  4961.                     <% } %>
  4962.                 </a>
  4963.             </div>
  4964.             <% if(id) { %>
  4965.             <a class=\"uv-btn-remove\"><span class=\"uv-icon-discard\"></span>{{ 'Remove Label'|trans }}</a>
  4966.             <% } %>
  4967.         </div>
  4968.     </script>
  4969.     {# Add|Edit Saved Ticket Filter View Template #}
  4970.     <script id=\"add_edit_saved_filter_tmp\" type=\"text/template\">
  4971.         <form>
  4972.             <div class=\"uv-filter-edit-head\">
  4973.                 <div class=\"uv-filter-edit-title\">
  4974.                     <h6>
  4975.                         <% if(id) { %>
  4976.                         <input type=\"hidden\" name=\"id\" id=\"filter-id\" value=\"<%= id %>\"/>
  4977.                         {{ 'Edit Saved Filter'|trans }}
  4978.                         <% } else { %>
  4979.                         {{ 'New Saved Filter'|trans }}
  4980.                         <% } %>
  4981.                     </h6>
  4982.                 </div>
  4983.                 <div class=\"uv-filter-edit-back back-to-filter\">
  4984.                     <span>{{ 'Back'|trans }}</span>
  4985.                 </div>
  4986.             </div>
  4987.             <div class=\"uv-element-block\">
  4988.                 <label class=\"uv-field-label\">{{ 'Name'|trans }}</label>
  4989.                 <div class=\"uv-field-block\">
  4990.                     <input class=\"uv-field name\" name=\"name\" type=\"text\" value=\"<%- name %>\" />
  4991.                 </div>
  4992.             </div>
  4993.             <div class=\"uv-element-block\">
  4994.                 <label>
  4995.                     <div class=\"uv-checkbox\">
  4996.                         <input type=\"checkbox\" name=\"is_default\" <% if(is_default) { %>checked<% } %> />
  4997.                         <span class=\"uv-checkbox-view\"></span>
  4998.                     </div>
  4999.                     <span class=\"uv-checkbox-label\">{{ 'Is Default'|trans }}</span>
  5000.                 </label>
  5001.             </div>
  5002.             <div class=\"uv-filters-group\">
  5003.                 <% _.each(filters, function(filter, key){ %>
  5004.                 <div class=\"uv-element-block\" data-filter=\"<%= key %>\">
  5005.                     <label class=\"uv-field-label\"><%- filter.name %></label>
  5006.                     <div class=\"uv-field-block\">
  5007.                         <% _.each(filter.options, function(option){ %>
  5008.                         <a class=\"uv-btn-tag\" href=\"#\" data-id=\"<%= option.id %>\">
  5009.                             <%- option.name %>
  5010.                             <span class=\"uv-icon-remove-dark\"></span>
  5011.                         </a>
  5012.                         <% }); %>
  5013.                     </div>
  5014.                 </div>
  5015.                 <% }); %>
  5016.                 <div class=\"uv-action-buttons\">
  5017.                     <% if(id) { %>
  5018.                     <a class=\"uv-btn-remove\"><span class=\"uv-icon-discard\"></span>{{ 'Remove Saved Filter'|trans }}</a>
  5019.                     <% } %>
  5020.                 </div>
  5021.             </div>
  5022.             <div class=\"uv-action-buttons\">
  5023.                 <a class=\"uv-btn <% if(id) { %>update-filter<% } else { %>save-filter<% } %>\" href=\"#\">
  5024.                     <% if(id) { %>
  5025.                     {{ 'Update'|trans }}
  5026.                     <% } else { %>
  5027.                     {{ 'Create'|trans }}
  5028.                     <% } %>
  5029.                 </a>
  5030.                 <a class=\"uv-btn back-to-filter\" href=\"#\">{{ 'Cancel'|trans }}</a>
  5031.             </div>
  5032.         </form>
  5033.     </script>
  5034.     {# Quick View Ticket View Template #}
  5035.     <script id=\"ticket_quick_view_tmp\" type=\"text/template\">
  5036.         <div class=\"uv-pull-right quick-view-navigation\">
  5037.             <div class=\"uv-loader\" style=\"display: none\">
  5038.                 <span></span>
  5039.                 <span></span>
  5040.                 <span></span>
  5041.             </div>
  5042.             <% if(previous) { %>
  5043.             <span class=\"uv-btn-tag uv-icon-nav-pre\" data-id=\"<%= previous %>\">
  5044.                 </span>
  5045.             <% } else { %>
  5046.             <span class=\"uv-btn-tag uv-icon-nav-pre\" disabled=\"disabled\">
  5047.                 </span>
  5048.             <% } %>
  5049.             <% if(next) { %>
  5050.             <span class=\"uv-btn-tag uv-icon-nav-nxt\"  data-id=\"<%= next %>\">
  5051.                 </span>
  5052.             <% } else { %>
  5053.             <span class=\"uv-btn-tag uv-icon-nav-nxt\" disabled=\"disabled\">
  5054.                 </span>
  5055.             <% } %>
  5056.         </div>
  5057.         <span class=\"uv-pop-up-close\"></span>
  5058.         <a href=\"<%= path %>\"><h2>{{ 'Ticket Info'|trans }} #<%= id %></h2></a>
  5059.         <div class=\"uv-pop-up-body uv-inner-section\">
  5060.             <div class=\"uv-view\">
  5061.                 <div class=\"uv-ticket-head\">
  5062.                     <div class=\"uv-ticket-strip\">
  5063.                         <span>
  5064.                             <span class=\"uv-ticket-strip-label\">
  5065.                                 {{ 'Timestamp'|trans }} -
  5066.                             </span>
  5067.                             <span class=\"uv-margin-0\">
  5068.                                 <%= formatedCreatedAt %>
  5069.                             </span>
  5070.                         </span>
  5071.                         <span>
  5072.                             <span class=\"uv-ticket-strip-label\">
  5073.                                 {{ 'By'|trans }} -
  5074.                             </span>
  5075.                             <%- createThread.user.name %>
  5076.                         </span>
  5077.                         <% if(agent) { %>
  5078.                         <span class=\"agent-info\" style=\"\">
  5079.                                 <span class=\"uv-ticket-strip-label\">
  5080.                                     {{ 'Agent'|trans }} -
  5081.                                 </span>
  5082.                                 <span class=\"name\"><%- agent.name %></span>
  5083.                             </span>
  5084.                         <% } %>
  5085.                     </div>
  5086.                     <div class=\"uv-ticket-strip\">
  5087.                         <span class=\"uv-btn-tag\">
  5088.                             {{ 'Priority'|trans }}
  5089.                             - <%- priority.description %>
  5090.                         </span>
  5091.                         <span class=\"uv-btn-tag\">
  5092.                             {{ 'Status'|trans }}
  5093.                             - <%- status.description %>
  5094.                         </span>
  5095.                         <% if(lastReplyAgentName) { %>
  5096.                         <span class=\"uv-btn-tag\">
  5097.                                 {{ 'Last Replied Agent'|trans }}
  5098.                                 - <%- lastReplyAgentName.name.split(\" \")[0] %>
  5099.                             </span>
  5100.                         <% } %>
  5101.                     </div>
  5102.                 </div>
  5103.                 <div class=\"uv-ticket-head\">
  5104.                     <h1><%- subject %></h1>
  5105.                 </div>
  5106.                 <div class=\"uv-ticket-section\">
  5107.                     <div class=\"uv-ticket-main create\">
  5108.                         <div class=\"uv-ticket-strip\">
  5109.                             <span>
  5110.                                 <span class=\"uv-margin-0 timeago\" data-timestamp=\"<%= createThread.timestamp %>\" title=\"<%= createThread.formatedCreatedAt %>\"><%= createThread.formatedCreatedAt %></span>
  5111.                                 - <%- createThread.user.name %>
  5112.                                 <span class=\"uv-ticket-strip-label\">
  5113.                                     {{ 'created Ticket'|trans }}
  5114.                                 </span>
  5115.                             </span>
  5116.                         </div>
  5117.                         <div class=\"uv-ticket-main-lt\">
  5118.                             <% if (createThread.user.smallThumbnail != null) { %>
  5119.                                 <img class='border' src=\"{{ app.request.scheme ~'://' ~ app.request.httpHost ~ asset('') }}<%= createThread.user.smallThumbnail %>\"/>
  5120.                             <% } else { %>
  5121.                                 <% if (createThread.createdBy == 'customer') { %>
  5122.                                     <img class='border' src=\"{{ asset(default_customer_image_path) }}\"/>
  5123.                                 <% } else { %>
  5124.                                     <img class='border' src=\"{{ asset(default_agent_image_path) }}\"/>
  5125.                                 <% } %>
  5126.                             <% } %>
  5127.                         </div>
  5128.                         <div class=\"uv-ticket-main-rt\">
  5129.                             <% if(createThread.createdBy == 'customer') { %>
  5130.                             <a href=\"{{ path('helpdesk_member_manage_customer_account') }}/<%= createThread.user.id %>\" class=\"uv-ticket-member-name\">
  5131.                                 <% } else { %>
  5132.                                 <% if(createThread.user) { %>
  5133.                                 <a href=\"{{ path('helpdesk_member_account') }}/<%= createThread.user.id %>\" class=\"uv-ticket-member-name\">
  5134.                                     <% } else { %>
  5135.                                     <a class=\"uv-ticket-member-name\">
  5136.                                         <% } %>
  5137.                                         <% } %>
  5138.                                         <%- createThread.user.name %>
  5139.                                     </a>
  5140.                                     <div class=\"message\">
  5141.                                         <p>
  5142.                                             <%= createThread.reply %>
  5143.                                         </p>
  5144.                                     </div>
  5145.                                     <!-- Attachment Block -->
  5146.                                     <% if(createThread.attachments.length) { %>
  5147.                                     <div class=\"uv-ticket-uploads\">
  5148.                                         <h4>{{ 'Uploaded Files'|trans }}</h4>
  5149.                                         <div class=\"uv-ticket-uploads-strip\">
  5150.                                             <% _.each(createThread.attachments, function(file) { %>
  5151.                                             <a href=\"<%-file.downloadURL %>\" target =\"_blank\" class=\"uv-ticket-uploads-brick uv-no-pointer-events\" data-toggle=\"tooltip\" title=\"<%- file.name %>\">
  5152.                                                 <img src=\"<%-file.iconURL %>\" class=\"uv-auto-pointer-events\">
  5153.                                             </a>
  5154.                                             <% }) %>
  5155.                                         </div>
  5156.                                         <% if(createThread.attachments.length >1) { %>
  5157.                                         <div class=\"thread-attachments-zip pull-left\">
  5158.                                             <div class=\"uv-upload-actions\">
  5159.                                                 <a href=\"{{ path('helpdesk_member_ticket_download_attachment_zip') }}/<%= createThread.id %>\" target=\"_blank\"><span class=\"uv-icon-attachment\"></span> {{ 'Download (as .zip)'|trans }}</a>
  5160.                                             </div>
  5161.                                         </div>
  5162.                                         <% } %>
  5163.                                     </div>
  5164.                                     <% } %>
  5165.                                     <!-- //Attachment Block -->
  5166.                         </div>
  5167.                     </div>
  5168.                     <% if(lastReply) { %>
  5169.                     <div class=\"uv-ticket-main\">
  5170.                         <div class=\"uv-ticket-strip\">
  5171.                                 <span>
  5172.                                     <span class=\"uv-margin-0 timeago\" data-timestamp=\"<%= lastReply.timestamp %>\" title=\"<%= lastReply.formatedCreatedAt %>\"><%= lastReply.formatedCreatedAt %></span>
  5173.                                     - <%- lastReply.user.name %>
  5174.                                     <span class=\"uv-ticket-strip-label\">
  5175.                                         {{ 'made last reply'|trans }}
  5176.                                     </span>
  5177.                                 </span>
  5178.                         </div>
  5179.                         <div class=\"uv-ticket-main-lt\">
  5180.                             <% if (lastReply.user.smallThumbnail != null) { %>
  5181.                                 <img class='border' src=\"{{ app.request.scheme ~'://' ~ app.request.httpHost ~ asset('') }}<%= lastReply.user.smallThumbnail %>\"/>
  5182.                             <% } else { %>
  5183.                                 <% if (lastReply.createdBy == 'customer') { %>
  5184.                                     <img class='border' src=\"{{ asset(default_customer_image_path) }}\"/>
  5185.                                 <% } else { %>
  5186.                                     <img class='border' src=\"{{ asset(default_agent_image_path) }}\"/>
  5187.                                 <% } %>
  5188.                             <% } %>
  5189.                         </div>
  5190.                         <div class=\"uv-ticket-main-rt\">
  5191.                             <% if(lastReply.createdBy == 'customer') { %>
  5192.                             <a href=\"{{ path('helpdesk_member_manage_customer_account') }}/<%= lastReply.user.id %>\" class=\"uv-ticket-member-name\">
  5193.                                 <% } else { %>
  5194.                                 <% if(lastReply.user) { %>
  5195.                                 <a href=\"{{ path('helpdesk_member_account') }}/<%= lastReply.user.id %>\" class=\"uv-ticket-member-name\">
  5196.                                     <% } else { %>
  5197.                                     <a class=\"uv-ticket-member-name\">
  5198.                                         <% } %>
  5199.                                         <% } %>
  5200.                                         <%- lastReply.user.name %>
  5201.                                     </a>
  5202.                                     <div class=\"message\">
  5203.                                         <p>
  5204.                                             <%= lastReply.reply %>
  5205.                                         </p>
  5206.                                     </div>
  5207.                                     <!-- Attachment Block -->
  5208.                                     <% if(lastReply.attachments.length) { %>
  5209.                                     <div class=\"uv-ticket-uploads\">
  5210.                                         <h4>{{ 'Uploaded Files'|trans }}</h4>
  5211.                                         <div class=\"uv-ticket-uploads-strip\">
  5212.                                             <% _.each(lastReply.attachments, function(file) { %>
  5213.                                             <a href=\"<%-file.downloadURL %>\" target =\"_blank\" class=\"uv-ticket-uploads-brick uv-no-pointer-events\" data-toggle=\"tooltip\" title=\"<%- file.name %>\">
  5214.                                                 <img src=\"<%-file.iconURL %>\" class=\"uv-auto-pointer-events\">
  5215.                                             </a>
  5216.                                             <% }) %>
  5217.                                         </div>
  5218.                                         <% if(lastReply.attachments.length> 1) { %>
  5219.                                         <div class=\"thread-attachments-zip pull-left\">
  5220.                                             <div class=\"uv-upload-actions\">
  5221.                                                 <a href=\"{{ path('helpdesk_member_ticket_download_attachment_zip') }}/<%= lastReply.id %>\" target=\"_blank\"><span class=\"uv-icon-attachment\"></span> {{ 'Download (as .zip)'|trans }}</a>
  5222.                                             </div>
  5223.                                         </div>
  5224.                                         <% } %>
  5225.                                     </div>
  5226.                                     <% } %>
  5227.                                     <!-- //Attachment Block -->
  5228.                         </div>
  5229.                     </div>
  5230.                     <% } %>
  5231.                 </div>
  5232.             </div>
  5233.         </div>
  5234.     </script>
  5235.     {# Ticket List Item View Template #}
  5236.     <script id=\"ticket_list_item_tmp\" type=\"text/template\">
  5237.         <td class=\"uv-width-140 uv-no-content\">
  5238.             <span class=\"uv-list-ticket-priority\" style=\"<% if(priority) { %>background: <%=priority.colorCode %><% } %>;\"></span>
  5239.             <label class=\"uv-vertical-align uv-margin-right-5\">
  5240.                 <div class=\"uv-checkbox\">
  5241.                     <input type=\"checkbox\" class=\"mass-action-checkbox\" value=\"<%= id %>\"/>
  5242.                     <span class=\"uv-checkbox-view\"></span>
  5243.                 </div>
  5244.             </label>
  5245.             <span class=\"uv-star <% if(isStarred) { %>uv-star-active<% } %> uv-margin-right-5\"></span>
  5246.             <span data-index=\"source\">
  5247.                 <% if(source == 'email') {  %>
  5248.                     <span class=\"uv-channel uv-channel-email uv-margin-right-5\" data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"Email\"></span>
  5249.                 <% } else if(source == 'facebook') {  %>
  5250.                     <span class=\"uv-channel uv-channel-facebook uv-margin-right-5\" data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"Facebook\"></span>
  5251.                 <% } else if(source == 'twitter') {  %>
  5252.                     <span class=\"uv-channel uv-channel-twitter uv-margin-right-5\" data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"Twitter\"></span>
  5253.                 <% } else if(source == 'binaka' || source == 'knock') {  %>
  5254.                     <span class=\"uv-channel uv-channel-binaka uv-margin-right-5\" data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"Binaka\"></span>
  5255.                 <% } else if(source == 'api') { %>
  5256.                     <span class=\"uv-channel uv-channel-api uv-margin-right-5\" data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"API\"></span>
  5257.                 <% } else if(source == 'formbuilder') { %>
  5258.                     <span class=\"uv-channel uv-channel-form-builder uv-margin-right-5\" data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"Formbuilder\"></span>
  5259. \t\t\t\t<% } else if(source == 'disqus-engage') { %>
  5260.                     <span class=\"uv-channel uv-channel-disqus-engage uv-margin-right-5\" data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"Disqus\"></span>
  5261. \t\t\t\t<% } else if(source == 'ebay') { %>
  5262.                     <span class=\"uv-channel uv-channel-ebay uv-margin-right-5\" data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"Ebay\"></span>
  5263. \t\t\t\t<% } else if(source == 'youtube') { %>
  5264.                     <span class=\"uv-channel uv-channel-youtube uv-margin-right-5\" data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"Youtube\"></span>
  5265.                 <% } else { %>
  5266.                     <span class=\"uv-channel uv-channel-web uv-margin-right-5\" data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"<%- source %>\"></span>
  5267.                 <% } %>
  5268.             </span>
  5269.             <span class=\"uv-quick-view-trigger\" data-id=\"<%= id %>\"></span>
  5270.         </td>
  5271.         <td data-value=\"{{ 'ID'|trans }}\" class=\"uv-width-100\">
  5272.             <a href=\"<%= path %>\">
  5273.                 #<%= id %>
  5274.             </a>
  5275.         </td>
  5276.         <td data-value=\"{{ 'Subject'|trans }}\">
  5277.             <a href=\"<%= path %>\">
  5278.                 <%- subject && subject.length <= 300 ? subject : subject.substr(0, 300) + '...'  %>
  5279.             </a>
  5280.         </td>
  5281.         <td data-value=\"{{ 'Customer Name'|trans }}\" data-index=\"customer-name\">
  5282.             <a href=\"<%= path %>\">
  5283.                 <%- customer.name %>
  5284.             </a>
  5285.         </td>
  5286.         <td data-value=\"{{ 'Customer Email'|trans }}\" data-index=\"customer-email\">
  5287.             <a href=\"<%= path %>\">
  5288.                 <%- customer.email %>
  5289.             </a>
  5290.         </td>
  5291.         <td data-value=\"{{ 'Timestamp'|trans }}\" data-index=\"timestamp\">
  5292.             <a href=\"<%= path %>\" class=\"timeago\" data-timestamp=\"<%= timestamp %>\" title=\"<%= formatedCreatedAt %>\">
  5293.                 <%= formatedCreatedAt %>
  5294.             </a>
  5295.         </td>
  5296.         <td data-value=\"{{ 'Last Reply'|trans }}\" data-index=\"last-reply\">
  5297.             <% if(lastReplyTime) { %>
  5298.                 <a href=\"<%= path %>\">
  5299.                     <%= lastReplyTime %>
  5300.                 </a>
  5301.             <% } else { %>
  5302.                     {{ 'N/A'|trans }}
  5303.             <% } %>
  5304.         </td>
  5305.         <td data-value=\"{{ 'Group'|trans }}\" data-index=\"group\">
  5306.             <a href=\"<%= path %>\">
  5307.                 <% if(group) { %>
  5308.                 <%- group %>
  5309.                 <% } else { %>
  5310.                 {{ 'N/A'|trans }}
  5311.                 <% } %>
  5312.             </a>
  5313.         </td>
  5314.         <td data-value=\"{{ 'Team'|trans }}\" data-index=\"team\">
  5315.             <a href=\"<%= path %>\">
  5316.                 <% if(team) { %>
  5317.                 <%- team %>
  5318.                 <% } else { %>
  5319.                 {{ 'N/A'|trans }}
  5320.                 <% } %>
  5321.             </a>
  5322.         </td>
  5323.         <td data-value=\"{{ 'Type'|trans }}\" data-index=\"type1\">
  5324.             <a href=\"<%= path %>\">
  5325.                 <% if(type) { %>
  5326.                 <%- type %>
  5327.                 <% } else { %>
  5328.                 {{ 'N/A'|trans }}
  5329.                 <% } %>
  5330.             </a>
  5331.         </td>
  5332.         <td data-value=\"{{ 'Replies'|trans }}\" data-index=\"replies\">
  5333.             <a href=\"<%= path %>\">
  5334.                 <%= totalThreads %>
  5335.             </a>
  5336.         </td>
  5337.         <td data-value=\"{{ 'Agent'|trans }}\" data-index=\"agent\">
  5338.             <a href=\"<%= path %>\">
  5339.                 <% if(agent) { %>
  5340.                 <% if(agent.smallThumbnail != null) { %>
  5341.                 <img src=\"{{ app.request.scheme ~'://' ~ app.request.httpHost ~ asset('') }}<%= agent.smallThumbnail %>\" alt=\"\"/>
  5342.                 <% } else { %>
  5343.                 <img src=\"{{ asset(default_agent_image_path) }}\" alt=\"\"/>
  5344.                 <% } %>
  5345.                 <%- agent.name %>
  5346.                 <% } else { %>
  5347.                 {{ 'Unassigned'|trans }}
  5348.                 <% } %>
  5349.             </a>
  5350.         </td>
  5351.     </script>
  5352.     <script type=\"text/javascript\">
  5353.         var isPageJustLoaded = true;
  5354.         var globalMessageResponse = \"\";
  5355.         var currentUserId = \"{{ user_service.getCurrentUser().id }}\";
  5356.         var pathToTicket = \"{{ path('helpdesk_member_ticket', {'ticketId': 'replaceId' }) }}\";
  5357.         \$(() => {
  5358.             \$('#before-filter-input').datetimepicker({
  5359.                 format: 'DD-MM-YYYY',
  5360.                 maxDate: 'now',
  5361.                 useCurrent: false,
  5362.             });
  5363.             \$('#after-filter-input').datetimepicker({
  5364.                 format: 'DD-MM-YYYY',
  5365.                 maxDate: 'now',
  5366.                 useCurrent: false,
  5367.             });
  5368.             // Ticket Model
  5369.             var TicketModel = Backbone.Model.extend({
  5370.                 idAttribute: \"id\",
  5371.                 defaults: {
  5372.                     path: \"\",
  5373.                 },
  5374.                 urlRoot: \"{{ path('helpdesk_member_ticket_xhr') }}\"
  5375.             });
  5376.             // Ticket Label Model
  5377.             var LabelModel = Backbone.Model.extend({
  5378.                 idAttribute: \"id\",
  5379.                 defaults: {
  5380.                     count: 0,
  5381.                 },
  5382.                 parse: function (resp, options) {
  5383.                     return JSON.parse(resp.label);
  5384.                 },
  5385.                 urlRoot: \"{{ path('helpdesk_member_ticket_label_xhr') }}\"
  5386.             });
  5387.             // Ticket Quick View Model
  5388.             var TicketQuickViewModel = Backbone.Model.extend({
  5389.                 idAttribute: \"id\",
  5390.                 defaults: {
  5391.                     path: \"\",
  5392.                     isSynced: false
  5393.                 }
  5394.             });
  5395.             // Side Filter Model
  5396.             var SideFilterModel = Backbone.Model.extend({
  5397.                 updateModel: function(type,json) {
  5398.                     if(this.has(type)) {
  5399.                         context = this.get(type)
  5400.                         savedOptionsIds = [];
  5401.                         _.each(context, function (option) {
  5402.                             savedOptionsIds.push(parseInt(option.id))
  5403.                         })
  5404.                         if(jQuery.inArray(parseInt(json.id), savedOptionsIds) == -1) {
  5405.                             context.push(json);
  5406.                             this.set(type, context)
  5407.                         }
  5408.                     } else {
  5409.                         this.set(type, [json])
  5410.                     }
  5411.                 },
  5412.                 loadFilterOptions: function(data) {
  5413.                     var self = this;
  5414.                     \$.ajax({
  5415.                         url : \"{{ path('helpdesk_member_ticket_collection_load_filter_options_xhr') }}\",
  5416.                         type : 'POST',
  5417.                         data: data,
  5418.                         dataType : 'json',
  5419.                         success : function(response) {
  5420.                             _.each(response,function(filter,key) {
  5421.                                 _.each(filter, function (item) {
  5422.                                     self.updateModel(key,item)
  5423.                                 })
  5424.                             })
  5425.                             sideFilter.render();
  5426.                         },
  5427.                         error: function (xhr) {
  5428.                             if(url = xhr.getResponseHeader('Location'))
  5429.                                 window.location = url;
  5430.                         }
  5431.                     });
  5432.                 }
  5433.             });
  5434.             // Ticket Label Collection
  5435.             var LabelCollection = Backbone.Collection.extend({
  5436.                 model: LabelModel,
  5437.                 isLabelExist: function(labelName, labelId) {
  5438.                     var flag = 1;
  5439.                     _.each(this.models, function (item) {
  5440.                         if(item.get('name').toUpperCase() == labelName.toUpperCase() && item.id != labelId)
  5441.                             flag = 0;
  5442.                     }, this);
  5443.                     return flag;
  5444.                 }
  5445.             });
  5446.             // Ticket Collection
  5447.             var TicketCollection = AppCollection.extend({
  5448.                 model: TicketModel,
  5449.                 url: \"{{ path('helpdesk_member_ticket_collection_xhr') }}\",
  5450.                 filterParameters: {
  5451.                     label: \"\",
  5452.                     new: \"\",
  5453.                     unassigned: \"\",
  5454.                     notreplied: \"\",
  5455.                     mine: \"\",
  5456.                     starred: \"\",
  5457.                     trashed: \"\",
  5458.                     label: \"\",
  5459.                     status: \"\",
  5460.                     search: \"\",
  5461.                     agent: \"\",
  5462.                     customer: \"\",
  5463.                     priority: \"\",
  5464.                     type: \"\",
  5465.                     group: \"\",
  5466.                     team: \"\",
  5467.                     tag: \"\",
  5468.                     mailbox : \"\",
  5469.                     source : \"\",
  5470.                     after: \"\",
  5471.                     before: \"\",
  5472.                     repliesLess: \"\",
  5473.                     repliesMore: \"\",
  5474.                 },
  5475.                 parseRecords: function (response, options) {
  5476.                     return response.tickets;
  5477.                 },
  5478.                 syncData: function() {
  5479.                     app.appView.showLoader();
  5480.                     \$('.select-all-checkbox').prop('checked', false);
  5481.                     this.fetch({
  5482.                         data: this.getValidParameters(),
  5483.                         reset: true,
  5484.                         success: function(model, response) {
  5485.                             ticketQuickViewCollection.reset()
  5486.                             app.appView.hideLoader();
  5487.                             var ticketListView = new TicketList();
  5488.                             app.pager.paginationData = response.pagination;
  5489.                             var url = app.pager.paginationData.url;
  5490.                             if(ticketCollection.length == 0 && app.pager.paginationData.current != \"0\")
  5491.                                 router.navigate(url.replace('replacePage', app.pager.paginationData.last),{trigger: true});
  5492.                             else {
  5493.                                 app.pager.render();
  5494.                                 statusListDetails = response.tabs;
  5495.                                 labelDetails = response.labels;
  5496.                                 labelListView.render();
  5497.                             }
  5498.                             if (globalMessageResponse) {
  5499.                                 app.appView.renderResponseAlert(globalMessageResponse);
  5500.                             }
  5501.                             globalMessageResponse = null;
  5502.                             sideFilter.backToFilter()
  5503.                         },
  5504.                         error: function (model, xhr, options) {
  5505.                             app.appView.hideLoader();
  5506.                             if(url = xhr.getResponseHeader('Location'))
  5507.                                 window.location = url;
  5508.                         }
  5509.                     });
  5510.                 },
  5511.                 batchOperation: function(data) {
  5512.                     var self = this;
  5513.                     app.appView.showLoader();
  5514.                     \$.ajax({
  5515.                         url : \"{{ path('helpdesk_member_ticket_collection_mass_action_xhr') }}\",
  5516.                         type : 'POST',
  5517.                         data : {data : data},
  5518.                         dataType : 'json',
  5519.                         success : function(response) {
  5520.                             app.appView.hideLoader();
  5521.                             globalMessageResponse = response;
  5522.                             self.syncData();
  5523.                         },
  5524.                         error: function (xhr) {
  5525.                             if(url = xhr.getResponseHeader('Location'))
  5526.                                 window.location = url;
  5527.                             var response = warningResponse;
  5528.                             if(xhr.responseJSON)
  5529.                                 response = xhr.responseJSON;
  5530.                             app.appView.hideLoader();
  5531.                             app.appView.renderResponseAlert(response);
  5532.                             \$('.mass-action-checkbox').prop('checked', false);
  5533.                         }
  5534.                     });
  5535.                 }
  5536.             });
  5537.             // Ticket Quick View Collection
  5538.             var TicketQuickViewCollection = Backbone.Collection.extend({
  5539.                 model: TicketQuickViewModel,
  5540.                 isModelSynced: function(id) {
  5541.                     if (model = this.get(id)) {
  5542.                         if (parseInt(model.attributes.isSynced)) {
  5543.                             return model;
  5544.                         }
  5545.                     }
  5546.                     return false;
  5547.                 },
  5548.                 initialize: function() {
  5549.                     _.bindAll(this, 'getNextPrev', 'nextElement', 'previousElement');
  5550.                 },
  5551.                 getNextPrev : function(id) {
  5552.                     var data = {};
  5553.                     currentModel = ticketQuickViewCollection.get(id)
  5554.                     data['next'] = (model = this.nextElement(currentModel)) ? model.id : 0;
  5555.                     data['previous'] = (model = this.previousElement(currentModel)) ? model.id : 0;
  5556.                     return data;
  5557.                 },
  5558.                 nextElement: function(model) {
  5559.                     var index = ticketQuickViewCollection.indexOf(model);
  5560.                     if ((index + 1) === ticketQuickViewCollection.length)
  5561.                         return 0;
  5562.                     return ticketQuickViewCollection.at(index + 1);
  5563.                 },
  5564.                 previousElement: function(model) {
  5565.                     var index = ticketQuickViewCollection.indexOf(model);
  5566.                     if (index === 0 )
  5567.                         return 0;
  5568.                     return ticketQuickViewCollection.at(index - 1);
  5569.                 }
  5570.             });
  5571.             // Filter
  5572.             var Filter = app.Filter.extend({
  5573.                 defaultSortIndex: 'ticket.updatedAt',
  5574.                 sortText: \"{% trans %}Sort By:{% endtrans %} \",
  5575.                 defaultSortText: \"{% trans %}Sort By:{% endtrans %} {% trans %}Last Replied{% endtrans %}\",
  5576.                 template : _.template(\$(\"#ticket_list_sorting_tmp\").html()),
  5577.                 events : {
  5578.                     'keyup .uv-search-inline' : 'search',
  5579.                     'change .asset-visibility input[type=\"checkbox\"]': 'filterAssetsVisibility'
  5580.                 },
  5581.                 filterAssetsVisibilityOnLoad: function() {
  5582.                     if(localStorage.getItem('assets-visibility')) {
  5583.                         var assets = JSON.parse(localStorage.getItem('assets-visibility'));
  5584.                         \$.each(assets, function(asset, assetVal) {
  5585.                             if(assetVal) {
  5586.                                 \$('span[data-index=\"' + asset + '\"], td[data-index=\"' +asset + '\"], th[data-index=\"' + asset + '\"]').show()
  5587.                                 \$('#' + asset).prop('checked', true);
  5588.                             } else {
  5589.                                 \$('span[data-index=\"' + asset + '\"], td[data-index=\"' +asset + '\"], th[data-index=\"' + asset + '\"]').hide()
  5590.                                 \$('#' + asset).prop('checked', false);
  5591.                             }
  5592.                         })
  5593.                     }
  5594.                 },
  5595.                 filterAssetsVisibility: function(e) {
  5596.                     var assets = {};
  5597.                     \$('.asset-visibility input').each(function() {
  5598.                         var asset = \$(this).val();
  5599.                         if(\$(this).is(':checked')) {
  5600.                             assets[asset] = 1;
  5601.                             \$('span[data-index=\"' + asset + '\"], td[data-index=\"' + asset + '\"], th[data-index=\"' + asset + '\"]').show()
  5602.                         } else {
  5603.                             assets[asset] = 0;
  5604.                             \$('span[data-index=\"' + asset + '\"], td[data-index=\"' + asset + '\"], th[data-index=\"' + asset + '\"]').hide()
  5605.                         }
  5606.                     });
  5607.                     localStorage.setItem('assets-visibility', JSON.stringify(assets));
  5608.                 },
  5609.                 search : _.debounce(function(e) {
  5610.                     this.collection.reset();
  5611.                     this.collection.state.currentPage = null;
  5612.                     this.collection.filterParameters.search = Backbone.\$(e.target).val();
  5613.                     var queryString = app.appView.buildQuery(\$.param(this.collection.getValidParameters()));
  5614.                     router.navigate(queryString,{trigger: true});
  5615.                 }, 1000)
  5616.             });
  5617.             // Side Filter View
  5618.             var SideFilter = Backbone.View.extend({
  5619.                 el: \$(\".uv-filter-view\"),
  5620.                 isRecurrsiveCalls: 0,
  5621.                 isReadyFlag: 0,
  5622.                 appliedFilterOptions: {},
  5623.                 tempAppliedFilterOptions: {},
  5624.                 events: {
  5625.                     'change #saved-filter': 'applySavedFilter',
  5626.                     'input .uv-field-block input' : 'searchFilterOption',
  5627.                     'click .uv-dropdown-list li' : 'applyFilter',
  5628.                     'dp.change .range input': 'applyFilter',
  5629.                     'click .uv-filtered-tags .uv-btn-tag' : 'removeFilter',
  5630.                     'change .custom-filter' : 'filterByCustom',
  5631.                     'change #repliesLess-filter-input' : 'filterByRepliesLessThan',
  5632.                     'change #repliesMore-filter-input' : 'filterByRepliesMoreThan',
  5633.                     'keyup .search-custom, change .search-custom' : 'filterByCustom',
  5634.                     'click .new-saved-reply, .edit-saved-reply, .uv-filter-paper .uv-customize': 'addEditSavedReply',
  5635.                     'click .back-to-filter': 'backToFilter',
  5636.                     'click .uv-filter-edit .uv-btn-tag': 'removeSavedFilterOption',
  5637.                     'click .uv-filter-edit .save-filter, .uv-filter-edit .update-filter' : \"saveSavedFilter\",
  5638.                     'click .uv-filter-edit .uv-action-buttons .uv-btn-remove': 'removeSavedFilter'
  5639.                 },
  5640.                 loaderTemplate: _.template(\$(\"#loader-tmp\").html()),
  5641.                 addEditSavedReplyTemplate: _.template(\$(\"#add_edit_saved_filter_tmp\").html()),
  5642.                 checkOptionAvailable: function() {
  5643.                     this.isReadyFlag = 0;
  5644.                     var self = this;
  5645.                     var fetchOptions = {};
  5646.                     _.each(ticketCollection.filterParameters, function (filter,key) {
  5647.                         if(jQuery.inArray(key, ['customer','tag','label']) !== -1) {
  5648.                             if(filter != null && filter != '') {
  5649.                                 filter = filter.split(',');
  5650.                                 if(typeof fetchOptions[key] === 'undefined')
  5651.                                     fetchOptions[key] = [];
  5652.                                 savedOptionsIds = [];
  5653.                                 if(sideFilterModel.has(key)) {
  5654.                                     _.each(sideFilterModel.get(key), function (option) {
  5655.                                         savedOptionsIds.push(parseInt(option.id))
  5656.                                     })
  5657.                                 }
  5658.                                 _.each(filter, function (item) {
  5659.                                     if(jQuery.inArray(parseInt(item), savedOptionsIds) == -1) {
  5660.                                         fetchOptions[key].push(parseInt(item));
  5661.                                         self.isReadyFlag = 1;
  5662.                                     }
  5663.                                 })
  5664.                             }
  5665.                         }
  5666.                     });
  5667.                     return fetchOptions;
  5668.                 },
  5669.                 render: function() {
  5670.                     fetchOptions = this.checkOptionAvailable();
  5671.                     if(this.isReadyFlag && !this.isRecurrsiveCalls) {
  5672.                         this.isReadyFlag = 0;
  5673.                         this.isRecurrsiveCalls = 1;
  5674.                         sideFilterModel.loadFilterOptions(fetchOptions)
  5675.                     } else {
  5676.                         var appliedFilterOptions = {};
  5677.                         \$('.uv-filtered-tags').html(\"\")
  5678.                         var self = this;
  5679.                         var displayFlag = 0;
  5680.                         _.each(ticketCollection.filterParameters, function (filter, key) {
  5681.                             if(jQuery.inArray(key, ['customer', 'agent', 'priority', 'type', 'group', 'team', 'tag', 'mailbox', 'source', 'after', 'before', 'repliesLess', 'repliesMore']) !== -1) {
  5682.                                 if(filter != null && filter != '') {
  5683.                                     displayFlag = 1;
  5684.                                     filter = filter.split(',');
  5685.                                     appliedFilterOptions[key] = {'name': key.charAt(0).toUpperCase() + key.slice(1)};
  5686.                                     appliedFilterOptions[key]['options'] = [];
  5687.                                     _.each(filter, function (value) {
  5688.                                         if(key == 'after' || key == 'before' || key == 'repliesLess' || key == 'repliesMore') {
  5689.                                             \$(\"#\" + key + \"-filter-input\").val(filter)
  5690.                                             appliedFilterOptions[key]['options'].push({'id': filter, 'name': filter});
  5691.                                         } else {
  5692.                                             savedOptions = sideFilterModel.get(key)
  5693.                                             _.each(savedOptions, function (item) {
  5694.                                                 if(item.id == value) {
  5695.                                                     appliedFilterOptions[key]['options'].push({'id': item.id, 'name': item.name});
  5696.                                                     parent = \$('#'+key+'-filter')
  5697.                                                     parent.find('.uv-filtered-tags').append(\"<a class='uv-btn-tag' href='#' data-id='\" + item.id + \"'>\" + item.name + \"<span class='uv-icon-remove-dark'></span></a>\")
  5698.                                                     parent.find('input').val('')
  5699.                                                 }
  5700.                                             })
  5701.                                         }
  5702.                                     });
  5703.                                 }
  5704.                             } else if(jQuery.inArray(key, ['new','unassigned','notreplied','mine','starred','trashed']) !== -1) {
  5705.                                 if(filter != null && filter != '') {
  5706.                                     displayFlag = 1;
  5707.                                     appliedFilterOptions[key] = {'name': \"{{ 'Label'|trans }}\"};
  5708.                                     appliedFilterOptions[key]['options'] = [];
  5709.                                     var optionName = (key == 'mine') ? \"{% trans %}Assigned to me{% endtrans %}\" : key.charAt(0).toUpperCase() + key.slice(1);
  5710.                                     appliedFilterOptions[key]['options'].push({'id': key, 'name': optionName});
  5711.                                 } else {
  5712.                                     if(!ticketCollection.filterParameters.new && !ticketCollection.filterParameters.unassigned && !ticketCollection.filterParameters.notreplied && !ticketCollection.filterParameters.mine && !ticketCollection.filterParameters.starred && !ticketCollection.filterParameters.trashed &&! ticketCollection.filterParameters.label) {
  5713.                                         appliedFilterOptions['all'] = {'name': \"{{ 'Label'|trans }}\"};
  5714.                                         appliedFilterOptions['all']['options'] = [];
  5715.                                         appliedFilterOptions['all']['options'].push({'id': 1, 'name': \"{{ 'All'|trans }}\"});
  5716.                                     }
  5717.                                 }
  5718.                             } else if(key == 'label') {
  5719.                                 if(filter != null && filter != '') {
  5720.                                     displayFlag = 1;
  5721.                                     var labelModel = labelCollection.get(filter);
  5722.                                     appliedFilterOptions[key] = {'name': \"{{ 'Label'|trans }}\"};
  5723.                                     appliedFilterOptions[key]['options'] = [];
  5724.                                     if(labelModel) {
  5725.                                         appliedFilterOptions[key]['options'] = [];
  5726.                                         appliedFilterOptions[key]['options'].push({'id': labelModel.attributes.id, 'name': labelModel.attributes.name});
  5727.                                     } else {
  5728.                                         savedOptions = sideFilterModel.get(key)
  5729.                                         _.each(savedOptions, function (item) {
  5730.                                             if(item.id == filter) {
  5731.                                                 appliedFilterOptions[key]['options'].push({'id': item.id, 'name': item.name});
  5732.                                             }
  5733.                                         });
  5734.                                     }
  5735.                                 } else {
  5736.                                     if(!ticketCollection.filterParameters.new && !ticketCollection.filterParameters.unassigned && !ticketCollection.filterParameters.notreplied && !ticketCollection.filterParameters.mine && !ticketCollection.filterParameters.starred && !ticketCollection.filterParameters.trashed &&! ticketCollection.filterParameters.label) {
  5737.                                         appliedFilterOptions['all'] = {'name': \"{{ 'Label'|trans }}\"};
  5738.                                         appliedFilterOptions['all']['options'] = [];
  5739.                                         appliedFilterOptions['all']['options'].push({'id': 1, 'name': \"{{ 'All'|trans }}\"});
  5740.                                     }
  5741.                                 }
  5742.                             } else if(key == 'status') {
  5743.                                 appliedFilterOptions[key] = {'name': \"{{ 'Status'|trans }}\"};
  5744.                                 appliedFilterOptions[key]['options'] = []
  5745.                                 if(filter != null && filter != '' && filter != 1) {
  5746.                                     displayFlag = 1;
  5747.                                     appliedFilterOptions[key]['options'].push({'id': filter, 'name': \$(\".status-list li a[data-id='\" + filter + \"'] .name\").text().trim()});
  5748.                                 } else {
  5749.                                     appliedFilterOptions[key]['options'].push({'id': 1,'name': \"{{ 'Open'|trans }}\"});
  5750.                                 }
  5751.                             } else if(key == 'search') {
  5752.                                 if(filter != null && filter != '') {
  5753.                                     displayFlag = 1;
  5754.                                     appliedFilterOptions[key] = {'name': \"{{ 'Search Query'|trans }}\"};
  5755.                                     appliedFilterOptions[key]['options'] = [];
  5756.                                     appliedFilterOptions[key]['options'].push({'id': filter, 'name': filter});
  5757.                                 }
  5758.                             } else if(key == 'custom') {
  5759.                                 if(filter != null && filter != '') {
  5760.                                     self.\$el.find('[data-filter=\"custom\"]').remove();
  5761.                                     displayFlag = 1;
  5762.                                     var realKey = key;
  5763.                                     var checkBoxStore = Array();
  5764.                                     var dataValueValueSeprator = '_';
  5765.                                     var columnSeperator = '|';
  5766.                                     var multiOptions = filter.split(columnSeperator);
  5767.                                     var multiKeyValue, multiKeyValueValue, ele, newEle;
  5768.                                     _.each(multiOptions, function(valueData, indexData) {
  5769.                                         if(!valueData)
  5770.                                             return;
  5771.                                         multiKeyValue = valueData.split(dataValueValueSeprator);
  5772.                                         multiKeyValueValue = multiKeyValue[1].split(',');
  5773.                                         eleSelector = '[data-value=\"' + multiKeyValue[0] + '\"]';
  5774.                                         ele = \$(eleSelector);
  5775.                                         if(ele[0].type == 'radio') {
  5776.                                             var dataValue = multiKeyValue[0];
  5777.                                             name = ele.parents('.uv-element-block:not(.radio)').find('label:first').text().trim()
  5778.                                             value =  \$(eleSelector + '[value=\"' + multiKeyValue[1] + '\"]').parent().next().text();
  5779.                                             appliedFilterOptions['z-'+dataValue] = {'name': name, 'type': 'radio'};
  5780.                                             appliedFilterOptions['z-'+dataValue]['options'] = [];
  5781.                                             appliedFilterOptions['z-'+dataValue]['options'].push({'id': multiKeyValue[1], 'name': value});
  5782.                                         } else if(ele[0].type == 'checkbox') {
  5783.                                             var dataValue = multiKeyValue[0];
  5784.                                             if(\$.inArray(dataValue, checkBoxStore) >= 0)
  5785.                                                 return;
  5786.                                             checkBoxStore.push(dataValue);
  5787.                                             name = ele.parents('.uv-element-block:not(.checkbox)').find('label:first').text().trim()
  5788.                                             appliedFilterOptions['z-'+dataValue] = {'name': name, 'type': 'checkbox'};
  5789.                                             appliedFilterOptions['z-'+dataValue]['options'] = [];
  5790.                                             var optionName, optionValue;
  5791.                                             _.each(multiKeyValueValue, function(value) {
  5792.                                                 newEle = \$(eleSelector + '[value=\"' + value + '\"]')
  5793.                                                 optionValue = dataValue + dataValueValueSeprator + newEle.val();
  5794.                                                 optionName = newEle.parent().next().text();
  5795.                                                 if(optionValue && optionName) {
  5796.                                                     appliedFilterOptions['z-'+dataValue]['options'].push({'id': value, 'name': optionName});
  5797.                                                 }
  5798.                                             });
  5799.                                         } else if(ele[0].type == 'select-multiple') {
  5800.                                             var dataValue = multiKeyValue[0];
  5801.                                             filter = multiKeyValueValue;
  5802.                                             key = ele.attr('id');
  5803.                                             name = ele.parents('.uv-element-block').find('label:first').text().trim()
  5804.                                             appliedFilterOptions['z-'+dataValue] = {'name': name, 'type': 'select-multiple'};
  5805.                                             appliedFilterOptions['z-'+dataValue]['options'] = [];
  5806.                                             _.each(filter, function (value) {
  5807.                                                 var optionName;
  5808.                                                 if(optionName = \$(\"#\"+key+\" option[value='\" + value + \"']\").text()) {
  5809.                                                     appliedFilterOptions['z-'+dataValue]['options'].push({'id': value, 'name': optionName});
  5810.                                                 }
  5811.                                             });
  5812.                                         } else if(ele[0].type == 'text' || ele[0].type == 'number') {
  5813.                                             filter = multiKeyValue[1];
  5814.                                             if(filter != null && filter != '') {
  5815.                                                 filter = filter.replace(/\\+/g,' ');
  5816.                                                 displayFlag = 1;
  5817.                                                 var dataValue = ele.attr('data-value');
  5818.                                                 name = ele.parents('.uv-element-block').find('label:first').text().trim()
  5819.                                                 appliedFilterOptions['z-'+dataValue] = {'name': name, 'type': ele[0].type};
  5820.                                                 appliedFilterOptions['z-'+dataValue]['options'] = [];
  5821.                                                 appliedFilterOptions['z-'+dataValue]['options'].push({'id': 1, 'name': filter});
  5822.                                             }
  5823.                                         }
  5824.                                     })
  5825.                                 }
  5826.                             }
  5827.                             if('after' == key || 'before' == key || 'repliesLess' == key || 'repliesMore' == key) {
  5828.                                 \$('#'+ key +'-filter-input').val(filter);
  5829.                             }
  5830.                         })
  5831.                         if(displayFlag) {
  5832.                             self.\$el.find('.uv-filter-options .uv-action-buttons').html(\"\")
  5833.                             if(\$(\"#saved-filter\").val() != null && \$(\"#saved-filter\").val() != '' && Backbone.history.getFragment() == userFilters[\$(\"#saved-filter\").val()]['route']) {
  5834.                                 self.\$el.find('.uv-filter-options .uv-action-buttons').append(\"<a class='uv-btn edit-saved-reply' href='#'>{{ 'Edit'|trans }}</a>\").show();
  5835.                                 \$('.uv-filter-paper .uv-customize').show()
  5836.                             } else {
  5837.                                 self.\$el.find('.uv-filter-options .uv-action-buttons').append(\"<a class='uv-btn new-saved-reply' href='#'>{{ 'New'|trans }}</a>\").show();
  5838.                                 if(\$(\"#saved-filter\").val() != null && \$(\"#saved-filter\").val() != '') {
  5839.                                     self.\$el.find('.uv-filter-options .uv-action-buttons').append(\"<a class='uv-btn edit-saved-reply' href='#'>{{ 'Update'|trans }}</a>\").show();
  5840.                                     \$('.uv-filter-paper .uv-customize').show()
  5841.                                 } else {
  5842.                                     \$('.uv-filter-paper .uv-customize').hide()
  5843.                                 }
  5844.                             }
  5845.                         } else {
  5846.                             \$('.uv-filter-paper .uv-customize').hide()
  5847.                         }
  5848.                         this.appliedFilterOptions = appliedFilterOptions;
  5849.                         this.tempAppliedFilterOptions = jQuery.extend(true, {}, appliedFilterOptions);
  5850.                     }
  5851.                 },
  5852.                 searchFilterOption: function(e) {
  5853.                     self = this;
  5854.                     currentElement = Backbone.\$(e.currentTarget);
  5855.                     dropdown = currentElement.siblings('.uv-dropdown-list');
  5856.                     var filterType =  currentElement.attr('data-filter-type');
  5857.                     if(jQuery.inArray(filterType, ['customer', 'tag']) !== -1) {
  5858.                         self.searchFilterXhr(currentElement);
  5859.                     }
  5860.                 },
  5861.                 searchFilterXhr: _.debounce(function(currentElement) {
  5862.                     var parent = currentElement.parent();
  5863.                     if(\$('.uv-dropdown-other.uv-dropdown-btn-active').parent().attr('id') != parent.attr('id'))
  5864.                         return;
  5865.                     parent.find(\"li:not(.uv-no-results, .uv-filter-info)\").remove();
  5866.                     parent.find(\".uv-filter-info\").show()
  5867.                     if(currentElement.val().length > 1) {
  5868.                         parent.append(this.loaderTemplate())
  5869.                         parent.find('.uv-filter-info').text(\"{% trans %}Searching{% endtrans %} ...\")
  5870.                         if(self.xhrReq)
  5871.                             self.xhrReq.abort();
  5872.                         self.xhrReq = \$.ajax({
  5873.                             url : \"{{ path('helpdesk_member_ticket_collection_search_filter_options_xhr') }}\",
  5874.                             type : 'GET',
  5875.                             data: {\"type\" : currentElement.attr('data-filter-type'), \"query\" : currentElement.val(), 'not' : ticketCollection.filterParameters[currentElement.attr('data-filter-type')]},
  5876.                             dataType : 'json',
  5877.                             success : function(response) {
  5878.                                 self.xhrReq = 0;
  5879.                                 parent.find('.uv-loader').remove()
  5880.                                 parent.find('.uv-filter-info').text(\"{{ 'Type atleast 2 letters'|trans }}\").hide();
  5881.                                 if(response.length == 0) {
  5882.                                     parent.find('.uv-no-results').show()
  5883.                                 } else {
  5884.                                     parent.find('.uv-no-results').hide();
  5885.                                     _.each(response, function(item) {
  5886.                                         if(currentElement.attr('data-filter-type') == 'customer') {
  5887.                                             var img = item.smallThumbnail ? \"{{ app.request.scheme ~'://' ~ app.request.httpHost ~ asset('') }}\"+item.smallThumbnail : \"{{ asset(default_customer_image_path)}}\";
  5888.                                             parent.find('.uv-dropdown-list ul').append(\"<li data-id='\" + item.id + \"'><img src='\" + img + \"'/>\" + item.name + \"</li>\")
  5889.                                         } else
  5890.                                             parent.find('.uv-dropdown-list ul').append(\"<li data-id='\" + item.id + \"'>\" + item.name + \"</li>\")
  5891.                                     });
  5892.                                 }
  5893.                             },
  5894.                             error: function (xhr) {
  5895.                                 self.xhrReq = 0;
  5896.                                 parent.find('.uv-loader').remove()
  5897.                                 parent.find('.uv-no-results').hide();
  5898.                                 parent.find('.uv-filter-info').text(\"{{ 'Type atleast 2 letters'|trans }}\").show();
  5899.                                 if(url = xhr.getResponseHeader('Location'))
  5900.                                     window.location = url;
  5901.                             }
  5902.                         });
  5903.                     } else {
  5904.                         parent.find('.uv-no-results').hide();
  5905.                     }
  5906.                 },1000),
  5907.                 applySavedFilter: function(e) {
  5908.                     var element = Backbone.\$(e.currentTarget);
  5909.                     if(element.val() != \"\") {
  5910.                         var element = Backbone.\$(e.currentTarget);
  5911.                         router.navigate(userFilters[element.val()]['route'], {trigger: true});
  5912.                     } else {
  5913.                         router.navigate('', {trigger: true});
  5914.                     }
  5915.                 },
  5916.                 applyFilter: function(e) {
  5917.                     currentElement = Backbone.\$(e.currentTarget);
  5918.                     if(currentElement.attr(\"data-id\")) {
  5919.                         var flag = 1;
  5920.                         parent = currentElement.parents(\".uv-field-block\");
  5921.                         filterType = parent.find('input').attr('data-filter-type');
  5922.                         if(filterType == \"customer\" || filterType == 'tag') {
  5923.                             sideFilterModel.updateModel(filterType, {'id': currentElement.attr('data-id'), 'name': currentElement.text()})
  5924.                             parent.find(\".uv-no-results\").hide()
  5925.                             parent.find(\".uv-filter-info\").show().text(\"{{ 'Type atleast 2 letters'|trans }}\")
  5926.                             parent.find(\"li:not(.uv-no-results, .uv-filter-info)\").remove();
  5927.                         } else {
  5928.                             if(ticketCollection.filterParameters[filterType]) {
  5929.                                 ids = ticketCollection.filterParameters[filterType].split(',')
  5930.                                 if(jQuery.inArray(currentElement.attr('data-id'), ids) !== -1)
  5931.                                     flag = 0;
  5932.                             }
  5933.                         }
  5934.                         parent.find('input').val('')
  5935.                         if(jQuery.inArray(filterType, ['agent', 'priority', 'type', 'group', 'team', 'mailbox', 'source']) !== -1) {
  5936.                             parent.find(\"li:not(.uv-no-results)\").show()
  5937.                         }
  5938.                         if(flag) {
  5939.                             parent.find('.uv-filtered-tags').append(\"<a class='uv-btn-tag' href='#' data-id='\" + currentElement.attr('data-id') + \"'>\"+currentElement.text()+\"<span class='uv-icon-remove-dark'></span></a>\")
  5940.                             ticketCollection.state.order = null;
  5941.                             ticketCollection.state.sortKey = null;
  5942.                             ticketCollection.state.currentPage = null;
  5943.                             ticketCollection.filterParameters[filterType] = this.joinTagValues(parent.find(\".uv-filtered-tags\"));
  5944.                             var queryString = app.appView.buildQuery(\$.param(ticketCollection.getValidParameters()));
  5945.                             router.navigate(queryString, {trigger: true});
  5946.                         }
  5947.                     } else {
  5948.                         filterType = currentElement.attr('data-filter-type');
  5949.                         if(filterType == 'before' || filterType == \"after\") {
  5950.                             ticketCollection.state.order = null;
  5951.                             ticketCollection.state.sortKey = null;
  5952.                             ticketCollection.state.currentPage = null;
  5953.                             ticketCollection.filterParameters[filterType] = currentElement.val();
  5954.                             var queryString = app.appView.buildQuery(\$.param(ticketCollection.getValidParameters()));
  5955.                             router.navigate(queryString, {trigger: true});
  5956.                         }
  5957.                     }
  5958.                 },
  5959.                 removeFilter: function(e) {
  5960.                     e.preventDefault()
  5961.                     currentElement = Backbone.\$(e.currentTarget);
  5962.                     filterType = currentElement.parents('.uv-field-block').find('input').attr('data-filter-type')
  5963.                     var options = ticketCollection.filterParameters[filterType];
  5964.                     options = options.split(',');
  5965.                     var index = options.indexOf(currentElement.attr('data-id'));
  5966.                     options.splice(index, 1);
  5967.                     ticketCollection.state.order = null;
  5968.                     ticketCollection.state.sortKey = null;
  5969.                     ticketCollection.state.currentPage = null;
  5970.                     ticketCollection.filterParameters[filterType] = options.join(',');
  5971.                     currentElement.remove()
  5972.                     var queryString = app.appView.buildQuery(\$.param(ticketCollection.getValidParameters()));
  5973.                     router.navigate(queryString, {trigger: true});
  5974.                 },
  5975.                 joinTagValues: function(parent) {
  5976.                     var ids = new Array();
  5977.                     parent.find('.uv-btn-tag').each(function() {
  5978.                         ids.push(\$(this).attr('data-id'))
  5979.                     });
  5980.                     return ids.join();
  5981.                 },
  5982.                 filterByRepliesMoreThan: _.debounce(function(e) {
  5983.                     ticketCollection.state.order = null;
  5984.                     ticketCollection.state.sortKey = null;
  5985.                     ticketCollection.state.currentPage = null;
  5986.                     ticketCollection.filterParameters.repliesMore = \$(e.target).val();
  5987.                     var queryString = app.appView.buildQuery(\$.param(ticketCollection.getValidParameters()));
  5988.                     router.navigate(queryString, { trigger: true });
  5989.                 }, 1000),
  5990.                 filterByRepliesLessThan: _.debounce(function(e) {
  5991.                     ticketCollection.state.order = null;
  5992.                     ticketCollection.state.sortKey = null;
  5993.                     ticketCollection.state.currentPage = null;
  5994.                     ticketCollection.filterParameters.repliesLess = \$(e.target).val();
  5995.                     var queryString = app.appView.buildQuery(\$.param(ticketCollection.getValidParameters()));
  5996.                     router.navigate(queryString, { trigger: true });
  5997.                 }, 1000),
  5998.                 filterByCustom: _.debounce(function(e) {
  5999.                     var custom = '';
  6000.                     var checkBoxStore = Array();
  6001.                     var indexValueSeperator = '_';
  6002.                     var columnSeperator = '|';
  6003.                     Backbone.\$('.custom-filter').each(function(){
  6004.                         if(\$(this).context.type == 'radio' && \$(this).is(':checked')) {
  6005.                             custom += \$(this).attr('data-value') + indexValueSeperator + \$(this).val() + columnSeperator;
  6006.                         } else if(\$(this).context.type == 'checkbox' && \$(this).is(':checked')) {
  6007.                             var checkboxValue = Array();
  6008.                             var dataValue = \$(this).attr('data-value');
  6009.                             if(\$.inArray(dataValue, checkBoxStore) >= 0)
  6010.                                 return;
  6011.                             \$.each(\$('[data-value=\"'+ dataValue +'\"]:checked'), function() {
  6012.                                 checkboxValue.push(\$(this).val());
  6013.                             });
  6014.                             checkBoxStore.push(dataValue);
  6015.                             custom += dataValue + indexValueSeperator + checkboxValue.join() + columnSeperator;
  6016.                         } else if(\$(this).context.type == 'select-multiple' && \$(this).val()) {
  6017.                             custom += \$(this).attr('data-value') + indexValueSeperator + \$(this).val().join() + columnSeperator;
  6018.                         }
  6019.                     })
  6020.                     Backbone.\$('.search-custom').each(function(){
  6021.                         if(\$(this).val()){
  6022.                             custom += \$(this).attr('data-value') + indexValueSeperator + \$(this).val() + columnSeperator;
  6023.                         }
  6024.                     })
  6025.                     custom = custom.replace(/\\|\$/, '');
  6026.                     ticketCollection.state.order = null;
  6027.                     ticketCollection.state.sortKey = null;
  6028.                     ticketCollection.state.currentPage = null;
  6029.                     ticketCollection.filterParameters.custom = custom;
  6030.                     var queryString = app.appView.buildQuery(\$.param(ticketCollection.getValidParameters()));
  6031.                     router.navigate(queryString,{trigger: true});
  6032.                 }, 1000),
  6033.                 backToFilter: function(e) {
  6034.                     if(e)
  6035.                         e.preventDefault()
  6036.                     this.\$el.find('.uv-filter-options').show()
  6037.                     this.\$el.find('.uv-filter-edit').hide()
  6038.                 },
  6039.                 addEditSavedReply: function(e) {
  6040.                     e.preventDefault()
  6041.                     var context = {};
  6042.                     this.tempAppliedFilterOptions = jQuery.extend(true, {}, this.appliedFilterOptions);
  6043.                     if(Backbone.\$(e.currentTarget).is('.new-saved-reply')) {
  6044.                         context = {'id': 0, 'name': '', 'is_default': 0, 'filters': this.tempAppliedFilterOptions};
  6045.                     } else {
  6046.                         context = userFilters[\$(\"#saved-filter\").val()];
  6047.                         context.filters = this.tempAppliedFilterOptions;
  6048.                         userFilters[\$(\"#saved-filter\").val()]
  6049.                     }
  6050.                     \$('.uv-filter-edit').html('')
  6051.                     \$('.uv-filter-edit').append(this.addEditSavedReplyTemplate(context));
  6052.                     this.\$el.find('.uv-filter-options').hide()
  6053.                     this.\$el.find('.uv-filter-edit').show()
  6054.                 },
  6055.                 removeSavedFilterOption: function(e) {
  6056.                     e.preventDefault()
  6057.                     var parent = Backbone.\$(e.currentTarget).parents('.uv-element-block');
  6058.                     var elementIndex = Backbone.\$(e.currentTarget).index();
  6059.                     var filterType = parent.attr('data-filter');
  6060.                     var filterId = Backbone.\$(e.currentTarget).attr('data-id');
  6061.                     delete this.tempAppliedFilterOptions[filterType]['options'][elementIndex]
  6062.                     Backbone.\$(e.currentTarget).remove()
  6063.                     if(!parent.find('.uv-btn-tag').length) {
  6064.                         parent.remove()
  6065.                         delete this.tempAppliedFilterOptions[filterType];
  6066.                     }
  6067.                     if(this.getSavedFilterRoute() == '') {
  6068.                         this.backToFilter();
  6069.                     }
  6070.                 },
  6071.                 saveSavedFilter: function(e) {
  6072.                     e.preventDefault()
  6073.                     if(Backbone.\$(e.currentTarget).hasClass('save-filter'))
  6074.                         this.saveFilterAjax('POST')
  6075.                     else {
  6076.                         this.saveFilterAjax('PUT')
  6077.                     }
  6078.                 },
  6079.                 saveFilterAjax: function(method) {
  6080.                     var inputElement = \$('.uv-filter-edit input.name');
  6081.                     inputElement.removeClass('uv-field-error');
  6082.                     \$('.uv-field-message').remove()
  6083.                     if(inputElement.val() != undefined && inputElement.val() == '') {
  6084.                         inputElement.addClass('uv-field-error');
  6085.                         inputElement.parent().after(\"<span class='uv-field-message'>{{ 'This field is mandatory'|trans }}</span>\");
  6086.                     } else {
  6087.                         var data = \$('.uv-filter-edit form').serializeObject();
  6088.                         data['route'] = this.getSavedFilterRoute();
  6089.                         app.appView.showLoader();
  6090.                         self = this;
  6091.                         \$.ajax({
  6092.                             url : \"{{ path('helpdesk_member_saved_filters_xhr') }}\",
  6093.                             type : method,
  6094.                             data: data,
  6095.                             dataType : 'json',
  6096.                             success : function(response) {
  6097.                                 app.appView.hideLoader();
  6098.                                 userFilters[response.filter.id] = response.filter;
  6099.                                 \$(\"#saved-filter\").html(\"<option value=''>-- {{ 'Saved Filter'|trans }} --</option>\")
  6100.                                 _.each(userFilters, function(filter, key) {
  6101.                                     if(response.filter.is_default && filter.id != response.filter.id)
  6102.                                         userFilters[key]['is_default'] = 0;
  6103.                                     var selected = '';
  6104.                                     if(response.filter.id == filter.id)
  6105.                                         selected = \"selected\";
  6106.                                     \$(\"#saved-filter\").append(\"<option value='\" + filter.id + \"' selected='\" + selected + \"''>\" + filter.name + \"</option>\")
  6107.                                 })
  6108.                                 \$(\"#saved-filter\").val(response.filter.id)
  6109.                                 app.appView.renderResponseAlert(response);
  6110.                                 self.render();
  6111.                                 self.backToFilter();
  6112.                             },
  6113.                             error: function (xhr) {
  6114.                                 app.appView.hideLoader();
  6115.                                 if(url = xhr.getResponseHeader('Location'))
  6116.                                     window.location = url;
  6117.                             }
  6118.                         });
  6119.                     }
  6120.                 },
  6121.                 getSavedFilterRoute: function() {
  6122.                     var filterParameters = {};
  6123.                     temp = [];
  6124.                     _.each(this.tempAppliedFilterOptions, function (filter, key) {
  6125.                         if(jQuery.inArray(key, ['customer', 'agent', 'priority', 'type', 'group', 'team', 'tag', 'mailbox', 'source', 'after', 'before', 'repliesLess', 'repliesMore']) !== -1) {
  6126.                             var ids = [];
  6127.                             _.each(filter['options'], function (item) {
  6128.                                 ids.push(item.id)
  6129.                             });
  6130.                             filterParameters[key] = ids.join(',')
  6131.                         } else if(jQuery.inArray(key, ['new','unassigned','notreplied','mine','starred','trashed']) !== -1) {
  6132.                             filterParameters[key] = 1;
  6133.                         } else if(jQuery.inArray(key, ['label', 'status', 'search']) !== -1) {
  6134.                             _.each(filter['options'], function (item) {
  6135.                                 filterParameters[key] = item.id;
  6136.                             });
  6137.                         } else {
  6138.                             custom = key.split(\"z-\")
  6139.                             tempKey = custom[1];
  6140.                             if(filter.type == 'text' || filter.type == 'number') {
  6141.                                 _.each(filter['options'], function (item) {
  6142.                                     temp.push(tempKey + '_' + item.name)
  6143.                                 });
  6144.                             } else if(filter.type == 'radio') {
  6145.                                 var ids = [];
  6146.                                 _.each(filter['options'], function (item) {
  6147.                                     ids.push(item.id)
  6148.                                 });
  6149.                                 temp.push(tempKey + '_' + ids.join(','))
  6150.                             } else if(filter.type == 'checkbox' || filter.type == 'select-multiple') {
  6151.                                 var ids = [];
  6152.                                 _.each(filter['options'], function (item) {
  6153.                                     ids.push(item.id)
  6154.                                 });
  6155.                                 temp.push(tempKey + '_' + ids.join(','))
  6156.                             }
  6157.                         }
  6158.                     })
  6159.                     if(temp.length)
  6160.                         filterParameters['custom'] = temp.join('|');
  6161.                     return app.appView.buildQuery(\$.param(filterParameters));
  6162.                 },
  6163.                 removeSavedFilter: function(e) {
  6164.                     e.preventDefault()
  6165.                     self = this;
  6166.                     app.appView.showLoader();
  6167.                     \$.ajax({
  6168.                         url : \"{{ path('helpdesk_member_saved_filters_xhr') }}/\" + \$(\"#saved-filter\").val(),
  6169.                         type : 'DELETE',
  6170.                         dataType : 'json',
  6171.                         success : function(response) {
  6172.                             app.appView.hideLoader();
  6173.                             delete userFilters[\$(\"#saved-filter\").val()];
  6174.                             \$(\"#saved-filter\").html(\"<option value=''>-- {{ 'Saved Filter'|trans }} --</option>\")
  6175.                             _.each(userFilters, function(filter, key) {
  6176.                                 \$(\"#saved-filter\").append(\"<option value='\" + filter.id + \"'>\" + filter.name + \"</option>\")
  6177.                             })
  6178.                             \$(\"#saved-filter\").val('')
  6179.                             app.appView.renderResponseAlert(response);
  6180.                             self.render();
  6181.                             self.backToFilter();
  6182.                         },
  6183.                         error: function (xhr) {
  6184.                             app.appView.hideLoader();
  6185.                             if(url = xhr.getResponseHeader('Location'))
  6186.                                 window.location = url;
  6187.                         }
  6188.                     });
  6189.                 }
  6190.             });
  6191.             // Ticket Label Item View
  6192.             var LabelItemView = Backbone.View.extend({
  6193.                 tagName: 'li',
  6194.                 className: 'uv-customize-wrapper',
  6195.                 template: _.template(\$(\"#custom_label_tmp\").html()),
  6196.                 events: {
  6197.                     'click .delete': 'confirmRemove',
  6198.                     'click .label-color.dropdown .fa-caret-down' : 'showUpdateLabelPopup'
  6199.                 },
  6200.                 render: function() {
  6201.                     this.\$el.html(this.template(this.model.toJSON()));
  6202.                     if (ticketCollection.filterParameters.label != '') {
  6203.                         if (ticketCollection.filterParameters.label == this.model.id) {
  6204.                             this.\$el.find('a').addClass('uv-aside-active');
  6205.                         }
  6206.                     }
  6207.                     return this;
  6208.                 }
  6209.             });
  6210.             // Ticket List Item View
  6211.             var TicketItem = Backbone.View.extend({
  6212.                 tagName: \"tr\",
  6213.                 template: _.template(\$(\"#ticket_list_item_tmp\").html()),
  6214.                 events: {
  6215.                     'click .uv-star': \"updateStar\",
  6216.                 },
  6217.                 render: function () {
  6218.                     this.model.set({
  6219.                         path: pathToTicket.replace('replaceId', this.model.attributes.id)
  6220.                     });
  6221.                     this.\$el.html(this.template(this.model.toJSON()));
  6222.                     if (this.model.attributes.isAgentView != true) {
  6223.                         this.\$el.addClass('unread')
  6224.                     }
  6225.                     if (!this.model.attributes.agent) {
  6226.                         this.\$el.addClass('not-assigned')
  6227.                     }
  6228.                     return this;
  6229.                 },
  6230.                 updateStar: function(e) {
  6231.                     e.preventDefault();
  6232.                     if (Backbone.\$(e.currentTarget).hasClass('uv-star-active')) {
  6233.                         Backbone.\$(e.currentTarget).removeClass('uv-star-active');
  6234.                     } else {
  6235.                         Backbone.\$(e.currentTarget).addClass('uv-star-active');
  6236.                     }
  6237.                     this.model.save({
  6238.                         id: this.model.id
  6239.                     }, {
  6240.                         patch: true,
  6241.                         url: \"{{ path('helpdesk_member_bookmark_ticket_xhr') }}\",
  6242.                         success: function (model, response, options) {},
  6243.                         error: function (model, xhr, options) {
  6244.                             if (url = xhr.getResponseHeader('Location')) {
  6245.                                 window.location = url;
  6246.                             }
  6247.                         }
  6248.                     });
  6249.                 }
  6250.             });
  6251.             // Ticket List View
  6252.             var TicketList = Backbone.View.extend({
  6253.                 el: \$(\".uv-table table\"),
  6254.                 initialize: function() {
  6255.                     this.render();
  6256.                 },
  6257.                 events: {
  6258.                     'change .mass-action-checkbox' : 'showBulkOptions',
  6259.                 },
  6260.                 showBulkOptions: function() {
  6261.                     var count = 0;
  6262.                     this.\$el.find('.mass-action-checkbox').each(function() {
  6263.                         if (\$(this).is(':checked')) {
  6264.                             count++;
  6265.                         }
  6266.                     });
  6267.                     if (count == \$('.mass-action-checkbox').length) {
  6268.                         \$('.select-all-checkbox').prop('checked', true);
  6269.                     } else {
  6270.                         \$('.select-all-checkbox').prop('checked', false);
  6271.                     }
  6272.                     if (count) {
  6273.                         \$('.uv-action-bar .filter').parent().hide();
  6274.                         \$('.uv-action-bar .mass-action').parent().addClass(\"uv-width-100\").show();
  6275.                         \$('.uv-action-bar-col-rt').hide()
  6276.                     } else {
  6277.                         \$('.uv-action-bar .mass-action').parent().removeClass(\"uv-width-100\").hide();
  6278.                         \$('.uv-action-bar .filter').parent().show();
  6279.                         \$('.uv-action-bar-col-rt').show();
  6280.                     }
  6281.                 },
  6282.                 render: function () {
  6283.                     this.\$el.find('tbody').html('');
  6284.                     if (ticketCollection.length) {
  6285.                         \$('.select-all-checkbox').prop( \"disabled\", false );
  6286.                         _.each(ticketCollection.models, function (item) {
  6287.                             ticketQuickViewCollection.add(new TicketQuickViewModel({id: item.id}))
  6288.                             this.renderTicket(item);
  6289.                         }, this);
  6290.                     } else {
  6291.                         \$('.select-all-checkbox').prop( \"disabled\", true );
  6292.                         this.\$el.find('tbody').append(\"<tr style='text-align: center;'><td colspan='11'>{% trans %}No Record Found{% endtrans %}</td></tr>\")
  6293.                     }
  6294.                     filter.filterAssetsVisibilityOnLoad()
  6295.                     app.appView.relativeTime()
  6296.                 },
  6297.                 renderTicket: function (item) {
  6298.                     var ticketItem = new TicketItem({
  6299.                         model: item
  6300.                     });
  6301.                     this.\$el.find('tbody').append(ticketItem.render().el);
  6302.                 }
  6303.             });
  6304.             // Ticket Label List View
  6305.             var LabelListView = Backbone.View.extend({
  6306.                 el: \$(\".uv-aside\"),
  6307.                 template: _.template(\$(\"#predefined_label_tmp\").html()),
  6308.                 statusTemplate: _.template(\$(\"#ticket_status_list_tmp\").html()),
  6309.                 addEditLabelTemplate: _.template(\$(\"#add_edit_label_tmp\").html()),
  6310.                 events: {
  6311.                     'click .status-list li a': \"filterByStatus\",
  6312.                     'click .add-new-label, .uv-customize': 'addEditLabel',
  6313.                     'click #back-to-labels': 'backToLabels',
  6314.                     'click .uv-color-block': 'setLabelColor',
  6315.                     'click .add-update-btn': 'saveLabel',
  6316.                     'click .uv-add-edit-label .uv-btn-remove': 'removeLabel'
  6317.                 },
  6318.                 render: function() {
  6319.                     var active = \"\";
  6320.                     if (ticketCollection.filterParameters.new != '') {
  6321.                         active = \"new\";
  6322.                     } else if (ticketCollection.filterParameters.unassigned != '') {
  6323.                         active = \"unassigned\";
  6324.                     } else if (ticketCollection.filterParameters.notreplied != '') {
  6325.                         active = \"notreplied\";
  6326.                     }
  6327.                     if (ticketCollection.filterParameters.mine != '') {
  6328.                         active = \"mine\";
  6329.                     } else if (ticketCollection.filterParameters.starred != '') {
  6330.                         active = \"starred\";
  6331.                     } else if (ticketCollection.filterParameters.trashed != '') {
  6332.                         active = \"trashed\";
  6333.                     } else if (ticketCollection.filterParameters.label != '') {
  6334.                         active = \"label\";
  6335.                     }
  6336.                     var data = {
  6337.                         'labelDetails' : labelDetails,
  6338.                         'active' : active
  6339.                     }
  6340.                     this.\$el.find('.predefined-label-list').html(this.template(data));
  6341.                     labelCollection.reset();
  6342.                     labelCollection.set(labelDetails.custom);
  6343.                     this.updateMassLabelList()
  6344.                 },
  6345.                 updateMassLabelList: function() {
  6346.                     this.\$el.find('.uv-aside-custom').html('');
  6347.                     var labelOptionHtml = \"\";
  6348.                     if(labelCollection.length) {
  6349.                         _.each(labelCollection.models, function (item) {
  6350.                             this.renderLabelItem(item);
  6351.                             labelOptionHtml = labelOptionHtml + \"<li data-index='\" + item.id + \"'><a href='#'>\" + item.attributes.name + \"</a></li>\";
  6352.                         }, this);
  6353.                     }
  6354.                     labelOptionHtml = labelOptionHtml ? labelOptionHtml : \"<li data-index='0'>{{ 'No Label Created'|trans }}</li>\";
  6355.                     \$(\".mass-action ul.label\").html(labelOptionHtml);
  6356.                     this.renderStatus();
  6357.                 },
  6358.                 renderLabelItem : function (item) {
  6359.                     var labelItem = new LabelItemView({
  6360.                         model: item
  6361.                     });
  6362.                     this.\$el.find('.uv-aside-custom').append(labelItem.render().el);
  6363.                 },
  6364.                 renderStatus : function() {
  6365.                     if(typeof ticketCollection.filterParameters.status == \"undefined\" || ticketCollection.filterParameters.status == null)
  6366.                         var active = 0;
  6367.                     else
  6368.                         var active = ticketCollection.filterParameters.status;
  6369.                     this.\$el.find('.uv-aside-active').parent().find('.status-list').remove()
  6370.                     this.\$el.find('.uv-aside-active').parent().append(this.statusTemplate({status : statusListDetails, active : active}));
  6371.                 },
  6372.                 filterByStatus : function(e) {
  6373.                     e.preventDefault()
  6374.                     ticketCollection.reset();
  6375.                     ticketCollection.state.order = null;
  6376.                     ticketCollection.state.sortKey = null;
  6377.                     ticketCollection.state.currentPage = null;
  6378.                     ticketCollection.filterParameters.status = Backbone.\$(e.currentTarget).attr('data-id');
  6379.                     var queryString = app.appView.buildQuery(\$.param(ticketCollection.getValidParameters()));
  6380.                     router.navigate(queryString, {trigger: true});
  6381.                 },
  6382.                 addEditLabel: function(e) {
  6383.                     e.preventDefault()
  6384.                     currentElement = Backbone.\$(e.currentTarget);
  6385.                     if(currentElement.hasClass('add-new-label'))
  6386.                         \$('.uv-add-edit-label').html(this.addEditLabelTemplate({id : 0, name : '', colorCode: ''}))
  6387.                     else
  6388.                         \$('.uv-add-edit-label').html(this.addEditLabelTemplate(labelCollection.get(currentElement.siblings('a').attr('data-id')).toJSON()))
  6389.                     \$('.uv-aside-default').hide()
  6390.                     \$('.uv-add-edit-label').show()
  6391.                 },
  6392.                 backToLabels: function(e) {
  6393.                     if(e)
  6394.                         e.preventDefault()
  6395.                     \$('.uv-aside-default').show()
  6396.                     \$('.uv-add-edit-label').hide()
  6397.                 },
  6398.                 setLabelColor: function(e) {
  6399.                     \$('.uv-color-block').removeClass('uv-color-active');
  6400.                     Backbone.\$(e.currentTarget).addClass('uv-color-active');
  6401.                 },
  6402.                 saveLabel : function(e) {
  6403.                     e.preventDefault()
  6404.                     var inputElement = \$('.uv-add-edit-label input');
  6405.                     inputElement.removeClass('uv-field-error');
  6406.                     \$('.uv-field-message').remove()
  6407.                     var labelName = app.appView.stripHTML(inputElement.val());
  6408.                     if(labelName == \"\") {
  6409.                         inputElement.addClass('uv-field-error');
  6410.                         inputElement.parent().after(\"<span class='uv-field-message'>{{ 'This field is mandatory'|trans }}</span>\");
  6411.                     } else {
  6412.                         var labelId = parseInt(\$('.uv-aside-option').attr('data-id'))
  6413.                         model = labelId ? labelCollection.get(labelId) : new LabelModel()
  6414.                         model.set({name: labelName, colorCode: \$('.uv-color-block.uv-color-active').attr('data-color')});
  6415.                         self = this;
  6416.                         var flag = labelCollection.isLabelExist(labelName, labelId);
  6417.                         if(flag) {
  6418.                             app.appView.showLoader();
  6419.                             model.save({}, {
  6420.                                 success: function (model, response, options) {
  6421.                                     app.appView.hideLoader();
  6422.                                     if(response.alertClass == \"success\") {
  6423.                                         if(!labelId) {
  6424.                                             labelCollection.add(model);
  6425.                                         }
  6426.                                         self.updateMassLabelList()
  6427.                                         app.appView.renderResponseAlert(response);
  6428.                                     } else {
  6429.                                         inputElement.addClass('uv-field-error');
  6430.                                         inputElement.parent().after(\"<span class='uv-field-message'>\" + response.alertMessage + \"</span>\");
  6431.                                     }
  6432.                                     self.backToLabels();
  6433.                                 },
  6434.                                 error: function (model, xhr, options) {
  6435.                                     if(url = xhr.getResponseHeader('Location'))
  6436.                                         window.location = url;
  6437.                                     app.appView.hideLoader();
  6438.                                     app.appView.renderResponseAlert(warningResponse);
  6439.                                 }
  6440.                             });
  6441.                         } else {
  6442.                             inputElement.parent().after(\"<span class='uv-field-message'>{{ 'Label with same name already exist.'|trans }}</span>\");
  6443.                         }
  6444.                     }
  6445.                 },
  6446.                 removeLabel: function(e) {
  6447.                     e.preventDefault()
  6448.                     self = this;
  6449.                     app.appView.showLoader();
  6450.                     model = labelCollection.get(\$('.uv-aside-option').attr('data-id'))
  6451.                     model.destroy({
  6452.                         success : function (model, response, options) {
  6453.                             app.appView.hideLoader();
  6454.                             self.updateMassLabelList()
  6455.                             app.appView.renderResponseAlert(response);
  6456.                             self.backToLabels();
  6457.                         },
  6458.                         error: function (model, xhr, options) {
  6459.                             if(url = xhr.getResponseHeader('Location'))
  6460.                                 window.location = url;
  6461.                             app.appView.hideLoader();
  6462.                             app.appView.renderResponseAlert(warningResponse);
  6463.                         }
  6464.                     });
  6465.                 }
  6466.             });
  6467.             // Bulk Action View
  6468.             var BulkActionView = Backbone.View.extend({
  6469.                 el: \$(\".mass-action\"),
  6470.                 currentEvent: null,
  6471.                 events: {
  6472.                     'click ul li, #mass-restore': 'massAction',
  6473.                     'click #mass-delete, #mass-delete-forever': 'confirmRemove',
  6474.                     'click #mass-restore': 'confirmRestore'
  6475.                 },
  6476.                 massAction: function(e) {
  6477.                     e.preventDefault();
  6478.                     if(!parseInt(Backbone.\$(e.currentTarget).attr('data-index')))
  6479.                         return;
  6480.                     var data = {};
  6481.                     data['actionType'] = Backbone.\$(e.currentTarget).parents('ul').attr('data-action') ? Backbone.\$(e.currentTarget).parents('ul').attr('data-action') : Backbone.\$(e.currentTarget).attr('data-action');
  6482.                     data['targetId'] = Backbone.\$(e.currentTarget).attr('data-index');
  6483.                     data['ids'] = this.getCheckedTicketIds();
  6484.                     ticketCollection.batchOperation(data);
  6485.                     this.hideBulkOptions();
  6486.                 },
  6487.                 removeItem: function(e) {
  6488.                     var data = {};
  6489.                     if(Backbone.\$(this.currentEvent.currentTarget).is(\"#mass-delete\"))
  6490.                         data['actionType'] = \"trashed\";
  6491.                     else if(Backbone.\$(this.currentEvent.currentTarget).is(\"#mass-delete-forever\"))
  6492.                         data['actionType'] = \"delete\";
  6493.                     data['ids'] = this.getCheckedTicketIds();
  6494.                     ticketCollection.batchOperation(data);
  6495.                     this.hideBulkOptions();
  6496.                 },
  6497.                 restoreItem: function(e) {
  6498.                     var data = {};
  6499.                     data['actionType'] = \"restored\";
  6500.                     data['ids'] = this.getCheckedTicketIds();
  6501.                     ticketCollection.batchOperation(data);
  6502.                     this.hideBulkOptions();
  6503.                 },
  6504.                 getCheckedTicketIds: function() {
  6505.                     var ids = new Array();
  6506.                     \$('.mass-action-checkbox').each(function() {
  6507.                         if(\$(this).is(':checked')) {
  6508.                             ids.push(\$(this).val());
  6509.                         }
  6510.                     });
  6511.                     return ids;
  6512.                 },
  6513.                 confirmRemove: function(e) {
  6514.                     e.preventDefault();
  6515.                     this.currentEvent = e;
  6516.                     app.appView.openConfirmModal(this)
  6517.                 },
  6518.                 confirmRestore: function(e) {
  6519.                     e.preventDefault();
  6520.                     app.appView.openConfirmModal(this, 'restoreItem')
  6521.                 },
  6522.                 hideBulkOptions : function() {
  6523.                     \$('.uv-action-bar .mass-action').parent().removeClass(\"uv-width-100\").hide();
  6524.                     \$('.uv-action-bar .filter').parent().show();
  6525.                     \$('.uv-action-bar-col-rt').show()
  6526.                 }
  6527.             });
  6528.             var PageView = Backbone.View.extend({
  6529.                 el: '.uv-paper',
  6530.                 events : {
  6531.                     'change .select-all-checkbox' : 'selectAll',
  6532.                     'click .uv-quick-view-trigger, .quick-view-navigation .uv-btn-tag': 'navigateQuickView',
  6533.                 },
  6534.                 quickViewTemplate: _.template(\$(\"#ticket_quick_view_tmp\").html()),
  6535.                 navigateQuickView : function(e) {
  6536.                     e.preventDefault();
  6537.                     //\$(\"#quick-view-modal .uv-loader\").hide()
  6538.                     var currentElement = Backbone.\$(e.currentTarget);
  6539.                     ticketId = currentElement.attr('data-id');
  6540.                     if(ticketId) {
  6541.                         if(model = ticketQuickViewCollection.isModelSynced(ticketId)) {
  6542.                             this.renderQuickView(model.toJSON())
  6543.                         } else {
  6544.                             var self = this;
  6545.                             if(currentElement.hasClass(\"uv-quick-view-trigger\"))
  6546.                                 app.appView.showLoader();
  6547.                             if(ticketQuickViewCollection.get(ticketId)) {
  6548.                                 navData = ticketQuickViewCollection.getNextPrev(ticketId);
  6549.                                 requiredNext = (!navData.next && app.pager.paginationData.next) ? 1 : 0;
  6550.                                 requiredPrev = (!navData.previous && app.pager.paginationData.previous) ? 1 : 0;
  6551.                             } else
  6552.                                 requiredNext = requiredPrev = 1;
  6553.                             if(self.xhrReq)
  6554.                                 self.xhrReq.abort();
  6555.                             \$(\"#quick-view-modal .uv-loader\").show()
  6556.                             self.xhrReq = \$.ajax({
  6557.                                 url : \"{{ path('helpdesk_member_ticket_quick_view_xhr') }}\",
  6558.                                 type : 'GET',
  6559.                                 data : {ticketId : ticketId, next: requiredNext, previous: requiredPrev},
  6560.                                 dataType : 'json',
  6561.                                 success : function(response) {
  6562.                                     self.xhrReq = 0;
  6563.                                     if(currentElement.hasClass(\"uv-quick-view-trigger\"))
  6564.                                         app.appView.hideLoader();
  6565.                                     if(response.next == undefined)
  6566.                                         response.next = navData.next
  6567.                                     if(response.previous == undefined)
  6568.                                         response.previous = navData.previous
  6569.                                     response.isSynced = 1
  6570.                                     response.path = pathToTicket.replace('replaceId', response.incrementId);
  6571.                                     if(ticketQuickViewCollection.get(ticketId))
  6572.                                         ticketQuickViewCollection.set(response,{remove: false})
  6573.                                     else
  6574.                                         ticketQuickViewCollection.add(new TicketQuickViewModel(response))
  6575.                                     self.renderQuickView(response)
  6576.                                 },
  6577.                                 error: function (xhr) {
  6578.                                     self.xhrReq = 0;
  6579.                                     if(url = xhr.getResponseHeader('Location'))
  6580.                                         window.location = url;
  6581.                                     app.appView.hideLoader();
  6582.                                 }
  6583.                             });
  6584.                         }
  6585.                     }
  6586.                 },
  6587.                 renderQuickView: function(response) {
  6588.                     \$('#quick-view-modal .uv-pop-up-box').html(this.quickViewTemplate(response));
  6589.                     app.appView.openModal('quick-view-modal')
  6590.                     \$('#quick-view-modal .message').find('img').removeAttr('crossorigin');
  6591.                     \$('#quick-view-modal .message').find('.uv-icon-ellipsis').remove();
  6592.                     \$('#quick-view-modal .message').find('.helpdesk_blockquote').eq(0).before(\"<span class='uv-icon-ellipsis uv-ellipsis-mirror'></span>\").hide();
  6593.                     app.appView.relativeTime();
  6594.                 },
  6595.                 selectAll : function(e) {
  6596.                     if(Backbone.\$(e.currentTarget).is(':checked')) {
  6597.                         \$('.mass-action-checkbox').prop('checked', true);
  6598.                         \$('.uv-action-bar .filter').parent().hide();
  6599.                         \$('.uv-action-bar .mass-action').parent().addClass(\"uv-width-100\").show();
  6600.                         \$('.uv-action-bar-col-rt').hide()
  6601.                     } else {
  6602.                         var count = 0;
  6603.                         \$('.mass-action-checkbox').each(function() {
  6604.                             if(\$(this).is(':checked'))
  6605.                                 count++;
  6606.                         });
  6607.                         if(count == \$('.mass-action-checkbox').length) {
  6608.                             \$('.mass-action-checkbox').prop('checked', false);
  6609.                             \$('.uv-action-bar .filter').parent().show();
  6610.                             \$('.uv-action-bar .mass-action').parent().removeClass(\"uv-width-100\").hide();
  6611.                             \$('.uv-action-bar-col-rt').show()
  6612.                         }
  6613.                     }
  6614.                 },
  6615.             });
  6616.             // Ticket Router
  6617.             Router = Backbone.Router.extend({
  6618.                 routes: {
  6619.                     'page/:number(/sort/:sortField)(/direction/:order)' : 'paginate',
  6620.                     'status/:status(/search/:query)(/agent/:agent)(/customer/:customer)(/priority/:priority)(/type/:type)(/group/:group)(/team/:team)(/tag/:tag)(/mailbox/:mailbox)(/source/:source)(/after/:after)(/before/:before)(/repliesLess/:repliesLess)(/repliesMore/:repliesMore)(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterByStatus',
  6621.                     'search/:query(/agent/:agent)(/customer/:customer)(/priority/:priority)(/type/:type)(/group/:group)(/team/:team)(/tag/:tag)(/mailbox/:mailbox)(/source/:source)(/after/:after)(/before/:before)(/repliesLess/:repliesLess)(/repliesMore/:repliesMore)(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterByQuery',
  6622.                     'agent/:agent(/customer/:customer)(/priority/:priority)(/type/:type)(/group/:group)(/team/:team)(/tag/:tag)(/mailbox/:mailbox)(/source/:source)(/after/:after)(/before/:before)(/repliesLess/:repliesLess)(/repliesMore/:repliesMore)(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterByAgent',
  6623.                     'customer/:customer(/priority/:priority)(/type/:type)(/group/:group)(/team/:team)(/tag/:tag)(/mailbox/:mailbox)(/source/:source)(/after/:after)(/before/:before)(/repliesLess/:repliesLess)(/repliesMore/:repliesMore)(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterByCustomer',
  6624.                     'priority/:priority(/type/:type)(/group/:group)(/team/:team)(/tag/:tag)(/mailbox/:mailbox)(/source/:source)(/after/:after)(/before/:before)(/repliesLess/:repliesLess)(/repliesMore/:repliesMore)(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterByPriority',
  6625.                     'type/:type(/group/:group)(/team/:team)(/tag/:tag)(/mailbox/:mailbox)(/source/:source)(/after/:after)(/before/:before)(/repliesLess/:repliesLess)(/repliesMore/:repliesMore)(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterByType',
  6626.                     'group/:group(/team/:team)(/tag/:tag)(/mailbox/:mailbox)(/source/:source)(/after/:after)(/before/:before)(/repliesLess/:repliesLess)(/repliesMore/:repliesMore)(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterByGroup',
  6627.                     'team/:team(/tag/:tag)(/mailbox/:mailbox)(/source/:source)(/after/:after)(/before/:before)(/repliesLess/:repliesLess)(/repliesMore/:repliesMore)(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterBySubGroup',
  6628.                     'tag/:tag(/mailbox/:mailbox)(/source/:source)(/after/:after)(/before/:before)(/repliesLess/:repliesLess)(/repliesMore/:repliesMore)(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterByTags',
  6629.                     'mailbox/:mailbox(/source/:source)(/after/:after)(/before/:before)(/repliesLess/:repliesLess)(/repliesMore/:repliesMore)(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterByMailbox',
  6630.                     'source/:source(/after/:after)(/before/:before)(/repliesLess/:repliesLess)(/repliesMore/:repliesMore)(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterBySource',
  6631.                     'after/:after(/before/:before)(/repliesLess/:repliesLess)(/repliesMore/:repliesMore)(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterByAfter',
  6632.                     'before/:before(/repliesLess/:repliesLess)(/repliesMore/:repliesMore)(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterByBefore',
  6633.                     'repliesLess/:repliesLess(/repliesMore/:repliesMore)(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterByRepliesLesserCount',
  6634.                     'repliesMore/:repliesMore(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterByRepliesGreaterCount',
  6635.                     'custom/:custom(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterByCustom',
  6636.                     'label/:labelId(/status/:status)(/search/:query)(/agent/:agent)(/customer/:customer)(/priority/:priority)(/type/:type)(/group/:group)(/team/:team)(/tag/:tag)(/mailbox/:mailbox)(/source/:source)(/after/:after)(/before/:before)(/repliesLess/:repliesLess)(/repliesMore/:repliesMore)(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterByLabel',
  6637.                     'new(/status/:status)(/search/:query)(/agent/:agent)(/customer/:customer)(/priority/:priority)(/type/:type)(/group/:group)(/team/:team)(/tag/:tag)(/mailbox/:mailbox)(/source/:source)(/after/:after)(/before/:before)(/repliesLess/:repliesLess)(/repliesMore/:repliesMore)(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterNew',
  6638.                     'unassigned(/status/:status)(/search/:query)(/agent/:agent)(/customer/:customer)(/priority/:priority)(/type/:type)(/group/:group)(/team/:team)(/tag/:tag)(/mailbox/:mailbox)(/source/:source)(/after/:after)(/before/:before)(/repliesLess/:repliesLess)(/repliesMore/:repliesMore)(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterUnassigned',
  6639.                     'notreplied(/status/:status)(/search/:query)(/agent/:agent)(/customer/:customer)(/priority/:priority)(/type/:type)(/group/:group)(/team/:team)(/tag/:tag)(/mailbox/:mailbox)(/source/:source)(/after/:after)(/before/:before)(/repliesLess/:repliesLess)(/repliesMore/:repliesMore)(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterNotReplied',
  6640.                     'mine(/status/:status)(/search/:query)(/agent/:agent)(/customer/:customer)(/priority/:priority)(/type/:type)(/group/:group)(/team/:team)(/tag/:tag)(/mailbox/:mailbox)(/source/:source)(/after/:after)(/before/:before)(/repliesLess/:repliesLess)(/repliesMore/:repliesMore)(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterMine',
  6641.                     'starred(/status/:status)(/search/:query)(/agent/:agent)(/customer/:customer)(/priority/:priority)(/type/:type)(/group/:group)(/team/:team)(/tag/:tag)(/mailbox/:mailbox)(/source/:source)(/after/:after)(/before/:before)(/repliesLess/:repliesLess)(/repliesMore/:repliesMore)(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterstarred',
  6642.                     'trashed(/status/:status)(/search/:query)(/agent/:agent)(/customer/:customer)(/priority/:priority)(/type/:type)(/group/:group)(/team/:team)(/tag/:tag)(/mailbox/:mailbox)(/source/:source)(/after/:after)(/before/:before)(/repliesLess/:repliesLess)(/repliesMore/:repliesMore)(/custom/:custom)(/page/:number)(/sort/:sortField)(/direction/:order)': 'filterTrashed',
  6643.                     '': 'initializeList'
  6644.                 },
  6645.                 initializeList : function() {
  6646.                     \$(\"#saved-filter\").val('');
  6647.                     this.resetParams('', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '');
  6648.                     this.fetch(null, null, null);
  6649.                 },
  6650.                 paginate : function(number,sortField,order) {
  6651.                     this.resetParams('','','','','','','','','','','','','','','','','','','','','', '');
  6652.                     this.fetch(number,sortField,order);
  6653.                 },
  6654.                 filterByLabel : function(labelId,status,query,agent,customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom,number,sortField,order) {
  6655.                     this.resetParams(labelId,'','','','','','',status,query,agent,customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom);
  6656.                     this.fetch(number,sortField,order);
  6657.                 },
  6658.                 filterNew : function(status,query,agent,customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom,number,sortField,order) {
  6659.                     this.resetParams('',1,'','','','','',status,query,agent,customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom);
  6660.                     this.fetch(number,sortField,order);
  6661.                 },
  6662.                 filterUnassigned : function(status,query,agent,customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom,number,sortField,order) {
  6663.                     this.resetParams('','',1,'','','','',status,query,agent,customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom);
  6664.                     this.fetch(number,sortField,order);
  6665.                 },
  6666.                 filterNotReplied: function(status,query,agent,customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom,number,sortField,order) {
  6667.                     this.resetParams('','','',1,'','','',status,query,agent,customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom);
  6668.                     this.fetch(number,sortField,order);
  6669.                 },
  6670.                 filterMine : function(status,query,agent,customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom,number,sortField,order) {
  6671.                     this.resetParams('','','','',1,'','',status,query,agent,customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom);
  6672.                     this.fetch(number,sortField,order);
  6673.                 },
  6674.                 filterstarred : function(status,query,agent,customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom,number,sortField,order) {
  6675.                     this.resetParams('','','','','',1,'',status,query,agent,customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom);
  6676.                     this.fetch(number,sortField,order);
  6677.                 },
  6678.                 filterTrashed : function(status,query,agent,customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom,number,sortField,order) {
  6679.                     this.resetParams('','','','','','',1,status,query,agent,customer,priority,type,group,team,tag,mailbox,source,custom);
  6680.                     this.fetch(number,sortField,order);
  6681.                 },
  6682.                 filterByStatus : function(status,query,agent,customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom,number,sortField,order) {
  6683.                     this.resetParams('','','','','','','',status,query,agent,customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom);
  6684.                     this.fetch(number,sortField,order);
  6685.                 },
  6686.                 filterByQuery : function(query,agent,customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom,number,sortField,order) {
  6687.                     this.resetParams('','','','','','','','',query,agent,customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom);
  6688.                     this.fetch(number,sortField,order);
  6689.                 },
  6690.                 filterByAgent : function(agent,customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom,number,sortField,order) {
  6691.                     this.resetParams('','','','','','','','','',agent,customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom);
  6692.                     this.fetch(number,sortField,order);
  6693.                 },
  6694.                 filterByCustomer : function(customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom,number,sortField,order) {
  6695.                     this.resetParams('','','','','','','','','','',customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom);
  6696.                     this.fetch(number,sortField,order);
  6697.                 },
  6698.                 filterByPriority : function(priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom,number,sortField,order) {
  6699.                     this.resetParams('','','','','','','','','','','',priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom);
  6700.                     this.fetch(number,sortField,order);
  6701.                 },
  6702.                 filterByType : function(type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom,number,sortField,order) {
  6703.                     this.resetParams('','','','','','','','','','','','',type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom);
  6704.                     this.fetch(number,sortField,order);
  6705.                 },
  6706.                 filterByGroup : function(group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom,number,sortField,order) {
  6707.                     this.resetParams('','','','','','','','','','','','','',group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom);
  6708.                     this.fetch(number,sortField,order);
  6709.                 },
  6710.                 filterBySubGroup : function(team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom,number,sortField,order) {
  6711.                     this.resetParams('','','','','','','','','','','','','','',team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom);
  6712.                     this.fetch(number,sortField,order);
  6713.                 },
  6714.                 filterByTags : function(tag,mailbox,source,after,before,repliesLess,repliesMore,custom,number,sortField,order) {
  6715.                     this.resetParams('','','','','','','','','','','','','','','',tag,mailbox,source,after,before,repliesLess,repliesMore,custom);
  6716.                     this.fetch(number,sortField,order);
  6717.                 },
  6718.                 filterByMailbox : function(mailbox,source,after,before,repliesLess,repliesMore,custom,number,sortField,order) {
  6719.                     this.resetParams('','','','','','','','','','','','','','','','',mailbox,source,after,before,repliesLess,repliesMore,custom);
  6720.                     this.fetch(number,sortField,order);
  6721.                 },
  6722.                 filterBySource: function(source,after,before,repliesLess,repliesMore,custom,number,sortField,order) {
  6723.                     this.resetParams('','','','','','','','','','','','','','','','','',source,after,before,repliesLess,repliesMore,custom);
  6724.                     this.fetch(number,sortField,order);
  6725.                 },
  6726.                 filterByAfter: function(after,before,repliesLess,repliesMore,custom,number,sortField,order) {
  6727.                     this.resetParams('','','','','','','','','','','','','','','','','','',after,before,repliesLess,repliesMore,custom);
  6728.                     this.fetch(number,sortField,order);
  6729.                 },
  6730.                 filterByBefore: function(before,repliesLess,repliesMore,custom,number,sortField,order) {
  6731.                     this.resetParams('','','','','','','','','','','','','','','','','','','',before,repliesLess,repliesMore,custom);
  6732.                     this.fetch(number,sortField,order);
  6733.                 },
  6734.                 filterByRepliesLesserCount: function(repliesLess, repliesMore, custom, number, sortField, order) {
  6735.                     this.resetParams('','','','','','','','','','','','','','','','','','','','',repliesLess,repliesMore,custom);
  6736.                     this.fetch(number,sortField,order);
  6737.                 },
  6738.                 filterByRepliesGreaterCount: function(repliesMore, custom, number, sortField, order) {
  6739.                     this.resetParams('','','','','','','','','','','','','','','','','','','','','',repliesMore,custom);
  6740.                     this.fetch(number,sortField,order);
  6741.                 },
  6742.                 filterByCustom : function(custom, number, sortField, order) {
  6743.                     this.resetParams('','','','','','','','','','','','','','','','','','','','','','',custom);
  6744.                     this.fetch(number,sortField,order);
  6745.                 },
  6746.                 fetch: function(number, sortField, order) {
  6747.                     ticketCollection.state.currentPage = number;
  6748.                     filter.sortCollection(sortField, order);
  6749.                     ticketCollection.syncData();
  6750.                 },
  6751.                 resetParams : function(labelId,newLabel,unassigned,notreplied,mine,starred,trashed,status,query,agent,customer,priority,type,group,team,tag,mailbox,source,after,before,repliesLess,repliesMore,custom) {
  6752.                     _.each(userFilters, function(filter, index) {
  6753.                         if(Backbone.history.getFragment() == filter['route']) {
  6754.                             \$(\"#saved-filter\").val(index);
  6755.                         }
  6756.                     });
  6757.                     isPageJustLoaded = false;
  6758.                     if(query != null)
  6759.                         query = query.replace(/\\+/g,' ');
  6760.                     bulkAction.hideBulkOptions();
  6761.                     ticketCollection.filterParameters.label = labelId;
  6762.                     ticketCollection.filterParameters.new = newLabel;
  6763.                     ticketCollection.filterParameters.unassigned = unassigned;
  6764.                     ticketCollection.filterParameters.notreplied = notreplied;
  6765.                     ticketCollection.filterParameters.mine = mine;
  6766.                     ticketCollection.filterParameters.starred = starred;
  6767.                     ticketCollection.filterParameters.trashed = trashed;
  6768.                     ticketCollection.filterParameters.search = query;
  6769.                     \$(\".uv-search-inline\").val(query);
  6770.                     ticketCollection.filterParameters.status = status;
  6771.                     ticketCollection.filterParameters.agent = agent;
  6772.                     ticketCollection.filterParameters.customer = customer;
  6773.                     ticketCollection.filterParameters.priority = priority;
  6774.                     ticketCollection.filterParameters.type = type;
  6775.                     ticketCollection.filterParameters.group = group;
  6776.                     ticketCollection.filterParameters.team = team;
  6777.                     ticketCollection.filterParameters.tag = tag;
  6778.                     ticketCollection.filterParameters.mailbox = mailbox;
  6779.                     ticketCollection.filterParameters.source = source;
  6780.                     ticketCollection.filterParameters.after = after;
  6781.                     ticketCollection.filterParameters.before = before;
  6782.                     ticketCollection.filterParameters.repliesLess = repliesLess;
  6783.                     ticketCollection.filterParameters.repliesMore = repliesMore;
  6784.                     ticketCollection.filterParameters.custom = custom;
  6785.                     \$('.custom-fields').find('input[type=\"text\"]').val('');
  6786.                     \$('.custom-fields').find('select').val('');
  6787.                     \$('.custom-fields').find('input[type=\"radio\"]').prop('checked', false);
  6788.                     \$('.custom-fields').find('input[type=\"checkbox\"]').prop('checked', false);
  6789.                     if(custom) {
  6790.                         custom = custom.replace(/\\+/g,' ');
  6791.                         var indexValueSeperator = '_';
  6792.                         var columnSeperator = '|';
  6793.                         var multiOptions = custom.split(columnSeperator);
  6794.                         var multiKeyValue, multiKeyValueValue, ele;
  6795.                         _.each(multiOptions, function(valueData, indexData) {
  6796.                             if(!valueData)
  6797.                                 return;
  6798.                             multiKeyValue = valueData.split(indexValueSeperator);
  6799.                             multiKeyValueValue = multiKeyValue[1].split(',');
  6800.                             ele = \$('[data-value=\"' + multiKeyValue[0] + '\"]');
  6801.                             if(ele[0].type == 'radio') {
  6802.                                 \$('[data-value=\"' + multiKeyValue[0] + '\"][value=\"' + multiKeyValue[1] + '\"]').prop('checked', true);
  6803.                             } else if(ele[0].type == 'checkbox') {
  6804.                                 _.each(ele, function(eleElements) {
  6805.                                     if(multiKeyValueValue.indexOf(eleElements.value) > -1) {
  6806.                                         \$(eleElements).prop('checked', true);
  6807.                                     }
  6808.                                 });
  6809.                             } else if(ele[0].type == 'select-multiple') {
  6810.                                 ele.val(multiKeyValueValue);
  6811.                             } else if(ele[0].type == 'text') {
  6812.                                 ele.val(multiKeyValue[1]);
  6813.                             }
  6814.                         })
  6815.                     }
  6816.                     if(trashed) {
  6817.                         \$('.property-block').hide();
  6818.                         \$('.trashed-block').show();
  6819.                     } else {
  6820.                         \$('.property-block').show();
  6821.                         \$('.trashed-block').hide();
  6822.                     }
  6823.                     sideFilter.isRecurrsiveCalls = 0;
  6824.                     sideFilter.render();
  6825.                 }
  6826.             });
  6827.             var router = new Router();
  6828.             var pageview = new PageView;
  6829.             var bulkAction = new BulkActionView();
  6830.             var sideFilterModel = new SideFilterModel(filterContext)
  6831.             var sideFilter = new SideFilter();
  6832.             var ticketCollection = new TicketCollection();
  6833.             var ticketQuickViewCollection = new TicketQuickViewCollection();
  6834.             var labelCollection = new LabelCollection();
  6835.             var labelListView = new LabelListView()
  6836.             var filter = new Filter({collection : ticketCollection});
  6837.             Backbone.history.start({
  6838.                 push_state:true
  6839.             });
  6840.         });
  6841.     </script>
  6842. {% endblock %}""@UVDeskCoreFramework/ticketList.html.twig""/var/www/uvdesk/vendor/uvdesk/core-framework/Resources/views/ticketList.html.twig");
  6843.     }
  6844. }