<?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;

/* leave_application/index.html.twig */
class __TwigTemplate_4dd856bd43fd92965e1473fa4b09e34e040252722d065f07bcbeaea895c162f3 extends Template
{
    private $source;
    private $macros = [];

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

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

        $this->blocks = [
            'title' => [$this, 'block_title'],
            'body' => [$this, 'block_body'],
        ];
    }

    protected function doGetParent(array $context)
    {
        // line 1
        return "template.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "leave_application/index.html.twig"));

        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "leave_application/index.html.twig"));

        $this->parent = $this->loadTemplate("template.html.twig", "leave_application/index.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
        
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);

        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

    }

    // line 3
    public function block_title($context, array $blocks = [])
    {
        $macros = $this->macros;
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));

        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));

        echo "Leave List - ";
        $this->displayParentBlock("title", $context, $blocks);
        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

        
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);

    }

    // line 5
    public function block_body($context, array $blocks = [])
    {
        $macros = $this->macros;
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));

        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));

        // line 6
        echo "<!-- Title Start  -->
                        <div class=\"app-page-title\">
                            <div class=\"page-title-wrapper\">

                                <div class=\"page-title-heading\">
                                    <div class=\"page-title-icon\">
                                        <i class=\"metismenu-icon pe-7s-diamond text-success\">
                                        </i>
                                    </div>
                                    <div><h3>";
        // line 15
        echo twig_escape_filter($this->env, (isset($context["title"]) || array_key_exists("title", $context) ? $context["title"] : (function () { throw new RuntimeError('Variable "title" does not exist.', 15, $this->source); })()), "html", null, true);
        echo "</h3>
                                       
                                    </div>
                                </div>
\t\t\t\t\t\t\t\t
                                <div class=\"page-title-actions\">
                                   <div class=\"d-inline-block dropdown\">
                                       <nav class=\"\" aria-label=\"breadcrumb\">
                                                    <ol class=\"breadcrumb\">
                                                        <li class=\"breadcrumb-item\"><a href=\"#\">Home</a></li>
                                                        <li class=\"active breadcrumb-item\" aria-current=\"page\">Leave List</li>
                                                        
                                                    </ol>
                                                </nav>
                                    </div>
                                </div> 
\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t</div>
                        </div>    
                        ";
        // line 34
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable(twig_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.', 34, $this->source); })()), "flashes", [0 => "notice"], "method", false, false, false, 34));
        foreach ($context['_seq'] as $context["_key"] => $context["message"]) {
            // line 35
            echo "                            
                        <div class=\"alert alert-info alert-dismissible\">
                            <a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>
                            <strong>";
            // line 38
            echo twig_escape_filter($this->env, $context["message"], "html", null, true);
            echo "</strong> 
                        </div>
                        ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['message'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 40
        echo "  

                        ";
        // line 42
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable(twig_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.', 42, $this->source); })()), "flashes", [0 => "warning"], "method", false, false, false, 42));
        foreach ($context['_seq'] as $context["_key"] => $context["message"]) {
            echo "                   
                            <div class=\"alert alert-danger alert-dismissible\">
                                <a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>
                                <strong>";
            // line 45
            echo twig_escape_filter($this->env, $context["message"], "html", null, true);
            echo "</strong> 
                            </div>
                        ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['message'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 47
        echo "  \t 

\t\t\t\t\t\t<ul class=\"body-tabs body-tabs-layout tabs-animated body-tabs-animated nav\">
                            
                            <li class=\"nav-item\">
                                <a role=\"tab\" class=\"nav-link active\"  href=\"";
        // line 52
        echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_leave_application_new");
        echo "\">
                                    <span><i class=\"fa fa-plus\"> New Leave Application </i></span>
                                </a>
                            </li>
                        </ul> <!-- Title End  --> 
\t\t\t\t\t\t
\t\t\t\t\t\t<!-- Tab Start  --> 
                        <div class=\"tab-content\">
\t\t\t\t\t\t
\t\t\t\t\t\t    <!-- Table Tab Start  --> 
                            <div class=\"tab-pane tabs-animation fade show active\" id=\"tab-content-0\" role=\"tabpanel\">
                                <div class=\"main-card mb-3 card\">
                                    <div class=\"card-body\">
\t\t\t\t\t\t\t\t\t
                                        <div class=\"search-wrapper pull-right\">
                                            <div class=\"input-holder\">
                                                   ";
        // line 68
        echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\Controller\\LeaveApplicationController::searchBar"));
        // line 70
        echo "
                                                   <button class=\"search-icon\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"Search by any fields\"><span></span></button>
                                            </div>
                                            <button class=\"close\"></button>
\t\t\t\t\t\t\t\t\t\t\t
                                        </div>
\t\t\t\t\t
                                   
                                        <div class=\"table table-bordered table-responsive table-striped table-hover\" style=\"margin-top: 51px;\">
\t\t\t\t\t\t\t\t\t\t
                                            <table class=\"mb-0 table\">
                                                <thead>
                                                <tr>
                                                    <th>#</th>
                                                    <th>Leave</th>
                                                    <th>Days From</th>
                                                    <th>Days To</th>
                                                    <th>Reasons</th> 
                                                    <th>Functional<br>Head</th>  
                                                    <th>Department<br>Head</th>                                                               
                                                    <th><i class=\"fa fa-cogs\" aria-hidden=\"true\"></i> Actions</th>
                                                </tr>
                                                </thead>
                                                <tbody>
                                                ";
        // line 94
        $context["pageUrl"] = twig_split_filter($this->env, twig_get_attribute($this->env, $this->source, twig_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.', 94, $this->source); })()), "request", [], "any", false, false, false, 94), "requesturi", [], "any", false, false, false, 94), "/");
        // line 95
        echo "                                                  ";
        $context["pageNo"] = twig_last($this->env, (isset($context["pageUrl"]) || array_key_exists("pageUrl", $context) ? $context["pageUrl"] : (function () { throw new RuntimeError('Variable "pageUrl" does not exist.', 95, $this->source); })()));
        echo " 

                                                  ";
        // line 97
        if (preg_match("/^\\d+\$/", (isset($context["pageNo"]) || array_key_exists("pageNo", $context) ? $context["pageNo"] : (function () { throw new RuntimeError('Variable "pageNo" does not exist.', 97, $this->source); })()))) {
            // line 98
            echo "                                                    ";
            $context["counter"] = (((isset($context["pageNo"]) || array_key_exists("pageNo", $context) ? $context["pageNo"] : (function () { throw new RuntimeError('Variable "pageNo" does not exist.', 98, $this->source); })()) - 1) * 15);
            // line 99
            echo "                                                  ";
        } else {
            // line 100
            echo "                                                    ";
            $context["counter"] = 0;
            // line 101
            echo "                                                  ";
        }
        // line 102
        echo "
                                                  ";
        // line 103
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable((isset($context["leave_applications"]) || array_key_exists("leave_applications", $context) ? $context["leave_applications"] : (function () { throw new RuntimeError('Variable "leave_applications" does not exist.', 103, $this->source); })()));
        $context['_iterated'] = false;
        foreach ($context['_seq'] as $context["_key"] => $context["leave_application"]) {
            // line 104
            echo "                                                    ";
            $context["counter"] = ((isset($context["counter"]) || array_key_exists("counter", $context) ? $context["counter"] : (function () { throw new RuntimeError('Variable "counter" does not exist.', 104, $this->source); })()) + 1);
            // line 105
            echo "                                                    <tr>
                                                      <td>";
            // line 106
            echo twig_escape_filter($this->env, (isset($context["counter"]) || array_key_exists("counter", $context) ? $context["counter"] : (function () { throw new RuntimeError('Variable "counter" does not exist.', 106, $this->source); })()), "html", null, true);
            echo "</td>  
                                                      <td> ";
            // line 107
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["leave_application"], "leavename", [], "any", false, false, false, 107), "name", [], "any", false, false, false, 107), "html", null, true);
            echo " </td>                                                 
                                                      <td>";
            // line 108
            ((twig_get_attribute($this->env, $this->source, $context["leave_application"], "fromDays", [], "any", false, false, false, 108)) ? (print (twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["leave_application"], "fromDays", [], "any", false, false, false, 108), "d-m-Y"), "html", null, true))) : (print ("")));
            echo "</td>
                                                      <td>";
            // line 109
            ((twig_get_attribute($this->env, $this->source, $context["leave_application"], "toDays", [], "any", false, false, false, 109)) ? (print (twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["leave_application"], "toDays", [], "any", false, false, false, 109), "d-m-Y"), "html", null, true))) : (print ("")));
            echo "</td>
                                                      <td>";
            // line 110
            echo twig_escape_filter($this->env, twig_slice($this->env, twig_get_attribute($this->env, $this->source, $context["leave_application"], "reasons", [], "any", false, false, false, 110), 0, 30), "html", null, true);
            echo "</td>  
                                                      <td>
                                                        ";
            // line 112
            if ( !(null === twig_get_attribute($this->env, $this->source, twig_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.', 112, $this->source); })()), "user", [], "any", false, false, false, 112), "functionalHead", [], "any", false, false, false, 112))) {
                // line 113
                echo "                                                            ";
                if ((null === twig_get_attribute($this->env, $this->source, $context["leave_application"], "fhApproval", [], "any", false, false, false, 113))) {
                    // line 114
                    echo "                                                                <div class=\"badge badge-warning\">
                                                                    Pending
                                                                </div>
                                                            ";
                } elseif ((0 === twig_compare(twig_get_attribute($this->env, $this->source,                 // line 117
$context["leave_application"], "fhApproval", [], "any", false, false, false, 117), 1))) {
                    echo " 
                                                                <div class=\"badge badge-success\">                                                              
                                                                    Recommended
                                                                </div>   
                                                            ";
                } else {
                    // line 121
                    echo "                                                           
                                                                <div class=\"badge badge-danger\">                                                               
                                                                    Rejected
                                                                </div> 
                                                            ";
                }
                // line 126
                echo "                                                        ";
            }
            // line 127
            echo "                                                      </td>      
                                                       <td>   
                                                        ";
            // line 129
            if ((null === twig_get_attribute($this->env, $this->source, $context["leave_application"], "dhApproval", [], "any", false, false, false, 129))) {
                // line 130
                echo "                                                            <div class=\"badge badge-warning\">
                                                                Pending
                                                            </div>
                                                        ";
            } elseif ((0 === twig_compare(twig_get_attribute($this->env, $this->source,             // line 133
$context["leave_application"], "dhApproval", [], "any", false, false, false, 133), 1))) {
                echo " 
                                                             <div class=\"badge badge-success\">                                                              
                                                                Approved
                                                            </div>   
                                                        ";
            } else {
                // line 137
                echo "                                                           
                                                            <div class=\"badge badge-danger\">                                                               
                                                                Rejected
                                                            </div> 
                                                        ";
            }
            // line 142
            echo "                                                      </td>                                                       
                                                      <td>
                                                       <a href=\"";
            // line 144
            echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_leave_application_show", ["id" => twig_get_attribute($this->env, $this->source, $context["leave_application"], "id", [], "any", false, false, false, 144)]), "html", null, true);
            echo "\" class=\"btn btn-success btn-sm\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"Details\"><i class=\"fa fa-eye\"></i></a>
                                                       <a href=\"";
            // line 145
            echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_leave_application_edit", ["id" => twig_get_attribute($this->env, $this->source, $context["leave_application"], "id", [], "any", false, false, false, 145)]), "html", null, true);
            echo "\" class=\"btn btn-primary btn-sm\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"Edit\"><i class=\"fa fa-edit\"></i></a>
                                                      </td>
                                                    </tr>
                                                  ";
            $context['_iterated'] = true;
        }
        if (!$context['_iterated']) {
            // line 149
            echo "                                                  <tr>
                                                    <td colspan=\"9\">No records found</td>
                                                  </tr>
                                                 ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['leave_application'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 153
        echo "                                                </tbody>
                                            </table>
                 

                                        </div>


                                         \t\t\t\t\t\t\t
                                    </div>
                                </div>
\t\t\t\t\t\t\t\t
                              
                            </div> <!-- Table Tab End  --> 
\t\t\t\t\t\t\t\t\t\t\t\t\t\t
                        </div> <!-- Tab End  --> 


";
        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

        
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);

    }

    public function getTemplateName()
    {
        return "leave_application/index.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  352 => 153,  343 => 149,  334 => 145,  330 => 144,  326 => 142,  319 => 137,  311 => 133,  306 => 130,  304 => 129,  300 => 127,  297 => 126,  290 => 121,  282 => 117,  277 => 114,  274 => 113,  272 => 112,  267 => 110,  263 => 109,  259 => 108,  255 => 107,  251 => 106,  248 => 105,  245 => 104,  240 => 103,  237 => 102,  234 => 101,  231 => 100,  228 => 99,  225 => 98,  223 => 97,  217 => 95,  215 => 94,  189 => 70,  187 => 68,  168 => 52,  161 => 47,  152 => 45,  144 => 42,  140 => 40,  131 => 38,  126 => 35,  122 => 34,  100 => 15,  89 => 6,  79 => 5,  59 => 3,  36 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("{% extends 'template.html.twig' %}

{% block title %}Leave List - {{ parent() }}{% endblock %}

{% block body %}
<!-- Title Start  -->
                        <div class=\"app-page-title\">
                            <div class=\"page-title-wrapper\">

                                <div class=\"page-title-heading\">
                                    <div class=\"page-title-icon\">
                                        <i class=\"metismenu-icon pe-7s-diamond text-success\">
                                        </i>
                                    </div>
                                    <div><h3>{{ title }}</h3>
                                       
                                    </div>
                                </div>
\t\t\t\t\t\t\t\t
                                <div class=\"page-title-actions\">
                                   <div class=\"d-inline-block dropdown\">
                                       <nav class=\"\" aria-label=\"breadcrumb\">
                                                    <ol class=\"breadcrumb\">
                                                        <li class=\"breadcrumb-item\"><a href=\"#\">Home</a></li>
                                                        <li class=\"active breadcrumb-item\" aria-current=\"page\">Leave List</li>
                                                        
                                                    </ol>
                                                </nav>
                                    </div>
                                </div> 
\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t</div>
                        </div>    
                        {% for message in app.flashes('notice') %}
                            
                        <div class=\"alert alert-info alert-dismissible\">
                            <a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>
                            <strong>{{ message }}</strong> 
                        </div>
                        {% endfor %}  

                        {% for message in app.flashes('warning') %}                   
                            <div class=\"alert alert-danger alert-dismissible\">
                                <a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>
                                <strong>{{ message }}</strong> 
                            </div>
                        {% endfor %}  \t 

\t\t\t\t\t\t<ul class=\"body-tabs body-tabs-layout tabs-animated body-tabs-animated nav\">
                            
                            <li class=\"nav-item\">
                                <a role=\"tab\" class=\"nav-link active\"  href=\"{{ path('app_leave_application_new') }}\">
                                    <span><i class=\"fa fa-plus\"> New Leave Application </i></span>
                                </a>
                            </li>
                        </ul> <!-- Title End  --> 
\t\t\t\t\t\t
\t\t\t\t\t\t<!-- Tab Start  --> 
                        <div class=\"tab-content\">
\t\t\t\t\t\t
\t\t\t\t\t\t    <!-- Table Tab Start  --> 
                            <div class=\"tab-pane tabs-animation fade show active\" id=\"tab-content-0\" role=\"tabpanel\">
                                <div class=\"main-card mb-3 card\">
                                    <div class=\"card-body\">
\t\t\t\t\t\t\t\t\t
                                        <div class=\"search-wrapper pull-right\">
                                            <div class=\"input-holder\">
                                                   {{ render(controller(
                                                        'App\\\\Controller\\\\LeaveApplicationController::searchBar'
                                                            )) }}
                                                   <button class=\"search-icon\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"Search by any fields\"><span></span></button>
                                            </div>
                                            <button class=\"close\"></button>
\t\t\t\t\t\t\t\t\t\t\t
                                        </div>
\t\t\t\t\t
                                   
                                        <div class=\"table table-bordered table-responsive table-striped table-hover\" style=\"margin-top: 51px;\">
\t\t\t\t\t\t\t\t\t\t
                                            <table class=\"mb-0 table\">
                                                <thead>
                                                <tr>
                                                    <th>#</th>
                                                    <th>Leave</th>
                                                    <th>Days From</th>
                                                    <th>Days To</th>
                                                    <th>Reasons</th> 
                                                    <th>Functional<br>Head</th>  
                                                    <th>Department<br>Head</th>                                                               
                                                    <th><i class=\"fa fa-cogs\" aria-hidden=\"true\"></i> Actions</th>
                                                </tr>
                                                </thead>
                                                <tbody>
                                                {% set pageUrl = app.request.requesturi|split('/') %}
                                                  {% set pageNo = pageUrl|last %} 

                                                  {% if pageNo matches '/^\\\\d+\$/' %}
                                                    {% set counter = (pageNo-1) * 15 %}
                                                  {% else %}
                                                    {% set counter = 0 %}
                                                  {% endif %}

                                                  {% for leave_application in leave_applications %}
                                                    {% set counter = counter + 1 %}
                                                    <tr>
                                                      <td>{{ counter }}</td>  
                                                      <td> {{ leave_application.leavename.name }} </td>                                                 
                                                      <td>{{ leave_application.fromDays ? leave_application.fromDays|date('d-m-Y') : '' }}</td>
                                                      <td>{{ leave_application.toDays ? leave_application.toDays|date('d-m-Y') : '' }}</td>
                                                      <td>{{ leave_application.reasons|slice(0,30) }}</td>  
                                                      <td>
                                                        {% if app.user.functionalHead is not null %}
                                                            {% if leave_application.fhApproval is null %}
                                                                <div class=\"badge badge-warning\">
                                                                    Pending
                                                                </div>
                                                            {% elseif leave_application.fhApproval == 1 %} 
                                                                <div class=\"badge badge-success\">                                                              
                                                                    Recommended
                                                                </div>   
                                                            {% else %}                                                           
                                                                <div class=\"badge badge-danger\">                                                               
                                                                    Rejected
                                                                </div> 
                                                            {% endif %}
                                                        {% endif %}
                                                      </td>      
                                                       <td>   
                                                        {% if leave_application.dhApproval is null %}
                                                            <div class=\"badge badge-warning\">
                                                                Pending
                                                            </div>
                                                        {% elseif leave_application.dhApproval == 1 %} 
                                                             <div class=\"badge badge-success\">                                                              
                                                                Approved
                                                            </div>   
                                                        {% else %}                                                           
                                                            <div class=\"badge badge-danger\">                                                               
                                                                Rejected
                                                            </div> 
                                                        {% endif %}
                                                      </td>                                                       
                                                      <td>
                                                       <a href=\"{{ path('app_leave_application_show', {'id': leave_application.id}) }}\" class=\"btn btn-success btn-sm\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"Details\"><i class=\"fa fa-eye\"></i></a>
                                                       <a href=\"{{ path('app_leave_application_edit', {'id': leave_application.id}) }}\" class=\"btn btn-primary btn-sm\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"Edit\"><i class=\"fa fa-edit\"></i></a>
                                                      </td>
                                                    </tr>
                                                  {% else %}
                                                  <tr>
                                                    <td colspan=\"9\">No records found</td>
                                                  </tr>
                                                 {% endfor %}
                                                </tbody>
                                            </table>
                 

                                        </div>


                                         \t\t\t\t\t\t\t
                                    </div>
                                </div>
\t\t\t\t\t\t\t\t
                              
                            </div> <!-- Table Tab End  --> 
\t\t\t\t\t\t\t\t\t\t\t\t\t\t
                        </div> <!-- Tab End  --> 


{% endblock %}



{# {% extends 'base.html.twig' %}

{% block title %}LeaveApplication index{% endblock %}

{% block body %}
    <h1>LeaveApplication index</h1>

    <table class=\"table\">
        <thead>
            <tr>
                <th>Id</th>
                <th>EmpId</th>
                <th>FromDays</th>
                <th>ToDays</th>
                <th>Reasons</th>
                <th>Address</th>
                <th>ContactNo</th>
                <th>SpecialRemarks</th>
                <th>Status</th>
                <th>Type</th>
                <th>Entryby</th>
                <th>Entrydate</th>
                <th>Editby</th>
                <th>Editdate</th>
                <th>actions</th>
            </tr>
        </thead>
        <tbody>
        {% for leave_application in leave_applications %}
            <tr>
                <td>{{ leave_application.id }}</td>
                <td>{{ leave_application.empId }}</td>
                <td>{{ leave_application.fromDays ? leave_application.fromDays|date('Y-m-d') : '' }}</td>
                <td>{{ leave_application.toDays ? leave_application.toDays|date('Y-m-d') : '' }}</td>
                <td>{{ leave_application.reasons }}</td>
                <td>{{ leave_application.address }}</td>
                <td>{{ leave_application.contactNo }}</td>
                <td>{{ leave_application.specialRemarks }}</td>
                <td>{{ leave_application.status }}</td>
                <td>{{ leave_application.type }}</td>
                <td>{{ leave_application.entryby }}</td>
                <td>{{ leave_application.entrydate ? leave_application.entrydate|date('Y-m-d H:i:s') : '' }}</td>
                <td>{{ leave_application.editby }}</td>
                <td>{{ leave_application.editdate ? leave_application.editdate|date('Y-m-d H:i:s') : '' }}</td>
                <td>
                    <a href=\"{{ path('app_leave_application_show', {'id': leave_application.id}) }}\">show</a>
                    <a href=\"{{ path('app_leave_application_edit', {'id': leave_application.id}) }}\">edit</a>
                </td>
            </tr>
        {% else %}
            <tr>
                <td colspan=\"15\">no records found</td>
            </tr>
        {% endfor %}
        </tbody>
    </table>

    <a href=\"{{ path('app_leave_application_new') }}\">Create new</a>
{% endblock %} #}
", "leave_application/index.html.twig", "C:\\Apache24\\htdocs\\cwlms\\templates\\leave_application\\index.html.twig");
    }
}
