<?php

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

        // line 1
        $this->parent = $this->loadTemplate("VGMWOBundle::layout.html.twig", "VGMWOBundle:NDepartment:index.html.twig", 1);
        $this->blocks = array(
            'jumbotron_content' => array($this, 'block_jumbotron_content'),
            '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_jumbotron_content($context, array $blocks = array())
    {
        // line 3
        echo "    <div class=\"jumbotron\" style=\"padding-top: 10px; padding-bottom: 5px;\"  id=\"jumbotron\">
        <div class=\"container-fluid\">
            <div class=\"col-md-12 text-center\" style=\"padding-left: 0px;\">
                <H3 style=\"margin: 0px;\"><strong>Departments</strong></H3>
            </div>
        </div>
    </div>
";
    }

    // line 11
    public function block_content($context, array $blocks = array())
    {
        // line 12
        echo "    <div class=\"container\" style=\"min-height: 500px;\">
        <div class=\"table-responsive\">
            <table class=\"table table-striped table-hover\">
                <thead>
                <tr>
                    <th class=\"col-md-2\">Name</th>
                    <th class=\"col-md-4\">Supervisor</th>
                    <th class=\"col-md-5\">Description</th>
                    <th class=\"col-md-1\">Created at</th>
                </tr>
                </thead>
                <tbody>
                ";
        // line 24
        $context['_parent'] = (array) $context;
        $context['_seq'] = twig_ensure_traversable((isset($context["entities"]) ? $context["entities"] : null));
        foreach ($context['_seq'] as $context["_key"] => $context["entity"]) {
            // line 25
            echo "                    <tr style=\"cursor: pointer;\"
                        onclick=\"location.href='";
            // line 26
            echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("vgm_departments_edit", array("id" => $this->getAttribute($context["entity"], "getId", array(), "method"))), "html", null, true);
            echo "'\">
                        <td>";
            // line 27
            echo twig_escape_filter($this->env, $this->getAttribute($context["entity"], "name", array()), "html", null, true);
            echo "</td>
                        <td>
                            ";
            // line 29
            if ((twig_length_filter($this->env, $this->getAttribute($context["entity"], "supervisors", array())) != 1)) {
                // line 30
                echo "                                ";
                echo twig_escape_filter($this->env, twig_length_filter($this->env, $this->getAttribute($context["entity"], "supervisors", array())), "html", null, true);
                echo "
                            ";
            } else {
                // line 32
                echo "                                ";
                $context['_parent'] = (array) $context;
                $context['_seq'] = twig_ensure_traversable($this->getAttribute($context["entity"], "supervisors", array()));
                foreach ($context['_seq'] as $context["_key"] => $context["sup"]) {
                    // line 33
                    echo "                                    ";
                    echo twig_escape_filter($this->env, $context["sup"], "html", null, true);
                    echo "
                                ";
                }
                $_parent = $context['_parent'];
                unset($context['_seq'], $context['_iterated'], $context['_key'], $context['sup'], $context['_parent'], $context['loop']);
                $context = array_intersect_key($context, $_parent) + $_parent;
                // line 35
                echo "                            ";
            }
            // line 36
            echo "                        </td>
                        <td>";
            // line 37
            echo twig_escape_filter($this->env, $this->getAttribute($context["entity"], "description", array()), "html", null, true);
            echo "</td>
                        <td>";
            // line 38
            if ($this->getAttribute($context["entity"], "createdat", array())) {
                echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->getAttribute($context["entity"], "createdat", array()), "m/d/Y"), "html", null, true);
            }
            echo "</td>
                    </tr>
                ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['entity'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 41
        echo "                </tbody>
            </table>
            <div class=\"container-fluid\">
                <div class=\"col-md-3 text-muted text-left\">
                    <strong>";
        // line 45
        echo twig_escape_filter($this->env, (isset($context["cant_departments"]) ? $context["cant_departments"] : null), "html", null, true);
        echo "</strong> registered departments
                    ";
        // line 46
        if (((isset($context["last_page"]) ? $context["last_page"] : null) > 1)) {
            // line 47
            echo "                        - page <strong>";
            echo twig_escape_filter($this->env, (isset($context["current_page"]) ? $context["current_page"] : null), "html", null, true);
            echo "/";
            echo twig_escape_filter($this->env, (isset($context["last_page"]) ? $context["last_page"] : null), "html", null, true);
            echo "</strong>
                    ";
        }
        // line 49
        echo "                </div>
                <div class=\"col-md-6 text-center\">
                    ";
        // line 51
        if (((isset($context["last_page"]) ? $context["last_page"] : null) > 1)) {
            // line 52
            echo "                        ";
            if (((isset($context["current_page"]) ? $context["current_page"] : null) > 1)) {
                // line 53
                echo "                            <a href=\"";
                echo $this->env->getExtension('routing')->getPath("vgm_departments", array("page" => 1));
                echo "\" >
                                <span class=\"glyphicon glyphicon-step-backward \"
                                      alt=\"First page\" title=\"First page\"/>
                            </a>

                            <a href=\"";
                // line 58
                echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("vgm_departments", array("page" => (isset($context["previous_page"]) ? $context["previous_page"] : null))), "html", null, true);
                echo "\">
                                <span class=\"glyphicon glyphicon-backward\" alt=\"Previous page\" title=\"Previous page\" />
                            </a>
                        ";
            }
            // line 62
            echo "
                        ";
            // line 63
            $context['_parent'] = (array) $context;
            $context['_seq'] = twig_ensure_traversable(range(1, (isset($context["last_page"]) ? $context["last_page"] : null)));
            foreach ($context['_seq'] as $context["_key"] => $context["page"]) {
                // line 64
                echo "                            ";
                if (($context["page"] == (isset($context["current_page"]) ? $context["current_page"] : null))) {
                    // line 65
                    echo "                                ";
                    echo twig_escape_filter($this->env, $context["page"], "html", null, true);
                    echo "
                            ";
                } else {
                    // line 67
                    echo "                                <a href=\"";
                    echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("vgm_departments", array("page" => $context["page"])), "html", null, true);
                    echo "\">";
                    echo twig_escape_filter($this->env, $context["page"], "html", null, true);
                    echo "</a>
                            ";
                }
                // line 69
                echo "                        ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['page'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 70
            echo "
                        ";
            // line 71
            if (((isset($context["last_page"]) ? $context["last_page"] : null) > (isset($context["current_page"]) ? $context["current_page"] : null))) {
                // line 72
                echo "                            <a href=\"";
                echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("vgm_departments", array("page" => (isset($context["next_page"]) ? $context["next_page"] : null))), "html", null, true);
                echo "\">
                                <span class=\"glyphicon glyphicon-forward\" alt=\"Next page\" title=\"Next page\" />
                            </a>

                            <a href=\"";
                // line 76
                echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("vgm_departments", array("page" => (isset($context["last_page"]) ? $context["last_page"] : null))), "html", null, true);
                echo "\">
                                <span class=\"glyphicon glyphicon-step-forward\" alt=\"Last page\" title=\"Last page\" />
                            </a>
                        ";
            }
            // line 80
            echo "                    ";
        }
        // line 81
        echo "                </div>
                <div class=\"col-md-3 text-right\">
                    <a href=\"";
        // line 83
        echo $this->env->getExtension('routing')->getPath("vgm_departments_new");
        echo "\">
                        <span class=\"glyphicon glyphicon-plus-sign\"></span>
                        Create
                    </a>
                </div>
            </div>
        </div>
    </div>
";
    }

    // line 92
    public function block_javascripts($context, array $blocks = array())
    {
        // line 93
        echo "    ";
        $this->displayParentBlock("javascripts", $context, $blocks);
        echo "
    <script type=\"text/javascript\">
        // Activates knockout.js
        ////ko.applyBindings(baseViewModel, document.getElementById(\"menu-bar\"));
    </script>
";
    }

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

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  238 => 93,  235 => 92,  222 => 83,  218 => 81,  215 => 80,  208 => 76,  200 => 72,  198 => 71,  195 => 70,  189 => 69,  181 => 67,  175 => 65,  172 => 64,  168 => 63,  165 => 62,  158 => 58,  149 => 53,  146 => 52,  144 => 51,  140 => 49,  132 => 47,  130 => 46,  126 => 45,  120 => 41,  109 => 38,  105 => 37,  102 => 36,  99 => 35,  90 => 33,  85 => 32,  79 => 30,  77 => 29,  72 => 27,  68 => 26,  65 => 25,  61 => 24,  47 => 12,  44 => 11,  33 => 3,  30 => 2,  11 => 1,);
    }
}
