<?php

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

        // line 1
        $this->parent = $this->loadTemplate("VGMWOBundle::layout.html.twig", "VGMWOBundle:Worker: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 3
    public function block_stylesheets($context, array $blocks = array())
    {
        // line 4
        echo "    ";
        $this->displayParentBlock("stylesheets", $context, $blocks);
        echo "
    <link href=\"";
        // line 5
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/vgmwo/css/bootstrap-datetimepicker.css"), "html", null, true);
        echo "\" rel=\"stylesheet\" media=\"screen\">
    <link href=\"";
        // line 6
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/vgmwo/css/waitMe.css"), "html", null, true);
        echo "\" rel=\"stylesheet\" media=\"screen\">
    <link href=\"";
        // line 7
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/vgmwo/css/jquery-ui.css"), "html", null, true);
        echo "\" rel=\"stylesheet\" media=\"screen\">
    <link href=\"";
        // line 8
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/vgmwo/css/dataTables.jqueryui.css"), "html", null, true);
        echo "\" rel=\"stylesheet\" media=\"screen\">
    <link href=\"";
        // line 9
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/vgmwo/css/knockout.file.binding.css"), "html", null, true);
        echo "\" rel=\"stylesheet\" media=\"screen\">
";
    }

    // line 11
    public function block_content($context, array $blocks = array())
    {
        // line 12
        echo "    <div id=\"workers_list\"
         class=\"container\">
        <!-- Nav tabs -->
        <ul class=\"nav nav-tabs\" role=\"tablist\">
            <li class=\"col-md-6 active\"><a href=\"#active\" role=\"tab\" data-toggle=\"tab\">Active Employees</a></li>
            <li class=\"col-md-6\"><a href=\"#unactive\" role=\"tab\" data-toggle=\"tab\">Unactive Employees</a></li>
        </ul>

        <!-- Tab panes -->
        <div class=\"tab-content\">
            <div class=\"tab-pane active\" id=\"active\">
                <div id=\"active-workers-table\"
                     class=\"table-responsive col-lg-12\"
                     style=\"padding-left: 0px; padding-right: 0px;\">
                    <table class=\"table table-hover fixed-header active_workers\" cellspacing=\"0\" width=\"100%\">
                        <thead>
                            <tr style=\"background-color: #fff;\">
                                <!-- Picture column -->
                                <th class=\"col-md-1 text-center\">Picture</th>
                                <!-- Code column -->
                                <th class=\"col-md-1\">Code</th>
                                <!-- Name column -->
                                <th class=\"col-md-2\">Full name</th>
                                <!-- Department column -->
                                <th class=\"col-md-3\">Department</th>
                                <!-- Phone column -->
                                <th class=\"col-md-2\">Phone number</th>
                                <!-- email column -->
                                <th class=\"col-md-2\">e-mail</th>
                                <!-- State / Zip code column -->
                                <th class=\"col-md-1\">State/Zip</th>
                            </tr>
                        </thead>
                        <tbody data-bind=\"foreach: active_workers\">
                        <tr data-bind=\"click: show_me\" style=\"cursor: pointer;\">
                            <td class=\"text-center\">
                                <img data-bind=\"attr:{src: picture().dataURL() != null
                                                ? picture().dataURL()
                                                : '";
        // line 50
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/vgmwo/images/unknown-user.png"), "html", null, true);
        echo "'},
                                                click: enlarge_picture\" width=\"32px\" height=\"32px\"
                                     style=\"cursor: zoom-in\" class=\"picture\">
                            </td>
                            <td data-bind=\"text: code\"/>
                            <td data-bind=\"text: full_name\"/>
                            <td data-bind=\"text: department() ? department().name : '- - -'\"/>
                            <td data-bind=\"text: phone2show()\"/>
                            <td data-bind=\"text: email2show()\"/>
                            <td data-bind=\"text: state_zip2show()\"/>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class=\"tab-pane\" id=\"unactive\">
                <div id=\"unactive-workers-table\"
                     class=\"table-responsive col-lg-12\"
                     style=\"padding-left: 0px; padding-right: 0px;\">
                    <table class=\"table table-hover fixed-header unactive_workers\" cellspacing=\"0\" width=\"100%\">
                        <thead>
                        <tr style=\"background-color: #fff;\">
                            <!-- Picture column -->
                            <th class=\"col-md-1 text-center\">Picture</th>
                            <!-- Code column -->
                            <th class=\"col-md-1\">Code</th>
                            <!-- Name column -->
                            <th class=\"col-md-2\">Full name</th>
                            <!-- Department column -->
                            <th class=\"col-md-3\">Department</th>
                            <!-- Phone column -->
                            <th class=\"col-md-2\">Phone number</th>
                            <!-- email column -->
                            <th class=\"col-md-2\">e-mail</th>
                            <!-- State / Zip code column -->
                            <th class=\"col-md-1\">State/Zip</th>
                        </tr>
                        </thead>
                        <tbody data-bind=\"foreach: unactive_workers\">
                        <tr data-bind=\"click: show_me\" style=\"cursor: pointer;\">
                            <td class=\"text-center\">
                                <img data-bind=\"attr:{src: picture().dataURL() != null
                                                ? picture().dataURL()
                                                : '";
        // line 93
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/vgmwo/images/unknown-user.png"), "html", null, true);
        echo "'},
                                                click: enlarge_picture\" width=\"32px\" height=\"32px\"
                                     style=\"cursor: zoom-in\" class=\"picture\">
                            </td>
                            <td data-bind=\"text: code\"/>
                            <td data-bind=\"text: full_name\"/>
                            <td data-bind=\"text: department() ? department().name : '- - -'\"/>
                            <td data-bind=\"text: phone2show()\"/>
                            <td data-bind=\"text: email2show()\"/>
                            <td data-bind=\"text: state_zip2show()\"/>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <!-- Enlarge Picture -->
    <div class=\"modal fade bs-example-modal-lg\"
         id=\"large-picture\"
         role=\"dialog\"
         aria-labelledby=\"myModalLabel\"
         aria-hidden=\"true\">
        <div class=\"modal-dialog\">
            <div class=\"modal-content\">
                <div class=\"modal-header\">
                    <button type=\"button\" class=\"close\" data-dismiss=\"modal\">
                        <span aria-hidden=\"true\">&times;</span>
                        <span class=\"sr-only\">Cancel</span>
                    </button>
                    <h4 id=\"stock-data-header\" class=\"modal-title\">Enlarged Picture</h4>
                </div>
                <div id=\"pictureModal\" class=\"modal-body\">
                    <img data-bind=\"attr:{src: large_picture}\" width=\"100%\" height=\"100%\">
                </div>
            </div>
        </div>
    </div>
";
    }

    // line 133
    public function block_javascripts($context, array $blocks = array())
    {
        // line 134
        echo "    ";
        $this->displayParentBlock("javascripts", $context, $blocks);
        echo "
    <script type=\"text/javascript\" src=\"";
        // line 135
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/vgmwo/js/bootstrap-datetimepicker.js"), "html", null, true);
        echo "\"></script>
    <script type=\"text/javascript\" src=\"";
        // line 136
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/vgmwo/js/knockout-file-bindings.js"), "html", null, true);
        echo "\"></script>
    <script type=\"text/javascript\" src=\"";
        // line 137
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/vgmwo/js/jquery/jquery.stickytableheaders.min.js"), "html", null, true);
        echo "\"></script>
    <script type=\"text/javascript\" src=\"";
        // line 138
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/vgmwo/js/jquery/jquery-ui.js"), "html", null, true);
        echo "\"></script>
    <script type=\"text/javascript\" src=\"";
        // line 139
        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=\"";
        // line 140
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/vgmwo/js/customized/utils/Utils.js"), "html", null, true);
        echo "\"></script>
    <script type=\"text/javascript\" src=\"";
        // line 141
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/vgmwo/js/waitMe.js"), "html", null, true);
        echo "\"></script>
    <script type=\"text/javascript\" src=\"";
        // line 142
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/vgmwo/js/customized/Workers.js"), "html", null, true);
        echo "\"></script>
    <script type=\"text/javascript\">
        \$(document).ready(function() {
            loadPageFeatures();
            viewModel.get_support();
            viewModel.get_workers_data();

            \$(\"#tabs\").tabs( {
                \"activate\": function(event, ui) {
                    \$( \$.fn.dataTable.tables( true ) ).DataTable().columns.adjust();
                }
            } );
            viewModel.init_active_workers_table();
            viewModel.init_unactive_workers_table();
            \$(window).resize(function () {
                viewModel.refresh_active_workers_table();
                viewModel.refresh_unactive_workers_table();
            });
            \$('a[href=\"#active\"][data-toggle=\"tab\"]').on('shown.bs.tab', function(e){
               viewModel.refresh_active_workers_table();
            });
            \$('a[href=\"#unactive\"][data-toggle=\"tab\"]').on('shown.bs.tab', function(e){
                viewModel.refresh_unactive_workers_table();
            });
        });
        \$('#large-picture').on('hidden.bs.modal', function (e) {
            viewModel.clear_large_image();
        });
        function generate_worker_url(worker_id){
            var url = \"";
        // line 171
        echo $this->env->getExtension('routing')->getPath("workers_show", array("id" => "worker_id"));
        echo "\".replace(\"worker_id\", worker_id);
            window.location.href = url;
        }
        function getURLSupport(){
            var url = \"";
        // line 175
        echo $this->env->getExtension('routing')->getPath("get_workers_support");
        echo "\";
            return url;
        }
        function getURLFilterWorkers(){
            var url = \"";
        // line 179
        echo $this->env->getExtension('routing')->getPath("get_filtered_workers");
        echo "\";
            return url;
        }
        function getURLUpdateWorker(){
            var url = \"";
        // line 183
        echo $this->env->getExtension('routing')->getPath("update_worker");
        echo "\";
            return url;
        }
        function getURLNewWorker(){
            var url = \"";
        // line 187
        echo $this->env->getExtension('routing')->getPath("workers_new");
        echo "\";
            return url;
        }


        viewModel.LoadData = ko.dependentObservable(function() {
            viewModel.picture = ko.observable({
                dataURL: ko.observable(),
                // base64String: ko.observable(),
            });
            viewModel.onClear = function(picture){
                if(confirm('Are you sure?')){
                    picture.clear && picture.clear();
                }
            };
        }, viewModel);

        // Activates knockout.js
        ko.applyBindings(viewModel, document.getElementById(\"content-body\"));
    </script>
";
    }

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

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  288 => 187,  281 => 183,  274 => 179,  267 => 175,  260 => 171,  228 => 142,  224 => 141,  220 => 140,  216 => 139,  212 => 138,  208 => 137,  204 => 136,  200 => 135,  195 => 134,  192 => 133,  149 => 93,  103 => 50,  63 => 12,  60 => 11,  54 => 9,  50 => 8,  46 => 7,  42 => 6,  38 => 5,  33 => 4,  30 => 3,  11 => 1,);
    }
}
