<?php

/* VGMWOBundle:Client:index.html.twig */
class __TwigTemplate_026e02d43541341627d13bf1ecff835f21b2fe81640d19e9f9ed78ebc8ed95c3 extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        // line 1
        $this->parent = $this->loadTemplate("VGMWOBundle::layout.html.twig", "VGMWOBundle:Client:index.html.twig", 1);
        $this->blocks = array(
            'stylesheets' => array($this, 'block_stylesheets'),
            'content' => array($this, 'block_content'),
            'javascripts' => array($this, 'block_javascripts'),
        );
    }

    protected function doGetParent(array $context)
    {
        return "VGMWOBundle::layout.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = array())
    {
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }

    // line 2
    public function block_stylesheets($context, array $blocks = array())
    {
        // line 3
        echo "    ";
        $this->displayParentBlock("stylesheets", $context, $blocks);
        echo "
    <link href=\"https://cdn.datatables.net/1.10.9/css/jquery.dataTables.min.css\" rel=\"stylesheet\" media=\"screen\">
    <link href=\"https://cdn.datatables.net/buttons/1.0.3/css/buttons.dataTables.min.css\" rel=\"stylesheet\" media=\"screen\">
    <style>.dataTables_wrapper .ui-toolbar {padding: 0px !important;}.dataTables_filter {display: none;}div.DTTT_container {margin-left: 1em;}#clients-list>tbody>tr{cursor: pointer;}
        table.dataTable thead th, table.dataTable thead td {padding: 5px;}table.dataTable tbody th, table.dataTable tbody td {padding: 5px;}
        table.dataTable thead .sorting {
            background-image: none;
        }
        table.dataTable thead .sorting_desc, table.dataTable thead .sorting_desc_disabled {
            background-image: url(\"";
        // line 12
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/vgmwo/images/sort_desc.png"), "html", null, true);
        echo "\");
            background-position: center bottom;
        }
        table.dataTable thead .sorting_asc, table.dataTable thead .sorting_asc_disabled {
            background-image: url(\"";
        // line 16
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/vgmwo/images/sort_asc.png"), "html", null, true);
        echo "\");
            background-position: center bottom;
        }
    </style>
";
    }

    // line 21
    public function block_content($context, array $blocks = array())
    {
        // line 22
        echo "    <div id=\"work_orders_list\" class=\"container\">
        <div class=\"row\">
            <div class=\"pull-left\" style=\"font-size: 3vmin;\" id=\"workorders-title-add\">
                <strong>Customers</strong>
                <a style=\"display: inline-block; margin-left: 2vmin; color: #428bca; cursor: pointer;\"
                   href=\"";
        // line 27
        echo $this->env->getExtension('routing')->getPath("vgm_client_new");
        echo "\"><span class=\"glyphicon glyphicon-plus\"></span></a>
            </div>
            <div class=\"form-inline pull-right\">
                <div class=\"form-group\">
                    <label class=\"sr-only\" for=\"datatable-searchbox\">Search</label>
                    <input id=\"datatable-searchbox\" class=\"form-control\" placeholder=\"Search\"/>
                </div>
            </div>
            <div class=\"pull-right\" style=\"padding: 0vw 0.5vw;\" id=\"table-buttons-div\"></div>
        </div>
        <div class=\"table-responsive row\" style=\"padding-left: 0px; padding-right: 0px;\">
            <table class=\"table table-hover fixed-header display\" cellspacing=\"0\" id=\"clients-list\">
                <thead>
                <tr style=\"background-color: #fff;\">
                    <!-- ID column -->
                    <th>ID</th>
                    <!-- Customer name -->
                    <th class=\"col-xs-2 col-sm-2\">Name</th>
                    <!-- Customer e-mail -->
                    <th class=\"col-xs-2 col-sm-2\">e-mail</th>
                    <!-- Customer main phone -->
                    <th class=\"col-xs-2 col-sm-2\">Phone</th>
                    <!-- Customer bill to -->
                    <th class=\"col-xs-2 col-sm-2\" style=\"white-space: nowrap;\">Bill to</th>
                    <!-- Customer ship to -->
                    <th class=\"col-xs-2 col-sm-2\" style=\"white-space: nowrap;\">Ship to</th>
                    <!-- Created by -->
                    <th class=\"col-xs-2 col-sm-2\" style=\"white-space: nowrap;\">Created by</th>
                </tr>
                </thead></table></div>
    </div>
";
    }

    // line 59
    public function block_javascripts($context, array $blocks = array())
    {
        // line 60
        echo "    ";
        $this->displayParentBlock("javascripts", $context, $blocks);
        echo "
    <script type=\"text/javascript\" src=\"";
        // line 61
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/vgmwo/js/jquery/jquery.dataTables.min.js"), "html", null, true);
        echo "\"></script>
    <script type=\"text/javascript\" src=\"https://cdn.datatables.net/buttons/1.0.3/js/dataTables.buttons.min.js\"></script>
    <script type=\"text/javascript\" src=\"https://cdn.datatables.net/buttons/1.0.3/js/buttons.print.min.js\"></script>
    <script type=\"text/javascript\">
        function get_clients_list_url(){return '";
        // line 65
        echo $this->env->getExtension('routing')->getPath("vgm_clients_get_current");
        echo "';};
        var calcDataTableHeight = 0;
        var dt_config = {\"processing\": true,\"loading\": false,\"scrollCollapse\": true,
            \"paging\": false,
            \"scrollY\": function(){return (\$(window).height() - \$(\"nav.navbar-inverse.menu-bar\").height()) -  120;},
            \"responsive\": true,\"dom\": 'Bfrtip',
            \"buttons\": [{extend:'print',text:\"Print PreView\",autoPrint:false,exportOptions:{columns:':visible'},
                customize:function(win){\$(win.document.body).css( 'font-size', '10pt' );\$(win.document.body).css( 'height', '95vh' );\$(win.document.body).find( 'table' ).addClass( 'compact' ).css( 'font-size', 'inherit' );
                }},{extend:'print',text:\"Print\",exportOptions:{columns:':visible'},key:{key:80,ctrlKey: true},customize:function(win){\$(win.document.body).css( 'font-size', '10pt' );\$(win.document.body).css( 'height', '95vh' );
                \$(win.document.body).find( 'table' ).addClass( 'compact' ).css( 'font-size', 'inherit' );}},
                {text: \"Excel\",key:{key:'e',ctrlKey: true},action: function(){
                    \$.ajax({type:'post',async:true,dataType:'json',url: '";
        // line 76
        echo $this->env->getExtension('routing')->getPath("export_cll2excel");
        echo "',
                        data:{svalue:\$(\"#datatable-searchbox\").val()},
                        success: function(response){window.location.assign(response.url);},
                        error:function() {alert(\"Error\");}});}}],
            \"aaSorting\": [[1,'asc']],
            \"info\": true,
            \"ajax\":{
                url: get_clients_list_url(),
                type: \"POST\"
            },
            \"aoColumns\": [
                {\"bSortable\": false, \"visible\": false, \"searchable\": false},
                {\"sType\" : \"text\", \"bSortable\": true, \"visible\": true},
                {\"sType\" : \"text\", \"bSortable\": true, \"visible\": true},
                {\"sType\" : \"text\", \"bSortable\": true, \"visible\": true},
                {\"sType\" : \"text\", \"bSortable\": true, \"visible\": true},
                {\"sType\" : \"text\", \"bSortable\": true, \"visible\": true},
                {\"sType\" : \"text\", \"bSortable\": true, \"visible\": true}]
        };
        \$(document).ready(function(){
            jQuery.extend(jQuery.fn.dataTableExt.oSort,{
                \"text-asc\":function(a,b){return ((a<b)?-1:((a>b)?1:0));},
                \"text-desc\":function(a,b){return ((a<b)?1:((a>b)?-1:0));}});

            var oTable = \$('#clients-list').DataTable(dt_config);
            oTable.buttons( 0, null ).container().appendTo(\$(\"#table-buttons-div\"));
            \$('#clients-list tbody').on( 'click', 'tr', function () {var id = oTable.row(\$(this)).data()[0];show_client(id);});
            \$(\"#datatable-searchbox\").on(\"keyup\",function(event){if(event.keyCode == 13 || this.value == \"\")oTable.search(this.value).draw();});
            \$(document).bind(\"keyup keydown\", function(e){if(e.ctrlKey&&(e.keyCode==80||e.keyCode==69)){return false;}});
            \$(window).bind('resize',function(){\$(\".dataTables_scrollBody\").css('max-height',dt_config.scrollY()+'px');});
        });
        function show_client(id){var url = '";
        // line 107
        echo $this->env->getExtension('routing')->getPath("vgm_client_edit", array("id" => "id_val"));
        echo "';url = url.replace(\"id_val\", id);document.location = url;}
    </script>
";
    }

    public function getTemplateName()
    {
        return "VGMWOBundle:Client:index.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  171 => 107,  137 => 76,  123 => 65,  116 => 61,  111 => 60,  108 => 59,  72 => 27,  65 => 22,  62 => 21,  53 => 16,  46 => 12,  33 => 3,  30 => 2,  11 => 1,);
    }
}
