<?php

use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;

/* catalog/manufacturer_list.twig */
class __TwigTemplate_52715509dc5d42a4512800ea1f47ff94 extends Template
{
    private $source;
    private $macros = [];

    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->source = $this->getSourceContext();

        $this->parent = false;

        $this->blocks = [
        ];
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 1
        echo ($context["header"] ?? null);
        echo ($context["column_left"] ?? null);
        echo "
<div id=\"content\">
  <div class=\"page-header\">
    <div class=\"container-fluid\">
      <div class=\"pull-right\">
          ";
        // line 6
        if ((($context["config_manufacturer_download"] ?? null) == 1)) {
            // line 7
            echo "          <a href=\"";
            echo ($context["download"] ?? null);
            echo "\" data-toggle=\"tooltip\" title=\"";
            echo ($context["button_download"] ?? null);
            echo "\" class=\"btn btn-warning\"><i class=\"fa fa-download\"></i></a>
          ";
        }
        // line 9
        echo "          <a href=\"";
        echo ($context["add"] ?? null);
        echo "\" data-toggle=\"tooltip\" title=\"";
        echo ($context["button_add"] ?? null);
        echo "\" class=\"btn btn-primary\"><i class=\"fa fa-plus\"></i></a>
        <button type=\"button\" data-toggle=\"tooltip\" title=\"";
        // line 10
        echo ($context["button_delete"] ?? null);
        echo "\" class=\"btn btn-danger\" onclick=\"confirm('";
        echo ($context["text_confirm"] ?? null);
        echo "') ? \$('#form-manufacturer').submit() : false;\"><i class=\"fa fa-trash-o\"></i></button>
      </div>
      <h1>";
        // line 12
        echo ($context["heading_title"] ?? null);
        echo "</h1>
      <ul class=\"breadcrumb\">
        ";
        // line 14
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable(($context["breadcrumbs"] ?? null));
        foreach ($context['_seq'] as $context["_key"] => $context["breadcrumb"]) {
            // line 15
            echo "        <li><a href=\"";
            echo twig_get_attribute($this->env, $this->source, $context["breadcrumb"], "href", [], "any", false, false, false, 15);
            echo "\">";
            echo twig_get_attribute($this->env, $this->source, $context["breadcrumb"], "text", [], "any", false, false, false, 15);
            echo "</a></li>
        ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['breadcrumb'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 17
        echo "      </ul>
    </div>
  </div>
  <div class=\"container-fluid\">
    ";
        // line 21
        if (($context["error_warning"] ?? null)) {
            // line 22
            echo "    <div class=\"alert alert-danger alert-dismissible\"><i class=\"fa fa-exclamation-circle\"></i> ";
            echo ($context["error_warning"] ?? null);
            echo "
      <button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>
    </div>
    ";
        }
        // line 26
        echo "    ";
        if (($context["success"] ?? null)) {
            // line 27
            echo "    <div class=\"alert alert-success alert-dismissible\"><i class=\"fa fa-check-circle\"></i> ";
            echo ($context["success"] ?? null);
            echo "
      <button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>
    </div>
    ";
        }
        // line 31
        echo "    <div class=\"panel panel-default\">
      <div class=\"panel-heading\">
        <h3 class=\"panel-title\"><i class=\"fa fa-list\"></i> ";
        // line 33
        echo ($context["text_list"] ?? null);
        echo "</h3>
        <div class=\"pull-right\">
            <div class=\"input-group\" style=\"top:-8px;\">
                <input type=\"text\"  style=\"width: 55%; display: inline-block;\" name=\"filter_name\" class=\"form-control\" value=\"";
        // line 36
        echo ($context["filter_name"] ?? null);
        echo "\"  id=\"input-name\"  placeholder=\"Search...\"/>
    \t\t\t <button type=\"button\" id=\"button-filter\" class=\"btn btn-primary button\" ><i class=\"fa fa-filter\"></i> ";
        // line 37
        echo ($context["button_filter"] ?? null);
        echo "</button>
    \t\t\t <button type=\"button\" id=\"button-clear\" class=\"btn btn-danger button\">";
        // line 38
        echo ($context["button_clear"] ?? null);
        echo "</button>
    \t\t</div>
        </div>
      </div>
      <div class=\"panel-body\">
        <form action=\"";
        // line 43
        echo ($context["delete"] ?? null);
        echo "\" method=\"post\" enctype=\"multipart/form-data\" id=\"form-manufacturer\">
          <div class=\"table-responsive\">
            <table class=\"table table-bordered table-hover\">
              <thead>
                <tr>
                  <td style=\"width: 1px;\" class=\"text-center\"><input type=\"checkbox\" onclick=\"\$('input[name*=\\'selected\\']').prop('checked', this.checked);\" /></td>
                  <td class=\"text-left\">";
        // line 49
        if ((($context["sort"] ?? null) == "name")) {
            // line 50
            echo "                    <a href=\"";
            echo ($context["sort_name"] ?? null);
            echo "\" class=\"";
            echo twig_lower_filter($this->env, ($context["order"] ?? null));
            echo "\">";
            echo ($context["column_name"] ?? null);
            echo "</a>
                    ";
        } else {
            // line 52
            echo "                    <a href=\"";
            echo ($context["sort_name"] ?? null);
            echo "\">";
            echo ($context["column_name"] ?? null);
            echo "</a>
                    ";
        }
        // line 53
        echo "</td>
                    <th>Products</th>
                  <td class=\"text-right\">";
        // line 55
        if ((($context["sort"] ?? null) == "sort_order")) {
            // line 56
            echo "                    <a href=\"";
            echo ($context["sort_sort_order"] ?? null);
            echo "\" class=\"";
            echo twig_lower_filter($this->env, ($context["order"] ?? null));
            echo "\">";
            echo ($context["column_sort_order"] ?? null);
            echo "</a>
                    ";
        } else {
            // line 58
            echo "                    <a href=\"";
            echo ($context["sort_sort_order"] ?? null);
            echo "\">";
            echo ($context["column_sort_order"] ?? null);
            echo "</a>
                    ";
        }
        // line 59
        echo "</td>
                  <td class=\"text-right\">";
        // line 60
        echo ($context["column_action"] ?? null);
        echo "</td>
                </tr>
              </thead>
              <tbody>
                ";
        // line 64
        if (($context["manufacturers"] ?? null)) {
            // line 65
            echo "                ";
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable(($context["manufacturers"] ?? null));
            foreach ($context['_seq'] as $context["_key"] => $context["manufacturer"]) {
                // line 66
                echo "                <tr>
                  <td class=\"text-center\">";
                // line 67
                if (twig_in_filter(twig_get_attribute($this->env, $this->source, $context["manufacturer"], "manufacturer_id", [], "any", false, false, false, 67), ($context["selected"] ?? null))) {
                    // line 68
                    echo "                    <input type=\"checkbox\" name=\"selected[]\" value=\"";
                    echo twig_get_attribute($this->env, $this->source, $context["manufacturer"], "manufacturer_id", [], "any", false, false, false, 68);
                    echo "\" checked=\"checked\" />
                    ";
                } else {
                    // line 70
                    echo "                    <input type=\"checkbox\" name=\"selected[]\" value=\"";
                    echo twig_get_attribute($this->env, $this->source, $context["manufacturer"], "manufacturer_id", [], "any", false, false, false, 70);
                    echo "\" />
                    ";
                }
                // line 71
                echo "</td>
                  <td class=\"text-left\">";
                // line 72
                echo twig_get_attribute($this->env, $this->source, $context["manufacturer"], "name", [], "any", false, false, false, 72);
                echo "</td>
                  <td><a href=\"";
                // line 73
                echo twig_get_attribute($this->env, $this->source, $context["manufacturer"], "product_link", [], "any", false, false, false, 73);
                echo "\"><span style=\"background-color: #8378ff; padding: 5px 10px; color: #fff; border-radius: 10px;\">";
                echo twig_get_attribute($this->env, $this->source, $context["manufacturer"], "product_total", [], "any", false, false, false, 73);
                echo "</span></a></td>
                  <td class=\"text-right\">";
                // line 74
                echo twig_get_attribute($this->env, $this->source, $context["manufacturer"], "sort_order", [], "any", false, false, false, 74);
                echo "</td>
                  <td class=\"text-right\">
                      <a href=\"";
                // line 76
                echo twig_get_attribute($this->env, $this->source, $context["manufacturer"], "edit", [], "any", false, false, false, 76);
                echo "\" data-toggle=\"tooltip\" title=\"";
                echo ($context["button_edit"] ?? null);
                echo "\" class=\"btn btn-primary\"><i class=\"fa fa-pencil\"></i></a>
                      <a href=\"";
                // line 77
                echo twig_get_attribute($this->env, $this->source, $context["manufacturer"], "view", [], "any", false, false, false, 77);
                echo "\" data-toggle=\"tooltip\" target=\"_blank\" class=\"btn btn-primary\"><i class=\"fa fa-eye\"></i></a>
                  </td>
                </tr>
                ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['manufacturer'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 81
            echo "                ";
        } else {
            // line 82
            echo "                <tr>
                  <td class=\"text-center\" colspan=\"4\">";
            // line 83
            echo ($context["text_no_results"] ?? null);
            echo "</td>
                </tr>
                ";
        }
        // line 86
        echo "              </tbody>
            </table>
          </div>
        </form>
        <div class=\"row\">
          <div class=\"col-sm-6 text-left\">";
        // line 91
        echo ($context["pagination"] ?? null);
        echo "</div>
          <div class=\"col-sm-6 text-right\">";
        // line 92
        echo ($context["results"] ?? null);
        echo "</div>
        </div>
      </div>
    </div>
  </div>
</div>

<script type=\"text/javascript\"><!--
\t\t\t\t\t    \$('#button-filter').on('click', function() {
\t\t\t\t\t\t  var url = 'index.php?route=catalog/manufacturer&user_token=";
        // line 101
        echo ($context["user_token"] ?? null);
        echo "';

\t\t\t\t\t\t  var filter_name = \$('input[name=\\'filter_name\\']').val();
\t\t\t\t\t\t\t\t
\t\t\t\t\t\t  if (filter_name) 
\t\t\t\t\t\t  {
\t\t\t\t\t\t\turl += '&filter_name=' + encodeURIComponent(filter_name);
\t\t\t\t\t\t  }
\t\t\t\t\t\t  location = url;
\t\t\t\t\t\t});
 \$('#button-clear').on('click', function() {
 location ='index.php?route=catalog/manufacturer&user_token=";
        // line 112
        echo ($context["user_token"] ?? null);
        echo "';
});\t\t\t\t\t\t
// Category
\$('input[name=\\'filter_name\\']').autocomplete({
  'source': function(request, response) {
    \$.ajax({
      url: 'index.php?route=catalog/manufacturer/autocomplete&user_token=";
        // line 118
        echo ($context["user_token"] ?? null);
        echo "&filter_name=' +  encodeURIComponent(request),
      dataType: 'json',
      success: function(json) {
\t    response(\$.map(json, function(item) {
          return {
            label: item['name'],
            value: item['manufacturer_id']
          }
        }));
      }
    });
  },
  'select': function(item) {
    \$('input[name=\\'filter_name\\']').val(item['label']);
  }
});\t\t
//--></script>

";
        // line 136
        echo ($context["footer"] ?? null);
    }

    /**
     * @codeCoverageIgnore
     */
    public function getTemplateName()
    {
        return "catalog/manufacturer_list.twig";
    }

    /**
     * @codeCoverageIgnore
     */
    public function isTraitable()
    {
        return false;
    }

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo()
    {
        return array (  343 => 136,  322 => 118,  313 => 112,  299 => 101,  287 => 92,  283 => 91,  276 => 86,  270 => 83,  267 => 82,  264 => 81,  254 => 77,  248 => 76,  243 => 74,  237 => 73,  233 => 72,  230 => 71,  224 => 70,  218 => 68,  216 => 67,  213 => 66,  208 => 65,  206 => 64,  199 => 60,  196 => 59,  188 => 58,  178 => 56,  176 => 55,  172 => 53,  164 => 52,  154 => 50,  152 => 49,  143 => 43,  135 => 38,  131 => 37,  127 => 36,  121 => 33,  117 => 31,  109 => 27,  106 => 26,  98 => 22,  96 => 21,  90 => 17,  79 => 15,  75 => 14,  70 => 12,  63 => 10,  56 => 9,  48 => 7,  46 => 6,  37 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("", "catalog/manufacturer_list.twig", "");
    }
}
